/* Highlight Corner — mobile-first styles */
:root { color-scheme: light dark; }
[data-theme="light"] {
  --bg: #f6f7f9; --card: #ffffff; --text: #14161a; --muted: #5d6570;
  --border: #e3e6eb; --accent: #d50a0a; --accent-text: #ffffff; --highlight-text: #ffffff;
  --nav-bg: rgba(255,255,255,.92); --shadow: 0 1px 3px rgba(0,0,0,.08);
  --table-head: #eef0f4;
}
[data-theme="dark"] {
  --bg: #0e1013; --card: #171a20; --text: #f2f4f7; --muted: #9aa3af;
  --border: #262b34; --accent: #ff3b30; --accent-text: #ffffff; --highlight-text: #0e1013;
  --nav-bg: rgba(14,16,19,.92); --shadow: 0 1px 3px rgba(0,0,0,.4);
  --table-head: #1e232c;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 14px 90px; }

/* Header + nav */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner { max-width: 860px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--text); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 44px; height: 44px; border-radius: 12px; }
.brand-name { color: var(--text); }
.brand-name span { color: var(--accent); }
nav.main-nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav.main-nav::-webkit-scrollbar { display: none; }
nav.main-nav a {
  text-decoration: none; font-size: .92rem; font-weight: 600; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; white-space: nowrap; min-height: 40px;
  display: inline-flex; align-items: center;
}
nav.main-nav a.active { color: var(--text); background: var(--table-head); }
.theme-toggle {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 999px; width: 42px; height: 42px; font-size: 1.1rem; cursor: pointer; flex: 0 0 auto;
}

/* Page titles + controls */
.page-title { font-size: 1.5rem; margin: 18px 0 4px; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; align-items: center; }
.context-notice { flex-basis: 100%; color: var(--muted); font-size: .85rem; }
.swipe-week-hint { display: none; color: var(--muted); font-size: .75rem; }
@media (max-width: 799px) and (pointer: coarse) {
  .swipe-week-hint { display: inline; flex-basis: 100%; margin-top: -4px; }
}
select, .seg button {
  font-size: 1rem; padding: 10px 14px; border-radius: 12px; min-height: 44px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--text); color: var(--bg); }

/* Game cards */
.game-card {
  display: block; text-decoration: none; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.game-card:active { transform: scale(.995); }
.game-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .82rem; color: var(--muted); }
.status { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; }
.status.final { color: var(--muted); }
.status.live { color: #e5484d; }
.status.live::before { content: "● "; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.team-row img { width: 34px; height: 34px; object-fit: contain; }
.team-row .tname { font-weight: 700; font-size: 1.02rem; flex: 1; min-width: 0; }
.team-row .trec { color: var(--muted); font-size: .82rem; font-weight: 400; }
.team-row .tscore { font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.team-row.winner .tscore { position: relative; }
.team-row.winner .tscore::before { content: "▶"; position: absolute; right: calc(100% + 4px); top: 50%; transform: translateY(-50%); font-size: .8rem; }
.game-card .card-foot { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  background: var(--table-head); color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 36px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 0; cursor: pointer;
}
.btn-yt { background: #d92014; color: #fff; width: 100%; }
.btn-yt:active { transform: scale(.99); }
.btn-ghost { background: var(--table-head); color: var(--text); }

/* Recap cards */
.verdict { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px; display: inline-block; margin-bottom: 8px; }
.card-foot .chip.verdict { display: inline-flex; justify-content: center; font-size: .8rem; padding: 6px 10px; margin-bottom: 0; }
.verdict.nail-biter { background: #1f6feb; color: #fff; }
.verdict.blowout { background: #6e40c9; color: #fff; }
.verdict.garbage-time { background: #b54708; color: #fff; }
.verdict.comfortable { background: #1a7f37; color: #fff; }
.recap-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.recap-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.recap-card h3 a { text-decoration: none; }
.recap-scoreboard {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px; padding: 14px 12px; margin-bottom: 16px;
  background: var(--table-head); border: 1px solid var(--border); border-radius: 12px;
}
.recap-score-team { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.recap-score-location, .recap-score-status {
  color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.recap-score-team strong { font-size: 1.05rem; letter-spacing: .04em; }
.recap-score-number { color: var(--text); font-size: 2.5rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.recap-score-status { padding: 5px 9px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
.recap-card p { margin: 8px 0; }
.recap-card .keystat { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 10px; }
.recap-card .keystat strong { color: var(--text); }
/* Recap show more: clamp the summary to 3 lines on mobile so the box score
   sits higher; full text on desktop, toggle hidden when nothing overflows. */
.recap-text { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.recap-text.expanded { display: block; }
.recap-toggle { background: none; border: 0; padding: 10px 0; margin: 2px 0 0; min-height: 44px; color: var(--accent); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
@media (min-width: 700px) {
  .recap-text { display: block; }
  .recap-toggle { display: none; }
}

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
table.stats { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
table.stats caption { text-align: left; font-weight: 800; padding: 10px 12px; font-size: 1rem; }
table.stats th, table.stats td { padding: 9px 10px; text-align: right; border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats thead th { background: var(--table-head); border-top: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.stats td.pl { text-align: left; font-weight: 600; }
table.stats td.pl .pos { color: var(--muted); font-weight: 400; font-size: .78rem; }

/* Section titles */
.section-title { font-size: 1.15rem; margin: 22px 0 10px; letter-spacing: -.01em; }

/* Game page hero */
.game-hero { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 14px; margin: 14px 0; text-align: center; box-shadow: var(--shadow); }
.game-hero .matchup { display: flex; align-items: center; justify-content: center; gap: 14px; }
.game-hero .side { flex: 1; }
.game-hero .side img { width: 64px; height: 64px; object-fit: contain; }
.game-hero .side .nm { font-weight: 800; font-size: 1.05rem; margin-top: 6px; }
.game-hero .mid { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.game-hero .mid .dash { color: var(--muted); font-weight: 400; margin: 0 6px; }
.game-hero .gmeta { color: var(--muted); font-size: .88rem; margin-top: 10px; }
.injury { border-left: 3px solid var(--accent); padding: 8px 12px; margin-bottom: 10px; background: var(--card);
  border-radius: 0 12px 12px 0; border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.injury .who { font-weight: 700; }
.injury .st { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.injury .cm { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* Loading / empty / error */
.loading, .empty, .error { text-align: center; color: var(--muted); padding: 40px 16px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; margin: 0 auto 12px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 26px 14px 40px; }
.site-footer a { color: var(--muted); }

@media (min-width: 700px) {
  .page-title { font-size: 1.9rem; }
  .btn-yt { width: auto; }
}

/* spoiler-free mode: blur scores, keep layout */
[data-spoilers="hide"] .tscore,
[data-spoilers="hide"] .scoreline,
[data-spoilers="hide"] .blur-score,
[data-spoilers="hide"] .game-hero .mid { filter: blur(9px); user-select: none; pointer-events: none; }
.spoiler-toggle {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 999px; width: 42px; height: 42px; font-size: 1.1rem; cursor: pointer; flex: 0 0 auto;
}
.spoiler-toggle.on { background: var(--text); color: var(--bg); }

/* clickable game cards + watched buttons */
.game-card { cursor: pointer; }
.game-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.chip { cursor: pointer; border: 0; font: inherit; }

/* team-colored tabs for the box score */
.team-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.team-tab {
  flex: 1; min-height: 52px; border-radius: 14px; font-weight: 800; font-size: 1.05rem;
  border: 2px solid var(--border); background: var(--card); color: var(--team, var(--text));
  cursor: pointer; letter-spacing: .02em;
}
.team-tab.active { border-color: var(--team, var(--text)); box-shadow: inset 0 -4px 0 var(--team, var(--text)); }
.team-pane { display: none; }
.team-pane.active { display: block; }
.fav-picker { margin: 0 0 14px; }
.fav-picker summary { cursor: pointer; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 10px; }
.fav-grid button { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--muted); font-weight: 700; cursor: pointer; font-size: .95rem; }
.fav-grid button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* AdSense slots: collapse gracefully until Google approves the site */
.ad-slot { margin: 4px 0 14px; }
.ad-slot ins.adsbygoogle { display: block; }
.ad-slot[data-hc-ad-status="blocked"], .ad-rail[data-hc-ad-status="blocked"] { display: none; }

/* desktop side rails (injected by ads.js; hidden below 1280px) */
.ad-rail { display: none; position: fixed; top: 120px; z-index: 40; }
@media (min-width: 1280px) {
  .ad-rail { display: block; }
  .ad-rail.left { left: calc(50% - 620px); }
  .ad-rail.right { right: calc(50% - 620px); }
}

/* centered highlight CTA: full-width centered on mobile, centered pill on web */
.card-foot.center { justify-content: center; }
.btn-block-center { display: flex; width: 100%; max-width: 560px; margin: 0 auto 10px; text-align: center; }
@media (min-width: 700px) {
  .btn-block-center { width: max-content; min-width: 360px; padding-left: 30px; padding-right: 30px; }
}

/* prev/next game navigation on game pages */
.game-nav { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 2px; }
.game-nav .game-nav-btn { flex: 1; min-height: 44px; font-size: .9rem; }
.game-nav.single { justify-content: center; }
.game-nav.single .game-nav-btn { flex: 0 1 auto; width: max-content; min-width: min(360px, 100%); }
.game-nav-empty { flex: 1; }

/* ---------- satisfying UI: motion, skeletons, polish ---------- */

/* card entrance */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.game-card, .recap-card, table.stats, .game-hero { animation: rise .45s cubic-bezier(.2,.7,.3,1) both; }

/* tactile press states */
.btn, .game-card, .chip, .team-tab, .fav-grid button { transition: transform .12s ease, background-color .25s ease, color .25s ease, border-color .25s ease; }
.btn:active { transform: scale(.96); }
.game-card:active { transform: scale(.98); }
.chip:active, .team-tab:active { transform: scale(.96); }

/* smooth theme transitions */
body, .site-header, .game-card, .recap-card, .game-hero, table.stats, .btn-ghost, .team-tab, .chip, select, .seg, .injury {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

/* pulsing LIVE indicator */
.status.live::before { display: inline-block; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .3; } }

/* skeleton shimmer loading */
.skel { border-radius: 10px; background: linear-gradient(100deg, var(--table-head) 40%, var(--border) 50%, var(--table-head) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.skel-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }

/* sticky filter bar under the header */
.controls { position: sticky; top: 63px; z-index: 30; background: var(--bg); padding: 10px 0; }

/* loser dimming: winners pop, losers recede */
.team-row:not(.winner) { opacity: .72; }

/* scroll-to-top */
#toTop { position: fixed; right: 16px; bottom: 24px; z-index: 35; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 1.3rem; font-weight: 800;
  cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease; }
#toTop.show { opacity: 1; pointer-events: auto; transform: none; }
#toTop:active { transform: scale(.92); }

/* sortable statistics columns */
table.stats th:has(.table-sort) { padding: 0; }
.table-sort { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px;
  width: 100%; min-height: 44px; padding: 9px 10px; border: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-align: inherit; cursor: pointer; white-space: nowrap; }
table.stats th:first-child .table-sort { justify-content: flex-start; }
.table-sort:hover { color: var(--text); }
.table-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 4px; }
.sort-ind { font-size: .75em; min-width: 1em; }

/* copy-link buttons */
.copy-btn { white-space: nowrap; }
.copy-btn:disabled { opacity: .7; cursor: default; }

/* reduced motion: keep it calm */
@media (prefers-reduced-motion: reduce) {
  .game-card, .recap-card, table.stats, .game-hero { animation: none; }
  .status.live::before, .skel { animation: none; }
  .btn:active, .game-card:active, .chip:active, .team-tab:active { transform: none; }
}

/* ---------- character: collapsible sections, team-color bars, texture ---------- */

/* collapsible game-page sections */
.collapsible { margin: 16px 0; }
.collapsible-head { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
  user-select: none; -webkit-user-select: none; margin: 14px 0 10px; }
.collapsible-head::-webkit-details-marker { display: none; }
.collapsible-head .chev { margin-left: auto; color: var(--muted); font-size: .9em; transition: transform .2s ease; }
.collapsible[open] .collapsible-head .chev { transform: rotate(180deg); }
.collapsible-head .count { font-size: .78rem; font-weight: 700; background: var(--table-head);
  color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.collapsible-head .tag { color: var(--muted); font-weight: 400; font-size: .85rem; }
.collapsible-body { animation: rise .3s ease both; }

/* team-color gradient bars: away -> home */
.game-card { position: relative; }
.game-card::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--ga, transparent), var(--gh, transparent)); }
.game-hero { position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(0deg, transparent 0 22px, rgba(127,127,127,.055) 22px 23px); }
.game-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--ga, var(--accent)), var(--gh, var(--accent))); }

/* punchier headlines */
.recap-card h3 { font-size: 1.18rem; letter-spacing: -.015em; }
.page-title { font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .collapsible-body { animation: none; }
}

/* App upgrade: Tailwind utilities handle layout; these tokens retain the brand. */
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
[hidden], [data-theme] [hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--card); padding: 12px 18px; border-radius: 12px; }
.skip-link:focus { top: calc(8px + env(safe-area-inset-top)); }
.site-header { padding-top: env(safe-area-inset-top); }
.site-header .inner { min-height: 68px; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.settings-toggle { margin-left: auto; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
nav.main-nav { overflow: visible; }
nav.main-nav a { min-height: 44px; padding: 8px 10px; font-size: .85rem; }
.bottom-nav { display: none; }
.wrap { padding: 8px max(18px, env(safe-area-inset-right)) 24px max(18px, env(safe-area-inset-left)); }
.page-title { font-size: clamp(1.65rem, 4vw, 2rem); letter-spacing: -.04em; margin-top: 22px; }
.page-sub { max-width: 580px; line-height: 1.55; margin-bottom: 18px; }
.controls { position: static; padding: 0; margin-bottom: 16px; }
.score-toolbar { padding: 8px 0; margin-bottom: 10px; }
.refresh-btn { min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.refresh-btn:disabled { opacity: .6; cursor: wait; }
.freshness { font-size: .78rem; color: var(--muted); }
.seg { width: 100%; }
.seg button { flex: 1; white-space: nowrap; font-size: .88rem; padding: 12px 8px; min-height: 46px; }
.seg button.active { background: var(--table-head); color: var(--text); box-shadow: inset 0 -3px var(--accent); }
.fav-picker { margin-bottom: 6px; }
.fav-picker summary { font-size: .85rem; }
.game-card { padding: 18px; border-radius: 20px; margin-bottom: 14px; }
.game-meta { gap: 12px; align-items: flex-start; line-height: 1.5; }
.game-meta > :last-child { text-align: right; }
.team-row:not(.winner) { opacity: 1; }
.team-row .tscore { color: var(--text) !important; font-size: 1.5rem; }
.team-row img { width: 36px; height: 36px; }
button.chip { min-height: 44px; font-size: .8rem; }
.day-heading { color: var(--muted); font-size: .88rem; font-weight: 650; margin: 24px 0 12px; }
.game-hero .mid { color: var(--text); font-size: clamp(1.5rem, 6vw, 2rem); }
.game-hero .mid span:not(.dash) { color: var(--text) !important; }
.game-hero .side .nm { color: var(--text) !important; font-size: .95rem; }
.back-link { width: fit-content; min-height: 44px; font-size: .88rem; text-decoration: none; color: var(--muted); margin: 6px 0; }
.game-nav { margin: 14px 0; }
.game-nav .game-nav-btn { font-size: .8rem; }
.table-wrap { overflow-x: auto; }
#fantasy { overflow-x: auto; }
.fantasy-mobile-line { display: none; }
#fantasy .fantasy-stats th:nth-child(2) .table-sort { justify-content: flex-start; }
@media (max-width: 699px) {
  #fantasy table.fantasy-stats { table-layout: fixed; }
  #fantasy .fantasy-stats th:first-child { width: 44px; }
  #fantasy .fantasy-stats .fantasy-points { width: 76px; }
  #fantasy .fantasy-stats .fantasy-line { display: none; }
  #fantasy .fantasy-stats td.pl { white-space: normal; overflow-wrap: anywhere; }
  #fantasy .fantasy-mobile-line { display: block; margin-top: 4px; color: var(--muted);
    font-size: .78rem; font-weight: 400; line-height: 1.5; }
  #fantasy .fantasy-points strong { font-size: 1.05rem; }
}
.site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.ad-slot { margin: 24px 0; background: var(--card); border-radius: 12px; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-slot:has(ins[data-ad-status="filled"])::before { content: "ADVERTISEMENT"; display: block; color: var(--muted); font-size: .65rem; letter-spacing: .12em; text-align: center; padding: 8px; }
.ad-rail:has(ins[data-ad-status="unfilled"]) { display: none; }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); cursor: pointer; }
[data-theme="dark"] :is(.icon-button, .settings-toggle, .bottom-nav, .back-link, .refresh-btn) img { filter: invert(1); }
#settingsDialog { color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 24px; width: min(480px, calc(100% - 32px)); padding: 24px; max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 24px 100px #0006; }
#settingsDialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
#settingsDialog h2 { font-size: 1.5rem; letter-spacing: -.04em; margin: 0; }
#settingsDialog h3 { margin: 0 0 8px; font-size: 1.05rem; }
.eyebrow { color: var(--accent); font-size: .65rem; letter-spacing: .13em; font-weight: 800; margin: 0 0 6px; }
.settings-row { padding: 20px 0; border-bottom: 1px solid var(--border); }
.settings-row p { margin: 3px 0 0; font-size: .85rem; color: var(--muted); }
.theme-toggle, .spoiler-toggle { width: auto; min-width: 68px; height: 44px; padding: 0 14px; font-size: .85rem; font-weight: 700; }
.settings-install { padding: 22px 0; }
.settings-install > p, .install-promo p:not(.eyebrow) { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; }
.btn-primary { background: var(--text); color: var(--bg); }
.install-help { color: var(--muted); font-size: .83rem; line-height: 1.6; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--table-head); }
.install-help strong { color: var(--text); }
.settings-privacy { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; color: var(--muted); }
.install-promo { margin: 20px 0; border: 1px solid var(--border); border-radius: 20px; padding: 20px; background: var(--card); }
.install-promo h2 { font-size: 1.25rem; letter-spacing: -.03em; margin: 0; }
.spoiler-notice { padding: 16px; margin: 14px 0; background: var(--table-head); color: var(--muted); border-radius: 12px; font-size: .9rem; }
[data-spoilers="hide"] [data-outcome] { display: none !important; }
[data-spoilers="hide"] .team-row.winner .tscore::after { content: none; }
[data-spoilers="hide"] .team-row { opacity: 1; }
[data-spoilers="hide"] :is(.tscore, .scoreline, .blur-score) { display: none; }
[data-spoilers="hide"] .game-hero .mid { filter: none; }
@media (min-width: 800px) {
  .seg { width: auto; }
  .freshness { margin-left: auto; }
  .settings-toggle { margin-left: 8px; }
}
@media (max-width: 799px) {
  nav.main-nav { display: none; }
  .bottom-nav { display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--nav-bg); backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .bottom-nav a { color: var(--muted); min-height: 56px; font-size: .7rem; text-decoration: none; font-weight: 650; border-radius: 12px; }
  .bottom-nav a.active { color: var(--text); background: var(--table-head); box-shadow: inset 0 -3px var(--accent); }
  .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body:has(main:last-of-type) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body:has(.site-footer) { padding-bottom: 0; }
  #toTop { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .freshness { width: 100%; }
  .game-hero .matchup { gap: 8px; }
  #settingsDialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Score-first visual system, shared by every public page. */
[data-theme="light"] {
  --bg: #fafafa; --card: #fff; --text: #17191c; --muted: #616871;
  --border: #dedfe2; --table-head: #f0f1f3; --nav-bg: rgba(250,250,250,.94);
  --shadow: none;
}
[data-theme="dark"] {
  --bg: #0b0d10; --card: #111418; --text: #f6f7f8; --muted: #9ca3ad;
  --border: #292d33; --table-head: #1b1f25; --nav-bg: rgba(11,13,16,.94);
  --shadow: none;
}
body { line-height: 1.42; }
.wrap { max-width: 920px; padding-bottom: 110px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { border-bottom: 1px solid var(--border); }
.site-header .inner { max-width: 920px; min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
.brand { font-size: clamp(1.12rem, 3.5vw, 1.55rem); font-weight: 800; letter-spacing: -.055em; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.settings-toggle { border: 0; background: transparent; border-radius: 999px; }
.settings-toggle:hover, nav.main-nav a:hover { background: var(--table-head); }
nav.main-nav a { border-radius: 8px; }
nav.main-nav a.active { background: transparent; color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.page-title { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.1; letter-spacing: -.055em; margin-top: 28px; }
.page-sub { font-size: .95rem; max-width: 58ch; margin-top: 8px; }
.section-title { font-size: 1.32rem; letter-spacing: -.035em; margin-top: 30px; }
select, .refresh-btn { background: transparent; border-color: var(--border); border-radius: 9px; }
.seg { border-radius: 9px; }
.seg button.active { box-shadow: inset 0 -2px var(--accent); }
.btn { border-radius: 9px; }
.btn-primary { background: var(--accent); color: var(--highlight-text); }
.btn-ghost { border: 1px solid var(--border); background: transparent; }
.btn-yt { background: var(--accent); }
.chip { border-radius: 7px; background: transparent; color: var(--muted); }
.game-card, .recap-card, .game-hero { box-shadow: none; animation: none; }
.game-card::before, .game-hero::before { display: none; }
.game-card { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 20px 0; margin: 0; }
.game-card:active { transform: none; }
.team-row:not(.winner) { opacity: 1; }
.team-row.winner .tscore::before { display: none; }
.team-row .tname { color: var(--text) !important; font-weight: 680; }
.team-row .tscore { font-size: 1.85rem; font-weight: 780; letter-spacing: -.045em; }
.team-row img { width: 42px; height: 42px; }
.status { text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 600; }
.verdict { font-size: .67rem; letter-spacing: .035em; border-radius: 999px; padding: 6px 10px; margin: 0; line-height: 1.15; white-space: nowrap; }
.card-foot { gap: 4px; }
.card-foot .chip.verdict { font-size: .67rem; }
.card-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.card-foot .chip:not(.verdict), .card-foot button.chip { min-height: 44px; padding: 8px 10px; }
.card-foot a:hover, .card-foot button:hover { color: var(--text); background: var(--table-head); }
.recap-card { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 24px 0; }
.recap-card h3 { font-size: 1.26rem; line-height: 1.22; letter-spacing: -.03em; }
.recap-scoreboard { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 0 18px; }
.recap-score-status { background: transparent; border: 0; }
.recap-score-number { font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.game-hero { background: transparent; background-image: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 24px 0; }
.game-hero .mid { font-size: clamp(2rem, 8vw, 3.4rem); letter-spacing: -.055em; }
.game-hero .side .nm { font-weight: 700; }
.game-hero-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; text-align: center; }
.game-hero-status .status.live::before { display: none; }
.game-hero-status .verdict { display: inline-flex; align-items: center; justify-content: center; }
.recap-score-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; padding: 0; }
.recap-score-status .verdict { letter-spacing: .035em; }
.collapsible { border-bottom: 1px solid var(--border); margin: 0; padding: 4px 0; }
.collapsible-head { min-height: 52px; }
.collapsible-head .count { background: transparent; }
.team-tab { border: 0; border-bottom: 2px solid var(--border); background: transparent; border-radius: 0; font-size: .95rem; }
.team-tab.active { border-color: var(--team, var(--accent)); box-shadow: none; }
table.stats { background: transparent; border: 0; border-radius: 0; }
table.stats caption { font-size: 1.04rem; padding-left: 0; }
table.stats th, table.stats td { border-color: var(--border); padding-top: 12px; padding-bottom: 12px; }
table.stats thead th { background: transparent; }
.injury { background: transparent; border-top: 0; border-right: 0; border-bottom-color: var(--border); border-radius: 0; }
.site-footer { border-top: 1px solid var(--border); line-height: 1.7; }
.ad-slot { border-radius: 0; background: transparent; }
#settingsDialog { border-radius: 14px; }
.settings-row { padding: 18px 0; }
.install-promo { background: transparent; border: 1px solid var(--border); border-radius: 10px; }
.loading, .empty, .error { border-bottom: 1px solid var(--border); }

/* Weekly scores: a continuous list with a day jump rail. */
.page-scores .score-toolbar { margin: 24px 0 12px; gap: 8px; }
.page-scores #weekSel { font-size: 1.25rem; font-weight: 760; border: 0; padding-left: 0; letter-spacing: -.035em; }
.page-scores #seasonSel { border: 0; color: var(--muted); }
.page-scores .refresh-btn { margin-left: auto; }
.page-scores .freshness { width: 100%; }
.day-nav { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; margin: 0 0 12px; }
.day-nav::-webkit-scrollbar { display: none; }
.day-nav button { flex: 1 0 92px; min-height: 62px; padding: 9px 14px 10px; display: flex; align-items: center; justify-content: center; text-align: center; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 620; cursor: pointer; white-space: nowrap; }
.day-nav button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--text); }
.day-nav button:hover { color: var(--text); background: var(--table-head); }
.day-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.score-filter-menu { width: max-content; max-width: 100%; margin: 12px 0 0 auto; position: relative; z-index: 2; }
.score-filter-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; color: var(--muted); cursor: pointer; font-weight: 650; border-radius: 8px; }
.score-filter-menu > summary::-webkit-details-marker { display: none; }
.score-filter-menu > summary::after { content: '⌄'; margin-left: 8px; font-size: 1.15em; }
.score-filter-menu[open] { width: 100%; }
.score-filter-menu[open] > summary { margin-left: auto; display: flex; width: max-content; }
.score-filter-menu #filterRow { margin-bottom: 4px; }
.score-filter-menu .fav-picker { margin-bottom: 0; }
.score-filter-menu .fav-grid { padding-bottom: 14px; }
.day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 0; padding-bottom: 6px; font-size: clamp(1.55rem, 5.8vw, 2.3rem); font-weight: 790; letter-spacing: -.035em; line-height: 1.12; color: var(--text); scroll-margin-top: calc(90px + env(safe-area-inset-top)); }
.day-heading small { color: var(--muted); font-size: .78rem; font-weight: 550; letter-spacing: 0; white-space: nowrap; }
.page-scores .game-card { padding: 18px 0 14px; }
.score-matchup { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; align-items: center; }
.score-teams { min-width: 0; display: grid; gap: 6px; }
.score-teams .team-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 10px; padding: 0; }
.score-teams .team-row img { width: 42px; height: 42px; }
.score-teams .tname { overflow-wrap: anywhere; line-height: 1.18; }
.score-teams .trec { display: block; margin-top: 3px; font-size: .75rem; }
.score-teams .tscore { min-width: 0; align-self: center; font-size: clamp(1.55rem, 6vw, 2rem); }
.game-state { min-width: 0; width: 100%; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.game-state .status, .game-state .kickoff { display: block; width: 100%; text-align: center; }
.game-state .status.live { color: var(--accent); }
.page-scores .status.live::before { display: none; }
.game-state .kickoff { color: var(--muted); font-size: .76rem; line-height: 1.25; }
.game-state .verdict { display: inline-flex; justify-content: center; max-width: 100%; font-size: .63rem; }
.page-scores .card-foot { margin: 8px 0 0 52px; }
.page-scores .highlight-link { color: var(--accent); }
.page-scores .chip.verdict { min-height: auto; }
.highlight-feature { border-top: 2px solid var(--accent); }
.highlight-feature .status { color: var(--accent); }

@media (max-width: 799px) {
  .settings-toggle span { display: none; }
  .settings-toggle { width: 44px; height: 44px; padding: 10px; }
  .bottom-nav { background: var(--nav-bg); }
  .bottom-nav a { border-radius: 0; font-size: .78rem; font-weight: 600; }
  .bottom-nav a.active { background: transparent; color: var(--accent); box-shadow: inset 0 -3px var(--accent); }
  .bottom-nav a.active img { opacity: 1; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 359px) {
  .score-matchup { grid-template-columns: 1fr; gap: 10px; }
  .game-state { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; min-height: 44px; gap: 6px; }
  .game-state .status, .game-state .kickoff { width: auto; }
  .page-scores .card-foot { margin-left: 0; }
  .day-heading { font-size: 1.45rem; }
}
@media (min-width: 800px) {
  .page-scores .score-toolbar { margin-top: 28px; }
  .page-scores .freshness { width: auto; }
  .score-matchup { grid-template-columns: minmax(0, 1fr) 142px; }
  .game-state { gap: 9px; }
}

/* Score card actions stay together; videos use the site's accent in both themes. */
.card-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.card-actions .chip { min-height: 44px; }
.card-actions .highlight-link { background: var(--accent); color: var(--highlight-text); }
.card-actions .highlight-link:hover { filter: brightness(.95); }

/* Accessible controls and long content stay within narrow viewports. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.team-pane[hidden] { display: none; }
.game-meta > span { min-width: 0; overflow-wrap: anywhere; }
.chip { min-height: 44px; }
.controls > select { max-width: 100%; }
.settings-row > div { min-width: 0; }
.recap-card, .injury .cm { overflow-wrap: anywhere; }

.brand { min-height: 44px; }
.table-sort { min-width: 44px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
