:root {
  --bg: #0d1015;
  --panel: #141920;
  --panel-2: #1a2029;
  --panel-3: #212935;
  --line: #262e3a;
  --line-2: #323c4b;
  --text: #e7eaf0;
  --text-2: #b9c1cd;
  --muted: #7e8898;
  --accent: #3ddc97;
  --accent-ink: #062418;
  --accent-soft: rgba(61, 220, 151, 0.12);
  --amber: #f5b942;
  --amber-soft: rgba(245, 185, 66, 0.13);
  --blue: #6aa8ff;
  --blue-soft: rgba(106, 168, 255, 0.13);
  --violet: #b28dff;
  --violet-soft: rgba(178, 141, 255, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.13);
  --gray-soft: rgba(126, 136, 152, 0.16);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --panel-2: #f6f8fb;
    --panel-3: #edf1f6;
    --line: #e2e7ee;
    --line-2: #d3dae4;
    --text: #141a22;
    --text-2: #3c4654;
    --muted: #6b7584;
    --accent: #0f9d63;
    --accent-ink: #ffffff;
    --accent-soft: rgba(15, 157, 99, 0.1);
    --amber: #b7790b;
    --amber-soft: rgba(183, 121, 11, 0.1);
    --blue: #2f6fd6;
    --blue-soft: rgba(47, 111, 214, 0.1);
    --violet: #7a4fd8;
    --violet-soft: rgba(122, 79, 216, 0.1);
    --red: #d64545;
    --red-soft: rgba(214, 69, 69, 0.1);
    --gray-soft: rgba(107, 117, 132, 0.12);
    --shadow: 0 10px 30px rgba(20, 30, 50, 0.12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; padding-left: 20px; }
li { margin: 3px 0; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
button { font: inherit; color: inherit; }
input, select { font: inherit; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.boot, .loading { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- buttons, badges, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--panel-3); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.wide { width: 100%; }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--gray-soft); color: var(--text-2);
}
.status.s-teased { background: var(--violet-soft); color: var(--violet); }
.status.s-demo { background: var(--accent-soft); color: var(--accent); }
.status.s-upcoming { background: var(--blue-soft); color: var(--blue); }
.status.s-new-release { background: var(--amber-soft); color: var(--amber); }
.verdict { text-transform: uppercase; }
.verdict.v-build-now { background: var(--accent); color: var(--accent-ink); }
.verdict.v-remix { background: var(--amber); color: #2a1c00; }
.verdict.v-watch { background: var(--blue); color: #04142e; }
.verdict.v-skip { background: var(--gray-soft); color: var(--muted); }
.badge.lead { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.role-master { background: var(--accent-soft); color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 4px; border-radius: 3px;
  font-size: 9.5px; font-weight: 750; letter-spacing: 0.06em; vertical-align: middle; cursor: help;
}
.pill-fact { background: var(--blue-soft); color: var(--blue); }
.pill-estimate { border: 1px solid var(--amber); color: var(--amber); }
.pill-ai { background: var(--violet-soft); color: var(--violet); }

.trend { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.t-rising { color: var(--accent); }
.t-falling { color: var(--red); }
.t-steady { color: var(--muted); }
.t-new { color: var(--violet); }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--panel-3);
  color: var(--text-2); font-size: 12px; margin: 0 4px 4px 0;
}
.tag.link:hover { background: var(--line-2); text-decoration: none; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 28px 22px; box-shadow: var(--shadow);
}
.login-mark { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; margin-bottom: 4px; }
.login-mark .logo { width: 28px; height: 28px; color: var(--accent); }
.login-sub { color: var(--muted); margin-bottom: 18px; }
.login-card input {
  width: 100%; height: 42px; padding: 0 12px; margin-bottom: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--panel-2); font-family: var(--mono); font-size: 13.5px;
}
.login-card input:focus, .search:focus, select:focus, .key-create input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent;
}
.login-msg { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.login-msg.bad { color: var(--red); }
.login-foot { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  height: 56px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 750; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 24px; height: 24px; color: var(--accent); }
.tabs { display: flex; gap: 2px; }
.tab {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 550; white-space: nowrap;
}
.tab:hover { background: var(--panel-2); text-decoration: none; }
.tab.active { background: var(--panel-3); color: var(--text); }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 6px; font-size: 11px; font-weight: 750; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.scan-day { color: var(--muted); font-size: 12.5px; }
.run-warn { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); cursor: help; white-space: nowrap; }
.run-warn.bad { background: var(--red-soft); color: var(--red); }
.who { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.role { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 4px; }

.main { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- list layout ---------- */
.games-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.filters {
  position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.f-group { display: flex; flex-direction: column; gap: 7px; }
.f-label { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.range-val { color: var(--text); text-transform: none; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 12.5px;
}
.chip.on { background: var(--panel-3); border-color: var(--text-2); color: var(--text); }
.filters select, .sort select {
  height: 32px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel-2);
}
.filters input[type=range] { accent-color: var(--accent); width: 100%; }
.toggle { display: flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }
.toggle input { accent-color: var(--accent); }
.legend { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .pill { margin: 0 4px 0 0; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 750; margin-right: 6px; }
.search {
  flex: 1; min-width: 200px; height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--panel);
}
.result-count { color: var(--muted); font-size: 12.5px; }
.sort { margin-left: auto; color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.filter-toggle { display: none; }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 164px minmax(0, 1fr) 76px 40px; gap: 16px; align-items: center;
  padding: 10px 12px 10px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.row:hover, .row:focus-visible { border-color: var(--line-2); background: var(--panel-2); outline: none; }
.row.starred { border-left: 3px solid var(--accent); }
.row.rejected { opacity: 0.5; }
.thumb { width: 164px; aspect-ratio: 460 / 215; border-radius: var(--radius-sm); overflow: hidden; background: var(--panel-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--muted); }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.row-title h3 { font-size: 15.5px; font-weight: 700; }
.why {
  color: var(--text-2); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.meta span { white-space: nowrap; }
.rb-none { color: var(--accent); }
.rb-crowded { color: var(--red); }
.rb-validated { color: var(--amber); }

.score { text-align: center; }
.score-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.score-label { font-size: 11px; color: var(--muted); }
.sc-hi .score-num, .sc-hi .hs-num { color: var(--accent); }
.sc-mid .score-num, .sc-mid .hs-num { color: var(--amber); }
.sc-lo .score-num, .sc-lo .hs-num, .sc-none .score-num { color: var(--muted); }

.row-actions { display: flex; flex-direction: column; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.icon-btn.on.star { color: var(--accent); border-color: var(--accent); }
.icon-btn.on.rej { color: var(--red); border-color: var(--red); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.list-only { max-width: 1080px; margin: 0 auto; }

/* ---------- detail ---------- */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 550; }
.hero { margin-bottom: 18px; }
.hero-grid {
  display: grid; grid-template-columns: 340px minmax(0, 1fr) 150px; gap: 22px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.hero-img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 8px; background: var(--panel-3); display: block; }
.hero-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.hero-info h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.hero-why { color: var(--text-2); font-size: 14.5px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.hero-score { text-align: center; padding: 14px 8px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.hs-num { font-size: 46px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.hs-label { font-size: 12px; font-weight: 650; color: var(--text-2); margin-top: 6px; }
.hs-src { font-size: 12px; color: var(--muted); margin-top: 4px; }

.detail-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.section-nav { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 2px; }
.section-nav a { padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; }
.section-nav a:hover { background: var(--panel-2); text-decoration: none; }
.sections { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; scroll-margin-top: 74px; }
.panel h2 { font-size: 16px; font-weight: 750; margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }
.panel h4 { font-size: 13px; font-weight: 700; margin: 14px 0 8px; color: var(--text-2); }
.lead-text { font-size: 15px; color: var(--text); }
.store-desc { color: var(--text-2); font-style: italic; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.kv { background: var(--panel-2); border-radius: var(--radius-sm); padding: 9px 11px; min-width: 0; }
.kv .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 650; }
.kv .v { font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.tags { margin-top: 6px; }
.window-note { background: var(--amber-soft); border-radius: var(--radius-sm); padding: 9px 12px; margin: 0 0 12px; color: var(--text); }

.translation { margin-top: 10px; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 22px; }
.tr-item { display: grid; grid-template-columns: 1fr auto 34px; gap: 10px; align-items: center; font-size: 13px; }
.tr-label { color: var(--text-2); }
.tr-bar { display: flex; gap: 3px; }
.tr-bar i, .dots i { display: block; width: 18px; height: 7px; border-radius: 2px; background: var(--panel-3); }
.tr-bar i.on { background: var(--accent); }
.tr-val { color: var(--muted); font-size: 12px; text-align: right; }

.loop-steps { counter-reset: s; list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.loop-steps li {
  counter-increment: s; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 7px 11px 7px 8px; margin: 0; display: flex; gap: 8px; align-items: baseline;
}
.loop-steps li::before { content: counter(s); font-weight: 800; color: var(--accent); font-size: 12px; }
.callout { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 4px 14px 2px; margin-top: 12px; }
.callout h4 { color: var(--accent); }

.evidence, .posts-mini, .sources, .reddit { list-style: none; padding: 0; }
.evidence li, .posts-mini li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.evidence li:last-child, .posts-mini li:last-child { border-bottom: 0; }
.evidence .pill { margin: 0 6px 0 0; }
.plat { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 3px; background: var(--panel-3); color: var(--text-2); }
.plat-x { background: var(--text); color: var(--bg); }
.plat-bluesky { background: var(--blue-soft); color: var(--blue); }

.history { margin-top: 6px; }
.spark-row { display: grid; grid-template-columns: 170px 150px 1fr; gap: 12px; align-items: center; padding: 4px 0; font-size: 13px; }
.spark-label { color: var(--text-2); }
.spark { width: 140px; height: 28px; color: var(--accent); }
.spark-val { font-weight: 650; }

.competition ul { list-style: none; padding: 0; }
.competition li .pill { margin: 0 6px 0 0; }
.scan-box { background: var(--panel-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
.scan-box > .pill { float: right; }
.mini-table, .keys-table, .audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td, .keys-table th, .keys-table td, .audit-table th, .audit-table td {
  text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top;
}
.mini-table th, .keys-table th, .audit-table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 650; }
.table-wrap { overflow-x: auto; }

.fit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fit-item { background: var(--panel-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.fit-item p { color: var(--text-2); font-size: 13px; margin: 8px 0 0; }
.fit-head { display: flex; align-items: center; gap: 10px; }
.fit-name { font-weight: 700; flex: 1; }
.dots { display: flex; gap: 3px; }
.dots i { width: 14px; }
.dots i.on { background: var(--accent); }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 22px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }

.not-eval { background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text-2); }
.cmd { display: flex; align-items: center; gap: 10px; }
.cmd code { background: var(--panel-3); padding: 5px 9px; border-radius: 4px; }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.concept { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.concept p { color: var(--text-2); margin: 0; }
.concept-head { display: flex; align-items: center; gap: 10px; }
.concept-head h4 { margin: 0; color: var(--text); font-size: 14px; }
.concept-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); font-weight: 800; font-size: 12px; flex: none; }
.prompt {
  margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px; color: var(--text-2); max-height: 180px; overflow: auto; flex: 1;
}
.concept .btn { align-self: flex-start; }

.footage h4 { margin-top: 16px; }
.player { position: relative; width: 100%; max-width: 860px; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000; }
.poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center; font-size: 24px; padding-left: 4px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.poster:hover .play { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.poster-name { position: absolute; left: 12px; bottom: 10px; color: #fff; font-weight: 650; text-shadow: 0 1px 4px #000; }
.player-fail { height: 100%; display: grid; place-items: center; color: #ccc; padding: 20px; text-align: center; }
.movie-list { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.movie-pick { flex: none; width: 150px; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius-sm); padding: 0 0 4px; cursor: pointer; text-align: left; font-size: 12px; overflow: hidden; }
.movie-pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 4px; }
.movie-pick span { padding: 0 6px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.boards img { width: 100%; border-radius: var(--radius-sm); display: block; }

.doc-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.markdown { font-size: 14px; color: var(--text-2); max-height: 70vh; overflow: auto; padding-right: 6px; }
.markdown h1, .markdown h2, .markdown h3 { color: var(--text); margin: 18px 0 8px; }
.markdown h1 { font-size: 20px; } .markdown h2 { font-size: 17px; } .markdown h3 { font-size: 15px; }
.markdown table { border-collapse: collapse; margin: 10px 0; font-size: 13px; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.markdown code { background: var(--panel-3); padding: 1px 4px; border-radius: 3px; }
.markdown pre { background: var(--bg); padding: 10px; border-radius: var(--radius-sm); overflow: auto; }
.markdown pre code { background: none; padding: 0; }

/* ---------- feed ---------- */
.feed { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; }
.post-stats { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); margin-bottom: 6px; }
.post-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.post-games .tag { margin: 0 4px 0 0; }
.reddit li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ---------- keys ---------- */
.key-create { display: flex; gap: 10px; max-width: 520px; }
.key-create input { flex: 1; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel-2); }
.keys-table tr.warn td, .audit-table tr.warn td { background: var(--red-soft); }
.key-actions { display: flex; gap: 6px; justify-content: flex-end; }
.keys-table code, .audit-table code { font-size: 12px; color: var(--text-2); }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; width: 100%; max-width: 520px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 10px; font-size: 18px; }
.new-key { display: block; background: var(--bg); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 12px; font-size: 13.5px; word-break: break-all; margin: 12px 0 16px; color: var(--text); }
.modal-actions { display: flex; gap: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 8px;
  box-shadow: var(--shadow); transition: opacity 0.2s, transform 0.2s; font-weight: 550;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--red); color: var(--red); }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { max-width: 460px; }
  .hero-score { display: flex; align-items: baseline; gap: 10px; justify-content: flex-start; padding: 10px 14px; text-align: left; }
  .hs-num { font-size: 34px; }
  .detail-grid { grid-template-columns: 1fr; }
  .section-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .section-nav a { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .games-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: flex; }
  .filter-toggle { display: inline-flex; }
  .topbar { gap: 10px; padding: 0 16px; overflow-x: auto; }
  .brand span, .scan-day { display: none; }
  .main { padding: 16px 16px 50px; }
}
@media (max-width: 640px) {
  .row { grid-template-columns: 96px minmax(0, 1fr) 52px; gap: 10px; padding: 10px; }
  .thumb { width: 96px; }
  .row-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; margin-top: -4px; }
  .score-num { font-size: 21px; }
  .why { -webkit-line-clamp: 3; }
  .tabs .tab { padding: 0 8px; }
  .who { display: none; }
  .topbar { gap: 6px; }
  .tabs { gap: 0; }
  .top-right .btn { padding: 0 8px; }
  .spark-row { grid-template-columns: 1fr; gap: 2px; }
  .key-create { flex-direction: column; }
  .panel { padding: 14px; }
}
