/* Layout: broadcast-style app shell. Dark scoreboard band on top with tabs, content column below, score-bug cards. */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --ink: #0e1726;
  --muted: #586377;
  --line: #d8dee7;
  --band: #0e1726;
  --band-2: #1a2538;
  --band-ink: #f2f5fa;
  --band-muted: #9aa7bb;
  --accent: #d9540c;
  --accent-soft: #fbe5d8;
  --court: #1d4ed8;
  --court-soft: #dce6fd;
  --live: #d92d20;
  --good: #12804a;
  --shadow: 0 1px 2px rgba(14,23,38,.06), 0 4px 14px rgba(14,23,38,.06);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a101b; --surface: #121a28; --surface-2: #182233; --ink: #e8edf5; --muted: #94a1b5;
    --line: #263248; --band: #060a12; --band-2: #121b2b; --band-ink: #f2f5fa; --band-muted: #8d9ab0;
    --accent: #ff7a33; --accent-soft: #3a2316; --court: #7aa2ff; --court-soft: #18264a;
    --live: #ff5d52; --good: #3ccf7f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a101b; --surface: #121a28; --surface-2: #182233; --ink: #e8edf5; --muted: #94a1b5;
  --line: #263248; --band: #060a12; --band-2: #121b2b; --band-ink: #f2f5fa; --band-muted: #8d9ab0;
  --accent: #ff7a33; --accent-soft: #3a2316; --court: #7aa2ff; --court-soft: #18264a;
  --live: #ff5d52; --good: #3ccf7f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--band); color: var(--band-ink); }
.top-inner, .wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-inner { display: flex; align-items: center; gap: 20px; padding-block: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 26px; letter-spacing: .04em; text-transform: uppercase; padding-bottom: 10px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-family: var(--f-body); font-weight: 600; font-size: 11px; letter-spacing: .1em; color: var(--band-muted); border: 1px solid var(--band-2); padding: 2px 7px; border-radius: 99px; }
.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: var(--band-muted); text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px 12px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--band-ink); }
.tabs a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--accent); }
@media (max-width: 640px) { .tabs { margin-left: 0; width: 100%; } .tabs a { flex: 1; text-align: center; padding-inline: 6px; font-size: 16px; } .brand { padding-bottom: 0; } }

/* ticker */
.ticker { background: var(--band-2); color: var(--band-ink); overflow: hidden; }
.ticker-track { display: flex; gap: 28px; padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); white-space: nowrap; animation: tick 50s linear infinite; width: max-content; font-size: 13px; }
.ticker-track span b { font-family: var(--f-display); font-size: 15px; letter-spacing: .02em; }
.ticker-track .tl { color: var(--live); font-weight: 700; font-size: 11px; letter-spacing: .08em; margin-right: 6px; }
.ticker-track .tf { color: var(--band-muted); font-weight: 600; font-size: 11px; letter-spacing: .08em; margin-right: 6px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

main { padding-block: 22px 60px; }
.view[hidden] { display: none; }
.view-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.05; }
h1 { font-size: 38px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
h3 { font-size: 18px; font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sub { color: var(--muted); margin: 4px 0 0; }
.sample { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); padding: 4px 10px; border-radius: 99px; }

/* controls */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.star { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.star svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.star[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.star[aria-pressed="true"] svg { fill: currentColor; }

/* team chip */
.chip { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 12px; letter-spacing: .02em; color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.chip.sm { width: 26px; height: 26px; font-size: 10px; border-radius: 6px; }
.chip.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 12px; }
.rk { font-family: var(--f-display); font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 3px; }

/* ---------- scores ---------- */
.dates { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.dates button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 14px; text-align: center; min-width: 78px; }
.dates button span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dates button b { font-family: var(--f-display); font-size: 20px; font-weight: 700; }
.dates button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.dates button[aria-pressed="true"] span { color: inherit; opacity: .75; }
.score-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.score-tools .count { color: var(--muted); font-size: 14px; margin-left: auto; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); text-align: left; padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, border-color .12s; }
.game:hover { border-color: var(--muted); transform: translateY(-1px); }
.game-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); gap: 8px; }
.game-top .event { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.status { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.status.live { color: var(--live); }
.status.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status.live::before { animation: none; } }
.status.final { color: var(--muted); }
.trow { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.trow .tn { flex: 1; min-width: 0; }
.trow .tn b { font-family: var(--f-display); font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.trow .tn small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.trow .pts { font-family: var(--f-display); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; }
.trow.lose .tn b, .trow.lose .pts { color: var(--muted); font-weight: 600; }
.trow .fav { color: var(--accent); font-size: 12px; margin-left: 4px; }
.game-foot { margin-top: auto; display: flex; justify-content: space-between; padding: 8px 14px 10px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); gap: 8px; }
.game-foot .odds { font-variant-numeric: tabular-nums; }
.flash { animation: flash .9s ease; }
@keyframes flash { 0% { color: var(--accent); transform: scale(1.12); } 100% { transform: none; } }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 36px 20px; text-align: center; color: var(--muted); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(6,10,18,.5); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--bg); z-index: 41; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.25); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.dr-head { background: var(--band); color: var(--band-ink); padding: 16px 18px 18px; }
.dr-close { float: right; border: 1px solid var(--band-2); background: transparent; color: var(--band-ink); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.dr-event { font-size: 12px; color: var(--band-muted); letter-spacing: .04em; }
.dr-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 14px; text-align: center; }
.dr-score .side { display: grid; justify-items: center; gap: 6px; }
.dr-score .side b { font-family: var(--f-display); font-size: 18px; }
.dr-score .side small { color: var(--band-muted); font-size: 12px; }
.dr-score .big { font-family: var(--f-display); font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }
.dr-score .mid { font-size: 12px; color: var(--band-muted); display: grid; gap: 4px; justify-items: center; }
.dr-body { padding: 16px 18px 28px; display: grid; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-family: var(--f-body); font-weight: 700; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 3.2em 1fr 3.2em; gap: 8px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.cmp-row .lbl { grid-column: 1 / -1; text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: -6px; }
.cmp-row .v:last-child { text-align: right; }
.cmp-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.cmp-bar i { display: block; height: 100%; }
.leaders { display: grid; gap: 10px; }
.leader { display: flex; align-items: center; gap: 10px; }
.leader div { flex: 1; min-width: 0; }
.leader b { display: block; }
.leader small { color: var(--muted); }
.leader .stat { font-family: var(--f-display); font-size: 22px; font-weight: 700; }
.wp { display: block; width: 100%; height: auto; }

/* ---------- bracket ---------- */
.br-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .br-layout { grid-template-columns: minmax(0, 1fr); } }
.br-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.bracket { display: grid; grid-template-columns: repeat(4, 180px) 150px; gap: 18px; min-width: 820px; }
.round { display: flex; flex-direction: column; }
.round h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.round .ms { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.match { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.slot { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: transparent; padding: 6px 8px; text-align: left; font-size: 13.5px; min-height: 34px; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot:not(:disabled):hover { background: var(--court-soft); }
.slot:disabled { cursor: default; color: var(--muted); }
.slot .sd { font-family: var(--f-display); font-weight: 700; width: 1.6em; color: var(--muted); font-size: 13px; }
.slot .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.slot.picked { background: var(--court); color: #fff; }
.slot.picked .sd { color: rgba(255,255,255,.75); }
.slot.out { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.slot .pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot.picked .pct { color: rgba(255,255,255,.8); }
.champ { flex: 1; display: grid; place-items: center; }
.champ-box { border: 2px dashed var(--line); border-radius: 12px; padding: 16px 12px; text-align: center; width: 100%; }
.champ-box.set { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.champ-box b { font-family: var(--f-display); font-size: 22px; display: block; margin-top: 6px; }
.champ-box small { color: var(--muted); font-size: 12px; }
.br-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.prog { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.prog-track { flex: 1; height: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.prog-track i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.lb li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lb li:last-child { border-bottom: 0; }
.lb ol { list-style: none; margin: 0; padding: 0; }
.lb .pos { font-family: var(--f-display); font-weight: 700; color: var(--muted); }
.lb .you { color: var(--accent); font-weight: 700; }
.lb small { display: block; color: var(--muted); font-size: 12px; }
.lb .pk { font-size: 12px; color: var(--muted); text-align: right; }
.scoring { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.scoring b { color: var(--ink); }

/* ---------- teams ---------- */
.tm-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .tm-layout { grid-template-columns: minmax(0, 1fr); } }
.tm-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tm-search { padding: 10px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.tm-search input, .tm-search select { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); }
.tm-items { max-height: 640px; overflow-y: auto; }
@media (max-width: 860px) { .tm-items { max-height: 260px; } }
.tm-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 9px 12px; text-align: left; }
.tm-item:hover { background: var(--surface-2); }
.tm-item[aria-current="true"] { background: var(--court-soft); }
.tm-item div { flex: 1; min-width: 0; }
.tm-item b { display: block; font-weight: 600; }
.tm-item small { color: var(--muted); font-size: 12px; }
.tm-item .rec { font-family: var(--f-display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.tm-detail { display: grid; gap: 16px; min-width: 0; }
.tm-hero { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.tm-hero-band { padding: 18px; display: flex; align-items: center; gap: 14px; color: #fff; flex-wrap: wrap; position: relative; }
.tm-hero-band::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 46px); pointer-events: none; }
.tm-hero-band > * { position: relative; z-index: 1; }
.tm-hero-band h2 { font-size: 34px; font-weight: 800; }
.tm-hero-band p { margin: 2px 0 0; opacity: .85; font-size: 14px; }
.tm-hero-band .star { margin-left: auto; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.tm-hero-band .star[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }
.tm-facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.tm-facts div { padding: 12px 16px; border-right: 1px solid var(--line); }
.tm-facts div:last-child { border-right: 0; }
.tm-facts span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tm-facts b { font-family: var(--f-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tm-facts { grid-template-columns: repeat(2, 1fr); } .tm-facts div:nth-child(2) { border-right: 0; } .tm-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.metrics { display: grid; gap: 12px; }
.metric { display: grid; grid-template-columns: 9em minmax(0, 1fr) 4em; gap: 12px; align-items: center; font-size: 14px; }
.metric .mv { font-family: var(--f-display); font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.mtrack { position: relative; height: 10px; background: var(--surface-2); border-radius: 99px; border: 1px solid var(--line); }
.mtrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--court); }
.mtrack em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--court); }
.legend span.avg::before { width: 2px; background: var(--ink); opacity: .55; }
.tbl-wrap { overflow-x: auto; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th[aria-sort] { color: var(--accent); }
td .pn b { font-weight: 600; }
td .pn small { color: var(--muted); margin-left: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.sched li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sched li:last-child { border-bottom: 0; }
.sched ul { list-style: none; margin: 0; padding: 0; }
.sched .wl { font-family: var(--f-display); font-weight: 700; width: 1.2em; }
.sched .wl.w { color: var(--good); }
.sched .wl.l { color: var(--live); }
.sched .op { flex: 1; min-width: 0; }
.sched .res { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- fan zone ---------- */
.fz-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .fz-layout { grid-template-columns: minmax(0, 1fr); } }
.threads { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.threads h4 { margin: 0; padding: 10px 14px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.thread-btn { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 14px; }
.thread-btn:hover { background: var(--surface-2); }
.thread-btn[aria-current="true"] { background: var(--court-soft); }
.thread-btn b { display: block; font-weight: 600; font-size: 14px; }
.thread-btn small { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.thread-btn .status { font-size: 10px; }
.fz-main { display: grid; gap: 14px; min-width: 0; }
.poll-opt { display: block; width: 100%; position: relative; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; text-align: left; overflow: hidden; margin-top: 8px; font-weight: 600; }
.poll-opt i { position: absolute; inset: 0 auto 0 0; background: var(--court-soft); transition: width .3s; }
.poll-opt span { position: relative; display: flex; justify-content: space-between; gap: 10px; }
.poll-opt span em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); }
.poll-opt.mine { border-color: var(--court); }
.poll-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.msgs { display: grid; gap: 2px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom: 0; }
.ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.msg-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg-h b { font-weight: 700; font-size: 14px; }
.msg-h .flair { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.msg-h small { color: var(--muted); font-size: 12px; }
.msg p { margin: 2px 0 6px; overflow-wrap: anywhere; }
.msg-act { display: flex; gap: 6px; }
.msg-act button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 2px 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-act button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.msg.new { animation: slidein .35s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }
.composer { display: flex; gap: 8px; }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--ink); }
.th-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.th-score { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pred { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.pred input { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; }
.pred label { font-size: 12px; color: var(--muted); font-weight: 600; display: grid; gap: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; z-index: 60; box-shadow: var(--shadow); }
footer { color: var(--muted); font-size: 12px; text-align: center; padding-block: 0 30px; }

/* ---------- real-data additions ---------- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.logo { width: 34px; height: 34px; flex: none; object-fit: contain; }
.logo.sm { width: 24px; height: 24px; }
.logo.lg { width: 60px; height: 60px; }
.logo-wrap { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; }
.dr-head .logo, .tm-hero-band .logo { background: #fff; border-radius: 12px; padding: 5px; }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: var(--r); }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel.card-h { height: 150px; }
.err { background: var(--surface); border: 1px solid var(--live); color: var(--ink); border-radius: var(--r); padding: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.updated { font-size: 12px; color: var(--muted); }
.box-tbl td:first-child { min-width: 150px; }
.box-tbl td small { color: var(--muted); margin-left: 4px; }
.box-tbl tr.starter-end td { border-bottom: 2px solid var(--line); }
.tabs-sm { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs-sm button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.tabs-sm button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.name-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.name-row input, .name-row select { flex: 1; min-width: 140px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 9px 12px; font: inherit; color: var(--ink); }
.attrib { color: var(--muted); font-size: 12px; }
.trend-up { color: var(--good); } .trend-down { color: var(--live); }
.dates button { min-width: 74px; }
.game-foot span:last-child { text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.sched .date { color: var(--muted); font-size: 12px; width: 4.2em; flex: none; }
.metric-head { display: grid; grid-template-columns: 9em minmax(0,1fr) 4em; gap: 12px; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.vs-tbl td, .vs-tbl th { text-align: right; }
.vs-tbl td:first-child, .vs-tbl th:first-child { text-align: left; }
.vs-tbl .better { color: var(--good); font-weight: 700; }
/* Grid children default to min-width:auto, which lets wide tables stretch the layout. */
.tm-detail > *, .two > *, .fz-main > *, .dr-body > *, .br-layout > *, .tm-layout > *, .fz-layout > * { min-width: 0; }
.drawer { overflow-x: hidden; }

/* ---------- accounts ---------- */
.brand { order: 1; }
.tabs { order: 2; }
.acct-btn { order: 3; margin-bottom: 10px; border: 1px solid var(--band-2); background: transparent; color: var(--band-ink); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; max-width: 14em; }
.acct-btn:hover { border-color: var(--band-muted); }
.acct-btn .ava { width: 24px; height: 24px; font-size: 11px; flex: none; }
.acct-btn span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .acct-btn { order: 1; margin-left: auto; margin-bottom: 0; } .tabs { order: 3; } }

.dlg { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(6,10,18,.55); }
.dlg-inner { padding: 20px; display: grid; gap: 14px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg-head h2 { font-size: 24px; }
.dlg-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.dlg .reason { margin: 0; color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--ink); width: 100%; }
.field .hint { font-size: 12px; color: var(--muted); }
.form-err { color: var(--live); font-size: 14px; font-weight: 600; margin: 0; }
.form-err:empty { display: none; }
.dlg .btn.primary { width: 100%; padding: 11px; font-size: 15px; }
.switch-line { text-align: center; font-size: 14px; color: var(--muted); margin: 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--court); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dlg-sec { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.dlg-sec h3 { margin: 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--f-body); }
.btn.danger { color: var(--live); border-color: var(--live); }
.btn.danger.solid { background: var(--live); color: #fff; }
.signin-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.posting-as { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.br-side { display: grid; gap: 18px; align-content: start; }
.grp-list { display: flex; gap: 6px; flex-wrap: wrap; }
.grp-list button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.grp-list button[aria-pressed="true"] { background: var(--court); color: #fff; border-color: var(--court); }
.grp-forms { display: grid; gap: 8px; margin-top: 10px; }
.grp-forms form { display: flex; gap: 6px; }
.grp-forms input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); }
.grp-forms .btn { padding: 8px 12px; }
.grp-code { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.grp-code code { font-family: var(--f-display); font-size: 20px; font-weight: 700; letter-spacing: .14em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; }
.grp-members li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.grp-members li:last-child { border-bottom: 0; }
.grp-members ol { list-style: none; margin: 0; padding: 0; }
.grp-members .who { min-width: 0; }
.grp-members .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-members .who small { color: var(--muted); font-size: 12px; }
.grp-members .pick { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; text-align: right; }
.grp-members .you b { color: var(--accent); }
.grp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- pick'em ---------- */
@media (max-width: 640px) { .tabs a { font-size: 14px; letter-spacing: .03em; padding-inline: 2px; } }
.pk-games { display: grid; gap: 12px; align-content: start; }
.pk-game { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pk-top { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pk-top .event { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: right; }
.pk-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: stretch; padding: 12px 14px; }
.pk-at { align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pk-team { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; text-align: left; min-width: 0; transition: border-color .12s, background .12s; }
.pk-team:not(:disabled):hover { border-color: var(--court); }
.pk-team:disabled { cursor: default; }
.pk-team .nm { flex: 1; min-width: 0; }
.pk-team .nm b { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-team .nm small { color: var(--muted); font-size: 12px; }
.pk-team .sc { font-family: var(--f-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-team.mine { border-color: var(--court); background: var(--court-soft); }
.pk-team { position: relative; }
.pk-team .tag { position: absolute; top: -9px; left: 10px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--court); color: #fff; border-radius: 99px; padding: 1px 8px; }
.pk-team.won .nm b { color: var(--ink); }
.pk-team.lost { opacity: .6; }
.pk-team.mine.won { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.pk-team.mine.won .tag { background: var(--good); }
.pk-team.mine.lost { border-color: var(--live); opacity: 1; background: color-mix(in srgb, var(--live) 10%, var(--surface)); }
.pk-team.mine.lost .tag { background: var(--live); }
@media (max-width: 560px) {
  .pk-teams { gap: 6px; padding: 12px 10px 10px; }
  .pk-team { gap: 7px; padding: 9px 8px; }
  .pk-team .logo, .pk-team .chip { width: 26px; height: 26px; font-size: 9px; }
  .pk-team .nm b { font-size: 16px; }
  .pk-team .sc { font-size: 20px; }
  .pk-at { font-size: 10px; }
}
@media (max-width: 340px) { .pk-teams { grid-template-columns: 1fr; } .pk-at { justify-self: center; } }
.pk-foot { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; font-size: 12px; color: var(--muted); }
.pk-split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.pk-split i { display: block; height: 100%; }
.pk-split-lbl { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.pk-result { font-weight: 700; }
.pk-result.ok { color: var(--good); } .pk-result.bad { color: var(--live); }
.pk-lock { display: inline-flex; align-items: center; gap: 5px; }
.pk-board-ctl { display: grid; gap: 8px; margin-bottom: 10px; }
.pk-board-ctl select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); width: 100%; }
.pk-board-ctl .seg { justify-self: start; }
.pk-rows { list-style: none; margin: 0; padding: 0; }
.pk-rows li { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pk-rows li:last-child { border-bottom: 0; }
.pk-rows .pos { font-family: var(--f-display); font-weight: 700; color: var(--muted); font-size: 16px; }
.pk-rows .who { min-width: 0; }
.pk-rows .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pk-rows .who small { color: var(--muted); font-size: 12px; }
.pk-rows .pts { text-align: right; font-variant-numeric: tabular-nums; }
.pk-rows .pts b { font-family: var(--f-display); font-size: 20px; }
.pk-rows .pts small { display: block; color: var(--muted); font-size: 11px; }
.pk-rows li.you .who b { color: var(--accent); }
.pk-rows li.gap { display: block; text-align: center; color: var(--muted); padding: 2px 0; border-bottom: 0; }
.pk-mini { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.pk-mini span { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; background: var(--surface-2); border: 1px solid var(--line); }
.pk-mini span.ok { color: var(--good); border-color: var(--good); }
.pk-mini span.bad { color: var(--live); border-color: var(--live); text-decoration: line-through; }
