/* ============================================================
   Feuerwehr Kuppingen × Dart — Design „Dartnacht"
   Quelle: docs/design-vorlage/DESIGN-DARTNACHT.md
   Dunkel, Anzeigetafel-Stil. Teko (Headlines/Zahlen) + Barlow (Text).
   Alle Farben/Maße als Tokens, keine Verläufe, Mobile first (390 px),
   Desktop zentriert max. 480 px (Admin 900 px).
   ============================================================ */
:root {
  --bg: #111111;
  --surface: #1E1E1E;
  --surface-2: #1C1C1C;
  --surface-3: #262626;
  --border: #333333;
  --border-input: #4A4A4A;
  --divider: #2E2E2E;
  --text: #F4F4F4;
  --text-muted: #CFCFCF;
  --text-subtle: #BDBDBD;
  --text-hint: #9A9A9A;
  --text-off: #8A8A8A;
  --red: #D41920;
  --yellow: #FFE500;
  --on-yellow: #111111;
  --display: "Teko", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --r-card: 16px;
  --r-input: 12px;
  --gutter: 20px;
  --cta-h: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration-color: var(--yellow); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
p { margin: 0 0 .9rem; }
code { background: var(--surface); padding: .05rem .3rem; border-radius: 4px; font-size: .9em; }

/* --- Seitengerüst --- */
.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px var(--gutter) 40px;
  min-height: 100vh;
}
.app.hat-cta { padding-bottom: calc(var(--cta-h) + 48px + env(safe-area-inset-bottom)); }
.app.breit { max-width: 900px; }
.sitefoot {
  margin-top: 36px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-hint); text-align: center;
}
.sitefoot p { margin: 0 0 8px; }
.sitefoot a { color: var(--text-hint); text-decoration: none; }
.sitefoot a:hover { color: var(--yellow); }
.sitefoot .legal { letter-spacing: .04em; }

/* --- Kopfzeile: Logo-Kachel + runder Icon-Button --- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 2; }
.logo { display: inline-block; line-height: 0; }
.logo img { width: 150px; height: auto; display: block; }
.topbar .mond { width: 60px; height: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-input);
  background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; text-decoration: none; flex: none;
}
.icon-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Deko-Dartscheibe (rein dekorativ) --- */
.deko-board {
  position: absolute; right: -90px; top: 78px; width: 340px; height: 340px;
  border-radius: 50%; border: 14px solid var(--red); background: var(--surface-2);
  pointer-events: none; z-index: 0;
}
.deko-board::before, .deko-board::after, .deko-board .bull {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
}
.deko-board::before { width: 250px; height: 250px; border: 10px solid var(--yellow); background: var(--surface-3); }
.deko-board::after { width: 150px; height: 150px; border: 10px solid var(--red); background: var(--surface-2); }
.deko-board .bull { width: 46px; height: 46px; background: var(--yellow); border: 8px solid var(--red); }
/* Kuppinger Mond als Bull in der Mitte der Scheibe */
.deko-board .mond {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 128px; height: auto; z-index: 1;
}
.deko-board.mit-mond::after { background: var(--surface-2); }
.hero, .counters, .card, .cta-bar, .wizard { position: relative; z-index: 1; }

/* --- Hero --- */
.hero { margin-top: 28px; }
.kicker {
  margin: 0 0 6px; font-family: var(--body); font-weight: 600; font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--yellow);
}
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 86px; line-height: .82;
  text-transform: uppercase; color: var(--text); letter-spacing: .01em;
}
.hero .meta { margin: 14px 0 0; font-size: 17px; color: var(--text-muted); max-width: 230px; line-height: 1.35; }

/* --- Zähler-Kacheln --- */
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.counter {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 10px 10px; text-align: center;
}
.counter .zahl {
  display: block; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: .9;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.counter.akzent .zahl { color: var(--yellow); }
.counter .lbl {
  display: block; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle);
}

/* --- Karten --- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 14px; margin-top: 14px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head h2, .section-title {
  margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: .95;
  text-transform: uppercase; color: var(--text);
}
.card-head a { font-size: 13px; font-weight: 600; color: var(--yellow); text-decoration: none; white-space: nowrap; }
.card-head a:hover { text-decoration: underline; }
.card p:last-child { margin-bottom: 0; }

/* Ablauf-Liste */
.ablauf { list-style: none; margin: 0; padding: 0; }
.ablauf li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.ablauf li:last-child { border-bottom: 0; padding-bottom: 2px; }
.ablauf .zeit {
  flex: none; width: 64px; font-family: var(--display); font-weight: 600; font-size: 24px;
  line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums;
}
.ablauf .punkt { font-size: 16px; color: var(--text); }

/* Startplatz-Tafel (echte Belegung) */
.slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 6px; }
.slot {
  aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1; padding-top: 2px;
  font-variant-numeric: tabular-nums; color: var(--text-hint); border: 1px solid var(--border);
  background: var(--surface-2);
}
.slot.belegt { background: var(--red); border-color: var(--red); color: #fff; }
.slot.gesetzt { box-shadow: inset 0 0 0 2px var(--yellow); }
.legende { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .06em; }
.legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legende .l-belegt::before { background: var(--red); }
.legende .l-frei::before { border: 1px solid var(--border); background: var(--surface-2); }
.legende .l-gesetzt::before { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--yellow); }

/* Status-Pille (voll/offen/geschlossen) */
.pill {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px; border: 1px solid var(--border-input); color: var(--text-muted);
}
.pill.rot { background: var(--red); border-color: var(--red); color: #fff; }
.pill.gelb { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1; padding: 4px 28px 0;
  text-transform: uppercase; letter-spacing: .02em; height: var(--cta-h); border-radius: 30px;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: #FFF04D; color: var(--on-yellow); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border-input); }
.btn-secondary:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-danger { background: transparent; color: var(--text); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 44px; font-size: 22px; padding: 3px 20px 0; border-radius: 22px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-round { width: var(--cta-h); height: var(--cta-h); border-radius: 50%; padding: 0; flex: none; }
.btn-round svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Footer-CTA (fixiert) */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}
.cta-bar .inner { max-width: 480px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.cta-bar .btn-primary { flex: 1; }

/* --- Formulare --- */
form { margin: 0; }
.field { margin-bottom: 14px; }
.zweispaltig { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.field label, label.feld {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px;
}
.field .hint, label .opt { font-weight: 400; color: var(--text-hint); }
input:not([type=checkbox]):not([type=radio]), textarea, select {
  display: block; width: 100%; height: 50px; padding: 0 14px; font-size: 17px; font-family: var(--body);
  background: var(--surface); color: var(--text); border: 1px solid var(--border-input); border-radius: var(--r-input);
}
textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.45; resize: vertical; font-size: 15px; }
input::placeholder { color: var(--text-hint); }
input:not([type=checkbox]):focus, textarea:focus { outline: 2px solid var(--yellow); outline-offset: 2px; border-color: var(--border-input); }
.field.fehler input { border-color: var(--red); }
.fehler-text { color: #FF6B6B; font-size: 13px; margin-top: 6px; display: none; }
.field.fehler .fehler-text { display: block; }
.check { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0; font-size: 15px; color: var(--text); }
.check input[type=checkbox] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--yellow); flex: none; }
.hinweis {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--yellow);
  padding: 12px 14px; border-radius: 12px; margin: 14px 0; font-size: 15px;
}
.hinweis.rot { border-left-color: var(--red); }
.klein { font-size: 13px; color: var(--text-hint); }
.fliess { white-space: pre-line; }

/* --- Wizard (Anmeldung in 3 Schritten) --- */
.wiz-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 18px; }
.wiz-head h1 {
  margin: 0; text-align: center; font-family: var(--display); font-weight: 600; font-size: 24px;
  line-height: 1; padding-top: 3px; text-transform: uppercase; letter-spacing: .04em;
}
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress span { height: 5px; border-radius: 3px; background: var(--border); }
.progress span.done, .progress span.aktiv { background: var(--yellow); }
.progress-lbl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 8px 0 22px; }
.progress-lbl span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-off); text-align: center; }
.progress-lbl span:first-child { text-align: left; }
.progress-lbl span:last-child { text-align: right; }
.progress-lbl span.aktiv { color: var(--text); }
.step { display: none; }
.step.aktiv { display: block; }
.no-js .step { display: block; }
.no-js .wiz-nav, .no-js .progress, .no-js .progress-lbl { display: none; }
.step h2 {
  margin: 0 0 16px; font-family: var(--display); font-weight: 600; font-size: 44px; line-height: .9;
  text-transform: uppercase;
}
.wiz-nav { display: flex; gap: 10px; margin-top: 22px; }
.wiz-nav .btn { flex: 1; }
.summary { margin: 0; }
.summary div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 15px; }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--text-subtle); flex: none; }
.summary dd { margin: 0; text-align: right; color: var(--text); word-break: break-word; }
.summary dd.akzent { color: var(--yellow); font-weight: 600; }

/* --- Erfolg --- */
.erfolg { text-align: center; padding-top: 24px; }
.board-mini {
  width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; border: 6px solid var(--red);
  background: var(--surface-2); position: relative;
}
.board-mini::before, .board-mini::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
}
.board-mini::before { width: 76px; height: 76px; border: 5px solid var(--yellow); background: var(--surface-3); }
.board-mini::after { width: 26px; height: 26px; background: var(--yellow); border: 5px solid var(--red); }
.board-mini.warte { border-color: var(--border-input); }
.board-mini.warte::before { border-color: var(--border-input); }
.board-mini.warte::after { background: var(--border-input); border-color: var(--border); }
.erfolg h1 {
  margin: 0 0 10px; font-family: var(--display); font-weight: 700; font-size: 56px; line-height: .9;
  text-transform: uppercase; color: var(--yellow);
}
.erfolg h1.grau { color: var(--text); }
.erfolg .platz { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--text-muted); margin: 0 0 14px; text-transform: uppercase; }
.erfolg .platz strong { color: var(--yellow); font-weight: 700; font-size: 40px; vertical-align: -3px; }
.erfolg p { font-size: 17px; color: var(--text-muted); }

/* --- Inhaltsseiten (Rechtstexte, Info) --- */
.seite h1 {
  margin: 18px 0 14px; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 8vw, 44px);
  line-height: .9; text-transform: uppercase;
}
.seite h3 {
  margin: 22px 0 8px; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: .95;
  text-transform: uppercase; color: var(--yellow);
}
.seite p { font-size: 16px; color: var(--text-muted); }

/* --- Admin --- */
.admin h2 { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: .9; text-transform: uppercase; margin: 10px 0 4px; }
.admin h2 .jahr { color: var(--yellow); }
.admin h3 {
  font-family: var(--display); font-weight: 600; font-size: 28px; line-height: .95; text-transform: uppercase;
  margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--divider);
}
.admin form.inline { display: inline-block; }
.admin .btn { margin-top: 4px; }
.admin label.feld input, .admin label.feld textarea { margin-top: 6px; }
.admin label.feld { margin-bottom: 14px; }
.zeile { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font-size: 12px; font-weight: 600; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .08em; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--divider); vertical-align: top; }
td { font-variant-numeric: tabular-nums; }
td form { margin: 0; }
.tag { background: var(--yellow); color: var(--on-yellow); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* --- Responsive --- */
@media (max-width: 480px) {
  /* Handy: kleinere Scheibe rechts, Text links bleibt frei von den Ringen */
  .hero h1 { font-size: 62px; }
  .hero .meta { max-width: 180px; }
  .deko-board { right: -40px; top: 78px; width: 240px; height: 240px; border-width: 12px; }
  .deko-board::before { width: 176px; height: 176px; border-width: 8px; }
  .deko-board::after { width: 128px; height: 128px; border-width: 8px; }
  .deko-board .mond { width: 96px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 56px; }
  .deko-board { right: -60px; }
  .counter .zahl { font-size: 34px; }
  .btn { font-size: 24px; }
}
@media (max-width: 640px) {
  .table-scroll { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Reiter (Übersicht / Turniermodus) --- */
.reiter {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-top: 18px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px;
}
.reiter a {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 10px;
  border-radius: 999px; text-align: center; text-decoration: none; font-weight: 600; font-size: 15px;
  line-height: 1.15; color: var(--text-subtle);
}
.reiter a:hover { color: var(--yellow); }
.reiter a[aria-current="page"] { background: var(--yellow); color: var(--on-yellow); }
.regeln { margin: 0 0 10px; padding-left: 20px; }
.regeln li { margin-bottom: 6px; }
.mehr { position: relative; z-index: 1; margin-top: 18px; text-align: center; }
.mehr a { color: var(--yellow); font-weight: 600; text-decoration: none; }

/* --- Countdown bis Anmeldestart --- */
.cd-felder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 10px; }
.cd-felder div {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 4px 8px; text-align: center;
}
.cd-felder .zahl {
  display: block; font-family: var(--display); font-weight: 700; font-size: 42px; line-height: .9;
  color: var(--yellow); font-variant-numeric: tabular-nums;
}
.cd-felder .lbl {
  display: block; margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle);
}

/* Admin: Nachrücker anrufen */
.anruf-box { border-color: var(--yellow); }
.anruf-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.anruf-liste li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--divider); }
.anruf-liste li:last-child { border-bottom: 0; }
.anruf-liste a { color: var(--yellow); }

/* --- Blocksatz für Fließtexte (Gut zu wissen, Turniermodus, Regeln) --- */
.blocksatz, .blocksatz p, .blocksatz li {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3;
}
.blocksatz .card-head h2 { text-align: left; }
.unter {
  margin: 16px 0 6px; font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1;
  text-transform: uppercase; letter-spacing: .02em; color: var(--yellow);
}
.card-head + .unter { margin-top: 4px; }
/* Finalrunde: Runde | Modus */
.modus-liste { margin: 0 0 12px; }
.modus-liste div {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--divider);
}
.modus-liste div:last-child { border-bottom: 0; }
.modus-liste dt { margin: 0; font-weight: 600; color: var(--text); }
.modus-liste dd { margin: 0; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Kurze Listenpunkte linksbündig mit Trennung – Blocksatz reißt dort Lücken */
.regeln li, .blocksatz li { text-align: left; hyphens: auto; -webkit-hyphens: auto; }

/* Abmelden: Ja / Nein untereinander, gut treffbar am Handy */
.abmelde-wahl { display: grid; gap: 12px; margin-top: 22px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
tr.abgesagt .name, .table-scroll td .name { white-space: nowrap; }
.abmelde-wahl .btn { font-size: 23px; white-space: normal; height: auto; min-height: var(--cta-h); padding: 8px 18px 5px; text-align: center; line-height: 1.05; }
/* Nachrückerliste: Abgesagte durchgestrichen */
tr.abgesagt td { color: var(--text-off); }
tr.abgesagt .name { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.tag.nachr { background: var(--yellow); color: var(--on-yellow); }
tr.abgesagt .tag { background: var(--surface-3); color: var(--text-muted); }
