/* Wett-Bot – Kontrollzentrale. Augenschonend: dunkel, gedeckte Farben, ruhige Flächen, große Zahlen,
   keine Dauer-Animation; Bewegung nur über transform/opacity und nur ohne „weniger Bewegung“. */
:root {
  --hg: #0c1016;
  --hg2: #10161e;
  --karte: #141b24;
  --karte2: #1a2330;
  --rand: #233040;
  --text: #e4ebf2;
  --leise: #8d9aab;
  --gruen: #5cbf96;
  --gruen-flaeche: rgba(92, 191, 150, .12);
  --gelb: #dfb25e;
  --gelb-flaeche: rgba(223, 178, 94, .13);
  --rot: #df7b7b;
  --rot-flaeche: rgba(223, 123, 123, .13);
  --blau: #86a9da;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sonst schlägt jede display-Regel das Attribut */
html, body { margin: 0; height: 100%; background: var(--hg); color: var(--text); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  background: radial-gradient(120% 60% at 50% -10%, #17222f 0%, var(--hg) 60%) fixed;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.zahl { font-variant-numeric: tabular-nums; }
.leise { color: var(--leise); }
.plus { color: var(--gruen); }
.minus { color: var(--rot); }
h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 650; letter-spacing: .01em; }

/* ---------- Grundbausteine */
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 16px; }
.haupt { min-height: 48px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--gruen); color: #0b1310; font-weight: 700; }
.zweit { min-height: 46px; padding: 10px 14px; border: 1px solid var(--rand); border-radius: 12px; background: var(--karte2); font-weight: 600; width: 100%; }
.textknopf { min-height: 44px; padding: 10px; border: 0; background: none; color: var(--leise); text-decoration: underline; }
.fehler { margin: 0; color: var(--rot); }
.feld { display: grid; gap: 6px; color: var(--leise); font-size: .95rem; }
.feld input, .zeile-form input { padding: 12px; border-radius: 12px; border: 1px solid var(--rand); background: var(--hg2); color: var(--text); min-width: 0; }
.zeile-form { display: flex; gap: 8px; margin-top: 12px; }
.zeile-form input { flex: 1; }
.zeile-form button { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--rand); background: var(--karte2); font-weight: 600; }
.haken { display: flex; gap: 10px; align-items: flex-start; color: var(--gelb); font-size: .95rem; }
.haken input { margin-top: 4px; width: 20px; height: 20px; }
.pille { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; border: 1px solid var(--rand); background: var(--karte2); }
.pille.test { color: var(--blau); border-color: #304a6b; background: rgba(134, 169, 218, .1); }
.pille.echt { color: var(--gelb); border-color: #5c4a25; background: var(--gelb-flaeche); }

/* ---------- Anmeldung */
.tor { max-width: 420px; margin: 0 auto; padding: 48px 18px; text-align: center; }
.tor-symbol { border-radius: 20px; }
.tor h1 { margin: 14px 0 2px; font-size: 1.7rem; font-weight: 750; }
.formular { margin-top: 24px; text-align: left; display: grid; gap: 14px; }
.wahl { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wahl legend { margin-bottom: 8px; color: var(--leise); }
.wahl label span { display: block; padding: 13px; text-align: center; border: 1px solid var(--rand); border-radius: 12px; background: var(--karte2); font-weight: 600; }
.wahl input { position: absolute; opacity: 0; }
.wahl input:checked + span { border-color: var(--gruen); color: var(--gruen); background: var(--gruen-flaeche); }
.wahl input:focus-visible + span { outline: 2px solid var(--gruen); outline-offset: 2px; }

/* ---------- Gerüst */
.app { display: flex; flex-direction: column; height: 100dvh; max-width: 680px; margin: 0 auto; }
.kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.kopf-symbol { border-radius: 10px; }
.kopf-titel { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.kopf-titel strong { font-size: 1.05rem; }
.kopf-titel .pille { align-self: flex-start; }
.rund { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rand); background: var(--karte); }
.rund.not-aus { color: var(--rot); border-color: #5a3434; }
.streifen { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 14px 8px; padding: 10px 14px;
            border-radius: 12px; background: var(--karte); border: 1px solid var(--rand); font-size: .92rem; }
.streifen.warn { background: var(--gelb-flaeche); border-color: #5c4a25; color: var(--gelb); }
.streifen button { min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--gruen); background: none; color: var(--gruen); font-weight: 600; }
.inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 18px; overscroll-behavior: contain; }
.tab { display: grid; gap: 12px; }
.abschnitt { margin: 8px 2px 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); }

/* ---------- Ampel */
.ampel { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 18px; }
.ampel .licht { grid-row: span 2; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; }
.ampel .licht::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: currentColor; }
.ampel.gruen .licht { color: var(--gruen); background: var(--gruen-flaeche); box-shadow: 0 0 0 1px rgba(92, 191, 150, .25), 0 0 28px rgba(92, 191, 150, .18); }
.ampel.gelb .licht { color: var(--gelb); background: var(--gelb-flaeche); box-shadow: 0 0 0 1px rgba(223, 178, 94, .25), 0 0 28px rgba(223, 178, 94, .16); }
.ampel.rot .licht { color: var(--rot); background: var(--rot-flaeche); box-shadow: 0 0 0 1px rgba(223, 123, 123, .3), 0 0 28px rgba(223, 123, 123, .18); }
.ampel .titel { font-size: 1.2rem; font-weight: 700; }
.ampel .unter { color: var(--leise); font-size: .9rem; }
.ampel .zweit { grid-column: 1 / -1; margin-top: 8px; }

/* ---------- Kennzahlen */
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kz { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 14px; display: grid; gap: 2px; align-content: start; }
.kz .name { font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; }
.kz .wert { font-size: 1.55rem; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kz .unter { font-size: .85rem; color: var(--leise); }
.kz.wichtig { border-color: #2c4a3e; background: linear-gradient(160deg, rgba(92, 191, 150, .08), var(--karte) 60%); }

/* ---------- Balken (scaleX: nur Compositor-Arbeit) */
.balken-zeile { display: grid; grid-template-columns: 74px 1fr 48px; gap: 10px; align-items: center; margin-top: 10px; font-size: .92rem; }
.balken { height: 10px; border-radius: 999px; background: var(--karte2); overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 999px; background: var(--gruen); transform-origin: left; transform: scaleX(0); }
.balken i.gelb { background: var(--gelb); }
.balken i.rot { background: var(--rot); }
.balken-zeile .zahl { text-align: right; color: var(--leise); }
.balken-zeile .name { display: grid; line-height: 1.2; }
.balken-zeile .name small { color: var(--leise); font-size: .78rem; }
.fortschritt { display: flex; justify-content: space-between; align-items: baseline; }
.fortschritt .gross { font-size: 1.3rem; font-weight: 750; }
.kriterien { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }

/* ---------- Modus */
.modus-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modus-zeile .gross { font-size: 1.1rem; font-weight: 700; }

/* ---------- Wettscheine */
.schein { display: grid; gap: 12px; }
.schein.echt { border-color: #5c4a25; }
.schein .oben { display: flex; justify-content: space-between; gap: 10px; color: var(--leise); font-size: .88rem; }
.schein .auswahl { font-size: 1.25rem; font-weight: 750; line-height: 1.25; }
.schein .bei { color: var(--leise); font-weight: 500; }
.drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drei div { background: var(--karte2); border-radius: 12px; padding: 10px; display: grid; gap: 2px; }
.drei span { font-size: .75rem; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; }
.drei b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.drei .achtung b { color: var(--gelb); }
.warum { font-size: .9rem; color: var(--leise); }
.knopf-reihe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.schein .knopf-reihe { justify-content: stretch; }
.schein .knopf-reihe > * { flex: 1 1 40%; }
.link-knopf { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; background: var(--gruen); color: #0b1310; font-weight: 700; text-decoration: none; flex-basis: 100% !important; }
.ja-knopf, .nein-knopf { min-height: 46px; border-radius: 12px; border: 1px solid var(--rand); background: var(--karte2); font-weight: 600; }
.uebung { font-size: .88rem; color: var(--blau); background: rgba(134, 169, 218, .08); border-radius: 10px; padding: 8px 10px; }
.leer { text-align: center; color: var(--leise); padding: 22px 12px; }
.liste { padding: 4px 14px; }
.eintrag { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.eintrag:last-child { border-bottom: 0; }
.eintrag .was { font-weight: 600; }
.eintrag .wo { font-size: .85rem; color: var(--leise); }
.eintrag .wieviel { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.eintrag .clv { text-align: right; font-size: .82rem; color: var(--leise); }

/* ---------- Topf */
.topf { text-align: center; padding: 22px 16px; background: linear-gradient(170deg, rgba(92, 191, 150, .09), var(--karte) 55%); }
.topf .gross { font-size: 2.4rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.topf .reihe { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--leise); font-size: .92rem; }
.betraege { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.betraege button { min-height: 48px; border-radius: 12px; border: 1px solid var(--rand); background: var(--karte2); font-weight: 650; font-variant-numeric: tabular-nums; }
.betraege.vier { grid-template-columns: repeat(4, 1fr); }

/* ---------- Verlauf */
.verlauf { min-height: 100%; grid-template-rows: 1fr auto; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.blase { max-width: 94%; padding: 10px 12px; border-radius: 14px; background: var(--karte); border: 1px solid var(--rand); }
.blase.eigen { align-self: flex-end; background: #17302a; border-color: #2c4a3e; }
.blase .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.blase .zeit { margin-top: 4px; font-size: .75rem; color: var(--leise); text-align: right; }
.knoepfe { display: grid; gap: 8px; margin-top: 10px; }
.knopf-zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.knopf { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px;
         border-radius: 10px; border: 1px solid var(--rand); background: var(--karte2); color: var(--text); text-decoration: none; }
.knopf.link { border-color: var(--gruen); color: var(--gruen); font-weight: 600; }
.knopf.pin { border-color: var(--gelb); color: var(--gelb); }
.eingabe { position: sticky; bottom: 0; padding: 8px 0 2px; background: var(--hg); }

/* ---------- Leiste unten */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom));
        background: rgba(16, 22, 30, .96); border-top: 1px solid var(--rand); }
.tabs button { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 56px; padding: 6px 2px; border: 0; border-radius: 12px;
               background: none; color: var(--leise); font-size: .74rem; font-weight: 600; }
.tabs button.aktiv { color: var(--gruen); background: var(--gruen-flaeche); }
.zaehler { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
           background: var(--gelb); color: #1a1408; font-size: .7rem; line-height: 18px; text-align: center; }

/* ---------- Hinweis nach einer Aktion */
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); width: min(92vw, 640px); transform: translateX(-50%);
         display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #1d2734; border: 1px solid #34465a;
         box-shadow: 0 10px 30px rgba(0, 0, 0, .45); z-index: 10; }
.toast-text { flex: 1; white-space: pre-wrap; font-size: .93rem; max-height: 40vh; overflow: auto; }
.toast .textknopf { min-height: 36px; padding: 4px 8px; }

/* ---------- Dialoge */
.dialog { width: min(92vw, 440px); padding: 18px; border-radius: var(--radius); border: 1px solid var(--rand); background: var(--karte); color: var(--text); }
.dialog::backdrop { background: rgba(4, 7, 11, .72); }
#menue { display: none; }
#menue[open] { display: grid; gap: 10px; }
#menue button:not(.textknopf) { min-height: 48px; border-radius: 12px; border: 1px solid var(--rand); background: var(--karte2); text-align: left; padding: 10px 14px; }
#pinForm { display: grid; gap: 14px; }
.pin-info { white-space: pre-wrap; font-size: .88rem; color: var(--leise); background: var(--hg2); border-radius: 12px; padding: 10px 12px; max-height: 34vh; overflow: auto; }

@media (prefers-reduced-motion: no-preference) {
  .balken i { transition: transform .5s ease; }
  .toast:not([hidden]) { animation: rein .18s ease-out; }
  @keyframes rein { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
}

/* ---------- Startbildschirm (bleibt mit „Neu laden“ stehen, falls das Programm nicht anläuft) */
.laden { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.laden img { border-radius: 20px; }
.lade-hilfe { display: grid; gap: 8px; justify-items: center; opacity: 0; }
.lade-hilfe .haupt { display: inline-block; text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .lade-hilfe { animation: spaet .3s ease 4s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .lade-hilfe { opacity: 1; }
}
@keyframes spaet { to { opacity: 1; } }
.lade-hilfe.sofort { opacity: 1; animation: none; }

/* ---------- Scrollbalken: schmal und dunkel statt grauem Windows-Balken (Wunsch Dogi, 02.11.2026) */
html, .inhalt, .pin-info, .toast-text, .lage { scrollbar-width: thin; scrollbar-color: #2c3a4b transparent; }

/* ---------- Hinweise */
.hinweise:empty { display: none; }
.streifen b { font-weight: 650; }

/* ---------- Grafiken (Farben geprüft: Blau #5a88d4 / Rot #d4725c bestehen alle Prüfungen auf dieser Fläche,
              auch bei Rot-Grün-Schwäche; das Vorzeichen zeigt zusätzlich die Lage über/unter der Nulllinie) */
.grafik-karte { --plus: #5a88d4; --minus: #d4725c; }
.grafik-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.grafik-kopf .gross { font-size: 1.35rem; font-weight: 750; }
.grafik-unter { margin: 0 0 10px; font-size: .85rem; color: var(--leise); }
.grafik { position: relative; }
.grafik svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafik .achse { stroke: #2a3644; stroke-width: 1; }
.grafik .null { stroke: #4a5868; stroke-width: 1; }
.grafik .ziel { stroke: #8d9aab; stroke-width: 1; opacity: .55; }
.grafik .beschriftung { fill: var(--leise); font-size: 11px; font-family: inherit; }
.grafik .balken-plus { fill: var(--plus); }
.grafik .balken-minus { fill: var(--minus); }
.grafik .treffer { fill: transparent; cursor: pointer; }
.grafik .diagonale { stroke: #4a5868; stroke-width: 1.5; }
.grafik .punkt { fill: var(--plus); stroke: var(--karte); stroke-width: 2; }
.grafik .punkt-linie { stroke: var(--plus); stroke-width: 2; fill: none; opacity: .5; }
.tipp { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; padding: 6px 9px;
        border-radius: 8px; background: #233040; border: 1px solid #34465a; font-size: .8rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); z-index: 2; }
.grafik-leer { padding: 18px 8px; text-align: center; color: var(--leise); font-size: .92rem; }
details.tabelle { margin-top: 10px; font-size: .88rem; }
details.tabelle summary { cursor: pointer; color: var(--leise); min-height: 32px; display: flex; align-items: center; }
details.tabelle table { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
details.tabelle th, details.tabelle td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--rand); }
details.tabelle th:first-child, details.tabelle td:first-child { text-align: left; }

/* ---------- Am PC: Navigation links, breite Kontrollzentrale, Seite scrollt am Fensterrand */
@media (min-width: 980px) {
  body { background: radial-gradient(90% 50% at 60% -10%, #17222f 0%, var(--hg) 55%) fixed; }
  .app { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto auto 1fr;
         grid-template-areas: "kopf kopf" "nav hinweise" "nav inhalt"; height: auto; min-height: 100vh; max-width: 1240px; column-gap: 24px; padding: 0 24px; }
  .kopf { grid-area: kopf; position: sticky; top: 0; z-index: 5; padding: 14px 0; background: rgba(12, 16, 22, .92); border-bottom: 1px solid var(--rand); }
  .hinweise { grid-area: hinweise; padding-top: 18px; }
  .streifen { margin: 0 0 10px; }
  .inhalt { grid-area: inhalt; overflow: visible; padding: 18px 0 40px; }
  .tabs { grid-area: nav; position: sticky; top: 92px; align-self: start; display: grid; grid-template-columns: 1fr; gap: 6px;
          margin-top: 18px; padding: 10px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--karte); }
  .tabs button { grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; gap: 12px;
                 min-height: 48px; padding: 10px 14px; font-size: .95rem; }
  .zaehler { position: static; margin-left: auto; }
  .toast { bottom: 24px; }

  #tab-uebersicht { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #ampelKarte, #kennzahlen { grid-column: 1 / -1; }
  #kennzahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  #modusKarte { grid-column: 1 / -1; }
  #modusKarte .zweit { width: auto; padding: 10px 22px; }
  #modusKarte { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 20px; }
  #modusKarte h2 { grid-column: 1 / -1; }
  .kz .wert { font-size: 1.8rem; }

  #scheineOffen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #scheineOffen > .abschnitt, #scheineOffen > .leer { grid-column: 1 / -1; }

  #tab-topf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #topfKarte, #grenzeKarte { grid-column: 1 / -1; }

  .verlauf { max-width: 820px; }
  .eingabe { bottom: 0; padding-bottom: 16px; }
}
/* Die Symbol-Regel (svg { stroke … }) darf nicht in die Grafiken vererben: sonst weiße Ränder um die
   unsichtbaren Antippflächen und Umrisse um jede Beschriftung (gesehen 02.11.2026). */
.grafik svg { stroke: none; stroke-width: 1; fill: none; width: 100%; height: auto; }
.grafik .beschriftung { font-size: 12px; stroke: none; }
.grafik .treffer { stroke: none; }
