:root {
  color-scheme: dark;
  --bg: #0e1014;
  --panel: #161920;
  --panel-2: #1d212a;
  --border: #2a2f3a;
  --border-strong: #3a4150;
  --text: #e8eaef;
  --muted: #9ba2ae;
  --faint: #6d7480;
  --accent: #7ea6ff;
  --danger: #ff7272;
  --warn: #f3bb52;
  --ok: #6fd39b;
  --solid-text: #14161b;
  --shadow: 0 12px 40px rgb(0 0 0 / 0.45);
  --elapsed: rgb(0 0 0 / 0.28);
  --radius: 10px;
  --label-w: 170px;
  --row-h: 28px;
  --row-gap: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f6f8;
    --panel: #ffffff;
    --panel-2: #eef0f4;
    --border: #dde1e7;
    --border-strong: #c7cdd6;
    --text: #1b1f27;
    --muted: #59616e;
    --faint: #8a929e;
    --accent: #3f6fe0;
    --danger: #d23c3c;
    --warn: #b7791f;
    --ok: #1f9d5c;
    --shadow: 0 12px 40px rgb(20 30 50 / 0.16);
    --elapsed: rgb(20 30 50 / 0.13);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 { font-size: 17px; letter-spacing: 0.01em; }
.tagline { display: block; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: normal; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.kofi { color: inherit; text-decoration: none; font-size: 13px; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel-2); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--border-strong); }
.btn svg { width: 16px; height: 16px; }
.btn.icon-only { width: 32px; padding: 0; justify-content: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- alerts ---------- */
.alerts:empty { display: none; }
.alerts { padding: 10px 20px 0; display: grid; gap: 6px; }
.alert {
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

.notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ---------- summary cards ---------- */
.summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px;
  padding: 14px 20px 0;
}
.summary:empty { display: none; }
/* Folded: each card is one line with the game's name, small enough for all games to share a row, and the filters are hidden. */
.folded .summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
body.folded .chip-group { display: none; }
.folded .summary .game-card { padding: 7px 10px 7px 13px; }
.folded .summary .game-card > :not(.game-card-head), .folded .summary .game-card .region { display: none; }
.folded .summary .game-card h2 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; color: var(--muted); }
.btn.small:hover { color: var(--text); }
#summary-toggle svg { transition: transform 0.15s; }
#summary-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.summary:empty + .toolbar #summary-toggle { display: none; }
.game-card {
  position: relative; overflow: hidden;
  padding: 12px 14px 12px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.game-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.game-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.game-card h2 { font-size: 14px; font-weight: 600; }
/* The game's name leads to its own page. */
.game-card h2 a, .lane-label strong a { color: inherit; text-decoration: none; }
.game-card h2 a::after, .lane-label strong a .full::after { content: " ›"; color: var(--faint); }
.game-card h2 a:hover, .lane-label strong a:hover { text-decoration: underline; }
.game-card h2 a:hover::after, .lane-label strong a:hover .full::after { color: var(--accent); }
.game-card .region { font-size: 11px; color: var(--faint); white-space: nowrap; }
.game-card .gc-version { margin-top: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 4px; border-radius: 4px; background: var(--panel-2); margin-top: 6px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: inherit; }
.resets { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.resets b { color: var(--text); font-weight: 600; }
.urgent-note { margin-top: 6px; font-size: 12px; color: var(--warn); }

/* ---------- toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 14px 20px 10px;
}
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 12.5px; color: var(--muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"] { color: var(--text); background: var(--panel-2); border-color: var(--border-strong); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.chip[aria-pressed="true"] .dot { opacity: 1; }
.chip .swatch { width: 16px; height: 10px; border-radius: 3px; --c: var(--muted); opacity: 0.45; }
.chip[aria-pressed="true"] .swatch { opacity: 1; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button {
  height: 30px; min-width: 32px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; color: var(--muted);
}
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.segmented button:disabled { opacity: 0.4; cursor: default; }

.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--accent); margin: 0; }

/* ---------- bar styles by category (shared by timeline + legend swatches) ---------- */
.cat-banner { background: var(--c); color: var(--solid-text); border: 1px solid var(--c); }
.cat-weapon { background: color-mix(in srgb, var(--c) 22%, var(--panel)); border: 1px solid var(--c); }
.cat-event { background: color-mix(in srgb, var(--c) 26%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-left: 3px solid var(--c); }
.cat-endgame {
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--c) 30%, var(--panel)) 0 6px,
    color-mix(in srgb, var(--c) 16%, var(--panel)) 6px 12px);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.cat-web, .cat-login { background: color-mix(in srgb, var(--c) 10%, var(--panel)); border: 1px dashed var(--c); }
.cat-other { background: color-mix(in srgb, var(--c) 8%, var(--panel-2)); border: 1px solid var(--border); color: var(--muted); }

/* ---------- main ---------- */
main { flex: 1; min-height: 0; padding: 0 20px 20px; display: flex; flex-direction: column; }
.empty, .loading, .error-state {
  margin: 40px auto; text-align: center; color: var(--muted); max-width: 420px;
}
.error-state .btn { margin-top: 12px; }

/* The server's list of events, shown until the timeline loads and without JavaScript.
   The page of a game (.game-page) lists events the same way. */
.snapshot { display: grid; gap: 18px; max-width: 960px; padding-top: 16px; }
.snapshot .hint { margin: 0; }
.snapshot section { padding-left: 12px; border-left: 3px solid var(--c); }
.snapshot h2 { font-size: 15px; }
.snapshot h2 a { color: inherit; text-decoration: none; }
.snapshot h2 a:hover { text-decoration: underline; }
.snapshot h3, .game-page h3 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.snapshot ul, .game-page ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.snapshot .title, .game-page .title { font-weight: 600; }
.snapshot .version-line, .snapshot .sub, .snapshot .meta,
.game-page .version-line, .game-page .sub, .game-page .meta { color: var(--muted); }
.snapshot .version-line, .game-page .version-line { margin-top: 2px; font-size: 12.5px; }
.snapshot .meta, .game-page .meta { font-size: 12px; white-space: nowrap; }

/* ---------- the page of one game (src/game-page.js) ---------- */
a.brand { color: inherit; text-decoration: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.topbar a.btn { text-decoration: none; }
.game-page { display: grid; align-content: start; gap: 22px; width: 100%; max-width: 860px; margin: 0 auto; padding-top: 20px; }
.game-page a { color: var(--accent); }
.game-page h1 { font-size: 24px; line-height: 1.2; padding-left: 12px; border-left: 4px solid var(--c); }
.game-page h2 { margin-bottom: 8px; font-size: 16px; }
.game-page .hint { margin: 8px 0 0; }
.game-page .crumbs { color: var(--muted); font-size: 12.5px; }
.game-page .version-line { margin: -14px 0 0 16px; }
.game-page .calendar-links { gap: 6px; }
.game-page .calendar-links li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.game-page .region { min-width: 130px; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.game-page table { width: 100%; border-collapse: collapse; font-size: 13px; }
.game-page th, .game-page td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.game-page thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.game-page tbody th { font-weight: 600; }

/* Links to the page of each game: in the footer of the home page and at the end of a game's page. */
.game-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0 auto 10px; max-width: 760px; }
.game-links span { color: var(--muted); }
.game-links a { color: var(--accent); }
.game-page .game-links { justify-content: flex-start; margin: 0; }

/* ---------- timeline ---------- */
.timeline {
  position: relative; flex: 1;
  min-height: 320px; max-height: calc(100vh - 150px);
  overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel);
  overscroll-behavior: contain;
}
.tl-grid { position: relative; min-width: 100%; }
.tl-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; background: var(--panel); border-bottom: 1px solid var(--border);
}
.tl-corner {
  position: sticky; left: 0; z-index: 6; flex: none;
  width: var(--label-w); background: var(--panel); border-right: 1px solid var(--border);
  display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 11px; color: var(--faint);
}
.tl-scale { position: relative; flex: none; height: 52px; }
.tl-month {
  position: absolute; top: 0; height: 22px; padding: 4px 8px 0;
  font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
  border-left: 1px solid var(--border);
}
.tl-month span { position: sticky; left: calc(var(--label-w) + 8px); }
.tl-day {
  position: absolute; top: 22px; height: 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1.1; color: var(--muted);
}
.tl-day small { font-size: 9.5px; color: var(--faint); text-transform: uppercase; }
.tl-day.weekend { color: var(--faint); }
.tl-day.today { color: var(--text); font-weight: 700; }
.tl-day.today::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--danger); }

.lane { display: flex; border-bottom: 1px solid var(--border); }
.lane:last-of-type { border-bottom: 0; }
.lane-label {
  position: sticky; left: 0; z-index: 3; flex: none;
  width: var(--label-w); padding: 10px 12px;
  background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.lane-label::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--c); }
.lane-label strong { font-size: 13px; line-height: 1.25; }
.lane-label .full { display: inline; }
.lane-label .short { display: none; }
.lane-label small { font-size: 11px; color: var(--muted); }
.lane-label-inner { position: sticky; top: 62px; display: flex; flex-direction: column; gap: 3px; }
.lane-label .lane-empty { color: var(--faint); }
.lane-body { position: relative; flex: none; }

.tl-lines { position: absolute; top: 0; bottom: 0; left: var(--label-w); pointer-events: none; }
.tl-lines i { position: absolute; top: 0; bottom: 0; }
.tl-lines .dl { width: 1px; background: color-mix(in srgb, var(--border) 65%, transparent); }
.tl-lines .dl.month { background: var(--border-strong); }
.tl-lines .we { background: color-mix(in srgb, var(--text) 3%, transparent); }
.tl-lines .past { left: 0; background: color-mix(in srgb, var(--bg) 45%, transparent); }
.tl-now-mark { position: absolute; bottom: 0; width: 10px; height: 6px; margin-left: -5px; background: var(--danger); clip-path: polygon(50% 100%, 0 0, 100% 0); }

.version-strip { position: absolute; left: 0; right: 0; top: 6px; height: 18px; }
.version {
  position: absolute; top: 0; height: 18px; padding: 0 8px;
  display: flex; align-items: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap;
  border-radius: 4px; overflow: clip;
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.version.expected { border-style: dashed; background: transparent; color: var(--faint); }
.version span { position: sticky; left: calc(var(--label-w) + 6px); }

.bar {
  position: absolute; height: var(--row-h); isolation: isolate;
  display: flex; align-items: center;
  margin: 0; padding: 0 8px; border-radius: 6px;
  font-size: 12px; text-align: left; white-space: nowrap; cursor: pointer;
  overflow: clip;
  transition: filter 0.12s, box-shadow 0.12s;
}
.bar::after {
  /* elapsed part */
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%);
  background: var(--elapsed); pointer-events: none;
}
.bar:hover { filter: brightness(1.12); box-shadow: 0 0 0 1px var(--c); z-index: 2; }
.bar.selected { box-shadow: 0 0 0 2px var(--text); z-index: 2; }
.bar.clip-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.clip-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* timeline.js shifts the text with margin-left so it stays readable while a long bar scrolls past. */
.bar-text { z-index: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; }
.bar-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.bar-sub { opacity: 0.75; overflow: hidden; text-overflow: ellipsis; flex: 0 100 auto; }
.bar-meta { flex: none; opacity: 0.8; font-size: 11px; font-variant-numeric: tabular-nums; }
.bar.done { opacity: 0.4; }
.bar.done .bar-title { text-decoration: line-through; }
.bar.ended { opacity: 0.55; }
.bar.hidden-ev { opacity: 0.3; border-style: dotted; }

.now-line { position: absolute; top: 52px; bottom: 0; width: 2px; margin-left: -1px; background: var(--danger); z-index: 2; pointer-events: none; }

/* ---------- list view ---------- */
.list-view { display: grid; gap: 24px; }
.list-section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.list-section h2 .count { color: var(--faint); font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.card {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  padding: 12px 12px 12px 16px; text-align: left;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-strong); }
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--c); }
.card.done { opacity: 0.5; }
.card.done .card-title { text-decoration: line-through; }
.card-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.card-title { grid-column: 1; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1.3; }
.card-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.card-sub { grid-column: 1; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-when { grid-column: 2; grid-row: 2 / span 2; align-self: center; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-when small { display: block; font-size: 11px; font-weight: 400; color: var(--faint); }
.card .meter { grid-column: 1 / -1; }
.tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; background: var(--panel-2); color: var(--muted);
}
.tag.game { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); }
.when-urgent { color: var(--danger); }
.when-soon { color: var(--warn); }
.check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-strong);
  display: inline-grid; place-items: center; background: transparent; cursor: pointer; padding: 0;
}
.check svg { width: 14px; height: 14px; opacity: 0; }
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.check[aria-pressed="true"] svg { opacity: 1; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 19; background: rgb(0 0 0 / 0.35); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(420px, 100vw); overflow-y: auto;
  background: var(--panel); border-left: 1px solid var(--border); box-shadow: var(--shadow);
}
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.drawer-head .btn { margin-left: auto; }
.drawer-img { display: block; width: 100%; aspect-ratio: 2.3; object-fit: cover; background: var(--panel-2); }
.drawer-body { padding: 16px; display: grid; gap: 14px; }
.drawer h2 { font-size: 19px; line-height: 1.25; }
.drawer .subtitle { color: var(--muted); margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); width: max-content; }
.pill.active { color: var(--ok); }
.pill.upcoming { color: var(--accent); }
.pill.ended { color: var(--faint); }
.times { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.times dt { color: var(--muted); }
.times dd { margin: 0; font-variant-numeric: tabular-nums; }
.times dd small { display: block; color: var(--faint); font-size: 11.5px; }
.note { font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.details { white-space: pre-wrap; font-size: 12.5px; color: var(--muted); max-height: 260px; overflow: hidden; position: relative; }
.details.expanded { max-height: none; }
.details:not(.expanded)::after { content: ""; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(transparent, var(--panel)); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 12.5px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-actions a.btn { text-decoration: none; }

/* ---------- settings ---------- */
.settings {
  width: min(520px, calc(100vw - 32px)); padding: 0;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}
.settings::backdrop { background: rgb(0 0 0 / 0.45); }
.settings form { display: grid; gap: 18px; padding: 16px 18px 20px; }
.settings-head { display: flex; align-items: center; justify-content: space-between; }
.settings h2 { font-size: 16px; }
.settings h3 { font-size: 13px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.region-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.region-grid label { display: flex; align-items: center; gap: 8px; }
.region-grid .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.region-grid select {
  height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit;
}
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { padding: 4px 20px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.site-footer p { max-width: 760px; margin: 0 auto; }

/*
 * While the timeline is shown on a large enough window, the page is exactly as tall as
 * the window: the header, cards, filters and footer stay in view and only the timeline
 * scrolls. A short window keeps the timeline at a usable height and scrolls the page.
 */
@media (min-width: 721px) and (min-height: 560px) {
  body:has(.timeline) { height: 100vh; height: 100dvh; }
  body:has(.timeline) .timeline { min-height: 240px; max-height: none; }
  body:has(.timeline) .site-footer { padding-top: 8px; padding-bottom: 10px; }
  body:has(.timeline) .game-links { margin-bottom: 6px; }
}

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  :root { --label-w: 64px; }
  .topbar { padding: 10px 16px; }
  .tagline, .status, .kofi-label { display: none; }
  .kofi { width: 32px; padding: 0; justify-content: center; }
  .summary { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; padding: 12px 16px 2px; scroll-snap-type: x mandatory; }
  .game-card { scroll-snap-align: start; }
  .toolbar { padding: 12px 16px 8px; }
  .chip-group { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { flex: none; }
  .summary { scrollbar-width: none; }
  .toolbar-right { margin-left: 0; }
  main { padding: 0 16px 16px; }
  .site-footer { padding: 4px 16px 16px; }
  .alerts { padding: 10px 16px 0; }
  .lane-label { padding: 8px; }
  .lane-label .full, .lane-label small { display: none; }
  .lane-label .short { display: inline; }
  .tl-corner { padding: 0 6px 8px; }
  .timeline { max-height: calc(100vh - 120px); }
}
