/* TournaMAXX — neon arcade theme. Lost Classics section switches to a retro amber accent. */
:root {
  color-scheme: dark;
  --bg: #0b0d1a;
  --bg2: #11142a;
  --card: #151936;
  --card2: #1b2046;
  --line: #262c5c;
  --text: #e9ecff;
  --muted: #9aa3d6;
  --accent: #4f8cff;
  --accent-strong: #2f6fed;
  --accent2: #2bd2ff;
  --good: #3cffa0;
  --gold: #ffd54a;
  --silver: #cfd6ea;
  --bronze: #e39a5b;
  --amber: #ffb000;
  --amber2: #ff6a00;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-section="classics"] { --accent: var(--amber); --accent2: var(--amber2); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 16px/1.55 var(--sans); color: var(--text);
  background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
h1 small, h2 small { font-size: .6em; font-weight: 500; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); background: var(--card2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 48px; }
section { margin-bottom: 32px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { margin-left: auto; text-align: right; }
.lead { font-size: 1.1rem; color: #c9cff5; max-width: 70ch; }
.empty { color: var(--muted); padding: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.score { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--good); }
html[data-section="classics"] .score { color: var(--amber); }
.initials { font-family: var(--mono); letter-spacing: .08em; color: var(--text); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(11,13,26,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; }
.logo img { height: 48px; width: auto; display: block; }
.logo:hover { text-decoration: none; }
.hero-logo { display: block; width: min(100%, 440px); height: auto; margin: 0 0 18px; }
.big-msg .hero-logo { margin: 0 auto 24px; width: min(100%, 320px); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); }
.nav .nav-classics { color: var(--amber); border: 1px solid rgba(255,176,0,.35); }
.nav .nav-classics[aria-current="page"] { background: rgba(255,176,0,.12); color: var(--amber); }
.menu-btn { display: none; margin-left: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.subnav { background: rgba(255,176,0,.08); border-top: 1px solid rgba(255,176,0,.2); }
.subnav-inner { display: flex; align-items: center; gap: 16px; min-height: 44px; flex-wrap: wrap; }
.subnav-title { font-weight: 800; color: var(--amber); font-family: var(--mono); letter-spacing: .04em; }
.subnav-title small { color: var(--muted); font-family: var(--sans); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.subnav nav { display: flex; gap: 4px; }
.subnav nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.subnav nav a[aria-current="page"], .subnav nav a:hover { color: var(--amber); background: rgba(255,176,0,.1); text-decoration: none; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: 10px; }
}

/* ---- buttons, badges, chips ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent; color: var(--text); background: var(--card2); }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.primary { background: var(--accent-strong); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.classics { background: var(--amber); color: #1a1000; }
.btn.small { padding: 6px 12px; font-size: .875rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; vertical-align: middle; }
.badge.live { background: rgba(60,255,160,.15); color: var(--good); }
.badge.upcoming { background: rgba(43,210,255,.15); color: var(--accent2); }
.badge.final { background: rgba(154,163,214,.15); color: var(--muted); }
.badge.newrec { background: rgba(255,176,0,.18); color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--card2); color: var(--text); font-size: .8rem; font-weight: 700; border: 1px solid var(--line); white-space: nowrap; }
.chip small { color: var(--muted); font-weight: 500; }
.chip.big { font-size: .95rem; padding: 6px 14px; }
.chip.c1 { border-color: var(--gold); } .chip.c2 { border-color: var(--silver); } .chip.c3 { border-color: var(--bronze); }
.chip:hover { text-decoration: none; background: var(--card); }
.live-dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 0 0 rgba(60,255,160,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(60,255,160,0); } 100% { box-shadow: 0 0 0 0 rgba(60,255,160,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot, .dot { animation: none; } }

/* ---- cards & grids ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
a.card { color: var(--text); display: block; }
a.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.grid { display: grid; gap: 16px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.champs { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid.people { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.games { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.split.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.split.wide-right { grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); }
.split > * { min-width: 0; margin-bottom: 0; }
.split aside > .card + .card { margin-top: 16px; }
@media (max-width: 860px) { .split, .split.wide-left, .split.wide-right { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.card-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .9rem; }

.tcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tcard h3 a { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.facts div { background: rgba(255,255,255,.03); border-radius: 10px; padding: 8px 10px; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.facts.big { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts.big dd { font-size: 1.4rem; }
.leader { margin: 12px 0 0; font-size: .95rem; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: center; margin: 12px 0 28px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-search { display: flex; gap: 8px; max-width: 460px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.countdown { text-align: center; }
.countdown .k { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0 0 8px; }
.cd { display: flex; justify-content: center; align-items: baseline; gap: 4px; font-family: var(--mono); }
.cd span { font-size: 2.6rem; font-weight: 800; min-width: 1.6ch; }
.cd small { color: var(--muted); margin-right: 10px; }
.countdown.mini { padding: 12px 18px; }
.countdown.mini .cd span { font-size: 1.6rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats.vertical { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; font-family: var(--mono); }
.stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- leaderboards ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
table.board { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg2); position: sticky; top: 0; }
.board tbody tr:hover { background: rgba(255,255,255,.03); }
.board tbody tr:last-child td { border-bottom: 0; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board .c-rank { width: 48px; text-align: center; }
.board.compact th, .board.compact td { padding: 7px 8px; }
.card .table-wrap { border: 0; background: transparent; }
.board tr.p1 { background: rgba(255,213,74,.07); }
.board tr.p2 { background: rgba(207,214,234,.05); }
.board tr.p3 { background: rgba(227,154,91,.05); }
.board tr.top10 td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 640px) { .hide-sm { display: none; } }
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 900; font-size: .85rem; color: #1a1400; }
.medal.gold { background: var(--gold); }
.medal.silver { background: var(--silver); }
.medal.bronze { background: var(--bronze); }
.rank { font-family: var(--mono); color: var(--muted); font-weight: 700; }
.who { display: inline-flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.who > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: .8rem; }
.who:hover b { text-decoration: underline; }
.prize { display: inline-block; margin-left: 8px; font-size: .75rem; color: var(--gold); }
.avatar { --h: 300; flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: .75rem; color: #fff; background: hsl(var(--h) 60% 42%); }
.avatar.lg { width: 44px; height: 44px; font-size: 1rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.8rem; }
.initials-avatar { background: var(--amber); color: #1a1000; font-family: var(--mono); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.feed li:last-child { border-bottom: 0; }

/* ---- toolbar, forms, tabs ---- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.picker { display: flex; align-items: center; gap: 8px; }
.picker label { color: var(--muted); font-size: .85rem; font-weight: 600; }
input[type="search"], select { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; min-width: 0; }
input[type="search"] { flex: 1 1 240px; }
.tabs { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: .875rem; }
.tabs a[aria-selected="true"] { background: var(--card2); color: var(--text); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.toggle::before { content: ""; width: 34px; height: 20px; border-radius: 999px; background: var(--line); box-shadow: inset 0 0 0 2px var(--line); transition: background .2s; }
.toggle.on { color: var(--text); }
.toggle.on::before { background: var(--accent); }
.toggle:hover { text-decoration: none; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 400px; }

/* ---- profile ---- */
.profile { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin-bottom: 24px; }
.profile h1 { margin: 0 0 4px; }
.profile .facts { grid-column: 1 / -1; margin: 0; }
.profile [data-share] { position: absolute; }
.profile { position: relative; }
.profile [data-share] { top: 16px; right: 16px; }
@media (max-width: 640px) { .profile { grid-template-columns: auto 1fr; } .facts.big { grid-template-columns: repeat(2, 1fr); } }
.badges { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badges li { background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 700; cursor: help; }
.chase { display: flex !important; flex-direction: column; gap: 4px; }
.chase-rank { font-size: 1.8rem; font-weight: 900; font-family: var(--mono); }
.tour-list { list-style: none; margin: 0; padding: 0; }
.tour-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tour-list li:last-child { border-bottom: 0; }
.tour-list li > div { display: flex; flex-direction: column; min-width: 0; }
.spark { color: var(--accent2); flex: none; }
.person { display: flex !important; align-items: center; gap: 12px; flex-wrap: wrap; }
.person-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.person-meta { width: 100%; }

/* ---- champions ---- */
.champ { text-align: center; display: flex !important; flex-direction: column; align-items: center; gap: 2px; }
.champ .trophy { font-size: 1.8rem; }
.champ b { font-size: 1.15rem; }
.month-block h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.overall-champ { font-size: .85rem; font-weight: 600; color: var(--gold); }
.podium-card h3 a { color: var(--text); }

/* ---- schedule timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 24px 8px; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--line); border: 3px solid var(--bg); }
.timeline .tl-now::before { background: var(--good); }
.timeline .tl-future::before { background: var(--accent2); }
.timeline .tl-past { opacity: .8; }

/* ---- states ---- */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 32px 190px 1fr 110px; grid-template-areas: "r l t v" ". m m m"; align-items: center; gap: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bar-rank { grid-area: r; font-family: var(--mono); color: var(--muted); font-weight: 800; }
.bar-label { grid-area: l; }
.bar-track { grid-area: t; height: 12px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-val { grid-area: v; text-align: right; }
.bar-meta { grid-area: m; }
@media (max-width: 640px) { .bars li { grid-template-columns: 28px 1fr auto; grid-template-areas: "r l v" "t t t" "m m m"; } }

/* ---- classics ---- */
.classics-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; border-color: rgba(255,176,0,.35); background: var(--card); }
.classics-teaser .eyebrow { color: var(--amber); }
.classics-teaser .score { color: var(--amber); }
@media (max-width: 760px) { .classics-teaser { grid-template-columns: 1fr; } }
.fresh { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fresh a { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; color: var(--text); background: rgba(0,0,0,.25); padding: 10px 14px; border-radius: 10px; font-family: var(--mono); }
.fresh a:hover { text-decoration: none; background: rgba(255,176,0,.08); }
.game { display: flex !important; flex-direction: column; gap: 6px; }
.game-name { font-size: 1.02rem; }
.game-record { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; }
.record { text-align: center; min-width: 220px; border-color: rgba(255,176,0,.4); }
.record .k { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0; }
.record-score { font-size: 2.2rem; margin: 4px 0; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.history li .muted { grid-column: 1 / -1; }

/* ---- prose ---- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.callout { background: rgba(43,210,255,.08); border: 1px solid rgba(43,210,255,.3); border-radius: 12px; padding: 14px 16px; }
.points-key { display: flex; flex-wrap: wrap; gap: 6px; }
.points-key span { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: .85rem; color: var(--muted); }
.points-key b { color: var(--text); }
.api-list code { white-space: nowrap; }

.big-msg { padding: 60px 0; }
.huge { font-family: var(--mono); font-size: clamp(3rem, 12vw, 6rem); font-weight: 900; margin: 0; color: var(--accent); }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); background: rgba(0,0,0,.2); padding: 24px 0; font-size: .9rem; color: var(--muted); }
.foot-inner p { margin: 0 0 6px; }
.sync-note { display: flex; align-items: center; gap: 8px; color: var(--text); flex-wrap: wrap; }
.fine { font-size: .8rem; opacity: .8; }
.disclaimer { max-width: 80ch; line-height: 1.5; margin-top: 10px !important; }
.community { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-color: rgba(24,119,242,.45); background: var(--card); }
.community .eyebrow { color: #6aa8ff; }
.community h2 { margin-bottom: .3em; }

/* compact boards inside cards: fixed layout so the total never clips */
.board.compact { table-layout: fixed; }
.board.compact .c-rank { width: 40px; }
.tcard .board.compact th.num, .tcard .board.compact td.num { width: 42%; }
.board.compact td { overflow: hidden; }
.board.compact .who { max-width: 100%; }
.board.compact .avatar { display: none; }
.feed .badge { flex: 0 0 auto; width: max-content; }
/* ---- sponsor ---- */
.presented { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .85rem; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.25); }
.presented img { width: 44px; height: auto; }
.presented b { color: var(--text); }
.presented:hover { text-decoration: none; border-color: #ff8a00; }
.sponsor-band { border-bottom: 1px solid var(--line); background: var(--bg2); padding: 14px 0; }
.sponsor-inner { display: flex; align-items: center; gap: 16px; }
.sponsor-inner img { width: 90px; height: auto; flex: none; }
.sponsor-inner p { margin: 0; color: var(--text); }
.sponsor-inner .k { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: #ffb000; font-weight: 800; margin-bottom: 2px; }
.foot { padding-top: 0; }
.foot-inner { padding-top: 20px; }
.medals th, .medals td { padding: 8px 5px; }
.medals th { letter-spacing: .04em; }
.medals td:first-child { max-width: 0; width: 100%; }
.medals th.num { white-space: nowrap; }
.medal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.medal-dot.gold { background: var(--gold); } .medal-dot.silver { background: var(--silver); } .medal-dot.bronze { background: var(--bronze); }
.table-wrap.flat { border: 0; background: transparent; border-radius: 0; }
.medals td:first-child { overflow: hidden; }
.medals .who { max-width: 100%; }
@media (max-width: 640px) { .medals .lbl { display: none; } .medals .medal-dot { width: 12px; height: 12px; margin: 0; } }
/* ---- game logos ---- */
.gicon { display: inline-block; height: 52px; width: auto; max-width: 122px; object-fit: contain; flex: none; vertical-align: middle; }
.gicon.sm { height: 24px; max-width: 58px; }
.gicon.md { height: 36px; max-width: 86px; }
.gicon.lg { height: 62px; max-width: 146px; }
.gicon-wrap { display: flex; align-items: center; justify-content: center; height: 64px; background: rgba(0,0,0,.25); border-radius: 10px; margin-bottom: 4px; }
.game-link { display: inline-flex; align-items: center; gap: 8px; }
.t-title { display: flex; align-items: center; gap: 10px; }
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-row h1 { margin: 0; }
.page-head .title-row { margin-bottom: .5em; }
.champ .gicon { margin: 4px 0; }
.trophy-sm { font-size: 1rem; }
.tour-list li { justify-content: flex-start; }
.tour-list li .grow { flex: 1; }
.chip .gicon.sm { height: 18px; max-width: 44px; margin-right: 4px; }
.fresh .game-link .gicon.sm { height: 22px; }
/* Latest scores table (Global Leaderboards overview) */
.board.latest { table-layout: auto; }
.board.latest td, .board.latest th { overflow: visible; }
.board.latest .c-logo { width: 64px; padding-left: 4px; padding-right: 4px; text-align: center; }
.board.latest .c-logo .gicon.sm { height: 24px; max-width: 58px; }
.board.latest .badge { margin-left: 4px; }
.nowrap { white-space: nowrap; }
.board.latest .badge.newrec { white-space: nowrap; }
@media (max-width: 640px) { .board.latest th, .board.latest td { padding: 7px 5px; } .board.latest .c-logo { width: 48px; } .board.latest .c-logo .gicon.sm { height: 20px; max-width: 44px; } }
@media (max-width: 640px) {
  .board.latest { table-layout: fixed; width: 100%; font-size: .9rem; }
  .board.latest th:nth-child(1) { width: 27%; }
  .board.latest th:nth-child(2) { width: 27%; }
  .board.latest th.c-logo { width: 46px; }
  .board.latest td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .board.latest td:nth-child(4) { word-break: break-word; }
  .board.latest .badge.newrec { display: inline-block; margin: 2px 0 0; font-size: .62rem; }
}
.classics-hero .callout { max-width: 70ch; margin-bottom: 1em; background: rgba(255,176,0,.08); border-color: rgba(255,176,0,.35); }
/* logo + name links: fixed-width logo box so names line up in lists and tables */
.game-link .gicon.sm { width: 58px; max-width: none; object-fit: contain; object-position: center; }

/* player page: one panel per live tournament -- place + chase up top, counted scores beside recent plays */
.tpanel { padding: 0; overflow: hidden; margin-bottom: 20px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 16px 20px; background: var(--card2); border-bottom: 1px solid var(--line); }
.tp-head h2 { margin: 0 0 2px; font-size: 1.25rem; }
.tp-facts { display: flex; gap: 32px; margin: 0; }
.tp-facts dt { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); font-weight: 700; }
.tp-facts dd { margin: 0; font: 900 1.6rem/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.tp-facts dd small { font-size: .55em; font-weight: 700; color: var(--muted); }
.tp-chase { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--line); background: rgba(43,210,255,.06); font-size: .95rem; }
.tp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.tp-body.solo { grid-template-columns: 1fr; }
.tp-body > div { padding: 14px 20px 10px; min-width: 0; }
.tp-body > div + div { border-left: 1px solid var(--line); }
.tp-body .k { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); font-weight: 700; margin: 0 0 2px; }
.tp-list li { padding: 7px 0; font-size: .95rem; }
.tp-list .n { color: var(--muted); font-family: var(--mono); min-width: 1.2em; }
.tp-list.cols { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 32px; }
.tp-list.cols li:nth-child(5n), .tp-list.cols li:last-child { border-bottom: 0; }
.tp-note p { margin: 8px 0 0; max-width: 52ch; }
.chip { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: rgba(60,255,160,.12); color: var(--good); }
@media (max-width: 760px) {
  .tp-body { grid-template-columns: 1fr; }
  .tp-body > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .tp-list.cols { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .tp-list.cols li:nth-child(5n) { border-bottom: 1px solid var(--line); }
  .tp-list.cols li:last-child { border-bottom: 0; }
  .tp-facts { gap: 24px; }
}

/* global leaderboards: course / difficulty boards */
.cat-tabs { margin: 0 0 14px; width: max-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.cat-tabs a { white-space: nowrap; flex: none; }
.cat-tabs small { font-weight: 600; opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.game-name .game-cat { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
