/* Team-App – Gestaltung „Spieltag“.
   Vereinsfarben Blau, Gelb, Schwarz/Dunkelbraun. Eine Schriftfamilie (Saira), schmal für Titel und Zahlen.
   Wiedererkennbar: schräger Kopf mit gelbem Streifen (wie eine Kapitänsbinde), Datumskacheln, Punkte pro Kind.
   Keine Stilangaben im HTML (Content-Security-Policy): alles Aussehen steht hier. */

@font-face {
  font-family: "Saira";
  src: url("/static/schrift/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Saira Condensed";
  src: url("/static/schrift/saira-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --blau: #1A1FBF;
  --gelb: #FADE07;
  --schwarz: #2A1206;
  --weiss: #FFFFFF;

  --grund: #FFFFFF;
  --flaeche: #EEF0FB;      /* leicht blau getönt, kein gebrochenes Weiß */
  --flaeche-2: #DFE2F7;
  --linie: #D3D6EE;        /* nur Trennlinien, keine Bedienelemente */
  --text: #2A1206;
  --text-leise: #54453D;
  --rand: #6F6C8C;         /* Ränder von Eingabefeldern: mindestens 3:1 */
  --link: #1A1FBF;
  --akzent: #1A1FBF;       /* aktive Leiste, Zahlen */
  --auf-blau: #FFFFFF;
  --auf-gelb: #2A1206;
  --ja: #0B6B2C;
  --nein: #B3261E;
  --ja-text: #0B6B2C;
  --nein-text: #B3261E;
  --fokus: #1A1FBF;
  --buehne: #2A1206;       /* dunkle Fläche für „als Nächstes“ und Spielstand */
  --buehne-leise: #E8DCD3;

  --schrift: "Saira", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --schrift-eng: "Saira Condensed", "Arial Narrow", "Roboto Condensed", var(--schrift);
  --rund: 12px;
  --schnell: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1C0C04;
    --flaeche: #2D190D;
    --flaeche-2: #3D2416;
    --linie: #4B3122;
    --text: #FFFFFF;
    --text-leise: #E3D6CC;
    --rand: #A3897A;
    --link: #B8BAFF;
    --akzent: #FADE07;
    --ja-text: #8BE3A3;
    --nein-text: #FFB4AB;
    --fokus: #FADE07;
    --buehne: #3D2416;
    --buehne-leise: #E8DCD3;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.5;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--link); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
strong, b { font-weight: 700; }

/* --- Kopf: blau, schräg abgeschnitten, gelber Streifen darunter -------------------------------- */
.kopf {
  background: var(--gelb);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 0 100%);
}
.kopf-blau {
  background: var(--blau);
  color: var(--auf-blau);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 0 calc(100% - 6px));
  padding: env(safe-area-inset-top) 0 40px;
}
.kopf-innen { max-width: 760px; margin: 0 auto; padding: 6px 16px 0; }
.kopf-zeile { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.marke { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap;
         font-weight: 650; font-size: 16px; }
/* Vereinslogo: gelber Ring hebt den schwarzen Außenrand vom Blau ab */
.marke .logo { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gelb); flex: none; }
.kopf a.zurueck { color: var(--auf-blau); text-decoration: none; font-weight: 700; padding: 10px 12px 10px 0;
                  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.kopf a.zurueck span { font-size: 28px; line-height: 0; margin-top: -3px; }
/* Tastatur-Markierung im blauen Kopf gelb, sonst wäre sie blau auf blau unsichtbar */
.kopf a:focus-visible { outline-color: var(--gelb); }
.kopf h1 {
  font-family: var(--schrift-eng); font-weight: 800;
  font-size: clamp(34px, 9.4vw, 48px); line-height: .98; letter-spacing: .005em;
  margin: 4px 0 0; overflow-wrap: anywhere; text-wrap: balance;
}

.inhalt { max-width: 760px; margin: 0 auto; padding: 8px 16px 28px; }
h2 { font-family: var(--schrift-eng); font-weight: 800; font-size: 28px; line-height: 1.05;
     margin: 34px 0 12px; }
h3 { font-size: 19px; line-height: 1.25; margin: 20px 0 8px; font-weight: 700; }
p { margin: 0 0 12px; }
ul, ol { padding-left: 22px; }
/* Namenslisten (Kommen, Kommen nicht …) zweispaltig, damit sie kürzer werden */
h3 + ul { columns: 2 150px; column-gap: 20px; }
h3 + ul li { break-inside: avoid; }
.leise { color: var(--text-leise); }
.klein { font-size: 15px; }
.leer { color: var(--text-leise); }
.nebenlink { margin: 18px 0; }

/* --- Untere Leiste: Symbole, aktiver Bereich mit schrägem gelben Strich ------------------------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex;
        background: var(--grund); border-top: 1px solid var(--linie);
        padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
          min-height: 62px; padding: 9px 2px 7px; color: var(--text-leise); text-decoration: none;
          font-size: 13px; font-weight: 600; }
.tabs .symbol { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9;
                stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current=page] { color: var(--akzent); font-weight: 800; }
.tabs a[aria-current=page] .symbol { stroke-width: 2.4; }
.tabs a[aria-current=page]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 36px; height: 5px;
                                     background: var(--gelb); transform: translateX(-50%) skewX(-28deg); }

/* --- Knöpfe ------------------------------------------------------------------------------------ */
.knopf, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 18px; border-radius: 10px; border: 2px solid var(--blau);
  background: var(--blau); color: var(--auf-blau); font: inherit; font-weight: 700; text-decoration: none;
  cursor: pointer; text-align: center; touch-action: manipulation; line-height: 1.2;
}
.knopf.voll, button.voll { width: 100%; }
.knopf.leise, button.leise { background: transparent; color: var(--link); border-color: currentColor; }
.knopf.gelb, button.gelb { background: var(--gelb); color: var(--auf-gelb); border-color: var(--gelb); }
.knopf.ja, button.ja { background: var(--ja); border-color: var(--ja); color: #fff; --ring: var(--ja); }
.knopf.nein, button.nein { background: var(--nein); border-color: var(--nein); color: #fff; --ring: var(--nein); }
.knopf.gefahr, button.gefahr { background: transparent; color: var(--nein-text); border-color: var(--nein-text); }
button:disabled { opacity: .45; cursor: not-allowed; }
/* Gewählte Antwort mit Zeichen, damit sie nicht nur an der Farbe erkennbar ist */
.kind-antwort button.ja::before, .karte button.ja::before { content: "✓"; }
.kind-antwort button.nein::before, .karte button.nein::before { content: "✗"; }
.knopf-form { display: inline; margin: 0; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.knopfreihe > * { flex: 1 1 140px; }
.knopfreihe .knopf-form > button { width: 100%; }
.knopfreihe.drei { flex-wrap: nowrap; }
.knopfreihe.drei > * { flex: 1 1 0; min-width: 0; }
.knopfreihe.drei > :first-child { flex: 2 1 0; }
.knopfreihe.drei button { padding: 10px 6px; }
.klein-knopf { min-height: 44px; padding: 6px 12px; font-size: 16px; }

/* --- Schnell anlegen (Trainer) ----------------------------------------------------------------- */
.schnell { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
.schnell a { display: flex; flex-direction: column; align-items: center; justify-content: center;
             min-height: 66px; border-radius: var(--rund); background: var(--flaeche); color: var(--text);
             text-decoration: none; font-size: 15px; font-weight: 700; line-height: 1.1; }
.schnell a b { font-family: var(--schrift-eng); font-size: 28px; line-height: .9; color: var(--akzent); }
.schnell a.spiel { background: var(--gelb); color: var(--auf-gelb); }
.schnell a.spiel b { color: var(--auf-gelb); }

/* --- Formulare --------------------------------------------------------------------------------- */
form.block { display: grid; gap: 14px; margin: 12px 0 20px; }
label { display: grid; gap: 6px; font-weight: 650; }
label.zeile { display: flex; align-items: center; gap: 12px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time],
input[type=datetime-local], input[type=number], input[type=url], select, textarea {
  font: inherit; font-size: 17px; font-weight: 500; color: var(--text); background: var(--grund);
  border: 2px solid var(--rand); border-radius: 10px; min-height: 52px; padding: 10px 12px; width: 100%;
  min-width: 0; max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--fokus); outline: 3px solid var(--fokus);
                                            outline-offset: 0; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
textarea { min-height: 96px; }
input[type=checkbox], input[type=radio] { width: 28px; height: 28px; accent-color: var(--blau); flex: none; }
fieldset { border: 2px solid var(--rand); border-radius: var(--rund); padding: 12px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.wochentage { display: flex; flex-wrap: wrap; gap: 8px; }
.wochentage label { display: flex; align-items: center; gap: 6px; border: 2px solid var(--rand);
                    border-radius: 10px; padding: 8px 10px; min-height: 48px; }
.wochentage label:has(input:checked) { border-color: var(--fokus); background: var(--flaeche); }
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.zweispaltig > label { min-width: 0; }
.mailtext { white-space: pre-wrap; font: inherit; font-size: 16px; margin: 0; }

/* --- Hinweise ---------------------------------------------------------------------------------- */
.hinweis { padding: 12px 16px; background: var(--flaeche); border-radius: var(--rund);
           box-shadow: inset 5px 0 0 var(--blau); }
.hinweis-wichtig { background: var(--gelb); color: var(--auf-gelb); box-shadow: inset 5px 0 0 var(--schwarz); }
.hinweis-wichtig a { color: var(--auf-gelb); }
.hinweis-fehler { box-shadow: inset 5px 0 0 var(--nein-text); }
.hinweis-ok { box-shadow: inset 5px 0 0 var(--ja-text); }

/* --- Karten und Listen ------------------------------------------------------------------------- */
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.karte { background: var(--flaeche); border-radius: var(--rund); padding: 14px 16px; }
.karte.abgesagt { opacity: .7; }
.karte > :last-child, .karte p:last-child { margin-bottom: 0; }
/* Karten, die zu einer eigenen Seite führen, bekommen einen Pfeil; die ganze Zeile ist tippbar */
.karte:has(> a.titel:first-child) { position: relative; padding-right: 40px; }
.karte > a.titel:first-child::after { content: "›"; position: absolute; inset: 0; display: flex; align-items: center;
                                      justify-content: flex-end; padding-right: 16px; font-size: 30px; font-weight: 400;
                                      color: var(--akzent); }
.karte > a.titel:first-child ~ * { position: relative; pointer-events: none; }
.karte a.titel { color: var(--text); text-decoration: none; display: block; }
.karte .titel strong { font-size: 20px; line-height: 1.2; }
.kopfzeile { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.kind-antwort { margin-top: 10px; }
.kind-antwort .knopfreihe { margin: 8px 0 4px; flex-wrap: nowrap; gap: 8px; }
.kind-antwort .knopfreihe > * { flex: 1 1 0; min-width: 0; }
.kind-antwort .knopfreihe button { padding: 10px 6px; gap: 6px; font-size: 16px; white-space: nowrap; }
.liste.termine > li { scroll-margin-top: 12px; }
.marker { display: inline-block; background: var(--gelb); color: var(--auf-gelb); font-weight: 700;
          padding: 1px 8px; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.marker.schwarz { background: var(--schwarz); color: var(--weiss); }
@media (prefers-color-scheme: dark) { .marker.schwarz { background: var(--weiss); color: var(--schwarz); } }
.marker.abgesagt { background: var(--nein); color: #fff; }
.status-ja { color: var(--ja-text); font-weight: 700; }
.status-nein { color: var(--nein-text); font-weight: 700; }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 16px; }
dl.daten dt { color: var(--text-leise); font-weight: 600; }
dl.daten dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* --- Termine: Zeilen mit Datumskachel ---------------------------------------------------------- */
.liste.termine { gap: 0; }
.liste.termine > li.termin { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px;
                             background: none; border-radius: 0; padding: 16px 0;
                             border-bottom: 1px solid var(--linie); }
.liste.termine > li.termin:last-child { border-bottom: 0; }
.termin-text { min-width: 0; }
.termin .uhr { font-weight: 700; font-variant-numeric: tabular-nums; }
.termin .ort { color: var(--text-leise); margin: 2px 0 6px; }
.termin .frist { margin: 6px 0 0; }
/* In den Zeilen bleibt die Frist ruhig; Gelb nur im großen Block oben */
.termin:not(.naechster) .frist .marker { background: none; padding: 0; color: var(--text-leise); font-size: 15px; font-weight: 650; }

.datum-kachel { display: flex; flex-direction: column; align-items: center; justify-content: center;
                align-self: start; padding: 7px 0 8px; border-radius: var(--rund); text-decoration: none;
                background: var(--flaeche-2); color: var(--text); line-height: 1.1; }
.datum-kachel .wt, .datum-kachel .mon { font-size: 13px; font-weight: 700; }
.datum-kachel b { font-family: var(--schrift-eng); font-weight: 800; font-size: 34px; line-height: .95;
                  font-variant-numeric: tabular-nums; }
.art-spiel .datum-kachel, .art-turnier .datum-kachel { background: var(--gelb); color: var(--auf-gelb); }
.abgesagt .datum-kachel { background: transparent; box-shadow: inset 0 0 0 2px var(--linie); color: var(--text-leise); }

/* Der nächste Termin steht groß oben – die eine „Bühne“ der App */
.liste.termine > li.termin.naechster {
  grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 4px 0 8px; padding: 18px 18px 16px;
  border: 0; border-radius: 18px; background: var(--buehne); color: #fff;
}
.naechster .datum-kachel { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 10px;
                           padding: 0; background: none; color: var(--gelb); }
.naechster .datum-kachel .wt, .naechster .datum-kachel .mon { font-family: var(--schrift-eng); font-size: 30px;
                                                             font-weight: 800; color: #fff; }
.naechster .datum-kachel b { font-size: 64px; color: var(--gelb); }
.naechster .uhr { font-size: 22px; }
.naechster a.titel { color: #fff; }
.naechster .titel strong { font-size: 24px; }
.naechster .ort, .naechster .leise { color: var(--buehne-leise); }
.naechster a { color: var(--gelb); }
.naechster .marker.schwarz { background: #fff; color: var(--schwarz); }
.naechster .knopf.leise, .naechster button.leise { color: #fff; border-color: #fff; }
.naechster .status-ja { color: #8BE3A3; }
.naechster .status-nein { color: #FFB4AB; }
.naechster .hinweis-wichtig { margin-top: 10px; }

/* Punkte pro Kind (nur Trainer): grün kommt, rot kommt nicht, leer offen */
.zaehler { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; }
.punkte { display: flex; flex-wrap: wrap; gap: 3px; }
.punkte i { width: 7px; height: 16px; border-radius: 2px; transform: skewX(-14deg); background: var(--linie); }
.punkte i.p-ja { background: var(--ja-text); }
.punkte i.p-nein { background: var(--nein-text); }
.punkte i.p-offen { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rand); }
.naechster .punkte i.p-ja { background: #8BE3A3; }
.naechster .punkte i.p-nein { background: #FFB4AB; }
.naechster .punkte i.p-offen { box-shadow: inset 0 0 0 1.5px var(--buehne-leise); }

/* Termin-Seite: Datum und Anpfiff groß */
.termin-kopf { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
.termin-kopf p { margin: 0 0 4px; }
.datum-kachel.gross { width: 84px; flex: none; }
.datum-kachel.gross b { font-size: 46px; }
.uhr.gross { font-family: var(--schrift-eng); font-weight: 800; font-size: 44px; line-height: 1;
             font-variant-numeric: tabular-nums; }
.uhr.gross span { font-family: var(--schrift); font-size: 17px; font-weight: 600; color: var(--text-leise); }

/* --- Zahlenfelder (Antworten, Aufstellung, Statistik) ------------------------------------------ */
.tafel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.tafel div { text-align: center; padding: 12px 4px 10px; background: var(--flaeche); border-radius: var(--rund); }
.tafel b { display: block; font-family: var(--schrift-eng); font-weight: 800; font-size: 46px; line-height: 1;
           font-variant-numeric: tabular-nums; color: var(--akzent); }
.tafel .t-ja b { color: var(--ja-text); }
.tafel .t-nein b { color: var(--nein-text); }
.tafel span { display: block; margin-top: 4px; font-size: 14px; font-weight: 650; color: var(--text-leise); }
.tafel.tafel-mehr { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Spielstand: dunkle Anzeige mit gelben Ziffern */
.tafel.spielstand, .tafel.live-stand { gap: 0; background: var(--buehne); border-radius: 18px; padding: 6px 0; }
.tafel.spielstand div, .tafel.live-stand div { background: none; }
.tafel.spielstand b, .tafel.live-stand b { color: var(--gelb); font-size: 60px; }
.tafel.spielstand span, .tafel.live-stand span { color: var(--buehne-leise); }

/* Saisonbericht */
.bericht { margin-bottom: 32px; }
table.raster.bericht-tabelle td, table.raster.bericht-tabelle th { white-space: normal; padding: 6px 4px; }
table.raster.bericht-tabelle { font-size: 15px; }

/* Aufklappbare Anleitungen */
details.anleitung { background: var(--flaeche); border-radius: var(--rund); padding: 0 14px; margin: 10px 0; }
details.anleitung summary { font-weight: 700; padding: 13px 0; min-height: 48px; cursor: pointer; }
details.anleitung ol { margin: 0 0 12px; padding-left: 22px; }
details.anleitung li { margin-bottom: 6px; }

/* Verbindungen Trainer–Kind */
ul.verbindungen { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
li.verbindung { align-items: center; }

/* --- Tabellen ---------------------------------------------------------------------------------- */
.rollbar { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--linie);
           border-radius: var(--rund); }
table.raster { border-collapse: collapse; min-width: 100%; font-size: 16px; font-variant-numeric: tabular-nums; }
table.raster th, table.raster td { padding: 9px 8px; border-bottom: 1px solid var(--linie); text-align: center;
                                   white-space: nowrap; }
table.raster th:first-child, table.raster td:first-child { text-align: left; position: sticky; left: 0;
                                                            background: var(--grund); z-index: 1; }
table.raster thead th, table.raster thead th:first-child { background: var(--schwarz); color: #fff;
                                                           font-weight: 700; border-bottom: 0; }
@media (prefers-color-scheme: dark) {
  table.raster thead th, table.raster thead th:first-child { background: var(--flaeche-2); }
}
table.raster thead a { color: inherit; text-decoration: none; }
td.z-ja { background: var(--ja); color: #fff; font-weight: 700; }
td.z-nein { background: var(--nein); color: #fff; font-weight: 700; }
td.z-offen { color: var(--text-leise); }

.link-kopie { display: grid; gap: 8px; }
.link-kopie input { font-size: 15px; }
.trenner { border: 0; border-top: 1px solid var(--linie); margin: 26px 0; }

/* --- Live-Eingabe: sehr große Flächen für den Daumen, auch in der Sonne ------------------------ */
[hidden] { display: none !important; }
.tafel.live-stand b { font-size: 76px; }
.live-haupt { display: grid; gap: 12px; margin: 12px 0; }
.live-gross { min-height: 104px; width: 100%; border-radius: 16px; font-family: var(--schrift-eng);
              font-weight: 800; font-size: 34px; }
.live-gross.tor { background: var(--gelb); color: var(--auf-gelb); border-color: var(--gelb); }
.live-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.live-kind { min-height: 72px; width: 100%; border-radius: 14px; background: var(--flaeche); color: var(--text);
             border: 2px solid var(--blau); font-family: var(--schrift-eng); font-weight: 800; font-size: 26px; }
@media (prefers-color-scheme: dark) { .live-kind { border-color: var(--gelb); } }
.live-auswahl { display: grid; gap: 10px; }
.live-auswahl h2 { margin-top: 8px; }
.live-verlauf { padding-left: 0; list-style: none; font-variant-numeric: tabular-nums; }
.live-verlauf li { padding: 9px 0; border-bottom: 1px solid var(--linie); }
.live-verlauf li.storniert { text-decoration: line-through; color: var(--text-leise); }

/* --- Live: laufendes Spiel (rot mit weißem Punkt) ------------------------------------------------- */
.marker.live, .knopf.live { background: var(--nein); color: #fff; border-color: var(--nein); }
a.marker { text-decoration: none; }
.marker.live::before, .knopf.live::before { content: ""; display: inline-block; width: 8px; height: 8px;
                                            margin: 0 7px 1px 0; border-radius: 50%; background: #fff;
                                            vertical-align: middle; }
.marker.live { font-size: 15px; padding: 3px 10px; }
.live-zeile { margin: 0 0 8px; }

/* Live-Eingabe: vor dem Anpfiff steht „Anpfiff“ groß ganz oben; danach rückt der Phasen-Knopf
   unter „Gegentor“ und wird kleiner, damit „TOR für uns“ oben bleibt und nichts versehentlich getippt wird */
.live-phase { display: grid; gap: 10px; order: 3; }
.live-phase .live-gross { min-height: 68px; font-size: 26px; }
.live-haupt > #knopf-tor { order: 1; }
.live-haupt > #knopf-gegentor { order: 2; }
.live-haupt > #knopf-zurueck { order: 4; }
.live-haupt:has(#knopf-phase[data-phase="anpfiff"]:not([hidden])) > .live-phase { order: 0; }
.live-haupt:has(#knopf-phase[data-phase="anpfiff"]:not([hidden])) .live-gross { min-height: 104px; font-size: 34px; }
.live-phase .hinweis { margin: 0; font-weight: 700; }
/* Nach dem Abpfiff: Endstand oben, Tor-Knöpfe kleiner (bleiben für Korrekturen da) */
.live-haupt:has(#phase-text:not([hidden])) > .live-phase { order: 0; }
.live-haupt:has(#phase-text:not([hidden])) > .live-gross { min-height: 64px; font-size: 24px; }
.live-phase .hinweis { font-family: var(--schrift-eng); font-weight: 800; font-size: 24px; }

/* Ticker: Uhrzeit links, Tore hervorgehoben, Spielphasen als Zwischenzeilen */
.marker#ticker-status { margin: 0 0 12px; }
#ticker-verlauf li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: baseline; }
#ticker-verlauf li > span { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-verlauf li.tor { font-weight: 700; box-shadow: inset 4px 0 0 var(--gelb); padding-left: 12px; }
.live-verlauf li.gegentor { box-shadow: inset 4px 0 0 var(--nein-text); padding-left: 12px; }
.live-verlauf li.anpfiff, .live-verlauf li.halbzeit, .live-verlauf li.anpfiff_2, .live-verlauf li.abpfiff {
  font-family: var(--schrift-eng); font-weight: 800; font-size: 20px; background: var(--flaeche);
  border-bottom: 0; border-radius: 10px; margin: 6px 0; padding: 8px 12px; }
#ticker-verlauf li.anpfiff > span, #ticker-verlauf li.halbzeit > span, #ticker-verlauf li.anpfiff_2 > span,
#ticker-verlauf li.abpfiff > span { font-family: var(--schrift); }
.live-verlauf li.storniert { box-shadow: none; font-weight: 450; background: none; }

/* „Mehr“: Ticker-Auswahl untereinander, weil die Texte lang sind */
#ticker-einstellung .wochentage { display: grid; }

/* --- PC-Ansicht (ab 1100 px Breite) ------------------------------------------------------------
   Dieselbe Gestaltung „Spieltag“, nur breiter: Das Menü wandert von unten in den blauen Kopf, der Inhalt
   nutzt bis zu 1320 px, Arbeitsseiten stehen in zwei Spalten. Welche Seite wie aufgebaut ist, sagt die Klasse
   „ansicht-…“ an <main>. Unter 1100 px gilt unverändert die Handyansicht oben. */
/* „Schließen“ oben rechts in der Tafel mit dem geöffneten Termin: groß genug für Maus und Finger,
   gleiche Form wie die hellen Knöpfe, Tastatur-Markierung wie überall (blau, dunkel gelb) */
a.termin-schliessen { float: right; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
                      margin: 18px 0 8px 16px; padding: 6px 14px; border: 2px solid currentColor; border-radius: 10px;
                      color: var(--link); font-weight: 700; text-decoration: none; }
a.termin-schliessen::before { content: "✕"; font-size: 15px; }
a.termin-schliessen + h2 { overflow-wrap: anywhere; }

/* Links, die es doppelt gibt: am Handy zur Termin-Seite, am PC zum Termin neben der Liste */
@media (max-width: 1099.98px) { .nur-pc { display: none !important; } }

@media (min-width: 1100px) {
  .nur-handy { display: none !important; }
  body { padding-bottom: 0; }
  .kopf-innen, .inhalt { max-width: 1400px; padding-left: 40px; padding-right: 40px; }
  .kopf-blau { padding-bottom: 50px; }
  .kopf-zeile { display: grid; justify-items: start; gap: 0; min-height: 0; }
  .marke { order: -1; margin-left: 0; height: 76px; font-size: 18px; }
  .marke .logo { width: 42px; height: 42px; }
  .kopf a.zurueck { padding: 0 0 2px; }
  .kopf h1 { font-size: clamp(48px, 4.4vw, 66px); margin-top: 6px; max-width: 24ch; }

  /* Menü oben rechts im Kopf, auf einer Höhe mit dem Vereinsnamen */
  .tabs { position: absolute; top: calc(env(safe-area-inset-top) + 6px); bottom: auto; left: auto;
          right: max(40px, calc(50% - 660px)); height: 76px; align-items: center; gap: 2px;
          background: none; border: 0; padding: 0; }
  .tabs a { flex: none; flex-direction: row; gap: 8px; min-height: 46px; padding: 8px 14px;
            border-radius: 10px; color: var(--auf-blau); font-size: 16px; font-weight: 650; }
  .tabs .symbol { width: 22px; height: 22px; }
  .tabs a[aria-current=page] { color: var(--gelb); }
  .tabs a[aria-current=page]::before { top: auto; bottom: 1px; }
  .tabs a:focus-visible { outline-color: var(--gelb); outline-offset: 0; }

  .inhalt { padding-top: 22px; padding-bottom: 72px; }
  /* Seiten ohne eigenen PC-Aufbau: eine gut lesbare Spalte, bündig mit dem Titel */
  .inhalt:not([class*="ansicht-"]) > * { max-width: 760px; }
  .inhalt:not([class*="ansicht-"]) > .knopf-form { display: block; }

  /* Einzelne Knöpfe und Absende-Knöpfe nicht über die ganze Breite ziehen */
  .inhalt p > .knopf.voll:only-child { width: auto; min-width: min(100%, 340px); }
  :not(.karte) > form.block > button.voll:last-child:not(.live-gross) { justify-self: start; width: auto;
                                                                        min-width: min(100%, 340px); }
  /* Formulare mit nur einem Feld: Feld und Knopf in einer Zeile */
  form.block:has(> label:only-of-type):not(:has(> fieldset, > .zweispaltig, textarea, > button ~ button)) {
    grid-template-columns: minmax(0, 1fr) auto; align-items: end; max-width: 640px; }
  form.block:has(> label:only-of-type):not(:has(> fieldset, > .zweispaltig, textarea, > button ~ button)) > button { width: auto; }

  /* Zwei Spalten: Hauptteil links, ein Bereich „neben“ rechts (Termin, Kinder, Abwesenheit, Ticker) */
  .ansicht-neben, .ansicht-kinder, .ansicht-ticker {
    display: grid; grid-template-columns: var(--links, minmax(0, 1fr)) var(--rechts, minmax(0, 460px));
    grid-template-rows: repeat(7, auto) 1fr; column-gap: clamp(36px, 4vw, 64px); align-items: start; }
  :is(.ansicht-neben, .ansicht-kinder, .ansicht-ticker) > * { grid-column: 1; }
  :is(.ansicht-neben, .ansicht-kinder, .ansicht-ticker) > .neben { grid-column: 2; grid-row: 1 / -1; }
  :is(.ansicht-neben, .ansicht-kinder, .ansicht-ticker) > .marker { justify-self: start; }
  .neben > h2:first-child { margin-top: 0; }
  .neben > .karte + p { margin-top: 12px; }
  .ansicht-neben .neben .tafel { margin-top: 0; }

  /* Zwei Spalten: ein langer Bereich „stamm“ links, Formulare rechts, „ganz“ darunter über die volle Breite */
  .ansicht-stamm, .ansicht-aufstellung {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(7, auto) 1fr;
    grid-auto-flow: row dense; column-gap: clamp(36px, 4vw, 64px); align-items: start; }
  :is(.ansicht-stamm, .ansicht-aufstellung) > * { grid-column: 2; }
  :is(.ansicht-stamm, .ansicht-aufstellung) > .stamm { grid-column: 1; grid-row: 1 / -1; }
  :is(.ansicht-stamm, .ansicht-aufstellung) > .ganz { grid-column: 1 / -1; }
  .verbindungen-bereich > .liste { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  /* Karten mit einem Knopf (Trainer entfernen, Elternteil lösen): Knopf rechts statt darunter */
  .stamm .karte:has(> .knopf-form) { display: grid; grid-template-columns: minmax(0, 1fr) auto;
                                     column-gap: 20px; align-items: center; }
  .stamm .karte:has(> .knopf-form) > * { grid-column: 1; }
  .stamm .karte:has(> .knopf-form) > .knopf-form { grid-column: 2; grid-row: 1 / span 3; }

  /* Termine: Liste links, „Neu anlegen“ und Links rechts */
  .ansicht-termine { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 21vw, 300px);
                     grid-template-rows: auto auto auto 1fr; column-gap: clamp(36px, 4vw, 64px); align-items: start; }
  .ansicht-termine > * { grid-column: 2; }
  .ansicht-termine > :is(.termine, .leer, .hinweis) { grid-column: 1; grid-row: 1 / -1; }
  .ansicht-termine .schnell { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
  .ansicht-termine .schnell a { min-height: 84px; font-size: 16px; }
  .ansicht-termine > .nebenlink { margin: 18px 0 0; }

  /* Terminzeile: links Datum und Angaben, rechts Antwort-Knöpfe und Zahlen */
  .liste.termine > li.termin { grid-template-columns: 76px minmax(0, 1fr); gap: 22px; padding: 20px 0; }
  .termin-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); column-gap: 36px;
                 align-items: start; }
  .termin-aktion > .kind-antwort:first-child { margin-top: 0; }
  .termin-aktion > .zaehler:first-child { margin-top: 6px; }
  .datum-kachel b { font-size: 38px; }
  .liste.termine > li.termin.naechster { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 26px 28px 24px;
                                         margin-bottom: 12px; }
  .naechster .datum-kachel b { font-size: 76px; }
  .naechster .termin-text { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }

  /* Termin anlegen und ändern: Felder in zwei Spalten, Hinweis rechts daneben */
  .ansicht-formular { display: grid; grid-template-columns: minmax(0, 880px) minmax(0, 1fr);
                      column-gap: clamp(36px, 4vw, 64px); align-items: start; }
  .ansicht-formular > form { grid-column: 1; grid-row: 1; margin-top: 4px; }
  .ansicht-formular > p { grid-column: 2; grid-row: 1; max-width: 360px; margin-top: 4px; padding-left: 16px;
                          border-left: 4px solid var(--gelb); }
  .ansicht-formular form.block { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
  .ansicht-formular form.block > :is(label:has(textarea), fieldset:has(input[name=wochentage]), button) {
    grid-column: 1 / -1; }

  /* Aufstellung: oben Zahlen und Kaderstärke, links Zusagen (Reserve), rechts die Aufstellung */
  .ansicht-aufstellung > .oben { grid-column: 1 / -1; grid-row: 1; display: grid;
                                 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(36px, 4vw, 64px);
                                 align-items: end; }
  .ansicht-aufstellung > .oben > * { grid-column: 1 / -1; }
  .ansicht-aufstellung > .oben > .tafel { grid-column: 1; margin-bottom: 0; max-width: 560px; }
  .ansicht-aufstellung > .oben > form { grid-column: 2; margin: 0; }
  .ansicht-aufstellung > .stamm { grid-row: 2 / -1; }
  .ansicht-aufstellung > .veroeffentlichen { margin-top: 18px; }

  /* Anwesenheit: alle Kinder auf einen Blick */
  .ansicht-anwesenheit form .liste { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

  /* Kinder: Karten im Raster, „Kind anlegen“ rechts */
  .ansicht-kinder { --rechts: minmax(0, 400px); }
  .ansicht-kinder > .liste { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

  /* Live-Ticker: Spielstand groß links, Verlauf rechts */
  .ansicht-ticker { --links: minmax(0, 500px); --rechts: minmax(0, 1fr); }
  .ansicht-ticker .tafel.live-stand { margin-top: 4px; }
  .ansicht-ticker .tafel.live-stand b { font-size: 112px; }

  /* Statistik eines Kindes: alle Zahlen in einer Reihe */
  .ansicht-breit .tafel.tafel-mehr { grid-template-columns: repeat(7, minmax(0, 1fr)); }

  /* Termin neben der Liste (/?termin=…): Liste links schmaler, Termin rechts als mitlaufende Tafel.
     Die Tafel hat einen gelben Streifen oben wie der Kopf und rollt für sich, wenn sie länger als der Bildschirm ist. */
  .ansicht-termine:has(> .termin-offen) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
                                           grid-template-rows: auto auto auto auto 1fr; }
  .ansicht-termine:has(> .termin-offen) > * { grid-column: 1; }
  .ansicht-termine:has(> .termin-offen) > :is(.termine, .leer, .hinweis) { grid-row: auto; }
  .ansicht-termine:has(> .termin-offen) > .nebenlink { margin: 14px 0 0; }
  .ansicht-termine:has(> .termin-offen) > .nebenlink:first-child { margin-top: 0; }
  .ansicht-termine:has(> .termin-offen) .schnell { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 4px; }
  .ansicht-termine:has(> .termin-offen) .schnell a { min-height: 66px; }
  .ansicht-termine > .termin-offen {
    grid-column: 2; grid-row: 1 / -1; align-self: start; position: sticky; top: 16px;
    max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 28px 20px; border: 2px solid var(--linie); border-radius: 18px; background: var(--grund);
    box-shadow: inset 0 6px 0 var(--gelb); }
  /* In der schmaleren Liste stehen Angaben und Antworten wieder untereinander */
  .ansicht-termine:has(> .termin-offen) .termin-text { display: block; }
  .ansicht-termine:has(> .termin-offen) .termin-aktion > .kind-antwort:first-child { margin-top: 10px; }
  .ansicht-termine:has(> .termin-offen) .liste.termine > li.termin:not(.naechster) {
    padding: 16px 14px; border-radius: var(--rund); border-bottom-color: transparent;
    box-shadow: 0 1px 0 var(--linie); }
  /* Der geöffnete Termin ist in der Liste markiert */
  .ansicht-termine:has(> .termin-offen) .liste.termine > li.termin.offen:not(.naechster) {
    background: var(--flaeche); box-shadow: inset 5px 0 0 var(--gelb); }
  .liste.termine > li.termin.naechster.offen { outline: 4px solid var(--gelb); outline-offset: 3px; }
  .karte a.titel[aria-current] strong { text-decoration: underline; text-decoration-thickness: 3px;
                                        text-decoration-color: var(--gelb); text-underline-offset: 4px; }
  /* Überschriften in der Tafel sind eine Stufe tiefer, sehen aber aus wie auf der Termin-Seite */
  .termin-offen > h2 { margin: 22px 0 14px; font-size: 34px; text-wrap: balance; }
  .termin-offen h3 { font-family: var(--schrift-eng); font-weight: 800; font-size: 26px; line-height: 1.05;
                     margin: 30px 0 12px; }
  .termin-offen h4 { font-size: 18px; line-height: 1.25; margin: 18px 0 6px; }
  .termin-offen h4 + ul { columns: 2 150px; column-gap: 20px; }
  .termin-offen h4 + ul li { break-inside: avoid; }
  .termin-offen .neben > h3:first-child { margin-top: 30px; }
  .termin-offen > .nebenlink { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--linie); }

  /* Mit der Maus: zeigen, was anklickbar ist */
  @media (hover: hover) {
    .tabs a:hover { background: rgba(255, 255, 255, .14); }
    .karte a.titel:hover strong { text-decoration: underline; text-decoration-thickness: 2px;
                                  text-underline-offset: 3px; }
    .knopf:hover, button:hover { filter: brightness(1.12); }
    .knopf.leise:hover, button.leise:hover, .knopf.gefahr:hover, button.gefahr:hover { filter: none;
                                                                                         background: var(--flaeche); }
    .naechster .knopf.leise:hover, .naechster button.leise:hover { background: rgba(255, 255, 255, .12); }
    .schnell a:hover { background: var(--flaeche-2); }
    a.termin-schliessen:hover { background: var(--flaeche); }
    .schnell a.spiel:hover { background: var(--gelb); filter: brightness(1.06); }
    .datum-kachel:hover { filter: brightness(.95); }
    table.raster tbody tr:hover > :not(.z-ja):not(.z-nein) { background: var(--flaeche); }
  }
}

/* --- Bewegung ----------------------------------------------------------------------------------
   Kurz (unter 0,4 s), nur Durchsichtigkeit und Verschiebung, blockiert nie eine Eingabe.
   Wer am Handy „Bewegung reduzieren“ eingestellt hat, bekommt nichts davon. */
@media (prefers-reduced-motion: no-preference) {
  .knopf, button, .schnell a, .tabs a, .datum-kachel, .wochentage label {
    transition: transform .09s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  }
  .knopf:active, button:active, .schnell a:active, .datum-kachel:active, .wochentage label:active {
    transform: scale(.96);
  }
  .tabs a:active .symbol { transform: scale(.88); }
  .tabs .symbol { transition: transform .09s ease; }
  .tabs a[aria-current=page]::before { animation: streifen .35s var(--schnell) both; }

  .kopf h1 { animation: titel .38s var(--schnell) both; }
  .inhalt > :not(.termine) { animation: herein .32s var(--schnell) both; }
  .inhalt > :nth-child(2) { animation-delay: .04s; }
  .inhalt > :nth-child(3) { animation-delay: .08s; }
  .inhalt > :nth-child(4) { animation-delay: .12s; }
  .inhalt > :nth-child(n+5) { animation-delay: .16s; }
  .liste.termine > li { animation: herein .34s var(--schnell) both; }
  .liste.termine > li:nth-child(2) { animation-delay: .07s; }
  .liste.termine > li:nth-child(3) { animation-delay: .11s; }
  .liste.termine > li:nth-child(4) { animation-delay: .15s; }
  .liste.termine > li:nth-child(n+5) { animation-delay: .19s; }
  .naechster .datum-kachel b { animation: tor .5s .1s var(--schnell) both; }
  .punkte i { animation: punkt .3s var(--schnell) both; animation-delay: .18s; }

  /* Gerade gegebene Antwort: Knopf springt kurz, ein Ring läuft nach außen */
  button.frisch { animation: bestaetigt .5s var(--schnell) both; }
  button.sendet { transform: scale(.96); opacity: .85; }
  .tafel b.neu { animation: tor .45s var(--schnell) both; }
  .marker.live::before, .knopf.live::before { animation: puls 1.6s ease-in-out infinite; }
}
@keyframes puls { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes herein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes titel { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes streifen { from { width: 0; } to { width: 36px; } }
@keyframes tor { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; }
                 100% { transform: none; } }
@keyframes punkt { from { opacity: 0; transform: skewX(-14deg) translateY(6px); }
                   to { opacity: 1; transform: skewX(-14deg); } }
@keyframes bestaetigt {
  0% { transform: scale(.94); box-shadow: 0 0 0 0 var(--ring, var(--blau)); }
  45% { transform: scale(1.04); }
  100% { transform: none; box-shadow: 0 0 0 12px transparent; }
}

@media print {
  .kopf, .tabs, .nicht-drucken { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .inhalt > * { animation: none !important; }
  .bericht { break-after: page; }
  .rollbar { overflow: visible; border: 0; }
  .bericht-tabelle thead th { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  table.raster th:first-child, table.raster td:first-child { background: #fff; position: static; }
  dl.daten dt, dl.daten dd, .bericht h2 { color: #000; }
}
