/* VidiFox - gemeinsamer Stil (oeffentliche Seiten und Verwaltung) */
:root {
  --fuchs: #e8641b;
  --fuchs-dunkel: #c24f10;
  --fuchs-hell: #fde7d8;
  --nacht: #13233a;
  --grund: #faf7f2;
  --flaeche: #ffffff;
  --flaeche-2: #f2ede6;
  --text: #1b2430;
  --text-leise: #5d6875;
  --linie: #e3ddd4;
  --gut: #1f8a4c;
  --gut-hell: #dff3e7;
  --fehler: #c0392b;
  --fehler-hell: #fbe4e1;
  --schatten: 0 1px 2px rgba(19, 35, 58, 0.06), 0 4px 16px rgba(19, 35, 58, 0.06);
  --rund: 14px;
  --rund-klein: 9px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fuchs: #ff7a2e;
    --fuchs-dunkel: #ff9452;
    --fuchs-hell: #3a2316;
    --nacht: #0b1522;
    --grund: #0f1823;
    --flaeche: #172331;
    --flaeche-2: #1e2c3c;
    --text: #e9eef4;
    --text-leise: #9aa7b5;
    --linie: #2a3a4c;
    --gut: #46c27a;
    --gut-hell: #173526;
    --fehler: #ff6b5b;
    --fehler-hell: #3a1d1a;
    --schatten: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--fuchs-dunkel); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
.leise { color: var(--text-leise); }
.klein { font-size: 0.88rem; }
[hidden] { display: none !important; }

.seite { max-width: 980px; margin: 0 auto; padding: 0 16px 48px; }

/* Kopf */
.kopfleiste {
  background: var(--nacht);
  color: #fff;
}
.kopfleiste .seite { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: 0.01em; }
.marke img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #fff; }
.marke span b { color: var(--fuchs); }
.kopfleiste .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Karten */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: 16px;
  margin: 12px 0;
}
.karte.leer { text-align: center; color: var(--text-leise); }
.raster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Knoepfe */
.knopf {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--fuchs);
  color: #fff;
  font: inherit;
  font-weight: 650;
  padding: 9px 16px;
  min-height: 42px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.knopf:hover { background: var(--fuchs-dunkel); }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopf.zweit { background: transparent; color: var(--text); border-color: var(--linie); }
.knopf.zweit:hover { background: var(--flaeche-2); }
.knopf.gefahr { background: transparent; color: var(--fehler); border-color: var(--fehler); }
.knopf.klein { min-height: 34px; padding: 5px 12px; font-size: 0.9rem; }
.kopfleiste .knopf.zweit { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.kopfleiste .knopf.zweit:hover { background: rgba(255, 255, 255, 0.1); }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }

/* Knopfreihe statt Dropdown (Auswahl) */
.wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.wahl button {
  appearance: none;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 13px;
  min-height: 38px;
  cursor: pointer;
}
.wahl button[aria-pressed="true"] { background: var(--fuchs); border-color: var(--fuchs); color: #fff; font-weight: 650; }

/* Reiter */
.reiter { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--linie); margin: 8px 0 16px; scrollbar-width: none; }
.reiter button {
  appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text-leise);
  padding: 10px 12px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
}
.reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--fuchs); }

/* Formulare */
label.feld { display: block; margin: 0 0 12px; }
label.feld > span, .feldname { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"],
input[type="number"], input[type="url"], input[type="tel"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  padding: 9px 11px;
  min-height: 42px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--fuchs); outline-offset: 1px; }
.zweispaltig { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .zweispaltig { grid-template-columns: 1fr 1fr; } }
.hinweis { font-size: 0.88rem; color: var(--text-leise); margin-top: 4px; }

/* Meldungen */
.meldung { border-radius: var(--rund-klein); padding: 10px 12px; margin: 10px 0; }
.meldung.fehler { background: var(--fehler-hell); color: var(--fehler); }
.meldung.gut { background: var(--gut-hell); color: var(--gut); }
.meldung.hinweis { background: var(--fuchs-hell); color: var(--text); }

/* Abzeichen */
.abzeichen { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--flaeche-2); color: var(--text-leise); }
.abzeichen.live { background: var(--gut-hell); color: var(--gut); }
.abzeichen.entwurf { background: var(--fuchs-hell); color: var(--fuchs-dunkel); }

/* Listen in der Verwaltung */
.zeile { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); }
.zeile:first-child { border-top: 0; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .haupt b { display: block; overflow: hidden; text-overflow: ellipsis; }
.zeile .bild-klein { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--linie); }

/* Oeffentliche Seite */
.held {
  background: linear-gradient(135deg, var(--nacht), #1d3557);
  color: #fff;
  padding: 28px 0 22px;
}
.held .seite { display: flex; gap: 18px; align-items: center; padding-bottom: 0; }
.held .logo { width: 84px; height: 84px; border-radius: 18px; background: #fff; object-fit: contain; flex: none; }
.held h1 { font-size: 1.8rem; margin: 0 0 4px; }
.held .meta { opacity: 0.85; }
.sprungleiste { position: sticky; top: 0; z-index: 5; background: var(--grund); border-bottom: 1px solid var(--linie); }
.sprungleiste .seite { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.sprungleiste a {
  text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 999px; padding: 6px 13px; white-space: nowrap; font-weight: 600; font-size: 0.92rem;
}
section.block { padding-top: 18px; scroll-margin-top: 56px; }
.tagkopf { margin: 18px 0 6px; color: var(--text-leise); font-weight: 700; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.05em; }
.turnier { display: flex; gap: 14px; align-items: flex-start; }
.turnier .alter {
  flex: none; min-width: 64px; text-align: center; font-weight: 850; font-size: 1.3rem; color: var(--fuchs-dunkel);
  background: var(--fuchs-hell); border-radius: 12px; padding: 10px 8px;
}
.turnier .daten { flex: 1; min-width: 0; }
.speise { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--linie); }
.speise:last-child { border-bottom: 0; }
.sponsoren { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.sponsor {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: #fff; color: #1b2430; border: 1px solid var(--linie); border-radius: var(--rund); padding: 14px; min-height: 110px; text-decoration: none;
}
.sponsor img { max-height: 64px; object-fit: contain; }
.textblock { white-space: pre-line; }
.fuss { margin-top: 40px; padding: 22px 0; border-top: 1px solid var(--linie); }
.fuss .seite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 0; }
.fuss img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #fff; }

input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--fuchs); flex: none; }

/* Fuellstand (Helfer) */
.fuellung { height: 8px; border-radius: 99px; background: var(--flaeche-2); overflow: hidden; margin: 6px 0; }
.fuellung > div { height: 100%; border-radius: 99px; }
.fuellung .rot { background: var(--fehler); }
.fuellung .gelb { background: #e0a800; }
.fuellung .gruen { background: var(--gut); }

/* QR */
svg.qr { width: 160px; height: 160px; background: #fff; border-radius: 8px; }

/* Spielplan (Verwaltung, Team-Link, Elternseite) */
.gruppenraster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 6px; }
.teamknopf {
  display: block; width: 100%; text-align: left; appearance: none; font: inherit; font-size: 0.92rem; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund-klein); padding: 6px 10px; margin: 4px 0; cursor: pointer;
}
.teamknopf.quelle { border-style: dashed; color: var(--text-leise); }
.teamknopf.gewaehlt, .spielzelle.gewaehlt { outline: 3px solid var(--fuchs); outline-offset: 0; }
.teamknopf.konflikt, .spielzelle.konflikt { border-color: var(--fehler); background: var(--fehler-hell); }
.planraster { overflow-x: auto; margin: 4px -4px 0; }
.planraster table { border-collapse: separate; border-spacing: 4px; }
.planraster th { font-size: 0.8rem; color: var(--text-leise); text-align: left; padding: 2px 4px; white-space: nowrap; vertical-align: top; }
.planraster td { vertical-align: top; min-width: 170px; }
.spielzelle {
  display: flex; flex-direction: column; gap: 1px; width: 100%; min-height: 54px; text-align: left; appearance: none; font: inherit;
  font-size: 0.86rem; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund-klein);
  padding: 6px 8px; cursor: pointer;
}
.spielzelle .nr { font-size: 0.75rem; font-weight: 700; color: var(--text-leise); }
.spielzelle .schiri { font-size: 0.75rem; color: var(--text-leise); }
.spielzelle.ko { background: var(--fuchs-hell); }
.spielzelle.hinweis { border-color: #e0a800; }
.spielzelle.frei { border-style: dashed; background: transparent; color: var(--fuchs-dunkel); justify-content: center; align-items: center; }
.spielzelle.frei:disabled { cursor: default; color: transparent; }
.spielliste { margin: 0; }
.spielzeile { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--linie); }
.spielzeile .ergebnis { font-weight: 800; font-size: 1.05rem; white-space: nowrap; text-align: right; }
.spielzeile .geplant { font-size: 0.75rem; font-weight: 400; color: var(--text-leise); text-decoration: line-through; }
.spielzeile:first-child { border-top: 0; }
.spielzeile .zeit { font-weight: 750; }
.spielzeile .wo { font-size: 0.82rem; color: var(--text-leise); }
.spielzeile.meins { background: var(--fuchs-hell); border-radius: var(--rund-klein); border-top-color: transparent; }
.stern { appearance: none; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text-leise); border-radius: 999px;
  font: inherit; font-size: 0.85rem; padding: 3px 10px; cursor: pointer; min-height: 32px; }
.stern[aria-pressed="true"] { background: var(--fuchs); border-color: var(--fuchs); color: #fff; }
details.aufklapp > summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
@media (max-width: 480px) {
  .planraster td { min-width: 124px; }
  .planraster table { border-spacing: 3px; }
  .spielzelle { font-size: 0.8rem; padding: 5px 6px; }
}

/* Turniertag: Tabellen, Ergebnisse, Fragen */
.tabellenrahmen { overflow-x: auto; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.kennzahl { padding: 12px 14px; }
.kennzahl .zahl { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.turnstile { min-height: 65px; margin: 4px 0 12px; }
table.tabelle { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 4px 0 8px; }
table.tabelle th, table.tabelle td { padding: 5px 6px; border-bottom: 1px solid var(--linie); text-align: left; }
table.tabelle th { font-size: 0.78rem; color: var(--text-leise); font-weight: 650; }
table.tabelle .zahl { text-align: right; white-space: nowrap; width: 1%; }
table.tabelle .punkte { font-weight: 800; }
table.tabelle tr.meins td { background: var(--fuchs-hell); font-weight: 650; }
.ergebniszeile { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--linie); }
.ergebniszeile:first-of-type { border-top: 0; }
.ergebniszeile.strittig { background: var(--fehler-hell); border-radius: var(--rund-klein); }
.ergebniszeile .zeit { font-weight: 750; }
.ergebniszeile .eingabe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
input.torfeld { width: 3.4em; min-width: 0; text-align: center; padding: 6px 4px; min-height: 38px; }
.verlauf { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.blase { max-width: 85%; background: var(--flaeche-2); border-radius: 14px 14px 14px 4px; padding: 7px 11px; align-self: flex-start; }
.blase.eigen { align-self: flex-end; background: var(--fuchs-hell); border-radius: 14px 14px 4px 14px; }
.blase.dringend { outline: 2px solid var(--fehler); }
.blase .wann { font-size: 0.75rem; color: var(--text-leise); margin-top: 2px; }
.durchsage { border-left: 4px solid var(--fuchs); background: var(--fuchs-hell); border-radius: var(--rund-klein); padding: 8px 12px; margin: 8px 0; }
.durchsage .wann { font-size: 0.75rem; color: var(--text-leise); }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fehler); margin-right: 6px; animation: puls 1.4s infinite; }
@keyframes puls { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } }
.eigenes-spiel { border-top: 1px solid var(--linie); padding-bottom: 8px; }
.eigenes-spiel:first-of-type { border-top: 0; }
.eigenes-spiel .spielzeile { border-top: 0; }
.eigenes-spiel .eingabe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0 64px; }
@media (max-width: 480px) { .eigenes-spiel .eingabe { margin-left: 0; } }
/* Endstand */
.endstand { display: grid; gap: 4px; }
.endplatz { display: grid; grid-template-columns: 4.2em 1fr; gap: 8px; padding: 6px 8px; border-radius: var(--rund-klein); background: var(--flaeche-2); }
.endplatz .nr { font-weight: 800; white-space: nowrap; }
.endplatz.meins { background: var(--fuchs-hell); font-weight: 700; }

/* Impressum, Datenschutz */
.rechtstext { max-width: 780px; }
.rechtstext h1 { margin-top: 24px; }
.rechtstext h2 { margin-top: 26px; font-size: 1.1rem; }
.rechtstext li { margin-bottom: 6px; }
.fuss .rechtliches { margin-left: auto; white-space: nowrap; }
/* Startseite: Hinweis Einfuehrungsphase */
.held .einfuehrung { display: inline-block; margin: 14px 0 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.95rem; }
