/* ScoreFut public site. Colors mirror lib/core/theme/app_colors.dart. */
:root {
  color-scheme: light;
  --bg: #F4F7F5;
  --surface: #FFFFFF;
  --surface-2: #EEF2EF;
  --text: #111827;
  --muted: #64748B;
  --line: #E2E8F0;
  --green: #16A34A;
  --green-strong: #15803D;
  --green-soft: rgba(22, 163, 74, .12);
  --on-green: #FFFFFF;
  --live: #16A34A;
  --red-card: #E53935;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --radius: 14px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #080C0A; --surface: #111713; --surface-2: #1A211C; --text: #F8FAFC; --muted: #A7B0AA; --line: #1F2922;
    --green: #22C55E; --green-strong: #4ADE80; --green-soft: rgba(34, 197, 94, .14); --on-green: #080C0A; --live: #22C55E; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080C0A; --surface: #111713; --surface-2: #1A211C; --text: #F8FAFC; --muted: #A7B0AA; --line: #1F2922;
  --green: #22C55E; --green-strong: #4ADE80; --green-soft: rgba(34, 197, 94, .14); --on-green: #080C0A; --live: #22C55E; --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
body > main { flex: 1 0 auto; }
body > .site-header, body > .site-footer { flex-shrink: 0; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--green); color: var(--on-green); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 1440px) {
  .wrap { max-width: min(1640px, calc(100% - 64px)); }
}
.ic { flex: none; vertical-align: middle; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.wordmark { font-weight: 900; font-style: italic; font-size: 21px; letter-spacing: 0; color: var(--text); }
.wordmark span { color: var(--green); }
.main-nav { display: flex; gap: 4px; flex: 1; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] .ic { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { color: var(--on-green); filter: brightness(1.05); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-block { width: 100%; }

/* Layouts */
.page { padding-block: 16px 40px; }
.layout-3, .layout-2 { display: grid; gap: 20px; align-items: start; }
.layout-3 { grid-template-columns: 220px minmax(0, 1fr) 300px; }
.layout-2 { grid-template-columns: minmax(0, 1fr) 320px; }
.content { min-width: 0; display: grid; gap: 16px; }
.rail { position: sticky; top: 76px; display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Date bar */
.date-bar { display: flex; gap: 8px; align-items: center; min-width: 0; }
.days { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex: 1; min-width: 0; padding-block: 2px; }
.days::-webkit-scrollbar { display: none; }
.day { scroll-snap-align: center; flex: none; display: grid; justify-items: center; min-width: 72px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.day span { font-weight: 800; }
.day small { color: var(--muted); font-size: 12px; }
.day.is-active { background: var(--green); border-color: var(--green); color: var(--on-green); }
.day.is-active small { color: inherit; opacity: .85; }
.date-pick { position: relative; display: flex; gap: 6px; align-items: center; flex: none; }
.date-pick input { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 10px 0 36px; font: inherit; }
.date-pick-icon { position: absolute; left: 10px; top: 12px; color: var(--muted); pointer-events: none; }

/* Sections and league groups */
.page-head h1 { font-size: 26px; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 4px; }
.block { display: grid; gap: 10px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-head h2, .section-title { font-size: 17px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.block-head a { color: var(--green); font-weight: 700; font-size: 14px; }
.section-title { margin-top: 8px; }
.muted-title { color: var(--muted); }
.subsection-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.league { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.league-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.league-head h3 { font-size: 14px; font-weight: 800; }
.league-head p { font-size: 12px; color: var(--muted); }
.league-logo { width: 20px; height: 20px; object-fit: contain; }
/* Dark crests and competition logos stay visible on the dark background (NetworkLogo tint). */
:root[data-theme="dark"] .league-logo, :root[data-theme="dark"] .logo { background: rgba(255, 255, 255, .88); border-radius: 5px; padding: 1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .league-logo, :root:not([data-theme="light"]) .logo { background: rgba(255, 255, 255, .88); border-radius: 5px; padding: 1px; }
}
.matches { list-style: none; margin: 0; padding: 0; }
.matches li + li { border-top: 1px solid var(--line); }

/* Match card */
.match { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; min-height: 64px; transition: background .2s; }
.match:hover { background: var(--surface-2); color: inherit; }
.clock { font-weight: 800; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.match.is-live .clock { color: var(--live); }
.teams { display: grid; gap: 4px; min-width: 0; }
.team { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.logo { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.score { min-width: 18px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.match.is-live .score { color: var(--live); }
.red-card { display: inline-grid; place-items: center; width: 12px; height: 16px; border-radius: 2px; background: var(--red-card); color: #fff; font-size: 10px; font-weight: 800; }
.match-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-live { background: var(--green-soft); color: var(--live); }
.tv { color: var(--green); display: inline-flex; }
.match-note { margin-top: 2px; }
.stream-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.stream-note .ic { width: 14px; height: 14px; }
.stream-note.is-live { color: var(--live); }
.just-changed { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { background: var(--green-soft); } }

/* Featured and alerts */
.featured { display: grid; gap: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--green-soft), var(--surface) 60%); text-align: center; }
.featured:hover { color: inherit; border-color: var(--green); }
.featured-league { font-size: 13px; font-weight: 700; color: var(--muted); }
.featured-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.featured-team { display: grid; justify-items: center; gap: 8px; font-weight: 800; }
.featured-team .logo { width: 56px; height: 56px; }
.featured-score, .featured-vs { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; }
.featured-foot { display: inline-flex; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.alert-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); font-weight: 700; }
.alert-card .ic { color: var(--green); }
.alert-card strong { margin-left: auto; color: var(--green); }
.empty, .notice { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line); color: var(--muted); display: grid; gap: 12px; justify-items: start; }
.notice h1 { color: var(--text); font-size: 22px; }
.more { text-align: center; }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.seg { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg.is-active { background: var(--green); color: var(--on-green); }

/* Rails */
.rail-card { padding: 14px; display: grid; gap: 10px; }
.rail-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rail-list, .mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-list a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.rail-list a:hover { background: var(--surface-2); }
.rail-list .ic { color: var(--green); }
.mini-list a { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; padding: 8px; border-radius: 10px; font-size: 13px; }
.mini-list a:hover { background: var(--surface-2); }
.mini-teams { display: grid; font-weight: 600; min-width: 0; }
.mini-teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-score { font-weight: 900; color: var(--live); }
.mini-clock { grid-column: 2; color: var(--live); font-size: 12px; font-weight: 700; text-align: right; }
.rail-more { color: var(--green); font-weight: 700; font-size: 14px; }
.rail-link { display: flex; align-items: center; gap: 12px; }
.rail-link .ic-tv { color: var(--green); }
.rail-link span { flex: 1; display: grid; }
.rail-link small { color: var(--muted); }
.app-cta { padding: 16px; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.app-cta-head { display: flex; align-items: center; gap: 10px; }
.app-cta ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; font-size: 14px; }
.app-cta.compact { grid-template-columns: 1fr auto; align-items: center; }

/* Match page */
.match-hero { padding: 20px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; text-align: center; }
.match-meta { display: inline-flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.match-date { color: var(--muted); font-size: 14px; }
.match-score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.hero-team { display: grid; justify-items: center; gap: 8px; }
.hero-logo { width: 72px; height: 72px; object-fit: contain; }
.hero-name { font-size: 18px; font-weight: 800; line-height: 1.2; }
.hero-score { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hero-vs { color: var(--muted); font-size: 28px; }
.hero-pen { color: var(--muted); font-size: 13px; }
.hero-status { display: inline-flex; align-items: center; gap: 6px; justify-content: center; font-weight: 700; color: var(--muted); }
.hero-status.is-live { color: var(--live); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.block-card { padding: 16px; display: grid; gap: 12px; }
.block-card h2 { font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; max-width: 100%; }
.player iframe, .player-start, .player-start img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-start { padding: 0; cursor: pointer; background: #000; }
.player-start[hidden], [data-video-panel][hidden] { display: none; }
.mp-video-picker { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.mp-video-picker select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
.player-start img { object-fit: cover; opacity: .85; }
.player-play { position: absolute; inset: 0; display: grid; place-items: center; }
.player-play .ic { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: var(--green); color: var(--on-green); fill: currentColor; }
.player-caption { color: var(--muted); font-size: 14px; }
.player-caption strong { color: var(--text); }
.broadcast-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.other-links, .channel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.other-links a, .channel-list li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.about-stream summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.about-stream p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.fineprint { color: var(--muted); font-size: 12px; }
.fineprint a { color: var(--green); font-weight: 700; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.event { display: grid; grid-template-columns: 44px 14px 1fr; align-items: center; gap: 8px; font-size: 14px; }
.event-min { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.kind-goal .event-mark { background: var(--green); }
.kind-yellow .event-mark { background: #FACC15; border-radius: 2px; height: 13px; }
.kind-red .event-mark { background: var(--red-card); border-radius: 2px; height: 13px; }
.event-team { color: var(--muted); font-size: 12px; }
.event.is-away { direction: ltr; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stat-values { display: grid; grid-template-columns: 56px 1fr 56px; font-size: 14px; font-weight: 700; }
.stat-values span:nth-child(2) { text-align: center; color: var(--muted); font-weight: 600; }
.stat-values span:last-child { text-align: right; }
.stat-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.stat-bar span { display: block; height: 100%; background: var(--green); }
.info-list { margin: 0; display: grid; gap: 10px; }
.info-list div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.info-list dt { color: var(--muted); font-size: 14px; }
.info-list dd { margin: 0; font-weight: 600; }
.app-features { padding: 16px; display: grid; gap: 10px; }
.app-features h2 { font-size: 15px; }
.app-features ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; font-size: 14px; }

/* Search */
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result-list li { display: flex; align-items: center; gap: 12px; }
.result-list span { display: grid; }
.result-list small { color: var(--muted); }

/* Footer and toast */
.site-footer { border-top: 1px solid var(--line); padding-block: 20px; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-row a:hover { color: var(--green); }
[hidden] { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.25); font-weight: 600; max-width: calc(100vw - 32px); }

/* Tablet */
@media (max-width: 1199px) {
  .layout-3 { grid-template-columns: minmax(0, 1fr) 280px; }
  .rail-left { display: none; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 280px; }
  .btn-app span { display: none; }
}
/* Mobile */
@media (max-width: 767px) {
  body { font-size: 14px; }
  .header-row { flex-wrap: wrap; gap: 0 8px; min-height: 56px; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { min-height: 36px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); }
  .btn-app { min-height: 40px; padding: 0 12px; }
  .btn-app span { display: inline; }
  .icon-btn { width: 40px; height: 40px; }
  .layout-3, .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail-left { display: none; }
  .rail-right .rail-link, .rail-right .mini-list, .rail-right section.rail-card { display: none; }
  .wrap { padding-inline: 12px; }
  .date-go { display: none; }
  .date-pick input { width: 48px; padding: 0 0 0 36px; color: transparent; }
  .date-pick input::-webkit-datetime-edit { display: none; }
  .day { min-width: 64px; padding: 6px 8px; }
  .match { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 10px 12px; }
  .page-head h1 { font-size: 22px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero-score { font-size: 32px; }
  .hero-name { font-size: 15px; }
  .app-cta.compact { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================================
   AGENDA DE JOGOS NA TV — a forma da arte, nas cores do tema.

   O DESENHO e proprio (faixa por competicao, confronto espelhado, logo do canal), mas a COR segue
   o tema do site, igual ao resto. No claro a pagina e clara; no escuro, escura.

   O que o tema claro precisa resolver: logo de canal costuma ser branco (sportv, max, TNT), e em
   fundo claro sumiria. Entao o logo ganha uma pastilha escura por tras — o inverso exato do que o
   site ja faz com escudo de liga no tema escuro (pastilha branca, la em cima).

   So o YouTube recebe acao de assistir; canal de TV e informacao de onde passa.
   ========================================================================================== */
.tv-skin {
    --tvbg: #EDF4EF;
    --tvtopo: #F8FBF9;
    --tvsurface: #FFFFFF;
    --tvsurface-2: #F3F8F4;
    --tvline: #DBE6DE;
    --tvtext: #0B1710;
    --tvmuted: #5E7467;
    --tvgreen: #16A34A;
    --tvgreen-bright: #15803D;
    --tvglow: rgba(22, 163, 74, .10);
    --tvband: linear-gradient(90deg, rgba(22, 163, 74, .22) 0%, rgba(22, 163, 74, .08) 45%, rgba(22, 163, 74, 0) 100%);
    --tvselo: rgba(22, 163, 74, .14);
    --tvchip: #0D1712;
    margin: -8px -14px 0; padding: 18px 14px 26px; border-radius: 18px;
    background:
        radial-gradient(1100px 420px at 78% -8%, var(--tvglow), transparent 62%),
        linear-gradient(180deg, var(--tvtopo) 0%, var(--tvbg) 42%);
    color: var(--tvtext);
}

/*
 * O escuro. Os dois seletores sao os mesmos que o site ja usa: a preferencia do sistema (a menos
 * que o visitante tenha fixado o claro) e a escolha explicita no botao.
 */
:root[data-theme="dark"] .tv-skin {
    --tvchip: transparent;
    --tvbg: #070F0C; --tvtopo: #0A1511; --tvsurface: #0E1A15; --tvsurface-2: #132219;
    --tvline: #1E3328; --tvtext: #F2F7F4; --tvmuted: #8CA79A;
    --tvgreen: #22C55E; --tvgreen-bright: #4ADE80;
    --tvglow: rgba(34, 197, 94, .17);
    --tvband: linear-gradient(90deg, rgba(34, 197, 94, .30) 0%, rgba(34, 197, 94, .10) 45%, rgba(34, 197, 94, 0) 100%);
    --tvselo: rgba(34, 197, 94, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tv-skin {
    --tvbg: #070F0C; --tvtopo: #0A1511; --tvsurface: #0E1A15; --tvsurface-2: #132219;
    --tvline: #1E3328; --tvtext: #F2F7F4; --tvmuted: #8CA79A;
    --tvgreen: #22C55E; --tvgreen-bright: #4ADE80;
    --tvglow: rgba(34, 197, 94, .17);
    --tvband: linear-gradient(90deg, rgba(34, 197, 94, .30) 0%, rgba(34, 197, 94, .10) 45%, rgba(34, 197, 94, 0) 100%);
    --tvselo: rgba(34, 197, 94, .18);
    --tvchip: transparent;
  }
}

/* O topo da peca: "Agenda de / Jogos na TV" e a data num comprimido. */
.tvh { margin: 0 0 16px; }
.tvh-sobre {
    margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
    color: var(--tvgreen-bright);
}
.tvh h1 {
    margin: 2px 0 12px; font-size: clamp(28px, 5vw, 44px); line-height: 1.02; font-weight: 900;
    letter-spacing: -.02em; text-transform: uppercase; color: var(--tvtext);
}
.tvh-data {
    display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 8px 16px 8px 10px;
    border-radius: 999px; background: var(--tvsurface); border: 1px solid var(--tvline);
    font-size: 14px; font-weight: 800;
}
.tvh-data .ic { width: 18px; height: 18px; color: var(--tvgreen-bright); }

/* A barra de datas e os filtros, vestidos pela pele. */
.tv-skin .day { background: var(--tvsurface); border-color: var(--tvline); color: var(--tvmuted); }
.tv-skin .day:hover { border-color: var(--tvgreen); color: var(--tvtext); }
.tv-skin .day.is-active { background: var(--tvgreen); border-color: var(--tvgreen); color: #04170D; }
.tv-skin .day small { color: inherit; opacity: .8; }
.tv-skin .date-jump input, .tv-skin .date-jump button {
    background: var(--tvsurface); border-color: var(--tvline); color: var(--tvtext);
}
.tv-filtros { display: grid; gap: 8px; margin: 16px 0 18px; }
.tv-filtro-linha { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tv-filtro-linha::-webkit-scrollbar { display: none; }
.tv-chip {
    flex: none; padding: 7px 14px; border: 1px solid var(--tvline); border-radius: 999px;
    background: var(--tvsurface); color: var(--tvmuted); font-size: 13px; font-weight: 700;
    text-decoration: none; white-space: nowrap;
}
.tv-chip:hover { color: var(--tvtext); border-color: var(--tvgreen); }
.tv-chip.is-active { background: var(--tvgreen); border-color: var(--tvgreen); color: #04170D; }
.tv-total { margin: 0 0 14px; color: var(--tvmuted); font-size: 13px; font-weight: 700; }
.tv-aviso { margin: 16px 0 0; color: var(--tvmuted); font-size: 13px; }
.tv-skin .empty { color: var(--tvmuted); }

/* A competicao: faixa com o selo, e o painel escuro com as partidas. */
.tvg { margin: 0 0 16px; }
.tvg-head {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 9px 16px 9px 16px; border-radius: 12px;
    background: var(--tvband);
    border: 1px solid var(--tvline);
}
.tvg-head::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    border-radius: 12px 0 0 12px; background: var(--tvgreen-bright);
}
.tvg-selo-liga {
    display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
    border-radius: 10px; background: var(--tvselo);
}
.tvg-liga-ic { width: 24px; height: 24px; object-fit: contain; }
.tvg-head h2 {
    margin: 0; font-size: 15px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
    color: var(--tvtext);
}

.tvg-list {
    list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 14px;
    background: var(--tvsurface); border: 1px solid var(--tvline);
}
.tvg-row {
    display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center;
    gap: 14px; padding: 13px 14px; border-radius: 10px;
}
.tvg-row + .tvg-row { margin-top: 4px; }
.tvg-row:hover { background: var(--tvsurface-2); }
.tvg-row.is-live { background: rgba(34, 197, 94, .07); }
.tvg-hora {
    font-size: 17px; font-weight: 900; color: var(--tvgreen-bright); font-variant-numeric: tabular-nums;
}
.tvg-hora.is-done { color: var(--tvmuted); font-size: 15px; }
.tvg-selo {
    display: inline-block; padding: 4px 9px; border-radius: 999px; background: #EF4444;
    color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .04em;
}

/* O confronto: nome, escudo, X, escudo, nome — espelhado, como na peca. */
.tvg-jogo {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center; gap: 14px; text-decoration: none; color: var(--tvtext); min-width: 0;
}
.tvg-jogo:hover .tvg-nome { color: var(--tvgreen-bright); }
.tvg-time { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tvg-time.is-home { justify-content: flex-end; text-align: right; }
.tvg-nome { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvg-escudo { width: 34px; height: 34px; object-fit: contain; flex: none; }
.tvg-x { color: var(--tvgreen); font-size: 15px; font-weight: 800; }

/* Os canais: logo grande e legivel, que e como se reconhece um canal de relance. */
.tvg-canais { display: flex; align-items: center; gap: 10px; flex: none; }
.tvg-canal { display: inline-grid; place-items: center; padding: 2px 7px; border-radius: 8px; background: var(--tvchip); }
.tvg-canal-ic { max-width: 68px; width: auto; height: 30px; object-fit: contain; border-radius: 6px; }
.tvg-canal.is-txt {
    padding: 5px 11px; border: 1px solid var(--tvline); border-radius: 999px; background: none;
    font-size: 12px; font-weight: 700; color: var(--tvmuted); white-space: nowrap;
}
.tvg-yt {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--tvgreen); color: #04170D; flex: none;
}
.tvg-yt:hover { background: var(--tvgreen-bright); }
.tvg-yt .ic { width: 17px; height: 17px; }

.tv-skin .app-cta { background: var(--tvsurface); border-color: var(--tvline); color: var(--tvtext); }

@media (max-width: 680px) {
    .tv-skin { margin: -8px -10px 0; padding: 16px 10px 22px; border-radius: 14px; }
    /*
     * No telefone o confronto EMPILHA, como na lista do app.
     *
     * Medido a 375px: lado a lado sobram 76px por nome, e "Newcastle Jets" precisa de 93 — todo
     * nome medio virava "Newcastl...". Empilhado sobram ~179px, e o nome cabe inteiro.
     */
    .tvg-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px 10px; padding: 11px 10px; }
    .tvg-jogo { grid-template-columns: minmax(0, 1fr); gap: 5px; }
    .tvg-x { display: none; }
    .tvg-time { gap: 9px; }
    .tvg-time.is-home { flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
    .tvg-canais { gap: 8px; }
    .tvg-nome { font-size: 13.5px; }
    .tvg-escudo { width: 28px; height: 28px; }
    .tvg-hora { font-size: 15px; }
    .tvg-canal-ic { height: 24px; }
    .tvg-yt { height: 28px; width: 28px; }
    .tvg-canal-ic { max-width: 56px; }
}

/* TV schedule: clearer hierarchy, readable broadcasters and mobile match cards. */
.tv-skin{background:var(--bg);margin:0;padding:0;border-radius:0;--tvtext:var(--text);--tvmuted:var(--muted);--tvsurface:var(--surface);--tvsurface-2:var(--surface-2);--tvline:var(--line);--tvgreen:var(--green);--tvgreen-bright:var(--green-strong)}
.tvh{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:28px 30px;margin-bottom:24px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.tvh-sobre{font-size:10px;letter-spacing:.16em;margin-bottom:9px}.tvh h1{font-size:36px;line-height:1.14;letter-spacing:-1.2px;text-transform:none;font-weight:800;margin:0 0 10px}.tvh-intro{font-size:13px;color:var(--muted);margin:0;line-height:1.7}.tvh-date-block{display:grid;gap:8px;justify-items:end;flex:none}.tvh-data{font-size:12px;font-weight:650;padding:9px 13px;background:var(--surface-2);border-color:var(--line)}.tvh-zone{font-size:11px;color:var(--muted)}
.tv-skin .datebar{margin-bottom:18px}.tv-skin .day{border-radius:12px}.tv-skin .day.is-active,.tv-chip.is-active{color:var(--on-green)}
.tv-filtros{padding:17px 20px;background:var(--surface);border:1px solid var(--line);border-radius:15px;gap:12px;margin:18px 0 24px}.tv-filtro-linha{align-items:center;gap:7px;padding-bottom:3px}.tv-filter-label{font-size:10px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);min-width:75px;flex:none}.tv-chip{font-size:11px;font-weight:650;padding:7px 12px;background:var(--surface-2)}.tv-chip.is-active{color:var(--on-green);background:var(--green);border-color:var(--green)}.tv-total{font-weight:600;font-size:12px;margin-bottom:18px}
.tvg{margin-bottom:24px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}.tvg-head{border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--surface-2);padding:14px 20px;gap:11px}.tvg-head::before{display:none}.tvg-selo-liga{width:32px;height:32px;border-radius:9px;background:var(--surface)}.tvg-head h2{font-size:13px;text-transform:none;letter-spacing:-.15px;font-weight:750;line-height:1.5}.tvg-count{margin-left:auto;flex:none;font-size:10px;color:var(--muted);font-weight:600;border:1px solid var(--line);border-radius:20px;padding:3px 9px;background:var(--surface)}.tvg-list{margin:0;border:0;border-radius:0;padding:0;background:var(--surface)}
.tvg-row{grid-template-columns:85px minmax(0,1fr) minmax(190px,38%);padding:18px 22px;gap:18px;border-radius:0;min-height:103px}.tvg-row+.tvg-row{margin:0;border-top:1px solid var(--line)}.tvg-hora{font-size:19px;letter-spacing:-.5px;color:var(--text);font-weight:750}.tvg-hora.is-done{font-size:17px}.tvg-row.is-live{background:var(--green-soft)}.tvg-selo{font-size:9px;padding:5px 7px;white-space:nowrap}
.tvg-jogo{grid-template-columns:minmax(0,1fr);gap:8px}.tvg-x{display:none}.tvg-time{gap:10px}.tvg-time.is-home{flex-direction:row-reverse;justify-content:flex-end;text-align:left}.tvg-escudo{width:27px;height:27px}.tvg-nome{font-size:13px;white-space:normal;overflow-wrap:anywhere;line-height:1.4;font-weight:650}
.tvg-canais{flex-wrap:wrap;justify-content:flex-end;gap:7px;min-width:0}.tvg-canal{display:inline-flex;align-items:center;gap:7px;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:4px 8px;min-height:34px;max-width:100%}.tvg-canal-logo{display:inline-grid;place-items:center;flex:none;border-radius:5px;padding:3px;background:#101a14}.tvg-canal-ic{height:18px;max-width:38px;border-radius:3px}.tvg-canal-nome{font-size:10px;line-height:1.4;color:var(--text);font-weight:650;overflow-wrap:anywhere}.tvg-canal.is-txt{font-size:10px;white-space:normal}.tvg-yt{height:32px;width:32px;border-radius:8px;background:var(--green);color:var(--on-green)}
@media(max-width:680px){.tv-skin{margin:0;padding:0}.tvh{display:block;padding:22px 19px;margin-bottom:18px;border-radius:14px}.tvh h1{font-size:29px;margin-bottom:9px}.tvh-intro{font-size:12px;max-width:32ch}.tvh-date-block{justify-items:start;gap:7px;margin-top:18px}.tvh-data{font-size:11px}.tvh-zone{font-size:10px}.tv-filtros{padding:13px 12px;margin:16px 0 20px;gap:10px}.tv-filter-label{min-width:62px;font-size:9px}.tv-chip{font-size:10px;padding:7px 10px}.tvg{border-radius:13px;margin-bottom:18px}.tvg-head{padding:12px 14px;gap:9px}.tvg-head h2{font-size:12px}.tvg-count{font-size:9px;padding:3px 7px}.tvg-row{grid-template-columns:55px minmax(0,1fr);gap:12px;padding:16px 14px;min-height:0}.tvg-hora{font-size:17px;align-self:start;padding-top:7px}.tvg-hora.is-done{font-size:15px}.tvg-selo{align-self:start;margin-top:7px;font-size:8px;padding:4px 5px}.tvg-jogo{grid-column:2;gap:9px}.tvg-canais{grid-column:2;justify-content:flex-start;gap:6px;padding-top:11px;border-top:1px dashed var(--line)}.tvg-nome{font-size:13px}.tvg-escudo{width:26px;height:26px}.tvg-canal{min-height:31px;padding:3px 6px;gap:5px}.tvg-canal-ic{height:17px;max-width:34px}.tvg-canal-nome{font-size:9px}.tvg-yt{height:30px;width:30px}}

.tv-skin .tvg-canal.is-youtube-link:hover{border-color:#e52525;background:var(--green-soft)}.tv-skin .tvg-canal.is-youtube-link:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.tvg-youtube-source{display:inline-flex;align-items:center;gap:4px;font-size:9px;color:var(--muted);font-weight:600}.tvg-youtube-source::before{content:'▶';display:inline-grid;place-items:center;width:16px;height:12px;border-radius:3px;background:#e52525;color:#fff;font-size:7px}
.tv-skin .tvg-yt{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:auto;height:auto;min-height:34px;padding:7px 10px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;font-size:10px;font-weight:700;white-space:nowrap}.tv-skin .tvg-yt:hover{background:var(--surface-2);border-color:#ef4444}.tvg-youtube-icon{width:22px;height:22px;color:#ef2929;flex:none}
.tv-skin .tvg-competicao{font-size:10px;line-height:1.4;font-weight:600;color:var(--muted);margin-bottom:2px}.tv-skin .tvg-head h2{font-size:16px;font-variant-numeric:tabular-nums}.tv-skin .tvg-canal.is-txt{background:var(--surface-2);color:var(--text);padding:7px 11px;font-size:11px;border-radius:8px}
@media(max-width:680px){.tv-skin .tvg-canal.is-txt{font-size:10px;padding:6px 8px}.tv-skin .tvg-head h2{font-size:15px}}
/* ==========================================================================================
   ONDE ASSISTIR na lista: o simbolo abre a lista de canais daquele jogo.
   `<details>`, nao botao com JavaScript: abre no toque, fecha sozinho, funciona com teclado e
   funciona com o JavaScript desligado — os nomes ja vieram no HTML.
   ========================================================================================== */
.match-li { position: relative; }
.match { padding-right: 86px; }
.match-side {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    align-items: flex-end; gap: 4px;
}
/*
 * `.league` recortava o que transbordasse, para as bordas arredondadas. Sem isso o popover seria
 * cortado na primeira e na ultima linha. O arredondamento volta pela propria linha de baixo.
 */
.league { overflow: visible; }
.matches li:last-child .match { border-radius: 0 0 var(--radius) var(--radius); }

.tv-pop { position: relative; }
.tv-pop > summary {
    list-style: none; cursor: pointer; padding: 3px; border-radius: 8px;
    display: inline-flex; align-items: center;
}
.tv-pop > summary::-webkit-details-marker { display: none; }
.tv-pop > summary:hover, .tv-pop[open] > summary { background: var(--green-soft); }
.tv-pop > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.tv-pop-box {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px;
    max-width: 240px; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
    text-align: left;
}
.tv-pop-box::before {
    content: ""; position: absolute; right: 10px; top: -5px; width: 8px; height: 8px;
    background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
    transform: rotate(45deg);
}
.tv-pop-t {
    margin: 0 0 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted);
}
.tv-pop-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tv-pop-box li { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.tv-pop-mais, .tv-pop-vazio { color: var(--muted); font-weight: 600 !important; font-size: 12px !important; }

/* Perto da borda direita da tela o popover encosta no canto; no telefone ele se alarga. */
@media (max-width: 560px) {
    .match { padding-right: 76px; }
    .tv-pop-box { min-width: 150px; max-width: calc(100vw - 48px); }
}

/* A data na coluna do relogio — so onde o chamador pede (hoje, so a busca). */
.clock-col { display: grid; gap: 1px; justify-items: start; }
.match.has-date { grid-template-columns: 62px minmax(0, 1fr) auto; }
.match-day {
    display: grid; font-size: 11px; font-weight: 800; line-height: 1.15; color: var(--text);
}
.match-day small { font-size: 10px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
    .match.has-date { grid-template-columns: 56px minmax(0, 1fr) auto; }
}

/* ==========================================================================================
   SELETOR DE TIME na busca. Procurar "atletico" devolve dez Atleticos e os jogos de um so deles;
   estes botoes sao o caminho para os outros, sem retypar a busca.
   ========================================================================================== */
.tchips-wrap { margin: 0 0 18px; }
.tchips-t {
    margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted);
}
.tchips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tchips::-webkit-scrollbar { display: none; }
.tchip {
    flex: none; display: inline-flex; align-items: center; gap: 8px; max-width: 220px;
    padding: 7px 13px 7px 9px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--text); text-decoration: none;
}
.tchip > span { display: grid; min-width: 0; }
.tchip > span > :first-child, .tchip > span:only-child {
    font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tchip small {
    font-size: 11px; font-weight: 600; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tchip:hover { border-color: var(--green-soft); background: var(--surface-2); }
.tchip.is-active { background: var(--green); border-color: var(--green); color: var(--on-green); }
.tchip.is-active small { color: var(--on-green); opacity: .85; }
.tchip img { border-radius: 4px; }
.discovery-days{padding:18px;margin:18px 0}
.discovery-days h2{font-size:18px;margin:0 0 8px}
.discovery-days nav{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}

/* On-demand quick statistics, independent of the match navigation and TV menu. */
.match-actions { display:flex; align-items:center; gap:8px; }
.stats-button { display:inline-flex; align-items:center; justify-content:center; min-width:32px; min-height:32px; padding:5px; border:0; border-radius:8px; background:transparent; color:var(--green); cursor:pointer; }
.stats-button:hover { background:var(--green-soft); }
.stats-button:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.stats-dialog { width:min(420px,calc(100vw - 32px)); max-height:80dvh; overflow:auto; padding:22px; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--surface,#fff); box-shadow:0 20px 70px #0004; }
.stats-dialog::backdrop { background:#0006; }
.stats-dialog h2 { font-size:16px; padding-right:60px; margin:0 0 22px; }
.stats-close { position:absolute; right:15px; top:15px; cursor:pointer; border:0; border-radius:6px; padding:6px; color:inherit; background:var(--green-soft); }
.stats-row { display:grid; grid-template-columns:45px 1fr 45px; gap:8px; text-align:center; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; }
.stats-row span:first-child,.stats-row span:last-child { font-weight:700; }

.stats-legend { display:flex; justify-content:space-between; gap:16px; margin-bottom:8px; font-size:13px; font-weight:700; }
.stats-legend span { display:flex; align-items:center; gap:6px; }
.stats-legend span:last-child { text-align:right; }
.stats-bars { display:block; grid-column:1 / -1; width:100%; height:7px; border-radius:4px; overflow:hidden; }

.stats-swatch { width:12px; height:12px; flex:none; }
.stats-swatch circle { stroke:var(--muted); stroke-width:.6; }
.stats-bars { outline:1px solid var(--line); outline-offset:1px; }

/* Compact live sidebar: one aligned score per team, no detached clock rows. */
.rail-live { gap:0; padding:16px; }
.rail-live-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.rail-live-head h2 { margin:0; color:var(--text); font-size:14px; letter-spacing:0; text-transform:none; }
.rail-live-head .ic { color:var(--live); width:18px; height:18px; }
.rail-live-count { flex:none; padding:3px 7px; border-radius:20px; font-size:11px; font-weight:700; color:var(--green); background:var(--green-soft); }
.rail-live .mini-list { gap:0; }
.rail-live .mini-list li + li { border-top:1px solid var(--line); }
.rail-live .mini-list a { display:flex; flex-direction:column; gap:7px; padding:11px 4px; font-size:13px; }
.rail-live .mini-list a:focus-visible { outline:2px solid var(--green); outline-offset:1px; }
.rail-live .mini-meta { width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rail-live .mini-league { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:10px; line-height:1.3; }
.rail-live .mini-clock { flex:none; padding:2px 6px; border-radius:5px; background:var(--green-soft); color:var(--green); font-size:10px; line-height:1.3; font-variant-numeric:tabular-nums; }
.rail-live .mini-teams { width:100%; display:grid; gap:5px; }
.rail-live .mini-team { display:grid; grid-template-columns:20px minmax(0,1fr) 28px; align-items:center; gap:8px; min-height:23px; }
.rail-live .mini-team img { width:20px; height:20px; object-fit:contain; }
.rail-live .mini-team-name { font-weight:600; }
.rail-live .mini-team-score { text-align:center; font-size:14px; font-weight:800; line-height:23px; color:var(--text); background:var(--surface-2); border-radius:5px; font-variant-numeric:tabular-nums; }
.rail-live .rail-more { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:10px; padding:10px 8px; border-radius:9px; background:var(--green-soft); font-size:12px; }
.rail-live .rail-more:hover { box-shadow:inset 0 0 0 1px var(--green); }
.rail-live .rail-more .ic { width:15px; height:15px; }

.rail-upcoming .mini-team { grid-template-columns:20px minmax(0,1fr); }
.rail-upcoming .mini-clock, .rail-finished .mini-clock { color:var(--muted); background:var(--surface-2); }
.rail-finished .rail-live-head .ic { color:var(--muted); }

@media (max-width:767px) { .rail-right [data-context-rail] { display:none; } }

/* Passive upcoming guides: bounded cards, no client-side collector. */
.future-guide-day{margin-top:18px}.future-guide-day h3{font-size:15px;margin:0 0 10px}
.future-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.future-guide-game{padding:14px;border:1px solid var(--line);border-radius:12px;min-width:0}
.future-guide-game h4{margin:0 0 8px;font-size:15px;overflow-wrap:anywhere}
.future-guide-game p{margin:0 0 10px}.future-guide-game>a{font-size:13px;overflow-wrap:anywhere}
@media(max-width:640px){.future-guide-grid{grid-template-columns:1fr}}

.program-overview{max-width:100%;overflow-x:auto;margin-top:20px}.program-overview table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}.program-overview caption{text-align:left;font-weight:700;padding:0 0 12px}.program-overview th,.program-overview td{padding:12px 10px;border-bottom:1px solid var(--border);vertical-align:top}.program-overview thead th{font-size:12px;color:var(--muted)}.program-overview td:first-child{white-space:nowrap}.program-overview tbody th{min-width:150px}.program-overview td:last-child{min-width:140px}

.red-card[hidden] { display:none; }

/* Reserve independent columns for dismissals and scores, including hidden cards. */
.match .team { grid-template-columns:22px minmax(0,1fr) 12px 18px; }
.match .team > .red-card { grid-column:3; grid-row:1; }
.match .team > .score { grid-column:4; grid-row:1; }

.stats-legend > span { flex-wrap:wrap; align-content:start; row-gap:4px; }
.stats-legend .stats-team-position { flex-basis:100%; font-size:11px; font-weight:600; color:var(--muted); line-height:1.5; }
.stats-legend > .stats-away { justify-content:flex-end; }
