/* Pulse design tokens. Rules live in DESIGN.md; the short version is in the right-hand panel. */
:root {
  /* spacing: 8-pt grid (4 for hairline adjustments) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* type: five sizes only */
  --t-meta: 12px; --t-body: 15px; --t-title: 17px; --t-section: 22px; --t-display: 34px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --radius: 16px; --radius-sm: 10px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* light theme */
  --bg: #f4f5f7;
  --stage: #e8eaee;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --line: rgba(14, 17, 22, .09);
  --text: #0e1116;
  --text-2: #4a5260;
  --text-3: #6b7380;
  --accent: #c8f31d;          /* "now": live, countdown, primary action */
  --accent-ink: #0b0d10;      /* text on accent fills */
  --accent-text: #3d6600;     /* accent used as text on light surfaces (AA) */
  --shadow: 0 1px 2px rgba(14,17,22,.06), 0 8px 24px rgba(14,17,22,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --stage: #050607; --surface: #14171c; --surface-2: #1c2027;
    --line: rgba(255,255,255,.08); --text: #f2f4f7; --text-2: #b3bac5; --text-3: #8a93a0;
    --accent-text: #c8f31d; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10; --stage: #050607; --surface: #14171c; --surface-2: #1c2027;
  --line: rgba(255,255,255,.08); --text: #f2f4f7; --text-2: #b3bac5; --text-3: #8a93a0;
  --accent-text: #c8f31d; --shadow: none; color-scheme: dark;
}

/* league markers: color is an 8px dot, never a fill */
.lg-nfl { --lg: #4f7cff; } .lg-nba { --lg: #ff7a45; } .lg-mlb { --lg: #2fbf9b; } .lg-nhl { --lg: #9aa7b8; }
.lg-epl { --lg: #b36bff; } .lg-ucl { --lg: #3fa9f5; } .lg-mls { --lg: #f2b134; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: var(--t-body); line-height: 1.45; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- stage: phone on desktop, full-bleed on mobile ---------- */
.stage { min-height: 100%; }
.panel { display: none; }
.device { height: 100dvh; }
.app { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }

@media (min-width: 600px) and (max-width: 1099px) {
  body { background: var(--stage); }
  .device { max-width: 480px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); }
}
@media (min-width: 1100px) {
  body { background: var(--stage); }
  .stage {
    display: grid; grid-template-columns: minmax(260px, 340px) 402px minmax(260px, 340px);
    justify-content: center; align-items: center; gap: var(--s7); padding: var(--s6);
    min-height: 100vh;
  }
  .panel { display: block; font-size: 14px; color: var(--text-2); max-height: min(860px, calc(100vh - 64px)); overflow: auto; scrollbar-width: thin; }
  .device {
    height: min(860px, calc(100vh - 64px)); width: 402px; border-radius: 48px; padding: 10px;
    background: #050607; box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 0 0 1.5px #2a2f37;
  }
  .app { border-radius: 38px; }
}

.eyebrow { font-size: var(--t-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; margin: 0 0 var(--s3); }
.brand-lg { font-family: var(--font-display); font-size: 44px; line-height: 1; margin: 0 0 var(--s3); color: var(--text); display: flex; align-items: center; gap: var(--s2); letter-spacing: .01em; }
.brand-lg .pulse-mark { width: 40px; height: 40px; }
.panel h2 { font-size: var(--t-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin: var(--s5) 0 var(--s2); }
.panel p, .panel ul, .panel ol { margin: 0; }
.panel ul, .panel ol { padding-left: 18px; display: grid; gap: var(--s2); }
.panel b { color: var(--text); font-weight: 600; }
.lede { font-size: var(--t-body); color: var(--text); }
.muted { color: var(--text-3); }
.team { list-style: none; padding: 0 !important; gap: var(--s1) !important; color: var(--text); }
.status { margin-top: var(--s5) !important; font-size: var(--t-meta); padding: var(--s2) var(--s3); border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.disclaimer { margin-top: var(--s3) !important; font-size: var(--t-meta); color: var(--text-3); }
.rules-title { font-family: var(--font-display); font-size: 30px !important; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.05; margin: 0 0 var(--s4) !important; }
.rules ol { gap: var(--s3); }

/* ---------- top bar & tab bar ---------- */
.pulse-mark { width: 26px; height: 26px; fill: none; stroke: var(--accent-text); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) var(--s2);
}
@media (min-width: 1100px) { .topbar { padding-top: var(--s6); } }
.brand { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: .01em; min-height: var(--tap); }
.topbar-actions { display: flex; align-items: center; gap: var(--s2); }
.icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill-btn { min-height: 36px; padding: 0 var(--s3); border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: var(--s1); }

#view { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--s4) var(--s6); scroll-behavior: smooth; }
#view:focus { outline: none; }

.tabbar {
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--bg);
  padding: var(--s1) var(--s2) calc(var(--s1) + env(safe-area-inset-bottom));
}
@media (min-width: 1100px) { .tabbar { padding-bottom: var(--s4); } }
.tabbar button { position: relative; min-height: 52px; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { color: var(--text); }
.tabbar button[aria-current="page"] svg { stroke: var(--accent-text); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- shared pieces ---------- */
.section { margin-top: var(--s5); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s3); }
.section-head h2 { margin: 0; font-size: var(--t-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.section-head .aside { font-size: var(--t-meta); color: var(--text-3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--t-meta); color: var(--text-3); }
.lg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.lg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lg, var(--text-3)); }
.tag { font-weight: 600; color: var(--text-2); }
.tag::before { content: "· "; color: var(--text-3); font-weight: 400; }

.chips { display: flex; gap: var(--s2); overflow-x: auto; margin: var(--s2) calc(-1 * var(--s4)) 0; padding: 0 var(--s4); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.lg::before { width: 7px; height: 7px; }

.btn { min-height: var(--tap); padding: 0 var(--s4); border-radius: 999px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); background: var(--surface-2); color: var(--text); text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.primary:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text-2); padding: 0 var(--s2); }
.btn.sm { min-height: 36px; font-size: 13px; padding: 0 var(--s3); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.is-on { background: var(--text); color: var(--bg); }

.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.logo { width: 24px; height: 24px; object-fit: contain; flex: none; }
.logo-lg { width: 44px; height: 44px; }
.count { color: var(--accent-text); font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,243,29,.6); } 70% { box-shadow: 0 0 0 8px rgba(200,243,29,0); } 100% { box-shadow: 0 0 0 0 rgba(200,243,29,0); } }

/* ---------- Today: catch-up header ---------- */
.catchup { margin-top: var(--s2); }
.catchup .date { font-size: var(--t-meta); color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.catchup h1 { font-family: var(--font-display); font-size: var(--t-display); line-height: 1.05; margin: var(--s1) 0 var(--s2); font-weight: 700; letter-spacing: .005em; }
.catchup h1 em { font-style: normal; color: var(--accent-text); }
.catchup p { margin: 0; color: var(--text-2); }
.break-row { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.break-row span { font-size: 13px; color: var(--text-2); font-weight: 500; margin-right: var(--s1); }

/* scores strip */
.scores { display: flex; gap: var(--s3); overflow-x: auto; margin: 0 calc(-1 * var(--s4)); padding: 2px var(--s4) var(--s1); scroll-snap-type: x mandatory; scroll-padding-inline: var(--s4); scrollbar-width: none; }
.scores::-webkit-scrollbar { display: none; }
.score { flex: none; width: 168px; padding: var(--s3); scroll-snap-align: start; display: grid; gap: var(--s2); text-decoration: none; }
.score .top { display: flex; justify-content: space-between; align-items: center; font-size: var(--t-meta); color: var(--text-3); gap: var(--s2); }
.score .top .state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score .top .state.live { color: var(--accent-text); }
.score .row { display: flex; align-items: center; gap: var(--s2); }
.score .row .abbr { font-weight: 600; flex: 1; }
.score .row .pts { font-family: var(--font-display); font-size: var(--t-section); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score .row.lost { color: var(--text-3); }

/* next-up hero */
.nextup { padding: var(--s4); display: grid; gap: var(--s3); position: relative; overflow: hidden; }
.nextup::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); }
.nextup .matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2); text-align: center; }
.nextup .team { display: grid; justify-items: center; gap: var(--s1); font-weight: 600; font-size: 14px; }
.nextup .vs { font-family: var(--font-display); font-size: var(--t-section); color: var(--text-3); }
.nextup .clock { text-align: center; }
.nextup .clock .big { font-family: var(--font-display); font-size: var(--t-display); font-weight: 700; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.nextup .clock .sub { font-size: var(--t-meta); color: var(--text-3); margin-top: var(--s1); }
.nextup .actions { display: flex; gap: var(--s2); justify-content: center; }

/* feed */
.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.story { padding: var(--s4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.story .head { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: start; }
.story h3 a { color: inherit; text-decoration: none; }
.story h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.story h3, .clip h3 { margin: 0; font-size: var(--t-title); line-height: 1.3; font-weight: 600; letter-spacing: -.005em; }
.story .thumb-sm { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.story .sum { margin: 0; color: var(--text-2); }
.story .why { margin: 0; font-size: 14px; color: var(--text); font-weight: 500; }
.story .why::before { content: "Why it matters · "; color: var(--text-3); font-weight: 600; }
.story details { font-size: 14px; color: var(--text-2); }
.story details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-3); min-height: 32px; display: flex; align-items: center; list-style: none; }
.story details summary::-webkit-details-marker { display: none; }
.story details summary::after { content: "+"; margin-left: 6px; font-weight: 700; }
.story details[open] summary::after { content: "–"; }
.story details ul { margin: 0 0 var(--s1); padding-left: 18px; display: grid; gap: var(--s1); }
.nextline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding: var(--s2) var(--s3); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.nextline .label { flex-basis: 100%; font-weight: 700; color: var(--text-3); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.nextline .logo { width: 20px; height: 20px; }
.nextline .teams { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.nextline .when { margin-left: auto; color: var(--text-2); white-space: nowrap; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s1); }
.push { margin-left: auto; }
.grow { flex: 1; }
.meta .saves { color: var(--text-3); }
.meta .saves::before { content: "· "; }

.clip { overflow: hidden; }
.clip .thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.clip .thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); }
.play-glyph { position: absolute; left: var(--s3); bottom: var(--s3); z-index: 1; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform .15s var(--ease); }
.play-glyph svg { width: 20px; height: 20px; fill: var(--accent-ink); margin-left: 3px; }
.clip .thumb:hover .play-glyph { transform: scale(1.06); }
.dur { position: absolute; right: var(--s3); bottom: var(--s3); z-index: 1; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: var(--t-meta); font-weight: 600; font-variant-numeric: tabular-nums; }
.clip .body { padding: var(--s3) var(--s4) var(--s4); display: grid; gap: var(--s2); }

.more-row { display: flex; justify-content: center; margin-top: var(--s4); }

/* ---------- Queue ---------- */
.q-head { margin-top: var(--s2); }
.q-head h1 { font-family: var(--font-display); font-size: var(--t-display); line-height: 1.05; margin: 0 0 var(--s1); }
.q-head p { margin: 0; color: var(--text-2); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: var(--s3); }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s var(--ease); }
.q-list { display: grid; gap: var(--s2); }
.q-item { display: grid; grid-template-columns: var(--tap) 88px 1fr var(--tap); align-items: center; gap: var(--s2); padding: var(--s2); padding-left: var(--s1); }
.q-item.game { grid-template-columns: var(--tap) 1fr var(--tap); }
.q-item.story-item { grid-template-columns: var(--tap) 1fr var(--tap); }
.q-item .qthumb { position: relative; width: 88px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.q-item .qthumb img { width: 100%; height: 100%; object-fit: cover; }
.q-item .qthumb .dur { right: 4px; bottom: 4px; padding: 0 5px; font-size: 11px; }
.q-item .title { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-item.done .title { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.q-item.done .qthumb { opacity: .5; }
.check { width: var(--tap); height: var(--tap); display: grid; place-items: center; }
.check i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-3); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); }
.check[aria-pressed="true"] i::after { content: ""; width: 10px; height: 5px; border: solid var(--accent-ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.remove { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--text-3); border-radius: 50%; }
.remove:hover { background: var(--surface-2); color: var(--text); }
.remove svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.q-actions { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }

.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--text-2); display: grid; justify-items: center; gap: var(--s3); }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.empty-icon svg { width: 26px; height: 26px; stroke: var(--text-3); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-icon.big { width: 88px; height: 88px; background: var(--accent); }
.empty-icon.big svg { width: 40px; height: 40px; stroke: var(--accent-ink); }
.empty h3 { margin: 0; color: var(--text); font-size: var(--t-title); }
.empty p { margin: 0; max-width: 280px; }

/* ---------- Schedule ---------- */
.day { margin-top: var(--s5); }
.day h2 { position: sticky; top: 0; z-index: 1; margin: 0 calc(-1 * var(--s4)) var(--s2); padding: var(--s2) var(--s4); background: var(--bg); font-size: var(--t-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.day h2 b { color: var(--text); }
.g-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.g-row:last-child { border-bottom: 0; }
.g-row .time { font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-row .time small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.g-row .teams { display: grid; gap: var(--s1); font-weight: 600; font-size: 14px; }
.g-row .teams span { display: flex; align-items: center; gap: var(--s2); }
.g-row .teams .logo { width: 20px; height: 20px; }
.g-row .sub { font-size: var(--t-meta); color: var(--text-3); font-weight: 400; }

/* ---------- sheet (picker + player) ---------- */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 20; animation: fade .2s var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92%; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: var(--s2) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); animation: rise .25s var(--ease); }
.sheet.full { top: 0; max-height: none; border-radius: 0; padding-top: calc(var(--s6) + env(safe-area-inset-top)); }
@media (min-width: 1100px) { .sheet.full { border-radius: 38px; } }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto var(--s3); }
.sheet h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.05; margin: 0 0 var(--s1); }
.sheet .sub { margin: 0 0 var(--s4); color: var(--text-2); }
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.pick { min-height: 72px; padding: var(--s3); border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); text-align: left; display: grid; align-content: space-between; gap: var(--s1); transition: border-color .15s, background .15s; }
.pick .name { font-weight: 700; font-size: 15px; }
.pick .sport { font-size: var(--t-meta); color: var(--text-3); }
.pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick[aria-pressed="true"] .name::after { content: " ✓"; color: var(--accent-text); }
.sheet .sheet-actions { display: flex; gap: var(--s2); margin-top: var(--s5); }
.sheet .sheet-actions .btn { flex: 1; }


.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 30; background: var(--text); color: var(--bg); padding: var(--s2) var(--s4); border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: rise .2s var(--ease); }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.toast { animation-name: toast-rise; }
@keyframes toast-rise { from { transform: translate(-50%, 12px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.error-box { margin-top: var(--s5); padding: var(--s4); display: grid; gap: var(--s3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- v2: progress, sticky chips, done list, player ---------- */
.catchup .progress { margin-top: var(--s3); }
.chips-bar { position: sticky; top: 0; z-index: 3; margin: var(--s3) calc(-1 * var(--s4)) 0; padding: var(--s2) 0; background: var(--bg); }
.chips-bar .chips { margin: 0; }
.live-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 700; }
.pts-sm { margin-left: auto; }
.at { color: var(--text-3); }
.score.is-live { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.q-item .bell svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-item a.title { color: inherit; text-decoration: none; }

.done-list { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s2); }
.done-list > summary { list-style: none; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 600; color: var(--text-3); }
.done-list > summary::-webkit-details-marker { display: none; }
.done-list > summary svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done-list > summary::after { content: "Show"; margin-left: auto; font-weight: 600; color: var(--text-2); }
.done-list[open] > summary::after { content: "Hide"; }
.done-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); padding: var(--s1) 0; font-size: 13px; color: var(--text-3); }
.done-row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: line-through; text-decoration-thickness: 1px; }

.toast { display: flex; align-items: center; gap: var(--s3); }
.toast button { font-weight: 700; min-height: 32px; padding: 0 var(--s1); text-decoration: underline; text-underline-offset: 3px; }

.onboard-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: var(--s4); }
.onboard-mark .pulse-mark { width: 32px; height: 32px; }

/* catch-up player: full-screen, always dark so clips pop */
.sheet.player-sheet { background: #050607; color: #f2f4f7; padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; --text: #f2f4f7; --text-2: #b3bac5; --text-3: #8a93a0; --surface-2: #1c2027; --line: rgba(255,255,255,.1); --accent-text: #c8f31d; --bg: #050607; }
@media (min-width: 1100px) { .sheet.player-sheet { padding-top: var(--s6); } }
.player { display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.p-top { display: grid; gap: var(--s2); }
.segments { display: flex; gap: 4px; }
.segments i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); overflow: hidden; }
.segments i b { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.segments i.full b { width: 100%; }
.p-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: 13px; color: var(--text-2); }
.p-count { display: flex; align-items: center; gap: var(--s2); }
.p-count b { color: var(--text); }
.p-video { position: relative; margin: 0 calc(-1 * var(--s4)); background: #000; }
.p-video video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.p-error { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: var(--s3); color: var(--text-2); text-align: center; }
.p-error p { margin: 0; }
.p-info h3 { margin: var(--s1) 0 0; font-size: var(--t-section); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.p-info .meta a { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.p-info .meta a svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.p-controls { display: flex; gap: var(--s2); margin-top: auto; }
.p-controls .btn { min-height: 52px; font-size: 15px; }
.p-next { display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "label label" "thumb title"; gap: var(--s1) var(--s3); align-items: center; text-align: left; padding: var(--s3); border-radius: var(--radius); background: #14171c; }
.p-next .label { grid-area: label; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.p-next .qthumb { grid-area: thumb; position: relative; width: 88px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.p-next .qthumb img { width: 100%; height: 100%; object-fit: cover; }
.p-next .qthumb .dur { right: 4px; bottom: 4px; padding: 0 5px; font-size: 11px; }
.p-next .title { grid-area: title; font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.finished { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: var(--s3); }
.finished h2 { font-family: var(--font-display); font-size: var(--t-display); margin: var(--s2) 0 0; }
.finished .sub { margin: 0; color: var(--text-2); }
.finished .sheet-actions { width: 100%; }
.nextmini { width: 100%; display: grid; justify-items: center; gap: var(--s2); padding: var(--s4); background: #14171c; border-color: rgba(255,255,255,.08); }
.nextmini .label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nextmini .teams { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.big-count { font-family: var(--font-display); font-size: var(--t-display); line-height: 1; }
.nextmini .sub { font-size: var(--t-meta); color: var(--text-3); }

/* v3 */
.chips-bar ~ .day h2 { top: 52px; } /* day headers stack under the pinned filter chips */
@media (max-width: 359px) {
  .break-row span { flex-basis: 100%; }
  .g-row { grid-template-columns: 66px minmax(0, 1fr) auto; gap: var(--s2); }
  .q-item { grid-template-columns: var(--tap) 64px minmax(0, 1fr) var(--tap); }
  .q-item .qthumb { width: 64px; }
}
