/* Road Trip Roulette — site-wide styles.
   Night-drive aesthetic: asphalt darks, sunset-neon accents, highway-sign
   green for wayfinding. System font stack, zero external deps. */

:root {
  --bg:        #0b0d12;
  --bg-2:      #12151d;
  --bg-3:      #1a1e29;
  --line:      #2a2f3d;
  --text:      #e8eaf0;
  --text-dim:  #9aa1b2;
  --accent:    #ff7a1a;   /* sunset orange */
  --accent-2:  #a855f7;   /* phonk purple */
  --hwy:       #1f7a3d;   /* highway-sign green */
  --hwy-text:  #ffffff;
  --danger:    #ff4d4d;
  --radius:    12px;
  --max:       1060px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Story-caption display fonts (owner's picks, from ~/Library/Fonts).
   Order of preference: Dinofans, then Gradia Light. */
@font-face {
  font-family: 'Dinofans';
  src: url('../fonts/Dinofans.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Gradia';
  src: url('../fonts/Gradia.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,18,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 4px; height: 58px;
}
.nav-logo {
  font-weight: 800; letter-spacing: .5px; font-size: 17px;
  color: var(--text); margin-right: auto; white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .dice { color: var(--accent); }
.nav a.nav-link {
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.nav a.nav-link:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }
.nav a.nav-link.active { color: var(--accent); }
.nav a.nav-cta {
  background: var(--accent); color: #14100a; font-weight: 800; font-size: 14px;
  padding: 7px 14px; border-radius: 8px; margin-left: 6px; white-space: nowrap;
}
/* Same treatment as the hero's demo button: solid accent that flips to the
   inverse on hover.  Kept at nav scale (14px / 7px-14px padding) on purpose —
   matching the hero's 15px/12px-22px would grow the 58px bar.  Ring is an
   inset shadow so the button doesn't change size on hover. */
.nav a.nav-cta:hover {
  text-decoration: none; filter: none;
  background: #14100a; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.nav-burger { display: none; }

@media (max-width: 880px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: 8px 0 4px;
  }
  .nav-links.open { display: flex; }
  .nav-burger {
    display: block; background: none; border: 1px solid var(--line);
    color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 16px;
    cursor: pointer;
  }
}
@media (min-width: 881px) {
  .nav-links { display: flex; align-items: center; gap: 2px; }
}

/* ── Layout ──────────────────────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; margin-bottom: 18px; }
h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
p.lead { font-size: 18px; color: var(--text-dim); max-width: 640px; }
.dim { color: var(--text-dim); }
.small { font-size: 13px; }
.kbd {
  font-family: var(--mono); font-size: .85em; background: var(--bg-3);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block; font-weight: 800; border-radius: 10px;
  padding: 12px 22px; font-size: 15px; border: 0; cursor: pointer;
}
/* .btn-primary and .btn-invert are exact inverses of one another — the same two
   colours, swapped — and each takes on the other's look when hovered.  They're
   always used as a PAIR (landing hero, story outro), so hovering either one
   previews the other.  The ring is an INSET box-shadow rather than a border:
   these buttons are auto-width, so a real border would grow the box and make
   them jump on hover.  Sizes measured identical in both states. */
.btn-primary { background: var(--accent); color: #14100a; }
.btn-primary:hover {
  text-decoration: none;
  background: #14100a; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.btn-invert {
  background: #14100a; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.btn-invert:hover {
  text-decoration: none;
  background: var(--accent); color: #14100a;
  box-shadow: none;
}

/* ── Cards / grids ───────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 14.5px; }
/* Whole-card links.  Scoped to a.card so every plain <div class="card">
   elsewhere on the site is untouched.  The global `a` rule would otherwise
   paint the entire card accent-orange and underline it on hover, so colour is
   reset to inherit and the hover moves to the card's own chrome instead. */
a.card {
  display: block; color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--bg-3);
  transform: translateY(-2px);
}
a.card:hover h3 { color: var(--accent); }
a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { a.card { transition: none; } a.card:hover { transform: none; } }

/* ── Highway sign motif ──────────────────────────────────────────── */
.hwy-sign {
  display: inline-block; background: var(--hwy); color: var(--hwy-text);
  border: 3px solid #fff; border-radius: 10px; padding: 10px 18px;
  font-weight: 800; letter-spacing: .4px; box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.hwy-sign .sub { display: block; font-weight: 600; font-size: .72em; opacity: .9; }

/* ── Hero ────────────────────────────────────────────────────────── */
/* Full-bleed key art with the copy in a panel on top of it.
   The panel sits along the BOTTOM rather than down one side, because the art
   carries the game's own logo across the middle ~43% of its width: a side
   panel wide enough for this copy always cuts the logo in half, and `cover`
   only affords ~160px of horizontal shift at desktop size — nowhere near
   enough to slide the logo clear.  A wide, short bar clears the logo instead,
   and lands over the art's baked "LOADING…" line, hiding it for free. */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* Rides high so the logo clears the copy panel below.  Free to be chosen on
     looks alone now that the art itself has no "LOADING…" line to hide. */
  object-fit: cover; object-position: 50% 25%;
}
/* Scrim: darkens top and bottom, leaves the logo band nearly clear.  Painted
   after .hero-bg (both absolute, so DOM order decides) and under .hero-inner. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(8,10,15,.62) 0%, rgba(8,10,15,.18) 18%,
    rgba(8,10,15,.10) 46%, rgba(8,10,15,.55) 78%, rgba(8,10,15,.86) 100%);
}
/* Not capped to --max like the rest of the site: the panel is meant to sit
   near the LEFT EDGE of the screen, and a centred 1060px column would inset it
   ~200px on a wide monitor. */
.hero-inner {
  position: relative; z-index: 1;
  max-width: none; margin: 0; padding: 40px clamp(20px, 3.4vw, 56px) 52px;
  min-height: clamp(560px, 86vh, 880px);
  display: flex; align-items: flex-end;          /* copy sits along the bottom */
}
.hero-panel {
  /* Left edge is fixed by .hero-inner's padding; the panel only grows to the
     RIGHT.  The headline column is max-content so it takes exactly the width of
     its longest line — a fixed fraction left a wide dead gap once the headline
     dropped to two short lines.  Wide enough overall that the two CTAs stay on
     one row; much narrower and the panel grows tall enough to cut into the
     "ROULETTE" line of the logo above it. */
  width: min(100%, 880px);                       /* left-anchored, not full-bleed */
  display: grid; gap: 28px 34px; align-items: center;
  grid-template-columns: max-content minmax(0, 1fr);
  padding: 26px 30px 28px;
  background: rgba(10, 12, 18, .76);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.hero-panel h1 { margin-bottom: 0; }
.hero-panel .lead { margin-top: 0; }
@media (max-width: 880px) {
  /* Portrait: the art can't hold a two-column bar, so it stacks and the scrim
     goes flat-dark for legibility.  object-position keeps the car in frame. */
  /* Narrow viewports crop hard horizontally and not at all vertically, so the
     band above the panel is always the art's TOP strip — panning right puts
     the moon and the Space Needle there instead of half-cut logo letters. */
  .hero-bg { object-position: 96% 50%; }
  .hero::after {
    background: linear-gradient(180deg, rgba(8,10,15,.55) 0%, rgba(8,10,15,.72) 45%, rgba(8,10,15,.92) 100%);
  }
  /* Taller than the panel needs, so a band of art still reads above it —
     otherwise the stacked panel fills the hero and the key art disappears. */
  .hero-inner { padding: 32px 20px 32px; min-height: clamp(620px, 92vh, 860px); }
  .hero-panel { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px 24px; }
}
.hero .tag {
  font-family: var(--mono); color: var(--accent); font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.hero p.lead { margin: 18px 0 26px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line); padding: 36px 0 48px;
  color: var(--text-dim); font-size: 13.5px;
}
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }

/* ── Genre page ──────────────────────────────────────────────────── */
.genre-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0; }
.genre-tab {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text-dim);
  font-weight: 700; font-size: 13.5px; padding: 8px 14px; border-radius: 999px;
  cursor: pointer;
}
.genre-tab:hover { color: var(--text); }
.genre-tab.active { color: #0b0d12; background: var(--g, var(--accent)); border-color: var(--g, var(--accent)); }

/* Header row: title alone on its line, description beside it. Below it the
   panel grid starts, so the trait boxes' top border aligns with the art's. */
.genre-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 20px; }
.genre-head h2 { margin-bottom: 0; white-space: nowrap; }
.genre-head p { max-width: 640px; }
@media (max-width: 700px) { .genre-head { flex-direction: column; gap: 6px; } }

/* Top row: car card (sprites + name + stats) beside the genre art, equal
   halves. Below it the traits row, then the two-column tracklist. */
.genre-top { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; margin-bottom: 18px; }
.genre-art { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.genre-art img { width: 100%; height: 100%; object-fit: cover; }
.genre-car {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.genre-car .sprites { display: flex; justify-content: center; align-items: flex-end; gap: 20px; margin-bottom: 12px; }
.genre-car img { height: clamp(110px, 16vw, 170px); width: auto; image-rendering: auto; }
.genre-car .vname { font-weight: 800; font-size: 19px; }
.genre-car .vstats { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-top: 3px; }

.tracklist-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
@media (max-width: 880px) {
  .genre-top { grid-template-columns: 1fr; }
  .genre-art { min-height: 200px; }
  .tracklist-cols { grid-template-columns: 1fr; gap: 0; }
  .tracklist-cols .tracklist + .tracklist { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
  .tracklist-cols .tracklist:first-child { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .tracklist-cols .tracklist:first-child:not(:only-child) .track:last-child { border-bottom: 1px solid var(--line); }
}

.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px; }
@media (max-width: 620px) { .traits { grid-template-columns: 1fr; } }
.trait-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.trait-box h4 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.trait-box.plus h4 { color: #4ade80; }
.trait-box.minus h4 { color: var(--danger); }
.trait-box ul { list-style: none; }
.trait-box li { font-size: 14px; color: var(--text-dim); padding: 3px 0 3px 18px; position: relative; }
.trait-box.plus li::before  { content: "+"; position: absolute; left: 0; color: #4ade80; font-weight: 800; }
.trait-box.minus li::before { content: "–"; position: absolute; left: 0; color: var(--danger); font-weight: 800; }

.tracklist { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.track {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.track:last-child { border-bottom: 0; }
.track:hover { background: var(--bg-3); }
.track.playing { background: var(--bg-3); box-shadow: inset 3px 0 0 var(--g, var(--accent)); }
.track .t-play {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-3); color: var(--text); cursor: pointer; font-size: 13px;
  flex: none; display: grid; place-items: center;
}
.track .t-play:hover { border-color: var(--g, var(--accent)); color: var(--g, var(--accent)); }
.track .t-title { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; }
.track .t-num { font-family: var(--mono); color: var(--text-dim); font-size: 12px; width: 22px; flex: none; }

/* ── Walkthrough ─────────────────────────────────────────────────── */
.toc {
  position: sticky; top: 78px; align-self: start;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 16px; font-size: 14px;
}
.toc a { display: block; color: var(--text-dim); padding: 4px 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.guide-layout { display: grid; grid-template-columns: 230px 1fr; gap: 32px; }
@media (max-width: 880px) { .guide-layout { grid-template-columns: 1fr; } .toc { position: static; } }
.guide h2 { margin-top: 40px; scroll-margin-top: 80px; }
.guide h2:first-child { margin-top: 0; }

/* Section banner: full-width art with the title overlaid on a scrim. */
.wt-fig {
  position: relative; margin: 44px 0 14px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.wt-fig:first-child { margin-top: 0; }
.wt-fig img { width: 100%; display: block; }
.wt-fig h2 {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 46px 20px 14px; color: #fff;
  background: linear-gradient(180deg, rgba(11,13,18,0) 0%, rgba(11,13,18,.85) 78%);
  text-shadow: 0 2px 8px rgba(0,0,0,.9);
}
.wt-cap { margin: -6px 0 14px; font-style: italic; }
.guide p, .guide li { color: var(--text-dim); }
.guide ul { padding-left: 20px; margin: 10px 0; }
.guide .tip {
  border-left: 3px solid var(--accent); background: var(--bg-2);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 14px 0;
  font-size: 14.5px;
}
.guide .tip b { color: var(--accent); }

/* ── Route map ───────────────────────────────────────────────────── */
.route { position: relative; margin: 40px 0; padding-left: 34px; }
.route::before {
  content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(180deg, #f2c94c 0 26px, transparent 26px 44px), #3a3f4d;
}
.stop { position: relative; padding: 0 0 30px; cursor: pointer; }
.stop::before {
  content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--accent);
}
.stop.pass::before { border-color: var(--text-dim); width: 10px; height: 10px; left: -28px; top: 8px; }
.stop-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stop-head .mi { font-family: var(--mono); color: var(--accent); font-size: 13px; font-weight: 700; }
.stop-head .nm { font-weight: 800; font-size: 17px; }
.stop-head .badge {
  font-size: 11px; font-weight: 800; letter-spacing: .6px; border-radius: 5px;
  padding: 2px 8px; background: var(--hwy); color: #fff;
}
.stop.pass .stop-head .badge { background: var(--bg-3); color: var(--text-dim); }
.stop-body { display: none; margin-top: 10px; gap: 16px; }
.stop.open .stop-body { display: flex; align-items: flex-start; }
.stop-biz { display: flex; flex-direction: column; gap: 10px; flex: none; }
.stop-biz img {
  width: 86px; height: auto; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line); padding: 6px;
}
.stop-facts { flex: 1; min-width: 0; }
.stop-facts p {
  color: var(--text-dim); font-size: 14px; padding: 6px 0 6px 14px;
  border-left: 2px solid var(--line); margin: 6px 0;
}
/* Wide screens: the open stop's businesses sit in a gutter LEFT of the
   route line, twice the size, absolutely positioned so the stack may run
   lower than the stop's own row (the gutter below is empty anyway). */
@media (min-width: 700px) {
  .route { margin-left: 216px; }
  .stop { position: relative; }
  .stop-biz { position: absolute; left: -250px; top: 0; width: 172px; }
  .stop-biz img { width: 172px; }
}
@media (max-width: 520px) { .stop-biz img { width: 64px; } }

/* ── Story scenes (scroll-driven pan + staged captions) ──────────────
   Each .scene is a tall block; a full-viewport sticky .scene-frame pins
   while story.html's scroll handler pans the panorama left→right,
   STARTING with the image's left border on the screen's left edge
   (pan progress runs over the PINNED window only, not the approach).
   Each scene carries three captions (left/center/right third of the
   art) that crossfade in sync with which third is on screen.
   Desktop/landscape: art fills the viewport, caption overlaid low.
   Portrait phones: art is the top 52% (full-height 3:1 art would show
   a half-panel slit), captions live in the dark area beneath it. */
.scene { position: relative; height: 240vh; }
.scene-frame {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: #000;
}
.scene-frame img {
  position: absolute; top: 0; left: 0; height: 100%; width: auto;
  max-width: none; will-change: transform;
}
.scene-frame::after {          /* readability scrim over the art */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,18,.35) 0%, rgba(11,13,18,0) 25%,
              rgba(11,13,18,0) 50%, rgba(11,13,18,.78) 100%);
  pointer-events: none;
}
.scene-captions { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.scene-captions .cap {
  position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%);
  width: min(92vw, 980px);
  font-family: 'Dinofans', 'Gradia', var(--sans);
  font-size: 31.5px;           /* 52.5px shrunk 40% (owner spec) */
  line-height: 1.32; font-weight: normal; color: #f6f7fa;
  text-shadow: 0 2px 10px rgba(0,0,0,.9), 0 0 40px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .15s linear;
}
.scene-captions .cap b { color: var(--accent); }

@media (orientation: portrait) and (max-width: 700px) {
  /* Pin BELOW the sticky nav (measured into --nav-h by site.js) so the
     art's top edge is never hidden behind the menu bar. */
  .scene-frame {
    top: var(--nav-h, 58px);
    height: calc(100vh - var(--nav-h, 58px));
  }
  .scene-frame img { height: 52%; }          /* art band on top */
  .scene-frame::after {
    background: linear-gradient(180deg, rgba(11,13,18,0) 40%, rgba(11,13,18,.55) 52%,
                var(--bg) 53%, var(--bg) 100%);
  }
  .scene-captions .cap {
    bottom: auto; top: 60%; width: 92vw;     /* lower text (owner request) */
    font-size: clamp(18px, 5vw, 31.5px);     /* shrunk 40% with the desktop size */
    line-height: 1.4; text-shadow: none; color: var(--text);
  }
}

/* Reduced motion: art centered, all three captions readable in sequence. */
.scene.reduced .scene-captions { position: static; padding: 20px; }
.scene.reduced .scene-captions .cap { position: static; transform: none; opacity: 1; margin: 14px auto; }
.scene.reduced { height: auto; }
.scene.reduced .scene-frame { position: static; height: 60vh; }

/* ── Sprite galleries (Genres strip + Press gallery) ─────────────── */
/* Images render at 1/6th their natural pixel size (set by sizeSprites JS). */
.sprite-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 10px 0 18px;
}
@media (max-width: 700px) { .sprite-grid { grid-template-columns: repeat(3, 1fr); } }

/* Genres strip: one COLUMN per category (Food / Caffeine / Hydration / Meds),
   items stacked vertically inside their column. */
.sprite-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 14px; align-items: start;
}
.sprite-col { display: flex; flex-direction: column; gap: 10px; }
.sprite-col .sprite-group-label { margin: 0 0 2px; }
/* Phones: category columns would be a 1-wide jumble — instead each category
   becomes its own SECTION, label on top, items in a 3-across row. */
@media (max-width: 700px) {
  .sprite-cols { grid-template-columns: 1fr; }
  .sprite-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .sprite-col .sprite-group-label { grid-column: 1 / -1; margin-top: 8px; }
}
.sprite-group-label {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  font-size: 24px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text);
}
.sprite-group-label .swatch {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
}
.sprite-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 8px 8px; text-align: center; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.sprite-card img { max-width: 100%; object-fit: contain; }
/* NOTE: gallery sprite widths are NOT settable from here.  A script at the
   bottom of press.html writes img.style.width on every .sprite-card img
   (natural size ÷ 6, so the art shares one world scale), which beats any rule
   in this file.  Per-sprite size tweaks go in that script's SPRITE_SCALE map. */
.sprite-card figcaption {
  font-size: 11.5px; color: var(--text-dim); margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* ── Businesses page ─────────────────────────────────────────────── */
.biz {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); margin-bottom: 14px; overflow: hidden;
}
.biz-head {
  display: flex; align-items: center; gap: 18px; padding: 14px 18px;
  cursor: pointer;
}
.biz-head:hover { background: var(--bg-3); }
.biz-head img {
  width: 96px; height: auto; border-radius: 8px; flex: none;
  background: var(--bg); border: 1px solid var(--line); padding: 6px;
}
.biz-head h3 { margin: 0; }
.biz-caret { margin-left: auto; color: var(--text-dim); transition: transform .15s; }
.biz.open .biz-caret { transform: rotate(180deg); }
.biz-menu { display: none; border-top: 1px solid var(--line); padding: 6px 18px 14px; }
.biz.open .biz-menu { display: block; }
.biz-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline;
  column-gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.biz-item:last-child { border-bottom: 0; }
.bi-name { font-weight: 700; font-size: 14.5px; }
.bi-dots { border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.bi-price { font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 14px; }
.bi-price.free { color: #4ade80; }
.bi-desc { grid-column: 1 / -1; margin-top: 2px; }

/* ── Leaderboard ─────────────────────────────────────────────────── */
.lb-tabs { display: flex; gap: 8px; margin: 22px 0; }
.lb-tab {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text-dim);
  font-weight: 800; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.lb-tab.active { background: var(--accent); border-color: var(--accent); color: #14100a; }
table.lb { width: 100%; border-collapse: collapse; }
table.lb th {
  text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-dim); padding: 10px 14px; border-bottom: 1px solid var(--line);
}
table.lb td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
table.lb tr:nth-child(1) td .rank { color: #f2c94c; }
table.lb tr:nth-child(2) td .rank { color: #c0c8d4; }
table.lb tr:nth-child(3) td .rank { color: #cd8a4f; }
table.lb .rank { font-family: var(--mono); font-weight: 800; }
table.lb .plate {
  font-family: var(--mono); font-weight: 800; letter-spacing: 1px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px;
}
table.lb .num { font-family: var(--mono); }
.lb-note { margin-top: 14px; }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); margin-bottom: 12px; }
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 16px 18px; list-style: none; position: relative;
}
.faq-item summary::after { content: "+"; position: absolute; right: 18px; color: var(--accent); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .a { padding: 0 18px 16px; color: var(--text-dim); font-size: 15px; }

/* ── Press ───────────────────────────────────────────────────────── */
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--text-dim); width: 220px; }

/* ── Demo ────────────────────────────────────────────────────────── */
.demo-frame-wrap {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #000; aspect-ratio: 16 / 9;
}
.demo-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
}
