/* Coach2Coach Web 1.23 – Spieltag live (iPad am Spielfeld) */
:root { --rasen: #2E7D32; --rasen-linie: rgba(255, 255, 255, .28); --kachel: #FFFFFF; --kachel-tinte: #0B1B33; }
:root[data-theme="dunkel"] { --rasen: #1E4D24; --kachel: #1A2231; --kachel-tinte: #E8EDF5; }
:root[data-theme="blau"] { --rasen: #1F6B3A; --kachel: #143878; --kachel-tinte: #FFFFFF; }

/* Vollbild am Spielfeld: ohne Seitenleiste, volle Breite */
body.live-voll .seitenleiste, body.gast-modus .seitenleiste { display: none; }
body.live-voll .inhalt, body.gast-modus .inhalt { max-width: none; padding: 8px 14px 60px; }
body.gast-modus { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { body.gast-modus * { display: none !important; } }

.live button { touch-action: manipulation; }
.live-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 30;
  background: var(--hinter); padding: 8px 0 10px; border-bottom: 1px solid var(--linie); margin-bottom: 12px; }
.live-titel { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.live-titel strong { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 800; font-style: italic;
  text-transform: uppercase; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-titel span { color: var(--grau); font-size: 13px; }
.live-kopf .knoepfe { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.live-kopf button { padding: 8px 12px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--grau); padding: 4px 10px;
  border-radius: 999px; background: var(--flaeche); }
.sync i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sync.warte i { background: var(--warn); }
.sync.weg i { background: var(--danger); }
.sync.weg { color: var(--danger); font-weight: 600; }

.live-felder { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.live-felder.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 980px) { .live-felder.zwei { grid-template-columns: minmax(0, 1fr); } }
.feld { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; padding: 12px; min-width: 0; }
.feld.laeuft { border-color: var(--ok); box-shadow: inset 0 4px 0 var(--ok); }
.feld.pause { border-color: var(--warn); box-shadow: inset 0 4px 0 var(--warn); }
.feld-kopf { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 10px; }
.feld-name { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 800; text-transform: uppercase; }
.feld-name small { font-family: "Barlow", sans-serif; font-size: 13px; font-weight: 600; color: var(--grau); text-transform: none; margin-left: 6px; }
.uhr-block { text-align: right; }
.uhr { font-family: "Barlow Condensed", sans-serif; font-size: 48px; font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; }
.uhr.angehalten { color: var(--grau); }
.uhr.ueber { color: var(--warn); }
.uhr-plan { font-size: 13px; color: var(--grau); font-variant-numeric: tabular-nums; }
.feld-steuerung { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.feld-steuerung button { padding: 10px 14px; font-size: 15px; }
.feld-steuerung .hinweis { font-size: 13px; }
button.gruen { background: var(--ok); border-color: var(--ok); color: #fff; }
button.warnend { background: var(--warn); border-color: var(--warn); color: #0B1B33; }
:root[data-theme="dunkel"] button.gruen, :root[data-theme="blau"] button.gruen { color: #0B1B33; }
button.ton-aus { opacity: .6; }

.rasen { background: var(--rasen); border-radius: 12px; padding: 10px; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); position: relative;
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), var(--rasen-linie) calc(50% - 1px), var(--rasen-linie) calc(50% + 1px), transparent calc(50% + 1px)); }
.rasen .tw-reihe { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.bank { margin-top: 10px; background: var(--flaeche); border-radius: 12px; padding: 8px 10px 10px; }
.bank-titel { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: "Barlow Condensed", sans-serif;
  font-size: 14px; letter-spacing: .6px; text-transform: uppercase; color: var(--grau); margin-bottom: 6px; }
.bank-reihe { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.bank-leer { color: var(--grau); font-size: 13px; padding: 6px 2px; }

.sp { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; text-align: left;
  min-height: 66px; padding: 8px 10px; border-radius: 10px; border: 2px solid transparent; background: var(--kachel); color: var(--kachel-tinte);
  box-shadow: 0 1px 2px var(--schatten); position: relative; }
.sp:hover { background: var(--kachel); filter: brightness(.97); }
.sp-nr { grid-row: 1 / 3; font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 800; font-style: italic; min-width: 30px;
  text-align: center; line-height: 1; }
.sp-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-info { font-size: 12px; color: var(--grau); font-variant-numeric: tabular-nums; display: flex; gap: 6px; flex-wrap: wrap; }
.sp-delta.minus { color: var(--warn); font-weight: 700; }
.sp-delta.plus { color: var(--pos); font-weight: 700; }
.sp .tw-mark { position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--grau); }
.sp.ist-tw { background: linear-gradient(180deg, rgba(201, 242, 58, .35), rgba(201, 242, 58, 0) 60%), var(--kachel); }
.sp.gewaehlt { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201, 242, 58, .55); }
.sp.ziel { border: 2px dashed var(--lime); }
.sp.dran { border-left: 5px solid var(--warn); }
.sp.verletzt { opacity: .55; }
.sp.leer { background: rgba(255, 255, 255, .14); color: #fff; border: 2px dashed rgba(255, 255, 255, .55); box-shadow: none; display: flex;
  align-items: center; justify-content: center; font-weight: 700; }
.sp.leer.ziel { border-color: var(--lime); background: rgba(201, 242, 58, .22); }
.bank .sp { box-shadow: none; border-color: var(--linie); }
.bank .sp.gewaehlt { border-color: var(--lime); }
.bank .sp.ziel { border-color: var(--lime); }

.aktionsleiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding: 10px; border-radius: 10px;
  background: var(--navy); color: #fff; }
.aktionsleiste strong { margin-right: auto; }
.aktionsleiste button { padding: 8px 12px; }
.pausen-hilfe { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--lime); border-radius: 10px; background: var(--flaeche-leicht); font-size: 14px; }
.pausen-hilfe .kopfzeile { margin: 6px 0 0; }

.gemeinsame-bank { margin-top: 14px; }
.live-tabelle { margin-top: 16px; }
.live-tabelle th { cursor: pointer; white-space: nowrap; }
.live-tabelle th.sortiert::after { content: " ▾"; }
.live-tabelle td { white-space: nowrap; }
.live-tabelle .minus { color: var(--warn); font-weight: 700; }
.live-tabelle .plus { color: var(--pos); font-weight: 700; }
.live-tabelle tr.verletzt td { opacity: .6; }

.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900; display: flex; flex-direction: column; gap: 8px;
  width: min(680px, calc(100vw - 24px)); }
.toast { background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); border-left: 5px solid var(--lime); }
.toast.fehler { border-left-color: var(--danger); }
.toast span { margin-right: auto; font-weight: 600; }
.toast button { padding: 6px 10px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }

.modal-huelle { position: fixed; inset: 0; z-index: 950; background: rgba(6, 16, 38, .55); display: flex; align-items: flex-start; justify-content: center;
  overflow: auto; padding: 40px 14px; }
.modal { background: var(--karte); color: var(--tinte); border-radius: 14px; padding: 18px 20px; width: min(620px, 100%); border-top: 4px solid var(--lime);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.modal h2 { margin-right: 30px; }
.modal .zu { float: right; border: 0; background: transparent; font-size: 24px; line-height: 1; padding: 0 6px; color: var(--grau); }
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.qr-box .qr { background: #fff; padding: 6px; border-radius: 8px; line-height: 0; }
.qr-box .qr svg { width: 220px; height: 220px; }
.code-gross { font-family: "Barlow Condensed", sans-serif; font-size: 44px; font-weight: 800; letter-spacing: 6px; }
.gast-liste { display: grid; gap: 6px; margin-top: 8px; }
.gast-zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; }
.gast-zeile span { margin-right: auto; }
.reiter { display: flex; gap: 6px; margin: 4px 0 12px; }
.reiter button.aktiv { background: var(--pos); border-color: var(--pos); color: #fff; }

/* Liste und Einrichten */
.live-liste { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.spieltag-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.spieltag-karte:hover { box-shadow: 0 6px 20px var(--schatten); }
.spieltag-karte.laeuft { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.spieltag-karte .titel { font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 700; text-transform: uppercase; }
.spieltag-karte .meta { color: var(--grau); font-size: 13px; margin-top: 3px; }
.badge.gruen { background: var(--ok); color: #fff; }
.beitreten { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.beitreten input { width: 150px; text-transform: uppercase; letter-spacing: 3px; font-weight: 700; }
.wahl { display: inline-flex; border: 1px solid var(--linie); border-radius: 9px; overflow: hidden; }
.wahl button { border: 0; border-radius: 0; border-right: 1px solid var(--linie); padding: 8px 12px; background: var(--knopf); }
.wahl button:last-child { border-right: 0; }
.wahl button.aktiv { background: var(--pos); color: #fff; }
:root[data-theme="blau"] .wahl button.aktiv, :root[data-theme="blau"] .reiter button.aktiv { color: var(--navy); }
.einricht-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 16px; align-items: end; }
.einricht-raster label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.einricht-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.einricht-zeile > span.label { font-weight: 600; min-width: 160px; }
.einricht-zeile input[type="number"] { width: 90px; }
.einricht-zeile select { width: auto; }
.kader-liste { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 8px; }
.kader-zeile { display: grid; grid-template-columns: auto 44px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 10px;
  border: 1px solid var(--linie); border-radius: 10px; background: var(--karte); }
.kader-zeile.weg { opacity: .5; }
.kader-zeile input[type="checkbox"] { width: 22px; height: 22px; margin: 0; }
.kader-zeile .nr { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 800; font-style: italic; text-align: center; }
.kader-zeile .wahl button { padding: 5px 9px; font-size: 13px; }
.kader-zeile .tw-knopf { padding: 5px 9px; font-size: 12px; font-weight: 800; }
.kader-zeile .tw-knopf.aktiv { background: var(--lime); border-color: var(--lime); color: #0B1B33; }
.soll-hinweis { color: var(--grau); font-size: 13px; }

/* Gastzugang: Wasserzeichen, damit ein Bildschirmfoto als Gastansicht erkennbar bleibt */
.wasserzeichen { position: fixed; inset: -50%; z-index: 800; pointer-events: none; display: flex; flex-wrap: wrap; align-content: flex-start;
  gap: 70px 90px; transform: rotate(-24deg); opacity: .09; font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 800;
  color: var(--tinte); white-space: nowrap; overflow: hidden; }
.gast-kopf { background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap; }
.gast-kopf strong { font-family: "Barlow Condensed", sans-serif; font-size: 18px; letter-spacing: .6px; text-transform: uppercase; color: var(--lime); }
.gast-kopf span { color: #C7D4EE; font-size: 13px; }
.gast-kopf .sync { background: rgba(255, 255, 255, .12); color: #fff; }
.gast-kopf .sync span, .gast-kopf #live-sync { color: #fff; }
.gast-kopf button { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.dashboard-live { border: 2px solid var(--ok); }

/* Web 1.22: Spielstand, Tore, „Mein Feld“, nicht erfasstes Feld */
.spielstand { display: inline-block; margin-left: 10px; padding: 0 10px; border-radius: 8px; background: var(--navy); color: #fff;
  font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 800; font-style: italic; line-height: 1.25;
  font-variant-numeric: tabular-nums; vertical-align: middle; }
.spielstand.klein { font-size: 18px; margin-left: 0; padding: 0 8px; }
.feld-name .chip { font-family: "Barlow", sans-serif; font-size: 12px; font-weight: 700; text-transform: none; vertical-align: middle; }
.tor-knoepfe { display: inline-flex; gap: 8px; margin-left: auto; }
button.tor-knopf { background: var(--lime); border-color: var(--lime); color: #0B1B33; font-weight: 800; }
.feld-mini { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border: 1px solid var(--linie);
  border-radius: 12px; background: var(--karte); font-size: 14px; }
.feld-mini.laeuft { border-color: var(--ok); }
.feld-mini.pause { border-color: var(--warn); }
.feld-mini > span { color: var(--grau); }
.feld-mini .uhr-klein { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 800; color: var(--tinte); font-variant-numeric: tabular-nums; }
.feld-mini button { margin-left: auto; }
.feld.nicht-erfasst { margin-top: 14px; border-style: dashed; background: var(--flaeche); }
.live-spielstand { margin-top: 16px; }
.live-spielstand td, .live-spielstand th { white-space: nowrap; }
.sicht-wahl button { padding: 7px 10px; }
.modal .tor-wahl { min-height: 52px; }
.modal h3 { margin: 12px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--grau); }
.tor-andere { margin-top: 10px; }
.tor-andere summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
@media (max-width: 700px) { .tor-knoepfe { margin-left: 0; } .sicht-wahl { order: 5; } }

/* Web 1.23: Spielzeit auf den Kacheln, Stand des laufenden Abschnitts */
.sp-info { align-items: baseline; }
.sp-zeit { font-weight: 800; font-size: 14px; color: var(--kachel-tinte); font-variant-numeric: tabular-nums; }
.sp-min { font-size: 12px; color: var(--grau); }
.sp-proz { font-size: 12px; font-weight: 700; color: var(--kachel-tinte); opacity: .75; font-variant-numeric: tabular-nums; }   /* Web 1.27 */
.sp-proz:empty { display: none; }
.stand-gesamt { margin-left: 8px; font-family: "Barlow", sans-serif; font-size: 13px; font-weight: 600; font-style: normal;
  text-transform: none; color: var(--grau); vertical-align: middle; white-space: nowrap; }
.live-spielstand td.aktuell { font-weight: 800; background: var(--flaeche); border-radius: 6px; }
.sp-name { display: flex; min-width: 0; }
.sp-name .vn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-name .ni { flex: none; margin-left: .28em; }
.sp-nr { min-width: 24px; }

/* Web 1.24: Turnier — „+ Spiel“ am Spielfeld */
.spiel-plus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 10px 12px;
  border: 1px dashed var(--linie); border-radius: 10px; background: var(--flaeche, rgba(0,0,0,.03)); }
.spiel-plus #sp-name { flex: 1 1 260px; min-width: 200px; }
.spiel-plus #sp-min { width: 76px; }

/* Web 1.28: Auswertung (Spielzeiten-Datenblatt), Saison, Verlauf mit Zeit ändern */
.modal.modal-breit { width: min(1100px, 100%); }
.modal-breit .reiter { flex-wrap: wrap; }
.aw-knoepfe { margin: 6px 0 2px; gap: 8px; flex-wrap: wrap; }
.aw-kacheln { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 10px 0; }
.aw-kacheln .kachel { padding: 10px 12px; }
.aw-kacheln .kachel .wert { font-size: 24px; }
.aw-tabelle { font-size: 13px; }
.aw-tabelle td, .aw-tabelle th { white-space: nowrap; padding: 6px 8px; }
.aw-tabelle td.leer { color: var(--grau); }
.aw-tabelle .minus { color: var(--warn); font-weight: 700; }
.aw-tabelle .plus { color: var(--pos); font-weight: 700; }
.aw-tabelle tr.nicht-kader td { opacity: .65; }
.aw-proz { display: block; font-size: 11px; color: var(--grau); }
.aw-balken-liste { display: grid; gap: 4px; }
.aw-balken-zeile { display: grid; grid-template-columns: minmax(110px, 190px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.aw-balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-balken { display: flex; height: 12px; background: var(--flaeche); border-radius: 6px; overflow: hidden; }
.aw-sp { background: var(--pos); }
.aw-bk { background: var(--neu); }
.aw-balken-wert { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--grau); }
.aw-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin: 0 2px 0 8px; }
.verlauf-filter { flex-wrap: wrap; }
.verlauf-liste { max-height: 60vh; overflow: auto; }
.verlauf-zeile.offen { border-color: var(--pos); }
.verlauf-zeit { flex-basis: 100%; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.verlauf-zeit input { width: 7.5em; font-variant-numeric: tabular-nums; margin-left: 6px; }
.verlauf-zeit .hinweis { flex-basis: 100%; margin: 0; }
.modal .tor-wahl.aktiv { outline: 3px solid var(--pos); }
#live-druck { display: none; }
/* Web 1.29: Bilanz (Sieg/Unentschieden/Niederlage) */
.bilanz-zeile { margin: 4px 0 8px; font-size: 15px; }
.live-spielstand td.sieg, .aw-tabelle td.sieg { background: color-mix(in srgb, var(--pos) 22%, transparent); }
.live-spielstand td.remis, .aw-tabelle td.remis { background: color-mix(in srgb, var(--grau) 18%, transparent); }
.live-spielstand td.niederlage, .aw-tabelle td.niederlage { background: color-mix(in srgb, var(--danger) 20%, transparent); }
#aw-duo { max-width: 340px; }
@media print {
  body.live-drucken > *:not(#live-druck) { display: none !important; }
  body.live-drucken #live-druck { display: block; color: #000; font-size: 11px; }
  body.live-drucken { background: #fff !important; }
  #live-druck .druck-kopf { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #0B2A63; margin-bottom: 8px; }
  #live-druck h1 { font-size: 20px; margin: 0; color: #0B2A63; }
  #live-druck h2 { font-size: 15px; margin: 10px 0 6px; color: #0B2A63; }
  #live-druck h3 { font-size: 12px; margin: 8px 0 4px; }
  #live-druck .druck-marke { font-weight: 800; font-style: italic; color: #0B2A63; }
  #live-druck .neue-seite { break-before: page; page-break-before: always; }
  #live-druck .tabelle-huelle { overflow: visible; }
  #live-druck table { font-size: 10px; }
  #live-druck th { background: #0B2A63 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #live-druck td, #live-druck th { padding: 3px 5px; }
  #live-druck tr { break-inside: avoid; }
  #live-druck .kachel { border: 1px solid #ccc; padding: 6px 8px; }
  #live-druck .kachel.hero { background: #0B2A63 !important; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #live-druck .aw-balken, #live-druck .aw-balken span, #live-druck .aw-punkt { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #live-druck .hinweis { font-size: 9px; }
  #live-druck .einricht-zeile { display: none; }
  #live-druck .druck-fuss { margin-top: 10px; font-size: 9px; color: #555; }
  @page { size: A4 landscape; margin: 12mm; }
}
