/* Extras — mobile nav, search dropdown, tweaks panel, home, browse, game, etc. */

/* Ensure [hidden] attribute wins over any display rule in this sheet */
[hidden] { display: none !important; }

body { overflow-x: hidden; }

/* Game canvas pre-play thumbnail */
.game-canvas__art--thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.game-canvas__art--thumb span { display: none; }

/* ---------------- MOBILE NAV ---------------- */
.mobile-nav {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease, padding 220ms ease;
  border-top: 1px solid transparent;
  background: var(--bg-raised);
  padding: 0;
}
.mobile-nav.is-open {
  max-height: 320px;
  padding: 12px 0;
  border-top-color: var(--border);
}
.mobile-nav .container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav a {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--text);
}
.mobile-nav a:hover { background: var(--bg-sunken); }
.mobile-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------------- SEARCH DROPDOWN ---------------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
  max-height: 70vh;
  overflow: auto;
}
.sdd__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--r-sm);
}
.sdd__item:hover { background: var(--bg-sunken); }
.sdd__thumb {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: white;
  font-weight: 800;
  font-family: var(--font-display);
  flex: none;
}
.sdd__info { display: flex; flex-direction: column; line-height: 1.3; }
.sdd__info small { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.sdd__empty { padding: 16px; color: var(--text-muted); font-size: 14px; }
.sdd__more {
  display: block;
  padding: 10px 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------------- TWEAKS PANEL ---------------- */
.tweaks-panel {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 320px;
  max-height: calc(100vh - 40px);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tweaks-panel__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks-panel__head strong { font-family: var(--font-display); font-size: 18px; display: block; }
.tweaks-panel__head small { color: var(--text-muted); font-size: 12px; }
.tweaks-panel__close {
  width: 28px; height: 28px;
  border: none; background: var(--bg-sunken);
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: var(--text-muted);
}
.tweaks-panel__body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.tweak-group label {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 8px;
}
.tweak-value { color: var(--text); font-family: var(--font-mono); text-transform: none; letter-spacing: 0; }
.swatch-row { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.swatch.is-active { border-color: var(--text); transform: scale(1.12); box-shadow: var(--shadow-md); }
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: var(--r-sm);
  gap: 2px;
}
.seg button {
  padding: 7px 10px;
  border: none; background: transparent;
  border-radius: calc(var(--r-sm) - 3px);
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
}
.seg button.is-active { background: var(--surface-1); color: var(--text); box-shadow: var(--shadow-sm); }
.tweak-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--text-dim); line-height: 1.4; }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ---------------- HERO CAROUSEL (home) ---------------- */
.hero {
  margin-top: var(--sp-6);
  position: relative;
}
.hero__viewport {
  border-radius: var(--r-2xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/6;
  min-height: 320px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 720px) {
  .hero__viewport { aspect-ratio: 4/5; min-height: 420px; }
  .hero__art-glyph { font-size: clamp(60px, 12vw, 120px); }
}
@media (max-width: 640px) {
  .hero__slide { grid-template-columns: 1fr; }
  .hero__art { display: none; }
}
.hero__track {
  display: flex;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  height: 100%;
}
.hero__slide {
  flex: 0 0 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: clamp(24px, 4vw, 56px);
  color: white;
  overflow: hidden;
}
@media (max-width: 720px) {
  .hero__slide { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
}
.hero__slide::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 100%, rgba(0,0,0,0.55) 0, transparent 60%),
              linear-gradient(135deg, rgba(0,0,0,0.2), rgba(0,0,0,0.05));
  pointer-events: none;
}
.hero__copy { position: relative; z-index: 1; max-width: 520px; }
.hero__eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  color: white;
}
.hero__sub {
  font-size: clamp(15px, 1.4vw, 18px);
  opacity: 0.92;
  margin-bottom: 28px;
  max-width: 44ch;
}
.hero__cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero__art {
  position: relative; z-index: 1;
  display: grid; place-items: center;
}
.hero__art-disk {
  width: min(340px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.3), transparent 60%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4), inset 0 0 80px rgba(0,0,0,0.2);
  position: relative;
  transform: rotate(-8deg);
}
.hero__art-glyph {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 15vw, 180px);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 8px 40px rgba(0,0,0,0.3);
  letter-spacing: -0.06em;
}
.hero__dots {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
}
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  transition: all .2s;
  padding: 0;
}
.hero__dot.is-active { background: white; width: 24px; border-radius: 999px; }
.hero__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border: none; border-radius: 50%;
  display: grid; place-items: center;
  z-index: 2;
  box-shadow: var(--shadow-md);
}
.hero__arrow:hover { background: white; }
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }
@media (max-width: 720px) { .hero__arrow { display: none; } }

/* ---------------- CATEGORY CARDS ---------------- */
.cat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow-tile);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-card__emoji { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.cat-card__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.cat-card__count { font-size: 11px; opacity: 0.85; font-weight: 500; }

/* ---------------- HOME TOP LAYOUT (hero + sidebar ad) ---------------- */
.home-top {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: stretch;
  margin-top: var(--sp-6);
}
@media (max-width: 1080px) {
  .home-top { grid-template-columns: 1fr; }
  .home-top .ad-slot--rect { max-width: none; aspect-ratio: auto; min-height: 120px; }
}
.home-top .hero { margin-top: 0; min-width: 0; }
.home-top .hero__viewport { width: 100%; }

/* ---------------- BROWSE ---------------- */
.browse-head {
  padding: var(--sp-10) 0 var(--sp-6);
  text-align: center;
}
.browse-head h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  margin-bottom: 10px;
}
.browse-head p { color: var(--text-muted); font-size: 17px; max-width: 56ch; margin: 0 auto; }

.browse-layout {
  display: grid;
  gap: 28px;
  align-items: start;
}
body[data-nav-style="pills"]    .browse-layout { grid-template-columns: 1fr; }
body[data-nav-style="sidebar"]  .browse-layout { grid-template-columns: 220px 1fr; }
body[data-nav-style="mega"]     .browse-layout { grid-template-columns: 1fr; }
@media (max-width: 820px) {
  body[data-nav-style="sidebar"] .browse-layout { grid-template-columns: 1fr; }
}

.cat-sidebar { position: sticky; top: 88px; }
.cat-sidebar ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-sidebar a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
}
.cat-sidebar a:hover { background: var(--bg-sunken); color: var(--text); }
.cat-sidebar a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.cat-sidebar__count { font-size: 11px; opacity: 0.6; font-weight: 500; }

body[data-nav-style="pills"] .cat-sidebar,
body[data-nav-style="mega"]  .cat-sidebar { display: none; }
body[data-nav-style="sidebar"] .cat-pills-host,
body[data-nav-style="mega"]    .cat-pills-host { display: none; }
body[data-nav-style="pills"] .cat-mega-host,
body[data-nav-style="sidebar"] .cat-mega-host { display: none; }

.cat-mega {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: var(--sp-6);
}

/* ---------------- GAME PAGE ---------------- */
/* Base rules must come before the media query so the mobile override wins */
.ad-top-wrap {
  margin-bottom: 0; /* title bar fills the gap; game-layout's 24px margin-top creates the ad→title-bar clearance */
}
.ad-bottom-wrap {
  margin: var(--sp-8) 0;
}
.ad-slot--mobile-banner {
  display: none;
  min-height: 50px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 150px; /* maps 1:1 to DOM → exactly 150px gap between game canvas and sidebar */
  row-gap: 28px;
  align-items: start;
  margin-top: var(--sp-6);
}
@media (max-width: 980px) {
  .game-layout {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  .game-sidebar { display: none; }
  .ad-slot--mobile-banner { display: grid; margin-top: var(--sp-8); }
  .ad-top-wrap { margin-bottom: 0; }
}
/* Game title bar — sits between the top ad and the game canvas, filling the safe-zone gap */
.game-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0 var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: 52px; /* 24px (ad→title collapse) + ~74px (bar height) + 52px = ~150px ad→canvas */
}
.game-title-bar__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}
.game-title-bar__sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.game-title-bar__sub a { color: var(--accent); font-weight: 600; text-decoration: none; }
.game-title-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.game-title-bar__stat {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.game-title-bar__stat strong { color: var(--text); font-weight: 700; }
.icon-btn[data-active] { color: var(--accent); border-color: var(--accent); background: var(--bg-sunken); }
.icon-btn[data-active] svg { fill: var(--accent); }
@media (max-width: 620px) {
  .game-title-bar {
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: 12px; /* title bar ~114px tall when wrapped: 24+114+12 ≈ 150px ad→canvas */
  }
  .game-title-bar__stat { display: none; }
}

.game-stage {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
/* CSS fullscreen fallback — used on iOS Safari where the Fullscreen API
   is not available for iframes. Mimics native fullscreen with position:fixed. */
.game-canvas.is-css-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
}
.game-canvas.is-css-fullscreen .game-canvas__iframe {
  width: 100% !important;
  height: 100% !important;
}
/* Close button — only visible in CSS fullscreen mode */
.game-canvas__fs-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 9001;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.game-canvas__fs-close:hover { background: rgba(0, 0, 0, 0.85); }
.game-canvas.is-css-fullscreen .game-canvas__fs-close { display: flex; }

/* Back button — bottom-left of CSS fullscreen overlay */
.game-canvas__fs-back {
  display: none;
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 9001;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: #fff;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.game-canvas__fs-back:hover { background: rgba(0, 0, 0, 0.85); }
.game-canvas.is-css-fullscreen .game-canvas__fs-back { display: flex; }

/* Prevent body scroll while CSS fullscreen is active */
body.fs-lock { overflow: hidden; }

.game-canvas {
  position: relative;
  aspect-ratio: 16/10;
  background: #0a0816;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.game-canvas__art {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 16vw, 200px);
  color: rgba(255,255,255,0.98);
  text-shadow: 0 12px 40px rgba(0,0,0,0.4);
  letter-spacing: -0.06em;
}
/* Dark scrim behind the play button */
.game-canvas__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  transition: opacity .2s ease;
}
.game-canvas.is-playing .game-canvas__art::after,
.game-canvas.is-loading .game-canvas__art::after { opacity: 0; pointer-events: none; }

.game-canvas__play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.game-canvas__play:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.game-canvas__play::before { display: none; }

.game-canvas.is-loading .game-canvas__play { display: none; }
.game-canvas.is-loading::after {
  content: "Loading game…";
  position: absolute;
  color: white;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  z-index: 3;
  text-transform: uppercase;
  animation: pulse 1.2s ease infinite;
}
.game-canvas.is-playing .game-canvas__play { display: none; }
.game-canvas.is-playing::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 4px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
  z-index: 1;
}
.game-canvas.is-playing .game-canvas__playing-label {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(0,0,0,0.6); color: white;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  z-index: 3;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Real iframe embed */
.game-canvas__iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
  background: #000;
  z-index: 2;
}
.game-canvas.is-playing .game-canvas__iframe { display: block; }

/* Loader overlay */
.game-canvas__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  z-index: 3;
}
.game-canvas__spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Embed error / external fallback */
.game-canvas__embed-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-sunken);
  padding: 24px;
  z-index: 3;
}
.game-canvas__embed-error p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.btn-play-external {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  transition: opacity .15s;
}
.btn-play-external:hover { opacity: 0.88; color: #fff; }

/* Open-in-new-tab bar shown when game loads or when embed fails */
.game-canvas__open-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  z-index: 4;
}
.game-canvas__open-bar.is-prominent {
  inset: 0;
  flex-direction: column;
  gap: 12px;
  background: rgba(10, 8, 22, 0.92);
}
.game-canvas__open-bar.is-prominent::before {
  content: "This game opens on its official site";
  font-size: 13px;
  color: var(--text-muted);
}
.btn-open-external {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 14px;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn-open-external:hover { opacity: 0.88; color: #fff; }
.game-canvas__open-bar:not(.is-prominent) .btn-open-external {
  padding: 7px 16px;
  font-size: 12px;
  background: rgba(255,255,255,0.15);
}

/* External-only play link (no iframe available) */
.game-canvas__play--external {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative; z-index: 2;
  padding: 22px 44px;
  background: white;
  color: #1a0b52;
  border-radius: var(--r-pill);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform .15s ease;
}
.game-canvas__play--external:hover { transform: scale(1.04); color: #1a0b52; }

.game-toolbar {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.game-toolbar__left { display: flex; gap: 10px; }
.game-toolbar__btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--bg-sunken);
  border: none; color: var(--text-muted);
  display: grid; place-items: center;
}
.game-toolbar__btn:hover { color: var(--text); background: var(--bg-inset); }

.game-body {
  margin-top: var(--sp-8);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}
@media (max-width: 820px) { .game-body { grid-template-columns: 1fr; } }
.game-body h3 {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.game-body p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.game-info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.game-info-list li { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.game-info-list li:last-child { border-bottom: none; }
.game-info-list li span:first-child { color: var(--text-muted); }
.game-info-list li strong { color: var(--text); font-weight: 600; }

.game-sidebar { display: none; }
@media (min-width: 981px) {
  .game-sidebar { display: flex; flex-direction: column; gap: 20px; }
}
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px;
  border-radius: var(--r-sm);
}
.related-item:hover { background: var(--bg-sunken); }
.related-item__thumb {
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  flex: none;
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
}
.related-item__info strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.related-item__info small { color: var(--text-muted); font-size: 12px; }

/* ---------------- PAGE TITLES (legal, search, 404) ---------------- */
.page-head {
  padding: var(--sp-10) 0 var(--sp-6);
  text-align: left;
}
.page-head h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}
.page-head p { color: var(--text-muted); font-size: 18px; max-width: 60ch; }
.legal-prose {
  max-width: 70ch;
  padding: var(--sp-6) 0 var(--sp-12);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-muted);
}
.legal-prose h2 {
  margin-top: var(--sp-8);
  margin-bottom: 12px;
  font-size: 24px;
  color: var(--text);
}
.legal-prose strong { color: var(--text); }
.legal-prose a { color: var(--accent); font-weight: 600; }
.legal-prose blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  color: var(--text);
  font-style: italic;
}

/* ---------------- CONTACT ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: var(--sp-12);
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.form-field textarea { min-height: 140px; resize: vertical; font-family: inherit; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Form validation errors */
.form-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #e55;
  font-weight: 600;
}

/* ---------------- ABOUT / STATS ---------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: var(--sp-8) 0;
}
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr 1fr; } }
.stat {
  padding: 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 44px; letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* ---------------- 404 ---------------- */
.err-404 {
  padding: var(--sp-16) 0;
  text-align: center;
}
.err-404 .big {
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 260px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--accent), var(--accent-pink, #ff5ea8));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  margin-bottom: 12px;
}
.err-404 h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.err-404 p { color: var(--text-muted); max-width: 50ch; margin: 0 auto var(--sp-6); font-size: 16px; }

/* ---------------- SEARCH ---------------- */
.search-head { padding: var(--sp-8) 0 var(--sp-4); }
.search-head h1 { font-size: clamp(28px, 3.6vw, 40px); }
.search-head p { color: var(--text-muted); margin-top: 4px; }
.search-empty {
  padding: var(--sp-12);
  text-align: center;
  background: var(--bg-sunken);
  border-radius: var(--r-xl);
}
.search-empty h3 { font-size: 22px; margin-bottom: 6px; }
.search-empty p { color: var(--text-muted); margin-bottom: var(--sp-6); }

/* ---------------- COOKIE BANNER ---------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner__text {
  flex: 1;
  min-width: 240px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cookie-banner__btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner__decline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.cookie-banner__decline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
@media (max-width: 600px) {
  .cookie-banner__inner {
    padding: 12px 16px;
    gap: 12px;
  }
  .cookie-banner__btns {
    width: 100%;
    justify-content: flex-end;
  }
}
