/* ==========================================================================
   ARCADE TSUNAMI — COMPONENTS
   Each block below becomes a PHP partial. Names match the intended
   partials/*.php filenames.
   ========================================================================== */

/* ==========================================================================
   partials/header.php — MARQUEE HEADER
   A cabinet's backlit header panel. The glow is a gradient, not animated
   bulbs: bulb chase animation on every page load is the fastest way to make
   a site feel cheap.
   ========================================================================== */

/* DEV CHROME — deliberately outside the design system. Delete with its
   counterpart line in app.js once real data is wired up. */
.mockup-banner {
  background: repeating-linear-gradient(45deg, #2A1A00 0 10px, #1E1300 10px 20px);
  border-bottom: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--s-2) var(--s-4);
}

.disclosure-strip {
  background: var(--bg-inset);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-dim);
  text-align: center;
  padding: var(--s-2) var(--s-4);
}
.disclosure-strip strong { color: var(--amber); font-weight: 600; }

.marquee {
  position: sticky; top: 0; z-index: var(--z-header);
  background:
    linear-gradient(180deg, rgba(240,23,154,0.10) 0%, transparent 55%),
    var(--bg-cabinet);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.marquee-inner {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: 72px;
  padding-block: var(--s-3);
}

/* --- Wordmark ------------------------------------------------------------- */
.brand {
  display: flex; align-items: center; gap: var(--s-3);
  text-decoration: none; flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand-text .t2 {
  display: block;
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(240,23,154,0.55);
}

/* --- Nav ------------------------------------------------------------------ */
.nav { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.nav a {
  display: flex; align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-3);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  border-radius: var(--r-sm);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav a[aria-current="page"] { color: var(--cyan); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 6px;
  height: 2px; background: var(--cyan); box-shadow: var(--glow-cyan);
}

/* --- Search --------------------------------------------------------------- */
.search {
  position: relative; flex: 1 1 260px; max-width: 380px;
}
.search input {
  width: 100%; min-height: var(--tap);
  padding: 0 var(--s-4) 0 42px;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  outline: none;
}
.search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-faint); pointer-events: none;
}

.nav-toggle { display: none; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap);
  padding: 0 var(--s-5);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, var(--magenta), var(--magenta-deep));
  color: #fff;
  box-shadow: var(--glow-magenta);
}
.btn-primary:hover { color: #fff; box-shadow: 0 0 22px rgba(240,23,154,0.6); }

.btn-buy {
  background: linear-gradient(180deg, var(--amber), #D98B08);
  color: #1A1000;
  box-shadow: var(--glow-amber);
  width: 100%;
  font-size: var(--fs-base);
}
.btn-buy:hover { color: #1A1000; box-shadow: 0 0 24px rgba(255,176,32,0.55); }

.btn-secondary {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-secondary:hover { background: rgba(34,211,238,0.10); color: #67E8F9; }

.btn-ghost {
  background: var(--bg-raised);
  border-color: var(--line-bright);
  color: var(--ink-dim);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); }

.btn-sm { min-height: 34px; padding: 0 var(--s-3); font-size: var(--fs-xs); }
.btn-block { width: 100%; }

/* --- INSERT COIN ---------------------------------------------------------
   RESTRAINT RULE: exactly twice site-wide — the home hero CTA and the signup
   card. A blinking element is an attention claim; spend it twice or it stops
   meaning anything.                                                         */
.btn-coin {
  background: var(--bg-inset);
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  padding: var(--s-4) var(--s-6);
  min-height: 56px;
  box-shadow: inset 0 0 20px rgba(255,176,32,0.10), var(--glow-amber);
}
.btn-coin:hover { background: rgba(255,176,32,0.12); color: #FFC94D; }
@keyframes coin-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.32; } }
.btn-coin .blink { animation: coin-blink 1.15s steps(1, end) infinite; }
@media (prefers-reduced-motion: reduce) { .btn-coin .blink { animation: none; opacity: 1; } }

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.panel {
  background: var(--bg-cabinet);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.panel--raised { background: var(--bg-raised); }
.panel--inset  { background: var(--bg-inset); }

.panel-title {
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}

/* --- partials/product-card.php ------------------------------------------- */
.product-card {
  display: flex; flex-direction: column;
  background: var(--bg-cabinet);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-mid) var(--ease),
              transform var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.product-card:hover {
  text-decoration: none;
  border-color: var(--cyan-deep);
  transform: translateY(-3px);
  box-shadow: var(--glow-lift), 0 0 0 1px rgba(34,211,238,0.18);
}
.product-card:hover .product-card-title { color: var(--cyan); }

.product-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-inset);
  overflow: hidden;
}
.product-card-media img,
.product-card-media .ph { width: 100%; height: 100%; object-fit: cover; }

.product-card-body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.product-card-brand {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}
.product-card-title {
  font-family: var(--font-head); font-weight: 600;
  font-size: var(--fs-base); line-height: 1.35; margin: 0;
  transition: color var(--t-fast) var(--ease);
}
.product-card-foot {
  margin-top: auto; padding-top: var(--s-3);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  border-top: 1px solid var(--line);
}
.price {
  font-family: var(--font-mono); font-weight: 600;
  font-size: var(--fs-md); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price-strike { font-size: var(--fs-sm); color: var(--ink-faint); text-decoration: line-through; margin-left: var(--s-2); }

/* Corner flag for editorial picks */
.card-flag {
  position: absolute; top: 0; left: 0; z-index: 3;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: var(--s-1) var(--s-3);
  background: var(--magenta); color: #fff;
  border-bottom-right-radius: var(--r-md);
}
.card-flag--amber { background: var(--amber); color: #1A1000; }
.card-flag--cyan  { background: var(--cyan);  color: #04121A; }

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-bright);
  color: var(--ink-dim);
  background: var(--bg-inset);
  white-space: nowrap;
}
.pill--stock  { color: var(--green);   border-color: rgba(61,220,132,0.4);  background: rgba(61,220,132,0.08); }
.pill--out    { color: var(--red);     border-color: rgba(255,71,87,0.4);   background: rgba(255,71,87,0.08); }
.pill--cyan   { color: var(--cyan);    border-color: rgba(34,211,238,0.4);  background: rgba(34,211,238,0.08); }
.pill--magenta{ color: var(--magenta); border-color: rgba(240,23,154,0.4);  background: rgba(240,23,154,0.08); }
.pill--amber  { color: var(--amber);   border-color: rgba(255,176,32,0.4);  background: rgba(255,176,32,0.08); }
.pill--violet { color: var(--violet);  border-color: rgba(168,85,247,0.4);  background: rgba(168,85,247,0.08); }
.pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ==========================================================================
   RATINGS
   ========================================================================== */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--amber); }
.stars svg { width: 15px; height: 15px; }
.stars span { display: block; flex: none; line-height: 0; }
.stars .star-off { color: var(--line-bright); }

.rating-row { display: flex; align-items: center; gap: var(--s-2); }
.rating-num {
  font-family: var(--font-mono); font-weight: 600;
  font-size: var(--fs-sm); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rating-count { font-size: var(--fs-sm); color: var(--ink-faint); }

/* --- Star distribution histogram ------------------------------------------ */
.histogram { display: grid; gap: var(--s-2); }
.histogram-row {
  display: grid; grid-template-columns: 46px 1fr 54px;
  align-items: center; gap: var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-sm);
  color: var(--ink-dim);
}
.histogram-bar {
  height: 10px; background: var(--bg-inset);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  overflow: hidden;
}
.histogram-fill {
  /* Must be block: these are <span>s, and width/height percentages are
     ignored on inline boxes, which left every bar rendering empty. */
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #FFD073);
  box-shadow: 0 0 10px rgba(255,176,32,0.35);
  border-radius: var(--r-pill);
}
.histogram-row .pct { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Attribute scorecard --------------------------------------------------
   The "reviewer consensus" panel. Derived from the review corpus, never a
   republication of it.                                                      */
.scorecard { display: grid; gap: var(--s-4); }
.score-item { display: grid; gap: var(--s-2); }
.score-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  font-size: var(--fs-sm);
}
.score-label { font-weight: 600; color: var(--ink); }
.score-value { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-mentions { color: var(--ink-faint); font-size: var(--fs-xs); font-family: var(--font-mono); }
.score-bar { height: 8px; background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.score-fill { height: 100%; border-radius: var(--r-pill); }
.score-fill--good { background: linear-gradient(90deg, var(--green), #7DE9AE); box-shadow: 0 0 10px rgba(61,220,132,0.3); }
.score-fill--mid  { background: linear-gradient(90deg, var(--amber), #FFD073); box-shadow: 0 0 10px rgba(255,176,32,0.3); }
.score-fill--poor { background: linear-gradient(90deg, var(--red), #FF8A94);  box-shadow: 0 0 10px rgba(255,71,87,0.3); }

/* --- Pro / con themes with mention counts --------------------------------- */
.themes { display: grid; gap: var(--s-3); }
.theme {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-bright);
  border-radius: var(--r-sm);
  font-size: var(--fs-base);
  line-height: 1.5;
}
.theme--pro { border-left-color: var(--green); }
.theme--con { border-left-color: var(--red); }
.theme-icon { flex: none; width: 20px; height: 20px; margin-top: 3px; }
.theme--pro .theme-icon { color: var(--green); }
.theme--con .theme-icon { color: var(--red); }
.theme-count {
  flex: none; margin-left: auto; align-self: center;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--ink-faint); white-space: nowrap;
}

/* --- Attributed review excerpt -------------------------------------------
   COMPLIANCE: <= 200 chars, always attributed, always linked to the source.
   Never a full review.                                                      */
.quote {
  padding: var(--s-4);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  line-height: 1.55;
}
.quote p { font-style: italic; color: var(--ink-dim); margin-bottom: var(--s-3); }
.quote-meta {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--ink-faint);
  font-family: var(--font-mono);
}

/* ==========================================================================
   SPEC SHEET
   The screen this audience actually reads. Mono, tabular, scannable.
   ========================================================================== */
.spec-group + .spec-group { margin-top: var(--s-5); }
.spec-group-title {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--magenta); margin: 0 0 var(--s-3);
}
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table th,
.spec-table td { padding: var(--s-3) var(--s-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table th {
  width: 38%; font-weight: 500; color: var(--ink-dim);
  font-family: var(--font-body);
}
.spec-table td { font-family: var(--font-mono); color: var(--ink); }
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table tr:hover td,
.spec-table tr:hover th { background: rgba(255,255,255,0.02); }

/* Moddability meter — a 5-segment LED readout */
.led-meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.led-meter i {
  width: 16px; height: 8px; border-radius: 1px;
  background: var(--bg-inset); border: 1px solid var(--line-bright);
}
.led-meter i.on { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(61,220,132,0.6); }

/* ==========================================================================
   "WHAT OWNERS MOD FIRST"
   Converts a recurring review complaint into the part owners actually buy.
   ========================================================================== */
.mod-list { display: grid; gap: var(--s-4); counter-reset: mod; }
.mod {
  display: grid;
  grid-template-columns: 48px 96px 1fr auto;
  gap: var(--s-4); align-items: center;
  padding: var(--s-4);
  background: var(--bg-cabinet);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease);
}
.mod:hover { border-color: var(--magenta-deep); }
.mod-rank {
  counter-increment: mod;
  font-family: var(--font-display); font-size: 1rem;
  color: var(--magenta); text-align: center;
}
.mod-rank::before { content: counter(mod); }
.mod-media {
  aspect-ratio: 1; background: var(--bg-inset);
  border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
}
.mod-media img, .mod-media .ph { width: 100%; height: 100%; object-fit: cover; }
.mod-body { min-width: 0; }
.mod-because {
  font-size: var(--fs-sm); color: var(--ink-dim);
  margin: var(--s-1) 0 0; display: flex; align-items: center; gap: var(--s-2);
}
.mod-because .cite { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--red); }
.mod-title { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-base); margin: 0; }
.mod-cta { text-align: right; }

/* ==========================================================================
   GAMES — first-class entities, the core bet of this design
   ========================================================================== */
.game-card {
  display: flex; flex-direction: column;
  background: var(--bg-cabinet);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.game-card:hover { text-decoration: none; border-color: var(--violet); transform: translateY(-2px); }
.game-card:hover .game-card-title { color: var(--violet); }
.game-card-media {
  aspect-ratio: 3 / 4; background: var(--bg-inset);
  display: grid; place-items: center; overflow: hidden;
}
.game-card-media img, .game-card-media .ph { width: 100%; height: 100%; object-fit: cover; }
.game-card-body { padding: var(--s-3); display: grid; gap: var(--s-1); }
.game-card-title { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm); margin: 0; line-height: 1.3; transition: color var(--t-fast) var(--ease); }
.game-card-meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-faint); }

/* Control-compatibility flag. The credibility feature: this cabinet includes
   the game, but the panel can't play it properly. */
.compat {
  display: flex; align-items: flex-start; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs); line-height: 1.4;
  background: rgba(255,176,32,0.09);
  border-top: 1px solid rgba(255,176,32,0.3);
  color: var(--amber);
  font-family: var(--font-mono);
}
.compat svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.compat--bad { background: rgba(255,71,87,0.09); border-top-color: rgba(255,71,87,0.3); color: var(--red); }
.compat--ok  { background: rgba(61,220,132,0.07); border-top-color: rgba(61,220,132,0.25); color: var(--green); }

/* ==========================================================================
   HIGH-SCORE TABLE — contests & Hall of Fame
   The one place the pixel face earns its keep.
   ========================================================================== */
.hiscore { width: 100%; border-collapse: collapse; font-family: var(--font-mono); }
.hiscore thead th {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--line-bright);
}
.hiscore td { padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.hiscore tbody tr { transition: background var(--t-fast) var(--ease); }
.hiscore tbody tr:hover { background: rgba(255,255,255,0.03); }

.hiscore .rank {
  font-family: var(--font-display); font-size: 0.8125rem;
  color: var(--ink-faint); width: 68px; white-space: nowrap;
}
.hiscore .initials {
  font-family: var(--font-display); font-size: 0.875rem;
  letter-spacing: 0.14em; color: var(--cyan); width: 92px;
}
.hiscore .score {
  text-align: right; font-weight: 600; font-size: var(--fs-md);
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.hiscore .player { color: var(--ink); }
.hiscore .player a { font-family: var(--font-body); }

/* Rank 1 gets the amber treatment — the only row that glows. */
.hiscore tr.rank-1 { background: rgba(255,176,32,0.07); }
.hiscore tr.rank-1 .rank,
.hiscore tr.rank-1 .initials,
.hiscore tr.rank-1 .score { color: var(--amber); text-shadow: 0 0 12px rgba(255,176,32,0.4); }
.hiscore tr.rank-2 .rank, .hiscore tr.rank-2 .initials { color: #C9CDD6; }
.hiscore tr.rank-3 .rank, .hiscore tr.rank-3 .initials { color: #D08B5B; }

/* ==========================================================================
   TOKENS & RANKS — reputation
   ========================================================================== */
.token-count {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-sm);
  color: var(--amber);
}
.token-count svg { width: 16px; height: 16px; }

.rank-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--r-sm);
}
.rank-novice   { background: rgba(160,160,180,0.12); color: var(--ink-dim);  border: 1px solid var(--line-bright); }
.rank-masher   { background: rgba(34,211,238,0.12);  color: var(--cyan);     border: 1px solid rgba(34,211,238,0.35); }
.rank-scorer   { background: rgba(168,85,247,0.12);  color: var(--violet);   border: 1px solid rgba(168,85,247,0.35); }
.rank-legend   { background: rgba(255,176,32,0.12);  color: var(--amber);    border: 1px solid rgba(255,176,32,0.45); box-shadow: var(--glow-amber); }

/* ==========================================================================
   COMMENTS — threaded, one level deep
   ========================================================================== */
.comment { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.avatar {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--bg-raised); border: 1px solid var(--line-bright);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 0.625rem; color: var(--cyan);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.comment-author { font-family: var(--font-head); font-weight: 700; color: var(--ink); text-decoration: none; }
.comment-time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-faint); }
.comment-body { font-size: var(--fs-base); line-height: 1.6; }
.comment-body p { max-width: none; }
.comment-actions { display: flex; gap: var(--s-4); margin-top: var(--s-3); }
.comment-action {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: none; border: 0; padding: var(--s-1) 0; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint);
  transition: color var(--t-fast) var(--ease);
}
.comment-action:hover { color: var(--cyan); }
.comment-action svg { width: 14px; height: 14px; }
.comment-replies { margin-left: calc(44px + var(--s-4)); border-left: 2px solid var(--line); padding-left: var(--s-4); }

/* ==========================================================================
   SOCIAL WALL
   Server builds the embed from an allowlisted URL. Nothing user-supplied is
   ever rendered as HTML.
   ========================================================================== */
.social-grid { columns: 3 300px; column-gap: var(--s-5); }
.social-tile {
  break-inside: avoid; margin-bottom: var(--s-5);
  background: var(--bg-cabinet); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.social-tile:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.social-media { background: var(--bg-inset); position: relative; }
.social-media img, .social-media .ph { width: 100%; display: block; }
.social-net {
  position: absolute; top: var(--s-3); right: var(--s-3); z-index: 3;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(10,10,15,0.82); border: 1px solid var(--line-bright);
  backdrop-filter: blur(6px);
}
.social-net svg { width: 15px; height: 15px; }
.net-ig { color: #E1306C; } .net-fb { color: #4267B2; } .net-tt { color: #25F4EE; }
.social-body { padding: var(--s-4); display: grid; gap: var(--s-3); }
.social-caption { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-dim); }
.social-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.social-user { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); }
.social-user .avatar { width: 28px; height: 28px; font-size: 0.5rem; }

/* ==========================================================================
   FILTER RAIL — category listing
   ========================================================================== */
.filter-rail { display: grid; gap: var(--s-5); align-content: start; }
.filter-group { border-bottom: 1px solid var(--line); padding-bottom: var(--s-4); }
.filter-group:last-child { border-bottom: 0; }
.filter-title {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  margin: 0 0 var(--s-3);
}
.filter-opt {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 36px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink-dim);
  transition: color var(--t-fast) var(--ease);
}
.filter-opt:hover { color: var(--ink); }
.filter-opt input { accent-color: var(--cyan); width: 17px; height: 17px; flex: none; cursor: pointer; }
.filter-opt .n { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-faint); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 34px; padding: 0 var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--bg-raised); border: 1px solid var(--line-bright);
  border-radius: var(--r-sm); color: var(--ink-dim);
  cursor: pointer; text-decoration: none;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); text-decoration: none; }
.chip[aria-pressed="true"], .chip.is-active {
  background: rgba(34,211,238,0.12); border-color: var(--cyan); color: var(--cyan);
}
.chip .x { font-size: 14px; line-height: 1; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.field { display: grid; gap: var(--s-2); }
.field label { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.field .hint { font-size: var(--fs-sm); color: var(--ink-faint); }
.input, .textarea, .select {
  width: 100%; min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-inset); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-base);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); padding-block: var(--s-4);
}
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb .sep { color: var(--line-bright); }
.breadcrumb [aria-current] { color: var(--ink-dim); }

/* ==========================================================================
   EMPTY STATE — "GAME OVER — CONTINUE?"
   ========================================================================== */
.empty-state {
  text-align: center; padding: var(--s-9) var(--s-5);
  border: 1px dashed var(--line-bright); border-radius: var(--r-lg);
  background: var(--bg-inset);
}
.empty-state-title {
  font-family: var(--font-display); font-size: 1.125rem;
  color: var(--red); margin: 0 0 var(--s-4);
  text-shadow: 0 0 16px rgba(255,71,87,0.5);
}
.empty-state p { margin-inline: auto; color: var(--ink-dim); }
.countdown { font-family: var(--font-display); color: var(--amber); }

/* ==========================================================================
   partials/footer.php
   ========================================================================== */
.site-footer { margin-top: var(--s-9); background: var(--bg-cabinet); border-top: 1px solid var(--line); }
.footer-grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: 1.6fr repeat(3, 1fr);
  padding-block: var(--s-7);
}
.footer-col h4 {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  margin: 0 0 var(--s-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-col a { color: var(--ink-dim); text-decoration: none; font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--cyan); }
.footer-legal {
  border-top: 1px solid var(--line);
  padding-block: var(--s-5);
  font-size: var(--fs-sm); color: var(--ink-faint);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
}
.footer-legal p { max-width: 62ch; margin: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .social-grid { columns: 2 280px; }
}

@media (max-width: 900px) {
  .marquee-inner { flex-wrap: wrap; min-height: 0; gap: var(--s-3); }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav {
    order: 4; flex-basis: 100%; margin-left: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: var(--s-1);
  }
  .nav a { flex: none; }
  .nav a[aria-current="page"]::after { bottom: 2px; }
  .mod { grid-template-columns: 36px 72px 1fr; }
  .mod-cta { grid-column: 2 / -1; text-align: left; }
}

@media (max-width: 640px) {
  :root { --s-8: 3rem; --s-9: 4rem; }
  .social-grid { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .comment-replies { margin-left: var(--s-4); }
  .spec-table th { width: 45%; }
  .hiscore .initials { width: auto; }
  .btn-coin { font-size: 0.5625rem; padding: var(--s-4) var(--s-4); }
}

/* ==========================================================================
   PRINT — someone will print a spec sheet before buying a $600 cabinet
   ========================================================================== */
@media print {
  body { background: #fff; color: #000; }
  .marquee, .site-footer, .disclosure-strip, .btn, .comment-actions { display: none !important; }
  .panel, .bezel { border: 1px solid #999; box-shadow: none; }
  .scanlines::after, .bezel::before { display: none; }
}
