/* Farbwelt angelehnt an vizithum.de: dunkler Grund, grüner Akzent */
:root {
  --bg: #0b0d10; --panel: #14171b; --ink: #e8edf2; --muted: #a7b0ba; --line: #22262b;
  --accent: #1fa97c; --accent-2: #1fa97c; --live: #e5484d;
}
/* Immer dunkel – wie die App */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; }
.brand b { color: var(--accent); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.bar { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.admin-link { margin-left: auto; font-size: 14px; }
/* Umschalter Liga / Turniere */
.switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.switch a { text-decoration: none; padding: 5px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; }
.switch a.on { background: var(--accent); color: #fff; }
.card.lcard, .card.tcard { display: flex; align-items: center; gap: 12px; }
.lcard > div:first-child, .tcard > div:nth-child(2) { flex: 1; min-width: 0; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }
.search { width: 100%; font: inherit; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); margin-top: 8px; }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.date { width: 48px; flex: none; text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.date b { display: block; font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.date span { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; }
.desc { white-space: pre-line; }
@media (max-width: 560px) { .brand b { display: none; } .switch a { padding: 5px 10px; } .kv { grid-template-columns: 1fr; gap: 0; } }
/* Zurück, Kopfzeile mit LIVE-Knopf */
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 6px; font-size: 14px; }
.back:hover { color: var(--ink); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card.lcard { position: relative; }
.stretch { flex: 1; text-decoration: none; }
/* Rot leuchtender LIVE-Knopf */
.live-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--live); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 13px; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  text-transform: none; animation: glow 1.6s ease-in-out infinite; }
.live-btn .pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 4px 0 color-mix(in srgb, var(--live) 70%, transparent); }
  50% { box-shadow: 0 0 16px 4px color-mix(in srgb, var(--live) 60%, transparent); } }
h2.round { display: flex; align-items: center; gap: 10px; }
.ticker-link { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
.ticker-link:hover { color: var(--ink); border-color: var(--muted); }
/* Liveticker */
.pager { display: flex; gap: 6px; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 14px; }
.ticker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tfx-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-decoration: none; font-weight: 600; }
.tfx-head .r, .trow .r { text-align: right; }
.trow { display: grid; grid-template-columns: 52px 1fr auto 1fr; gap: 8px; align-items: center; font-size: 13px; padding: 6px 0 0; margin-top: 6px; border-top: 1px solid var(--line); }
.trow.live b { color: var(--live); }
.small { font-size: 12px; }
.tev { display: grid; grid-template-columns: 44px 18px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tev .time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.tev .ico { color: var(--muted); text-align: center; }
.tev.game, .tev.fixture { font-weight: 600; }
.tev.max .ico, .tev.game .ico { color: var(--accent); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; margin-right: 6px; background: var(--line); }
.tag.max { background: var(--live); color: #fff; }
.tag.hf { background: var(--accent); color: #fff; }
.tag.sl { background: #3b82f6; color: #fff; }
@media (max-width: 760px) { .ticker { grid-template-columns: 1fr; } }
/* Ticker-Auswahl: Spieltag (Liste) und Begegnung (Chips) */
.pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.pick select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.tabs.wrap { flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 5px 12px; border-radius: 999px; text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dotlive { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 2px; }
h2 { font-size: 16px; margin: 24px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
a { color: inherit; }
.muted { color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: block; text-decoration: none; }
.card:hover { border-color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; margin: 12px 0; }
.tabs button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fx { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.fx .away { text-align: right; }
.score { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--line); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.badge.live { background: var(--live); color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.big { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; margin: 12px 0 20px; }
.big .n { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.game { display: grid; grid-template-columns: 28px 1fr auto 1fr; gap: 10px; align-items: center; }
.game .r { text-align: right; }
.rest { font-size: 13px; color: var(--muted); }
.win { color: var(--accent-2); font-weight: 600; }
@media (max-width: 560px) { .hide-s { display: none; } .big .n { font-size: 34px; } }

.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.totals .card { text-align: center; margin: 0; }
.totals .n { font-size: 28px; font-weight: 800; color: var(--accent); }
.hlgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.hl { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hl .v { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
table.stats th:nth-child(2), table.stats td:nth-child(2) { text-align: left; }
@media (max-width: 760px) { .hlgrid { grid-template-columns: 1fr; } .totals { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Scoreboard im Liveticker ---------- */
:root { --away: #3b82f6; }
.ticker.wide { grid-template-columns: 1fr; }
.head-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg-switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-switch button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.seg-switch button.on { background: var(--ink); color: var(--bg); }

/* Kopf der Begegnung: Teams und großer Spielstand */
.sb-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-decoration: none; }
.sb-head .team { font-weight: 700; font-size: 16px; line-height: 1.25; }
.sb-head .team.r { text-align: right; }
.bigscore { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.bigscore .nums { white-space: nowrap; }
.bigscore { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.bigscore .sep { color: var(--muted); margin: 0 2px; }
.bigscore small { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.bigscore small .badge { margin: 0; }

/* Leiste: Ergebnis jedes Spiels der Begegnung */
.strip { display: flex; gap: 4px; margin: 12px 0 4px; }
.strip .seg { flex: 1; height: 22px; border-radius: 5px; background: var(--line); color: var(--muted); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.strip .seg.home { background: var(--accent); color: #fff; }
.strip .seg.away { background: var(--away); color: #fff; }
.strip .seg.live { background: transparent; outline: 2px solid var(--live); outline-offset: -2px; color: var(--live); animation: pulse 1.6s infinite; }

/* Scoreboard eines laufenden Spiels */
.sb { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.sb-top { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--muted);
  background: color-mix(in srgb, var(--panel) 60%, var(--bg)); border-bottom: 1px solid var(--line); }
.sb-row { display: grid; grid-template-columns: 14px 1fr auto 30px 74px; gap: 10px; align-items: center; padding: 8px 0 8px 10px; }
.sb-row + .sb-row { border-top: 1px solid var(--line); }
.sb-arrow { color: var(--accent); font-size: 11px; }
.sb-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-meta { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.sb-meta b { color: var(--ink); }
.sb-pips { display: flex; gap: 4px; }
.sb-pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); }
.sb-pips i.won { background: var(--accent); border-color: var(--accent); }
.sb-legs { font-size: 20px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sb-rem { align-self: stretch; margin: -8px 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--panel); border-left: 1px solid var(--line); }
.sb-row.on .sb-rem { background: var(--accent); color: #fff; }
.sb-row.on .sb-name { color: var(--ink); }
/* Zwei feste Spalten: ein Spiel bleibt halb breit, jedes Board behält seine Seite (kein Springen beim Spielwechsel) */
.sb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0 12px; align-items: start; }
@media (max-width: 760px) { .sb-grid { grid-template-columns: 1fr; } .sb-slot { grid-column: auto !important; } }
.cmp-bar.empty { background: var(--line); }
.cmp-bar.empty i { display: none; }

/* Averages */
.avg { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.teamavg { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); align-items: baseline; }
.teamavg b { color: var(--ink); font-size: 16px; }
.teamavg span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.teamavg :last-child { text-align: right; }

/* Team-Vergleich */
.cmps { margin: 14px 0 4px; display: grid; gap: 8px; }
.cmp { display: grid; grid-template-columns: 76px 1fr 76px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.cmp b { font-size: 15px; color: var(--muted); }
.cmp b.lead { color: var(--ink); }
.cmp b.r { text-align: right; }
.cmp-mid { display: grid; gap: 3px; }
.cmp-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.cmp-bar { height: 6px; border-radius: 3px; background: var(--away); overflow: hidden; }
.cmp-bar i { display: block; height: 100%; background: var(--accent); }

/* Ausführliche Spieltabelle */
table.gtable { margin-top: 14px; font-size: 13px; }
table.gtable th, table.gtable td { padding: 7px 6px; text-align: center; }
table.gtable .l { text-align: left; }
table.gtable .rr { text-align: right; }
table.gtable tr.pending td { color: var(--muted); }
table.gtable tr.live { background: color-mix(in srgb, var(--live) 8%, transparent); }
table.gtable .res { font-size: 15px; white-space: nowrap; }
.live-num { color: var(--live); font-weight: 800; }
@media (max-width: 560px) {
  .bigscore { font-size: 28px; min-width: 76px; }
  .sb-row { grid-template-columns: 12px 1fr auto 24px 60px; gap: 6px; }
  .sb-rem { font-size: 22px; }
  .sb-pips i { width: 8px; height: 8px; }
}

/* Blöcke (z. B. 4 Einzel | 2 Doppel | 4 Einzel | 2 Doppel) */
.strip { gap: 10px; }
.strip .blk { flex: var(--n, 1); display: flex; gap: 4px; }
.strip .blk .seg { flex: 1; }
table.gtable tr.block td { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  background: color-mix(in srgb, var(--panel) 50%, var(--bg)); padding: 6px 8px; }
.bscore { margin-left: 8px; color: var(--ink); letter-spacing: 0; }
.blockhead { margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Schalter „Liveticker“ an/aus */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .knob { width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.toggle .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + .knob { background: var(--accent); }
.toggle input:checked + .knob::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Statistik des laufenden Spiels unter dem Scoreboard */
.game-cmp { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.game-cmp .cmps { margin: 6px 0 0; }
.cmp-title, details.total summary { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
details.total { margin-top: 14px; }
details.total summary { cursor: pointer; padding: 6px 0; }

/* Ticker als eigene Box: scrollt in sich, statt die Seite endlos zu verlängern */
.tick-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tick-list .tev:last-child { border-bottom: 0; }
.tick-list .more { width: 100%; margin: 10px 0; font: inherit; font-size: 13px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.tick-list .more:hover { border-color: var(--muted); }


/* Statistik je Spiel einklappbar */
details.game-cmp summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.game-cmp summary::-webkit-details-marker { display: none; }
details.game-cmp summary::after { content: '▾'; font-size: 13px; transition: transform .15s; }
details.game-cmp:not([open]) summary::after { transform: rotate(-90deg); }

/* Spielverlauf ruhig: Raster statt bunter Kästchen */
.grid-strip { display: grid; gap: 4px 10px; align-items: center; margin: 12px 0 4px; }
.gr-blk { display: flex; gap: 3px; }
.gr-name { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; overflow: hidden; white-space: nowrap; }
.gn { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.gc { flex: 1; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.gc.won { background: color-mix(in srgb, var(--ink) 75%, transparent); }
.gc.lost { background: var(--line); }
.gc.live { background: transparent; box-shadow: inset 0 0 0 1.5px var(--live); }

/* Spaltenköpfe gleich hoch: Ticker-Box beginnt auf Höhe der ersten Begegnung */
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; margin: 24px 0 8px; }
.col-head h2 { margin: 0; }
.tick-col { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 24px); }
.tick-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tick-count { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.tick-select { font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
@media (max-width: 760px) { .tick-col { position: static; max-height: none; } .tick-panel { max-height: 60vh; } }

/* Highlights je Spieler */
table.hltable td { vertical-align: top; text-align: left; }
table.hltable th { text-align: left; }
.hv { display: inline-block; margin: 0 10px 2px 0; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.hv b { color: var(--ink); }
table.hltable th:not(.l), table.hltable td:not(.l) { text-align: center; }
tr.plrow { cursor: pointer; }
tr.plrow:hover td, tr.plrow:focus-visible td { background: var(--card2, rgba(255,255,255,.04)); }
tr.plrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hlname { font-weight: 700; border-bottom: 1px dotted var(--muted); }
dialog.pop { width: min(460px, calc(100vw - 32px)); max-height: min(80vh, 640px); overflow: auto; padding: 18px 20px 20px;
  background: var(--card, #15181d); color: var(--ink); border: 1px solid var(--line, #2a2f36); border-radius: 16px; }
dialog.pop::backdrop { background: rgba(0,0,0,.6); }
.pophead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.pophead h2 { margin: 2px 0 0; font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.popclose { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; }
dialog.pop h3 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.kpi { background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 4px; text-align: center; }
.kpi .v { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
table.restable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.restable th, table.restable td { text-align: center; padding: 6px 4px; font-size: 14px; }
table.restable thead th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.restable th.l { text-align: left; color: var(--muted); font-weight: 600; }
table.restable td.win { color: var(--ink); font-weight: 800; }
table.restable td.loss { color: var(--ink); font-weight: 800; }
table.restable tbody tr { border-top: 1px solid var(--line); }
.hlsum { margin: 8px 0 10px; }
.hlchip { display: inline-block; margin: 4px 14px 0 0; font-variant-numeric: tabular-nums; }
.hlchip b { font-size: 17px; }
@media (max-width: 420px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
ul.hllist { list-style: none; margin: 0; padding: 0; }
ul.hllist li a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
ul.hllist li a:hover { background: rgba(255,255,255,.05); }
ul.hllist li a b { font-size: 17px; }
ul.hllist li a .muted { font-size: 13px; text-align: right; }
.small { font-size: 12px; }
@media (max-width: 560px) { table.hltable th:nth-child(4), table.hltable td:nth-child(4) { display: none; } }

/* Statistik: Zwischenzeile je Mannschaft */
tr.teamrow td { text-align: left !important; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  background: color-mix(in srgb, var(--panel) 50%, var(--bg)); padding: 7px 10px; }
table.stats td.l, table.stats th.l { text-align: left; }
table.stats th:nth-child(2), table.stats td:nth-child(2) { text-align: right; }

/* =========================================================
   Live-Bereich, neue ruhigere Fassung (alte Version unter /alt/)
   ========================================================= */
.vs { color: var(--muted); font-weight: 400; }
.day-score .sep, .fx-score .sep { color: var(--muted); margin: 0 3px; }

/* Spieltag: eine kompakte Karte je Begegnung */
.day-list { display: grid; gap: 8px; margin-top: 14px; }
.card.day { padding: 14px 16px; margin: 0; }
.card.day.live { border-color: color-mix(in srgb, var(--live) 55%, var(--line)); }
.day-main { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.day-main .team { font-weight: 600; line-height: 1.25; }
.day-main .team.r { text-align: right; }
.day-score { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 72px; text-align: center; }
.day-sub { text-align: center; font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.day-sub .badge { margin: 0; }
.day-live { display: grid; grid-template-columns: 58px 1fr auto 1fr auto; gap: 10px; align-items: center; font-size: 13px;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.day-live b { color: var(--live); font-variant-numeric: tabular-nums; }
.day-live .r { text-align: right; }
.day-live .rest { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) {
  .day-score { font-size: 22px; min-width: 56px; }
  .day-live { grid-template-columns: 1fr auto 1fr; }
  .day-live > .muted:first-child, .day-live .rest { display: none; }
}

/* Begegnung: Kopf mit Spielstand */
.card.fx-head { margin-top: 8px; padding: 16px 18px; }
.fx-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.fx-teams .team { font-size: 18px; font-weight: 700; line-height: 1.25; }
.fx-teams .team.r { text-align: right; }
.fx-score { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; min-width: 110px; text-align: center; }
.fx-sub { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.fx-sub .badge { margin: 0; }
@media (max-width: 560px) { .fx-teams .team { font-size: 15px; } .fx-score { font-size: 34px; min-width: 80px; } }

/* Scoreboard ohne extra Leg-Zahl (Punkte reichen) */
.sb-row { grid-template-columns: 14px 1fr auto 74px; }
@media (max-width: 560px) { .sb-row { grid-template-columns: 12px 1fr auto 60px; } }

/* Reiter Ticker | Statistik */
.fx-tabs { display: flex; gap: 6px; margin: 22px 0 10px; border-bottom: 1px solid var(--line); }
.fx-tabs button { font: inherit; font-weight: 600; background: none; border: 0; color: var(--muted); padding: 8px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fx-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.fx-tabs .n { font-size: 11px; color: var(--muted); background: var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tick-panel.standalone { max-height: 65vh; }
.tick-panel.standalone .tick-list { padding: 4px 14px; }
.tick-empty { padding: 14px 0; margin: 0; }

/* Team-Vergleich */
.card.cmp-card { padding: 14px 16px; }
.cmp-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cmp-head span:last-child { text-align: right; }
/* Tickerzeile „Spielgewinn“ hat die Klasse game – nicht das Raster der Begegnungsseite übernehmen */
.tev.game, .tev.fixture { grid-template-columns: 44px 18px 1fr; gap: 8px; align-items: start; }
.stat-grid .cmp-card { margin-bottom: 12px; }
.cmp-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cmp-head { font-weight: 600; }
.card.total-card { margin-top: 14px; }

/* Laufende Spiele in der Spieltag-Karte: spiegelbildlich zum großen Spielstand */
.day-live { grid-template-columns: 1fr auto 1fr; gap: 12px; }
.day-live .side { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.day-live .side .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-live .side.away .nm { text-align: right; }
.day-live .rest { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.day-live .mid { min-width: 72px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.day-live .mid small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 560px) {
  .day-live { grid-template-columns: 1fr auto 1fr; }
  .day-live .mid { min-width: 56px; }
  .day-live .rest { display: inline; }
}

/* Ligenliste nach Spielklassen (aufklappbar) */
.levels { display: grid; gap: 8px; margin-top: 14px; }
details.level { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
details.level > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; user-select: none; }
details.level > summary::-webkit-details-marker { display: none; }
details.level > summary:hover { background: color-mix(in srgb, var(--line) 40%, transparent); }
.lv-name { font-weight: 700; font-size: 16px; }
.lv-count { color: var(--muted); font-size: 13px; }
details.level .badge { margin: 0; }
.lv-chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
details.level:not([open]) .lv-chev { transform: rotate(-90deg); }
.lv-list { padding: 0 10px 10px; display: grid; gap: 8px; }
.lv-list .card { margin: 0; background: var(--bg); }
/* Reiter jetzt über den Scoreboards; Statistik je Spiel direkt darunter */
.fx-tabs { margin: 18px 0 12px; }
.card.game-stat { margin-top: 8px; }
.sb-slot { margin-bottom: 12px; }
.sb-slot .sb { margin-top: 0; }

/* Heute angesetzt, läuft aber noch nicht: ruhig statt rot */
.today-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; text-transform: none; letter-spacing: 0;
  font-size: 13px; font-weight: 700; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 5px 12px; border-radius: 999px; }
.today-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.badge.today { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* Spiele anklickbar → Spielverlauf */
.clickable { cursor: pointer; }
table.gtable tr.clickable:hover td { background: color-mix(in srgb, var(--line) 45%, transparent); }
.sb.clickable:hover { border-color: var(--muted); }

/* Spielverlauf */
.leg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.leg-chip { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px; padding: 7px 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.leg-chip small { font-size: 11px; color: var(--muted); }
.leg-chip.home { border-left: 3px solid var(--accent); }
.leg-chip.away { border-right: 3px solid var(--away); }
.leg-chip.open { border-color: color-mix(in srgb, var(--live) 60%, var(--line)); }
.leg-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.leg-chip.on small { color: var(--bg); opacity: .75; }
.card.hist { padding: 0; overflow: hidden; }
.hist-head, .hist-row { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; }
.hist-head { grid-template-columns: repeat(3, 1fr) 44px repeat(3, 1fr); font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; padding: 8px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.hist-row { padding: 6px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hist-row:last-of-type { border-bottom: 0; }
.hist-side { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.hist-mid { text-align: center; color: var(--muted); font-size: 12px; }
.hv-score { font-weight: 800; font-size: 17px; }
.hv-score.ton { color: var(--ink); }
.hv-score.max { color: var(--live); }
.hv-score.co { color: var(--accent); }
.hv-score.bust { color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: line-through; }
.hv-rest { color: var(--ink); }
.hv-darts { color: var(--muted); font-size: 13px; }
.hist-foot { padding: 10px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
.hist-foot b { color: var(--ink); }
.team.win { color: var(--accent); }

/* Kapitän */
.cap { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 6px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); font-size: 10px; font-weight: 800; vertical-align: 2px; line-height: 1; }
h2 .cap { width: 20px; height: 20px; font-size: 11px; vertical-align: 3px; }
