:root {
  color-scheme: dark;
  --bg: #0c0e15;
  --panel: #151822;
  --line: #2b2f3e;
  --text: #f5f3ef;
  --muted: #a9adbe;
  --gold: #edc58a;
  --radius: 14px;
  --width: 1240px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
::selection { background: #edc58a; color: #17131d; }
header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 28px; max-width: var(--width); padding: 12px 0; margin: auto; }
.brand { display: flex; flex-shrink: 0; }
.brand img { width: 156px; height: 62px; object-fit: contain; }
nav { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
nav a { padding: 10px 16px; border-radius: 8px; color: #c8cad5; transition: color .18s, background .18s; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); background: #1a1d29; }
nav a:last-child { margin-left: 10px; border: 1px solid #3c3b4c; background: #1a1b27; color: var(--text); max-width: 270px; overflow-wrap: anywhere; }
nav span { margin-left: 16px; color: var(--gold); }
.hero { position: relative; min-height: 568px; display: flex; align-items: center; isolation: isolate; max-width: var(--width); margin: 8px auto 0; overflow: hidden; border: 1px solid #323042; border-radius: 20px; background: #11131f; }
.world { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #11131ff5 5%, #11131fe8 31%, #11131f80 58%, #11131f15 100%), linear-gradient(0deg, #11131fc9, transparent 50%); }
.hero-content { padding: 64px; max-width: 680px; }
.eyebrow, .index, .tag { font-size: 12px; letter-spacing: .15em; color: var(--gold); font-weight: 700; }
.eyebrow { margin: 0 0 20px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 11px; border: 1px solid #edc58a33; border-radius: 5px; background: #edc58a0a; font-size: 11px; }
.hero .eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: clamp(42px, 4.8vw, 66px); font-weight: 700; letter-spacing: -.045em; line-height: 1.1; margin: 0 0 24px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--gold); }
h2 { font-size: 25px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; margin: 20px 0 12px; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; }
p { margin: 0 0 18px; }
.intro { font-size: 17px; color: #bfc2d0; max-width: 470px; line-height: 1.85; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; margin-bottom: 18px; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 24px; padding: 13px 23px; border: 1px solid #f5d39f; border-radius: 8px; background: var(--gold); color: #221b12; font-weight: 650; font-size: 15px; line-height: 1.5; text-align: center; text-decoration: none; box-shadow: inset 0 1px 0 #ffffff25, 0 4px 16px #00000018; transition: background .18s, border-color .18s, transform .18s; }
.button:hover { background: #f6d7a7; border-color: #f6d7a7; color: #221b12; transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.secondary { background: #1a1b2980; color: var(--text); border-color: #565365; box-shadow: none; }
.button.secondary:hover { background: #282838; border-color: #8c8599; }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.small { font-size: 14px; color: var(--muted); line-height: 1.75; }
.hero .small { font-size: 13px; margin-bottom: 0; }
.hero-number { position: absolute; right: 36px; bottom: 30px; display: flex; align-items: center; gap: 12px; color: var(--gold); font-size: 16px; font-weight: 600; }
.hero-number span { font-size: 11px; letter-spacing: .15em; color: #d2cbdc; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; max-width: var(--width); padding: 24px 0 64px; margin: auto; }
.features article { padding: 28px 30px; background: linear-gradient(140deg, #191b27, #12151e); border: 1px solid var(--line); border-radius: var(--radius); }
.features .index { display: inline-block; font-size: 11px; }
.features h2 { margin-top: 16px; font-size: 22px; }
.features p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.8; }
footer { max-width: var(--width); margin: auto; border-top: 1px solid var(--line); padding: 28px 0 34px; display: flex; align-items: center; gap: 28px; justify-content: space-between; font-size: 12px; letter-spacing: .04em; }
footer > span:first-child { font-weight: 650; }
footer a { color: var(--muted); padding: 8px; }
.muted { color: var(--muted); }
.page { max-width: var(--width); margin: auto; padding: 64px 0 80px; min-height: calc(100vh - 199px); }
.page h1 { font-size: clamp(38px, 4.5vw, 54px); max-width: 720px; }
.page > .intro { max-width: 600px; }
.panel { background: linear-gradient(135deg, #1a1c29, #141721); border: 1px solid #343545; border-radius: var(--radius); padding: 36px; min-width: 0; box-shadow: 0 16px 50px #00000012; }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 36px; align-items: start; }
.download-grid > .panel { border-top-color: #a88a5e; padding: 40px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 4px 0; }
.steps li { position: relative; counter-increment: step; padding: 0 0 28px 60px; }
.steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; color: var(--gold); font-size: 13px; font-weight: 650; border: 1px solid #474031; background: #edc58a08; border-radius: 10px; }
.steps li:last-child { padding-bottom: 0; }
.steps p { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.steps a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.tag { display: inline-block; border: 1px solid #edc58a38; background: #edc58a08; padding: 5px 10px; border-radius: 5px; font-size: 11px; }
.download-grid h2 { font-size: 44px; margin: 20px 0 8px; }
#release-meta { color: var(--muted); font-size: 14px; }
.download-grid .button { width: 100%; margin: 10px 0 18px; }
#download-note { margin-bottom: 0; }
code { display: block; overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; color: var(--gold); margin: 12px 0; padding: 14px; background: #0b0e1780; border-radius: 8px; }
details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.account-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,480px); gap: 100px; align-items: start; padding-top: 64px; }
.account-page > div:first-child { padding-top: 32px; }
.account-page .panel { padding: 32px; border-top-color: #857055; }
.account-page h1 { max-width: 430px; }
.account-context { border-left: 2px solid #6c5b46; padding-left: 18px; margin-top: 28px; max-width: 360px; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); background: #0e1019; border-radius: 9px; margin-bottom: 28px; }
.tabs button { flex: 1; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); padding: 9px 12px; font-size: 14px; font-weight: 600; }
.tabs button:hover { color: var(--text); }
.tabs button.selected { color: var(--text); background: #292a39; border-color: #434153; box-shadow: 0 2px 4px #0003; }
#form-title { margin: 0 0 24px; font-size: 25px; }
label { display: block; font-size: 14px; font-weight: 500; margin: 20px 0 8px; color: #d5d5df; }
input, select { display: block; width: 100%; min-height: 50px; background: #0f121c; border: 1px solid #3a3e50; padding: 12px 14px; color: var(--text); border-radius: 8px; transition: border-color .18s; }
input:hover, select:hover { border-color: #606177; }
input:focus, select:focus { border-color: var(--gold); }
input::placeholder { color: #747a90; }
#form-help { font-size: 13px; margin: 12px 0 20px; }
form .button { width: 100%; margin-top: 0; }
.text-button { border: 0; background: none; padding: 10px 0; color: var(--gold); font-size: 14px; line-height: 1.6; text-align: left; }
.text-button:hover { color: #f7ddb7; text-decoration: underline; text-underline-offset: 4px; }
#recover-link { display: block; margin: 12px auto -4px; }
#message { margin: 20px 0 0; padding: 12px 14px; border: 1px solid #edc58a38; background: #edc58a08; border-radius: 8px; color: var(--gold); font-size: 14px; }
#message:empty { display: none; }
#player-name { font-size: 30px; margin-bottom: 16px; overflow-wrap: anywhere; }
#signed-in > p { color: var(--muted); font-size: 15px; }
#create-code { width: 100%; margin-top: 8px; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px; }
.account-actions .text-button { color: var(--muted); font-size: 13px; }
#device-code { margin-top: 24px; padding: 24px 16px 18px; border: 1px dashed #79664d; border-radius: 10px; text-align: center; background: #edc58a06; }
#code { display: block; font: 600 clamp(23px, 3vw, 34px)/1.4 Consolas, monospace; color: var(--gold); letter-spacing: .1em; overflow-wrap: anywhere; }
#code-expiry { font-size: 13px; margin: 12px 0 0; }
#recovery-result { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
#recovery-result p { color: var(--muted); font-size: 14px; }
#save-recovery { width: 100%; font-size: 14px; }
.leader-controls { display: flex; gap: 20px; margin: 28px 0; }
.leader-controls label { flex: 0 1 280px; margin: 0; }
.leader-controls select { margin-top: 8px; }
.board { padding: 8px 24px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
td, th { padding: 20px 16px; border-bottom: 1px solid var(--line); }
td:first-child { color: var(--gold); width: 90px; }
td:nth-child(2) { overflow-wrap: anywhere; }
td:last-child, th:last-child { text-align: right; }
tr:last-child td { border-bottom: 0; }
#board-state { text-align: center; color: var(--muted); padding: 48px 16px; margin: 0; font-size: 15px; }
.board + .small { margin-top: 20px; }
#privacy { max-width: 880px; }
#privacy .panel { color: #c5c7d2; }
#privacy .panel p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }
@media (max-width: 1320px) {
  header, .hero, .features, .page, footer { margin-left: 32px; margin-right: 32px; }
  #privacy { margin-left: auto; margin-right: auto; }
}
@media (max-width: 960px) {
  .hero-content { padding: 48px; max-width: 620px; }
  .hero-number { display: none; }
  .features { gap: 14px; }
  .features article { padding: 24px; }
  .features h2 { font-size: 20px; }
  .account-page { gap: 40px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .account-page .panel { padding: 26px; }
  .download-grid { gap: 36px; }
  #privacy { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 700px) {
  header, .hero, .features, .page, footer, #privacy { margin-left: 20px; margin-right: 20px; }
  header { min-height: 84px; flex-wrap: wrap; gap: 0; padding: 8px 0 16px; }
  .brand img { width: 128px; height: 58px; }
  nav { width: 100%; justify-content: space-between; gap: 4px; font-size: 13px; }
  nav a { padding: 9px 10px; }
  nav a:last-child { margin-left: 0; max-width: 45%; }
  .hero { min-height: 540px; margin-top: 0; border-radius: 14px; }
  .world { object-position: 62% center; }
  .hero::after { background: linear-gradient(90deg, #11131feb, #11131f9e), linear-gradient(0deg, #11131feb, transparent); }
  .hero-content { padding: 40px 28px; width: 100%; }
  h1 { font-size: clamp(36px, 8vw, 52px); }
  .intro { font-size: 16px; line-height: 1.8; }
  .actions { margin-top: 28px; gap: 10px; }
  .actions .button { flex: 1 1 180px; }
  .features, .download-grid, .account-page { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .features { padding: 20px 0 40px; }
  .features article { padding: 26px; }
  .features h2 { font-size: 23px; }
  .page { padding: 36px 0 48px; }
  .page h1 { font-size: 38px; }
  .account-page { gap: 28px; }
  .account-page > div:first-child { padding-top: 0; }
  .account-page .intro { margin-bottom: 0; }
  .account-context { margin-top: 18px; }
  .panel, .download-grid > .panel { padding: 26px; }
  .download-grid { margin-top: 28px; gap: 36px; }
  .steps li { padding-left: 52px; }
  .leader-controls { gap: 12px; }
  .leader-controls label { min-width: 0; }
  select { font-size: 14px; padding-left: 10px; }
  .board { padding: 4px 12px; }
  td, th { padding: 16px 8px; }
  footer { flex-wrap: wrap; gap: 8px 20px; padding: 20px 0; }
  footer > span:last-child { width: 100%; }
}
@media (max-width: 380px) {
  header, .hero, .features, .page, footer, #privacy { margin-left: 14px; margin-right: 14px; }
  nav { font-size: 12px; }
  nav a { padding: 9px 7px; }
  .hero-content, .account-page .panel { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
