/* Hockey Challenge Picks — visual system.
   Tokens first (light by default, dark via prefers-color-scheme or [data-theme]). No frameworks, no build step. */
:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --surface-3: #e9eef5;
  --text: #0e1726;
  --text-2: #3c4a5e;
  --muted: #5b6878;
  --border: #d9e0e9;
  --border-strong: #c3ccd8;
  --accent: #1256b0;
  --accent-hover: #0d4791;
  --accent-soft: #e3edfb;
  --accent-ink: #ffffff;
  --ink: #d80621;            /* brand red (Canadian flag red) */
  --ink-2: #b0041a;
  --ink-text: #f4f7fb;
  --ink-muted: #ffe1e4;
  --gold: #ffffff;            /* brand white (accent on red) */
  --good: #15803d;
  --good-soft: #e4f6ea;
  --good-ink: #0f5f2d;
  --warn: #a35a00;
  --warn-soft: #fff1d6;
  --down: #b42318;
  --down-soft: #fde8e6;
  --live: #b45309;
  --best-bg: #e7f6ec;
  --best-border: #1e9a52;
  --scored-bg: #fff6dc;
  --meter-hot: #1256b0;
  --meter-warm: #4a86d9;
  --meter-cool: #a9bdd8;
  --meter-track: #e4eaf2;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 4px 14px rgba(14, 23, 38, .05);
  --radius: 10px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #121b2b;
    --surface-2: #172234;
    --surface-3: #1e2a3f;
    --text: #e8eef7;
    --text-2: #c2cddc;
    --muted: #9aacc2;
    --border: #253147;
    --border-strong: #324059;
    --accent: #7fb6ff;
    --accent-hover: #a3caff;
    --accent-soft: #19304f;
    --accent-ink: #0b1220;
    --ink: #b0041a;
    --ink-2: #8e0315;
    --ink-text: #f4f7fb;
    --ink-muted: #ffd3d8;
    --good: #4bd37f;
    --good-soft: #143322;
    --good-ink: #8ee8b0;
    --warn: #f3b74d;
    --warn-soft: #3a2b0f;
    --down: #ff8a80;
    --down-soft: #3d1a18;
    --live: #f7a94b;
    --best-bg: #14301f;
    --best-border: #3fc777;
    --scored-bg: #3a2f12;
    --meter-hot: #7fb6ff;
    --meter-warm: #4e86cf;
    --meter-cool: #3a4f6f;
    --meter-track: #1d2a3e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #121b2b;
  --surface-2: #172234;
  --surface-3: #1e2a3f;
  --text: #e8eef7;
  --text-2: #c2cddc;
  --muted: #9aacc2;
  --border: #253147;
  --border-strong: #324059;
  --accent: #7fb6ff;
  --accent-hover: #a3caff;
  --accent-soft: #19304f;
  --accent-ink: #0b1220;
  --ink: #b0041a;
  --ink-2: #8e0315;
  --ink-text: #f4f7fb;
  --ink-muted: #ffd3d8;
  --good: #4bd37f;
  --good-soft: #143322;
  --good-ink: #8ee8b0;
  --warn: #f3b74d;
  --warn-soft: #3a2b0f;
  --down: #ff8a80;
  --down-soft: #3d1a18;
  --live: #f7a94b;
  --best-bg: #14301f;
  --best-border: #3fc777;
  --scored-bg: #3a2f12;
  --meter-hot: #7fb6ff;
  --meter-warm: #4e86cf;
  --meter-cool: #3a4f6f;
  --meter-track: #1d2a3e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; font: 16px/1.5 var(--font); background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 50; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
small { font-size: .8em; }

/* ---------- header ---------- */
.site-header { background: var(--ink); color: var(--ink-text); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.header-inner { display: flex; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-text); flex: 0 0 auto; }
.brand-mark { flex: 0 0 auto; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.brand-text { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.brand-b { color: var(--gold); font-weight: 900; }
.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a { display: block; padding: 7px 11px; border-radius: 999px; text-decoration: none; color: var(--ink-muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--gold); }
.site-nav a:focus-visible { outline-color: var(--gold); }
.theme-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: var(--ink-text); cursor: pointer; padding: 0; }
.theme-toggle:hover { background: rgba(255, 255, 255, .14); }
.theme-toggle:focus-visible { outline-color: var(--gold); }
.theme-toggle[hidden] { display: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 6px 10px; padding-bottom: 6px; }
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px; }
  .site-nav a { font-size: .85rem; padding: 6px 10px; }
}

/* ---------- layout, type ---------- */
main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.05rem); line-height: 1.2; margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em; }
h1 .h1-sub { font-weight: 600; color: var(--muted); font-size: .72em; letter-spacing: 0; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 32px 0 10px; font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.eyebrow { margin: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--text-2); margin: 0 0 12px; max-width: 70ch; font-size: 1.02rem; }
.meta, .muted { color: var(--muted); font-size: .9rem; }
.page-head { margin-bottom: 8px; }
.page-links { margin: 10px 0 0; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .86rem; margin: 0; }
.meta-stat { display: inline-flex; align-items: center; gap: 6px; }
.meta-stat + .meta-stat::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.team-chip { font-weight: 700; color: var(--text); }
.prose { max-width: 760px; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { padding-top: 6px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.card-soft { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 20px 14px; margin-top: 32px; }
.card-soft h2 { margin-top: 12px; }
.notice { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: var(--radius-sm); margin: 12px 0; }
.flash-err { border-left-color: var(--down); }
.flash-ok { border-left-color: var(--good); }
.callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }

/* ---------- buttons, badges, chips ---------- */
.btn, .comment-form button[type="submit"], .admin button, .card-form button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: .92rem; padding: 8px 16px; background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--border); color: var(--text); }
.btn-primary, .comment-form button[type="submit"], .card-form button[type="submit"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover, .comment-form button[type="submit"]:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--down); border-color: var(--down); background: transparent; }
.btn-danger:hover { background: var(--down-soft); color: var(--down); }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; line-height: 1.3; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); vertical-align: middle; white-space: nowrap; letter-spacing: .02em; }
.badge-best { background: var(--best-border); color: #fff; border-color: var(--best-border); }
.badge-best::before { content: "★"; font-size: .8em; }
.badge-open { color: var(--good-ink); background: var(--good-soft); border-color: transparent; }
.badge-open::before, .badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-live, .badge-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge-live::before { animation: pulse 1.6s ease-in-out infinite; }
.badge-final { color: var(--muted); background: var(--surface-3); border-color: transparent; }
.badge-down { color: var(--down); background: var(--down-soft); border-color: transparent; }
.badge-locked { color: var(--muted); }
.badge-inj { color: var(--down); border-color: var(--down); background: var(--down-soft); }
.badge-inj-dtd { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.badge-status-visible { color: var(--good-ink); background: var(--good-soft); border-color: transparent; }
.badge-status-hidden { color: var(--down); background: var(--down-soft); border-color: transparent; }
.badge-status-pending { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .badge-live::before { animation: none; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .86rem; font-weight: 600; }
.chip b { color: var(--accent); font-weight: 800; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip-rank { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: .72rem; font-weight: 800; }
.chip-best { border-color: var(--best-border); background: var(--best-bg); }
.chip-best .chip-rank { background: var(--best-border); color: #fff; }

/* ---------- set jump nav ---------- */
.set-jump { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.set-jump a { font-size: .82rem; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.set-jump a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- games ---------- */
.games h2 { margin-top: 22px; }
.game-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.game { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); position: relative; }
.game-live { border-color: var(--live); }
.game-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.game .teams { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; display: inline-flex; align-items: baseline; gap: 6px; }
.game .teams .at { color: var(--muted); font-weight: 500; font-size: .85rem; }
.game-time { font-weight: 700; font-size: .9rem; color: var(--text-2); background: var(--surface-3); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.game-score { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 800; font-size: 1.15rem; }
.game-score .dash { color: var(--muted); font-weight: 400; }
.game-score .state { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; margin-left: 4px; background: var(--surface-3); color: var(--muted); }
.game-score .state-live { background: var(--warn-soft); color: var(--live); }
.game .matchup { margin: 0; font-size: .86rem; color: var(--text-2); }
.game .matchup .at { color: var(--muted); }
.game .goalies { margin: 4px 0 0; padding-top: 8px; border-top: 1px dashed var(--border); font-size: .8rem; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.game .goalie { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.game .goalie-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.game .goalie-sub { color: var(--muted); font-size: .76rem; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: 0 0 auto; }
.game .goalie .team { font-weight: 700; color: var(--text); }
.gk { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 4px; line-height: 1.5; vertical-align: middle; }
.gk-conf { color: var(--good-ink); background: var(--good-soft); }
.gk-proj { color: var(--muted); background: var(--surface-3); }
.gk-top { color: var(--muted); background: var(--surface-3); }
.gk abbr { text-decoration: none; }

/* ---------- pick sets ---------- */
.pick-set { margin-top: 36px; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.set-title { display: flex; align-items: center; gap: 10px; }
.set-title h2 { margin: 0; font-size: 1.35rem; }
.set-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--gold); font-weight: 900; font-size: 1.2rem; letter-spacing: -.02em; }
:root[data-theme="dark"] .set-num { background: var(--ink-2); }
.set-count { color: var(--muted); font-size: .85rem; }
.cols-toggle { font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.cols-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cols-toggle[hidden] { display: none; }
.top3 { margin: 4px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.top3-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.scorers { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-sm); font-size: .92rem; }
.scorers[data-scored="yes"] { background: var(--scored-bg); border: 1px solid rgba(180, 140, 0, .25); }
.scorers[data-scored="no"] { background: var(--surface-3); color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; box-shadow: var(--shadow); position: relative; }
.table-wrap:focus-visible { outline-offset: 0; }
table.stats { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.stats thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border-strong); }
table.stats thead th.col-text, table.stats td.col-text { text-align: left; }
table.sortable thead th { cursor: pointer; user-select: none; }
table.sortable thead th:hover { color: var(--text); }
table.sortable thead th[aria-sort] { color: var(--accent); }
table.sortable thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
table.sortable thead th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
table.stats .col-player, table.stats .col-opp, table.stats td.line { text-align: left; }
table.stats th[scope="row"] { font-weight: 600; background: var(--surface); position: sticky; left: 0; z-index: 1; text-align: left; box-shadow: 1px 0 0 var(--border); }
table.stats thead th.col-player { left: 0; z-index: 3; box-shadow: 1px 0 0 var(--border); }
table.stats tbody tr:last-child td, table.stats tbody tr:last-child th { border-bottom: 0; }
table.stats tbody tr:hover td, table.stats tbody tr:hover th[scope="row"] { background: var(--surface-2); }
table.stats tr.best td, table.stats tr.best th[scope="row"] { background: var(--best-bg); }
table.stats tr.best th[scope="row"] { box-shadow: inset 3px 0 0 var(--best-border), 1px 0 0 var(--border); }
table.stats tr.scored td, table.stats tr.scored th[scope="row"] { background: var(--scored-bg); }
table.stats tr.locked:not(.scored) .player-name, table.stats tr.is-out .player-name { opacity: .7; }
table.stats abbr[title] { text-decoration: none; cursor: help; }
.player-name { display: block; font-weight: 650; line-height: 1.25; }
.player-name a { color: var(--text); text-decoration: none; }
.player-name a:hover { color: var(--accent); text-decoration: underline; }
.player-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.player-tags .badge { font-size: .64rem; padding: 1px 7px; }
.col-opp .team { font-weight: 700; }
.col-opp .vs, td .vs { color: var(--muted); font-size: .85em; }
td.line { color: var(--text-2); }
.pp { font-weight: 700; }
.pp-pp1 { color: var(--accent); }
td.gaa .gk { margin-left: 4px; }
td.chance { min-width: 92px; }
.meter { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 64px; }
.meter-val { font-weight: 800; font-size: 1rem; line-height: 1.1; }
.meter-val.big { font-size: 2.6rem; }
.meter-bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--meter-track); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--p, 0%); border-radius: 2px; background: var(--meter-cool); }
.meter-hot .meter-fill { background: var(--meter-hot); }
.meter-warm .meter-fill { background: var(--meter-warm); }
.meter-hot .meter-val { color: var(--accent); }
tr.best .meter-hot .meter-val { color: var(--good-ink); }
tr.best .meter-fill { background: var(--best-border); }
td.chance .out { color: var(--down); font-weight: 800; font-size: .85rem; letter-spacing: .04em; }
.goal-yes { color: var(--good-ink); font-weight: 800; }
.goal-yes small, .goal-no small { font-weight: 500; color: var(--live); text-transform: uppercase; font-size: .65em; letter-spacing: .05em; }
.goal-no { color: var(--muted); }
.goal-pre { color: var(--muted); }
.goal-live { color: var(--live); font-weight: 600; }
.legend { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.legend summary { cursor: pointer; font-weight: 600; color: var(--text-2); width: max-content; padding: 2px 0; }
.legend p { margin: 6px 0 0; line-height: 1.55; }

/* Phone: hide secondary columns unless "All stats" is on; tighten padding. */
@media (max-width: 760px) {
  table.stats th, table.stats td { padding: 7px 8px; }
  table.stats { font-size: .86rem; }
  table.picks-table:not(.show-all) .minor { display: none; }
  table.picks-table th[scope="row"] { max-width: 150px; min-width: 128px; }
  .player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 134px; }
  .table-wrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 18px; background: linear-gradient(to left, var(--surface), transparent); pointer-events: none; border-radius: 0 var(--radius) var(--radius) 0; }
}

/* ---------- archive, status, stats grid, misc ---------- */
.date-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.date-list a { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.date-list a:hover { border-color: var(--accent); }
.date-day { font-weight: 800; white-space: nowrap; font-size: 1.05rem; }
.date-full { color: var(--muted); font-size: .82rem; white-space: nowrap; grid-column: 1; }
.date-list .badge { grid-column: 2; grid-row: 1 / span 2; }
.status-line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0 16px; }
.status-line .badge { margin-top: 2px; }
.status-list { display: grid; grid-template-columns: max-content 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 16px; overflow: hidden; }
.status-list dt, .status-list dd { padding: 9px 14px; margin: 0; border-bottom: 1px solid var(--border); }
.status-list dt { color: var(--muted); font-weight: 600; font-size: .88rem; background: var(--surface-2); }
.status-list dt:nth-last-of-type(1), .status-list dd:last-child { border-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 0 0 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.stat dt { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 2px 0 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.stat-key { border-color: var(--accent); }
.stat-key dd { color: var(--accent); }
.today-callout { display: flex; align-items: center; gap: 20px; margin: 16px 0 8px; border-left: 4px solid var(--accent); }
.today-callout h2 { margin: 0 0 4px; font-size: 1.05rem; }
.today-callout p { margin: 0; color: var(--text-2); }
.today-pct .meter { min-width: 110px; align-items: flex-start; }
.today-pct .meter-bar { height: 6px; }
.hit-rate { margin: 0 0 10px; }
.not-found { text-align: center; margin: 40px auto; }
.big-code { font-size: 5rem; font-weight: 900; letter-spacing: -.05em; color: var(--border-strong); margin: 0; line-height: 1; }
.ad-slot { margin: 16px auto; max-width: 1160px; padding: 0 16px; }
.ad-slot:not([hidden]) { min-height: 100px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-slot:not([hidden])::before { content: "Advertisement"; }
.ad-slot[hidden] { display: none; }

/* ---------- forms, comments ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field label { font-weight: 600; font-size: .9rem; }
.comment-form input[type="text"], .comment-form textarea, .admin input[type="password"], .card-form input, .prose input[type="password"] { width: 100%; max-width: 560px; font: inherit; padding: 9px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.comment-form textarea { resize: vertical; min-height: 96px; }
.comment-form input:focus, .comment-form textarea:focus, .card-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; }
.card-form, .comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; max-width: 640px; }
.comments { margin-top: 40px; }
.section-head h2 { margin: 0 0 4px; }
.section-head .meta { margin: 0 0 12px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .8rem; font-weight: 700; vertical-align: middle; margin-left: 4px; }
.comments-empty { color: var(--muted); margin: 0 0 14px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; max-width: 760px; }
.comment { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; overflow-wrap: anywhere; }
.comment-main { min-width: 0; flex: 1 1 auto; }
.comment p { margin: 0 0 4px; }
.comment-head { font-size: .9rem; }
.comment-head time { color: var(--muted); font-size: .8rem; margin-left: 6px; }
.comment-body { white-space: pre-wrap; }
.avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.comment-form-title { margin: 0 0 12px; font-size: 1rem; }
.report-form { margin: 0; }
button.link-button { background: none !important; border: 0 !important; color: var(--muted) !important; padding: 0 !important; font-size: .78rem !important; text-decoration: underline; cursor: pointer; font: inherit; }
button.link-button:hover { color: var(--down) !important; }
form.inline { display: inline; }

/* ---------- admin ---------- */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tabs a { padding: 5px 12px; border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.filter-tabs a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.admin .wrap-cell { white-space: normal; min-width: 220px; text-align: left; }
.admin-table td, .admin-table th { text-align: left; }
.admin-table td.wrap-cell form { margin: 2px 2px 2px 0; }
.ban-list { list-style: none; padding: 0; display: grid; gap: 6px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0 28px; color: var(--muted); font-size: .85rem; margin-top: 16px; }
.site-footer p { margin: 0 0 8px; max-width: 80ch; }
.footer-brand { font-weight: 800; color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.footer-links a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 560px) {
  .status-list { grid-template-columns: 1fr; }
  .status-list dt { border-bottom: 0; padding-bottom: 2px; }
  .today-callout { flex-direction: column; align-items: flex-start; gap: 8px; }
  .meter-val.big { font-size: 2.2rem; }
  .game-list { grid-template-columns: 1fr; }
  .card-soft { padding: 2px 16px 10px; }
}
@media print {
  .site-header, .site-footer, .comments, .set-jump, .theme-toggle, .cols-toggle { display: none !important; }
  .table-wrap { box-shadow: none; overflow: visible; }
}
