:root {
  --bg: #0b0c0e; --bg2: #0e1013; --panel: #121417; --line: #23262c; --line2: #1a1d22; --line3: #2c3037;
  --text: #e8e6e1; --muted: #8a8f98; --dim: #5c6068; --amber: #f5a524; --amber-dim: #5a4418;
  --live: #ff5a4a; --win: #4fc98a;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --disp: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--amber); text-decoration: none; } a:hover { color: #ffc75a; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font-size: 16px; }
.disp { font-family: var(--disp); letter-spacing: 0.04em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.amber { color: var(--amber); }
.up { color: var(--win); } .down { color: var(--live); }
[hidden] { display: none !important; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 22px; padding: 0 24px; padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 20; }
.brand { font-size: 28px; color: var(--amber); line-height: 1; } .brand span { color: var(--text); }
.nav { display: flex; gap: 18px; height: 56px; align-items: stretch; }
.nav a { display: flex; align-items: center; color: var(--muted); font-weight: 500; font-size: 13px; border-bottom: 2px solid transparent; padding-top: 2px; }
.nav a.active { color: var(--amber); border-bottom-color: var(--amber); }
.spacer { flex-grow: 1; }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.ok .dot { background: var(--win); } .status.live .dot { background: var(--live); animation: pulse 1.4s infinite; } .status.err .dot { background: var(--live); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.btn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line3); border-radius: 3px; color: #c9cbd0; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn-amber { color: var(--amber); border-color: var(--amber-dim); }
.btn.on { color: var(--bg); background: var(--amber); border-color: var(--amber); }

/* Segmented view switch (Rankings, TV) */
.viewseg { display: inline-flex; border: 1px solid var(--line3); border-radius: 8px; padding: 3px; gap: 2px; background: var(--panel); flex-shrink: 0; }
.viewseg .vs { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 6px; border: 0; background: none; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.viewseg .vs svg { width: 15px; height: 15px; fill: currentColor; }
.viewseg .vs:hover { color: var(--text); }
.viewseg .vs.on { background: var(--amber); color: var(--bg); font-weight: 600; }
.tvzoom { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; font-size: 11px; color: var(--muted); }
.tvzoom button { width: 34px; height: 34px; border: 1px solid var(--line3); border-radius: 50%; background: var(--panel); color: var(--text); font-size: 18px; line-height: 1; }
.tvzoom .hint { letter-spacing: .1em; font-size: 9px; }

/* My teams strip */
.myteams { display: flex; align-items: stretch; gap: 0; padding: 0 24px; height: 68px; border-bottom: 1px solid var(--line); background: var(--bg2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.myteams::-webkit-scrollbar { display: none; }
.myteams > .label { align-self: center; margin-right: 18px; }
.myteams > .chip.add { align-self: center; margin-left: 14px; flex-shrink: 0; }
.slab { position: relative; display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 270px; padding: 0 60px 0 24px; margin-left: -20px; color: var(--text); overflow: hidden; isolation: isolate;
  clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
  background: linear-gradient(100deg, color-mix(in srgb, var(--c) 55%, #000) 0%, color-mix(in srgb, var(--c) 22%, var(--bg2)) 70%, var(--bg2) 100%); }
.slab:hover { color: var(--text); filter: brightness(1.15); }
.slab:first-of-type { margin-left: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%); padding-left: 16px; }
.slab .bg { position: absolute; right: -26px; top: -30px; width: 140px; height: 140px; object-fit: contain; opacity: .13; z-index: -1; filter: blur(.4px); }
.slab .lg { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.slab .nm { font-size: 16px; font-weight: 600; letter-spacing: .01em; line-height: 1.1; white-space: nowrap; }
.slab .rec { font-family: var(--mono); font-size: 11px; color: rgba(232,230,225,.72); margin-top: 3px; display: flex; gap: 10px; white-space: nowrap; }
.slab .rec b { color: #fff; font-weight: 500; }
.slab .rec .live { color: var(--live, #ff5a4a); }
.label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.chip { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border: 1px solid var(--line3); border-radius: 30px; font-size: 12px; white-space: nowrap; color: var(--text); }
.chip img { width: 22px; height: 22px; object-fit: contain; }
.chip .rec { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chip.add { border-style: dashed; color: var(--muted); font-family: var(--mono); font-size: 11px; padding: 5px 12px; }

/* Bottom tab bar (phones) */
.tabbar { display: none; }
.hscroll::-webkit-scrollbar { display: none; } .hscroll { scrollbar-width: none; }

/* Mobile list rows (replaces the compact table on phones) */
.mrow { display: grid; grid-template-columns: 74px minmax(0, 1fr) 48px; gap: 4px 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.mrow:last-child { border-bottom: none; }
.mrow .st { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; grid-row: 1 / span 2; align-self: center; }
.mrow .st.live { color: var(--live); }
.mrow .tm { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.mrow .tm img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.mrow .tm .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .sc { font-family: var(--mono); font-size: 14px; text-align: right; color: var(--muted); }
.mrow .sc.w { color: var(--text); }
.mrow .meta { grid-column: 2 / span 2; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* TV list view */
.tvlist .net-h { display: flex; align-items: baseline; gap: 10px; padding: 14px 0 6px; }
.tvlist .net-h .disp { font-size: 20px; letter-spacing: 0.06em; }

/* Layout */
.view { padding: 20px 24px 40px; min-height: 60vh; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.weeks { display: flex; gap: 4px; overflow-x: auto; }
.weeks button { font-family: var(--mono); font-size: 12px; padding: 5px 9px; border-radius: 3px; color: #c9cbd0; }
.weeks button.past { color: var(--dim); }
.weeks button.on { color: var(--bg); background: var(--amber); font-weight: 500; }
.h1 { font-size: 28px; line-height: 1; }
.h2 { font-size: 24px; line-height: 1; }
.h3 { font-size: 20px; line-height: 1; }
.sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 130px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.panel-pad { padding: 16px; }
.hr { height: 1px; background: var(--line); }
.empty { padding: 40px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 12px; }

/* Day group */
.day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.day-head { display: flex; align-items: baseline; gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }

/* Game card */
.card { display: flex; flex-direction: column; gap: 9px; padding: 13px 15px; cursor: pointer; transition: border-color 0.15s; }
.card:hover { border-color: var(--line3); }
.card.live { border-color: #3a2a1a; }
.card-top { display: flex; align-items: center; gap: 10px; }
.badge { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; padding: 3px 7px; border: 1px solid var(--line3); border-radius: 3px; color: #c9cbd0; text-transform: uppercase; white-space: nowrap; }
.badge.live { color: var(--live); border-color: var(--live); }
.badge.final { color: #8a9ab0; }
.badge.net { color: var(--text); }
.team-row { display: flex; align-items: center; gap: 12px; }
.team-row img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.team-row .tn { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.team-row .name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row .rank { font-family: var(--mono); font-size: 11px; color: var(--amber); margin-right: 6px; }
.team-row .rec { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.team-row .score { font-family: var(--disp); font-size: 32px; line-height: 1; color: var(--muted); min-width: 44px; text-align: right; }
.team-row.winner .score, .team-row.leading .score { color: var(--text); }
.team-row .poss { color: var(--amber); font-size: 14px; margin-left: 4px; }
.card-foot { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.card-foot .r { margin-left: auto; }
.mine { color: var(--amber); }

/* Compact rows */
.rows { padding: 2px 6px; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 8px 10px; border-bottom: 1px solid var(--line2); font-size: 13px; vertical-align: middle; }
tr.rowlink { cursor: pointer; } tr.rowlink:hover td { background: rgba(255,255,255,0.02); }
td img.mini { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 6px; }

/* Rankings */
.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rank-row .n { font-family: var(--mono); font-size: 12px; width: 20px; color: var(--muted); }
.rank-row .n.top { color: var(--amber); }
.rank-row img { width: 22px; height: 22px; object-fit: contain; }
.rank-row .nm { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .rec { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rank-row .tr { font-family: var(--mono); font-size: 11px; width: 28px; text-align: right; }
.rank-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* Playoff bracket */
.bracket { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
.bracket .col { display: flex; flex-direction: column; gap: 14px; }
.matchup { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.matchup .mh { font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; justify-content: space-between; letter-spacing: 0.08em; }
.seed-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.seed-row .s { font-family: var(--mono); font-size: 11px; width: 16px; color: var(--amber); }
.seed-row img { width: 26px; height: 26px; object-fit: contain; }
.seed-row .ph { width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--dim); display: flex; align-items: center; justify-content: center; font-family: var(--disp); }
.seed-row .nm { flex-grow: 1; }
.matchup.champ { border-color: var(--amber-dim); background: linear-gradient(180deg, rgba(245,165,36,0.08), rgba(18,20,23,0)); }

/* TV grid */
.tvwrap { overflow-x: auto; }
.tvgrid { min-width: 1100px; position: relative; }
.tv-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--live); z-index: 6; pointer-events: none; box-shadow: 0 0 10px rgba(255,90,74,.5); }
.tv-now i { position: absolute; top: 40px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(255,90,74,.25); }
.tv-now b { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; font-weight: 600; color: #111; background: var(--live); padding: 3px 6px; border-radius: 4px; white-space: nowrap; letter-spacing: .04em; }
.tv-row { display: grid; grid-auto-rows: 58px; border-bottom: 1px solid var(--line2); position: relative; }
.tv-row.head { grid-auto-rows: auto; border-bottom: 1px solid var(--line3); background: var(--bg); z-index: 5; }
.tv-net { font-family: var(--disp); font-size: 19px; letter-spacing: 0.06em; padding: 0 10px; display: flex; align-items: center; border-right: 1px solid var(--line3); background: var(--bg2); grid-row: 1; grid-column: 1; z-index: 2; }
.tv-net.espn { color: var(--amber); } .tv-net.minor { color: var(--muted); }
.tv-slot { font-family: var(--mono); font-size: 10px; line-height: 1.2; text-align: center; padding: 6px 0; color: #c9cbd0; border-left: 1px solid var(--line2); }
.tv-slot span { color: var(--dim); }
.tv-cell { grid-row: 1; border-left: 1px solid #16181c; }
.tv-cell.now { background: rgba(245,165,36,0.06); }
.tv-block { grid-row: 1; margin: 5px 3px; border: 1px solid rgba(255,255,255,.12); border-radius: 4px; display: flex; align-items: stretch; overflow: hidden; cursor: pointer; z-index: 1; position: relative; isolation: isolate;
  background: linear-gradient(100deg, color-mix(in srgb, var(--a, #333) 60%, #000) 0%, color-mix(in srgb, var(--a, #333) 30%, var(--panel)) 44%, color-mix(in srgb, var(--b, #333) 30%, var(--panel)) 56%, color-mix(in srgb, var(--b, #333) 60%, #000) 100%); }
.tv-block:hover { border-color: rgba(255,255,255,.35); }
.tv-block .ghost { position: absolute; top: 50%; width: 92px; height: 92px; object-fit: contain; opacity: .16; z-index: -1; pointer-events: none; transform: translateY(-50%); }
.tv-block .ghost.a { left: 34%; } .tv-block .ghost.b { right: -8px; }
.tv-block.live { border-color: var(--live); } .tv-block.done { opacity: 0.5; }
.tv-block .bar { width: 4px; flex-shrink: 0; }
.tv-block .lines { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 8px 0 12px; flex-grow: 1; min-width: 0; }
.tv-block .ln { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-block .ln img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.tv-block .ln .rank { font-family: var(--mono); font-size: 9px; color: var(--amber); }
.tv-block .st { display: flex; align-items: flex-start; padding: 6px 8px 0 0; font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: nowrap; }
.tv-block .st.svc { align-items: center; gap: 6px; padding: 0 8px 0 0; font-size: 10px; }
.tv-block .st.svc .mark { box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tv-block .st.live { color: var(--live); }
.legend { display: flex; gap: 24px; font-family: var(--mono); font-size: 10px; color: var(--muted); padding-top: 14px; flex-wrap: wrap; }

/* Teams directory */
.conf { margin-bottom: 26px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.team-tile { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.team-tile img { width: 28px; height: 28px; object-fit: contain; }
.team-tile .nm { flex-grow: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tile .star { color: var(--dim); font-size: 16px; padding: 2px 4px; }
.team-tile .star.on { color: var(--amber); }

/* Team page */
.team-head { display: flex; align-items: center; gap: 22px; padding: 22px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.team-head img { width: 88px; height: 88px; object-fit: contain; }
.team-head .big { font-size: 48px; line-height: 0.95; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; text-align: right; margin-left: auto; }
.stat-tiles .v { font-family: var(--disp); font-size: 32px; line-height: 1; }

/* Game page */
.nm-short { display: none; }
.game-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.game-head .side { display: flex; align-items: center; gap: 16px; }
.game-head .side.r { justify-content: flex-end; text-align: right; }
.game-head img { width: 76px; height: 76px; object-fit: contain; }
.game-head .big { font-size: 38px; line-height: 0.95; }
.game-head .score { font-family: var(--disp); font-size: 80px; line-height: 1; display: flex; gap: 22px; align-items: baseline; }
.game-head .score .dash { color: #3a3d44; font-size: 36px; }
.game-cols { display: grid; grid-template-columns: 300px minmax(0,1fr) 300px; gap: 20px; align-items: start; }
.kv { display: flex; justify-content: space-between; font-size: 13px; gap: 12px; }
.kv .k { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.statbar { display: flex; flex-direction: column; gap: 4px; }
.statbar .nums { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }
.statbar .bars { display: flex; gap: 4px; height: 6px; }
.statbar .bars > div { flex: 1 1 0; display: flex; }
.statbar .bars .l { justify-content: flex-end; }
.statbar .bars i { display: block; height: 100%; border-radius: 2px; }
.watch-list { display: flex; flex-direction: column; gap: 6px; }
.watch-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; }
.watch-item.have { border-color: var(--amber-dim); }
.watch-item .tag { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.watch-item.have .tag { color: var(--amber); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal-card { background: var(--panel); border: 1px solid var(--line3); border-radius: 6px; width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 24px; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 22px; }
.modal-foot { display: none; }
.section-title { font-family: var(--disp); font-size: 20px; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.search { width: 100%; padding: 9px 12px; background: var(--bg); border: 1px solid var(--line3); border-radius: 3px; color: var(--text); font: inherit; margin-bottom: 10px; }
.pick-list { max-height: 320px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.share-url { font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--line); font-size: 10px; color: var(--dim); letter-spacing: 0.06em; }

/* Responsive */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
  .rail { position: static; }
  .game-cols { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); gap: 10px; height: calc(50px + env(safe-area-inset-top)); }
  .brand { font-size: 24px; }
  .nav { display: none; }
  .status { display: flex; }
  .status #status-text { display: none; }
  .status .dot { width: 9px; height: 9px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(14,16,19,0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
  .tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .tabbar a.active { color: var(--amber); }
  .tabbar a { position: relative; isolation: isolate; }
  .tabbar a.active::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, rgba(245,165,36,.32) 0%, rgba(245,165,36,.12) 38%, rgba(245,165,36,0) 68%); z-index: -1; pointer-events: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: 20px; }
  .view { padding: 12px 12px 30px; }
  .myteams { padding: 0 12px; height: 58px; }
  .myteams > .label { display: none; }
  .slab { min-width: 190px; padding: 0 44px 0 16px; }
  .slab .nm { font-size: 14px; }
  .slab .rec span:not(.live):first-of-type { display: none; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px 12px; padding: 2px 12px; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex-shrink: 0; }
  .toolbar > * { order: 2; } .toolbar > .disp { order: 0; } .toolbar > .viewseg { order: 1; margin-left: 0; }
  .toolbar .viewseg .vs span { display: none; }
  .toolbar .viewseg .vs { padding: 8px 12px; }
  .toolbar .viewseg .vs svg { width: 17px; height: 17px; }
  .tvwrap, .rankgraph { touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; }
  .rankgraph { overflow-x: auto; }
  .rankgraph .rg-svg { min-width: 100%; }
  .weeks { overflow: visible; }
  .h1 { font-size: 24px; } .h2 { font-size: 20px; }
  .grid-main { grid-template-columns: 1fr; gap: 16px; }
  .rail { position: static; }
  .rail .panel.desk { display: none; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 11px 12px; }
  .team-row img { width: 30px; height: 30px; }
  .team-row .name { font-size: 14px; }
  .team-row .score { font-size: 28px; }
  .card-foot { font-size: 10px; gap: 8px; }
  .day-head { flex-wrap: wrap; gap: 6px 12px; }
  /* Game page */
  .game-head { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 6px; padding: 14px 0; align-items: start; }
  .game-head .side { flex-direction: column; align-items: center; text-align: center; gap: 6px; justify-content: flex-start; }
  .game-head .side.r { flex-direction: column-reverse; justify-content: flex-end; }
  .nm-full { display: none; } .nm-short { display: inline; }
  .game-head .side > div { align-items: center; }
  .game-head img { width: 48px; height: 48px; }
  .game-head .big { font-size: 20px; }
  .game-head .mono.amber { font-size: 10px; }
  .game-head .sub { font-size: 10px; }
  .game-head .score { font-size: 44px; gap: 10px; }
  .game-head .score .dash { font-size: 14px; }
  .game-cols { grid-template-columns: 1fr; gap: 14px; }
  /* Team page */
  .team-head { flex-wrap: wrap; gap: 14px; padding: 14px 0; }
  .team-head img { width: 60px; height: 60px; }
  .team-head .big { font-size: 32px; }
  .stat-tiles { margin-left: 0; width: 100%; text-align: left; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
  .stat-tiles .v { font-size: 24px; }
  .rows th:nth-child(5), .rows td:nth-child(5), .rows th:nth-child(7), .rows td:nth-child(7) { display: none; }
  .rows td, .rows th { padding: 8px 6px; font-size: 12px; }
  /* Bracket + rankings */
  .bracket { grid-template-columns: 1fr; }
  .rank-cols { grid-template-columns: 1fr; }
  /* TV grid (when someone switches to it on a phone) */
  .tvgrid { min-width: 1100px; }
  .tv-net { position: sticky; left: 0; font-size: 15px; padding: 0 8px; }
  .tv-row.head { position: static; }
  .tv-row.head .label { position: sticky; left: 0; background: var(--bg); z-index: 3; }
  /* Modal as a sheet */
  .modal { padding: 0; align-items: flex-end; height: 100vh; height: 100dvh; }
  .modal-card { width: 100%; max-height: 88vh; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-foot { display: flex; position: sticky; bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); z-index: 1; }
  .modal-foot .btn { flex: 1; text-align: center; padding: 12px; font-size: 12px; }
  .modal-head { position: sticky; top: 0; background: var(--panel); z-index: 1; }
  .pick-list { grid-template-columns: 1fr; max-height: 40vh; }
  .modal-body { padding: 14px; gap: 18px; }
}

/* Forced desktop layout on phones: viewport is 1200px wide, so the desktop rules already apply;
   just make sure nothing phone-only leaks through and pinch-zoom isn't fought. */
html.force-desktop .tabbar { display: none !important; }
html.force-desktop .nav { display: flex !important; }
html.force-desktop body { padding-bottom: 0; }

/* ===== Theme: team colors (vars set by app.js from ESPN's team colors) ===== */
html[data-theme="team"] { --bg: var(--team-bg); --bg2: var(--team-bg2); --panel: var(--team-panel); --line: var(--team-line); --line2: var(--team-line); --line3: var(--team-line3); --text: #f3f0ee; --muted: #b5aca6; --dim: #746a65; --amber: var(--team-accent); --amber-dim: var(--team-accent-dim); }
body { transition: background-color .5s ease, color .5s ease; }
.theme-toggle { display: flex; gap: 4px; }
.theme-toggle .btn { padding: 5px 8px; }
@media (max-width: 700px) { .theme-toggle { display: none; } }

/* ===== Story home ===== */
.story { margin: -20px -24px -40px; }
@media (max-width: 700px) { .story { margin: -12px -12px -30px; } }
.story .label { color: var(--amber); font-size: 11px; letter-spacing: .16em; }
.story .label.muted { color: var(--muted); }
.story .dim { color: var(--dim); }
.story-chips { display: flex; justify-content: center; gap: 8px; padding: 14px 16px 0; flex-wrap: wrap; }
.story-chips .chip { padding: 5px 12px 5px 5px; cursor: pointer; background: none; color: var(--muted); transition: border-color .3s, color .3s; }
.story-chips .chip.on { border-color: var(--amber); color: var(--text); font-weight: 600; }
.story-chips .chip.add { color: var(--muted); }
.story section { min-height: 86svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 32px; position: relative; }
.story .big { font-size: clamp(52px, 8vw, 120px); line-height: .92; }
.story .h2x { font-size: clamp(36px, 5vw, 72px); line-height: .95; }
.story .lede { font-size: clamp(16px, 1.5vw, 21px); line-height: 1.5; max-width: 620px; color: var(--muted); margin-top: 22px; }
.story .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.story .rv.in { opacity: 1; transform: none; }
.story .rv.d1 { transition-delay: .12s } .story .rv.d2 { transition-delay: .24s } .story .rv.d3 { transition-delay: .36s } .story .rv.d4 { transition-delay: .48s }
/* hero (pinned, scroll-linked) */
.story-hero-wrap { height: 175svh; position: relative; }
.story section.story-hero { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: hidden; will-change: transform, opacity; padding: 40px 32px; }
.story-logos { display: flex; align-items: center; gap: clamp(24px, 5vw, 60px); margin-bottom: 26px; }
.story-logos .l { opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.story-logos .vs { font-size: 34px; color: var(--dim); opacity: 0; }
.story-logo { width: clamp(96px, 12vw, 170px); height: clamp(96px, 12vw, 170px); display: flex; align-items: center; justify-content: center; }
.story-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0,0,0,.45)); }
.story-logo.sm { width: 44px; height: 44px; flex-shrink: 0; }
.story .h-title, .story .h-meta, .story .cta, .story .story-score { opacity: 0; transform: translateY(16px); }
.story .h-meta { font-size: 13px; color: var(--muted); margin-top: 22px; letter-spacing: .08em; }
.story .story-score { font-size: clamp(56px, 7vw, 96px); line-height: 1; margin-top: 10px; }
.story .story-score .dash { color: var(--dim); margin: 0 14px; font-size: .5em; vertical-align: middle; }
.story .cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.story .btn { padding: 12px 26px; border-radius: 30px; font: 500 15px var(--sans); letter-spacing: 0; text-transform: none; border: 1px solid var(--line3); color: var(--text); }
.story .btn.primary { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.story .cue { position: absolute; bottom: 28px; font-size: 10px; letter-spacing: .2em; color: var(--dim); opacity: 0; animation: bob 1.8s infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }
.story #prob { margin-top: -75svh; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -30px 60px rgba(0,0,0,.45); }
.story .story-sec { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; }
/* probability */
.story .pct { font-size: clamp(130px, 18vw, 240px); line-height: .9; font-variant-numeric: tabular-nums; }
.story .pct small { font-size: .35em; color: var(--muted); }
.story .bar { display: flex; gap: 3px; height: 10px; width: min(560px, 82vw); margin: 30px auto 12px; }
.story .bar i { display: block; border-radius: 5px; background: var(--amber); width: 0; transition: width 1.4s cubic-bezier(.2,.7,.2,1); }
.story .bar b { display: block; border-radius: 5px; background: var(--muted); opacity: .5; flex: 1; }
.story .barlab { display: flex; justify-content: space-between; width: min(560px, 82vw); font-size: 11px; color: var(--muted); }
.story .barlab.wide { width: min(760px, 90vw); margin-top: 22px; }
/* matchup */
.story .cmp { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 20px; width: min(760px, 90vw); margin-top: 40px; }
.story .cmp .n { font-size: 44px; } .story .cmp .n.r { color: var(--muted); text-align: left } .story .cmp .n.l { text-align: right }
.story .cmp .tr { display: flex; gap: 4px; height: 8px; margin-top: 8px; }
.story .cmp .tr > div { flex: 1; display: flex; } .story .cmp .tr .a { justify-content: flex-end; }
.story .cmp .tr i { display: block; height: 100%; border-radius: 4px; width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.story .cmp .tr .a i { background: var(--amber); } .story .cmp .tr .b i { background: var(--muted); opacity: .6; }
/* charts */
.story .chart { width: min(900px, 92vw); margin-top: 44px; }
.story .chart rect { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.story .chart.in rect { transform: scaleY(1); }
.story .chart text.v { opacity: 0; transition: opacity .5s; } .story .chart.in text.v { opacity: 1; transition-delay: .7s; }
.story .spark { width: min(900px, 92vw); margin-top: 10px; }
.story .spark polyline { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.6s ease .3s; }
.story .spark.in polyline { stroke-dashoffset: 0; }
.story .spark circle { opacity: 0; transition: opacity .3s; } .story .spark.in circle { opacity: 1; transition-delay: 1.5s; }
/* standing */
.story .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 5vw, 64px); margin-top: 12px; }
.story .tiles .v { font-size: clamp(52px, 8vw, 110px); line-height: 1; }
.story .tiles .k { margin-top: 8px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--mono); }
/* others + deeper */
.story .rows { display: flex; flex-direction: column; gap: 18px; margin-top: 10px; }
.story .row { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); width: min(720px, 92vw); text-align: left; color: var(--text); }
.story .row .t { font-size: 26px; line-height: 1; } .story .row .t span { color: var(--muted); }
.story .row .meta { font-size: 11px; margin-top: 4px; color: var(--muted); } .story .row .meta .live { color: var(--live); }
.story .row .s { font-size: 40px; margin-left: auto; white-space: nowrap; } .story .row .s span { color: var(--muted); }
.story .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; width: min(1000px, 92vw); }
.story .tile { padding: 28px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); transition: transform .3s, border-color .3s; display: block; }
.story .tile:hover { transform: translateY(-4px); border-color: var(--amber); }
.story .tile .t { font-size: 28px; line-height: 1; } .story .tile .k { font-size: 10px; color: var(--muted); margin-top: 8px; letter-spacing: .1em; font-family: var(--mono); }
.story .foot { font-size: 10px; letter-spacing: .14em; color: var(--dim); margin-top: 60px; }
@media (max-width: 700px) {
  .story section { padding: 48px 20px; min-height: 72svh; }
  .story-hero-wrap { height: 160svh; }
  .story #prob { margin-top: -60svh; }
  .story-logos { gap: 22px; }
  .story .cmp { grid-template-columns: 64px 1fr 64px; gap: 12px; } .story .cmp .n { font-size: 28px; }
  .story .tiles { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .story .grid4 { grid-template-columns: 1fr; }
  .story .row { padding: 14px 16px; gap: 12px; } .story .row .t { font-size: 20px; } .story .row .s { font-size: 30px; }
  .story .h-title { font-size: clamp(36px, 11vw, 56px); }
  .story section.story-hero { padding: 16px 20px 84px; }
  .story-logos { margin-bottom: 14px; }
  .story-logo { width: 88px; height: 88px; }
  .story .story-score { font-size: 44px; margin-top: 6px; }
  .story .h-meta { margin-top: 12px; font-size: 11px; }
  .story .cta { margin-top: 18px; }
  .story .cue { bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { .story .rv, .story .bar i, .story .cmp .tr i, .story .chart rect, .story .spark polyline { transition: none !important; } .story .rv { opacity: 1; transform: none; } }

/* Marks (service / network icons) */
.mark { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 22%; font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; flex-shrink: 0; overflow: hidden; }
.mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Pre-game How to Watch hero (center column) */
.watch-hero { padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; }
.wh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wh-title { font-size: 40px; line-height: 1; }
.wh-net { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.wc-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex-grow: 1; }
.wc-name { font-size: 15px; font-weight: 500; color: var(--text); }
.wc-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.watch-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.watch-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--amber-dim); border-radius: 8px; background: linear-gradient(135deg, #1a150c 0%, var(--panel) 60%); color: var(--text); }
.watch-card:hover { border-color: var(--amber); color: var(--text); }
.watch-card .wc-name { font-size: 17px; font-weight: 600; }
.wc-cta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; padding: 9px 14px; border-radius: 4px; background: var(--amber); color: var(--bg); font-weight: 500; white-space: nowrap; }
.watch-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.watch-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.watch-tile:hover { border-color: var(--muted); color: var(--text); }
.watch-pick { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border: 1px dashed var(--amber-dim); border-radius: 8px; background: var(--bg2); }
.watch-pick .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-pick .chip { padding: 5px 12px 5px 5px; font-size: 13px; cursor: pointer; }
.watch-pick .chip.on { border-color: var(--amber); color: var(--amber); }
.watch-item .mark { margin-right: 8px; }
html[data-theme="team"] .watch-card { background: linear-gradient(135deg, var(--team-accent-dim) 0%, var(--panel) 60%); }
@media (max-width: 700px) {
  .game-cols .watch-first { order: -1; }
  .watch-hero { padding: 18px 16px; }
  .wh-title { font-size: 30px; }
  .wh-net { width: 100%; }
  .watch-cards { grid-template-columns: 1fr; }
  .watch-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Welcome / support screen (first visit) */
.welcome { position: fixed; inset: 0; z-index: 60; background: rgba(6,7,9,0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; }
.welcome-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 36px 32px 28px; background: var(--panel); border: 1px solid var(--line3); border-radius: 12px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.welcome-brand { font-size: 34px; color: var(--amber); line-height: 1; } .welcome-brand span { color: var(--text); }
.welcome-title { font-size: 36px; line-height: 1; margin-top: 4px; }
.welcome-pint { width: 44px; height: 44px; color: var(--amber); }
.welcome-text a { color: var(--amber); border-bottom: 1px solid var(--amber-dim); white-space: nowrap; } .welcome-text a:hover { color: #ffc75a; }
.welcome-text { margin: 0; font-size: 15px; line-height: 1.55; color: #c9cbd0; text-wrap: pretty; }
.welcome-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 4px; }
.welcome-points { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.wp { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: #c9cbd0; }
.wp svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--amber); margin-top: 1px; }
.wp b { color: var(--text); font-weight: 600; }
.btn-big { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 6px; background: var(--amber); color: var(--bg); font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.btn-big:hover { color: var(--bg); background: #ffc75a; }
.btn-quiet { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 6px; border: 1px solid var(--line3); color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.btn-quiet:hover { border-color: var(--muted); color: var(--text); }
.foot a { color: var(--muted); } .foot a:hover { color: var(--amber); }
.presented { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 2px; }
.presented img { width: 240px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line3); display: block; }
.presented:hover img { border-color: var(--amber-dim); }
.welcome-foot { text-align: center; line-height: 1.6; max-width: 380px; }
.welcome-foot a { white-space: nowrap; color: var(--amber); border-bottom: 1px solid var(--amber-dim); } .welcome-foot a:hover { color: #ffc75a; }
@media (max-width: 700px) { .welcome { align-items: flex-start; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); } .welcome-card { padding: 24px 18px 20px; gap: 12px; margin: auto 0; } .welcome-title { font-size: 30px; } .welcome-brand { font-size: 28px; } .welcome-text { font-size: 14px; } .welcome-points { padding: 12px 12px; } .wp { font-size: 12.5px; } }

/* Account / sync */
.account { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px dashed var(--amber-dim); border-radius: 8px; background: var(--bg2); }
.account.on { flex-direction: row; align-items: center; justify-content: space-between; border-style: solid; border-color: var(--line3); }
.signin { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; }
.signin .search { margin: 0; }
.signin-alt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.linkish { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: 0.04em; padding: 0; }
.linkish:hover { color: #ffc75a; }
#btn-signin.on { color: var(--win); background: transparent; border-color: #2c5a3f; }
@media (max-width: 700px) { #btn-signin { display: none; } .account.on { flex-direction: column; align-items: flex-start; } .signin { grid-template-columns: 1fr; } }

/* Beer button (top bar) */
.beer { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line3); color: var(--amber); flex-shrink: 0; }
.beer svg { width: 20px; height: 20px; }
.beer:hover { border-color: var(--amber-dim); color: #ffc75a; background: rgba(245,165,36,0.08); }
.beer[hidden] { display: none; }

/* Story hero: two stadium photos blended, tinted in each team's color */
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.story section.story-hero.has-bg { isolation: isolate; }
.hero-bg .ph { position: absolute; top: 0; bottom: 0; width: 64%; background-size: cover; background-position: center; filter: saturate(0.7) contrast(1.05) brightness(0.9); transform: scale(1.04); }
.hero-bg .ph.l { left: 0; -webkit-mask-image: linear-gradient(100deg, #000 50%, transparent 100%); mask-image: linear-gradient(100deg, #000 50%, transparent 100%); }
.hero-bg .ph.r { right: 0; -webkit-mask-image: linear-gradient(-80deg, #000 50%, transparent 100%); mask-image: linear-gradient(-80deg, #000 50%, transparent 100%); }
.hero-bg .ph.l:only-of-type, .hero-bg .ph.r:only-of-type { width: 100%; -webkit-mask-image: none; mask-image: none; }
.hero-bg .tint { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--cl) 45%, transparent), transparent 45%, transparent 55%, color-mix(in srgb, var(--cr) 45%, transparent)), linear-gradient(180deg, rgba(11,12,14,.6), rgba(11,12,14,.45) 40%, rgba(11,12,14,.92) 82%, var(--bg)); }
.hero-bg .grain { position: absolute; inset: 0; opacity: .1; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.6'/></svg>"); }
.story-hero.has-bg .h-title, .story-hero.has-bg .story-score { text-shadow: 0 10px 40px rgba(0,0,0,.7); }
.story-hero.has-bg .story-logo img { filter: drop-shadow(0 10px 28px rgba(0,0,0,.6)); }
@media (max-width: 700px) {
  .hero-bg .ph { width: 100%; }
  .hero-bg .ph.l { -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 70%); mask-image: linear-gradient(180deg, #000 35%, transparent 70%); }
  .hero-bg .ph.r { -webkit-mask-image: linear-gradient(0deg, #000 35%, transparent 70%); mask-image: linear-gradient(0deg, #000 35%, transparent 70%); }
  .hero-bg .tint { background: linear-gradient(180deg, color-mix(in srgb, var(--cl) 40%, transparent), transparent 45%, transparent 55%, color-mix(in srgb, var(--cr) 40%, transparent)), linear-gradient(180deg, rgba(11,12,14,.65), rgba(11,12,14,.5) 45%, rgba(11,12,14,.94) 85%, var(--bg)); }
}

/* Rankings → season graph (bump chart) */
.rankgraph { position: relative; padding: 14px 8px 6px; }
.rg-legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 0 16px 8px; font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.rg-legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.rg-legend .rg-note { margin-left: auto; }
.rg-svg { width: 100%; height: auto; display: block; }
.rg-svg .rg-lbl { fill: var(--muted); cursor: pointer; }
.rg-svg .rg-lbl.on, .rg-svg .rg-lbl.hover, .rg-svg .rg-lbl.pin { fill: var(--text); font-weight: 600; }
.rg-svg .rg-line { cursor: pointer; }
.rg-svg .rg-line.hover path, .rg-svg .rg-line.pin path { stroke: var(--c); stroke-width: 3; }
.rg-svg .rg-line.hover circle, .rg-svg .rg-line.pin circle { fill: var(--c); r: 5; }
.rg-svg .rg-line.hover, .rg-svg .rg-line.pin { filter: drop-shadow(0 0 6px rgba(0,0,0,.6)); }
.rg-svg .rg-line.hover ~ .rg-line, .rg-svg .rg-line.pin ~ .rg-line { pointer-events: auto; }
.rg-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bg); border: 1px solid var(--line3); border-radius: 6px; padding: 8px 10px; min-width: 150px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.rg-tip .k { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.rg-tip .v { font-family: var(--sans); font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.rg-tip .v img { width: 18px; height: 18px; object-fit: contain; } .rg-tip .v b { color: var(--amber); }
@media (max-width: 700px) { .rankgraph { overflow-x: auto; } .rg-svg { min-width: 900px; } .rg-legend .rg-note { display: none; } }

/* Team page: rank badges */
.rank-badges { display: flex; gap: 14px; margin-left: auto; align-self: center; }
.rank-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 140px; height: 140px; border: 1px solid var(--line3); border-radius: 14px; background: linear-gradient(180deg, #15181c, #101215); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.rb-l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rb-n { font-family: var(--disp); font-size: 76px; line-height: 0.9; color: var(--text); margin-top: 4px; letter-spacing: 0.01em; }
.rb-n .hash { font-size: 32px; color: var(--amber); margin-right: 2px; vertical-align: baseline; }
.rb-n .nr { font-size: 44px; color: var(--dim); }
.rank-badge.proj .hash { color: var(--muted); }
.rb-s { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted); margin-top: 6px; text-transform: uppercase; }
.stat-tiles.inline { margin: 12px 0 0; text-align: left; grid-template-columns: repeat(4, auto); gap: 22px; }
.stat-tiles.inline .v { font-size: 28px; }
html[data-theme="team"] .rank-badge { background: linear-gradient(180deg, var(--panel), var(--bg2)); }
@media (max-width: 700px) {
  .rank-badges { margin: 4px 0 0; width: 100%; justify-content: center; gap: 10px; }
  .rank-badge { width: 0; flex: 1 1 0; max-width: 130px; height: 118px; }
  .rb-n { font-size: 60px; } .rb-n .hash { font-size: 24px; }
  .stat-tiles.inline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}

/* Team page → Season graph */
.teamgraph { margin: 0 0 16px; padding: 0 0 6px; }
.tg-head { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px 4px; flex-wrap: wrap; }
.tg-head .rg-legend { margin-left: auto; padding: 0; }
.rg-legend i.dot { width: 10px; height: 10px; border-radius: 50%; }
.tg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px 8px 0; }
.tg-svg { width: 100%; height: auto; display: block; }
.tg-svg a { cursor: pointer; }
.tg-svg a:hover circle { stroke: var(--text); stroke-width: 2; }
@media (max-width: 720px) { .tg-head .rg-legend { margin-left: 0; } }

/* ===== Dashboard home ===== */
.dashboard { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 96px; gap: 12px; grid-auto-flow: dense; }
.dashboard > .dt.sz-s { grid-column: span 3; } .dashboard > .dt.sz-m { grid-column: span 6; } .dashboard > .dt.sz-l { grid-column: span 9; } .dashboard > .dt.sz-f { grid-column: span 12; }
.dashboard > .dt[class*="sz-"] { grid-row: span 2; }
.dash-focus .df.cust { margin-left: auto; color: var(--amber); border-color: var(--amber-dim); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.dash-focus { grid-column: 1 / -1; display: flex; gap: 8px; align-self: center; grid-row: auto; }
.dash-focus .df { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 30px; border: 1px solid var(--line3); background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.dash-focus .df img { width: 22px; height: 22px; object-fit: contain; }
.dash-focus .df.on { border-color: var(--amber); color: var(--text); font-weight: 600; }
.dt { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; isolation: isolate; color: var(--text); display: block; opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease, border-color .2s; }
.dt.in { opacity: 1; transform: none; }
a.dt:hover, .dt[data-href]:hover { border-color: var(--line3); color: var(--text); cursor: pointer; }
.dt .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.dt .k .more { margin-left: auto; color: var(--dim); letter-spacing: .08em; }
.dt .k .more:after { content: ' →'; }
.dt:hover .k .more { color: var(--amber); }
.dt .pad-h { padding: 12px 16px 8px; }
.dt.pad { padding: 14px 16px; }
.dt .sub2 { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 6px; letter-spacing: .04em; }
/* hero */
.dt.hero { grid-column: 1 / 8; grid-row: span 3; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 22px; color: #fff; background: color-mix(in srgb, var(--c) 30%, var(--panel)); }
.dt.hero .bg { position: absolute; inset: 0; z-index: -1; }
.dt.hero .bg .l, .dt.hero .bg .r { position: absolute; top: 0; bottom: 0; width: 60%; background-size: cover; background-position: center; filter: saturate(.7) brightness(.55); }
.dt.hero .bg .l { left: 0; -webkit-mask: linear-gradient(90deg, #000 55%, transparent 100%); mask: linear-gradient(90deg, #000 55%, transparent 100%); }
.dt.hero .bg .r { right: 0; -webkit-mask: linear-gradient(270deg, #000 55%, transparent 100%); mask: linear-gradient(270deg, #000 55%, transparent 100%); }
.dt.hero .bg .tint { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--cl) 55%, transparent), rgba(0,0,0,.35) 50%, color-mix(in srgb, var(--cr) 60%, transparent)); }
.dt.hero .bg .fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55)); }
.dt.hero .top { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; }
.dt.hero .top .dim { opacity: .6; }
.dt.hero .top .live { color: #ff5a4a; }
.dt.hero .top .live:before { content: '●'; margin-right: 6px; animation: dpulse 1.2s infinite; }
.dt.hero .top .amber { color: #ffd27a; }
.dt.hero .top .pill.net { margin-left: auto; }
@keyframes dpulse { 50% { opacity: .3; } }
.dt.hero .mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.dt.hero .side { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dt.hero .side.r { flex-direction: row-reverse; text-align: right; }
.dt.hero .side img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.7)); flex-shrink: 0; }
.dt.hero .nm { font-size: 22px; font-weight: 600; line-height: 1.05; }
.dt.hero .rk { font-family: var(--mono); font-size: 11px; color: #ffd27a; margin-bottom: 4px; }
.dt.hero .sc { display: flex; align-items: center; gap: 18px; font-family: var(--disp); font-size: 72px; line-height: 1; letter-spacing: .02em; }
.dt.hero .sc .dash-sep { opacity: .35; font-size: 40px; }
.dt.hero .sc.pre { flex-direction: column; gap: 6px; }
.dt.hero .sc.pre .vs { font-size: 44px; opacity: .8; }
.dt.hero .sc.pre small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; opacity: .7; text-align: center; max-width: 220px; }
.dt.hero .bot { display: flex; align-items: flex-end; gap: 16px; }
.dt.hero .wpr { flex: 1; min-width: 0; }
.dt.hero .wpr .k { color: rgba(255,255,255,.7); }
.dt.hero .wpr .bar { height: 10px; border-radius: 6px; background: color-mix(in srgb, var(--b) 80%, #000); overflow: visible; margin: 8px 0 6px; position: relative; }
.dt.hero .wpr .bar i { display: block; height: 100%; background: color-mix(in srgb, var(--a) 85%, #fff); border-radius: 6px 0 0 6px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.dt.hero .wpr .bar b { position: absolute; top: -4px; width: 2px; height: 18px; background: #fff; }
.dt.hero .wpr .lbl { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; }
.dt.hero .ctas { display: flex; gap: 8px; flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; white-space: nowrap; color: #fff; }
.pill:hover { color: #fff; background: rgba(255,255,255,.2); }
.pill.amber, .pill.amber:hover { background: var(--amber); color: #111; border-color: var(--amber); font-weight: 600; }
.dt.hero.empty { justify-content: center; gap: 14px; min-height: 260px; }
.dt.hero.empty .lede { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.5; }
/* live rail */
.dt.lrail { grid-column: 8 / 13; grid-row: span 3; display: flex; flex-direction: column; }
.dt.lrail .lg { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dt.lrail .g { display: grid; grid-template-columns: 4px 1fr 44px 84px; align-items: center; gap: 10px; padding: 0 16px; border-top: 1px solid var(--line2); flex: 1; min-height: 0; font-size: 13px; color: var(--text); }
.dt.lrail .g:hover { background: rgba(255,255,255,.03); color: var(--text); }
.dt.lrail .g.done { opacity: .6; }
.dt.lrail .g .bar { display: block; width: 4px; height: 36px; border-radius: 2px; background: linear-gradient(180deg, var(--a) 50%, var(--b) 50%); }
.dt.lrail .g .tm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dt.lrail .g .tm span { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.dt.lrail .g .tm img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.dt.lrail .g .tm small { font-family: var(--mono); font-size: 10px; color: var(--amber); }
.dt.lrail .g .tm em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.dt.lrail .g .tm em.w { color: #fff; font-weight: 600; }
.dt.lrail .g .s { font-family: var(--mono); font-size: 15px; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.dt.lrail .g .s .w { color: #fff; font-weight: 600; }
.dt.lrail .g .st { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: right; line-height: 1.5; }
.dt.lrail .g .st .li { color: var(--live); }
/* rank */
.dt.rank { min-height: 200px; }
.dt.rank .big { font-family: var(--disp); font-size: 56px; line-height: 1; margin-top: 8px; display: flex; align-items: baseline; gap: 12px; }
.dt.rank .big i { font-style: normal; color: var(--amber); font-size: 32px; align-self: flex-start; }
.dt.rank .big .nr { font-size: 40px; color: var(--muted); }
.dt.rank .big .mv { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.dt.rank .big .mv.up { color: var(--win); } .dt.rank .big .mv.dn { color: var(--live); } .dt.rank .big .mv.new { color: var(--amber); }
.dt.rank .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; width: 100%; opacity: .9; }
/* stride */
.dt.stride { min-height: 200px; }
.dt.stride .bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; margin-top: 30px; }
.dt.stride .b { flex: 1; min-width: 0; border-radius: 3px 3px 0 0; background: var(--win); position: relative; display: block; height: 100%; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.dt.stride .b.l { background: var(--live); }
.dt.stride .b.n { background: none; border: 1px dashed var(--dim); opacity: .5; }
.dt.stride .b.n.li { border-color: var(--live); opacity: 1; }
.dt.stride .b span { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.dt.stride .b b { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 8px; color: var(--dim); font-weight: 400; overflow: hidden; }
.dt.stride .sub2 { margin-top: 22px; }
/* tv */
.dt.tv { min-height: 200px; }
.dt.tv .tvs { display: flex; gap: 8px; margin-top: 14px; }
.dt.tv .c { flex: 1; min-width: 0; border: 1px solid var(--line2); border-radius: 8px; padding: 14px 12px; background: var(--bg2); color: var(--text); display: block; }
.dt.tv .c:hover { border-color: var(--line3); }
.dt.tv .c .n { font-family: var(--mono); font-size: 10px; color: var(--amber); letter-spacing: .1em; }
.dt.tv .c .m { font-size: 12px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt.tv .c .t2 { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt.tv .c.now { border-color: var(--live); } .dt.tv .c.now .t2 { color: var(--live); }
/* standings */
.dt.stand { min-height: 200px; }
.dt.stand table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.dt.stand td { padding: 7px 0; border-top: 1px solid var(--line2); }
.dt.stand td.r { text-align: right; font-family: var(--mono); color: var(--muted); }
.dt.stand tr.me td { color: var(--amber); }
.dt.stand img { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
/* cfp */
.dt.cfp { min-height: 200px; }
.dt.cfp .seeds { display: flex; gap: 6px; margin-top: 26px; }
.dt.cfp .seeds div { flex: 1; text-align: center; position: relative; }
.dt.cfp .seeds img { width: 38px; height: 38px; object-fit: contain; }
.dt.cfp .seeds i { display: block; font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--muted); margin-top: 4px; }
.dt.cfp .seeds div.bye:after { content: 'BYE'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 7px; letter-spacing: .1em; color: var(--amber); background: var(--amber-dim); padding: 1px 4px; border-radius: 3px; }
.dt.cfp .seeds div.me img { filter: drop-shadow(0 0 8px var(--amber)); }
/* movers */
.dt.mov { min-height: 200px; }
.dt.mov .mvr { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 9px 0; border-top: 1px solid var(--line2); }
.dt.mov .mvr:first-of-type { border-top: 0; margin-top: 4px; }
.dt.mov .mvr img { width: 16px; height: 16px; object-fit: contain; }
.dt.mov .mvr b { margin-left: auto; font-family: var(--mono); font-weight: 500; }
.dt.mov .up { color: var(--win); } .dt.mov .dn { color: var(--live); } .dt.mov .new { color: var(--amber); }
.dash-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; font-size: 11px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.dash-foot a { color: var(--amber); }
.dash-foot .sep { color: var(--dim); }
@media (max-width: 1100px) {
  .dashboard { grid-auto-rows: auto; }
  .dt.hero { grid-column: 1 / -1; min-height: 300px; } .dt.lrail { grid-column: 1 / -1; }
  .dashboard > .dt.sz-s { grid-column: span 6; } .dashboard > .dt.sz-m, .dashboard > .dt.sz-l, .dashboard > .dt.sz-f { grid-column: span 12; }
  .dashboard > .dt[class*="sz-"] { grid-row: auto; min-height: 180px; }
}
@media (max-width: 700px) {
  .dashboard { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-focus { overflow-x: auto; scrollbar-width: none; }
  .dt.hero { grid-column: 1 / -1; padding: 16px; min-height: 300px; }
  .dt.hero .mid { gap: 10px; }
  .dt.hero .side, .dt.hero .side.r { flex-direction: column; text-align: center; gap: 6px; }
  .dt.hero .side img { width: 56px; height: 56px; } .dt.hero .nm { font-size: 15px; }
  .dt.hero .sc { font-size: 54px; gap: 10px; } .dt.hero .sc.pre .vs { font-size: 34px; } .dt.hero .sc.pre small { display: none; }
  .dt.hero .top .dim { display: none; }
  .dt.hero .bot { flex-direction: column; align-items: stretch; gap: 10px; }
  .dt.hero .ctas { flex-direction: column; } .dt.hero .ctas .pill { justify-content: center; }
  .dt.hero .wpr .k { display: none; }
  .dt.lrail { grid-column: 1 / -1; display: block; } .dt.lrail .lg { display: block; } .dt.lrail .g { padding: 10px 14px; min-height: 56px; }
  .dashboard > .dt.sz-s { grid-column: span 1; } .dashboard > .dt.sz-m, .dashboard > .dt.sz-l, .dashboard > .dt.sz-f { grid-column: span 2; }
  .dashboard > .dt[class*="sz-"] { min-height: 150px; }
  .dashboard > .dt.sz-s.next3, .dashboard > .dt.sz-s.stand, .dashboard > .dt.sz-s.tv, .dashboard > .dt.sz-s.upset, .dashboard > .dt.sz-s.close, .dashboard > .dt.sz-s.leaders, .dashboard > .dt.sz-s.cfp, .dashboard > .dt.sz-s.stride { grid-column: span 2; }
  .dashboard > .dt.sz-s .k .more { display: none; }
  .dt.rank, .dt.stride { min-height: 150px; }
  .dash-focus .df.cust span { display: none; }
  .dt.rank .big { font-size: 44px; } .dt.rank .big .mv { display: none; } .dt.rank .sub2 { font-size: 9px; position: relative; z-index: 1; }
  .dt .k .svc, .dt.rank .k .more, .dt.stride .k .more { display: none; }
  .dt.rank .spark { height: 44px; opacity: .55; }
  .dt.stride .bars { height: 44px; margin-top: 24px; gap: 3px; } .dt.stride .b span { font-size: 8px; } .dt.stride .b b { display: none; } .dt.stride .sub2 { margin-top: 10px; }
  .dt.tv { grid-column: 1 / -1; } .dt.tv .tvs { gap: 6px; } .dt.tv .c { padding: 10px 8px; }
  .dt.stand { grid-column: 1 / -1; } .dt.cfp { grid-column: 1 / -1; } .dt.mov { grid-column: 1 / -1; }
  .dt.cfp .seeds img { width: 26px; height: 26px; } .dt.cfp .seeds { gap: 3px; }
}

/* Dashboard: new tiles */
.dt.next3 .nx { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line2); color: var(--text); }
.dt.next3 .nx:first-of-type { border-top: 0; margin-top: 4px; }
.dt.next3 .nx img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.dt.next3 .nx .t { min-width: 0; flex: 1; } .dt.next3 .nx .o { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dt.next3 .nx .o small { font-family: var(--mono); color: var(--amber); font-size: 10px; }
.dt.next3 .nx .w { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.dt.next3 .nx .sv { font-family: var(--mono); font-size: 9px; color: var(--amber); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.dt.form .dots { display: flex; gap: 8px; margin-top: 12px; }
.dt.form .d { width: 40px; height: 40px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 13px; color: #0b0d10; background: var(--win); position: relative; }
.dt.form .d.l { background: var(--live); }
.dt.form .d small { position: absolute; top: 100%; margin-top: 4px; font-size: 8px; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.dt.form .big { font-family: var(--disp); font-size: 44px; line-height: 1; margin-top: 30px; display: flex; align-items: baseline; gap: 12px; }
.dt.form .big .up { color: var(--win); } .dt.form .big .dn { color: var(--live); }
.dt.form .big .mv, .dt.line .big .mv { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.dt.line .big { font-family: var(--disp); font-size: 44px; line-height: 1; margin-top: 12px; }
.dt.line .big.nr { color: var(--muted); }
.dt.line .vsrow { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dt.line .vsrow img { width: 30px; height: 30px; object-fit: contain; }
.dt.leaders .ld { margin-top: 8px; }
.dt.leaders .lr { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line2); }
.dt.leaders .lr:first-child { border-top: 0; }
.dt.leaders .lr img, .dt.leaders .lr .ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--line2); flex-shrink: 0; }
.dt.leaders .lr .nm { font-size: 13px; font-weight: 600; } .dt.leaders .lr .st { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.dt.upset .ug, .dt.close .ug { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line2); color: var(--text); font-size: 12px; }
.dt.upset .ug:first-of-type, .dt.close .ug:first-of-type { border-top: 0; margin-top: 4px; }
.dt.upset .tm, .dt.close .tm { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.dt.upset .tm img, .dt.close .tm img { width: 18px; height: 18px; object-fit: contain; }
.dt.upset .tm small, .dt.close .tm small { font-family: var(--mono); color: var(--amber); font-size: 10px; }
.dt.upset .tm b, .dt.close .tm b { font-family: var(--mono); margin-left: auto; padding-left: 6px; flex-shrink: 0; }
.dt.upset .tm em, .dt.close .tm em { font-style: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dt.sz-s .k .svc { display: none; }
.dt.upset .li, .dt.close .li { font-family: var(--mono); font-size: 10px; color: var(--live); white-space: nowrap; }
.dt.countdown .cd { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; font-family: var(--disp); }
.dt.countdown .cd .n { font-size: 52px; line-height: 1; min-width: 1.2em; text-align: right; }
.dt.countdown .cd small { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-right: 10px; }
.dt.countdown .cd .big { font-size: 48px; line-height: 1; } .dt.countdown .cd .big.live { color: var(--live); } .dt.countdown .cd .big.nr { color: var(--muted); }
/* Customizer */
.cust-wrap { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.cust-back { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 50%, rgba(0,0,0,.35)); }
.cust-panel { pointer-events: auto; }
.dash-edit .dashboard { user-select: none; -webkit-user-select: none; }
.cust-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: color-mix(in srgb, var(--panel) 72%, transparent); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-left: 1px solid var(--line3); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
.cust-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.cust-head .sub { margin-top: 6px; }
.cust-list { flex: 1; overflow-y: auto; padding: 8px 12px; }
.cust-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 8px; border: 1px solid transparent; }
.cust-row.on { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); margin-bottom: 6px; }
.cust-row:not(.on) { opacity: .7; }
.cust-row.dragging { opacity: .4; }
.cust-row .tog { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line3); background: none; color: var(--muted); font-size: 15px; flex-shrink: 0; cursor: pointer; }
.cust-row.on .tog { background: var(--amber); border-color: var(--amber); color: #111; font-weight: 700; }
.cust-row .txt { flex: 1; min-width: 0; } .cust-row .nm { font-size: 14px; font-weight: 600; } .cust-row .bl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cust-row .szs { display: flex; gap: 3px; } .cust-row .sz { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--line3); background: none; color: var(--muted); font-family: var(--mono); font-size: 10px; cursor: pointer; }
.cust-row .sz.on { background: var(--amber); border-color: var(--amber); color: #111; font-weight: 700; }
.cust-row .mv { display: flex; flex-direction: column; gap: 2px; } .cust-row .mv button { width: 24px; height: 18px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; } .cust-row .mv button:disabled { opacity: .25; }
.cust-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (max-width: 700px) { .cust-row .bl { display: none; } .cust-foot .sub { display: none; } .cust-row .szs .sz { width: 24px; } }

.dt.upset .when { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }

/* Dashboard edit mode: handles, grips, drop targets */
.dt .grab, .dt .grip { display: none; }
.dash-edit .dashboard .dt[data-tile] { outline: 1px dashed rgba(245,165,36,.45); outline-offset: -1px; }
.dash-edit .dashboard .dt[data-tile] > *:not(.grab):not(.grip) { pointer-events: none; }
.dash-edit .dashboard .dt[data-tile] .grab { display: flex; position: absolute; top: 8px; right: 8px; width: 30px; height: 26px; align-items: center; justify-content: center; border-radius: 6px; background: var(--amber); color: #111; font-size: 12px; letter-spacing: -2px; cursor: grab; z-index: 5; touch-action: none; user-select: none; }
.dash-edit .dashboard .dt[data-tile] .grip { display: block; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; cursor: nwse-resize; z-index: 5; touch-action: none; background: linear-gradient(135deg, transparent 50%, var(--amber) 50%); border-bottom-right-radius: 9px; }
.dash-edit .dashboard .dt[data-tile] .grip::after { content: attr(data-label); position: absolute; right: 30px; bottom: 4px; font-family: var(--mono); font-size: 10px; color: var(--amber); }
.dash-edit .dashboard .dt.lifting { z-index: 40; opacity: .85; box-shadow: 0 20px 50px rgba(0,0,0,.6); transition: none; cursor: grabbing; }
.dash-edit .dashboard .dt.drop { outline: 2px solid var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); }
.dash-edit .dashboard .dt.resizing { outline: 2px solid var(--amber); transition: none; }
.dash-edit .dashboard .dt[data-tile] { transition: opacity .5s ease, transform .5s ease, border-color .2s, grid-column 0s; }
@media (max-width: 700px) { .cust-panel { width: 100%; } }

/* Team page: live scoreboard bar */
.livebar { position: relative; overflow: hidden; isolation: isolate; border-radius: 12px; border: 1px solid var(--line3); margin: 0 0 18px; padding: 18px 24px; color: #fff; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--a) 70%, #000) 0%, color-mix(in srgb, var(--a) 30%, var(--panel)) 45%, color-mix(in srgb, var(--b) 30%, var(--panel)) 55%, color-mix(in srgb, var(--b) 70%, #000) 100%); }
.livebar.on { border-color: rgba(255,90,74,.5); box-shadow: 0 0 0 4px rgba(255,90,74,.08), 0 20px 50px rgba(0,0,0,.5); }
.livebar.done { opacity: .92; }
.livebar .ghost { position: absolute; top: 50%; transform: translateY(-50%); width: 220px; height: 220px; object-fit: contain; opacity: .12; z-index: -1; pointer-events: none; }
.livebar .ghost.a { left: 26%; } .livebar .ghost.b { right: -30px; }
.livebar .side { display: flex; align-items: center; gap: 16px; min-width: 0; }
.livebar .side.r { flex-direction: row-reverse; text-align: right; }
.livebar .side img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.7)); flex-shrink: 0; }
.livebar .side .rk { font-family: var(--mono); font-size: 11px; color: #ffd27a; }
.livebar .side .nm { font-size: 22px; font-weight: 600; line-height: 1.05; }
.livebar .side .rec { font-family: var(--mono); font-size: 11px; opacity: .7; margin-top: 4px; }
.livebar .poss { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-left: 8px; vertical-align: middle; box-shadow: 0 0 8px var(--amber); }
.livebar .mid { text-align: center; }
.livebar .mid .status { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: rgba(255,255,255,.8); }
.livebar .mid .status.live { color: var(--live); }
.livebar .mid .status.live:before { content: '●'; margin-right: 6px; animation: dpulse 1.2s infinite; }
.livebar .mid .sc { font-family: var(--disp); font-size: 84px; line-height: 1; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 20px; margin: 4px 0; }
.livebar .mid .sc .sep { opacity: .35; font-size: 44px; }
.livebar .mid .sc .trail { color: rgba(255,255,255,.5); }
.livebar .mid .sit { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.8); letter-spacing: .06em; min-height: 14px; }
.livebar .foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; }
.livebar .foot .q { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.75); }
.livebar .foot .q b { color: #fff; }
.livebar .foot .spacer { flex: 1; }
.livebar .wpr { flex: 0 0 300px; }
.livebar .wpr .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: rgba(255,255,255,.7); }
.livebar .wpr .bar { height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--b) 80%, #000); margin: 6px 0 4px; position: relative; }
.livebar .wpr .bar i { display: block; height: 100%; background: color-mix(in srgb, var(--a) 40%, #fff); border-radius: 6px 0 0 6px; }
.livebar .wpr .bar b { position: absolute; top: -3px; width: 2px; height: 14px; background: #fff; }
.livebar .wpr .lbl { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; }
@media (max-width: 700px) {
  .livebar { grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 14px; }
  .livebar .side, .livebar .side.r { flex-direction: column; text-align: center; gap: 6px; }
  .livebar .side img { width: 52px; height: 52px; } .livebar .side .nm { font-size: 14px; } .livebar .side .rec { display: none; }
  .livebar .mid .sc { font-size: 52px; gap: 10px; } .livebar .mid .sc .sep { font-size: 28px; }
  .livebar .ghost { display: none; }
  .livebar .foot .q { width: 100%; justify-content: space-between; } .livebar .wpr { flex: 1 1 100%; }
  .livebar .foot .pill { flex: 1; justify-content: center; }
}

/* Big live clock (game header + team live bar) */
.badge.live.bigclock { font-family: var(--disp); font-size: 44px; letter-spacing: .04em; padding: 6px 18px 2px; border: 0; border-radius: 0; background: none; color: var(--live); display: inline-flex; align-items: baseline; gap: 14px; line-height: 1; }
.badge.live.bigclock .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--live); align-self: center; animation: dpulse 1.2s infinite; box-shadow: 0 0 12px var(--live); }
.badge.live.bigclock .qtr { font-family: var(--mono); font-size: 13px; letter-spacing: .16em; color: var(--live); opacity: .85; padding: 4px 8px; border: 1px solid var(--live); border-radius: 4px; align-self: center; }
.livebar .mid .status.live:before { content: none; }
.livebar .mid .status.live .bigclock { font-size: 36px; padding: 0 0 4px; }
@media (max-width: 700px) { .badge.live.bigclock { font-size: 30px; gap: 10px; } .badge.live.bigclock .dot { width: 9px; height: 9px; } .livebar .mid .status.live .bigclock { font-size: 26px; } }

/* Live scoreboard tile */
.dashboard > .dt.livegrid { min-height: 0; }
@media (max-width: 1100px) { .dashboard > .dt.livegrid { grid-row: auto !important; } }
.dt.livegrid .lg2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.dt.livegrid.sz-s .lg2 { grid-template-columns: 1fr; } .dt.livegrid.sz-m .lg2 { grid-template-columns: repeat(2, 1fr); } .dt.livegrid.sz-l .lg2 { grid-template-columns: repeat(3, 1fr); }
.lgc { position: relative; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg2); padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; color: var(--text); }
.lgc:hover { border-color: var(--line3); color: var(--text); }
.lgc.close { border-color: var(--live); box-shadow: 0 0 0 1px rgba(255,90,74,.35), 0 0 22px rgba(255,90,74,.45), inset 0 0 30px rgba(255,90,74,.08); }
.lgc .tm { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.lgc .tm img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.lgc .tm small { font-family: var(--mono); font-size: 10px; color: var(--amber); font-weight: 400; }
.lgc .tm em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgc .tm .poss { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); flex-shrink: 0; }
.lgc .sc { font-family: var(--disp); font-size: 40px; line-height: 1; text-align: right; }
.lgc .sc.trail { color: var(--muted); }
.lgc .clk { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line2); }
.lgc .clk .t { font-family: var(--disp); font-size: 30px; line-height: 1; color: var(--live); letter-spacing: .04em; }
.lgc .clk .t:before { content: '●'; font-size: 12px; margin-right: 8px; vertical-align: middle; animation: dpulse 1.2s infinite; }
.lgc .clk .q { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--live); border: 1px solid var(--live); border-radius: 4px; padding: 3px 7px; }
.lgc.close .clk .q { background: var(--live); color: #111; font-weight: 700; }
.lgc .clk .net { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; }
@media (max-width: 1100px) { .dt.livegrid .lg2 { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 700px) { .dashboard > .dt.sz-s.livegrid { grid-column: span 2; } .dt.livegrid .lg2 { grid-template-columns: 1fr !important; } .lgc .sc { font-size: 34px; } .lgc .clk .t { font-size: 26px; } }
