@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Layout: chart-room console — dark naval steel, brass accents, mono catalogue codes */
:root {
  --bg: #eceee9;
  --surface: #ffffff;
  --sunk: #dfe3de;
  --line: #c8cfcb;
  --fg: #142027;
  --muted: #56646a;
  --accent: #86661c;
  --accent-ink: #ffffff;
  --live: #2f7a4f;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --maxw: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1317; --surface: #141c22; --sunk: #0a0f12; --line: #24313a;
    --fg: #e7e3d7; --muted: #8b989e; --accent: #cfa74c; --accent-ink: #11171b; --live: #5fbf86;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1317; --surface: #141c22; --sunk: #0a0f12; --line: #24313a;
  --fg: #e7e3d7; --muted: #8b989e; --accent: #cfa74c; --accent-ink: #11171b; --live: #5fbf86;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--body);
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand b {
  font-family: var(--display); font-weight: 800; font-size: 1.45rem;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1;
}
.brand b span { color: var(--accent); }
.site-nav { display: flex; gap: 18px; font-size: .9rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }

/* Hero */
.hero .wrap { padding-block: 44px 28px; display: grid; gap: 14px; }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: .92;
  text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; max-width: 14ch;
}
.hero p { margin: 0; max-width: 58ch; color: var(--muted); font-size: 1.08rem; }

/* Filter bar */
.toolbar .wrap {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding-block: 10px 22px;
}
.chip {
  font: 500 .85rem var(--body); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.search {
  margin-left: auto; min-width: 0; flex: 0 1 240px;
  font: .9rem var(--body); color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px;
}
@media (max-width: 560px) { .search { flex: 1 1 100%; margin-left: 0; } }

/* Grid */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  padding-bottom: 56px;
}
.card {
  display: grid; grid-template-rows: auto 1fr; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.card h3 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  line-height: 1.05; text-transform: uppercase; letter-spacing: .02em;
}
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 6px; }
.tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pill {
  font: 600 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap;
}
.pill.live { background: var(--live); color: var(--bg); }
.pill.soon { border: 1px dashed var(--line); color: var(--muted); }
.card.is-soon { opacity: .82; }

/* Generated thumbnail */
.thumb {
  position: relative; aspect-ratio: 16 / 10; max-width: 100%;
  background: var(--sunk); overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .plate {
  position: absolute; inset: 0; display: grid; align-content: space-between;
  padding: 12px 14px; color: #f1ead8;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, hsl(var(--h) 32% 26%), hsl(calc(var(--h) + 30) 28% 11%));
}
.plate .code { font: 500 .72rem var(--mono); letter-spacing: .14em; opacity: .75; }
.plate .mark {
  font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: .85;
  text-transform: uppercase; letter-spacing: .02em; opacity: .92;
}

/* Ad slots: paste ad code inside. Empty slots stay hidden. */
.ad-slot { margin: 0 auto 28px; text-align: center; }
.ad-slot:empty { display: none; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 22px 30px; }
.site-foot nav { display: flex; gap: 18px; }

/* Play page */
.player .wrap { padding-block: 24px 40px; display: grid; gap: 20px; }
.back { font-size: .88rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--fg); }
.player h1 {
  margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.4rem); line-height: .95; text-wrap: balance;
}
.stage {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: var(--ar, 16/9);
  max-height: 80vh; margin: 0 auto;
  background: #000; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 8px;
  text-align: center; color: #c9c3b3; padding: 24px;
}
.player-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 .92rem var(--body); text-decoration: none;
  padding: 10px 18px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:hover { filter: brightness(1.06); }
.book-box {
  display: grid; gap: 8px; padding: 18px 20px; border-left: 3px solid var(--accent);
  background: var(--surface);
}
.book-box h2 { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: 1.4rem; }
.book-box p { margin: 0; color: var(--muted); max-width: 60ch; }

/* Legal pages */
.legal .wrap { padding-block: 32px 56px; max-width: 760px; }
.legal h1 { font-family: var(--display); text-transform: uppercase; font-size: 2.4rem; margin: 0 0 16px; }
.legal p { max-width: 65ch; }
.todo { background: var(--sunk); border: 1px dashed var(--accent); padding: 2px 6px; font-family: var(--mono); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Game page extras */
.stage:fullscreen { max-height: none; border: 0; border-radius: 0; aspect-ratio: auto; }
.about-game { display: grid; gap: 10px; max-width: 70ch; }
.about-game h2, .more h2 { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: 1.6rem; letter-spacing: .02em; }
.about-game p { margin: 0; }
.controls-line { color: var(--muted); font-size: .92rem; max-width: 70ch; }
.more { display: grid; gap: 14px; padding-top: 12px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding-bottom: 0; }
.grid.small .card h3 { font-size: 1.1rem; }
.card .series-by { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.empty { color: var(--muted); }
.legal h2 { font-family: var(--display); text-transform: uppercase; font-size: 1.3rem; letter-spacing: .02em; margin: 26px 0 6px; }
.legal a { color: var(--accent); }
.mobile-only { display: none; }
@media (max-width: 760px) { .mobile-only { display: inline-flex; } .player .stage { max-height: none; } }
