/* Oeffentliche Live-Seite — OnSide-CI: Navy-Grund, Mint-Akzent, Montserrat.
   Mobil zuerst; ab 1100px zweispaltige Uebersicht (Monitor vor Ort). */
:root {
  --bg: #121829; --bg2: #1A2238; --card: #1F2942; --line: rgba(255,255,255,.10);
  --text: #FFFFFF; --dim: #B7C0D6; --muted: #7E8AA6; --accent: #1EE88F; --accent-tx: #0E1A14;
  --live: #16a34a; --danger: #e11d48;
  --font: 'Montserrat', 'Poppins', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
/* Seite als Spalte: Inhalt waechst, Sponsoren + Fusszeile sitzen am unteren Rand. */
body { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(76px + var(--safe-b)); display: flex; flex-direction: column; }
.lv-main { flex: 1 0 auto; width: 100%; }
.lv-sponsors, .lv-foot { width: 100%; flex: none; }
button, select { font-family: inherit; }

/* Kopf */
.lv-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--bg2); border-bottom: 2px solid var(--accent); }
.lv-logo { height: 46px; width: auto; flex: none; }
.lv-title { flex: 1; min-width: 0; }
.lv-title h1 { font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lv-meta { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-actions { flex: none; display: flex; align-items: center; gap: 8px; }
/* Link zum Live-Stream (Anbieter-Logo + Beschriftung) */
.lv-stream { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 7px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--text); text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.lv-stream:hover { background: rgba(255,255,255,.12); border-color: var(--accent); transform: translateY(-1px); }
.lv-stream .lg { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; }
.lv-stream .lg.txt { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-tx); font-weight: 900; font-size: 12px; }
.lv-stream .tx { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.lv-stream .tx small { font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lv-stream .tx b { font-size: 13px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.lv-stream .play { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-tx); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; flex: none; padding-left: 2px; }
@media (max-width: 480px) {
  .lv-head { gap: 10px; padding: 10px 12px; }
  .lv-logo { height: 38px; }
  .lv-livepill { padding: 5px 8px; font-size: 10px; }
  .lv-livepill #lv-pill-text { display: none; }
  .lv-stream .tx small { display: none; }
  .lv-stream { padding: 5px 9px 5px 5px; gap: 7px; }
}
/* Feste Stream-Leiste im Live-Bereich: der Stream laeuft dauerhaft, der Link ist immer da */
.lv-streambar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(90deg, rgba(30,232,143,.16), rgba(30,232,143,.04)); border: 1px solid rgba(30,232,143,.45); color: var(--text); text-decoration: none; }
.lv-streambar .lg { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.lv-streambar .lg.txt { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-tx); font-weight: 900; font-size: 15px; }
.lv-streambar .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.lv-streambar .tx small { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lv-streambar .tx b { font-size: 16px; font-weight: 900; }
.lv-streambar .tx span { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-streambar .go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-tx); font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.lv-streambar[hidden] { display: none; }
.lv-livepill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--live); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lv-livepill[hidden] { display: none; }
.lv-livepill .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: lvBlink 1.4s ease-in-out infinite; }
@keyframes lvBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Bereiche / Navigation (mobil: einer sichtbar) */
.lv-main { padding: 14px 14px 0; max-width: 720px; margin: 0 auto; }
.lv-sec { display: none; }
.lv-sec.is-on { display: block; }
.lv-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--bg2); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); z-index: 5; }
.lv-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; background: transparent; border: none; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.lv-nav button .ic { font-size: 16px; line-height: 1; }
.lv-nav button.is-on { color: var(--accent); }
.lv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px 20px; color: var(--muted); font-size: 11px; max-width: 720px; margin: 0 auto; flex-wrap: wrap; }
/* Sponsoren: statisch unten, weisse Logos auf dunklem Grund */
.lv-sponsors { max-width: 720px; margin: 6px auto 0; padding: 16px 16px 6px; border-top: 1px solid var(--line); }
.lv-sponsors[hidden] { display: none; }
.lv-sponsors .h { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-align: center; margin-bottom: 12px; }
.lv-sponsors .logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; align-items: center; justify-items: center; }
.lv-sponsors .lg { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; padding: 0 4px; }
.lv-sponsors .lg img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; opacity: .92; }
.lv-sponsors a.lg:hover img { opacity: 1; }
.lv-sponsors .lg .nm { font-size: 11px; font-weight: 800; color: var(--dim); text-align: center; }
@media (max-width: 360px) { .lv-sponsors .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Karten */
.lv-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.lv-card-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.lv-block { margin-bottom: 14px; }
.lv-block-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 4px 0 8px; }
.lv-empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }

/* Wappen */
.crest { flex: none; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08) center / contain no-repeat; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: var(--dim); letter-spacing: .03em; }
.crest.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 18px; }
.crest.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; }

/* Jetzt live */
.lv-now { padding: 16px; }
.lv-now .now-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lv-now .now-h .pitch { color: var(--dim); font-weight: 700; letter-spacing: .04em; }
.lv-now .now-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.lv-now .team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.lv-now .team .tn { font-size: 14px; font-weight: 800; line-height: 1.15; }
.lv-now .score { font-family: var(--mono); font-size: 44px; font-weight: 800; line-height: 1; white-space: nowrap; }
.lv-now .score i { font-style: normal; opacity: .4; padding: 0 4px; }
.lv-now .clock { text-align: center; margin-top: 10px; display: flex; justify-content: center; gap: 10px; align-items: center; }
.lv-now .clock .t { font-family: var(--mono); font-size: 22px; font-weight: 800; background: var(--accent); color: var(--accent-tx); padding: 4px 12px; border-radius: 8px; }
.lv-now .clock .p { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.lv-now .twin { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.lv-now .twin span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--dim); }
.lv-now .twin span.cam { box-shadow: inset 0 0 0 1.5px var(--accent); color: #fff; }
.lv-now.none { color: var(--muted); font-size: 14px; }
.lv-now.none .kick { display: inline-block; margin-top: 8px; color: var(--dim); } .lv-now.none .kick b { color: var(--text); }

/* Spielplan */
.lv-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.lv-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip { background: var(--card); border: 1px solid var(--line); color: var(--dim); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-tx); }
.lv-team { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700; max-width: 100%; }
.lv-slot { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.lv-slot::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.lv-slot .time { color: var(--text); font-family: var(--mono); font-size: 14px; }
.lv-slot.now { color: var(--accent); }
.lv-slot.now .time { color: var(--accent); }
.fx { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; margin-bottom: 6px; }
.fx.live { border-color: var(--live); box-shadow: inset 3px 0 0 var(--live); }
.fx.stream { border-color: rgba(30,232,143,.45); }
.fx .sc .st.stream { color: var(--accent); }
.fx.mine { background: #263251; }
.fx.dimmed { opacity: .45; }
.fx .pitch { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.15; }
.fx .pitch b { display: block; color: var(--accent); font-size: 14px; }
.fx .team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx .team.away { flex-direction: row-reverse; text-align: right; }
.fx .team .tn { font-size: 12.5px; font-weight: 800; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
.fx .team .crest { width: 34px; height: 34px; font-size: 10px; }
.fx .team .tn small { display: block; font-weight: 700; color: var(--muted); font-size: 10px; }
.fx .sc { font-family: var(--mono); font-size: 20px; font-weight: 800; min-width: 58px; text-align: center; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.fx .sc.open { color: var(--muted); font-size: 16px; }
.fx .sc.live { color: var(--accent); }
.fx .sc .st { font-family: var(--font); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; color: var(--muted); }
.fx .sc.live .st { color: var(--live); }
.fx .sc .tw { font-family: var(--font); font-size: 9px; color: var(--muted); margin-top: 3px; white-space: nowrap; }

/* Tabelle */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 4px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.tbl th.tn, .tbl td.tn { text-align: left; }
.tbl td.tn { display: flex; align-items: center; gap: 8px; font-weight: 800; padding-left: 0; white-space: normal; }
.tbl td.rk { font-family: var(--mono); color: var(--muted); width: 26px; padding-left: 0; }
.tbl tr:nth-child(-n+3) td.rk { color: var(--accent); }
.tbl td.pts { font-family: var(--mono); font-weight: 900; color: var(--accent); font-size: 15px; }
.tbl td.num { font-family: var(--mono); color: var(--dim); }
.tbl td.wdl { color: var(--muted); font-size: 12px; }
.tbl tr.mine td { background: rgba(30,232,143,.08); }
@media (max-width: 380px) { .tbl .col-goals { display: none; } }

/* ---------- Breit (Monitor vor Ort, Desktop): alles auf einmal ---------- */
@media (min-width: 1100px) {
  body { padding-bottom: 20px; }
  .lv-head { padding: 16px 32px; }
  .lv-logo { height: 64px; }
  .lv-title h1 { font-size: 28px; }
  .lv-meta { font-size: 14px; }
  .lv-livepill { font-size: 14px; padding: 8px 16px; }
  .lv-stream { padding: 8px 16px 8px 9px; border-radius: 14px; }
  .lv-stream .lg { width: 38px; height: 38px; border-radius: 10px; }
  .lv-stream .tx b { font-size: 15px; }
  .lv-stream .tx small { font-size: 10px; }
  .lv-nav { display: none; }
  .lv-main { max-width: none; padding: 22px 32px 0; display: grid; grid-template-columns: 420px minmax(0, 1fr); grid-template-areas: "live schedule" "table schedule"; gap: 22px; align-items: start; }
  .lv-sec { display: block; }
  .lv-sec[data-sec="live"] { grid-area: live; }
  .lv-sec[data-sec="table"] { grid-area: table; }
  .lv-sec[data-sec="schedule"] { grid-area: schedule; }
  .lv-foot { max-width: none; padding: 10px 32px 20px; }
  .lv-sponsors { max-width: none; margin: 10px 32px 0; padding: 18px 0 8px; }
  .lv-sponsors .logos { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 18px 28px; }
  .lv-sponsors .lg { height: 60px; }
  .lv-now .team .tn { font-size: 16px; }
  .lv-now .score { font-size: 56px; }
  .fx { grid-template-columns: 60px minmax(0, 1fr) auto minmax(0, 1fr); padding: 12px 14px; gap: 10px; }
  .fx .team .tn { font-size: 15px; }
  .fx .team .crest { width: 40px; height: 40px; font-size: 12px; }
  /* Spielplan-Spalte scrollt fuer sich, Live-Karte und Tabelle bleiben stehen (Monitor). */
  .lv-sec[data-sec="schedule"] { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
  .fx .sc { font-size: 24px; min-width: 80px; }
  .tbl { font-size: 14px; }
}

/* =====================================================================
   Kiosk (?kiosk=1) — Fernseher / Monitor vor Ort. Ganze Seite ohne Scrollen:
   Kopf, Buehne mit wechselnden Ansichten (Live · Ergebnisse · Tabelle),
   Fortschrittsbalken, Laufband. Schriften skalieren mit der Bildhoehe (vh),
   damit 1080p-TV und Handy dieselbe Aufteilung bekommen.
   ===================================================================== */
body.kiosk { padding: 0; height: 100dvh; overflow: hidden; background: radial-gradient(120% 90% at 50% -10%, #223052 0%, var(--bg) 60%); }
body.kiosk .lv-head, body.kiosk .lv-main, body.kiosk .lv-nav, body.kiosk .lv-foot { display: none !important; }
.ko { display: flex; flex-direction: column; height: 100dvh; --rot: 12s; --tick: 40s; }
.ko[hidden] { display: none; }
.ko-head { display: flex; align-items: center; gap: 2.2vh; padding: 1.6vh 3vw; background: rgba(26,34,56,.85); border-bottom: 2px solid var(--accent); flex: none; }
.ko-logo { height: 7vh; max-height: 84px; width: auto; flex: none; }
.ko-title { flex: 1; min-width: 0; }
.ko-title h1 { font-size: clamp(16px, 3.6vh, 42px); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ko-meta { font-size: clamp(11px, 1.7vh, 18px); color: var(--muted); margin-top: .4vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ko-right { flex: none; display: flex; align-items: center; gap: 2vw; }
.ko-time { font-family: var(--mono); font-size: clamp(16px, 3.2vh, 36px); font-weight: 800; color: var(--dim); letter-spacing: .04em; }
.ko-stream { display: inline-flex; align-items: center; gap: 1.2vh; padding: .9vh 1.6vh .9vh 1vh; border-radius: 1.4vh; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: var(--text); text-decoration: none; }
.ko-stream .lg { height: 5vh; width: 5vh; max-height: 60px; max-width: 60px; border-radius: 1.1vh; object-fit: cover; }
.ko-stream .tx { display: flex; flex-direction: column; line-height: 1.05; }
.ko-stream .tx small { font-size: clamp(8px, 1.3vh, 13px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ko-stream .tx b { font-size: clamp(12px, 2.3vh, 24px); font-weight: 900; white-space: nowrap; }
.ko-stream .url { font-size: clamp(9px, 1.4vh, 14px); color: var(--accent); font-weight: 700; margin-top: .3vh; }

.ko-stage { position: relative; flex: 1; min-height: 0; }
.ko-view { position: absolute; inset: 0; padding: 2.2vh 3vw 1vh; opacity: 0; transform: translateY(1.5vh); transition: opacity .55s ease, transform .55s ease; pointer-events: none; display: flex; flex-direction: column; min-height: 0; }
.ko-view.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ko-view[hidden] { display: none; }
.ko-h { display: flex; align-items: baseline; justify-content: space-between; gap: 2vw; margin-bottom: 1.6vh; flex: none; }
.ko-h .t { font-size: clamp(14px, 2.6vh, 30px); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.ko-h .t .dot { display: inline-block; width: 1.4vh; height: 1.4vh; border-radius: 50%; background: var(--live); margin-right: 1vh; animation: lvBlink 1.4s ease-in-out infinite; vertical-align: middle; }
.ko-h .s { font-size: clamp(11px, 1.8vh, 20px); color: var(--muted); font-weight: 700; white-space: nowrap; }
.ko-body { flex: 1; min-height: 0; }

/* Wappen im Kiosk */
.ko .crest { border-radius: 22%; }

/* Ansicht LIVE: grosses Spielfeld links, "Als Naechstes" rechts */
.ko-live-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.4vw; height: 100%; min-height: 0; }
.ko-live-grid.one { grid-template-columns: 1fr; }
.ko-board { background: var(--card); border: 1px solid var(--line); border-radius: 2.4vh; padding: 3vh 3vw; display: flex; flex-direction: column; justify-content: center; align-items: stretch; min-height: 0; position: relative; overflow: hidden; }
.ko-board.live { box-shadow: inset 0 0 0 2px var(--live), 0 0 60px rgba(22,163,74,.18); }
.ko-board::after { content: ''; position: absolute; right: -20%; top: -30%; width: 60%; height: 160%; background: radial-gradient(closest-side, rgba(30,232,143,.12), transparent); pointer-events: none; }
.ko-board .kicker { display: flex; justify-content: space-between; align-items: center; font-size: clamp(11px, 1.9vh, 20px); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3vh; }
.ko-board .kicker .pitch { color: var(--dim); letter-spacing: .04em; }
.ko-board .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; }
.ko-board .team { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; text-align: center; min-width: 0; }
.ko-board .team .crest { width: clamp(64px, 20vh, 220px); height: clamp(64px, 20vh, 220px); font-size: clamp(16px, 4vh, 40px); }
.ko-board .team .tn { font-size: clamp(14px, 3vh, 34px); font-weight: 900; line-height: 1.1; text-transform: uppercase; }
.ko-board .score { font-family: var(--mono); font-size: clamp(48px, 15vh, 170px); font-weight: 800; line-height: 1; white-space: nowrap; letter-spacing: -.02em; }
.ko-board .score i { font-style: normal; opacity: .35; padding: 0 .1em; }
.ko-board .score.vs { font-family: var(--font); font-size: clamp(20px, 5vh, 56px); color: var(--muted); letter-spacing: .1em; }
.ko-board .clock { display: flex; justify-content: center; gap: 1.6vh; align-items: center; margin-top: 3vh; }
.ko-board .clock .t { font-family: var(--mono); font-size: clamp(20px, 4.6vh, 52px); font-weight: 800; background: var(--accent); color: var(--accent-tx); padding: .4vh 2vh; border-radius: 1.2vh; }
.ko-board .clock .p { font-size: clamp(11px, 2vh, 22px); font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.ko-board .twin { display: flex; justify-content: center; gap: 1.5vh; margin-top: 2vh; }
.ko-board .twin span { font-size: clamp(11px, 2vh, 22px); font-weight: 800; padding: .6vh 1.8vh; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--dim); }
.ko-board .twin span.cam { box-shadow: inset 0 0 0 2px var(--accent); color: #fff; }
.ko-board .none { text-align: center; color: var(--muted); font-size: clamp(14px, 2.4vh, 26px); font-weight: 700; }
.ko-board .kick { text-align: center; color: var(--dim); font-size: clamp(12px, 2vh, 22px); font-weight: 700; margin-top: 2vh; }

.ko-side { display: flex; flex-direction: column; min-height: 0; gap: 1.2vh; }
.ko-side .sh { font-size: clamp(11px, 1.9vh, 20px); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; }
.ko-side .sh span:last-child { color: var(--dim); letter-spacing: .04em; }
.ko-list { display: flex; flex-direction: column; gap: 1.1vh; min-height: 0; overflow: hidden; }

/* Spielkarte (Ergebnisse / Als Naechstes) */
.ko-fx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1.4vh; background: var(--card); border: 1px solid var(--line); border-radius: 1.8vh; padding: 1.4vh 1.8vh; min-width: 0; }
.ko-fx.live { border-color: var(--live); box-shadow: inset 4px 0 0 var(--live); }
.ko-fx.stream { border-color: rgba(30,232,143,.45); }
.ko-fx .meta { display: flex; flex-direction: column; line-height: 1.1; min-width: 6.5vh; }
.ko-fx .meta b { font-size: clamp(13px, 2.4vh, 26px); color: var(--accent); font-weight: 900; }
.ko-fx .meta small { font-family: var(--mono); font-size: clamp(9px, 1.4vh, 15px); color: var(--muted); white-space: nowrap; }
.ko-fx .team { display: flex; align-items: center; gap: 1.2vh; min-width: 0; }
.ko-fx .team.away { flex-direction: row-reverse; text-align: right; }
.ko-fx .team .crest { width: clamp(26px, 5.2vh, 58px); height: clamp(26px, 5.2vh, 58px); font-size: clamp(9px, 1.5vh, 16px); }
.ko-fx .team .tn { font-size: clamp(12px, 2.1vh, 24px); font-weight: 800; line-height: 1.12; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; hyphens: auto; }
.ko-fx .sc { font-family: var(--mono); font-size: clamp(18px, 3.6vh, 42px); font-weight: 800; min-width: 3.2em; text-align: center; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: .5vh; }
.ko-fx .sc.open { color: var(--muted); font-size: clamp(14px, 2.6vh, 30px); }
.ko-fx .sc.live { color: var(--accent); }
.ko-fx .sc .st { font-family: var(--font); font-size: clamp(8px, 1.3vh, 13px); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ko-fx .sc.live .st { color: var(--live); }
.ko-fx .sc .st.stream { color: var(--accent); }
.ko-fx .sc .tw { font-family: var(--font); font-size: clamp(8px, 1.3vh, 13px); color: var(--muted); white-space: nowrap; }

/* Ansicht ERGEBNISSE: Bloecke je Zeitfenster (Kopfzeile + 3 Plaetze), zwei Spalten, neueste zuerst */
.ko-res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2vh 2vw; height: 100%; align-content: start; min-height: 0; overflow: hidden; }
.ko-blk { display: flex; flex-direction: column; gap: .6vh; min-width: 0; }
.ko-blk .slot { display: flex; align-items: center; gap: 1.2vh; font-size: clamp(10px, 1.5vh, 17px); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: .3vh; }
.ko-blk .slot::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 5; }
.ko-blk .slot .time { font-family: var(--mono); color: var(--text); font-size: clamp(12px, 1.9vh, 21px); }
.ko-blk .slot .fin { order: 6; font-size: .75em; color: var(--muted); letter-spacing: .14em; }
.ko-blk.now .slot, .ko-blk.now .slot .time { color: var(--accent); }
.ko-blk.now .slot::after { background: rgba(30,232,143,.4); }
.ko-res .ko-fx { padding: .7vh 1.4vh; gap: 1.1vh; }
.ko-res .ko-fx .sc { font-size: clamp(15px, 2.7vh, 32px); gap: .2vh; }
.ko-res .ko-fx .sc .st { font-size: clamp(8px, 1.1vh, 12px); }
.ko-res .ko-fx .meta b { font-size: clamp(12px, 2vh, 22px); }
.ko-res .ko-fx .meta small { font-size: clamp(9px, 1.2vh, 13px); }
.ko-res .ko-fx .team .crest { width: clamp(24px, 3.9vh, 46px); height: clamp(24px, 3.9vh, 46px); }
.ko-res .ko-fx .team .tn { font-size: clamp(11px, 1.7vh, 20px); }

/* Ansicht TABELLE */
.ko-tbl { width: 100%; border-collapse: collapse; font-size: clamp(12px, 2.3vh, 26px); }
.ko-tbl th, .ko-tbl td { padding: .28em .45em; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ko-tbl th { font-size: .5em; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.ko-tbl th.tn, .ko-tbl td.tn { text-align: left; }
.ko-tbl td.tn { font-weight: 900; text-transform: uppercase; }
.ko-tbl td.tn .crest { width: 1.6em; height: 1.6em; font-size: .45em; vertical-align: middle; margin-right: .5em; display: inline-flex; }
.ko-tbl td.rk { font-family: var(--mono); color: var(--muted); width: 1.6em; padding-left: 0; }
.ko-tbl tr:nth-child(-n+3) td.rk { color: var(--accent); }
.ko-tbl td.pts { font-family: var(--mono); font-weight: 900; color: var(--accent); font-size: 1.15em; }
.ko-tbl td.num { font-family: var(--mono); color: var(--dim); }
.ko-tbl td.wdl { color: var(--muted); font-size: .85em; }
.ko-tbl tbody tr:nth-child(odd) td { background: rgba(255,255,255,.03); }

/* Fortschritt der Rotation */
.ko-dots { display: flex; justify-content: center; gap: 1.2vh; padding: .8vh 0 1vh; flex: none; }
.ko-dot { width: 6vh; max-width: 80px; height: .7vh; min-height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.ko-dot.done { background: rgba(30,232,143,.45); }
.ko-dot.is-on::after { content: ''; display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: koProg var(--rot) linear forwards; }
.ko-dot.is-on.hold::after { animation: none; }
@keyframes koProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Fuss: Sponsorenleiste (Standard) oder Laufband (?ticker=1) */
.ko-foot { flex: none; }
.ko-sponsors { display: flex; align-items: center; gap: 2.4vw; padding: 1.4vh 3vw; background: rgba(26,34,56,.9); border-top: 1px solid var(--line); min-height: 9vh; }
.ko-sponsors[hidden], .ko-ticker[hidden] { display: none; }
.ko-sp-label { flex: none; font-size: clamp(10px, 1.6vh, 18px); font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.ko-sp-logos { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: 1.5vw; min-width: 0; }
.ko-sp-logos .lg { flex: 1 1 0; display: flex; align-items: center; justify-content: center; height: 6.6vh; max-width: 14vw; min-width: 0; }
.ko-sp-logos .lg img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
/* Laufband */
.ko-ticker { display: flex; align-items: stretch; height: 6.4vh; min-height: 38px; max-height: 76px; background: var(--accent); color: var(--accent-tx); flex: none; overflow: hidden; }
.ko-ticker-label { display: flex; align-items: center; padding: 0 2.2vh; background: #0E1A14; color: var(--accent); font-weight: 900; letter-spacing: .16em; font-size: clamp(11px, 2vh, 22px); text-transform: uppercase; flex: none; }
.ko-ticker-track { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%); }
.ko-ticker-inner { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; animation: koTicker var(--tick) linear infinite; font-size: clamp(12px, 2.3vh, 26px); font-weight: 800; }
.ko-ticker-inner:empty { animation: none; }
.ko-ticker-inner .it { display: inline-flex; align-items: center; gap: 1.2vh; padding: 0 3vh; }
.ko-ticker-inner .it .tag { font-size: .62em; font-weight: 900; letter-spacing: .14em; padding: .25em .6em; border-radius: 999px; background: rgba(14,26,20,.9); color: var(--accent); }
.ko-ticker-inner .it .tag.live { background: var(--live); color: #fff; }
.ko-ticker-inner .it .tag.next { background: rgba(14,26,20,.18); color: var(--accent-tx); }
.ko-ticker-inner .it .sc { font-family: var(--mono); font-weight: 900; padding: 0 .3em; }
.ko-ticker-inner .it .sep { opacity: .35; }
@keyframes koTicker { to { transform: translateX(-50%); } }

/* Kiosk mobil / hochkant: alles untereinander, Ansichten scrollen fuer sich */
@media (max-width: 820px), (orientation: portrait) and (max-width: 1100px) {
  .ko-head { padding: 10px 14px; gap: 10px; }
  .ko-logo { height: 40px; }
  .ko-title h1 { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ko-meta { display: none; }
  .ko-time { display: none; }
  .ko-stream { padding: 5px 8px 5px 5px; gap: 7px; border-radius: 10px; }
  .ko-stream .lg { width: 30px; height: 30px; border-radius: 8px; }
  .ko-stream .tx small, .ko-stream .url { display: none; }
  .ko-stream .tx b { font-size: 12px; }
  .ko-view { padding: 12px 14px 8px; overflow-y: auto; }
  .ko-h { margin-bottom: 10px; } .ko-h .t { font-size: 13px; } .ko-h .s { font-size: 11px; }
  .ko-live-grid { grid-template-columns: 1fr; gap: 14px; height: auto; }
  .ko-board { padding: 16px; border-radius: 16px; }
  .ko-board .kicker { font-size: 11px; margin-bottom: 14px; }
  .ko-board .team .crest { width: 64px; height: 64px; font-size: 18px; }
  .ko-board .team .tn { font-size: 14px; }
  .ko-board .score { font-size: 52px; } .ko-board .score.vs { font-size: 22px; }
  .ko-board .clock { margin-top: 14px; } .ko-board .clock .t { font-size: 22px; padding: 3px 12px; } .ko-board .clock .p { font-size: 11px; }
  .ko-board .twin span { font-size: 11px; padding: 4px 10px; }
  .ko-board .none, .ko-board .kick { font-size: 13px; }
  .ko-side .sh { font-size: 11px; }
  .ko-list { gap: 8px; overflow: visible; }
  .ko-fx { gap: 8px; padding: 10px 10px; border-radius: 14px; }
  .ko-fx .meta { min-width: 40px; } .ko-fx .meta b { font-size: 14px; } .ko-fx .meta small { font-size: 10px; }
  .ko-fx .team .crest { width: 32px; height: 32px; font-size: 10px; }
  .ko-fx .team .tn { font-size: 12.5px; }
  .ko-fx .sc { font-size: 20px; } .ko-fx .sc.open { font-size: 15px; } .ko-fx .sc .st, .ko-fx .sc .tw { font-size: 9px; }
  /* Karten mobil immer im Raster-Layout (Wappen ueber dem Namen), sonst zerhackt es lange Namen */
  .ko-fx { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "meta meta meta" "home sc away"; row-gap: 8px; }
  .ko-fx .meta { grid-area: meta; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; }
  .ko-fx .team.home { grid-area: home; flex-direction: column; text-align: center; }
  .ko-fx .team.away { grid-area: away; flex-direction: column; text-align: center; }
  .ko-fx .sc { grid-area: sc; }
  .ko-fx .team .tn { text-align: center; hyphens: manual; }
  .ko-fx .team .crest { width: 40px; height: 40px; }
  .ko-res { grid-template-columns: 1fr; gap: 14px; height: auto; overflow: visible; }
  .ko-blk { gap: 8px; }
  .ko-blk .slot { font-size: 11px; } .ko-blk .slot .time { font-size: 13px; }
  .ko-res .ko-fx { padding: 10px; }
  .ko-res .ko-fx .team .crest { width: 40px; height: 40px; }
  .ko-res .ko-fx .team .tn { font-size: 12.5px; }
  .ko-res .ko-fx .sc { font-size: 20px; }
  .ko-tbl { font-size: 14px; }
  .ko-tbl th, .ko-tbl td { padding: 7px 4px; }
  .ko-tbl .col-goals { display: none; }
  .ko-dots { gap: 8px; padding: 6px 0; } .ko-dot { width: 40px; height: 4px; }
  .ko-sponsors { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px 8px; min-height: 0; justify-content: center; }
  .ko-sp-label { width: 100%; text-align: center; font-size: 10px; }
  .ko-sp-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; flex: 1 1 100%; justify-items: center; }
  .ko-sp-logos .lg { width: 100%; height: 30px; max-width: none; }
  .ko-ticker { height: 40px; }
  .ko-ticker-label { padding: 0 12px; font-size: 11px; }
  .ko-ticker-inner { font-size: 13px; } .ko-ticker-inner .it { padding: 0 16px; }
}
