/* Tokens mirror HistoryTimeline/UI/Theme.swift so the site and the app can't drift apart. */
:root {
  --night: #070D1E;
  --navy: #0C1630;
  --panel: #111D3A;
  --panel-high: #172850;
  --stroke: #2A3D6B;
  --text: #EEF2FF;
  --text-dim: #8B9CC4;

  --lime: #A8FF3E;
  --green: #4CC53A;
  --green-deep: #2E8A22;
  --gold: #FFC94A;
  --gold-deep: #C47A12;
  --purple: #7B4DFF;
  --sky: #4DB5FF;
  --orange: #FF9A3D;
  --red: #FF5A5F;
  --good: #E8E24A;

  --display: "Barlow Condensed", "SF Pro Display", system-ui, sans-serif;
  --body: "Barlow", "SF Pro Text", system-ui, sans-serif;
  --mark: "Fraunces", "New York", Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--navy) 0%, var(--night) 60%) fixed, var(--night);
  color: var(--text);
  font: 400 18px/1.5 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--lime) 40%, var(--night)); color: #fff; }
html { scrollbar-color: var(--stroke) var(--night); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons (GameButtonStyle / SecondaryButtonStyle) ---------- */
.btn-game {
  --top: var(--green); --bottom: var(--green-deep);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 60px; padding: 0 34px;
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--top) 45%, transparent);
  color: #fff; text-decoration: none; text-transform: uppercase;
  font: 800 26px/1 var(--display); letter-spacing: .01em;
  text-shadow: 0 1.5px 0 rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .2s, filter .2s;
}
.btn-game::before {
  content: ""; position: absolute; inset: 3px 3px auto; height: 45%;
  border-radius: 13px 13px 10px 10px; background: rgba(255,255,255,.18); pointer-events: none;
}
.btn-game:hover { filter: brightness(1.06); box-shadow: 0 6px 22px color-mix(in srgb, var(--top) 60%, transparent); }
.btn-game:active { transform: scale(.97); }
.btn-game:disabled { filter: grayscale(.6) brightness(.7); cursor: default; }
.btn-game .i { width: .9em; height: .9em; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 22px;
  border: 1px solid var(--stroke); border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-high) 90%, transparent), color-mix(in srgb, var(--panel) 90%, transparent));
  font: 700 20px/1 var(--display); text-transform: uppercase; cursor: pointer;
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), border-color .2s;
}
.btn-secondary:hover { border-color: color-mix(in srgb, var(--sky) 60%, var(--stroke)); }
.btn-secondary:active { transform: scale(.97); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: linear-gradient(180deg, rgba(12,22,48,.92), rgba(12,22,48,.6) 70%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--display); }
.brand img { border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.topnav { display: flex; gap: 22px; margin-left: auto; }
.topnav a, .topnav button { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none; font: 600 18px/1 var(--display); color: var(--text-dim); transition: color .2s; }
.topnav a:hover, .topnav button:hover { color: var(--text); }
.chip-cta {
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  border: 1px solid rgba(255,255,255,.22);
  font: 800 17px/1 var(--display); text-transform: uppercase; color: #fff;
  box-shadow: 0 2px 10px rgba(76,197,58,.4);
}

/* ---------- Card art (EventArt) ---------- */
.cat-politics     { --top: #E5AE45; --bottom: #4A2C0C; }
.cat-conflict     { --top: #E5484D; --bottom: #3D0B16; }
.cat-science      { --top: #4DB5FF; --bottom: #0C2452; }
.cat-technology   { --top: #33D6BC; --bottom: #073634; }
.cat-exploration  { --top: #62D385; --bottom: #0B3322; }
.cat-culture      { --top: #AE77FF; --bottom: #26114F; }
.cat-architecture { --top: #F29447; --bottom: #40200A; }
.cat-disaster     { --top: #FF7043; --bottom: #380A06; }

.art {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, color-mix(in srgb, var(--top) 85%, transparent), var(--bottom));
}
.art::before { /* sunburst + light pooling */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--top) 90%, transparent) 0, color-mix(in srgb, var(--top) 25%, transparent) 26%, transparent 50%),
    repeating-conic-gradient(from 0deg at 50% 52%, rgba(255,255,255,.06) 0deg 12.857deg, transparent 12.857deg 25.714deg);
  mix-blend-mode: screen;
}
.art::after { /* bottom depth + laminated sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 35%, transparent 50%),
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,.35));
}
.art-icon {
  position: absolute; left: 50%; top: 52%; width: 42%; height: 42%; transform: translate(-50%, -50%);
  stroke: color-mix(in srgb, #fff 88%, var(--top)); stroke-width: 1.7; fill: color-mix(in srgb, #fff 22%, transparent);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)) drop-shadow(0 0 18px color-mix(in srgb, var(--top) 70%, transparent));
}
.art-icon.solid { stroke: color-mix(in srgb, #fff 80%, var(--top)); stroke-width: 1.4; fill: color-mix(in srgb, #fff 80%, var(--top)); }
.art-spark { position: absolute; width: 6%; aspect-ratio: 1; fill: #fff; pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(28px, 5vw, 72px);
  min-height: min(calc(100svh - 64px), 820px);
  padding: clamp(20px, 4vh, 48px) var(--gutter) clamp(40px, 7vh, 80px);
}
.hero-copy { display: grid; justify-items: start; }
.wordmark { margin: 0; display: grid; justify-items: start; line-height: .9; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.wm-name {
  font-family: var(--mark); font-weight: 900; font-variation-settings: "opsz" 144; letter-spacing: -.01em;
  font-size: clamp(46px, 5.3vw, 80px);
  background: linear-gradient(180deg, #FFF1A8 8%, var(--gold) 52%, var(--gold-deep) 92%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255,201,74,.35));
}
.wm-trivia {
  margin: .5em 0 0 .35em; padding: .26em 1.5em;
  font-family: var(--mark); font-weight: 900; font-size: clamp(17px, 2vw, 26px); letter-spacing: .2em;
  color: #fff;
  background: linear-gradient(180deg, #3C7BE0, #1D4596);
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
}
.hero-line {
  margin: clamp(22px, 3.4vh, 34px) 0 0; max-width: 18ch;
  font: 800 clamp(32px, 3.7vw, 50px)/.98 var(--display); text-transform: uppercase; letter-spacing: -.005em;
  text-wrap: balance;
}
.hero-line em { display: block; margin-top: .12em; font-style: normal; color: var(--lime); text-shadow: 0 0 22px color-mix(in srgb, var(--lime) 40%, transparent); }
.lede { max-width: 46ch; margin: 16px 0 0; font: 400 clamp(17px, 1.35vw, 19px)/1.5 var(--body); color: color-mix(in srgb, var(--text) 80%, var(--text-dim)); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px; margin-top: 28px; }
.btn-hero { min-height: 68px; padding: 0 36px; font-size: 28px; }

/* Watch trailer: a thumbnail of the trailer's opening shot, so the button shows what it plays. */
.btn-trailer {
  display: inline-flex; align-items: center; gap: 14px; min-height: 68px; padding: 7px 22px 7px 7px;
  border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--panel) 80%, transparent); text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s cubic-bezier(.3,1.6,.5,1);
}
.btn-trailer:hover { border-color: color-mix(in srgb, var(--sky) 70%, var(--stroke)); background: color-mix(in srgb, var(--panel-high) 85%, transparent); }
.btn-trailer:active { transform: scale(.97); }
.bt-thumb { position: relative; flex: none; width: 96px; height: 54px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.bt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.btn-trailer:hover .bt-thumb img { transform: scale(1.08); }
.bt-disc {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--night); box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.bt-disc svg { width: 14px; height: 14px; margin-left: 2px; }
.bt-text { display: grid; gap: 5px; }
.bt-big { font: 700 22px/1 var(--display); text-transform: uppercase; }
.bt-small { font: 500 14px/1 var(--body); color: var(--text-dim); }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.live-pill { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 600 17px/1 var(--display); color: var(--text-dim); }
.live-pill i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.live-pill i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; animation: ping 2.4s cubic-bezier(.2,.7,.3,1) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

/* App Store badge. Until the app is live it is a quiet "Coming soon" label, not a link. */
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 12px;
  border: 1px solid var(--stroke); border-radius: 12px; background: rgba(7,13,30,.55);
  color: var(--text-dim); text-decoration: none; text-align: left;
}
.store-badge .i { font-size: 26px; stroke-width: 1.8; }
.sb-text { display: grid; gap: 2px; }
.sb-small { font: 500 12px/1.1 var(--body); }
.sb-big { font: 700 21px/1 var(--display); color: var(--text); }
.store-badge--compact { padding: 6px 14px 6px 10px; }
.store-badge--compact .i { font-size: 22px; }
.store-badge--compact .sb-big { font-size: 18px; }
.store-badge.is-live { color: var(--text); transition: border-color .2s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.store-badge.is-live:hover { border-color: var(--text-dim); }
.store-badge.is-live:active { transform: scale(.97); }

/* The self-playing round */
.hero-demo { display: grid; justify-items: center; gap: 22px; }
.hd-stack { position: relative; width: clamp(240px, 24vw, 310px); }
.hd-card, .hd-ghost { border-radius: var(--r-lg); }
.hd-card {
  position: relative; z-index: 2; display: flex; flex-direction: column; aspect-ratio: 4 / 5; overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--top, var(--stroke)) 65%, transparent);
  background: linear-gradient(180deg, var(--panel-high), var(--panel));
  box-shadow: 0 24px 48px rgba(0,0,0,.5), 0 0 40px color-mix(in srgb, var(--top, transparent) 25%, transparent);
}
.hd-card:has(.cat-politics) { --top: #E5AE45; } .hd-card:has(.cat-conflict) { --top: #E5484D; }
.hd-card:has(.cat-science) { --top: #4DB5FF; } .hd-card:has(.cat-technology) { --top: #33D6BC; }
.hd-card:has(.cat-exploration) { --top: #62D385; } .hd-card:has(.cat-culture) { --top: #AE77FF; }
.hd-card:has(.cat-architecture) { --top: #F29447; } .hd-card:has(.cat-disaster) { --top: #FF7043; }
.hd-card.deal { animation: hd-deal .65s cubic-bezier(.2,1.25,.4,1) both; }
@keyframes hd-deal { from { opacity: 0; transform: translate(34%, 6%) rotate(9deg) scale(.92); filter: blur(4px); } }
.hd-art { flex: 1 1 auto; }
.hd-pill { margin-top: -19px; }
.hero-demo.graded .hd-pill { color: var(--g); border-color: var(--g); box-shadow: 0 0 18px color-mix(in srgb, var(--g) 50%, transparent); }
.hd-title { min-height: 2.3em; padding: 12px 18px 18px; text-align: center; font: 600 clamp(19px, 1.7vw, 23px)/1.15 var(--display); text-wrap: balance; }
.hd-stack .hd-ghost { position: absolute; inset: 0; z-index: 1; aspect-ratio: 4 / 5; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.hd-ghost-a { transform: translate(-21%, 5%) rotate(-10deg) scale(.9); }
.hd-ghost-a span { font-size: clamp(90px, 9vw, 130px); }
.hd-ghost-b { transform: translate(21%, 5%) rotate(10deg) scale(.9); opacity: .85; }
.hd-stamp {
  position: absolute; z-index: 3; right: -14%; top: 8%; display: grid; justify-items: center; gap: 2px;
  padding: 10px 18px 12px; border-radius: 14px; border: 2px solid var(--g, var(--gold));
  background: rgba(7,13,30,.92); box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 24px color-mix(in srgb, var(--g, var(--gold)) 35%, transparent);
  transform: rotate(8deg) scale(.4); opacity: 0; transition: opacity .15s;
}
.hero-demo.graded .hd-stamp { opacity: 1; animation: hd-stamp .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes hd-stamp { 0% { transform: rotate(8deg) scale(1.8); opacity: 0; } 100% { transform: rotate(8deg) scale(1); opacity: 1; } }
.hd-grade { font: 900 clamp(28px, 2.6vw, 36px)/1 var(--display); text-transform: uppercase; color: var(--g, var(--gold)); }
.hd-points { font: 700 20px/1 var(--display); color: var(--g, var(--gold)); font-variant-numeric: tabular-nums; }

.hd-scrub {
  width: min(100%, 400px); padding: 8px 14px 12px; text-align: center; border-radius: var(--r-lg);
  border: 2px solid color-mix(in srgb, var(--lime) 75%, transparent);
  background: linear-gradient(180deg, rgba(23,40,80,.55), rgba(7,13,30,.75));
  box-shadow: 0 10px 26px rgba(0,0,0,.35), inset 0 0 30px rgba(168,255,62,.04);
}
.hd-year { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 8px; color: var(--lime);
  text-shadow: 0 0 12px color-mix(in srgb, var(--lime) 70%, transparent), 0 0 28px color-mix(in srgb, var(--lime) 35%, transparent); }
.hd-num { font: 600 clamp(56px, 5.6vw, 74px)/1 var(--display); font-variant-numeric: tabular-nums; }
.hd-era { font: 600 26px/1 var(--display); }
/* A real measuring scale: minor ticks every 12px, majors every 60px, sliding with the year. */
.hd-ruler {
  position: relative; height: 30px; margin-top: 4px;
  background:
    linear-gradient(90deg, rgba(238,242,255,.55) 2px, transparent 2px) var(--shift, 0) 0 / 60px 100% repeat-x,
    linear-gradient(90deg, rgba(238,242,255,.25) 1.5px, transparent 1.5px) var(--shift, 0) 12px / 12px 18px repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.hd-needle { position: absolute; left: 50%; top: -4px; bottom: -2px; width: 3px; transform: translateX(-50%); border-radius: 2px; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.hd-caption { margin: 8px 0 0; font: 600 17px/1.2 var(--display); color: var(--text-dim); }
.hd-caption b { color: var(--text); font-weight: 700; }

/* The gold mystery card from the app icon and home screen (MysteryCardArt). */
.mystery {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, #24407A, #13224A 55%, var(--night));
  box-shadow: inset 0 0 0 2px var(--gold), 0 14px 28px rgba(0,0,0,.5);
}
.mystery::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,201,74,.45), rgba(255,201,74,.1) 30%, transparent 56%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,201,74,.07) 0deg 12.857deg, transparent 12.857deg 25.714deg);
  mix-blend-mode: screen;
}
.mystery::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.14), transparent 45%);
}
.mystery span {
  position: relative; z-index: 1;
  font: 900 calc(var(--card-w, 120px) * .62)/1 var(--mark); font-variation-settings: "opsz" 144;
  background: linear-gradient(180deg, #FFF6C4, var(--gold) 55%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 3px 0 #8A4E08) drop-shadow(0 0 14px rgba(255,201,74,.5));
}


/* ---------- Playable stage ---------- */
.stage { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 90px; scroll-margin-top: 64px; }
.stage-head { display: grid; justify-items: center; text-align: center; gap: 10px; margin-bottom: 26px; }
.stage-title { margin: 0; font: 800 clamp(34px, 5vw, 48px)/1 var(--display); text-transform: uppercase; color: var(--sky); }
.stage-sub { margin: 0; max-width: 44ch; color: var(--text-dim); }
.progress { display: flex; align-items: center; gap: 0; margin: 10px 0 0; padding: 0; list-style: none; }
.progress li { display: flex; align-items: center; }
.progress li + li::before { content: ""; width: 54px; height: 3px; background: var(--stroke); transition: background .4s; }
.progress li.done + li::before { background: color-mix(in srgb, var(--lime) 70%, var(--stroke)); }
.progress span {
  width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 2px solid var(--stroke);
  transition: background .3s, border-color .3s, box-shadow .3s, transform .3s cubic-bezier(.3,1.6,.5,1);
}
.progress li.current span { border-color: var(--lime); box-shadow: 0 0 12px color-mix(in srgb, var(--lime) 60%, transparent); transform: scale(1.12); }
.progress li.done span { background: var(--g, var(--lime)); border-color: var(--g, var(--lime)); }
.progress-label { margin: 0; font: 600 19px/1 var(--display); color: var(--text-dim); }

.round {
  display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(20px, 3vw, 40px); align-items: start;
}

/* Event card */
.card-slot { display: grid; gap: 10px; }
.event-card {
  all: unset; display: block; cursor: pointer; perspective: 1200px; border-radius: var(--r-lg);
}
.event-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.card-inner {
  position: relative; display: block; aspect-ratio: 3 / 4;
  transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.25,.5,1);
}
.event-card.flipped .card-inner { transform: rotateY(180deg); }
.event-card.deal { animation: deal .55s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes deal { from { opacity: 0; transform: translateX(60px) rotate(6deg) scale(.94); } }
.card-front, .card-back {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  border-radius: var(--r-lg); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1.5px solid color-mix(in srgb, var(--top, var(--stroke)) 60%, transparent);
  background: linear-gradient(180deg, var(--panel-high), var(--panel));
  box-shadow: 0 20px 40px rgba(0,0,0,.45), 0 0 30px color-mix(in srgb, var(--top, transparent) 22%, transparent);
}
.card-back { transform: rotateY(180deg); padding: 26px; justify-content: center; gap: 14px; text-align: center; }
.card-art { flex: 1 1 68%; }
.card-art::after { box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--top) 90%, transparent); }
.cat-tag, .clue-chip {
  position: absolute; top: 12px; z-index: 2; padding: 6px 11px; border-radius: 999px;
  background: rgba(0,0,0,.35); font: 700 14px/1 var(--display); color: rgba(255,255,255,.9);
}
.cat-tag { left: 12px; text-transform: uppercase; letter-spacing: .12em; }
.clue-chip { right: 12px; display: inline-flex; align-items: center; gap: 6px; }
.year-pill {
  position: relative; z-index: 3; align-self: center; margin-top: -19px;
  min-width: 112px; padding: 8px 18px; border-radius: 999px; text-align: center;
  background: var(--night); border: 1.5px solid color-mix(in srgb, var(--lime) 70%, transparent);
  font: 700 22px/1 var(--display); color: var(--lime); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 14px color-mix(in srgb, var(--lime) 35%, transparent);
  transition: color .3s, border-color .3s, box-shadow .3s;
}
.card-title { padding: 12px 18px 20px; text-align: center; font: 600 clamp(22px, 2.3vw, 26px)/1.15 var(--display); }
.back-label { font: 700 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--top, var(--sky)); }
.card-clue { font: 500 21px/1.4 var(--display); }
.back-hint { font-size: 14px; color: var(--text-dim); }
.card-hint { margin: 0; text-align: center; font-size: 15px; color: var(--text-dim); }

/* Scrubber */
.controls { display: grid; gap: 18px; min-width: 0; }
.scrubber {
  position: relative; padding: 16px 16px 8px; border-radius: var(--r-lg);
  border: 2px solid color-mix(in srgb, var(--lime) 75%, transparent);
  background: linear-gradient(180deg, rgba(23,40,80,.55), rgba(7,13,30,.75));
  box-shadow: 0 0 26px color-mix(in srgb, var(--lime) 20%, transparent), inset 0 0 30px rgba(168,255,62,.04);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: border-color .35s, box-shadow .35s;
}
.scrubber:focus-visible { outline-offset: 4px; }
.scrub-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nudge {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: 50%; border: 1px solid var(--stroke); background: var(--panel); color: var(--text-dim);
  font-size: 20px; cursor: pointer; transition: color .2s, transform .15s;
}
.nudge:hover { color: var(--text); }
.nudge:active { transform: scale(.9); }
.big-year {
  all: unset; flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 86px; cursor: text;
  color: var(--g, var(--lime));
  text-shadow: 0 0 12px color-mix(in srgb, var(--g, var(--lime)) 70%, transparent), 0 0 28px color-mix(in srgb, var(--g, var(--lime)) 35%, transparent);
  transition: color .3s;
}
.big-year:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 10px; }
.by-num { font: 600 clamp(62px, 8vw, 84px)/1 var(--display); font-variant-numeric: tabular-nums; }
.by-era { font: 600 clamp(24px, 2.6vw, 30px)/1 var(--display); }
.year-entry { flex: 1; display: flex; justify-content: center; }
.year-entry input {
  width: min(100%, 300px); min-height: 70px; padding: 0 14px; text-align: center;
  border-radius: 14px; border: 2px solid var(--lime); background: var(--night); color: var(--lime);
  font: 600 40px/1 var(--display); outline: none;
}
.year-entry input::placeholder { color: color-mix(in srgb, var(--lime) 35%, transparent); font-size: 28px; }
.year-entry input.bad { border-color: var(--red); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ruler { display: block; width: 100%; height: 84px; cursor: grab; touch-action: none; }
.scrubber.dragging .ruler { cursor: grabbing; }
.scrub-help { margin: 2px 0 6px; text-align: center; font-size: 14px; color: var(--text-dim); }
.round:not([data-phase="placing"]) .scrubber { cursor: default; }
.round:not([data-phase="placing"]) .nudge, .round:not([data-phase="placing"]) .scrub-help { visibility: hidden; }
.round:not([data-phase="placing"]) .big-year { cursor: default; }

/* Overview axis */
.overview { padding: 0 24px; }
.ov-track { position: relative; height: 3px; border-radius: 2px; background: var(--stroke); margin: 14px 0 12px; }
.ov-tick { position: absolute; top: -6px; width: 1.5px; height: 15px; background: var(--text-dim); opacity: .6; transform: translateX(-50%); }
.ov-dot {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--green); border: 3px solid color-mix(in srgb, var(--lime) 80%, transparent); box-shadow: 0 0 10px var(--lime); z-index: 2;
}
.ov-placed { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--g); box-shadow: 0 0 8px var(--g); }
.ov-labels { position: relative; height: 18px; font: 500 15px/1 var(--display); color: var(--text-dim); }
.ov-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* Reveal */
.reveal { display: none; text-align: center; }
.round[data-phase="revealed"] .reveal { display: block; }
.grade {
  margin: 0; font: 900 clamp(38px, 5vw, 52px)/1 var(--display); text-transform: uppercase; color: var(--g);
  text-shadow: 0 0 22px color-mix(in srgb, var(--g) 55%, transparent);
}
.grade.pop { animation: stamp .55s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stamp { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.grade-points { margin: 4px 0 0; font: 700 24px/1 var(--display); color: var(--g); }
.reveal-years { margin: 10px 0 0; font: 600 19px/1.3 var(--display); color: var(--text-dim); }
.reveal-years b { color: var(--text); font-weight: 700; }
.reveal-detail { max-width: 58ch; margin: 12px auto 0; font-size: 17px; line-height: 1.55; color: color-mix(in srgb, var(--text) 85%, var(--text-dim)); }
.actions { display: flex; justify-content: center; }
.actions .btn-game { width: min(100%, 420px); }

/* ---------- Result + hook ---------- */
.result {
  position: relative; display: grid; justify-items: center; text-align: center;
  max-width: 640px; margin: 0 auto; padding: 56px clamp(18px, 4vw, 40px) 32px;
  border-radius: 28px; border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(23,40,80,.85), rgba(17,29,58,.9));
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
  scroll-margin-top: 96px;
}
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }
.result-ribbon {
  position: absolute; top: -22px; padding: 12px 54px;
  background: linear-gradient(180deg, #9A6BFF, var(--purple) 55%, #5530C9);
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.4));
}
.result-title { font: 800 30px/1 var(--display); text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.stars { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.stars svg { width: 62px; height: 62px; fill: #22325C; stroke: #2E4377; stroke-width: 1; }
.stars svg:nth-child(2) { width: 84px; height: 84px; }
.stars svg.on { fill: var(--gold); stroke: #FFE7A0; filter: drop-shadow(0 0 12px rgba(255,201,74,.6)); animation: star-in .5s cubic-bezier(.2,1.7,.4,1) both; }
@keyframes star-in { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
.total { display: grid; margin: 8px 0 0; }
.total-num {
  font: 800 clamp(64px, 10vw, 88px)/1 var(--display); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFF1A8, var(--gold) 55%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.total-label { font: 600 18px/1 var(--display); color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.breakdown {
  width: 100%; margin: 22px 0 0; padding: 6px 18px; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: rgba(7,13,30,.35);
}
.breakdown div { display: flex; justify-content: space-between; padding: 10px 0; font: 600 20px/1 var(--display); }
.breakdown div + div { border-top: 1px solid rgba(42,61,107,.6); }
.breakdown dt { color: var(--text); }
.breakdown dd { margin: 0; color: var(--lime); font-variant-numeric: tabular-nums; }
.breakdown div:last-child dd { color: var(--gold); }
.result-list { width: 100%; margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
.result-list li {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(7,13,30,.35); border: 1px solid rgba(42,61,107,.6);
}
.result-list .mini-art { width: 44px; height: 44px; border-radius: 10px; }
.rl-title { font: 600 18px/1.15 var(--display); }
.rl-years { display: block; font: 500 15px/1.2 var(--display); color: var(--text-dim); }
.rl-grade { font: 800 17px/1 var(--display); text-transform: uppercase; color: var(--g); text-align: right; }
.rl-grade small { display: block; margin-top: 3px; font-weight: 600; font-size: 14px; }
.emoji-line { margin: 18px 0 0; font-size: 30px; letter-spacing: .12em; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.result-actions .btn-game { min-height: 54px; padding: 0 26px; font-size: 22px; }

.hook {
  width: 100%; margin-top: 32px; padding: 26px clamp(18px, 4vw, 30px) 24px;
  border-radius: 22px; border: 1.5px solid color-mix(in srgb, var(--sky) 55%, var(--stroke));
  background: radial-gradient(120% 90% at 50% 0%, rgba(77,181,255,.16), transparent 60%), rgba(7,13,30,.55);
  display: grid; justify-items: center; gap: 12px;
}
.countdown { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.hook-title { margin: 0; max-width: 24ch; font: 700 clamp(26px, 3.4vw, 32px)/1.12 var(--display); }
.hook-body { margin: 0; max-width: 46ch; color: var(--text-dim); }
.hook .store-badge { margin-top: 6px; }
.hook-fine { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ---------- Section titles ---------- */
.section-title { margin: 0; font: 800 clamp(36px, 5vw, 56px)/1 var(--display); letter-spacing: -.005em; }

/* ---------- Watch (demo video slot) ---------- */
.watch {
  max-width: var(--max); margin: 0 auto; padding: 70px var(--gutter);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 90px); align-items: center;
  scroll-margin-top: 64px;
}
.phone {
  width: clamp(250px, 26vw, 320px); aspect-ratio: 402 / 874; padding: 11px;
  border-radius: 52px; background: linear-gradient(145deg, #3A4560, #151B2C 40%, #2A3348);
  box-shadow: 0 40px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 60px rgba(77,181,255,.12);
}
.phone-screen { position: relative; height: 100%; border-radius: 42px; overflow: hidden; background: var(--night); }
.demo-video, .demo-poster, .demo-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The teaser is 9:16 and the screen is taller, so it letterboxes on the teaser's own sky colours. */
.demo-video { object-fit: contain; background: linear-gradient(180deg, #0C1630, #040816); }
.island { position: absolute; top: 10px; left: 50%; width: 31%; height: 26px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.watch-copy { display: grid; justify-items: start; gap: 26px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 22px; }
.steps li { position: relative; padding-left: 64px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--lime); color: var(--lime); font: 800 22px/1 var(--display);
  box-shadow: 0 0 14px color-mix(in srgb, var(--lime) 35%, transparent);
}
.steps li + li::after { content: ""; position: absolute; left: 21px; top: -22px; height: 20px; width: 2px; background: color-mix(in srgb, var(--lime) 40%, transparent); }
.steps h3 { margin: 0; font: 700 26px/1.1 var(--display); }
.steps p { margin: 6px 0 0; max-width: 46ch; color: var(--text-dim); }

/* ---------- Modes ---------- */
.modes { max-width: var(--max); margin: 0 auto; padding: 70px var(--gutter); scroll-margin-top: 64px; }
.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.mode {
  --c: var(--sky);
  position: relative; padding: 20px; border-radius: var(--r-lg);
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--panel)), var(--panel) 60%);
  transition: transform .3s cubic-bezier(.3,1.5,.5,1), box-shadow .3s;
}
.mode:hover { transform: translateY(-4px); box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 20%, transparent); }
.mode-daily { --c: var(--sky); }
.mode-survival { --c: #E5484D; }
.mode-blitz { --c: var(--orange); }
.mode-challenge { --c: var(--purple); }
.mode-badge {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000));
  border: 2px solid color-mix(in srgb, var(--c) 50%, #fff); font-size: 24px; color: #fff;
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent);
}
.mode-badge .i { fill: #fff; stroke: #fff; }
.mode h3 { margin: 16px 0 0; font: 800 28px/1 var(--display); text-transform: uppercase; }
.mode p { margin: 8px 0 0; font: 500 18px/1.3 var(--display); color: var(--text-dim); }

.shelf-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-top: 54px; }
.shelf-title { margin: 0; font: 800 32px/1 var(--display); }
.shelf-sub { margin: 0; color: var(--text-dim); }
.shelf {
  display: flex; gap: 14px; margin: 18px calc(50% - 50vw) 0; padding: 8px calc(50vw - 50%) 22px;
  scroll-padding-inline: calc(50vw - 50%);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf.dragging { cursor: grabbing; scroll-snap-type: none; }
.pack {
  flex: none; width: 190px; scroll-snap-align: start; border-radius: 18px; overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--top) 55%, transparent); background: var(--panel);
  transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
.pack:hover { transform: translateY(-6px) rotate(-1deg); }
.pack .art { aspect-ratio: 1 / 1; }
.pack-body { padding: 12px 14px 16px; }
.pack h4 { margin: 0; font: 700 22px/1.05 var(--display); }
.pack p { margin: 5px 0 0; font: 500 16px/1.2 var(--display); color: var(--text-dim); }
.pack-count { display: inline-block; margin-top: 10px; font: 700 14px/1 var(--display); color: var(--top); text-transform: uppercase; letter-spacing: .08em; }

.extras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; margin: 34px 0 0; padding: 0; list-style: none; }
.extras li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-dim); }
.extras b { color: var(--text); font-weight: 600; }
.extras .i { margin-top: 3px; font-size: 22px; color: var(--gold); }

/* ---------- Scroll-linked span ---------- */
.span { position: relative; height: var(--span-h, 320vh); }
.span-sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding: 64px 0 24px; overflow: hidden; }
.span-head { max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.span-sub { margin: 10px 0 0; color: var(--text-dim); }
.span-year {
  margin: 3vh 0 0; text-align: center; color: var(--lime);
  text-shadow: 0 0 14px color-mix(in srgb, var(--lime) 70%, transparent), 0 0 34px color-mix(in srgb, var(--lime) 35%, transparent);
}
.sy-num { font: 600 clamp(80px, 14vw, 170px)/1 var(--display); font-variant-numeric: tabular-nums; }
.sy-era { margin-left: .2em; font: 600 clamp(28px, 4vw, 52px)/1 var(--display); }
.span-window { position: relative; margin-top: 2vh; }
.span-window::before { /* the needle */
  content: ""; position: absolute; left: 50%; top: 0; height: 176px; width: 3px; transform: translateX(-50%); z-index: 0;
  background: var(--lime); box-shadow: 0 0 10px var(--lime); border-radius: 2px;
}
.span-track { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 0; padding: 0 50vw; will-change: transform; }
.span-track::before { content: ""; position: absolute; left: 50vw; right: 50vw; top: 46px; height: 2px; background: rgba(255,255,255,.14); }
.sp-item { position: relative; flex: none; width: 160px; display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: 34px; opacity: .45; transition: opacity .3s, transform .3s; }
.sp-item.near { opacity: 1; transform: translateY(-6px); }
.sp-dot { position: absolute; top: 40px; width: 14px; height: 14px; border-radius: 50%; background: var(--top); box-shadow: 0 0 10px var(--top); }
.sp-art { width: 108px; height: 136px; margin-top: 28px; border-radius: 14px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 10px 20px rgba(0,0,0,.4); }
.sp-title { font: 600 17px/1.15 var(--display); max-width: 140px; text-wrap: balance; }
.sp-year { font: 700 15px/1 var(--display); color: var(--text-dim); }

/* ---------- Final CTA ---------- */
.final { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 72px; }
.final-card {
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px); border-radius: 28px;
  border: 1.5px solid color-mix(in srgb, var(--gold) 35%, var(--stroke));
  background:
    radial-gradient(80% 120% at 0% 50%, rgba(255,201,74,.12), transparent 60%),
    radial-gradient(70% 100% at 100% 0%, rgba(168,255,62,.08), transparent 60%),
    linear-gradient(180deg, rgba(23,40,80,.8), rgba(12,22,48,.85));
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.final-phone {
  width: clamp(180px, 18vw, 230px); height: auto; margin-block: calc(clamp(28px, 5vw, 56px) * -1.6);
  border-radius: 34px; border: 8px solid #1E2538;
  box-shadow: 0 34px 60px rgba(0,0,0,.55), 0 0 60px rgba(255,201,74,.14); transform: rotate(-5deg);
}
.final-copy { display: grid; justify-items: start; gap: 18px; }
.final-title { margin: 0; font: 900 clamp(44px, 5.6vw, 76px)/.94 var(--display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.final-title em { display: block; font-style: normal; color: var(--lime); text-shadow: 0 0 24px color-mix(in srgb, var(--lime) 40%, transparent); }
.final-body { max-width: 44ch; margin: 0; font: 400 19px/1.5 var(--body); color: color-mix(in srgb, var(--text) 80%, var(--text-dim)); }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.final-actions .btn-secondary { min-height: 60px; font-size: 22px; }
.final-actions .btn-secondary .i { fill: currentColor; stroke: none; }
.final-store { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.final-fine { margin: 0; font-size: 15px; color: var(--text-dim); }

.footer {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 26px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
  color: var(--text-dim); font-size: 15px; border-top: 1px solid rgba(42,61,107,.5);
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 20px/1 var(--display); }
.footer-brand img { border-radius: 7px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { text-decoration: none; font: 600 17px/1 var(--display); }
.footer-links a:hover { color: var(--text); }
.footer-fine {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; font-size: 13px;
}
.footer-fine p { margin: 0; }
.footer-maker { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.footer-maker a { font-weight: 600; }
.footer-social { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; }
.footer-social:hover, .footer-social:focus-visible { color: var(--text); background: rgba(42,61,107,.5); }
.footer-li { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Trailer dialog ---------- */
.trailer { width: min(1100px, calc(100vw - 2 * var(--gutter))); max-width: none; max-height: none; padding: 0; border: 0; background: none; color: var(--text); overflow: visible; }
.trailer::backdrop { background: rgba(4,8,20,.84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.trailer[open] { animation: trailer-in .35s cubic-bezier(.2,.9,.3,1) both; }
@keyframes trailer-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.trailer-frame { aspect-ratio: 16 / 9; max-height: calc(100svh - 140px); margin: 0 auto; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--stroke); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.trailer-video { display: block; width: 100%; height: 100%; }
.trailer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.trailer-bar .btn-game { min-height: 54px; padding: 0 26px; font-size: 22px; }
.trailer-close {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--panel); color: var(--text); transition: border-color .2s;
}
.trailer-close:hover { border-color: var(--text-dim); }
.trailer-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .round { grid-template-columns: 1fr; }
  .card-slot { width: min(100%, 340px); justify-self: center; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .watch { grid-template-columns: 1fr; justify-items: center; padding-top: 40px; }
  .final-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 0; }
  .final-phone { margin: -40px 0 0; width: 190px; }
  .final-copy, .final-store { justify-items: center; justify-content: center; }
  .final-actions { justify-content: center; }

  /* Hero stacks: logo, promise, the self-playing round, then the buttons. */
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 0; min-height: 0; padding-top: 18px; }
  .hero-copy { display: contents; }
  .wordmark { justify-items: center; }
  .wm-trivia { margin-left: 0; }
  .hero-line { order: 1; max-width: 20ch; }
  .hero-demo { order: 2; margin-top: 26px; }
  .hero-actions { order: 3; justify-content: center; }
  .lede { order: 4; margin-top: 22px; }
  .hero-meta { order: 5; justify-content: center; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .topnav { display: none; }
  .topbar { justify-content: space-between; }
  .card-inner { aspect-ratio: 5 / 4; }
  .card-title { padding: 10px 14px 14px; font-size: 20px; }
  .stage-sub { font-size: 16px; }
  .card-slot { width: 100%; }
  .mode-grid { grid-template-columns: 1fr; }
  .extras { grid-template-columns: 1fr; }
  .scrubber { padding: 12px 8px 6px; }
  .nudge { width: 42px; height: 42px; }
  .overview { padding: 0 14px; }
  .progress li + li::before { width: 36px; }
  .result-actions .btn-secondary { flex: 1 1 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; width: min(100%, 380px); margin-top: 22px; }
  .btn-hero { min-height: 64px; }
  .btn-trailer { justify-content: center; }
  .hero-line { font-size: 30px; margin-top: 18px; }
  .hd-stack { width: 168px; }
  .hd-title { font-size: 17px; padding: 10px 12px 12px; }
  .hd-pill { min-width: 92px; padding: 6px 14px; font-size: 18px; margin-top: -16px; }
  .hd-ghost-a span { font-size: 80px; }
  .hd-stamp { right: -32%; top: 6%; padding: 7px 12px 9px; }
  .hd-grade { font-size: 24px; }
  .hd-points { font-size: 16px; }
  .hd-scrub { width: min(100%, 300px); padding: 4px 12px 8px; }
  .hd-num { font-size: 46px; }
  .hd-era { font-size: 20px; }
  .hd-ruler { height: 22px; }
  .hd-caption { font-size: 15px; margin-top: 6px; }
  .hero-demo { gap: 16px; margin-top: 22px; }
  .sp-item { width: 132px; }
  .sp-art { width: 92px; height: 116px; }
  .span-window::before { height: 156px; }
  .final-title { font-size: 42px; }
  .final-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .footer { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-fine { justify-content: center; }
  .trailer-bar .btn-game { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .span { height: auto; }
  .span-sticky { position: static; height: auto; padding-bottom: 40px; }
  .span-window { overflow-x: auto; }
  .span-track { padding: 0 var(--gutter); }
  .span-window::before, .span-year { display: none; }
  .sp-item { opacity: 1; }
}

/* ---------- Text pages (privacy, support) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 64px; }
.doc h1 { margin: 12px 0 6px; font: 800 clamp(40px, 7vw, 56px)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.doc h2 { margin: 36px 0 10px; font: 700 26px/1.1 var(--display); color: var(--gold); text-transform: uppercase; letter-spacing: .02em; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 88%, transparent); }
.doc a { color: var(--sky); }
.doc-meta { color: var(--text-dim) !important; margin: 0 0 24px; }
.doc-summary {
  margin: 0 0 8px; padding: 6px 22px 14px;
  border: 1px solid color-mix(in srgb, var(--lime) 40%, var(--stroke)); border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-high) 90%, transparent), color-mix(in srgb, var(--panel) 90%, transparent));
}
.doc-summary h2 { color: var(--lime); margin-top: 16px; }
.doc-summary ul { margin: 0; padding-left: 20px; }
.doc-summary li { margin: 4px 0; }
.doc-contact .btn-game { color: #fff; }
.doc-fine { font-size: 15px; color: var(--text-dim) !important; }
.doc details {
  margin: 10px 0; border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.doc summary {
  cursor: pointer; list-style: none; padding: 14px 18px;
  font: 700 21px/1.2 var(--display); display: flex; justify-content: space-between; gap: 12px;
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--text-dim); font-weight: 800; }
.doc details[open] summary::after { content: "–"; }
.doc details p { margin: 0; padding: 0 18px 16px; }
.topnav a[aria-current="page"] { color: var(--text); }
.footer a { color: var(--text-dim); }
@media (max-width: 640px) {
  /* The home page hides its section links on phones; the text pages keep theirs, smaller. */
  .topbar:has(+ .doc) .topnav { display: flex; gap: 14px; }
  .topbar:has(+ .doc) .topnav a { font-size: 16px; }
  .topbar:has(+ .doc) .brand span { display: none; }
}
