/*
 * AI Arcade styles.
 *
 * The palette, fonts, buttons and "toy" ink borders come from modern-portfolio
 * (cream / navy / gold, Archivo + Work Sans). On top sit the arcade pieces
 * (cabinets, coins, the pixel-font HUD) and the portal: a dark top bar, the
 * featured spotlight, a votable feed, sidebars, and the game-page sections.
 *
 * Sections: tokens · base · utilities · buttons & pills · top bar · notices ·
 * HUD, coins & cabinets · spotlight · feed · sidebar · shared blocks · FAQ ·
 * text pages · game page · leaderboards · submit · dialogs · 404 · footer ·
 * ads · motion · responsive.
 */

/* ---- Tokens --------------------------------------------------------------- */

:root {
  color-scheme: light;
  --color-bg: #fbfaf7;
  --color-bg-alt: #f3efe3;
  --color-surface: #ffffff;
  --color-surface-2: #fdfcf8;
  --color-text: #191333;
  --color-text-body: #413c56;
  --color-text-muted: #6b6580;
  --color-accent: #c99a3d;
  --color-accent-strong: #96701f;
  --color-accent-soft: #e6cfa0;
  --color-border: #ece7db;
  --color-border-strong: #ddd5c3;
  --color-track: #efe9dc;
  /* --color-ink is the strongest foreground: heading text, and the fill of
     "inverted" chips and tabs (with --color-bg text). It flips in dark mode.
     --toy-ink is the cartoon outline and the text on lit colors (gold buttons,
     medals, cabinets); it stays dark in both themes. */
  --color-ink: #191333;
  --color-ink-deep: #0d0a1f;
  --toy-ink: #191333;
  --lip-color: #191333;
  --color-line: #191333;
  --color-led: #191333;
  --color-night: #140f2b;
  --color-night-2: #1f1745;
  --color-stage: #120d26;
  --on-night: #f4f0ff;
  --on-night-muted: rgba(244, 240, 255, 0.72);
  --lit-red: #ff5a4f;
  --lit-gold: #ffd45c;
  --lit-blue: #4fc3f7;
  --lit-pink: #ff7eb3;
  --up: #ec5a24;
  --up-soft: #fff0e7;
  --down: #5566da;
  --down-soft: #eef0ff;
  --success: #2f9e5b;
  --success-soft: #e3f6ea;
  --success-faint: #f5fcf7;
  --success-line: #9bd8b3;
  --success-text: #1c7442;
  --violet-soft: #efeafc;
  --violet-text: #5b46c9;
  --gold-soft: #fff7e0;
  --gold-faint: #fffaf0;
  --gold-line: #f0dc9c;
  --gold-text: #5c4712;
  --danger: #c2362c;
  --danger-soft: #fff6f5;
  --danger-text: #8c2019;
  /* Genre badges mix the game's accent into the surface and the text. */
  --tint-strength: 12%;
  --badge-accent: 70%;
  --badge-ink: #191333;
  /* The theme toggle shows a moon in light mode and a sun in dark mode. */
  --theme-moon: flex;
  --theme-sun: none;
  --max-width: 1200px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lip: 0 4px 0 var(--lip-color);
  --shadow-soft: 0 1px 2px rgba(25, 19, 51, 0.04), 0 8px 24px -14px rgba(25, 19, 51, 0.2);
  --shadow-lift: 0 2px 4px rgba(25, 19, 51, 0.05), 0 22px 40px -18px rgba(25, 19, 51, 0.3);
  --font-body: 'Work Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Archivo', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-pixel: 'Press Start 2P', ui-monospace, Menlo, Consolas, monospace;
  --header-h: 64px;
}

/* Dark theme. The same values sit under two selectors: the toggle's explicit
   choice (data-theme="dark" on <html>, set before first paint by the inline
   script in layout.mjs), and the system setting when the visitor hasn't
   chosen. Keep the two lists identical. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #0f0b21;
  --color-bg-alt: #1b1537;
  --color-surface: #18132f;
  --color-surface-2: #1e1839;
  --color-text: #f2eeff;
  --color-text-body: #cfc8e8;
  --color-text-muted: #a098bf;
  --color-accent: #e3b857;
  --color-accent-strong: #f2cb70;
  --color-accent-soft: #5a4618;
  --color-border: #2c2551;
  --color-border-strong: #3d3569;
  --color-track: #2c2551;
  --color-ink: #f2eeff;
  --lip-color: #05030d;
  --color-line: #4b427c;
  --color-led: #2b2259;
  --up: #ff7b47;
  --up-soft: rgba(255, 123, 71, 0.16);
  --down: #8e9bff;
  --down-soft: rgba(142, 155, 255, 0.18);
  --success-soft: rgba(63, 191, 114, 0.16);
  --success-faint: rgba(63, 191, 114, 0.07);
  --success-line: rgba(63, 191, 114, 0.45);
  --success-text: #82dca7;
  --violet-soft: rgba(146, 125, 255, 0.2);
  --violet-text: #bdb0ff;
  --gold-soft: rgba(255, 212, 92, 0.1);
  --gold-faint: rgba(255, 212, 92, 0.05);
  --gold-line: rgba(255, 212, 92, 0.3);
  --gold-text: #f3d890;
  --danger: #ff8a80;
  --danger-soft: rgba(255, 90, 79, 0.12);
  --danger-text: #ffb4ab;
  --tint-strength: 22%;
  --badge-accent: 50%;
  --badge-ink: #ffffff;
  --theme-moon: none;
  --theme-sun: flex;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -14px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 22px 40px -18px rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --color-bg: #0f0b21;
    --color-bg-alt: #1b1537;
    --color-surface: #18132f;
    --color-surface-2: #1e1839;
    --color-text: #f2eeff;
    --color-text-body: #cfc8e8;
    --color-text-muted: #a098bf;
    --color-accent: #e3b857;
    --color-accent-strong: #f2cb70;
    --color-accent-soft: #5a4618;
    --color-border: #2c2551;
    --color-border-strong: #3d3569;
    --color-track: #2c2551;
    --color-ink: #f2eeff;
    --lip-color: #05030d;
    --color-line: #4b427c;
    --color-led: #2b2259;
    --up: #ff7b47;
    --up-soft: rgba(255, 123, 71, 0.16);
    --down: #8e9bff;
    --down-soft: rgba(142, 155, 255, 0.18);
    --success-soft: rgba(63, 191, 114, 0.16);
    --success-faint: rgba(63, 191, 114, 0.07);
    --success-line: rgba(63, 191, 114, 0.45);
    --success-text: #82dca7;
    --violet-soft: rgba(146, 125, 255, 0.2);
    --violet-text: #bdb0ff;
    --gold-soft: rgba(255, 212, 92, 0.1);
    --gold-faint: rgba(255, 212, 92, 0.05);
    --gold-line: rgba(255, 212, 92, 0.3);
    --gold-text: #f3d890;
    --danger: #ff8a80;
    --danger-soft: rgba(255, 90, 79, 0.12);
    --danger-text: #ffb4ab;
    --tint-strength: 22%;
    --badge-accent: 50%;
    --badge-ink: #ffffff;
    --theme-moon: none;
    --theme-sun: flex;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -14px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 22px 40px -18px rgba(0, 0, 0, 0.85);
  }
}

/* ---- Base ------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-ink);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 3px;
}

a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

.icon {
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

/* ---- Utilities ------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--lit-gold);
  color: var(--toy-ink);
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--toy-ink);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--font-pixel);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

.section__eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}

.section__heading {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section__heading--center {
  text-align: center;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-title--sm {
  font-size: 1.1rem;
}

.section-title__count {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Shown only in preview mode, on anything filled with sample data. */
.sample-tag {
  display: none;
  padding: 4px 6px 3px;
  border-radius: 5px;
  background: var(--lit-red);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.is-preview .sample-tag {
  display: inline-block;
}

/* ---- Buttons, chips, pills ------------------------------------------------- */

/* Ink-bordered pills with a solid "lip", pressed on click. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 2px solid var(--toy-ink);
  border-radius: 999px;
  box-shadow: var(--lip);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    background-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--lip-color);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--lip-color);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--sm {
  padding: 8px 15px;
  font-size: 14px;
  box-shadow: 0 3px 0 var(--lip-color);
}

.btn--sm:hover {
  box-shadow: 0 4px 0 var(--lip-color);
}

.btn--primary {
  background: var(--color-ink);
  color: var(--color-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 0 var(--color-ink-deep),
    0 14px 26px -12px rgba(25, 19, 51, 0.6);
}

.btn--primary:hover {
  color: var(--color-bg);
}

.btn--ghost {
  background: var(--color-surface);
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn--ghost:hover {
  background: var(--color-surface-2);
  color: var(--color-ink);
}

.btn--ghost[aria-pressed='true'] {
  background: var(--gold-soft);
}

.btn--ghost[aria-pressed='true'] svg path {
  fill: currentColor;
}

.btn--gold {
  background: var(--lit-gold);
  color: var(--toy-ink);
}

.btn--gold:hover {
  background: #ffdc78;
  color: var(--toy-ink);
}

/* For dark backgrounds: the lip becomes a translucent edge. */
.btn--dark {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-night);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.btn--dark:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn .coin {
  margin: -4px 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-strong);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill--gold {
  background: var(--lit-gold);
  color: var(--toy-ink);
}

.pill--new {
  background: var(--success-soft);
  color: var(--success-text);
}

.pill--ai {
  background: var(--violet-soft);
  color: var(--violet-text);
}

/* Genre badge, tinted per game. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--color-text-muted)) var(--tint-strength), var(--color-surface));
  color: color-mix(in srgb, var(--accent, var(--color-text)) var(--badge-accent), var(--badge-ink));
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, var(--color-ink));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.chip[aria-pressed='true'] {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-bg);
}

.chip[aria-pressed='true'] svg path {
  fill: currentColor;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid rgba(255, 253, 246, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--on-night);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.chip-button:hover {
  border-color: rgba(255, 253, 246, 0.7);
  background: rgba(255, 253, 246, 0.1);
  color: var(--on-night);
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select select {
  appearance: none;
  padding: 9px 38px 9px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.select select:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
}

.select .icon {
  position: absolute;
  right: 12px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.select--block,
.select--block select {
  width: 100%;
}

/* ---- Top bar --------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
}

.topbar__main {
  position: relative;
  background: linear-gradient(180deg, #19123a, var(--color-night));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--on-night);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fffdf6;
}

.brand:hover {
  color: #fff;
}

.brand__mark {
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.topsearch {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  color: var(--on-night-muted);
}

.topsearch > .icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
}

.topsearch input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 15px;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.topsearch input::placeholder {
  color: rgba(244, 240, 255, 0.55);
}

.topsearch input:focus {
  outline: none;
  border-color: var(--lit-gold);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(255, 212, 92, 0.2);
}

.topsearch input::-webkit-search-cancel-button {
  filter: invert(1);
}

.topsearch__key {
  position: absolute;
  right: 10px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(244, 240, 255, 0.6);
  pointer-events: none;
}

.topsearch:focus-within .topsearch__key {
  display: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar__icon {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

/* The light/dark toggle shows on every screen size. */
.topbar__theme {
  display: grid;
}

.topbar__theme-moon,
.topbar__theme-sun {
  align-items: center;
  justify-content: center;
}

.topbar__theme-moon {
  display: var(--theme-moon);
}

.topbar__theme-sun {
  display: var(--theme-sun);
}

.topbar__menu-close,
.topbar.is-open .topbar__menu-open {
  display: none;
}

.topbar.is-open .topbar__menu-close,
.topbar__menu-open {
  display: flex;
}

.subnav {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.subnav__inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
}

.subnav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 12px;
  color: var(--color-text-body);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 -3px 0 transparent;
  transition:
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.subnav__link .icon {
  color: var(--color-text-muted);
}

.subnav__link:hover {
  color: var(--color-ink);
}

.subnav__link[aria-current='page'] {
  color: var(--color-ink);
  box-shadow: inset 0 -3px 0 var(--color-accent);
}

.subnav__link[aria-current='page'] .icon {
  color: var(--color-accent-strong);
}

.subnav__hud {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

.subnav__mobile-actions {
  display: none;
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0% 50%;
  background: linear-gradient(90deg, var(--color-accent-soft), var(--lit-gold), var(--lit-red));
}

/* ---- Notices --------------------------------------------------------------- */

.notice {
  font-size: 14px;
  line-height: 1.45;
}

.notice__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.notice--preview {
  background: var(--lit-red);
  color: #fff;
}

.notice--preview .notice__link {
  color: #fff;
}

.notice__tag {
  padding: 4px 7px 3px;
  border-radius: 5px;
  background: #fff;
  color: var(--lit-red);
  font-family: var(--font-pixel);
  font-size: 8.5px;
  text-transform: uppercase;
}

.notice--soft {
  background: var(--gold-soft);
  border-bottom: 1px solid var(--gold-line);
  color: var(--gold-text);
}

.notice--soft .icon {
  color: var(--color-accent-strong);
}

.notice__link {
  color: var(--color-accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice__close {
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.notice__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ---- HUD, coins and cabinets --------------------------------------------- */

.hud {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 0;
  padding: 11px 16px 10px;
  border: 2px solid var(--toy-ink);
  border-radius: 12px;
  background: var(--color-ink-deep);
  box-shadow: 0 4px 0 #05030d;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 10.5px;
  line-height: 1.4;
  text-transform: uppercase;
}

.hud__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.hud__label {
  color: var(--lit-red);
}

.hud__blink {
  color: var(--lit-gold);
  text-shadow: 0 0 8px rgba(255, 212, 92, 0.6);
}

.subnav__hud .hud__blink {
  color: inherit;
  text-shadow: none;
}

.coin {
  display: block;
}

/* Arcade cabinet: backlit marquee, CRT screen in a bezel, control deck and,
   on the big ones, a coin door. Sizes scale with the cabinet's own width. */
.cabinet {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 7% 7%;
  border: 2.5px solid var(--toy-ink);
  border-radius: 18px 18px 10px 10px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.2)),
    linear-gradient(rgba(255, 255, 255, 0.18), transparent 30%),
    var(--accent, #5b46c9);
}

.cabinet__marquee {
  margin: 0 -7.8% 6%;
  padding: 5.5cqi 5cqi 5cqi;
  border-bottom: 2.5px solid var(--toy-ink);
  border-radius: 15px 15px 0 0;
  background: radial-gradient(90% 120% at 50% 0%, color-mix(in srgb, var(--accent, #5b46c9) 55%, #191333), #120d26 75%);
  color: #fff6dc;
  font-family: var(--font-display);
  font-size: clamp(8.5px, 8cqi, 17px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 6px color-mix(in srgb, var(--accent, #5b46c9) 60%, #fff),
    0 0 14px var(--accent, #5b46c9),
    0 2px 0 #000;
}

.cabinet--long-title .cabinet__marquee {
  font-size: clamp(8px, 6.4cqi, 14px);
  letter-spacing: 0.02em;
}

.cabinet__marquee span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cabinet__bezel {
  padding: 5cqi;
  border: 2.5px solid var(--toy-ink);
  border-radius: 12px;
  background: #0d0a1f;
  box-shadow: inset 0 0 0 2px #2a2247;
}

.cabinet__screen {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 7px;
  background: var(--tint, var(--color-bg-alt));
}

.cabinet__screen .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

/* CRT glass: scanlines, a glare and darkened corners. */
.cabinet__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.13) 2px 3px),
    radial-gradient(120% 80% at 25% 0%, rgba(255, 255, 255, 0.2), transparent 45%),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.38));
}

.cabinet__deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 6% -12% 0;
  padding: 4.5cqi 11cqi;
  border: 2.5px solid var(--toy-ink);
  border-radius: 10px;
  background: linear-gradient(#2e2656, #191333);
  box-shadow: 0 3px 0 var(--toy-ink);
}

/* Joystick: a red ball on a short shaft. */
.cabinet__stick {
  position: relative;
  width: 11cqi;
  height: 11cqi;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9c95, var(--lit-red) 55%, #b3261e);
  box-shadow:
    0 0 0 2px var(--toy-ink),
    0 3px 0 1px rgba(0, 0, 0, 0.55);
}

.cabinet__buttons {
  display: flex;
  gap: 3.5cqi;
}

.cabinet__buttons i {
  width: 7.5cqi;
  height: 7.5cqi;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: var(--lit-gold);
  box-shadow:
    0 0 0 2px var(--toy-ink),
    0 2px 0 1px rgba(0, 0, 0, 0.55);
}

.cabinet__buttons i:nth-child(2) {
  background: var(--lit-blue);
}

.cabinet__buttons i:nth-child(3) {
  background: var(--lit-pink);
}

.cabinet__door {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4cqi;
  margin-top: 9%;
  padding: 5cqi;
  border: 2.5px solid var(--toy-ink);
  border-radius: 8px;
  background: #211a40;
}

.cabinet__slot {
  display: grid;
  place-items: center;
  padding: 3cqi 0;
  border: 2px solid #3d3470;
  border-radius: 5px;
  background: #0d0a1f;
}

.cabinet__slot b {
  font-family: var(--font-pixel);
  font-size: clamp(5px, 5.2cqi, 9px);
  font-weight: 400;
  color: var(--lit-red);
  text-shadow: 0 0 6px var(--lit-red);
}

.cabinet__insert {
  grid-column: 1 / -1;
  font-family: var(--font-pixel);
  font-size: clamp(5px, 5.4cqi, 9px);
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  color: var(--lit-gold);
  text-shadow: 0 0 8px rgba(255, 212, 92, 0.7);
}

.game-card__new {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 5px 7px 4px;
  border: 2px solid var(--toy-ink);
  border-radius: 6px;
  background: var(--lit-gold);
  color: var(--toy-ink);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.3;
  text-transform: uppercase;
  box-shadow: 0 2px 0 var(--toy-ink);
}

.game-card__press {
  position: absolute;
  left: 50%;
  bottom: 9%;
  z-index: 1;
  translate: -50% 0;
  padding: 7px 9px 6px;
  border-radius: 6px;
  background: rgba(13, 10, 31, 0.82);
  color: var(--lit-gold);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.3;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 212, 92, 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Title plate for games without a cover screenshot yet. */
.cover--plate {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 55%),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, 0.12) 14px 28px),
    var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  /* Scale with the cabinet (a size container) so tiny thumbnails fit too. */
  font-size: clamp(9px, 13cqi, 18px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 0 rgba(25, 19, 51, 0.45);
}

/* ---- Spotlight ------------------------------------------------------------- */

.spotlight {
  position: relative;
  overflow: hidden;
  padding: 40px 0 64px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(122, 91, 214, 0.4), transparent 60%),
    radial-gradient(700px 400px at 95% 10%, rgba(255, 90, 79, 0.18), transparent 60%),
    linear-gradient(180deg, var(--color-night), #1c1542 70%, #231a52);
  color: var(--on-night);
}

.spotlight__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2.15fr);
  gap: 40px;
  align-items: center;
}

.spotlight__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #fffdf6;
}

.spotlight__lede {
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-night-muted);
}

.spotlight__floor {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 0;
  height: 140px;
  background: repeating-conic-gradient(#191333 0 25%, #342a66 0 50%) 50% 0 / 40px 40px;
  transform: perspective(300px) rotateX(58deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  opacity: 0.55;
}

.carousel {
  position: relative;
}

.slide {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px;
  gap: 28px;
  align-items: center;
  padding: 26px 26px 26px 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.slide__cabinet {
  display: block;
  transition: transform 0.35s var(--ease-out);
}

.slide__cabinet:hover {
  transform: translateY(-6px) rotate(-1deg);
}

.slide__cabinet .cabinet {
  box-shadow:
    0 6px 0 #05030d,
    0 34px 40px -20px rgba(0, 0, 0, 0.7);
}

.slide__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.slide__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.slide__title a {
  color: #fffdf6;
}

.slide__title a:hover {
  color: var(--lit-gold);
}

.slide__tagline {
  margin: 10px 0 0;
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-night-muted);
}

.slide__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 16px 0 0;
  color: var(--on-night-muted);
  font-size: 14px;
}

.slide__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.slide__shots {
  display: grid;
  gap: 12px;
}

.slide__shots img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.slide__shots a:hover img {
  border-color: var(--lit-gold);
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.carousel__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
}

.carousel__arrow:hover {
  border-color: var(--lit-gold);
  color: var(--lit-gold);
}

.carousel__dots {
  display: flex;
  gap: 8px;
}

.carousel__dot {
  width: 34px;
  height: 45px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: none;
  opacity: 0.55;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--ease-out);
}

.carousel__dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__dot:hover {
  opacity: 0.9;
}

.carousel__dot[aria-current='true'] {
  border-color: var(--lit-gold);
  opacity: 1;
  transform: translateY(-3px);
}

/* ---- Portal layout & feed -------------------------------------------------- */

.portal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 64px;
  scroll-margin-top: var(--header-h);
}

.feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 12px;
}

.feed-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.feed-head__count {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-led);
  color: var(--lit-gold);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 2;
}

.sort-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}

.sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-body);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.sort-tab:hover:not(:disabled) {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.sort-tab.is-active {
  background: var(--color-ink);
  color: var(--color-bg);
}

.sort-tab.is-active .icon {
  color: var(--lit-gold);
}

.sort-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.feed-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.feed-status {
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.view-toggle {
  display: flex;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface);
}

.view-toggle button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.view-toggle button[aria-pressed='true'] {
  background: var(--color-led);
  color: var(--lit-gold);
}

.feed {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* List view: a Reddit/Digg-style row. */
.feed-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 46px 84px minmax(0, 1fr) auto;
  grid-template-areas: 'rank vote thumb body play';
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 10px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.feed-item:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-lift);
}

.feed-item__rank {
  grid-area: rank;
  font-family: var(--font-pixel);
  font-size: 11px;
  text-align: center;
  color: var(--color-text-muted);
}

.feed-item__rank[data-top] {
  color: var(--color-accent-strong);
}

.feed-item > .vote {
  grid-area: vote;
}

.feed-item__thumb {
  grid-area: thumb;
  display: block;
  transition: transform 0.25s var(--ease-out);
}

.feed-item__thumb:hover {
  transform: rotate(-2deg) scale(1.03);
}

.feed-item__body {
  grid-area: body;
  min-width: 0;
}

.feed-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.feed-item__title a {
  color: var(--color-ink);
}

.feed-item__title a:hover {
  color: var(--color-accent-strong);
}

.feed-item__tagline {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--color-text-body);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.feed-item__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 6px 0 0 -8px;
}

.feed-item__play {
  grid-area: play;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

a.stat:hover,
.stat--btn:hover {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.stat--btn {
  cursor: pointer;
}

.stat--icon {
  padding: 5px 7px;
}

.feed-item__tools {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

.stat--btn[aria-pressed='true'] {
  color: var(--color-accent-strong);
}

.stat--btn[aria-pressed='true'] svg path {
  fill: currentColor;
}

/* List view shows only the cabinet's screen, as a small CRT thumbnail. */
.feed--list .cabinet {
  padding: 4px;
  border-width: 2px;
  border-radius: 12px;
}

.feed--list .cabinet__marquee,
.feed--list .cabinet__deck,
.feed--list .game-card__new,
.feed--list .game-card__press {
  display: none;
}

.feed--list .cabinet__bezel {
  padding: 3px;
  border-width: 2px;
  border-radius: 9px;
}

.feed--list .cabinet__screen {
  border-radius: 6px;
}

/* Cabinet view: the whole machine, with the details underneath. */
.feed--grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.feed--grid .feed-item {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'thumb thumb'
    'body body'
    'vote play';
  align-content: start;
  align-items: center;
  gap: 12px 6px;
  padding: 16px 16px 14px;
}

/* "More games" under a game: always one row of four on wide screens. */
.feed--related {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.not-found .feed--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feed--grid .feed-item__rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  min-width: 30px;
  padding: 6px 7px 5px;
  border: 2px solid var(--toy-ink);
  border-radius: 8px;
  background: var(--toy-ink);
  color: var(--lit-gold);
  font-size: 10px;
}

.feed--grid .feed-item__thumb {
  padding: 0 10px;
}

.feed--grid .feed-item__thumb:hover {
  transform: translateY(-3px);
}

.feed--grid .feed-item:hover .cabinet__screen .cover {
  transform: scale(1.04);
}

.feed--grid .feed-item:hover .game-card__press {
  opacity: 1;
}

.feed--grid .feed-item__title {
  font-size: 18px;
}

.feed--grid .feed-item__meta span:not(.badge),
.feed--grid .feed-item__meta time,
.feed--grid .feed-item__stats {
  display: none;
}

.feed--grid .feed-item__play {
  justify-self: end;
}

.feed--grid .vote {
  flex-direction: row;
  justify-self: start;
  min-width: 0;
  gap: 0;
}

.feed--grid .vote__btn {
  width: 30px;
}

.feed--grid .vote__score {
  min-width: 2.5ch;
}

/* Cards are narrow: before anyone votes, show just the arrows. */
.feed--grid .vote__score.is-empty {
  display: none;
}

/* ---- Voting ---------------------------------------------------------------- */

.vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vote__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s var(--ease-out);
}

.vote__btn:hover {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.vote__btn:active {
  transform: scale(0.88);
}

.vote__btn--up[aria-pressed='true'] {
  background: var(--up-soft);
  color: var(--up);
}

.vote__btn--down[aria-pressed='true'] {
  background: var(--down-soft);
  color: var(--down);
}

.vote__btn[aria-pressed='true'] svg path {
  fill: currentColor;
}

.vote__score {
  min-width: 3ch;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vote__score.is-empty {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.vote.is-up .vote__score {
  color: var(--up);
}

.vote.is-down .vote__score {
  color: var(--down);
}

.vote.is-bumped .vote__score {
  animation: vote-bump 0.35s var(--ease-out);
}

@keyframes vote-bump {
  40% {
    transform: scale(1.35);
  }
}

.vote--inline {
  flex-direction: row;
  gap: 0;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.vote--inline .vote__btn {
  width: 32px;
  height: 30px;
  border-radius: 999px;
  color: var(--on-night-muted);
}

.vote--inline .vote__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.vote--inline .vote__score {
  padding: 0 4px;
  color: #fff;
}

.vote--inline .vote__score.is-empty {
  color: var(--on-night-muted);
}

.vote--big {
  width: 84px;
  padding: 8px 6px;
  border: 2px solid var(--color-line);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--lip);
}

.vote--big .vote__btn {
  width: 48px;
  height: 40px;
}

.vote--big .vote__score {
  font-size: 24px;
}

.vote--big .vote__score.is-empty {
  font-size: 12px;
}

.vote__label {
  margin-top: -2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Sidebar cards ------------------------------------------------------- */

.portal__side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.side-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.side-card__title .icon {
  color: var(--color-accent-strong);
}

.side-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}

.side-card__fine {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.side-card--cta {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(255, 212, 92, 0.18), transparent 70%),
    linear-gradient(160deg, var(--color-night-2), var(--color-night));
  color: var(--on-night);
}

.side-card--cta .coin {
  position: absolute;
  top: 16px;
  right: 16px;
  rotate: 12deg;
}

.side-card__heading {
  margin: 0 56px 8px 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  color: #fffdf6;
}

.side-card--cta p {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--on-night-muted);
}

.side-card--cta .btn {
  width: 100%;
}

.side-card--cta .side-card__link {
  color: var(--lit-gold);
}

.toplist,
.players {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toplist__item,
.players__item {
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.toplist__rank,
.players__rank {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-align: center;
  color: var(--color-text-muted);
}

.toplist__item:nth-child(-n + 3) .toplist__rank,
.players__item:nth-child(-n + 3) .players__rank {
  color: var(--color-accent-strong);
}

.toplist__thumb {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--toy-ink);
  border-radius: 7px;
}

.toplist__text,
.players__text {
  min-width: 0;
}

.toplist__title,
.players__name {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-ink);
}

.toplist__title:hover {
  color: var(--color-accent-strong);
}

.toplist__meta,
.players__meta {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.toplist__score,
.players__points {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--up);
  font-variant-numeric: tabular-nums;
}

.players__points {
  color: var(--color-accent-strong);
}

.genre-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.genre-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--color-text-body);
  font-weight: 600;
}

.genre-list a:hover {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.genre-list__count {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  font-size: 12.5px;
  color: var(--color-text-muted);
}

/* ---- Shared blocks ---------------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: 16px;
  background: var(--color-surface-2);
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-accent-strong);
}

.empty__title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-ink);
}

.empty__body {
  max-width: 46ch;
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.empty .btn {
  margin-top: 8px;
}

.side-card .empty {
  padding: 18px 14px;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--avatar, #5b46c9);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}

.avatar--ghost {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.meter {
  position: relative;
  display: inline-block;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-track);
}

.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--lit-gold));
}

.mode-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-text-body);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.mode-badge--copilot {
  background: var(--violet-soft);
  color: var(--violet-text);
}

.mode-badge--coop {
  background: var(--success-soft);
  color: var(--success-text);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 4px 0 var(--lip-color);
}

/* Leaderboard tables. */
.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  font-size: 14.5px;
}

.board th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.board td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.board tr:last-child td {
  border-bottom: 0;
}

.board__rank {
  width: 60px;
}

.medal {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-family: var(--font-pixel);
  font-size: 10px;
}

.medal--1 {
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c12e 60%, #c9921a);
  color: var(--toy-ink);
  box-shadow: 0 0 0 2px var(--toy-ink);
}

.medal--2 {
  background: radial-gradient(circle at 35% 30%, #ffffff, #c9ccd8 60%, #9aa0b5);
  color: var(--toy-ink);
  box-shadow: 0 0 0 2px var(--toy-ink);
}

.medal--3 {
  background: radial-gradient(circle at 35% 30%, #ffe0c2, #d9894a 60%, #a8602a);
  color: var(--toy-ink);
  box-shadow: 0 0 0 2px var(--toy-ink);
}

.board__player {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--color-ink);
}

.board__score {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board__when {
  color: var(--color-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.my-best {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: var(--gold-soft);
  font-size: 14px;
}

/* Gameplay video: a poster with a play button until someone presses it. */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--toy-ink);
  border-radius: 16px;
  background: var(--color-stage);
  box-shadow: 0 4px 0 var(--lip-color);
}

.video__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(13, 10, 31, 0.1), rgba(13, 10, 31, 0.7));
  color: #fff;
  cursor: pointer;
}

.video__play-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding-left: 4px;
  border: 3px solid var(--toy-ink);
  border-radius: 50%;
  background: var(--lit-gold);
  color: var(--toy-ink);
  box-shadow: 0 5px 0 var(--toy-ink);
  transition: transform 0.2s var(--ease-out);
}

.video__play:hover .video__play-icon {
  transform: scale(1.08);
}

.video__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #fff;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: left;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.video__by {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

.video__duration {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(13, 10, 31, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.video iframe,
.video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Small clip cards (sidebar, grids): a smaller button, one-line caption. */
.video:not(.video--big) .video__play-icon {
  width: 48px;
  height: 48px;
  border-width: 2.5px;
  box-shadow: 0 4px 0 var(--toy-ink);
}

.video:not(.video--big) .video__play-icon svg {
  width: 20px;
  height: 20px;
}

.video:not(.video--big) .video__caption {
  bottom: 8px;
  left: 10px;
  right: 10px;
  flex-direction: column;
  gap: 0;
  font-size: 13.5px;
  line-height: 1.3;
}

.video:not(.video--big) .video__caption > span {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video:not(.video--big) .video__by {
  font-size: 12px;
}

.video__notice {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 10, 31, 0.86);
  color: var(--on-night);
  font-size: 14.5px;
  text-align: center;
}

/* ---- FAQ ------------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}

.faq__intro p:not(.section__eyebrow) {
  margin: 0;
  color: var(--color-text-body);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color 0.2s ease;
}

.faq__item[open] {
  border-color: var(--color-line);
  box-shadow: 0 4px 0 var(--lip-color);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: '+';
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s var(--ease-out);
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
  background: var(--color-ink);
  color: var(--color-bg);
}

.faq__item p {
  margin: 0;
  padding: 0 22px 20px;
  line-height: 1.7;
  color: var(--color-text-body);
}

/* ---- Page heads and text pages -------------------------------------------- */

.page-head {
  position: relative;
  overflow: hidden;
  padding: 44px 0 36px;
  background:
    radial-gradient(700px 300px at 10% -20%, rgba(122, 91, 214, 0.4), transparent 60%),
    linear-gradient(180deg, var(--color-night), #1d1644);
  color: var(--on-night);
}

.page-head .section__eyebrow {
  color: var(--lit-gold);
}

.page-head .section__eyebrow::before {
  background: var(--lit-gold);
}

.page-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fffdf6;
}

.page-head__lede {
  max-width: 64ch;
  margin: 14px 0 0;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--on-night-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 212, 92, 0.4);
  border-radius: 999px;
  background: rgba(255, 212, 92, 0.12);
  color: var(--lit-gold);
  font-size: 14px;
  font-weight: 600;
}

.page-body {
  max-width: 840px;
  padding-top: 36px;
  padding-bottom: 72px;
}

.page__meta {
  font-size: 14px;
  color: var(--color-text-muted);
}

.page__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px !important;
}

.prose h2 {
  margin: 40px 0 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose > h2:first-child,
.prose > .section-title:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 28px 0 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.prose p,
.prose li {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--color-text-body);
}

.prose p {
  margin: 0 0 16px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--color-accent);
}

.prose a:not(.btn) {
  text-decoration: underline;
  text-decoration-color: var(--color-accent-soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:not(.btn):hover {
  text-decoration-color: var(--color-accent);
}

.about-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 8px 0 16px;
}

.about-step {
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
}

.about-step__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--color-bg-alt);
  color: var(--color-accent-strong);
}

.about-step h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
}

.about-step p {
  margin: 0;
  font-size: 15px;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0 0 8px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border: 2px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 4px 0 var(--lip-color);
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.prose a.contact-card {
  text-decoration: none;
}

.contact-card:hover {
  color: var(--color-text);
  transform: translateY(-3px);
  box-shadow: 0 7px 0 var(--lip-color);
}

.contact-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--color-bg-alt);
  color: var(--color-accent-strong);
}

.contact-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.contact-card__text {
  font-size: 14.5px;
  color: var(--color-text-body);
  overflow-wrap: anywhere;
}

.guidelines {
  display: grid;
  gap: 16px;
  max-width: 880px;
  padding-top: 32px;
  padding-bottom: 72px;
}

.guidelines__card h2 {
  margin: 0 0 10px;
}

.guidelines__card ul {
  margin: 0;
}

/* ---- Game page ------------------------------------------------------------- */

.game-page {
  padding-bottom: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 22px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-body);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--color-accent-strong);
}

.game-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  padding: 18px 0 0;
}

.game-head__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.game-head__kicker a {
  color: var(--color-text-body);
  font-weight: 600;
}

.game-head__title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.game-head__lede {
  max-width: 64ch;
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-body);
}

.game-head__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 170px;
}

.tag-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.chip-list li {
  padding: 4px 11px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-body);
  font-size: 13px;
  font-weight: 600;
}

.chip-list {
  gap: 6px;
  margin: 6px 0 0;
}

.chip-list li {
  padding: 3px 10px;
  font-size: 12.5px;
}

.statbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.statbar li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 13.5px;
  color: var(--color-text-body);
}

.statbar li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.statbar strong {
  font-weight: 800;
  color: var(--color-ink);
}

/* In-page player. */
.player {
  margin-top: 22px;
  overflow: hidden;
  border: 2px solid var(--toy-ink);
  border-radius: var(--radius-lg);
  background: var(--color-stage);
  box-shadow:
    0 6px 0 var(--lip-color),
    0 40px 60px -30px rgba(25, 19, 51, 0.45);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.player__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--toy-ink);
  background: var(--toy-ink);
}

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
}

.modes__option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 253, 246, 0.82);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.modes__option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.modes__option[aria-checked='true'] {
  background: var(--lit-gold);
  color: var(--toy-ink);
}

.modes__option[data-supported='false']:not([aria-checked='true']) {
  color: rgba(255, 253, 246, 0.55);
}

.modes__soon {
  padding: 3px 5px 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--lit-gold);
  font-family: var(--font-pixel);
  font-size: 7px;
  text-transform: uppercase;
}

.modes__option[aria-checked='true'] .modes__soon {
  background: rgba(25, 19, 51, 0.14);
  color: var(--toy-ink);
}

.player__note {
  flex: 1;
  min-width: 200px;
  margin: 0;
  font-size: 13.5px;
  color: var(--on-night-muted);
}

.player__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.player.has-panel .player__stage {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.player__screen {
  position: relative;
  display: grid;
  place-items: center;
  height: min(76vh, 740px);
  height: min(76svh, 740px);
  min-height: 440px;
  overflow: hidden;
  background:
    radial-gradient(700px 380px at 50% 40%, rgba(122, 91, 214, 0.28), transparent 70%),
    var(--color-stage);
}

.player--landscape .player__screen {
  height: auto;
  min-height: 0;
  max-height: 76vh;
  max-height: 76svh;
  aspect-ratio: 16 / 9;
}

.player__poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.player__backdrop {
  position: absolute;
  inset: -8%;
  width: 116%;
  max-width: none;
  height: 116%;
  object-fit: cover;
  filter: blur(26px) saturate(1.2);
  opacity: 0.55;
}

.player__start {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fffdf6;
}

.player__start:hover {
  color: #fffdf6;
}

.player__slot {
  width: 70px;
  height: 14px;
  margin-bottom: 6px;
  border: 2.5px solid var(--lit-gold);
  border-radius: 7px;
  background: #05030d;
  box-shadow:
    0 0 16px rgba(255, 212, 92, 0.55),
    inset 0 2px 4px #000;
}

.player__coin {
  display: block;
  filter: drop-shadow(0 6px 0 var(--toy-ink)) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s var(--ease-out);
}

.player__start:hover .player__coin {
  transform: translateY(-4px) scale(1.05);
}

.player__start-label {
  margin-top: 6px;
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--lit-gold);
  text-shadow:
    0 0 10px rgba(255, 212, 92, 0.6),
    0 3px 0 #000;
}

.player__start-sub {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 253, 246, 0.85);
}

.player__hint {
  position: relative;
  max-width: 340px;
  margin: 0;
  font-size: 14px;
  color: rgba(255, 253, 246, 0.85);
}

.player__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* Portrait games play in a phone-shaped frame centred on the stage. */
.player--portrait .player__frame {
  right: auto;
  left: 50%;
  translate: -50% 0;
  width: auto;
  max-width: 100%;
  aspect-ratio: 9 / 16;
}

.player.is-playing .player__poster {
  display: none;
}

.player__screen:fullscreen {
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

.player__p2 {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px 5px;
  border: 2px solid var(--toy-ink);
  border-radius: 8px;
  background: var(--lit-blue);
  color: var(--toy-ink);
  font-family: var(--font-pixel);
  font-size: 9px;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--toy-ink);
}

.player__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-top: 2px solid var(--toy-ink);
  background: var(--toy-ink);
  color: var(--on-night);
}

.player__bar-title {
  font-family: var(--font-display);
  font-weight: 800;
}

.player__1up {
  margin-right: 6px;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 400;
  color: var(--lit-red);
}

.player__bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* AI co-pilot / co-op side panel. */
.copilot {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 2px solid var(--toy-ink);
  background: linear-gradient(180deg, #1b1540, #120d26);
  color: var(--on-night);
}

.copilot__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.copilot__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--toy-ink);
  border-radius: 10px;
  background: var(--lit-gold);
  color: var(--toy-ink);
}

.copilot__name {
  font-family: var(--font-display);
  font-weight: 800;
}

.copilot__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  color: var(--on-night-muted);
}

.copilot__status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fbf72;
  box-shadow: 0 0 0 3px rgba(63, 191, 114, 0.25);
}

.copilot__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 14px;
  overflow-y: auto;
  list-style: none;
}

.copilot__msg {
  padding: 10px 12px;
  border-radius: 12px 12px 12px 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.5;
  animation: toast-in 0.3s var(--ease-out);
}

.copilot__msg--system {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--on-night-muted);
  font-size: 13px;
}

.copilot__ask {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copilot__ask input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
}

.copilot__ask input::placeholder {
  color: rgba(244, 240, 255, 0.5);
}

/* Sticky "on this page" navigation. */
.section-nav {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 20;
  display: flex;
  gap: 4px;
  margin: 28px 0 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}

.section-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--color-text-body);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.section-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.section-nav a.is-active {
  background: var(--color-ink);
  color: var(--color-bg);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

.game-layout__side {
  position: sticky;
  top: calc(var(--header-h) + 76px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 36px;
}

.game-section {
  padding-top: 36px;
  scroll-margin-top: calc(var(--header-h) + 72px);
}

.controls {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.controls th,
.controls td {
  padding: 12px 16px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.controls thead th {
  background: var(--color-led);
  color: var(--on-night);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.controls__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.controls tbody tr + tr {
  border-top: 1px solid var(--color-border);
}

.controls tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

.controls tbody th {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.controls td {
  color: var(--color-text-body);
}

.tips li {
  margin-bottom: 10px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery li:has(.gallery__item--wide) {
  grid-column: span 2;
}

.gallery__item {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--toy-ink);
  border-radius: 14px;
  background: var(--color-stage);
  box-shadow: 0 3px 0 var(--lip-color);
  cursor: zoom-in;
  transition: transform 0.2s var(--ease-out);
}

.gallery__item--wide {
  aspect-ratio: auto;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__item:hover {
  transform: translateY(-3px);
}

.clips {
  margin-top: 30px;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.achievement {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}

.achievement.is-unlocked {
  border-color: var(--success-line);
  background: var(--success-faint);
}

.achievement__medal {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 2px solid var(--toy-ink);
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, #fff3c9, var(--lit-gold) 60%, #d9a92f);
  box-shadow: 0 3px 0 var(--toy-ink);
  color: var(--toy-ink);
}

.achievement__text {
  min-width: 0;
  flex: 1;
}

.achievement__title {
  margin: 0;
  padding-right: 70px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.achievement__desc {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-body);
}

.achievement__rate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.achievement__unlocked {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success-text);
  font-size: 11.5px;
  font-weight: 700;
}

.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}

.composer__prompt {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.composer__prompt:hover {
  border-color: var(--color-ink);
}

.comments-sort {
  display: flex;
  gap: 4px;
  margin: -4px 0 12px;
}

.comments,
.comment__replies {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}

.comment__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 13.5px;
}

.comment__name {
  font-weight: 700;
  color: var(--color-ink);
}

.comment__time {
  color: var(--color-text-muted);
}

.comment__body {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-body);
  overflow-wrap: anywhere;
}

.comment__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 6px 0 0 -8px;
}

.comment__replies {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--color-border);
}

.comment__replies .comment {
  padding: 0;
  border: 0;
  background: none;
}

.kit {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}

.kit--sample {
  margin-top: 14px;
}

.kit__example {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.kit__files {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kit__files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-2);
  font-weight: 600;
}

.kit__files .icon {
  color: var(--color-accent-strong);
}

.kit__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-weight: 700;
  color: var(--color-accent-strong);
}

.kit--sample .kit__action {
  color: var(--color-text-muted);
}

.kit__tools,
.kit__notes {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.rating__meter {
  margin: 2px 0 14px;
}

.rating__bar {
  position: relative;
  display: block;
  height: 14px;
  overflow: hidden;
  border: 2px solid var(--toy-ink);
  border-radius: 999px;
  background: #dfe3ff;
}

.rating__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--lit-gold), #f5a623);
  border-right: 2px solid var(--toy-ink);
}

.rating__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.rating__labels span:first-child {
  color: var(--color-accent-strong);
}

.rating__labels span:last-child {
  color: var(--down);
}

.rating__empty {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.rating__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rating__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 2px solid var(--color-ink);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 3px 0 var(--lip-color);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out),
    background-color 0.15s ease;
}

.rating__btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--lip-color);
}

.rating__btn--up[aria-pressed='true'] {
  background: var(--lit-gold);
}

.rating__btn--down[aria-pressed='true'] {
  background: var(--down-soft);
}

.rating__btn[aria-pressed='true'] svg path {
  fill: currentColor;
}

.rating__total {
  margin: 10px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--color-text-muted);
}

.facts dl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.facts dt {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: var(--color-text);
}

.related {
  padding: 72px 0 32px;
}

/* ---- Discover mode ---------------------------------------------------------- */

.discover {
  padding: 20px 0 56px;
}

.discover__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 32px;
}

.discover__title {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.discover__lede {
  max-width: 520px;
  margin: 0;
  color: var(--color-text-body);
}

/* The board is the game page's player (.player) with a channel display, TV
   static, an on-screen display and the review card on top. Sized so the whole
   board fits below the sticky header. */
.discover-board {
  scroll-margin-top: calc(var(--header-h) + 58px);
}

.discover-board .player__screen {
  height: clamp(400px, calc(100vh - 250px), 700px);
  height: clamp(400px, calc(100svh - 250px), 700px);
}

.discover-board.player--landscape .player__screen {
  height: auto;
  max-height: calc(100vh - 250px);
  max-height: calc(100svh - 250px);
}

.discover-board__top {
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 10px 12px 10px 18px;
}

.discover-board__channel {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  margin: 0;
  color: var(--on-night);
}

.discover-board__ch {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--lit-gold);
}

.discover-board__number {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: #7dff8a;
  text-shadow: 0 0 8px rgba(125, 255, 138, 0.6);
}

.discover-board__now {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.discover-board__sound {
  flex-shrink: 0;
  padding: 7px 10px;
}

.discover-board__sound-off,
.discover-board__sound[aria-pressed='false'] .discover-board__sound-on {
  display: none;
}

.discover-board__sound[aria-pressed='false'] .discover-board__sound-off {
  display: inline-flex;
}

.discover-board__screen {
  isolation: isolate;
}

/* The game's cover, blurred, fills the space around a portrait game. */
.discover-board__ambient {
  position: absolute;
  inset: -8%;
  width: 116%;
  max-width: none;
  height: 116%;
  object-fit: cover;
  filter: blur(26px) brightness(0.42) saturate(1.3);
}

.discover-board__stage {
  position: absolute;
  inset: 0;
}

/* Changing the channel: the old picture squeezes to a bright line, snow
   takes over, then the new picture settles in. */
.discover-board .player__frame.is-leaving {
  animation: channel-off 0.17s ease-in forwards;
}

.discover-board .player__frame.is-arriving {
  animation: channel-on 0.4s ease-out;
}

@keyframes channel-off {
  to {
    transform: scaleY(0.03);
    filter: brightness(2.6);
  }
}

@keyframes channel-on {
  from {
    transform: scaleY(1.06);
    filter: brightness(1.9) contrast(1.3);
  }
}

.discover-static {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  image-rendering: pixelated;
  transition: opacity 0.3s ease;
}

.discover-static.is-idle {
  opacity: 0.2;
}

.discover-static.is-on {
  opacity: 1;
  transition: none;
  animation: static-flash 0.28s ease-out;
}

@keyframes static-flash {
  from {
    filter: brightness(1.8) contrast(1.4);
  }
}

/* A dark bar rolling through the snow, like a signal that won't hold. */
.discover-board[data-state='tuning'] .discover-board__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(transparent 40%, rgba(255, 255, 255, 0.12) 46%, rgba(0, 0, 0, 0.45) 50%, transparent 58%);
  background-size: 100% 220%;
  animation: static-roll 0.8s linear infinite;
}

@keyframes static-roll {
  from {
    background-position: 0 100%;
  }
  to {
    background-position: 0 -120%;
  }
}

/* On-screen display: the channel number and the game's name, in TV green. */
.discover-osd {
  position: absolute;
  z-index: 5;
  margin: 0;
  font-family: var(--font-pixel);
  color: #7dff8a;
  text-shadow:
    0 0 6px rgba(125, 255, 138, 0.75),
    2px 2px 0 rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.discover-osd.is-on {
  opacity: 1;
  transition: none;
}

.discover-osd--channel {
  top: 16px;
  right: 18px;
  font-size: clamp(18px, 3vw, 28px);
}

.discover-osd--title {
  right: 18px;
  bottom: 18px;
  left: 18px;
  font-size: clamp(11px, 1.6vw, 15px);
  line-height: 1.6;
  text-transform: uppercase;
}

.discover-start {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(20, 15, 43, 0.7), rgba(20, 15, 43, 0.92));
  color: var(--on-night);
  text-align: center;
}

.discover-start__hud {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--lit-gold);
}

.discover-start__title {
  max-width: 560px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.discover-start__text {
  max-width: 440px;
  margin: 0;
  color: var(--on-night-muted);
}

.discover-start__button {
  margin-top: 8px;
  padding: 15px 28px;
  font-size: 17px;
}

/* The review that pops up at game over. */
.review {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 7;
  display: grid;
  gap: 12px;
  width: min(calc(100% - 28px), 420px);
  padding: 20px 20px 16px;
  border: 2px solid var(--toy-ink);
  border-radius: 22px;
  background: rgba(18, 13, 38, 0.95);
  box-shadow:
    0 6px 0 #05030d,
    0 30px 60px -20px rgba(0, 0, 0, 0.8);
  color: var(--on-night);
  text-align: center;
  translate: -50% 0;
  animation: review-in 0.35s var(--ease-out);
}

@keyframes review-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Wide screens: beside a portrait game, so its final score stays in view.
   The width is the space right of the 9:16 frame (see .discover-board). */
@media (min-width: 1100px) {
  .discover-board.player--portrait .review {
    top: 50%;
    right: 24px;
    bottom: auto;
    left: auto;
    width: min(360px, calc((100% - clamp(400px, 100vh - 250px, 700px) * 0.5625) / 2 - 24px));
    width: min(360px, calc((100% - clamp(400px, 100svh - 250px, 700px) * 0.5625) / 2 - 24px));
    translate: 0 -50%;
  }
}

.review__over {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--lit-red);
  text-shadow: 0 0 10px rgba(255, 90, 79, 0.6);
  text-transform: uppercase;
}

.review__score {
  margin: -4px 0 0;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--lit-gold);
}

.review__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.review__verdicts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.review__verdict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s var(--ease-out);
}

.review__verdict:hover {
  background: rgba(255, 255, 255, 0.12);
}

.review__verdict:active {
  transform: scale(0.96);
}

.review__verdict--up[aria-pressed='true'] {
  border-color: #3fbf72;
  background: rgba(63, 191, 114, 0.22);
  color: #b6f5cf;
}

.review__verdict--down[aria-pressed='true'] {
  border-color: var(--lit-red);
  background: rgba(255, 90, 79, 0.2);
  color: #ffc9c4;
}

.review__verdict[aria-pressed='true'] svg path {
  fill: currentColor;
  fill-opacity: 0.3;
}

.review__save {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-night-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.review__save:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.review__save[aria-pressed='true'] {
  color: var(--lit-gold);
}

.review__save[aria-pressed='true'] svg path {
  fill: currentColor;
}

.review__next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 14px;
  border: 2.5px solid var(--toy-ink);
  border-radius: 16px;
  background: var(--lit-gold);
  box-shadow: 0 5px 0 var(--toy-ink);
  color: var(--toy-ink);
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out);
}

.review__next:hover {
  box-shadow: 0 7px 0 var(--toy-ink);
  transform: translateY(-2px);
}

.review__next:active {
  box-shadow: 0 1px 0 var(--toy-ink);
  transform: translateY(4px);
}

.review__next kbd {
  padding: 2px 6px;
  border: 1.5px solid rgba(25, 19, 51, 0.35);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
}

.review__more {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--on-night-muted);
}

.review__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-night);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.review__link:hover {
  color: var(--lit-gold);
}

.discover-board__info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  color: var(--on-night-muted);
}

.discover-board__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.discover-board__title:hover {
  color: var(--lit-gold);
}

.chip-button--gold {
  border-color: var(--lit-gold);
  background: var(--lit-gold);
  color: var(--toy-ink);
}

.chip-button--gold:hover {
  border-color: #ffdc78;
  background: #ffdc78;
  color: var(--toy-ink);
}

.discover-history {
  margin-top: 28px;
}

.discover-history__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-ink);
}

.discover-history__title .icon {
  color: var(--color-accent-strong);
}

.discover-history__list {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  list-style: none;
}

.discover-history__item a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

.discover-history__item a:hover {
  border-color: var(--color-border-strong);
}

.discover-history__item img {
  flex-shrink: 0;
  width: 36px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--toy-ink);
  border-radius: 8px;
}

.discover-history__text {
  display: grid;
  min-width: 0;
}

.discover-history__name {
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.discover-history__verdict {
  font-size: 13px;
  color: var(--color-text-muted);
}

.discover-history__verdict--up {
  color: var(--success-text);
}

.discover-history__verdict--down {
  color: var(--danger);
}

.discover-how {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.discover-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.discover-steps li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-bg);
  color: var(--color-text-body);
}

.discover-steps__n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border: 2px solid var(--toy-ink);
  border-radius: 10px;
  background: var(--lit-gold);
  box-shadow: 0 3px 0 var(--toy-ink);
  color: var(--toy-ink);
  font-family: var(--font-pixel);
  font-size: 13px;
}

.discover-steps strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-ink);
}

.discover-creators {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 16px;
  color: var(--color-text-body);
}

.discover-creators .icon {
  margin-top: 2px;
  color: var(--color-accent-strong);
}

.discover-creators p {
  margin: 0;
}

.discover-creators code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--color-bg-alt);
  font-size: 0.92em;
}

.spotlight__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--on-night-muted);
}

/* ---- Leaderboards page ----------------------------------------------------- */

.lb {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 72px;
}

.lb__tabs {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lb__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-body);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.lb__tab img {
  width: 26px;
  height: 34px;
  object-fit: cover;
  border: 2px solid var(--toy-ink);
  border-radius: 6px;
}

.lb__tab:hover {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}

.lb__tab.is-active {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--shadow-soft);
}

.lb__game {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.lb__game .section-title {
  flex: 1;
  margin: 0;
}

.lb__note {
  margin: -6px 0 14px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.lb__aside p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--color-text-body);
}

.mode-legend {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

/* ---- Submit page ------------------------------------------------------------ */

.submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 72px;
}

.submit__side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kind-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.kind-switch__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-body);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.kind-switch__tab[aria-selected='true'] {
  background: var(--color-ink);
  color: var(--color-bg);
}

.kind-switch__tab[aria-selected='true'] .icon {
  color: var(--lit-gold);
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-card {
  min-width: 0;
  margin: 0;
  padding: 22px 22px 8px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.form-card__legend {
  float: left;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.form-card__legend + * {
  clear: both;
}

.form-card__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--color-led);
  color: var(--lit-gold);
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: 400;
}

.form-card__lede {
  clear: both;
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--color-text-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field__label {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-ink);
}

.field__req {
  color: var(--lit-red);
}

.field__opt {
  margin-left: 4px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.submit-form input[type='text'],
.submit-form input[type='url'],
.submit-form input[type='email'],
.submit-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface-2);
  color: var(--color-ink);
  font-size: 15px;
  line-height: 1.5;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.submit-form textarea {
  resize: vertical;
}

.submit-form input:focus,
.submit-form textarea:focus {
  outline: none;
  border-color: var(--color-ink);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(201, 154, 61, 0.3);
}

.submit-form [aria-invalid='true'] {
  border-color: var(--lit-red);
  background: var(--danger-soft);
}

.submit-form .select select {
  padding-top: 11px;
  padding-bottom: 11px;
  background: var(--color-surface-2);
  font-weight: 500;
}

.field__hint {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.field__counter {
  float: right;
  font-variant-numeric: tabular-nums;
}

.field__error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.segmented {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface-2);
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--color-text-body);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.segmented label:last-child .icon {
  rotate: 90deg;
}

.segmented input:checked + span {
  background: var(--color-ink);
  color: var(--color-bg);
}

.segmented input:focus-visible + span {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
}

.drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px dashed var(--color-border-strong);
  border-radius: 14px;
  background: var(--color-surface-2);
  color: var(--color-text-body);
  font-size: 14.5px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.drop .icon {
  color: var(--color-accent-strong);
}

.drop strong {
  color: var(--color-ink);
}

.drop:hover,
.drop.is-over,
.drop:focus-within {
  border-color: var(--color-accent);
  background: var(--gold-faint);
}

.drop input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thumbs:empty {
  display: none;
}

.thumbs img,
.thumbs video {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border: 2px solid var(--toy-ink);
  border-radius: 10px;
  background: var(--color-stage);
}

.thumbs .is-wide {
  width: 128px;
  height: 72px;
}

.thumbs__note {
  align-self: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

.yt-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-2);
  font-size: 14px;
}

.yt-preview img {
  width: 128px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.repeater {
  margin-bottom: 16px;
}

.repeater__head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 42px;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.repeater__rows {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.repeater__rows:empty {
  display: none;
}

.repeater__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 42px;
  gap: 8px;
}

.repeater__row--two {
  grid-template-columns: 1fr 1.6fr 42px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--lit-red);
  color: var(--lit-red);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  font-size: 14.5px;
  color: var(--color-text-body);
  cursor: pointer;
}

.check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-ink);
}

.check--card {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface-2);
}

/* Title on its own line, the explanation under it. */
.check--card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  color: var(--color-ink);
}

.check--card:has(input:checked) {
  border-color: var(--color-ink);
  background: var(--color-surface);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0 12px;
}

.kit-fields {
  padding-top: 8px;
}

.submit-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface) 95%, transparent);
  box-shadow: var(--shadow-lift);
}

.submit-bar__status {
  margin: 0 auto 0 4px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.form-errors {
  padding: 14px 18px;
  border: 2px solid var(--lit-red);
  border-radius: 16px;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 14.5px;
}

.form-errors p {
  margin: 0 0 6px;
  font-weight: 700;
}

.form-errors ul {
  margin: 0;
  padding-left: 20px;
}

.form-errors a {
  color: var(--danger-text);
  text-decoration: underline;
}

.preview-card__note {
  margin: -6px 0 12px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.feed--preview .feed-item {
  grid-template-columns: 40px 64px minmax(0, 1fr);
  grid-template-areas: 'vote thumb body';
  gap: 10px;
  padding: 12px 12px 12px 6px;
  box-shadow: none;
}

.feed--preview .feed-item__rank,
.feed--preview .feed-item__play,
.feed--preview .feed-item__stats {
  display: none;
}

.feed--preview .feed-item__title {
  font-size: 16px;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
}

.checklist li.is-done {
  color: var(--color-ink);
}

.checklist li.is-done::before {
  border-color: var(--success);
  background: var(--success)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.steps-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--color-text-body);
}

/* ---- Dialogs and toasts ---------------------------------------------------- */

.modal {
  width: 100%;
  max-width: min(92vw, 460px);
  padding: 0;
  border: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(13, 10, 31, 0.6);
  backdrop-filter: blur(4px);
}

.modal__card {
  position: relative;
  padding: 30px 26px 22px;
  border: 2px solid var(--color-line);
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow:
    0 6px 0 var(--lip-color),
    0 40px 80px -20px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-surface);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal__coin {
  display: flex;
  justify-content: center;
  margin: 0;
}

.modal__title {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.modal__body {
  font-size: 15.5px;
  color: var(--color-text-body);
}

.modal__body p {
  margin: 0 0 8px;
}

.modal__actions {
  margin-top: 18px;
}

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(8, 6, 20, 0.94);
}

.lightbox__frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 56px 76px;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lightbox__figure img {
  max-width: min(92vw, 1100px);
  max-height: calc(100dvh - 150px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.lightbox__figure figcaption {
  color: var(--on-night);
  font-size: 15px;
  text-align: center;
}

.lightbox__count {
  margin-left: 8px;
  color: var(--on-night-muted);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.lightbox__close {
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
}

.lightbox__nav {
  top: 50%;
  width: 52px;
  height: 52px;
  translate: 0 -50%;
}

.lightbox__nav--prev {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  translate: -50% 0;
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  animation: toast-in 0.25s var(--ease-out);
  pointer-events: auto;
}

@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

/* ---- 404 ------------------------------------------------------------------ */

.not-found {
  text-align: center;
}

.not-found__screen {
  position: relative;
  max-width: 560px;
  margin: 0 auto 40px;
  padding: 48px 24px 40px;
  overflow: hidden;
  border: 2.5px solid var(--toy-ink);
  border-radius: 26px;
  background: radial-gradient(ellipse at center, #2a1f55, #0d0a1f 75%);
  box-shadow:
    inset 0 0 0 8px #191333,
    0 6px 0 var(--lip-color),
    0 40px 60px -30px rgba(25, 19, 51, 0.5);
}

.not-found__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
}

.not-found__over {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--lit-red);
  text-shadow:
    0 0 18px rgba(255, 90, 79, 0.6),
    0 4px 0 #000;
}

.not-found__continue {
  margin: 24px 0 0;
  font-family: var(--font-pixel);
  font-size: 14px;
  text-transform: uppercase;
  color: #fff;
}

.not-found__continue span {
  color: var(--lit-gold);
}

.not-found__code {
  margin: 26px 0 0;
  font-family: var(--font-pixel);
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.not-found__title {
  margin-bottom: 12px;
}

.not-found__lede {
  margin: 0 auto 28px;
  color: var(--color-text-body);
}

.not-found__picks {
  justify-content: center;
  margin-top: 64px;
}

.not-found .feed {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

/* ---- Footer ---------------------------------------------------------------- */

.site-footer {
  padding: 48px 0 36px;
  background: var(--color-night);
  color: var(--on-night-muted);
  font-size: 14.5px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
  align-items: start;
}

.brand--footer .brand__name {
  font-size: 1.1rem;
}

.site-footer__brand p {
  max-width: 400px;
  margin: 12px 0 0;
}

.site-footer__hud {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  text-transform: uppercase;
}

.site-footer__hud-dim {
  color: rgba(244, 240, 255, 0.45);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__col h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fffdf6;
}

.site-footer__col a {
  color: var(--on-night-muted);
  font-weight: 500;
}

.site-footer__col a:hover {
  color: var(--lit-gold);
}

.site-footer__legal {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
}

.site-footer__legal a {
  color: var(--on-night);
  font-weight: 600;
}

/* ---- Ads ---------------------------------------------------------------- */

.ad-slot {
  max-width: 970px;
  margin: 40px auto 0;
  text-align: center;
}

.ad-slot__label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.ad-slot--placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 120px;
  padding: 24px;
  border: 2px dashed var(--color-accent-soft);
  border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(201, 154, 61, 0.06) 12px 24px);
}

.ad-slot--placeholder .ad-slot__label {
  margin: 0;
  color: var(--color-accent-strong);
}

.ad-slot__hint {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.ad-slot--side {
  margin: 0;
}

.ad-slot--side.ad-slot--placeholder {
  min-height: 250px;
}

/* ---- Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hud__blink,
  .cabinet__insert,
  .player__start-label {
    animation: blink 1.1s steps(2, jump-none) infinite;
  }

  .player__coin .coin {
    animation: coin-spin 2.8s linear infinite;
  }

  .player.is-inserting .player__coin {
    animation: coin-insert 0.45s ease-in forwards;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes coin-spin {
  to {
    rotate: y 360deg;
  }
}

@keyframes coin-insert {
  to {
    transform: translateY(-78px) scale(0.55, 0.12);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .discover-board .player__frame.is-leaving,
  .discover-board .player__frame.is-arriving,
  .discover-static.is-on,
  .review {
    animation: none;
  }

  .discover-board[data-state='tuning'] .discover-board__screen::after {
    display: none;
  }
}

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 1120px) {
  .portal,
  .game-layout,
  .submit {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal__side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .game-layout__side,
  .submit__side {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding-top: 36px;
  }

  .spotlight__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .lb {
    grid-template-columns: minmax(0, 1fr);
  }

  .lb__tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lb__tab {
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 60px 0;
  }

  /* Only the top bar stays pinned here; the section links move to the menu. */
  .discover-board {
    scroll-margin-top: calc(var(--header-h) + 8px);
  }

  .feed--related,
  .not-found .feed--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar__signin,
  .topbar__submit {
    display: none;
  }

  .topbar__icon {
    display: grid;
  }

  .topsearch {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: none;
    padding: 10px 16px 12px;
    background: var(--color-night);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topsearch > .icon {
    left: 30px;
  }

  .topbar.is-searching .topsearch {
    display: flex;
  }

  .topbar__inner {
    justify-content: space-between;
  }

  .subnav {
    display: none;
  }

  .topbar.is-open .subnav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: block;
    overflow-y: auto;
    background: var(--color-bg);
  }

  .topbar.is-open .subnav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: auto;
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .topbar.is-open .subnav__link {
    padding: 14px 8px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
  }

  .topbar.is-open .subnav__link[aria-current='page'] {
    color: var(--color-accent-strong);
  }

  .topbar.is-open .subnav__hud {
    display: none;
  }

  .topbar.is-open .subnav__mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
  }

  .slide {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 22px;
    padding: 20px;
  }

  .slide__shots {
    display: none;
  }

  .faq__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .game-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-head__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .player.has-panel .player__stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .player.has-panel .copilot {
    max-height: 280px;
    border-top: 2px solid var(--toy-ink);
    border-left: 0;
  }

  .site-footer__inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .about-steps,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .discover {
    padding: 18px 0 40px;
  }

  .discover__lede {
    font-size: 15px;
  }

  .discover-board__top {
    padding: 8px 10px 8px 14px;
  }

  .review {
    bottom: 10px;
    gap: 10px;
    padding: 16px 14px 12px;
  }

  .review__next {
    min-height: 54px;
    font-size: 13px;
  }

  .brand__name {
    font-size: 1.1rem;
  }

  .spotlight {
    padding: 24px 0 44px;
  }

  .spotlight__intro {
    text-align: center;
  }

  .spotlight__cta {
    justify-content: center;
  }

  .discover-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .spotlight .hud {
    gap: 8px 14px;
    font-size: 9px;
  }

  .slide {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .slide__cabinet {
    width: 150px;
  }

  .slide__kicker,
  .slide__meta,
  .slide__actions {
    justify-content: center;
  }

  .slide__tagline {
    font-size: 15px;
  }

  .portal {
    padding-top: 24px;
  }

  .feed-filters .feed-status {
    order: 5;
    flex-basis: 100%;
  }

  .feed-item {
    grid-template-columns: 40px 64px minmax(0, 1fr);
    grid-template-areas: 'vote thumb body';
    gap: 10px;
    padding: 12px 12px 12px 4px;
  }

  .feed-item__rank,
  .feed-item__play {
    display: none;
  }

  .feed-item__title {
    font-size: 17px;
  }

  .feed-item__tagline {
    font-size: 14px;
  }

  /* Phones: comments and save only, on one line. */
  .feed-item__stats .stat--minor {
    display: none;
  }

  /* Game stats scroll sideways in one row instead of stacking. */
  .statbar {
    flex-wrap: nowrap;
    margin-inline: -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .statbar::-webkit-scrollbar {
    display: none;
  }

  .statbar li {
    flex-shrink: 0;
  }

  .feed-item [data-share] {
    display: none;
  }

  .feed--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .feed--grid .feed-item {
    padding: 10px 10px 12px;
  }

  .feed--grid .feed-item__thumb {
    padding: 0 4px;
  }

  .feed--grid .feed-item__play {
    display: inline-flex;
    padding: 7px 11px;
  }

  .feed--grid .feed-item__tagline {
    display: none;
  }

  .feed--grid .vote__btn {
    width: 26px;
  }


  .portal__side,
  .game-layout__side,
  .submit__side {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .game-head > .vote--big {
    flex-direction: row;
    width: auto;
    padding: 4px 8px;
    justify-self: start;
    border-radius: 999px;
  }

  .game-head > .vote--big .vote__score {
    font-size: 18px;
  }

  .game-head > .vote--big .vote__label {
    display: none;
  }

  .game-head__actions .btn {
    flex: 1 1 auto;
  }

  .player {
    margin-left: -16px;
    margin-right: -16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .player__screen {
    height: calc(100vh - var(--header-h) - 120px);
    height: calc(100svh - var(--header-h) - 120px);
    min-height: 420px;
  }

  /* Landscape games get a taller box on a phone held upright, so the coin
     slot fits; the game itself asks to be rotated or opened full screen. */
  .player--landscape .player__screen {
    height: 360px;
    min-height: 0;
    aspect-ratio: auto;
  }

  .player--portrait .player__frame {
    width: 100%;
    aspect-ratio: auto;
  }

  .player__poster {
    gap: 10px;
  }

  .player__coin .coin {
    width: 76px;
    height: 76px;
  }

  .player__top {
    padding: 8px;
  }

  .modes__option {
    padding: 7px 9px;
    font-size: 12.5px;
  }

  .section-nav {
    margin-left: -16px;
    margin-right: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  /* Stack the controls table into cards. */
  .controls thead {
    display: none;
  }

  .controls tbody tr {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
  }

  .controls tbody th,
  .controls td {
    padding: 0;
    white-space: normal;
  }

  .controls td::before {
    content: attr(data-label) ': ';
    font-weight: 600;
    color: var(--color-text);
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board th:nth-child(4),
  .board td:nth-child(4),
  .board th:nth-child(5),
  .board td:nth-child(5) {
    display: none;
  }

  .repeater__head {
    display: none;
  }

  .repeater__row {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
  }

  .repeater__row input {
    grid-column: 1;
  }

  .repeater__row .icon-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .form-card {
    padding: 18px 16px 4px;
  }

  .submit-bar {
    bottom: 8px;
  }

  .submit-bar .btn {
    flex: 1 1 auto;
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox__frame {
    padding: 64px 12px 80px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 16px;
    translate: none;
  }
}
