/* BoostBoard: dark arena theme. Blue vs orange, like the pitch. */
:root {
  color-scheme: dark;
  --bg: #0a0f1e;
  --panel: #111a2e;
  --panel-2: #16223b;
  --line: #24324f;
  --text: #e8eef8;
  --text-2: #b4c0d6;
  --muted: #8494b2;
  --blue: #38bdf8;
  --orange: #fb923c;
  --good: #22c55e;
  --bad: #ef4444;
  --gold: #f2b632;
  --purple: #a855f7;
  /* Validated categorical slots for charts on the panel surface */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --radius: 14px;
  --display: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 0% -10%, rgba(56, 189, 248, 0.10), transparent 60%),
    radial-gradient(1200px 500px at 100% -10%, rgba(251, 146, 60, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--body);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.02em; margin: 0 0 0.5rem; line-height: 1.15; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin-top: 1rem; }
p { margin: 0 0 0.75rem; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.05rem 0.35rem; font-size: 0.85em; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.push { margin-left: auto; }
[hidden] { display: none !important; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.25rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top)); /* under the phone's status bar when opened from the home screen */
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.4rem; font: 700 1.45rem var(--display); letter-spacing: 0.04em; }
.brand-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--orange)); font-size: 1rem;
}
.nav { display: flex; gap: 0.25rem; }
.nav a { display: flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.75rem; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--blue); }
.nav .ico { font-size: 0.95rem; }
.me { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.me-pick { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.85rem; }
.me-pick select { max-width: 9.5rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.live-dot.on { background: var(--good); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }

/* ---- Layout ---- */
.view { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { margin: 0; }
.grid-home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.grid-home .grid-2 { margin-top: 0; }
.stack { display: grid; gap: 1.25rem; min-width: 0; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.notice { background: rgba(242, 182, 50, 0.1); border: 1px solid rgba(242, 182, 50, 0.35); color: #f8dc94; border-radius: 10px; padding: 0.6rem 0.85rem; margin-bottom: 1rem; }
.fine-print { padding: 0 0.25rem; }

/* ---- Controls ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: 600 0.92rem var(--body); cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: #3a4c72; background: #1b2947; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-accent { background: linear-gradient(135deg, #2b9be0, #1f7fd1); border-color: transparent; color: #fff; }
.btn-accent:hover { background: linear-gradient(135deg, #38bdf8, #2b8fe0); border-color: transparent; }
.btn-sm { padding: 0.38rem 0.75rem; font-size: 0.85rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: #fca5a5; }
.btn.danger:hover { border-color: rgba(239, 68, 68, 0.6); }
.link, .link-btn { color: var(--blue); }
.link:hover, .link-btn:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0.75rem; }
.chip {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2);
  border-radius: 999px; padding: 0.25rem 0.7rem; font: 600 0.8rem var(--body); cursor: pointer;
}
.chip:hover { color: var(--text); border-color: #3a4c72; }
.chip.ghost { background: transparent; }
.chip-accent { background: var(--blue); border-color: var(--blue); color: #04121f; }
.chip-accent:hover { color: #04121f; filter: brightness(1.1); }
.chip-hot { border-color: rgba(251, 146, 60, 0.5); color: var(--orange); }

input, select, textarea {
  width: 100%; background: #0c1426; color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 0.5rem 0.65rem; font: 0.92rem var(--body);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
input[type=color] { padding: 0.15rem; height: 2.4rem; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
select:disabled { opacity: 0.45; }
.me select, .row-gap select { width: auto; }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.8rem; font-size: 0.85rem; color: var(--text-2); font-weight: 500; }
fieldset.field { border: 0; padding: 0; margin: 0 0 0.8rem; }
fieldset.field legend { padding: 0; margin-bottom: 0.4rem; display: flex; gap: 0.6rem; align-items: center; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 0.75rem; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: -0.3rem; }
.hint.bad { color: #fca5a5; }
.segmented { display: inline-flex; background: #0c1426; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented button { background: none; border: 0; color: var(--muted); padding: 0.35rem 0.7rem; border-radius: 8px; font: 600 0.82rem var(--body); cursor: pointer; }
.segmented button.on { background: var(--panel-2); color: var(--text); }

/* ---- Rank badge ---- */
.rank { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; font-weight: 600; }
.rank-empty { color: var(--muted); }
.rank-text { display: grid; line-height: 1.15; }
.rank-text small { color: var(--muted); font-weight: 500; font-size: 0.72rem; }

/* Official emblem; the gem underneath only shows if the image fails to load */
.rank-icon { position: relative; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; }
.rank-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }
.rank-icon.sm { width: 1.5rem; height: 1.5rem; }
.rank-icon.md { width: 2.9rem; height: 2.9rem; }
.rank-icon.lg { width: 3.6rem; height: 3.6rem; }
.rank-icon .gem { display: none; }
.rank-icon.fallback .gem { display: grid; }
.gem {
  place-items: center; width: 80%; height: 80%;
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 65%, white), var(--c) 50%, color-mix(in srgb, var(--c) 60%, black));
  font: 700 0.62rem/1 var(--display); color: #0a0f1e;
}

/* Stacked rank for narrow cards */
.rank-tile {
  display: grid; justify-items: center; align-content: start; gap: 0.1rem; min-width: 0;
  background: #0c1426; border: 1px solid rgba(36, 50, 79, 0.6); border-radius: 10px; padding: 0.45rem 0.3rem 0.5rem;
}
.rank-tile-label { color: var(--muted); font: 700 0.72rem var(--display); letter-spacing: 0.08em; }
.rank-tile-name, .rank-tile-sub, .rank-tile-mmr { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.rank-tile-name { font-weight: 700; font-size: 0.78rem; margin-top: 0.15rem; }
.rank-tile-sub { color: var(--text-2); font-size: 0.7rem; min-height: 1.25em; }
.rank-tile-mmr { color: var(--muted); font-size: 0.68rem; min-height: 1.25em; font-variant-numeric: tabular-nums; }
.rank-tile-none { display: grid; place-items: center; height: 2.9rem; color: var(--muted); font-size: 1.2rem; }
.rank-tile.no-rank .rank-tile-sub { white-space: normal; text-align: center; color: var(--muted); }

.avatar {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--pc) 28%, var(--panel-2)); border: 2px solid var(--pc); font-size: 1.05rem;
}
.avatar.sm { width: 1.6rem; height: 1.6rem; font-size: 0.8rem; border-width: 1.5px; }
.avatar.lg { width: 3.4rem; height: 3.4rem; font-size: 1.7rem; }
.avatar.xl { width: 5rem; height: 5rem; font-size: 2.5rem; border-width: 3px; }

/* ---- Home ---- */
.hero { max-width: 720px; margin: 2rem auto; text-align: center; }
.hero h1 { font-size: 2.6rem; }
.hero p { color: var(--text-2); font-size: 1.05rem; }
.steps { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem 1rem 2.4rem; margin: 1.5rem 0; }
.steps li { margin: 0.4rem 0; color: var(--text-2); }
.table-wrap { overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font: 600 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board td { padding: 0.65rem 0.9rem; border-bottom: 1px solid rgba(36, 50, 79, 0.6); }
.board tr:last-child td { border-bottom: 0; }
.board .pos { font: 700 1.2rem var(--display); color: var(--muted); width: 2rem; }
.board tbody tr:nth-child(1) .pos { color: var(--gold); }
.clickable { cursor: pointer; }
.clickable:hover td { background: rgba(56, 189, 248, 0.05); }
.who { display: flex; align-items: center; gap: 0.6rem; }
.who .name { font-weight: 600; }
.trend { font-size: 0.7rem; }
.trend.up { color: var(--good); }
.trend.down { color: var(--bad); }
.live-pill { font: 700 0.7rem var(--body); letter-spacing: 0.08em; color: var(--good); border: 1px solid rgba(34, 197, 94, 0.4); border-radius: 999px; padding: 0.1rem 0.5rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(36, 50, 79, 0.6); }
.list li:last-child { border-bottom: 0; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.feed-panel .feed { max-height: 70vh; overflow-y: auto; }
.feed-item { display: flex; gap: 0.6rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid rgba(36, 50, 79, 0.5); }
.feed-icon { width: 1.4rem; text-align: center; flex: none; }
.feed-title { font-weight: 600; font-size: 0.9rem; }
.feed-text { color: var(--text-2); font-size: 0.84rem; white-space: pre-line; }
.feed-time { color: var(--muted); font-size: 0.75rem; }
.feed-promotion .feed-title { color: #86efac; }
.feed-demotion .feed-title { color: #fca5a5; }
.feed-champion .feed-title { color: #fcd877; }

/* ---- Players ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr)); gap: 1rem; }
.player-card {
  display: grid; justify-items: center; align-content: start; gap: 0.3rem; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 14%, var(--panel)), var(--panel) 45%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1rem 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.player-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 60%, var(--line)); }
.pc-name { font: 700 1.35rem var(--display); }
.pc-ranks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; width: 100%; margin: 0.6rem 0 0.4rem; }
.pc-foot { display: flex; gap: 0.75rem; color: var(--text-2); font-size: 0.85rem; }

/* ---- Profile ---- */
.profile-head {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  background: linear-gradient(110deg, color-mix(in srgb, var(--pc) 20%, var(--panel)), var(--panel) 60%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.profile-id { flex: 1; min-width: 200px; }
.profile-id h1 { margin-bottom: 0.2rem; }
.bio { color: var(--text-2); margin: 0.4rem 0 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.you-pill { font: 600 0.75rem var(--body); vertical-align: middle; background: var(--blue); color: #04121f; padding: 0.1rem 0.5rem; border-radius: 999px; }
.rank-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.rank-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: 0.5rem; }
.rank-card-head { display: flex; justify-content: space-between; align-items: baseline; font: 700 1.2rem var(--display); }
.rank-card-main .rank { font-size: 1.15rem; gap: 0.6rem; }
.peak { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.82rem; }
.rank-extra { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; font-size: 0.8rem; color: var(--text-2); border-top: 1px dashed var(--line); padding-top: 0.45rem; }
.rank-extra .good, .playlists-table .good { color: #86efac; }
.rank-extra .bad, .playlists-table .bad { color: #93c5fd; }
.reward-pill { display: inline-block; white-space: nowrap; font: 600 0.75rem var(--body); vertical-align: middle; border: 1px solid var(--line); color: var(--text-2); padding: 0.15rem 0.55rem; border-radius: 999px; }
.tile-sub { color: var(--text-2); font-size: 0.72rem; margin-top: 0.15rem; }
.playlists-table td, .playlists-table th { vertical-align: middle; white-space: nowrap; }
.session + .session { margin-top: 0.9rem; }
.session-head { font: 700 0.8rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.session-playlist { font-weight: 600; min-width: 2.6rem; }
.session-rank { display: inline-flex; align-items: center; gap: 0.3rem; }
.wl.mixed { background: rgba(132, 148, 178, 0.18); color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 0.9rem; color: var(--text-2); font-size: 0.82rem; }
.legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: middle; }
.swatch.line { width: 16px; height: 3px; border-radius: 2px; margin-right: 0; }
.chart-box { position: relative; }
.rank-chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.rank-chart .grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.rank-chart .grid text, .rank-chart .axis-label { fill: var(--muted); font: 500 11px var(--body); }
.rank-chart .axis { stroke: var(--line); }
.rank-chart .series-line { fill: none; stroke: var(--s); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rank-chart .series-tail { stroke-dasharray: 3 4; opacity: 0.6; }
.rank-chart .series-dot { fill: var(--s); stroke: var(--panel); stroke-width: 2; }
.rank-chart .direct-label { fill: var(--text-2); font: 600 12px var(--body); }
.rank-chart .crosshair { stroke: var(--text-2); stroke-width: 1; opacity: 0.6; }
.rank-chart .hover-zone { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; top: 0.5rem; transform: translateX(-50%); pointer-events: none;
  background: #0c1426; border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem;
  font-size: 0.82rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); white-space: nowrap;
}
.table-view { margin-top: 0.75rem; }
.table-view summary { cursor: pointer; color: var(--blue); font-size: 0.85rem; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.85rem; }
.mini-table th, .mini-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(36, 50, 79, 0.6); }
.mini-table th { color: var(--muted); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.25rem 0 0; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; }
.tiles-4 .tile { background: var(--panel); }
.tile-value { font: 700 1.6rem/1.1 var(--display); }
.tile-label { color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; }
.match-list { list-style: none; padding: 0; margin: 0; }
.match-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(36, 50, 79, 0.5); font-size: 0.9rem; }
.wl { display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; border-radius: 6px; font: 700 0.8rem var(--display); }
.wl.win { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.wl.loss { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }

/* ---- Brackets ---- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.4rem; }
.pick { display: flex; align-items: center; gap: 0.5rem; background: #0c1426; border: 1px solid var(--line); border-radius: 9px; padding: 0.4rem 0.6rem; cursor: pointer; color: var(--text); font-weight: 500; }
.pick:has(input:checked) { border-color: var(--blue); background: rgba(56, 189, 248, 0.08); }
.bracket-scroll { overflow-x: auto; }
.bracket { display: flex; gap: 2.2rem; padding: 1.25rem; min-width: max-content; }
.round { display: flex; flex-direction: column; width: 240px; }
.round-title { font: 700 0.85rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; text-align: center; }
.round-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 1rem; }
.match { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; overflow: visible; }
.match.ready { border-color: rgba(56, 189, 248, 0.55); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08); }
.match.bye { opacity: 0.55; }
.round:not(.last) .match::after { content: ''; position: absolute; right: -1.1rem; top: 50%; width: 1.1rem; border-top: 2px solid var(--line); }
.round:not(.first) .match::before { content: ''; position: absolute; left: -1.1rem; top: 50%; width: 1.1rem; border-top: 2px solid var(--line); }
.slot { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot .seed { color: var(--muted); font-size: 0.75rem; width: 1rem; }
.slot-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.slot-score { font: 700 1.05rem var(--display); min-width: 1rem; text-align: right; }
.slot.won .slot-name, .slot.won .slot-score { color: #86efac; font-weight: 700; }
.slot.lost { opacity: 0.55; }
.slot.tbd { color: var(--muted); font-style: italic; font-size: 0.85rem; }
.match-foot { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border-top: 1px dashed var(--line); }
.match-foot .chip:first-of-type { margin-left: auto; }
.champion-banner {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; padding: 1rem 1.4rem;
  border-radius: var(--radius); border: 1px solid rgba(242, 182, 50, 0.5);
  background: linear-gradient(110deg, rgba(242, 182, 50, 0.2), rgba(242, 182, 50, 0.04));
}
.crown { font-size: 2.4rem; }
.champ-name { font: 700 1.8rem var(--display); color: #fcd877; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; }
.team-card { display: flex; gap: 0.7rem; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; }
.team-card .seed { font: 700 1.1rem var(--display); color: var(--muted); }
.score-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: end; }
.vs { font: 700 1rem var(--display); color: var(--muted); padding-bottom: 1.3rem; }

/* ---- Bets ---- */
.bet-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.bet-question { font: 700 1.2rem var(--display); }
.status-chip { align-self: flex-start; font: 700 0.72rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.status-chip.open { color: var(--good); border-color: rgba(34, 197, 94, 0.45); }
.stake-chip { font: 600 0.75rem var(--body); color: var(--text-2); background: #0c1426; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.55rem; white-space: nowrap; }
.bet-head .row-gap { flex-wrap: nowrap; align-self: flex-start; }
.bet-options { display: grid; gap: 0.7rem; }
.bo-top { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.25rem; }
.bo-name { font-weight: 600; }
.bar { display: block; height: 8px; background: #0c1426; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; min-width: 0; }
.backers { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.backer { font-size: 0.75rem; background: #0c1426; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.5rem; color: var(--text-2); }
button.backer.mine { font: inherit; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 1.9rem; padding: 0.15rem 0.35rem 0.15rem 0.6rem; border-color: var(--blue); color: var(--text); cursor: pointer; }
button.backer.mine:hover, button.backer.mine:focus-visible { background: rgba(248, 113, 113, 0.12); border-color: #f87171; }
.backer-x { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 0.65rem; }
.bet-hint { margin: 0.6rem 0 0; }
.bet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.option-list { display: grid; gap: 0.4rem; margin-bottom: 0.9rem; }
.option-pick { display: flex; align-items: center; gap: 0.6rem; background: #0c1426; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.75rem; cursor: pointer; }
.option-pick:has(input:checked) { border-color: var(--blue); background: rgba(56, 189, 248, 0.08); }
.option-pick span { flex: 1; font-weight: 600; }
.option-pick small { color: var(--muted); }
.wallet-value { font: 700 2.4rem/1.1 var(--display); margin: 0.2rem 0 0.6rem; }
.rich-list { list-style: none; padding: 0; margin: 0; counter-reset: rich; }
.rich-list li { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(36, 50, 79, 0.5); }
.rich-list li::before { counter-increment: rich; content: counter(rich); width: 1.2rem; color: var(--muted); font: 700 0.95rem var(--display); }

/* ---- Party ---- */
.wheel-panel { background: linear-gradient(140deg, rgba(251, 146, 60, 0.14), var(--panel) 55%); }
.wheel-display {
  display: grid; place-items: center; text-align: center; min-height: 8.5rem; padding: 1rem;
  margin: 0.25rem 0 1rem; border-radius: 12px; border: 1px dashed rgba(251, 146, 60, 0.45); background: #0c1426;
  font: 600 1.05rem var(--body);
}
.wheel-display.spinning { color: var(--orange); filter: blur(0.4px); }
.wheel-idle { color: var(--muted); }
.wheel-victim { font: 700 1.6rem var(--display); color: var(--orange); }
.wheel-challenge { font: 600 1.1rem var(--body); margin-top: 0.3rem; }
.pick-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.pick-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chip span { display: inline-block; border: 1px solid var(--line); background: #0c1426; border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer; font-weight: 500; }
.pick-chip input:checked + span { border-color: var(--orange); background: rgba(251, 146, 60, 0.15); color: #fed7aa; }
.pick-chip input:focus-visible + span { outline: 2px solid var(--blue); }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.rule {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; text-align: left;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.65rem 0.8rem; font: 500 0.9rem var(--body); cursor: pointer;
}
.rule:hover { border-color: rgba(251, 146, 60, 0.6); }
.rule strong { font: 700 1.2rem var(--display); color: var(--orange); }
.auto-grid { display: grid; gap: 0.5rem; }
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid rgba(36, 50, 79, 0.5); }
.auto-row span { display: grid; }
.auto-row input { width: 4.5rem; text-align: center; }
.tally { display: grid; gap: 0.5rem; }
.tally-row { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: 0.6rem; }
.tally-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally .bar > span { background: var(--orange); }

/* ---- Featured challenges ---- */
.featured { margin-bottom: 1.75rem; }
.featured-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.featured-head h2 { font-size: 1.6rem; margin: 0; }
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 1.25rem; }
.challenge-card {
  position: relative; display: grid; align-content: start; gap: 1.1rem; padding: 1.4rem 1.5rem; border-radius: 18px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--tc) 45%, var(--line));
  background:
    radial-gradient(600px 240px at 100% 0%, color-mix(in srgb, var(--tc) 26%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--tc) 12%, var(--panel)), var(--panel) 55%);
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--tc) 60%, transparent);
}
.challenge-card.status-won { --tc: #f2b632; }
.challenge-card.status-expired { opacity: 0.7; }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cc-tag { font: 700 0.8rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--tc) 70%, #fff); }
.cc-player { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.cc-player > span { min-width: 0; }
.cc-name { display: block; font: 700 2.1rem/1 var(--display); overflow-wrap: anywhere; }
.cc-mission { display: block; color: var(--text-2); margin-top: 0.35rem; font-size: 1rem; }
.cc-mission strong { color: var(--text); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.cd-cell {
  display: grid; justify-items: center; padding: 0.75rem 0.25rem 0.6rem; border-radius: 14px;
  background: rgba(6, 10, 22, 0.7); border: 1px solid color-mix(in srgb, var(--tc) 35%, var(--line));
}
.cd-num {
  font: 700 clamp(2.4rem, 5.5vw, 3.8rem)/1 var(--display); font-variant-numeric: tabular-nums; color: #fff;
  text-shadow: 0 0 22px color-mix(in srgb, var(--tc) 75%, transparent);
}
.cd-label { font: 600 0.7rem var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 0.25rem; }
.countdown.final-day .cd-num { color: #fca5a5; animation: final-pulse 1s ease-in-out infinite; }
.countdown.done .cd-num { color: var(--muted); text-shadow: none; }
@keyframes final-pulse { 50% { opacity: 0.55; } }
.cc-final { font: 700 2.6rem var(--display); text-align: center; letter-spacing: 0.05em; }
.cc-journey { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.cc-end { display: grid; justify-items: center; gap: 0.15rem; text-align: center; min-width: 4.5rem; }
.cc-end-label { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.cc-end small { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; }
.cc-end.goal .rank-icon { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--tc) 75%, transparent)); }
.cc-bar { height: 12px; border-radius: 999px; background: rgba(6, 10, 22, 0.75); border: 1px solid var(--line); overflow: hidden; }
.cc-bar > span { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc)); }
.cc-togo { margin-top: 0.5rem; text-align: center; font-weight: 600; font-size: 0.9rem; }
.cc-reward {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border-radius: 14px;
  background: linear-gradient(90deg, rgba(242, 182, 50, 0.2), rgba(242, 182, 50, 0.04)); border: 1px solid rgba(242, 182, 50, 0.5);
}
.cc-reward-icon { font-size: 1.9rem; line-height: 1; }
.cc-reward small { display: block; color: #fcd877; font: 700 0.7rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.cc-reward strong { font: 700 1.2rem/1.2 var(--display); }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
/* Race / climb: the whole crew with live standings */
.cc-goal { margin-left: auto; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--tc) 75%, transparent)); }
.cc-final.names { font-size: clamp(1.5rem, 4vw, 2.1rem); overflow-wrap: anywhere; color: #fcd877; }
.cc-standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.cc-standings li {
  display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) auto 4.6rem; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.6rem; border-radius: 10px; background: rgba(6, 10, 22, 0.55); border: 1px solid var(--line);
}
.cc-standings li.won { border-color: rgba(242, 182, 50, 0.6); background: linear-gradient(90deg, rgba(242, 182, 50, 0.18), rgba(6, 10, 22, 0.55)); }
.st-pos { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.st-player { display: flex; align-items: center; gap: 0.5rem; min-width: 0; color: inherit; text-decoration: none; }
.st-name { display: grid; gap: 0.25rem; min-width: 0; font-weight: 600; }
.st-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar { display: block; height: 5px; border-radius: 999px; background: rgba(6, 10, 22, 0.9); overflow: hidden; }
.st-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--tc); }
.st-rank { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-2); white-space: nowrap; }
.st-val { text-align: right; font-weight: 600; font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-val strong { font: 700 1.15rem var(--display); }
.btn-hype { background: linear-gradient(135deg, #f97316, #ef4444); border-color: transparent; color: #fff; }
.btn-hype:hover { background: linear-gradient(135deg, #fb923c, #f43f5e); border-color: transparent; }
.btn-hype span { background: rgba(0, 0, 0, 0.25); border-radius: 999px; padding: 0 0.5rem; font-variant-numeric: tabular-nums; }
.btn-hype.bump { animation: hype-bump 0.35s ease; }
@keyframes hype-bump { 40% { transform: scale(1.12); } }
.rank-icon.xl { width: 5rem; height: 5rem; }

/* ---- Coin flip ---- */
.flip-bar { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.flip-bar.has-last { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.flip-cta, .btn-flip { background: linear-gradient(100deg, #1559b8 0%, #1e88e5 46%, #ef6c00 54%, #b7410e 100%); color: #fff; border: 0; cursor: pointer; }
.flip-cta {
  display: flex; align-items: center; justify-content: center; gap: 1.1rem; width: 100%; min-height: 5.75rem; padding: 1rem 1.5rem;
  border-radius: 18px; text-align: left; font: inherit;
  box-shadow: 0 20px 44px -24px rgba(56, 189, 248, 0.9), 0 20px 44px -24px rgba(251, 146, 60, 0.9);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.flip-cta:hover, .btn-flip:hover { filter: brightness(1.1); }
.flip-cta:active { transform: scale(0.985); }
.flip-cta:focus-visible, .btn-flip:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.flip-cta-coin { font-size: 3rem; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.flip-cta:hover .flip-cta-coin { animation: coin-wobble 0.6s ease; }
.flip-cta strong { display: block; font: 700 2.4rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.flip-cta small { display: block; font-size: 0.92rem; font-weight: 500; margin-top: 0.25rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
@keyframes coin-wobble { 30% { transform: rotate(-14deg) scale(1.1); } 60% { transform: rotate(10deg) scale(1.1); } }
.flip-last { display: grid; align-content: center; gap: 0.4rem; padding: 0.85rem 1.1rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.flip-last-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin-bottom: 0.1rem; }
.flip-last-tag { font: 700 0.8rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.flip-last-side { display: flex; align-items: baseline; gap: 0.6rem; font-weight: 600; min-width: 0; }
.flip-last-side b { flex: none; width: 4.2rem; font: 700 0.85rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.flip-last-side.blue b { color: var(--blue); }
.flip-last-side.orange b { color: var(--orange); }
.flip-picks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
/* No tick boxes here (they eat the room names need on a phone): picked players light up, the rest dim. */
.flip-picks .pick { position: relative; min-width: 0; gap: 0.4rem; padding: 0.4rem 0.45rem; font-size: 0.88rem; }
.flip-picks .pick input { position: absolute; opacity: 0; pointer-events: none; }
.flip-picks .pick:not(:has(input:checked)) { opacity: 0.45; }
.flip-picks .pick:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.flip-picks .pick span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flip-picks .avatar { flex: none; }
.btn-flip { width: 100%; padding: 0.85rem 1rem; border-radius: 12px; font: 700 1.4rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.btn-flip:disabled { opacity: 0.6; cursor: wait; }
.coin-stage { display: grid; justify-items: center; gap: 1.1rem; padding: 2rem 0 1rem; perspective: 900px; }
.coin { position: relative; width: 8.5rem; height: 8.5rem; transform-style: preserve-3d; animation: coin-flip 1.5s cubic-bezier(0.3, 0.7, 0.35, 1) forwards; }
.coin.land-orange { transform: rotateY(180deg); animation-name: coin-flip-orange; }
.coin-face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; font-size: 3.4rem;
  backface-visibility: hidden; border: 6px solid rgba(255, 255, 255, 0.3); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.15);
}
.coin-face.blue { background: radial-gradient(circle at 35% 30%, #7dd3fc, #1e6fd0 70%); }
.coin-face.orange { background: radial-gradient(circle at 35% 30%, #fdba74, #e2600b 70%); transform: rotateY(180deg); }
@keyframes coin-flip { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-3rem) rotateY(900deg); } 100% { transform: translateY(0) rotateY(1800deg); } }
@keyframes coin-flip-orange { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-3rem) rotateY(990deg); } 100% { transform: translateY(0) rotateY(1980deg); } }
.coin-caption { font: 700 1.3rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.flip-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.75rem; margin: 0.75rem 0 1rem; }
.flip-team { min-width: 0; padding: 0.85rem 0.95rem; border-radius: 14px; border: 1px solid; animation: team-in 0.35s ease both; }
.flip-team.blue { border-color: rgba(56, 189, 248, 0.55); background: linear-gradient(160deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.04)); }
.flip-team.orange { border-color: rgba(251, 146, 60, 0.55); background: linear-gradient(160deg, rgba(251, 146, 60, 0.22), rgba(251, 146, 60, 0.04)); animation-delay: 0.12s; }
.flip-team-name { font: 700 1.25rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.55rem; }
.flip-team.blue .flip-team-name { color: var(--blue); }
.flip-team.orange .flip-team-name { color: var(--orange); }
.flip-team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.flip-team li { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; min-width: 0; }
.flip-team li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flip-vs { font: 700 1.2rem var(--display); color: var(--muted); text-align: center; }
@keyframes team-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
.flip-bench { padding: 0.6rem 0.8rem; border-radius: 10px; background: #0c1426; border: 1px dashed var(--line); font-size: 0.9rem; }
.flip-actions { flex-wrap: wrap; }

/* ---- Awards & records ---- */
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 0.75rem; }
.award-card {
  display: grid; justify-items: center; gap: 0.25rem; text-align: center; padding: 1rem 0.75rem;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.12), var(--panel-2) 60%); border: 1px solid var(--line); border-radius: 12px;
}
.award-icon { font-size: 1.9rem; line-height: 1; }
.award-title { font: 700 1.1rem var(--display); letter-spacing: 0.03em; }
.award-winner { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; margin-top: 0.2rem; }
.award-winner:hover span { text-decoration: underline; }
.award-value { font: 700 1rem var(--display); color: #fcd877; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 0.75rem; }
.record-card { display: grid; gap: 0.3rem; align-content: start; padding: 0.85rem 0.95rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.record-card.unset { opacity: 0.6; }
.record-head { display: flex; align-items: center; gap: 0.45rem; color: var(--text-2); font-weight: 600; font-size: 0.85rem; }
.record-icon { font-size: 1.15rem; }
.record-value { font: 700 1.5rem/1.1 var(--display); }
.record-holder { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
a.record-holder:hover span { text-decoration: underline; }
.record-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Compare ---- */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.vs-side { display: grid; justify-items: center; gap: 0.45rem; text-align: center; min-width: 0; }
.vs-side select { width: auto; max-width: 100%; border-color: var(--side); }
.vs-person { display: grid; justify-items: center; gap: 0.3rem; }
.vs-person .avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--side) 55%, transparent); }
.vs-name { font: 700 1.4rem var(--display); }
.vs-mid { display: grid; justify-items: center; gap: 0.2rem; }
.vs-badge { font: 700 1.6rem var(--display); background: linear-gradient(90deg, var(--series-1), var(--series-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vs-h2h { font: 700 1.3rem var(--display); }
.vs-rank { display: grid; grid-template-columns: 1fr 4rem 1fr; align-items: center; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(36, 50, 79, 0.5); }
.vs-rank:last-child { border-bottom: 0; }
.vs-rank-side { display: flex; padding: 0.3rem 0.6rem; border-radius: 10px; min-width: 0; max-width: 100%; }
.vs-rank-side.a { justify-self: end; }
.vs-rank-side.b { justify-self: start; }
.vs-rank-side.lead.a { background: color-mix(in srgb, var(--series-1) 16%, transparent); }
.vs-rank-side.lead.b { background: color-mix(in srgb, var(--series-2) 16%, transparent); }
.vs-label { text-align: center; color: var(--text-2); font-size: 0.82rem; font-weight: 600; }
.vs-row { display: grid; grid-template-columns: 4.5rem 1fr 6.5rem 1fr 4.5rem; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
.vs-val { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-row .vs-val:first-child { text-align: right; }
.vs-val.lead { color: var(--text); font-weight: 700; }
.vs-bar { display: flex; height: 8px; background: #0c1426; border-radius: 999px; overflow: hidden; }
.vs-bar.a { justify-content: flex-end; }
.vs-bar > span { height: 100%; border-radius: 999px; }
.vs-bar.a > span { background: var(--series-1); }
.vs-bar.b > span { background: var(--series-2); }

/* ---- Settings ---- */
.status-pill { font: 600 0.78rem var(--body); color: var(--muted); }
.status-pill.on { color: var(--good); }
.howto { padding-left: 1.2rem; color: var(--text-2); font-size: 0.9rem; }
.howto li { margin: 0.3rem 0; }

/* ---- Empty states, toasts, modal ---- */
.empty { text-align: center; padding: 2.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--text-2); }
.empty-title { font: 700 1.3rem var(--display); color: var(--text); margin-bottom: 0.3rem; }
.loading { text-align: center; padding: 3rem; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: grid; gap: 0.5rem; width: min(380px, calc(100vw - 2rem)); }
.toast {
  background: #121c33; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px;
  padding: 0.65rem 0.85rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-size: 0.88rem; white-space: pre-line;
  animation: toast-in 0.25s ease;
}
.toast div { color: var(--text-2); margin-top: 0.15rem; }
.toast-good { border-left-color: var(--good); }
.toast-bad, .toast-error { border-left-color: var(--bad); }
.toast-gold { border-left-color: var(--gold); }
.toast-purple { border-left-color: var(--purple); }
.toast-orange { border-left-color: var(--orange); }
.toast-out { opacity: 0; transform: translateY(6px); transition: all 0.3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 14, 0.7); display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.modal {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal-x { position: absolute; top: 0.8rem; right: 0.8rem; background: none; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .grid-home.home-grid { grid-template-columns: 1fr; }
  .home-grid .feed-panel .feed { max-height: 26rem; }
}
@media (max-width: 1150px) {
  .brand span:last-child, .me-pick span { display: none; }
}
@media (max-width: 1000px) {
  .grid-home { grid-template-columns: 1fr; }
  .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 14px; padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  /* backdrop-filter would trap the fixed bottom nav inside the top bar */
  .topbar {
    padding: calc(0.5rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.5rem max(1rem, env(safe-area-inset-left));
    gap: 0.6rem; backdrop-filter: none; background: var(--bg);
  }
  .brand span:last-child { display: none; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    background: rgba(10, 15, 30, 0.96); border-top: 1px solid var(--line); padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  }
  .nav a { flex-direction: column; gap: 0; padding: 0.3rem 0.2rem; font-size: 0.64rem; min-width: 0; }
  .vs-head { grid-template-columns: 1fr; }
  .flip-bar.has-last { grid-template-columns: 1fr; }
  .flip-cta { min-height: 5rem; padding: 0.9rem 1rem; }
  .flip-cta strong { font-size: 2.1rem; }
  .flip-teams { grid-template-columns: 1fr; gap: 0.5rem; }
  .challenge-card { padding: 1.1rem 1rem; gap: 0.9rem; }
  .cc-name { font-size: 1.7rem; }
  .countdown { gap: 0.4rem; }
  .cd-cell { padding: 0.6rem 0.15rem 0.5rem; border-radius: 12px; }
  .cc-journey { gap: 0.6rem; }
  .cc-end { min-width: 3.6rem; }
  .cc-end .rank-icon.lg { width: 2.8rem; height: 2.8rem; }
  .cc-end .rank-icon.xl { width: 3.8rem; height: 3.8rem; }
  .cc-standings li { grid-template-columns: 1.1rem minmax(0, 1fr) auto 4.2rem; gap: 0.4rem; padding: 0.35rem 0.45rem; }
  .st-rank > span:last-child { display: none; } /* the emblem is enough on a phone; the full rank is in its tooltip */
  .crew-card .avatar.xl { width: 3.6rem; height: 3.6rem; font-size: 1.8rem; }
  .vs-row { grid-template-columns: 3.6rem 1fr 5rem 1fr 3.6rem; gap: 0.35rem; }
  .vs-rank { grid-template-columns: 1fr 2.6rem 1fr; gap: 0.4rem; }
  .vs-rank .rank-text small { display: none; }
  .nav a.active { box-shadow: inset 0 2px 0 var(--blue); }
  .nav .ico { font-size: 1.15rem; }
  /* the nav moves to the bottom on phones, so the top bar has room for the "You" picker */
  .me-pick span { display: inline; }
  .me-pick select { max-width: 11rem; }
  .view { padding: 1rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  .grid-2, .rank-cards, .tiles { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none; }
  .board th, .board td { padding: 0.55rem 0.5rem; }
  .board .rank-text small { display: none; }
  .toasts { bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
