/* 2.9.0 – Oberflaeche der Startseite.
   Dunkel mit Gold, wie das KTS-Zeichen. Wenig Farbe, grosse Zahlen, kurze Saetze: die Seite soll in zehn
   Sekunden beantworten, ob etwas laeuft und was es gerade wert ist. Alles Technische liegt eine Ebene tiefer. */

:root {
  --grund: #0a0b0d;
  --flaeche: #121417;
  --flaeche-hoch: #191c20;
  --rand: #272b31;
  --rand-hell: #3a4049;
  --schrift: #e8e6e1;
  --schrift-leise: #9aa0a8;
  --gold: #d9a441;
  --gold-hell: #f0c470;
  --gruen: #5bbf7a;
  --rot: #e0715f;
  --blau: #6f9fd8;
  --funk: 0 1px 3px rgba(0, 0, 0, .5);
  --rund: 10px;
}

* { box-sizing: border-box; }

/* WICHTIG, und am 21.10.2026 beim ersten Blick auf die fertige Seite aufgefallen: das Attribut `hidden` wirkt nur
   ueber `display: none` - und jede eigene `display`-Regel (hier `.anmeldung { display: flex }`) schlaegt es.
   Die Anmeldekarte blieb dadurch ueber der angemeldeten Seite stehen. Diese eine Regel stellt das fuer ALLE
   Elemente richtig, statt es an jeder einzelnen Stelle einzeln zu reparieren. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 48px;
}

h2 { font-size: 1.25rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 10px; }
h4 { font-size: .95rem; margin: 18px 0 8px; color: var(--schrift-leise); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 10px; }
a { color: var(--gold-hell); }

.klein { font-size: .85rem; color: var(--schrift-leise); }

/* ---------------------------------------------------------------- Kopf */

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--rand); background: #08090b;
}
.marke { display: flex; align-items: center; gap: 12px; min-width: 0; }
.marke-bild { height: 38px; width: auto; border-radius: 4px; }
.marke-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marke-text strong { color: var(--gold); letter-spacing: .14em; font-size: .9rem; }
.marke-text span { color: var(--schrift-leise); font-size: .72rem; letter-spacing: .08em; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.papier-schild {
  border: 1px solid var(--gold); color: var(--gold); border-radius: 999px;
  padding: 3px 11px; font-size: .7rem; letter-spacing: .1em;
}
.ampel { font-size: .82rem; color: var(--schrift-leise); }
.ampel.gut::before, .ampel.schlecht::before { content: "●"; margin-right: 6px; }
.ampel.gut { color: var(--gruen); }
.ampel.schlecht { color: var(--rot); }

/* ---------------------------------------------------------------- Reiter */

.reiter {
  display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--rand);
  background: #0c0d10; overflow-x: auto; scrollbar-width: none;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter-knopf {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--schrift-leise);
  padding: 12px 14px; font-size: .92rem; cursor: pointer; white-space: nowrap;
}
.reiter-knopf:hover { color: var(--schrift); }
.reiter-knopf.aktiv { color: var(--gold); border-bottom-color: var(--gold); }

main { max-width: 1120px; margin: 0 auto; padding: 18px 16px; }

.seite { display: none; }
.seite.aktiv { display: block; }

/* ---------------------------------------------------------------- Die drei Antworten */

.antwort {
  background: linear-gradient(180deg, #16181c, #101215);
  border: 1px solid var(--rand); border-left: 3px solid var(--gold);
  border-radius: var(--rund); padding: 16px 18px; margin-bottom: 18px;
}
.antwort-zeile { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 5px 0; }
.antwort-frage { color: var(--schrift-leise); min-width: 210px; font-size: .9rem; }
.antwort-zeile strong { font-size: 1.1rem; }

/* ---------------------------------------------------------------- Bereichswahl */

.bereich-wahl { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.bereich-knopf {
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--schrift-leise);
  border-radius: 999px; padding: 8px 18px; cursor: pointer; font-size: .92rem;
}
.bereich-knopf.aktiv { border-color: var(--gold); color: var(--gold); background: #1a1813; }

/* ---------------------------------------------------------------- Karten */

.karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund);
  padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--funk);
}
.karte.erklaer { border-left: 3px solid var(--blau); }
.karte.warnkarte { border-left: 3px solid var(--gold); }
.karte.schatten-karte { border-left: 3px solid var(--schrift-leise); }

.gruppe { margin-bottom: 22px; }
.gruppe-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gruppe-kopf h3 { margin: 0; }
.gruppe-summe { font-size: .88rem; color: var(--schrift-leise); }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }

/* ---------------------------------------------------------------- Pilotenkachel */

.pilot {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.pilot.meiner { border-left: 3px solid var(--gold); }
.pilot.claude { border-left: 3px solid var(--blau); }

.pilot-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pilot-name { font-weight: 600; font-size: 1rem; }
.pilot-lage { font-size: .74rem; color: var(--schrift-leise); margin-top: 2px; }

.punkt { font-size: .74rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.punkt::before { content: "●"; }
.punkt.an { color: var(--gruen); }
.punkt.aus { color: var(--schrift-leise); }

.geld { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.geld-wert { font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.geld-diff { font-size: .9rem; font-variant-numeric: tabular-nums; }
.plus { color: var(--gruen); }
.minus { color: var(--rot); }
.neutral { color: var(--schrift-leise); }

.zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--rand); padding-top: 10px; }
.zahl-feld { display: flex; flex-direction: column; }
.zahl-feld span { font-size: .68rem; color: var(--schrift-leise); text-transform: uppercase; letter-spacing: .05em; }
.zahl-feld strong { font-size: .98rem; font-variant-numeric: tabular-nums; font-weight: 600; }

.pilot-fuss { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pilot-hinweis { font-size: .8rem; color: var(--schrift-leise); }

.schild {
  display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: .68rem;
  letter-spacing: .06em; border: 1px solid var(--rand-hell); color: var(--schrift-leise);
}
.schild.warn { border-color: var(--gold); color: var(--gold); }
.schild.gut { border-color: var(--gruen); color: var(--gruen); }

.leer { color: var(--schrift-leise); font-size: .9rem; padding: 14px; border: 1px dashed var(--rand-hell); border-radius: var(--rund); }

/* ---------------------------------------------------------------- Formular */

.feldreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; color: var(--schrift-leise); }
input, select {
  background: #0d0f12; border: 1px solid var(--rand-hell); color: var(--schrift);
  border-radius: 6px; padding: 9px 10px; font-size: .95rem; font-family: inherit; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.vorlagen { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.vorlage {
  text-align: left; background: var(--flaeche-hoch); border: 1px solid var(--rand-hell);
  border-radius: var(--rund); padding: 13px 14px; cursor: pointer; color: var(--schrift); font-family: inherit;
}
.vorlage:hover { border-color: var(--rand-hell); background: #1f2329; }
.vorlage.gewaehlt { border-color: var(--gold); background: #1b1813; }
.vorlage-name { font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vorlage-kurz { font-size: .82rem; color: var(--schrift-leise); }
.vorlage-zahl { font-size: .78rem; margin-top: 8px; font-variant-numeric: tabular-nums; }

.selbst { margin-top: 16px; border-top: 1px solid var(--rand); padding-top: 12px; }
.selbst summary { cursor: pointer; color: var(--schrift-leise); font-size: .9rem; padding: 4px 0; }
.selbst summary:hover { color: var(--schrift); }

.vorschau {
  margin-top: 14px; background: #0e1013; border: 1px solid var(--rand-hell);
  border-left: 3px solid var(--blau); border-radius: var(--rund); padding: 14px;
}
.vorschau dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .88rem; }
.vorschau dt { color: var(--schrift-leise); }
.vorschau dd { margin: 0; }
.vorschau .ehrlich { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rand); font-size: .88rem; }

.schalter-zeile { flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 14px; color: var(--schrift); line-height: 1.45; }
.schalter-zeile input { margin-top: 3px; accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.aktionsreihe { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.linkreihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.knopf {
  background: var(--flaeche-hoch); border: 1px solid var(--rand-hell); color: var(--schrift);
  border-radius: 6px; padding: 9px 16px; cursor: pointer; font-size: .9rem; font-family: inherit;
  text-decoration: none; display: inline-block;
}
.knopf:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-hell); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf.haupt { background: var(--gold); border-color: var(--gold); color: #17140c; font-weight: 600; }
.knopf.haupt:hover { background: var(--gold-hell); color: #17140c; }
.knopf.an { border-color: var(--gold); color: var(--gold-hell); }
.knopf.schlicht { background: none; }
.knopf.gefahr { border-color: #6d3b34; color: var(--rot); }
.knopf.gefahr:hover { border-color: var(--rot); color: var(--rot); }
.knopf.winzig { padding: 5px 10px; font-size: .78rem; }

.werte { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: .9rem; }
.werte dt { color: var(--schrift-leise); }
.werte dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Berichte */

.bericht-zeile {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--rand); flex-wrap: wrap;
}
.bericht-zeile:last-child { border-bottom: 0; }
.bericht-name { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86rem; word-break: break-all; }

pre {
  background: #0b0d0f; border: 1px solid var(--rand); border-radius: 6px; padding: 14px;
  overflow-x: auto; font-size: .8rem; line-height: 1.5; max-height: 65vh;
}

/* ---------------------------------------------------------------- Meldung */

.meldung {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--flaeche-hoch); border: 1px solid var(--gold); color: var(--schrift);
  border-radius: 8px; padding: 11px 18px; font-size: .9rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .55);
  max-width: calc(100vw - 32px); z-index: 50;
}
.meldung.fehler { border-color: var(--rot); }

@media (max-width: 640px) {
  .antwort-frage { min-width: 0; width: 100%; }
  .zahlen { grid-template-columns: repeat(2, 1fr); }
  main { padding: 14px 16px; }
}

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

/* ---------------------------------------------------------------- Anmeldung */

.anmeldung {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(ellipse at 30% 0%, #15181d 0%, var(--grund) 60%);
}
.anmelde-karte {
  width: 100%; max-width: 360px; background: var(--flaeche); border: 1px solid var(--rand);
  border-top: 3px solid var(--gold); border-radius: var(--rund); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.anmelde-bild { width: 100%; height: auto; border-radius: 6px; }
.anmelde-karte h2 { margin: 0; text-align: center; }
#anmelde-fehler { color: var(--rot); margin: 0; text-align: center; }
