/* Farben und Schriften stammen von der Vereinsseite sv1880unterpoerlitz.de.
   #006633 ist das Vereinsgrün; auf dunklem Grund säuft es ab, deshalb steht
   daneben das aufgehellte #34C17B für alles, was lesbar bleiben muss. */
:root {
  --bg: #0B1410;
  --bg-nav: #0E1814;
  --flaeche: #13201A;
  --flaeche2: #101B16;
  --kachel: #1B2C24;
  --linie: #23342B;
  --linie2: #33463C;
  --text: #EAF2EC;
  --leise: #8A9C92;
  --gruen: #006633;
  --hell: #34C17B;
  --gruen-text: #B8E6CB;
  --gold: #E8B04B;
  --gold-linie: #5A4A20;
  --gold-flaeche: #221C10;
  --rot: #E0645A;
  --rot-linie: #5A2E2A;
  --rot-flaeche: #2A1614;
  --slab: 'Roboto Slab', Rockwell, Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .slab { font-family: var(--slab); font-weight: 700; margin: 0; }
a { color: var(--hell); text-decoration: none; }

/* Auf dem Handy die volle Breite, auf großen Schirmen eine Spalte in der Mitte —
   die App wird fast nur am Telefon benutzt. */
.rahmen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--linie);
}
.kopf img { height: 38px; width: auto; }
.kopf-titel { font-family: var(--slab); font-size: 19px; font-weight: 700; }
.kopf-unter { font-size: 11px; color: var(--leise); margin-top: 2px; }
.abzeichen {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gruen); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}

main { flex-grow: 1; padding: 14px 20px 24px; }

.abschnitt {
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--leise);
  margin: 18px 0 10px;
}
.abschnitt:first-child { margin-top: 0; }

/* --- Terminkarte --- */
.termin {
  border-radius: 8px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  overflow: hidden;
  margin-bottom: 10px;
}
.termin-oben { display: flex; gap: 13px; padding: 13px; }
.termin.vergangen { opacity: .55; }

.datum {
  width: 66px; flex-shrink: 0;
  border-radius: 7px;
  background: var(--kachel);
  padding: 9px 0 8px;
  text-align: center;
}
.datum.spiel { background: var(--gruen); }
.datum .typ { font-size: 9px; letter-spacing: 1.4px; color: var(--hell); }
.datum.spiel .typ { color: var(--gruen-text); }
.datum .tag { font-family: var(--slab); font-size: 21px; font-weight: 700; line-height: 1.15; }
.datum.spiel .tag { color: #fff; }
.datum .dat { font-size: 10px; color: var(--leise); }
.datum.spiel .dat { color: var(--gruen-text); }

.termin-mitte { flex-grow: 1; min-width: 0; }
.titelzeile { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gegner { font-size: 15px; font-weight: 700; }
.zeit { font-size: 14px; }
.marke {
  font-size: 9px; letter-spacing: 1px;
  color: var(--gold);
  border: 1px solid var(--gold-linie);
  border-radius: 3px;
  padding: 2px 5px;
  white-space: nowrap;
}
.marke.abgesagt { color: var(--rot); border-color: var(--rot-linie); }
.details { font-size: 11px; color: var(--leise); margin-top: 5px; line-height: 1.6; }

/* --- Meldung --- */
.melden { display: flex; gap: 8px; margin-top: 11px; align-items: center; }
.melden + .melden { margin-top: 8px; }
.melden .wer {
  font-size: 12px; color: var(--leise);
  min-width: 52px; flex-shrink: 0;
}
.knopf {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--gruen);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-grow: 1;
  padding: 0 12px;
}
.knopf.aus {
  background: transparent;
  border-color: var(--linie2);
  color: var(--leise);
  font-weight: 400;
  font-size: 13px;
  flex-grow: 0;
  min-width: 90px;
}
.knopf.gewaehlt-ab {
  background: var(--rot-flaeche);
  border-color: var(--rot-linie);
  color: var(--rot);
}
.knopf:hover { filter: brightness(1.12); }
.knopf:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; }

/* Runde Zustandsknöpfe, wenn schon gemeldet wurde */
.zustand { display: flex; gap: 7px; flex-shrink: 0; align-items: center; }
.rund {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--linie2);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.rund.an-zu { background: var(--gruen); border-color: var(--gruen); }
.rund.an-ab { background: var(--rot-flaeche); border-color: var(--rot-linie); }
.rund:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; }

.fahrt {
  display: flex; align-items: center; gap: 11px;
  border-top: 1px solid var(--linie);
  background: var(--flaeche2);
  padding: 11px 13px;
  font-size: 12px;
  color: var(--text);
}
.chip {
  font-size: 10px; font-weight: 700;
  color: var(--bg); background: var(--gold);
  border-radius: 3px; padding: 4px 8px;
  white-space: nowrap;
}

.trenner {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px; margin-top: 4px;
}
.trenner .strich { flex-grow: 1; height: 1px; background: var(--linie); }
.trenner span { font-size: 11px; color: var(--leise); }

.leer {
  text-align: center;
  color: var(--leise);
  font-size: 14px;
  padding: 40px 10px;
}

/* --- Fußnavigation --- */
.nav {
  display: flex;
  border-top: 1px solid var(--linie);
  background: var(--bg-nav);
  padding: 10px 0 max(20px, env(safe-area-inset-bottom));
  position: sticky;
  bottom: 0;
}
.nav a {
  flex-grow: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--leise);
  font-size: 10px;
}
.nav a.aktiv { color: var(--hell); }
.nav a.aktiv svg { stroke: var(--hell); }

/* --- Einfache Seiten --- */
.seite { padding: 28px 20px; }
.seite h1 { font-size: 24px; line-height: 1.2; margin-bottom: 14px; }
.seite p { font-size: 14px; margin: 0 0 14px; }
.seite strong { color: var(--text); }
.hinweis {
  border: 1px solid var(--gold-linie);
  background: var(--gold-flaeche);
  color: var(--gold);
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 13px;
  margin: 0 0 16px;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Trainer --- */
.balken {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--linie);
}
.balken .zurueck { color: var(--text); display: flex; flex-shrink: 0; }
.balken-titel { font-family: var(--slab); font-size: 17px; font-weight: 700; }
.balken-unter { font-size: 11px; color: var(--leise); margin-top: 2px; }

.aktion {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 1px dashed var(--linie2);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 13px 14px;
  font: inherit; font-size: 14px;
  cursor: pointer;
  margin-bottom: 14px;
  text-align: left;
}
.aktion:hover { border-color: var(--hell); }
.aktion .neben { font-size: 11px; color: var(--leise); margin-left: auto; }

.zeile {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--flaeche);
  margin-bottom: 6px;
}
.zeile .initial {
  width: 29px; height: 29px; border-radius: 50%;
  background: var(--kachel); color: var(--leise);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.zeile .initial.offen { background: var(--gold-flaeche); border: 1px dashed var(--gold-linie); color: var(--gold); }
.zeile .name { font-size: 14px; }
.zeile .unter { font-size: 11px; color: var(--leise); margin-top: 1px; }

.linkfeld {
  margin: 0 0 6px;
  border: 1px solid var(--linie);
  border-radius: 6px;
  background: var(--flaeche2);
  padding: 11px 12px;
}
.linkfeld code {
  display: block;
  font-size: 11px; color: var(--leise);
  word-break: break-all;
  margin-bottom: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.linkfeld .knopfreihe { display: flex; gap: 8px; }
.klein {
  min-height: 38px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--linie2);
  background: transparent; color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
}
.klein.stark { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 700; }
.klein.warn { color: var(--gold); border-color: var(--gold-linie); }
.klein:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; }

/* --- Formular --- */
.feldgruppe { display: flex; flex-direction: column; gap: 14px; }
.feld label, .feldname {
  display: block;
  font-size: 10px; letter-spacing: 1.6px;
  color: var(--leise); margin-bottom: 6px;
  text-transform: uppercase;
}
.feld input[type=text], .feld input[type=date], .feld input[type=time], .feld select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--linie2);
  border-radius: 6px;
  background: var(--flaeche);
  color: var(--text);
  font: inherit; font-size: 15px;
  color-scheme: dark;
}
.feld input:focus, .feld select:focus { outline: 2px solid var(--hell); outline-offset: 1px; }
.paar { display: flex; gap: 12px; }
.paar > * { flex: 1 1 0; min-width: 0; }

.schalter { display: flex; gap: 6px; background: var(--flaeche2); border-radius: 8px; padding: 5px; }
.schalter label { flex: 1 1 0; margin: 0; }
.schalter input { position: absolute; opacity: 0; pointer-events: none; }
.schalter span {
  display: flex; align-items: center; justify-content: center;
  min-height: 42px; border-radius: 6px;
  font-size: 14px; color: var(--leise);
  cursor: pointer; text-transform: none; letter-spacing: 0;
}
.schalter input:checked + span { background: var(--gruen); color: #fff; font-weight: 700; }
.schalter input:focus-visible + span { outline: 2px solid var(--hell); outline-offset: 2px; }

.kasten {
  border: 1px solid var(--linie); border-radius: 8px;
  background: var(--flaeche2); padding: 13px 14px;
}
.kasten .kopfzeile { font-size: 12px; color: var(--leise); margin-bottom: 11px; }

.warnung {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid var(--gold-linie); background: var(--gold-flaeche);
  border-radius: 8px; padding: 13px 14px;
  font-size: 12.5px; color: var(--gold);
  margin-top: 16px;
}

.zahlen { display: flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.zahlen div { flex: 1 1 0; text-align: center; padding: 12px 0; background: var(--flaeche); }
.zahlen div + div { border-left: 1px solid var(--linie); }
.zahlen .n { font-family: var(--slab); font-size: 22px; font-weight: 700; }
.zahlen .l { font-size: 10px; color: var(--leise); letter-spacing: .6px; }
.zahlen .zu .n { color: var(--hell); }
.zahlen .ab .n { color: var(--rot); }
.zahlen .offen .n { color: var(--gold); }

.pille {
  min-width: 66px; min-height: 30px; padding: 0 12px;
  border-radius: 15px; border: 1px solid var(--linie2);
  background: transparent; color: var(--leise);
  font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
}
.pille.zu { border-color: var(--hell); background: #1A3A28; color: var(--text); }
.pille.ab { border-color: var(--rot-linie); background: var(--rot-flaeche); color: var(--rot); }
.pille.offen { border-style: dashed; border-color: var(--gold-linie); background: var(--gold-flaeche); color: var(--gold); }
.pille:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; }

/* --- Sitzplan --- */
.pool { border: 1px dashed #3A4F44; border-radius: 10px; background: var(--flaeche2); padding: 11px 12px; margin-bottom: 14px; }
.poollabel { font-size: 10px; letter-spacing: 2px; color: var(--leise); padding-bottom: 9px; }
.kids { display: flex; flex-wrap: wrap; gap: 8px; }
.kid {
  min-height: 42px; padding: 0 15px; border-radius: 21px;
  display: inline-flex; align-items: center;
  font: inherit; font-size: 13px;
  border: 1px solid var(--linie2); background: var(--flaeche); color: var(--text);
  cursor: pointer;
}
.kid.sel { border-color: var(--hell); background: var(--hell); color: var(--bg); font-weight: 700; }
.kid:focus-visible, .sitz:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; }

.autos { display: flex; flex-wrap: wrap; gap: 14px; }
.auto { width: 150px; }
.autokopf { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; padding-bottom: 3px; }
.autokopf span { font-size: 10px; color: var(--leise); font-weight: 400; }
.autosub { font-size: 10px; color: var(--leise); padding-bottom: 7px; }
.karosse {
  position: relative; border: 2px solid var(--linie2);
  border-radius: 42px 42px 24px 24px; background: var(--flaeche);
  padding: 11px 9px 13px; display: flex; flex-direction: column; gap: 8px;
}
.scheibe { height: 14px; border-radius: 24px 24px 5px 5px; background: var(--kachel); border: 1px solid #2C4036; }
.heck { height: 8px; border-radius: 5px; background: var(--kachel); border: 1px solid #2C4036; }
.sitze { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.sitz {
  min-height: 46px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 11px; text-align: center; padding: 3px;
  cursor: pointer; background: transparent; color: var(--leise);
  border: 2px dashed #3A4F44;
}
.sitz.fahrer { border: 2px solid var(--gruen); background: var(--gruen); color: #fff; cursor: default; }
.sitz.voll { border: 2px solid var(--hell); background: #1A3A28; color: var(--text); font-weight: 700; }
.sitz.bereit { border-color: var(--hell); color: var(--hell); background: #16281F; }
.sitzhinweis { font-size: 12px; color: #A8BAB0; margin-top: 14px; min-height: 20px; }

/* Blazor blendet das ein, wenn ein interaktiver Kreis abbricht. */
#blazor-error-ui {
  display: none;
  position: fixed; inset: auto 0 0 0; z-index: 1000;
  background: var(--gold-flaeche);
  border-top: 1px solid var(--gold-linie);
  color: var(--gold);
  padding: 14px 20px;
  font-size: 13.5px;
  text-align: center;
}
#blazor-error-ui .neu-laden { color: var(--gold); text-decoration: underline; margin-left: 8px; }

.kreuzfeld { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.kreuzfeld input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--gruen); }
.kreuzfeld span { font-size: 13px; color: var(--leise); line-height: 1.5; text-transform: none; letter-spacing: 0; }
