/* Same look as the game: one column of panels, a sticky top bar, tables that scroll inside their card on phones. */
:root {
  --bg: #E7ECF0; --panel: #F5F7F9; --field: #FFFFFF; --ink: #111A23; --ink-soft: #4F5D6A; --line: #C6D0D8;
  --accent: #D93A22; --accent-ink: #B52E19; --on-accent: #FFFFFF; --gold: #B7791F; --row: #EEF2F5;
  /* Noto Sans is served from this site (fonts.css), with Latin and Cyrillic letters so usernames and Mongolian names show correctly. */
  --font-display: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1117; --panel: #121A22; --field: #0B1117; --ink: #E7EEF4; --ink-soft: #97A5B1; --line: #25313C;
    --accent: #FF6A4D; --accent-ink: #FF8268; --on-accent: #1A0D09; --gold: #E8B65A; --row: #17212B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1117; --panel: #121A22; --field: #0B1117; --ink: #E7EEF4; --ink-soft: #97A5B1; --line: #25313C;
  --accent: #FF6A4D; --accent-ink: #FF8268; --on-accent: #1A0D09; --gold: #E8B65A; --row: #17212B;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font-body); }
a { color: inherit; }
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1040px; margin-inline: auto; padding: 12px clamp(16px, 4vw, 32px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.brand { font: 600 1.05rem/1.1 var(--font-display); text-decoration: none; letter-spacing: -0.02em; margin-right: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; font: 500 14px/1 var(--font-body); padding: 9px 12px; border-radius: 9px; color: var(--ink-soft); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav a:hover:not([aria-current="page"]) { color: var(--ink); background: var(--row); }
.plat { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--row); }
.plat a { text-decoration: none; font: 600 13px/1 var(--font-body); padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); }
.plat a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.plat a:hover:not([aria-current="true"]) { color: var(--ink); }
main#app { min-height: 80vh; align-content: start; }
main#app:focus { outline: none; }   /* focus is moved here by script after a choice; it is not a control */   /* keeps the footer below the fold while a page loads, so it does not jump when the content arrives */
main { max-width: 1040px; margin-inline: auto; padding: 22px clamp(16px, 4vw, 32px) 56px; display: grid; gap: 20px; }
h1 { margin: 0; font: 600 clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem)/1.15 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
h2 { margin: 0; font: 600 1.05rem/1.2 var(--font-display); }
.sub { margin: 0; color: var(--ink-soft); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.headrow { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* A picker with long option names (a profile's "Elimination history" battle list) may shrink to the screen width instead of widening the page on phones. */
.headrow, .headrow > .controls { min-width: 0; max-width: 100%; }
.controls > select { min-width: 0; }
select, input[type="search"] { font: 400 14px/1.2 var(--font-body); padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); min-height: 40px; max-width: 100%; }
.btn { font: 500 14px/1 var(--font-body); min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--ink-soft); }
.btn.danger { border-color: var(--accent); color: var(--accent-ink); }
:is(a, .btn, select, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.label { font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.av { border-radius: 50%; background: #C3C8CF; flex: none; object-fit: cover; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* Names wrap only at word gaps and after . or _ (see uname); "anywhere" let tables squeeze them to one letter per line. */
.who a { text-decoration: none; font-weight: 600; overflow-wrap: break-word; word-break: normal; min-width: 0; }
td .who { min-width: 10.5rem; }
.who a:hover { text-decoration: underline; text-underline-offset: 3px; }
.champ { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.champ > div { flex: 1 1 12rem; min-width: 0; }
.champ .name { font: 600 1.35rem/1.15 var(--font-display); overflow-wrap: break-word; }
.champ .name a { text-decoration: none; }
.tag { font: 600 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.tile .v { font: 600 1.4rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile.big { grid-column: span 2; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile.big .v { font-size: 2.6rem; }
.tile.big .label { color: inherit; opacity: 0.75; }
.table-wrap { overflow-x: auto; min-width: 0; margin-inline: -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--row); }
.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.rank { font: 600 14px/1 var(--font-mono); white-space: nowrap; }
.rank.r1 { color: var(--gold); }
.wins { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--field); text-decoration: none; font-size: 13px; min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.chip:hover { border-color: var(--ink-soft); }
.chip .t { font-family: var(--font-mono); color: var(--ink-soft); }
.day { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.day:last-child { border-bottom: 0; padding-bottom: 0; }
.msg { margin: 0; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); line-height: 1.5; }
.msg.err { border-color: var(--accent); color: var(--accent-ink); }
.loading { color: var(--ink-soft); }
.more { justify-self: start; }
.foot { color: var(--ink-soft); font-size: 13px; line-height: 1.5; margin: 0; }
.mono { font-family: var(--font-mono); }
/* Elimination history: "eliminated by" cells, a button that opens the list of players someone knocked out
   under their row, the profile's per-battle panel, and Champions badges. */
.vbtn { font: 600 13px/1 var(--font-mono); background: var(--field); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.vbtn:hover { border-color: var(--ink-soft); }
.vbtn[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tbody tr.vrow, tbody tr.vrow:hover { background: var(--row); }
/* The list stays in view while a wide table is scrolled sideways on a phone. */
.vlist { display: grid; gap: 8px; position: sticky; left: 4px; max-width: min(100%, calc(100vw - 80px)); }
.elim { display: grid; gap: 14px; }
.elim .line { display: grid; gap: 8px; }
.win { font-weight: 600; white-space: nowrap; }
/* Platform of a player in a combined (Instagram + TikTok) list. Class names avoid ad-blocker words (see CLAUDE.md). */
.pf-tag { display: inline-block; flex-shrink: 0; font: 700 10px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 5px; border-radius: 4px; border: 1px solid; white-space: nowrap; vertical-align: middle; }
.pf-ig { color: #C13584; border-color: rgba(193, 53, 132, 0.45); background: rgba(193, 53, 132, 0.08); }
.pf-tt { color: #0E9C99; border-color: rgba(37, 244, 238, 0.55); background: rgba(37, 244, 238, 0.10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-ig { color: #F28CC4; } :root:not([data-theme="light"]) .pf-tt { color: #5FF5F0; } }
:root[data-theme="dark"] .pf-ig { color: #F28CC4; } :root[data-theme="dark"] .pf-tt { color: #5FF5F0; }
.name .pf-tag { margin-left: 10px; vertical-align: 0.35em; }
.hof-sec { font-size: 15px; margin: 6px 0 2px; color: var(--gold); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip.crown { border-color: var(--gold); }
td .who.sm { min-width: 8.5rem; }
@media (max-width: 520px) {
  .tile.big { grid-column: 1 / -1; }
  td, th { padding: 7px 4px; }
  table { font-size: 13px; }
}

/* ---- Added 2026-11-04: skip link, footer, welcome (platform chooser), today's battle, replay button, ads, static pages ---- */
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }
.brand small { font: 500 12px/1 var(--font-body); color: var(--ink-soft); margin-left: 8px; letter-spacing: 0; }
@media (max-width: 560px) { .brand small { display: none; } }
.site-foot { max-width: 1040px; margin-inline: auto; padding: 8px clamp(16px, 4vw, 32px) 40px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 14px; }
.site-foot nav a, .site-foot nav button { font: 500 14px/1 var(--font-body); padding: 11px 10px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; border-radius: 8px; }
.site-foot nav a:hover, .site-foot nav button:hover { color: var(--ink); }
.site-foot p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.plat a { min-height: 34px; display: inline-flex; align-items: center; }
/* The platform pop-up at the bare address: small, centred, over a dimmed page */
.modal-open { overflow: hidden; }
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 12px; background: rgba(5, 10, 16, 0.62); overflow: auto; }
.modal { width: min(100%, 360px); max-height: calc(100dvh - 24px); overflow: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px 20px; display: grid; gap: 16px; box-shadow: 0 18px 48px rgba(0,0,0,.35); }
.modal h2 { margin: 0; padding: 0 30px; text-align: center; font: 700 1.3rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.modal { position: relative; }
.modal-x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-soft); font: 400 26px/1 var(--font-body); cursor: pointer; }
.modal-x:hover { color: var(--ink); background: var(--row); }
.modal-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.modal-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--ink); background: var(--ink); color: var(--bg); font: 700 16px/1 var(--font-body); text-decoration: none; }
.modal-btn .brand-ic { width: 28px; height: 28px; flex: none; display: block; border-radius: 7px; }
.modal-btn:hover { background: transparent; color: var(--ink); }
.modal-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-height: 420px) { .modal { padding: 14px; gap: 10px; } .modal-btn { min-height: 46px; } }
/* Today's battle + the replay call to action */
.today { border-color: var(--accent); border-width: 2px; }
.today .lead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.today .lead > div { flex: 1 1 14rem; min-width: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-replay { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 12px; border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); font: 700 17px/1 var(--font-body); text-decoration: none; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.btn-replay:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-replay:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-replay svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 520px) { .btn-replay { width: 100%; } .cta .btn { flex: 1 1 100%; justify-content: center; } }
/* The advertising slot: a sponsor banner (admin page) or a Google responsive unit. Hidden and empty until something is placed.
   NAMING: the slot and the sponsor banner use neutral lb-… names on purpose. Generic blocker lists (EasyList) hide any element called
   .ad-top / .ad-label / .ad-box / .sponsor-box, which silently removed the paid banner. It is still labelled "Advertisement" in plain text.
   Google's unit keeps the standard names (ad-label, ad-box, ins.adsbygoogle): it is never disguised, blockers may treat it as they like. */
.lb-slot { margin: 28px auto 40px; width: 100%; max-width: 970px; display: block; }
/* The placement below the top navigation: aligned with the page content, 28 px clear of the navigation links, no extra gap below. */
.lb-slot.lb-slot-top { margin: 28px auto 0; padding-inline: clamp(16px, 4vw, 32px); }
.lb-slot[hidden] { display: none; }
.lb-slot .lb-slot-label, .lb-slot .ad-label { margin: 0 0 6px; text-align: center; font: 500 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.ad-box { width: 100%; }
.ad-box.adsense { min-height: 90px; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-box.preview { border: 1px dashed var(--ink-soft); min-height: 90px; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; }
/* Sponsor banners keep their own shape: 728x90 on wide screens, 320x100 below 800 px (or the one image they have). */
.lb-slot-frame { width: 100%; max-width: 728px; margin-inline: auto; aspect-ratio: var(--ar-m, 320 / 100); }
@media (min-width: 800px) { .lb-slot-frame { aspect-ratio: var(--ar-d, 728 / 90); } }
.lb-slot-frame a, .lb-slot-frame picture { display: block; width: 100%; height: 100%; }
.lb-slot-frame img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
/* Prose pages (About, Contact, Privacy, Terms) and explanatory cards */
.prose { max-width: 46rem; display: grid; gap: 14px; }
.prose h2 { margin-top: 12px; font-size: 1.2rem; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: 6px; }
.prose a { text-underline-offset: 3px; }
.note { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); }
.note.warn { border-color: var(--gold); }
.faq { display: grid; gap: 10px; }
.faq h3 { margin: 0; font: 600 0.98rem/1.3 var(--font-display); }
.faq p { margin: 2px 0 0; color: var(--ink-soft); }

#explain { display: contents; }

/* archive notice on the old game pages (since 2026-12-03 only the 1 VS 1 cup runs) */
.arch-note { max-width: calc(1040px - 2 * clamp(16px, 4vw, 32px)); margin: 14px auto 0; padding: 10px 14px; border: 1px solid var(--gold); border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, transparent); font-size: 14px; width: calc(100% - 2 * clamp(16px, 4vw, 32px)); box-sizing: border-box; }
.arch-note a { font-weight: 600; }
