/* Zebku platform styles. No build step: edit and ship. */

:root {
  --bg: #f3f5ff;
  --surface: #ffffff;
  --surface-2: #e8ebfb;
  --ink: #17163a;
  --ink-soft: #5d5c86;
  --line: #dce0f5;
  --cobalt: #2f4bff;
  --cobalt-ink: #ffffff;
  --sun: #ffc83d;
  --mint: #12b886;
  --pop: #ff4f8b;
  --stage: #17163a;
  --stripe-a: #17163a;
  --stripe-b: #ffffff;
  --shadow: 0 1px 0 rgba(23, 22, 58, .06), 0 8px 24px -12px rgba(23, 22, 58, .25);
  --radius-tile: 14px;
  --radius-panel: 22px;
  --font-display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --gutter: clamp(16px, 3vw, 32px);
  --max: 1360px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100f2b; --surface: #1b1a42; --surface-2: #25245a; --ink: #f1f2ff; --ink-soft: #aeadd9;
    --line: #2e2d66; --cobalt: #6b80ff; --cobalt-ink: #0d0c26; --stage: #08081c; --stripe-a: #f1f2ff; --stripe-b: #100f2b;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #100f2b; --surface: #1b1a42; --surface-2: #25245a; --ink: #f1f2ff; --ink-soft: #aeadd9;
  --line: #2e2d66; --cobalt: #6b80ff; --cobalt-ink: #0d0c26; --stage: #08081c; --stripe-a: #f1f2ff; --stripe-b: #100f2b;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; }
.brand-word { font: 800 26px/1 var(--font-display); letter-spacing: -0.04em; }
.search {
  flex: 1; max-width: 520px; margin-left: 12px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px;
  height: 44px; padding: 0 8px 0 16px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--ink); }
.search svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; height: 100%; }
.search input::placeholder { color: var(--ink-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 600 12px var(--font-body); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--cobalt); color: var(--cobalt-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-icon { width: 44px; padding: 0; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; }

/* Category rail */
.rail {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 10px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail a {
  flex-shrink: 0; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; gap: 7px;
}
.rail a:hover { border-color: var(--ink); }
.rail a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.c-cobalt { --c: var(--cobalt); } .c-pop { --c: var(--pop); } .c-mint { --c: var(--mint); } .c-sun { --c: var(--sun); }
.dot { background: var(--c, var(--ink-soft)); }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 56px; }
main:focus { outline: none; }
.view-enter { animation: enter .18s ease-out; }
/* Opacity only: a transform here would turn <main> into the containing block for the
   position:fixed immersive player and misplace it while the animation runs. */
@keyframes enter { from { opacity: 0; } }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.page-head { margin: 8px 0 22px; max-width: 760px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.page-head p { color: var(--ink-soft); margin: 8px 0 0; font-size: 17px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px;
  margin-bottom: 40px;
}
.hero-main {
  position: relative; border-radius: var(--radius-panel); overflow: hidden;
  background: var(--stage); color: #fff; min-height: 360px;
  display: flex; align-items: flex-end; text-decoration: none; isolation: isolate;
}
.hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s ease; }
.hero-main:hover img { transform: scale(1.03); }
.hero-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(23, 22, 58, .94) 0%, rgba(23, 22, 58, .78) 38%, rgba(23, 22, 58, 0) 72%);
}
.hero-main::after {
  /* The Zebku stripe band: the one decorative signature on the page. */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: repeating-linear-gradient(-55deg, #17163a 0 14px, #ffffff 14px 28px);
}
.hero-copy { padding: 28px; max-width: 560px; }
.hero-copy .kicker { font-weight: 800; font-size: 15px; color: var(--sun); }
.hero-copy h2 { font-size: clamp(38px, 5.6vw, 72px); font-weight: 800; margin: 6px 0 10px; letter-spacing: -0.045em; line-height: .95; }
.hero-copy p { margin: 0 0 18px; color: #dfe1ff; font-size: 17px; }
.hero-copy .btn-primary { background: var(--sun); color: #17163a; }
.hero-side { display: grid; grid-template-rows: auto 1fr 1fr; gap: 16px; }
.hero-pitch {
  background: var(--surface); border-radius: var(--radius-panel); padding: 20px 22px; border: 2px solid var(--line);
}
.hero-pitch h1 { font-size: 26px; font-weight: 800; }
.hero-pitch p { margin: 6px 0 0; color: var(--ink-soft); }
.hero-mini { position: relative; border-radius: var(--radius-panel); overflow: hidden; text-decoration: none; min-height: 140px; display: flex; align-items: flex-end; isolation: isolate; color: #fff; background: var(--stage); }
.hero-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-mini::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(23, 22, 58, .85)); }
.hero-mini span { padding: 14px 16px; font: 800 22px/1.1 var(--font-display); letter-spacing: -0.02em; }

/* ---------- Shelves & tiles ---------- */
.shelf { margin-bottom: 40px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shelf-head h2 { font-size: 26px; font-weight: 800; }
.shelf-head a { font-weight: 700; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.shelf-head a:hover { color: var(--ink); text-decoration: underline; }
.grid {
  display: grid; gap: 18px 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 230px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin;
}
.row-scroll > * { scroll-snap-align: start; }
.tile { text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.tile-art {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-tile); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover .tile-art { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--ink), var(--shadow); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-art { box-shadow: 0 0 0 4px var(--cobalt); }
.tile-name { font-weight: 700; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { font-size: 13px; color: var(--ink-soft); margin-top: -6px; }
.badge {
  position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 800;
  background: var(--sun); color: #17163a; border-radius: 999px; padding: 2px 9px;
}
.fav-pin {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--pop); display: grid; place-items: center;
}
.fav-pin svg { width: 16px; height: 16px; }

/* ---------- Game page ---------- */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.stage {
  --r: 1.7778;
  position: relative; background: var(--stage); border-radius: var(--radius-panel); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; min-height: 280px;
}
.stage::before {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background: repeating-linear-gradient(-55deg, #fff 0 22px, transparent 22px 44px);
}
.frame-box {
  position: relative; z-index: 1;
  width: min(100%, calc((100vh - var(--header-h) - 190px) * var(--r)));
  aspect-ratio: var(--r);
  min-height: 240px;
  border-radius: 12px; overflow: hidden; background: #000;
}
.frame-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: #fff; text-align: center; padding: 20px; isolation: isolate; border: 0; width: 100%; background: #000;
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(1.1); }
.poster::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(23, 22, 58, .55); }
.poster h1 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.play-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 30px; border-radius: 999px;
  background: var(--sun); color: #17163a; font: 800 20px var(--font-display); border: 0;
  box-shadow: 0 6px 0 #c99412;
}
.play-btn:hover { transform: translateY(-1px); }
.play-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #c99412; }
.play-btn svg { width: 22px; height: 22px; }
.loader { position: absolute; inset: 0; display: grid; place-items: center; background: var(--stage); color: #fff; z-index: 2; font-weight: 700; }
.loader[hidden] { display: none; }
.loader-bar { width: 160px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-top: 12px; }
.loader-bar span { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(-55deg, #fff 0 8px, #ffc83d 8px 16px); animation: slide 1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.exit-btn { display: none; }

.game-bar { display: flex; align-items: center; gap: 12px; padding: 14px 4px 0; flex-wrap: wrap; }
.game-bar h1 { font-size: 28px; font-weight: 800; }
.game-bar .by { color: var(--ink-soft); font-size: 14px; }
.game-bar .tools { margin-left: auto; display: flex; gap: 8px; }
.game-bar .btn[aria-pressed="true"] { color: var(--pop); border-color: var(--pop); }
.game-bar .btn[aria-pressed="true"] svg { fill: currentColor; }

.about { margin-top: 26px; display: grid; gap: 22px; max-width: 760px; }
.about h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.about p { margin: 0; color: var(--ink-soft); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
a.pill:hover { border-color: var(--ink); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 15px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--ink-soft); }
.side h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.side .grid { grid-template-columns: 1fr 1fr; gap: 14px 12px; }

/* Immersive mode: fills the viewport on phones, and is the fallback where the Fullscreen API is missing (iOS). */
.stage.immersive {
  position: fixed; inset: 0; z-index: 60; border-radius: 0; padding: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.stage.immersive .frame-box { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; min-height: 0; }
.stage:fullscreen { border-radius: 0; padding: 0; }
.stage:fullscreen .frame-box { width: min(100vw, calc(100vh * var(--r))); max-height: 100vh; border-radius: 0; }
.stage.immersive .exit-btn, .stage:fullscreen .exit-btn {
  display: inline-flex; position: absolute; z-index: 3; top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right));
  height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(23, 22, 58, .8); color: #fff; font-weight: 700; font-size: 14px;
  align-items: center; gap: 6px;
}
.exit-btn svg { width: 16px; height: 16px; }

/* Hint for landscape games on a portrait phone */
.rotate-hint {
  position: absolute; z-index: 3; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(23, 22, 58, .88); color: #fff; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: none; transition: opacity .4s;
}
.rotate-hint svg { width: 18px; height: 18px; }
.rotate-hint.gone { opacity: 0; }

/* ---------- Ads (rendered only when ads.js readiness passes) ---------- */
/* Fixed placements, clearly labelled, visually separate from game UI and buttons. */
.ad-slot { display: block; margin: 40px 0; padding-top: 4px; border-top: 1px solid var(--line); }
.ad-slot[hidden] { display: none; }
.ad-label { display: block; font-size: 11px; color: var(--ink-soft); margin: 6px 0 6px; }
.ad-body { min-height: 90px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-soft); font-size: 12px; }
.game-layout .ad-slot { margin-top: 48px; }

/* ---------- Empty, prose, footer ---------- */
.empty {
  border: 2px dashed var(--line); border-radius: var(--radius-panel); padding: 40px 24px; text-align: center;
  display: grid; justify-items: center; gap: 10px;
}
.empty h2 { font-size: 26px; font-weight: 800; }
.empty p { margin: 0 0 6px; color: var(--ink-soft); max-width: 46ch; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; margin-bottom: 14px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose li { margin-bottom: 6px; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose pre { background: var(--surface); border: 2px solid var(--line); padding: 14px; border-radius: 12px; overflow-x: auto; font-size: 14px; }
.prose .note { background: var(--surface); border-left: 6px solid var(--sun); padding: 12px 16px; border-radius: 8px; }

.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 36px;
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; font-size: 14px; color: var(--ink-soft);
}
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; font-weight: 600; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; }
.footer-inner .brand-word { font-size: 20px; color: var(--ink); }
.footer-inner .legal { margin-left: auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: var(--bg); font-weight: 700; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .game-layout { grid-template-columns: 1fr; }
  .side .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-main { min-height: 320px; }
  .hero-side { grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
  .hero-pitch { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --header-h: 58px; }
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .brand-word { font-size: 23px; }
  .brand img { width: 32px; height: 32px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; height: 42px; }
  .search kbd { display: none; }
  .btn-surprise span { display: none; }
  .btn-surprise { width: 44px; padding: 0; }
  main { padding-top: 18px; }
  .hero-main { min-height: 340px; }
  .hero-main img { object-position: 70% 30%; }
  .hero-main::before { background: linear-gradient(180deg, rgba(23, 22, 58, 0) 15%, rgba(23, 22, 58, .9) 55%, rgba(23, 22, 58, .96) 100%); }
  .hero-copy { padding: 22px 18px; }
  .hero-copy p { font-size: 15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .row-scroll { grid-auto-columns: 44%; }
  .shelf-head h2 { font-size: 22px; }
  .stage { padding: 0; border-radius: 16px; min-height: 0; }
  .frame-box { width: 100%; border-radius: 0; min-height: 0; max-height: 70vh; }
  .game-bar h1 { font-size: 24px; }
  .game-bar .tools { margin-left: 0; width: 100%; }
  .footer-inner .legal { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Phase 2: content, credits, stats ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.about section > p + p { margin-top: 10px; }
.tips { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.tips li { margin-bottom: 4px; }
.intro-copy { max-width: 760px; margin: 8px 0 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.intro-copy h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.intro-copy p { color: var(--ink-soft); margin: 0 0 10px; }
.tbc { font-style: italic; color: var(--ink-soft); }
.note.draft { border-left-color: var(--pop); }
.noscript { padding: 16px; border: 2px solid var(--line); border-radius: 12px; }
.table-wrap { overflow-x: auto; margin: 10px 0 20px; }
table.credits, table.stats-table { width: 100%; border-collapse: collapse; font-size: 15px; }
table.credits th, table.credits td, table.stats-table th, table.stats-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.credits th, table.stats-table th { font-weight: 700; font-size: 13px; color: var(--ink-soft); }
table.credits td { color: var(--ink-soft); }
table.credits td:first-child a { font-weight: 700; color: var(--ink); }
.stats-login { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 520px; }
.stats-login label { width: 100%; font-weight: 700; }
.stats-login input { flex: 1; min-width: 200px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 0 14px; }
.stats-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat b { display: block; font: 800 30px/1.1 var(--font-display); }
.stat span { color: var(--ink-soft); font-size: 14px; }
#stats-app h2 { font-size: 22px; font-weight: 800; margin: 18px 0 4px; }
.bar-cell { width: 40%; }
.bar { display: block; height: 10px; width: var(--w); border-radius: 99px; background: var(--cobalt); }
.muted { color: var(--ink-soft); font-size: 14px; }
table.credits td:first-child { white-space: nowrap; }
