/* ============================================================================
   VOID HORIZON — landing / teaser design system
   ----------------------------------------------------------------------------
   Identity: "starship bridge console" — phosphor cyan + amber HUD on deep-space
   glass. Display type is an angular HUD stencil (Chakra Petch); the data/console
   body is IBM Plex Mono. Extracted from index.html's inline styles (task: design
   -system refresh) into one tokenized, fully responsive sheet.

   Organisation:
     1. Tokens        — colour, type scale, spacing, radius, shadow, motion
     2. (Dark-only — brand look; light theme removed 2026-09-18 per brand)
     3. Base + game   — reset, canvas, the flight-sim HUD chrome
     4. Layout        — teaser shell, section headers
     5. Components     — hero, nav, dev-blog, galleries, status, scoreboard, CTAs,
                        lightbox, review CMS, stats modal  (reused via shared tokens)
     6. Motion        — one orchestrated load reveal (reduced-motion aware)

   Every colour is painted from a token so BOTH themes stay coherent; the dark
   look is the game's brand (default), light is a refined "daylight blueprint".
   Selectors are preserved verbatim so all inline scripts + data bindings still
   hook the same nodes (posts.json, status.json, concept-match, model manifest,
   lightbox R2 zoom, review flags, stats modal).
   ========================================================================== */

/* ── 1. Tokens (dark = default, the brand) ────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Grounds & surfaces */
  --space:      #04060d;              /* deep-space base            */
  --space-2:    #070c17;              /* one step up from the void  */
  --bg-grad:    radial-gradient(120% 80% at 50% -10%, #0b1226 0%, var(--space) 60%);
  --surface:    #060a13;             /* image / media wells        */
  --surface-2:  #08111d;             /* modals, forms, controls    */
  --panel:      rgba(10,19,34,.55);  /* glass panel fill           */
  --panel-solid:#0a1322;
  --caption-bg: rgba(6,12,24,.72);
  --control-bg: #10233a;
  --control-edge:#315270;
  --hover-fill: #0e1e30;
  --archive-bg: rgba(8,16,30,.35);
  --hero-inset: rgba(95,212,245,.06);
  --row-hover:  rgba(95,212,245,.05);

  /* Teaser atmosphere layers (kept as explicit rgba — a bad value here would
     blank the whole overlay, so no color-mix) */
  --teaser-top: #0d1836;
  --teaser-bot: rgba(11,20,42,.6);
  --grid-line:  rgba(95,212,245,.035);
  --grid-line2: rgba(95,212,245,.028);

  /* Hairlines & glow */
  --edge:       #163049;
  --edge-soft:  #0f2033;
  --edge-glow:  rgba(95,212,245,.30);

  /* Phosphor accents */
  --cyan:       #5fd4f5;
  --cyan-deep:  #2f9fc4;
  --cyan-bright:#78e0fb;
  --amber:      #f5b96a;
  --green:      #6fe3a0;
  --violet:     #b79cf5;
  --on-accent:  #04121e;             /* ink on a cyan/amber fill   */

  /* Text ramp */
  --ink-hi:     #eaf3ff;             /* headings / hero            */
  --text:       #c9d6e8;
  --text-2:     #b7c4d8;             /* long-form body             */
  --text-dim:   #98a9c2;             /* captions, notes            */
  --text-mute:  #6b7c96;

  /* Status accents reuse the phosphor ramp */
  --live:  var(--green);
  --wip:   var(--amber);
  --plan:  var(--violet);
  --fail:  #ff6b6b;

  /* Review CMS (danger) */
  --danger:     #b8404f;
  --danger-bg:  #7a1725;
  --danger-ink: #ffe6e6;

  /* Lightbox stays dark in both themes (viewing full-res art) */
  --overlay:    rgba(2,4,10,.94);

  /* Type — fluid where it earns it, crisp px where data must stay legible */
  --display: 'Chakra Petch', 'IBM Plex Mono', ui-monospace, monospace;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --fs-micro: 10.5px;
  --fs-sm:    11px;
  --fs-data:  12px;
  --fs-base:  13px;
  --fs-body:  clamp(12.5px, 1.1vw + 10.5px, 13px);
  --fs-lede:  clamp(13px, 0.6vw + 12px, 15px);
  --fs-h3:    clamp(14px, 0.5vw + 13px, 15px);
  --fs-sec:   12px;
  --fs-h1:    clamp(36px, 8.4vw, 74px);
  --fs-sub:   clamp(10px, 2.5vw, 13px);

  /* Spacing scale (4px rhythm) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 42px; --sp-8: 64px;

  /* Radius scale */
  --r-xs: 5px; --r-sm: 7px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px;

  /* Elevation */
  --shadow-1: 0 8px 22px rgba(0,0,0,.40);
  --shadow-2: 0 12px 28px rgba(0,0,0,.50);
  --shadow-3: 0 18px 54px rgba(0,0,0,.55);
  --shadow-modal: 0 20px 60px rgba(0,0,0,.70);
  --ring: 0 0 0 1px var(--edge-glow);

  /* Motion */
  --dur-fast: .16s;
  --dur: .18s;
  --dur-slow: .6s;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Layout */
  --content-max: 940px;
  --gutter: clamp(16px, 4vw, 22px);
}

/* ── 2. Light theme — "daylight blueprint" (same tokens, re-pointed) ───────── */

/* ── 3. Base + flight-sim chrome ──────────────────────────────────────────── */
html, body {
  margin: 0; height: 100%;
  background: var(--space); color: var(--text);
  font: var(--fs-base)/1.5 var(--mono); overscroll-behavior: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { background-image: var(--bg-grad); }

/* The playfield IS the window: the canvas fills the viewport and the control
   bars float over it. touch-action:none hands touches to the camera gestures. */
#game-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
/* Floating panels scroll internally instead of colliding on short viewports. */
#fc-controls { max-height: 70vh; overflow: auto; }

@media (max-width: 700px) {
  #fc-hud { white-space: pre-wrap; right: 12px; font-size: var(--fs-sm); }
  #fc-topbar { top: 60px; gap: 6px; padding: 4px 6px; max-height: 32vh; overflow: auto; }
  #fc-controls { max-height: 46vh; gap: 10px; }
}
/* Touch devices: finger-sized targets over precision desktop controls. */
@media (pointer: coarse) {
  button, select { font-size: 15px; padding: 8px 12px; min-height: 40px; }
  label { font-size: 14px; }
  input[type="range"] { min-height: 32px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; }
  input[type="number"], input[type="text"] { font-size: 16px; min-height: 36px; }
}

/* ── 4. Teaser shell + section headers ────────────────────────────────────── */
#teaser {
  position: fixed; inset: 0; z-index: 200; overflow: auto; color: var(--text);
  -webkit-tap-highlight-color: transparent;
  /* Deep-space glass: a top glow, a faint HUD grid, and a settling vignette. */
  background:
    radial-gradient(120% 85% at 50% -8%, var(--teaser-top) 0%, transparent 56%),
    radial-gradient(90% 60% at 50% 108%, var(--teaser-bot) 0%, transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 -1px / 100% 46px,
    linear-gradient(90deg, var(--grid-line2) 1px, transparent 1px) -1px 0 / 46px 100%,
    var(--space);
}
#teaser[hidden] { display: none; }
#teaser-scroll {
  max-width: var(--content-max); margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) var(--gutter) clamp(56px, 8vh, 96px);
}
#teaser header { margin: 0; }
#teaser h1 {
  font: 700 var(--fs-h1)/.98 var(--display); letter-spacing: .06em; margin: 0;
  color: var(--ink-hi);
  text-shadow: 0 0 30px var(--edge-glow), 0 2px 0 rgba(4,6,13,.35);
}
#teaser .sub {
  color: var(--cyan); letter-spacing: .32em; margin: var(--sp-3) 0 0;
  font: 500 var(--fs-sub)/1.4 var(--display); text-transform: uppercase;
}
#teaser .lede {
  color: var(--text-2); max-width: 760px; margin: var(--sp-5) 0 var(--sp-6);
  font-size: var(--fs-lede); line-height: 1.75;
}
#teaser .lede::first-line { color: var(--ink-hi); }

/* HUD section header: a bracket tick, uppercase stencil label, a fading rule. */
#teaser .sec {
  position: relative; color: var(--cyan); font: 600 var(--fs-sec)/1.2 var(--display);
  letter-spacing: .24em; text-transform: uppercase; margin: var(--sp-7) 0 var(--sp-4);
  padding: 0 0 11px 24px; border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan-deep), transparent 72%) 1;
}
#teaser .sec::before {
  content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px;
  border: 1.5px solid var(--cyan); border-radius: 3px; box-shadow: 0 0 10px var(--edge-glow);
}
#teaser .sec span { color: var(--text-dim); }

/* Section intro note — reused across every data section */
#teaser .galnote { color: var(--text-dim); font-size: var(--fs-data); margin: -4px 0 var(--sp-4); line-height: 1.6; }

/* ── 5. Components ────────────────────────────────────────────────────────── */

/* Hero (image / video / model-viewer share one frame) */
#teaser .hero {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-3), inset 0 0 0 1px var(--hero-inset);
}
#teaser .hero img, #teaser .hero video, #teaser .hero model-viewer {
  width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover;
}
#teaser .hero figcaption {
  padding: 11px 15px; font-size: var(--fs-data); color: var(--text-dim);
  background: var(--caption-bg); border-top: 1px solid var(--edge-soft);
}

/* Android King rig demo (model-viewer + controls) */
#teaser .king-effort-media { border-color: var(--cyan-deep); box-shadow: var(--ring), var(--shadow-2); }
#teaser .king-rig-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  padding: 10px 12px; background: var(--surface-2); border-top: 1px solid var(--edge-soft);
}
#teaser .king-rig-controls button, #teaser .king-rig-controls select {
  color: var(--text); background: var(--control-bg); border: 1px solid var(--control-edge);
  border-radius: var(--r-xs); padding: 7px 10px; font: 600 var(--fs-sm)/1.2 var(--mono);
}
#teaser .king-rig-controls [data-king-rig-form][aria-pressed="true"] {
  color: var(--on-accent); background: var(--cyan); border-color: var(--cyan);
}
#teaser .king-rig-controls label { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
#teaser .king-rig-controls [data-king-rig-status] { flex: 1 1 210px; color: var(--cyan); font-size: var(--fs-sm); }
#teaser .king-effort-link { margin: var(--sp-3) 0 var(--sp-5); text-align: center; }
#teaser .king-effort-link a { color: var(--cyan); font-weight: 700; }

/* Accent chip */
#teaser .tag {
  color: var(--on-accent); background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  font-weight: 700; letter-spacing: .12em; font-size: 10px; padding: 3px 8px;
  border-radius: 4px; margin-right: var(--sp-2); box-shadow: 0 0 12px var(--edge-glow);
}

/* Studies & labs nav — pill grid */
#teaser nav.studies { display: flex; flex-wrap: wrap; gap: 9px; margin: 10px 0 4px; }
#teaser nav.studies a {
  flex: 1 1 auto; min-width: 150px; text-align: center; text-decoration: none;
  color: var(--cyan); border: 1px solid var(--edge); border-radius: var(--r-md);
  padding: 12px; background: var(--panel); font-size: var(--fs-base); letter-spacing: .02em;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
#teaser nav.studies a:hover {
  background: var(--hover-fill); border-color: var(--cyan); transform: translateY(-2px);
  box-shadow: var(--shadow-1), var(--ring);
}
#teaser nav.studies h3.navgroup {
  flex: 1 1 100%; margin: var(--sp-3) 0 0; font-size: var(--fs-data); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
}
#teaser nav.studies h3.navgroup:first-child { margin-top: 0; }
#teaser nav.studies details.navother { flex: 1 1 100%; margin-top: var(--sp-4); }
#teaser nav.studies details.navother summary {
  cursor: pointer; font-size: var(--fs-data); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding: 4px 0;
}
#teaser nav.studies details.navother .navrow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }

/* Dev blog — dated <details> cards from posts.json */
#teaser #dev-blog { margin: 0 0 var(--sp-2); }
#teaser .post {
  border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--panel);
  padding: 0 var(--sp-4); margin: 0 0 var(--sp-4); transition: border-color var(--dur);
}
#teaser .post:hover { border-color: var(--cyan-deep); }
#teaser .post[open] { border-color: var(--cyan-deep); box-shadow: var(--ring); }
#teaser .post > summary { cursor: pointer; padding: 15px 4px; list-style: revert; }
#teaser .post > summary::-webkit-details-marker { color: var(--cyan); }
#teaser .post > summary:hover .post-head h3 { color: var(--cyan); }
#teaser .post > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
#teaser .post-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
#teaser .post-head time { color: var(--cyan); font: 500 var(--fs-sm)/1.2 var(--display); letter-spacing: .1em; }
#teaser .post-head h3 {
  margin: 0; font: 600 var(--fs-h3)/1.3 var(--display); color: var(--ink-hi);
  letter-spacing: .01em; flex: 1 1 auto; transition: color var(--dur);
}
#teaser .post-preview { color: var(--text-dim); font-size: var(--fs-body); line-height: 1.62; margin: var(--sp-2) 0 0; flex: 1 1 100%; }
#teaser .post-more { color: var(--cyan); margin-left: 6px; white-space: nowrap; }
#teaser .post-more-open { display: none; }
#teaser .post[open] .post-more-closed { display: none; }
#teaser .post[open] .post-more-open { display: inline; }
#teaser .post-full { padding: 2px 0 var(--sp-4); }
#teaser .post-body { color: var(--text-2); font-size: var(--fs-body); line-height: 1.65; margin: 0 0 var(--sp-3); }
#teaser .post-body:last-child { margin-bottom: 0; }
#teaser .post .gwrap { margin: var(--sp-3) 0 0; }
@media (prefers-reduced-motion: no-preference) {
  #teaser .post[open] > .post-full { animation: post-open var(--dur) ease; }
}
@keyframes post-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Galleries — feature grid, tile grid, forge roster (shared card tokens) */
#teaser .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-2); }
#teaser .gallery figure {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-md); overflow: hidden; background: var(--surface);
  transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur);
}
#teaser .gallery figure:hover { border-color: var(--cyan-deep); transform: translateY(-3px); box-shadow: var(--shadow-2), var(--ring); }
#teaser .gallery img { width: 100%; height: 128px; object-fit: cover; display: block; background: var(--surface); }
#teaser .gallery figcaption { padding: 9px 11px; font-size: 11.5px; line-height: 1.45; color: var(--text-dim); }

#teaser .fullgal { margin: 0 0 var(--sp-2); }
#teaser .fullgal figure img, #teaser .forge-card img { cursor: zoom-in; }
#teaser .gcat { color: var(--cyan); font: 600 var(--fs-sm)/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; margin: var(--sp-4) 0 9px; }
#teaser .gwrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); }
#teaser .gwrap figure {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; background: var(--surface);
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
#teaser .gwrap figure:hover { border-color: var(--cyan-deep); transform: translateY(-2px); }
#teaser .gwrap img { width: 100%; height: 96px; object-fit: cover; display: block; }
#teaser .gwrap figcaption { padding: 6px 8px; font-size: var(--fs-micro); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#teaser .rnd-variants { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); margin: 0 0 var(--sp-3); }
#teaser .rnd-variants figure { margin: 0; border: 1px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
#teaser .rnd-variants img { display: block; width: 100%; height: auto; cursor: zoom-in; }
#teaser .rnd-variants figcaption { padding: 7px 8px; color: var(--text-dim); font-size: var(--fs-micro); }
@media (max-width: 720px) { #teaser .rnd-variants { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Archive expander */
#teaser .archive {
  border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--archive-bg);
  padding: 0 var(--sp-4); margin: 0 0 var(--sp-2); transition: border-color var(--dur);
}
#teaser .archive:hover { border-color: var(--cyan-deep); }
#teaser .archive > summary { cursor: pointer; color: var(--text-dim); font-size: var(--fs-body); line-height: 1.55; padding: 15px 4px; list-style: revert; }
#teaser .archive > summary::-webkit-details-marker { color: var(--cyan); }
#teaser .archive > summary:hover { color: var(--ink-hi); }
#teaser .archive[open] > summary { border-bottom: 1px solid var(--edge-soft); margin-bottom: var(--sp-2); }

/* Status columns (status.json) + the "how we're improving" board */
#teaser .status { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-4); margin: 0 0 var(--sp-2); }
#teaser .col { position: relative; border: 1px solid var(--edge); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-4) var(--sp-3); background: var(--panel); overflow: hidden; }
#teaser .col::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; opacity: .85; }
#teaser .live::before { background: var(--live); box-shadow: 0 0 12px rgba(111,227,160,.5); }
#teaser .wip::before  { background: var(--wip);  box-shadow: 0 0 12px rgba(245,185,106,.5); }
#teaser .plan::before { background: var(--plan); box-shadow: 0 0 12px rgba(183,156,245,.5); }
#teaser .col h3 { margin: 0 0 10px; font: 600 var(--fs-base)/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
#teaser .live h3 { color: var(--live); }
#teaser .wip h3 { color: var(--wip); }
#teaser .plan h3 { color: var(--plan); }
#teaser .col ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12.5px; line-height: 1.72; }
#teaser .col li::marker { color: var(--cyan-deep); }

/* Build log timeline */
#teaser .devlog { list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
#teaser .devlog li { display: flex; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--edge-soft); font-size: 12.5px; color: var(--text-2); line-height: 1.58; }
#teaser .devlog time { color: var(--cyan); flex: 0 0 52px; font: 500 var(--fs-sm)/1.4 var(--display); letter-spacing: .04em; padding-top: 1px; }

/* Concept-match scoreboard — render-vs-concept gate table (concept-match-scores.json) */
#teaser #cms-scoreboard { margin: 0 0 var(--sp-2); }
#teaser .cms-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; color: var(--text-dim); font-size: var(--fs-data); margin: -4px 0 var(--sp-3); }
#teaser .cms-meta strong { color: var(--cyan); }
#teaser .cms-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--panel); }
#teaser table.cms { width: 100%; border-collapse: collapse; font: var(--fs-data)/1.4 var(--mono); min-width: 560px; }
#teaser table.cms th, #teaser table.cms td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--edge-soft); white-space: nowrap; vertical-align: middle; }
#teaser table.cms tbody tr:last-child td { border-bottom: 0; }
#teaser table.cms thead th { color: var(--cyan); font: 600 var(--fs-micro)/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; position: sticky; top: 0; background: var(--panel-solid); }
#teaser table.cms tbody tr:hover { background: var(--row-hover); }
#teaser .cms-thumbs { display: flex; gap: 6px; }
#teaser .cms-thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--edge); background: var(--surface); display: block; }
#teaser .cms-thumbs .cms-noimg { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 6px; border: 1px dashed var(--edge); color: var(--text-mute); }
#teaser .cms-name { color: var(--ink-hi); }
#teaser .cms-kind { color: var(--text-mute); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; }
#teaser td.cms-metric { font-variant-numeric: tabular-nums; }
#teaser td.cms-metric.pass { color: var(--green); }
#teaser td.cms-metric.fail { color: var(--fail); }
#teaser .cms-badge { display: inline-block; font: 700 10px/1 var(--display); letter-spacing: .1em; padding: 4px 8px; border-radius: var(--r-xs); }
#teaser .cms-badge.pass { color: var(--on-accent); background: var(--green); }
#teaser .cms-badge.fail { color: #fff; background: #c0392b; }

/* Character-motion CTA */
#motion-cta {
  display: block; position: relative; margin: 0 0 var(--sp-5); border: 1px solid var(--edge);
  border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
#motion-cta:hover { border-color: var(--cyan); box-shadow: var(--ring), var(--shadow-2); }
#motion-cta img { display: block; width: 100%; height: auto; }
#motion-cta .motion-play {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 10px 20px; background: rgba(5,8,16,.86); border: 1px solid var(--cyan); border-radius: var(--r-sm);
  color: var(--cyan); letter-spacing: .06em; font-size: var(--fs-base); white-space: nowrap; backdrop-filter: blur(3px);
  transition: background var(--dur), color var(--dur);
}
#motion-cta:hover .motion-play { background: var(--cyan); color: var(--on-accent); }

/* Launch CTA — the one loud button on the page */
#enter-sim {
  display: inline-block; position: relative; background: linear-gradient(180deg, #124a6e, #0b2b45);
  color: #eaf7ff; border: 1px solid var(--cyan-deep); border-radius: var(--r-lg); padding: 15px 26px; cursor: pointer;
  font: 600 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 10px 34px rgba(20,80,120,.45), inset 0 1px 0 rgba(120,224,251,.25);
  transition: transform var(--dur-fast), box-shadow var(--dur), background var(--dur);
}
#enter-sim:hover { background: linear-gradient(180deg, #1a5f8c, #0f3a5c); transform: translateY(-2px); box-shadow: 0 16px 44px rgba(30,110,160,.55), var(--ring), inset 0 1px 0 rgba(120,224,251,.35); }
#enter-sim:active { transform: translateY(0); }
#teaser .foot { color: var(--text-mute); font-size: 11.5px; margin: var(--sp-5) 0 0; line-height: 1.6; }

/* ── Lightbox (stays dark in both themes — full-res art viewing) ───────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 400; background: var(--overlay); display: flex;
  align-items: center; justify-content: center; padding: 3vh 3vw; cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img, #lightbox video { max-width: 96vw; max-height: 94vh; object-fit: contain; border: 1px solid #24405e; border-radius: var(--r-sm); box-shadow: 0 24px 80px rgba(0,0,0,.7); }
#lightbox video[hidden], #lightbox img[hidden] { display: none; }
#lightbox-close { position: fixed; top: 16px; right: 22px; color: #cfe0f2; font-size: 30px; cursor: pointer; line-height: 1; opacity: .8; }
#lightbox-close:hover { opacity: 1; }
#teaser .gallery img, #teaser .gwrap img, #teaser .hero img { cursor: zoom-in; }

/* ── Review CMS (task-378) — one-tap flag overlay, review mode only ────────── */
#review-badge { position: fixed; right: 10px; bottom: 10px; z-index: 60; font: var(--fs-sm)/1 var(--mono); letter-spacing: .12em; color: #ffb4b4; background: rgba(40,8,12,.8); border: 1px solid #6d2530; border-radius: 6px; padding: 6px 8px; pointer-events: none; }
#flag-lb { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 420; background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger); border-radius: var(--r-md); padding: 12px 20px; font: 15px/1 var(--mono); cursor: pointer; }
#flag-toast { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 620; background: var(--surface-2); color: #cfe0f2; border: 1px solid #24405e; border-radius: var(--r-sm); padding: 10px 16px; font: var(--fs-base)/1.3 var(--mono); max-width: 86vw; text-align: center; }
#flag-form { position: fixed; inset: 0; z-index: 500; background: rgba(2,4,10,.82); display: flex; align-items: center; justify-content: center; padding: 4vh 5vw; }
#flag-form-inner { width: min(420px, 94vw); background: var(--surface-2); border: 1px solid #24405e; border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-modal); }
#flag-form-what { color: #9fb6cf; font: var(--fs-data)/1.4 var(--mono); margin-bottom: 10px; word-break: break-word; }
#flag-form-reason { width: 100%; box-sizing: border-box; background: #050a12; color: #e6f0fb; border: 1px solid #24405e; border-radius: var(--r-sm); padding: 10px; font: 15px/1.4 var(--mono); resize: vertical; }
#flag-form-row { display: flex; gap: 10px; margin-top: 12px; }
#flag-form-row button { flex: 1; border-radius: var(--r-sm); padding: 13px 10px; font: 14px/1 var(--mono); cursor: pointer; }
#flag-form-cancel { background: #12233a; color: #cfe0f2; border: 1px solid #24405e; }
#flag-form-send { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger); }
#flag-form[hidden], #flag-lb[hidden], #flag-toast[hidden], #review-badge[hidden] { display: none; }
body.review-on .flagtarget { position: relative; }
.flag-tile { position: absolute; top: 4px; right: 4px; z-index: 3; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--danger); background: rgba(60,10,18,.78); color: var(--danger-ink); font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
figure.flagged { opacity: .42; outline: 2px solid var(--danger); outline-offset: -2px; }
figure.flagged .flag-tile { background: var(--danger); opacity: 1; }

/* ── Stats modal ──────────────────────────────────────────────────────────── */
#stats-btn { position: fixed; left: 12px; bottom: 12px; z-index: 50; background: var(--surface-2); color: var(--cyan); border: 1px solid #24405e; border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; font: var(--fs-base)/1 var(--mono); backdrop-filter: blur(4px); }
#stats-btn:hover { background: var(--hover-fill); }
#stats-modal { position: fixed; inset: 0; z-index: 100; background: rgba(2,4,10,.72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 4vh 3vw; }
#stats-modal[hidden] { display: none; }
#stats-modal-inner { position: relative; width: min(940px, 96vw); height: min(86vh, 900px); background: #05070d; border: 1px solid #24405e; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-modal); }
#stats-close { position: absolute; right: 8px; top: 8px; z-index: 2; background: #12233a; color: #cfe0f2; border: 1px solid #24405e; border-radius: 6px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; }
#stats-close:hover { background: #1a3454; }
#stats-frame { width: 100%; height: 100%; border: 0; background: #05070d; }

/* ── 6. One orchestrated load reveal (reduced-motion aware) ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  #teaser-scroll > header, #teaser-scroll > .lede,
  #teaser-scroll > .sec:first-of-type, #teaser-scroll > .hero:first-of-type {
    animation: teaser-rise var(--dur-slow) var(--ease) both;
  }
  #teaser-scroll > .lede { animation-delay: .08s; }
  #teaser-scroll > .sec:first-of-type { animation-delay: .16s; }
  #teaser-scroll > .hero:first-of-type { animation-delay: .24s; }
}
@keyframes teaser-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Narrow-screen refinements (mobile-first base already flows; these tune) ── */
@media (max-width: 480px) {
  #teaser .gallery { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  #teaser .gwrap { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  #teaser .sec { letter-spacing: .18em; }
}
