/* ═══════════════════════════════════════════════════════════════
   broadcast-pwa.css — Zuschaueransicht im Design von HTML #6
   Gleicher Look wie 2nd Screen, Gamemanager-Tabelle und Zeremonien
   (schräge Platten, Anton/Oswald, Weiß, Gold, Live-Rot), fürs Handy.
   Gilt nur mit html.pwa6: ui-shared.js setzt die Klasse auf Zuschauer-
   Geräten, der Admin-Bereich nutzt dieselben Seiten und bleibt unverändert.
   Schriften kommen aus second-screen.css (lokal, auch offline).
   ═══════════════════════════════════════════════════════════════ */
html.pwa6 {
    --bg:          #07070a;
    --surface:     #101015;
    --surface2:    #1a1a22;
    --surface3:    #22222c;
    --border:      rgba(255,255,255,.14);
    --border2:     rgba(255,255,255,.22);
    --accent:      #F5C542;
    --accent-dim:  #3a2f10;
    --gold:        #F5C542;
    --gold-dim:    #3a2f10;
    --green:       #3fb950;
    --red:         #f0525d;
    --text:        #ffffff;
    --text-muted:  rgba(255,255,255,.68);
    --text-dim:    rgba(255,255,255,.55);
    --radius:      0;
    --radius-sm:   0;
    --radius-lg:   0;
    --font-display:'Oswald', 'Arial Narrow', Arial, sans-serif;
    --font-mono:   'Oswald', 'Arial Narrow', Arial, sans-serif;
    --pwa-live:    #d81e2c;
    --pwa-league:  #573175;
    --pwa-vf:      #5aa0f5;
}
html.pwa6 body {
    background: #07070a repeating-linear-gradient(77.5deg, rgba(255,255,255,.018) 0 3px, transparent 3px 16px);
    font-variant-numeric: tabular-nums;
}

/* ── Kopfzeile und Tab-Leiste ── */
html.pwa6 .header, html.pwa6 .tabbar { background: rgba(7,7,10,.97); border-color: var(--border2); }
html.pwa6 .header-title { font: 400 1.5rem/1.15 'Anton', Impact, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
html.pwa6 .header-subtitle { font: 500 .68rem/1.35 'Oswald', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
html.pwa6 .live-dot { background: var(--pwa-live); animation: pwaLivePulse 2.6s ease-in-out infinite; }
@keyframes pwaLivePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(216,30,44,0); }
    50%      { box-shadow: 0 0 0 6px rgba(216,30,44,.35); }
}
html.pwa6 .tabbar a { font-family: 'Oswald', sans-serif; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
html.pwa6 .tabbar a.active { color: var(--gold); }

/* ── Karten und Überschriften ── */
html.pwa6 .card { background: rgba(16,16,21,.86); border-color: var(--border); }
html.pwa6 .card.card-bc { background: none; border: 0; padding: 0 !important; margin-bottom: 18px; }
html.pwa6 .card-title {
    position: relative; isolation: isolate; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
    width: fit-content; max-width: calc(100% - 12px); box-sizing: border-box;
    margin: 0 0 12px 6px; padding: 9px 22px 9px 14px; border: 0;
    font: 600 .92rem/1.1 'Oswald', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #fff;
}
html.pwa6 .card-title::before {
    content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg);
    background: linear-gradient(90deg, color-mix(in srgb, var(--pwa-league) 70%, #0a0a0e), color-mix(in srgb, var(--pwa-league) 30%, #0a0a0e));
    border-right: 4px solid #fff;
}
html.pwa6 .card-subtitle, html.pwa6 .card-title .sub {
    flex-basis: 100%; font: 400 .72rem/1.25 'Inter', Arial, sans-serif; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.75);
}
html.pwa6 .btn-primary { color: #0b0b10; }

/* ── Live-Karte / nächstes Spiel ── */
html.pwa6 #match-card-slot .card-subtitle { display: none; }
html.pwa6 .match-split {
    position: relative; overflow: hidden; padding: 12px 10px 14px;
    background: linear-gradient(102deg, color-mix(in srgb, var(--l) 48%, #07070a) 0 49.6%, #fff 49.6% 50.3%, color-mix(in srgb, var(--r) 48%, #07070a) 50.3%);
}
html.pwa6 .match-headline {
    display: block; width: fit-content; max-width: 100%; margin: 0 auto 10px; padding: 5px 12px; box-sizing: border-box;
    background: rgba(8,8,12,.75); border: 1px solid var(--border2);
    font: 500 .7rem/1.1 'Oswald', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-align: center;
}
html.pwa6 .match-card { gap: 6px; }
html.pwa6 .match-team img, html.pwa6 .match-team > div:not(.match-team-name) {
    width: clamp(72px, 24vw, 150px) !important; background: none !important; padding: 0 !important;
}
html.pwa6 .match-team img { filter: drop-shadow(0 6px 12px rgba(0,0,0,.65)); }
html.pwa6 .match-team-name {
    position: relative; isolation: isolate; display: block; padding: 5px 8px 6px; white-space: normal; overflow: visible;
    font: 600 .78rem/1.1 'Oswald', sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #fff !important;
}
html.pwa6 .match-team-name::before {
    content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg);
    background: rgba(8,8,12,.92); border-bottom: 3px solid var(--c, #888);
}
html.pwa6 .match-score { font: 400 3.3rem/1 'Anton', Impact, sans-serif; }
html.pwa6 .match-score .live-score, html.pwa6 .match-score .pending {
    background: linear-gradient(180deg, #fff, #e6e8ee 45%, #9a9eab); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html.pwa6 .match-score .pending { font-size: .8em; }
html.pwa6 .live-clock { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; font: 600 1.05rem/1 'Oswald', sans-serif; color: #fff; }
html.pwa6 .live-clock-ic { display: none; }
html.pwa6 .live-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; transform: skewX(-12deg);
    background: var(--pwa-live); font: 700 .78rem/1 'Oswald', sans-serif; letter-spacing: .2em; color: #fff;
}
html.pwa6 .live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
html.pwa6 .live-ot-tag { color: var(--gold); }
html.pwa6 .goal-event-row { background: rgba(8,8,12,.78); font-family: 'Oswald', sans-serif; }
html.pwa6 .goal-event-time, html.pwa6 .goal-event-label { color: var(--text-muted); }
html.pwa6 .goal-event-team { color: #fff !important; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
html.pwa6 .elo-prob { color: #fff; }

/* ── Tabelle: Platten wie in der Gamemanager-Tabelle ──
   Container-Abfrage statt Bildschirmbreite: der Platz hängt von der Seite ab
   (Startseite einspaltig, Spielplan mit Seitenleiste) */
html.pwa6 .tbl-wrap, html.pwa6 #standings-table-wrap { container-type: inline-size; overflow: visible !important; }
html.pwa6 .tbl-plates, html.pwa6 .tbl-plates thead, html.pwa6 .tbl-plates tbody { display: block; width: auto; }
html.pwa6 .tbl-plates { font-family: 'Oswald', sans-serif; padding: 0 5px; }
html.pwa6 .tbl-plates tr {
    display: grid; align-items: center; height: auto !important;
    grid-template-columns: 30px minmax(0,1fr) 28px 26px 36px 36px 26px 46px 38px 40px;
}
html.pwa6 .tbl-plates th {
    padding: 0 2px 6px; border: 0; background: none; font: 500 .68rem/1 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(233,233,237,.6); text-align: center; width: auto !important;
}
html.pwa6 .tbl-plates th:nth-child(2) { text-align: left !important; }
html.pwa6 .tbl-plates tbody tr { position: relative; isolation: isolate; min-height: 44px; margin-bottom: 6px; border-left: 0 !important; background: none !important; }
html.pwa6 .tbl-plates tbody tr::before {
    content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg);
    background: linear-gradient(90deg, rgba(14,14,20,.95), rgba(26,26,34,.85));
}
html.pwa6 .tbl-plates tr.po-hf::before { background: linear-gradient(90deg, rgba(245,200,60,.28), rgba(245,200,60,.06) 75%), #101015; }
html.pwa6 .tbl-plates tr.po-vf::before { background: linear-gradient(90deg, rgba(90,160,245,.26), rgba(90,160,245,.05) 75%), #101015; }
html.pwa6 .tbl-plates tr.contender::before { box-shadow: 0 0 0 2px #fff; }
html.pwa6 .tbl-plates tr.contender td { background: none; box-shadow: none; }
html.pwa6 .tbl-plates td { min-width: 0; padding: 0 2px; border: 0; text-align: center; font-family: 'Oswald', sans-serif; font-size: .95rem !important; color: rgba(233,233,237,.82); }
html.pwa6 .tbl-plates td[colspan] { grid-column: 3 / -1; font-size: .8rem !important; }
html.pwa6 .tbl-plates td:first-child { font: 400 1.25rem/1 'Anton', Impact, sans-serif !important; color: #fff !important; text-align: center !important; width: auto; }
html.pwa6 .tbl-plates .team-cell { display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left; }
html.pwa6 .tbl-plates .team-cell img { width: 28px !important; height: 28px !important; flex-shrink: 0; }
html.pwa6 .tbl-plates .team-cell > span:first-of-type {
    min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .86rem !important; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #fff !important;
}
html.pwa6 .tbl-plates .team-cell > span + span { flex: none; font-size: .8rem; }
html.pwa6 .tbl-plates tr.po-eliminated .team-cell > span:first-of-type,
html.pwa6 .tbl-plates tr.po-eliminated td:first-child { color: var(--text-dim) !important; }
html.pwa6 .tbl-plates .pts { font: 400 1.3rem/1 'Anton', Impact, sans-serif; color: #fff; }
/* Wenig Platz: nur #, Team, Spiele, Tordifferenz, Punkte */
@container (max-width: 459px) {
    html.pwa6 .tbl-plates tr { grid-template-columns: 30px minmax(0,1fr) 28px 38px 40px; }
    html.pwa6 .tbl-plates th:nth-child(n+4):nth-child(-n+8),
    html.pwa6 .tbl-plates td:nth-child(n+4):nth-child(-n+8):not([colspan]) { display: none; }
}

/* ── Spielplan: Namen weiß und voll lesbar, die feste Ergebnis-Breite ließ am Handy kaum Platz ── */
html.pwa6 .match-row { gap: 6px; padding: 8px 6px; background: linear-gradient(90deg, rgba(14,14,20,.95), rgba(26,26,34,.85)); }
html.pwa6 .match-row.next-up { background: linear-gradient(90deg, rgba(245,200,60,.2), rgba(245,200,60,.04) 75%), #101015; }
html.pwa6 .match-row .match-team { color: #fff !important; font: 600 .82rem/1.15 'Oswald', sans-serif; letter-spacing: .03em; text-transform: uppercase; }
html.pwa6 .match-row .match-team-inner { gap: 6px; }
html.pwa6 .match-row .match-team-logo { background: none; flex-shrink: 0; }
html.pwa6 .match-score-display { width: 58px; font: 400 1.25rem/1 'Anton', Impact, sans-serif; }
@media (max-width: 559px) {
    html.pwa6 .match-row .match-team-inner { width: 100%; flex-direction: column; gap: 4px; }
    html.pwa6 .match-row .match-team.home .match-team-inner { flex-direction: column-reverse; }
    html.pwa6 .match-row .match-team-inner span { width: 100%; overflow: visible; }
}

/* ── Playoffs: Serienstand bleibt in einer Zeile (volle Optik kommt mit 2.19 Paket B) ── */
@media (max-width: 559px) { html.pwa6 .series-grid { grid-template-columns: minmax(0,1fr); } }
html.pwa6 .series-stand { gap: 8px; padding: 10px; }
html.pwa6 .series-stand > span:not(.series-score) {
    flex: 1 1 0; min-width: 0; color: #fff !important;
    font: 600 .82rem/1.15 'Oswald', sans-serif !important; letter-spacing: .03em; text-transform: uppercase;
}
html.pwa6 .series-stand > span:first-child { justify-content: flex-end; text-align: right; }
html.pwa6 .series-score { flex-shrink: 0; white-space: nowrap; font: 400 1.5rem/1 'Anton', Impact, sans-serif; letter-spacing: .04em; }
html.pwa6 .po-team { color: #fff !important; font-family: 'Oswald', sans-serif; letter-spacing: .03em; text-transform: uppercase; }
html.pwa6 .po-team span { white-space: normal; }

/* ── Legende: Halbfinale Gold, Viertelfinale Blau wie im 2nd Screen ── */
html.pwa6 .playoff-legend-range.po-vf { color: var(--pwa-vf); }
html.pwa6 .playoff-legend-title { font-family: 'Oswald', sans-serif; letter-spacing: .14em; }
