:root {
  color-scheme: light dark;
  --page: #f7f7fa;
  --surface: #fff;
  --wash: #f9f8fc;
  --ink: #1d1b27;
  --muted: #585467;
  --line: #dedbe7;
  --accent: #6248d8;
  --accent-hover: #5138bf;
  --on-accent: #fff;
  --focus: #5a41d2;
  --official: #206049;
  --official-bg: #e7f4ed;
  --estimate: #784b16;
  --estimate-bg: #fbf0d7;
  --reported: #514099;
  --reported-bg: #efebfb;
  --pending: #585467;
  --pending-bg: #efedf4;
  --r: 12px;
  --gap: 16px;
  --small: 0.875rem;
  --body: 1rem;
  --heading: 1.375rem;
  --display: clamp(2.125rem, 5vw, 3.125rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #131219;
    --surface: #1b1924;
    --wash: #201d2b;
    --ink: #f4f1fb;
    --muted: #bdb6ce;
    --line: #363244;
    --accent: #b8a7ff;
    --accent-hover: #c5b7ff;
    --on-accent: #1d123d;
    --focus: #b8a7ff;
    --official: #98ddba;
    --official-bg: #1c392f;
    --estimate: #f3cb8b;
    --estimate-bg: #3d2c20;
    --reported: #c9bcff;
    --reported-bg: #33284f;
    --pending: #c4bbd6;
    --pending-bg: #30293c;
  }
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--muted) var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font: var(--body)/1.5 system-ui, sans-serif; caret-color: var(--accent); }
[hidden] { display: none; }
::selection { color: var(--on-accent); background: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.wrap { max-width: 77rem; margin-inline: auto; padding-inline: clamp(16px, 5vw, 64px); }
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: var(--gap); }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 720; letter-spacing: -0.025em; }
.masthead-label { color: var(--muted); font-size: var(--small); text-align: right; }
main { padding-block: clamp(36px, 7vw, 78px) 26px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
h1 { font-size: var(--display); line-height: 1.12; letter-spacing: -0.04em; font-weight: 750; }
.intro p { color: var(--muted); margin-top: 12px; }
button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; flex: none;
  border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  color: var(--on-accent); background: var(--accent); font: 650 var(--small)/1.3 system-ui, sans-serif;
}
button:hover { background: var(--accent-hover); }
button:active { box-shadow: inset 0 0 0 2px var(--on-accent); }
button[aria-disabled="true"] { cursor: progress; background: var(--pending-bg); color: var(--pending); }
.section-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
h2 { font-size: var(--heading); letter-spacing: -0.025em; font-weight: 700; }
#sync, footer, .game-meta, .basis, .source-note, .warning { color: var(--muted); font-size: var(--small); }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .70fr) minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr); gap: var(--gap); padding-inline: clamp(14px, 2.2vw, 24px); }
.table-head { padding-block: 12px; background: var(--wash); color: var(--muted); border-radius: var(--r) var(--r) 0 0; font-size: var(--small); font-weight: 650; }
#rows { list-style: none; padding: 0; margin: 0; }
.row { min-height: 88px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.game { display: flex; gap: 12px; align-items: center; min-width: 0; }
.game-mark { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; overflow: hidden; border-radius: 9px; background: var(--pending-bg); color: var(--pending); font-size: var(--small); font-weight: 720; }
.game-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--pending-bg); }
.game-name { color: var(--ink); font-weight: 720; }
.version, .date { font-variant-numeric: tabular-nums; }
.version, .date-main { font-weight: 700; }
.basis, .source-note { display: block; line-height: 1.4; margin-top: 4px; }
.status { min-width: 0; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 100px; font-size: var(--small); font-weight: 650; color: var(--pending); background: var(--pending-bg); }
.badge[data-kind="official"] { color: var(--official); background: var(--official-bg); }
.badge[data-kind="estimate"] { color: var(--estimate); background: var(--estimate-bg); }
.badge[data-kind="reported"] { color: var(--reported); background: var(--reported-bg); }
a { color: var(--accent); text-underline-offset: .21em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.source a { min-height: 44px; align-content: center; display: inline-block; font-size: var(--small); line-height: 1.3; }
.source-note a { min-height: 44px; }
.warning, .placeholder { padding: 14px 18px; }
.warning { margin-top: 12px; border: 1px solid var(--line); background: var(--wash); border-radius: 8px; }
.placeholder { border-top: 1px solid var(--line); color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 20px; }
@media (max-width: 760px) {
  :root { --small: 0.9375rem; --body: 1.0625rem; }
  .table-head { display: none; }
  .intro { align-items: flex-start; flex-direction: column; gap: 20px; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); grid-template-areas: "game game" "version date" "status source"; row-gap: 10px; padding: 15px; }
  .row:first-child { border-top: 0; }
  .game { grid-area: game; }
  .version { grid-area: version; }
  .date { grid-area: date; }
  .status { grid-area: status; }
  .source { grid-area: source; }
  .version::before, .date::before { display: block; color: var(--muted); font-size: var(--small); margin-bottom: 2px; }
  .version::before { content: "Версия"; }
  .date::before { content: "Дата · UTC+3"; }
}
