/* Kompass — ruhig, dunkel, große Flächen, mit einer Hand bedienbar. */

:root {
  --grund: #12161c;
  --karte: #1a1f27;
  --karte-hoch: #212832;
  --linie: #2c3542;
  --text: #e6e9ee;
  --text-leise: #98a2b3;
  --akzent: #6ea8fe;
  --akzent-dunkel: #23364f;
  --warm: #e8a33d;
  --rot: #e06a6a;
  --rot-dunkel: #3a2024;
  --gruen: #6ec48c;
  --rundung: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --grund: #f4f5f7;
    --karte: #ffffff;
    --karte-hoch: #eef1f5;
    --linie: #dfe3e9;
    --text: #1b2028;
    --text-leise: #5d6675;
    --akzent: #2b5fd0;
    --akzent-dunkel: #dce6fb;
    --rot-dunkel: #fbe4e4;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 88px;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------- Gerüst */

.kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--grund) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}
.marke { font-weight: 600; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; }

.knopf-krise {
  background: var(--rot-dunkel); color: var(--rot);
  border: 1px solid var(--rot); border-radius: 999px;
  padding: 7px 16px; font-size: 15px; font-weight: 600; text-decoration: none;
}

.menue summary {
  list-style: none; cursor: pointer; font-size: 24px; line-height: 1;
  padding: 4px 10px; border-radius: 10px; background: var(--karte);
}
.menue summary::-webkit-details-marker { display: none; }
.menue nav {
  position: absolute; right: 12px; margin-top: 8px;
  background: var(--karte-hoch); border: 1px solid var(--linie);
  border-radius: var(--rundung); padding: 6px; min-width: 200px;
  display: flex; flex-direction: column; z-index: 30;
}
.menue nav a { padding: 12px 14px; color: var(--text); text-decoration: none; border-radius: 10px; }
.menue nav a:hover { background: var(--karte); }

.inhalt { padding: 14px 14px 24px; max-width: 640px; margin: 0 auto; }

.fussleiste {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--grund) 94%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
.fussleiste a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; font-size: 11px;
  color: var(--text-leise); text-decoration: none;
}
.fussleiste a.aktiv { color: var(--akzent); }
.fussleiste .zeichen { font-size: 19px; line-height: 1; }

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

.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--rundung);
  padding: 16px;
  margin-bottom: 12px;
  display: block;
  color: inherit;
  text-decoration: none;
}
.karte.haupt { background: var(--karte-hoch); }

.karte.dringend {
  border-color: var(--warm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--warm) 12%, var(--karte)), var(--karte));
}
.karte.jetzt {
  border-color: var(--rot);
  background: var(--rot-dunkel);
}
.karte.jetzt .gross { color: var(--rot); }
.karte.hinweis { border-left: 3px solid var(--akzent); }
.karte.anker { border-left: 3px solid var(--gruen); }
.karte.rueckblick { border-left: 3px solid var(--text-leise); }
.karte.auffordern { border-style: dashed; }
.karte.krisenkarte { background: var(--rot-dunkel); border-color: var(--rot); }

h1 { font-size: 25px; margin: 0 0 10px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 18px; margin: 0 0 10px; font-weight: 600; }
h2 small { font-weight: 400; color: var(--text-leise); font-size: 14px; }

.gross { font-size: 21px; line-height: 1.35; margin: 4px 0; }
.klein { font-size: 13px; color: var(--text-leise); margin: 0 0 6px; }
.leise { color: var(--text-leise); font-size: 15px; }
.zahl { font-size: 20px; color: var(--akzent); }
.kette { text-align: center; color: var(--text-leise); font-size: 13px; padding: 8px; }

.karte-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

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

.feld { margin-bottom: 18px; }
label { display: block; font-size: 15px; margin-bottom: 6px; font-weight: 500; }
.hilfe { font-size: 13px; color: var(--text-leise); margin: 0 0 6px; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=time], textarea, select {
  width: 100%; padding: 13px 14px; font-size: 17px; font-family: inherit;
  color: var(--text); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 11px;
}
textarea { resize: vertical; min-height: 52px; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--akzent); outline-offset: 1px; border-color: transparent;
}

input[type=range].regler {
  width: 100%; height: 34px; -webkit-appearance: none; appearance: none;
  background: transparent; margin: 4px 0;
}
input[type=range].regler::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px; background: var(--linie);
}
input[type=range].regler::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px;
  border-radius: 50%; background: var(--akzent); border: 3px solid var(--grund);
}
input[type=range].regler::-moz-range-track { height: 8px; border-radius: 4px; background: var(--linie); }
input[type=range].regler::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; background: var(--akzent); border: 3px solid var(--grund);
}
.regler-wert {
  display: inline-block; min-width: 2.2em; text-align: center;
  font-size: 19px; color: var(--akzent); font-weight: 600;
}

.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schalter label { margin: 0; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--akzent); }

/* ---------------------------------------------------------------- Knöpfe */

.knopf-haupt, .knopf-zweit, .knopf-leise, button, .chip {
  font-family: inherit; cursor: pointer;
}
.knopf-haupt {
  display: block; width: 100%; padding: 15px 18px; font-size: 17px; font-weight: 600;
  background: var(--akzent); color: #0d1420; border: none;
  border-radius: 12px; text-align: center; text-decoration: none;
}
.knopf-zweit {
  display: block; width: 100%; padding: 15px 18px; font-size: 17px; font-weight: 600;
  background: var(--akzent-dunkel); color: var(--text);
  border: 1px solid var(--linie); border-radius: 12px; text-align: center; text-decoration: none;
}
.knopf-leise {
  display: inline-block; padding: 10px 16px; font-size: 15px;
  background: transparent; color: var(--akzent);
  border: 1px solid var(--linie); border-radius: 10px; text-decoration: none;
}
.knopf-haupt.breit { margin-bottom: 12px; }
.zwei-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zwei-knoepfe.abstand { margin-bottom: 14px; }

.chip {
  display: inline-block; padding: 8px 13px; margin: 0 6px 6px 0; font-size: 14px;
  background: var(--karte); color: var(--text-leise);
  border: 1px solid var(--linie); border-radius: 999px; text-decoration: none;
}
.chip.an { background: var(--akzent-dunkel); color: var(--akzent); border-color: var(--akzent); }
.starthilfen { margin: 10px 0 14px; }
.zeitraum { margin-top: 10px; }

/* ---------------------------------------------------------------- Zeilen */

.zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--linie);
  color: inherit; text-decoration: none;
}
.zeile:last-child { border-bottom: none; }
.zeile.bereit .frist { color: var(--warm); }
.frist { color: var(--text-leise); font-size: 14px; white-space: nowrap; }
.zeile-karte { margin-bottom: 10px; }
.zeile-block { padding: 12px 0; border-bottom: 1px solid var(--linie); }
.zeile-block.erledigt { opacity: .5; }

.antworten { margin: 0; }
.antworten dt { font-size: 13px; color: var(--text-leise); margin-top: 12px; }
.antworten dd { margin: 3px 0 0; }

.anker-liste { margin: 6px 0 0; padding-left: 20px; }
.anker-liste li { margin-bottom: 4px; }

/* --------------------------------------------------------------- Schleuse */

.frist-anzeige {
  text-align: center; padding: 18px; margin: 14px 0;
  background: var(--grund); border-radius: var(--rundung); border: 1px solid var(--linie);
}
.frist-anzeige .gross { font-size: 30px; font-variant-numeric: tabular-nums; color: var(--warm); }
.freigabe { color: var(--gruen); font-weight: 600; }
.bilanz-zeile { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linie); }
.karte.bilanz b { color: var(--akzent); }

/* ---------------------------------------------------------------- Dialog */

.dialog { margin-bottom: 12px; }
.blase { padding: 13px 16px; border-radius: 16px; margin-bottom: 10px; max-width: 92%; }
.blase.frage { background: var(--akzent-dunkel); border-bottom-left-radius: 5px; }
.blase.ich { background: var(--karte); border: 1px solid var(--linie); margin-left: auto; border-bottom-right-radius: 5px; }
.ki-frage {
  margin: 12px 0; padding: 13px 16px; border-left: 3px solid var(--akzent);
  background: var(--akzent-dunkel); border-radius: 0 11px 11px 0;
}
.fazit { color: var(--gruen); font-size: 14px; }

/* ---------------------------------------------------------------- Kurven */

.kurve { width: 100%; height: 60px; display: block; margin: 8px 0; }
.kurve .linie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.kurve .schlaf { stroke: var(--akzent); }
.kurve .energie { stroke: var(--warm); }
.kurve .anspannung { stroke: var(--rot); }
.kurve .stimmung { stroke: var(--gruen); }
.kurve .hilfslinie { stroke: var(--linie); stroke-width: 1; stroke-dasharray: 3 4; }

.regler-uebersicht { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.regler-uebersicht div { background: var(--grund); border-radius: 10px; padding: 10px 12px; }
.regler-uebersicht span { display: block; font-size: 12px; color: var(--text-leise); }
.regler-uebersicht b { font-size: 19px; }

/* ------------------------------------------------------------ Grundlagen */

.warum { margin: 10px 0 0; }
.warum summary {
  cursor: pointer; font-size: 14px; color: var(--akzent);
  list-style: none; padding: 8px 0;
}
.warum summary::-webkit-details-marker { display: none; }
.warum summary::before { content: "ⓘ "; }
.warum-inhalt {
  font-size: 15px; color: var(--text-leise);
  border-left: 2px solid var(--linie); padding: 4px 0 4px 12px;
}
.verfahren { font-size: 14px; color: var(--text-leise); font-style: italic; }
.quellen { padding-left: 18px; margin: 8px 0 0; font-size: 14px; }
.quellen li { margin-bottom: 10px; color: var(--text-leise); }
.quellen a { color: var(--akzent); }
.quellen .art { display: block; font-size: 12px; opacity: .75; }
.kurz { font-size: 16px; }
.grenze {
  border: 1px solid var(--warm); background: color-mix(in srgb, var(--warm) 8%, transparent);
  border-radius: 11px; padding: 12px 14px; font-size: 14px;
}
.bausteinliste li { margin-bottom: 12px; }
.bausteinliste .verfahren { display: block; }
.ablauf li { margin-bottom: 8px; }
.untertitel { font-size: 17px; color: var(--text-leise); }
.verweis { font-size: 12px; word-break: break-all; }

/* --------------------------------------------------------------- Notruf */

.karte.notruf { border-color: var(--rot); }
.notruf-knopf {
  display: block; padding: 16px; margin-bottom: 9px; text-align: center;
  background: var(--karte-hoch); color: var(--text); text-decoration: none;
  border: 1px solid var(--linie); border-radius: 12px; font-size: 17px; font-weight: 600;
}
.notruf-knopf.dringend { background: var(--rot); color: #1b1013; border-color: var(--rot); }

/* ------------------------------------------------------------- Meldungen */

.meldungen { padding: 10px 14px 0; max-width: 640px; margin: 0 auto; }
.meldung { padding: 11px 14px; border-radius: 11px; background: var(--karte-hoch); margin: 0 0 8px; font-size: 15px; }
.meldung.error { background: var(--rot-dunkel); color: var(--rot); }
.meldung.success { border-left: 3px solid var(--gruen); }
.hinweis-leise {
  font-size: 14px; color: var(--text-leise);
  background: var(--grund); border-radius: 10px; padding: 11px 13px;
}
code { background: var(--grund); padding: 2px 6px; border-radius: 5px; font-size: 14px; }

/* -------------------------------------------------------------- Anmelden */

.anmelden { max-width: 360px; margin: 12vh auto 0; text-align: center; }
.anmelden form { text-align: left; margin-top: 26px; }
.anmelden label { margin-top: 14px; }
.anmelden button { margin-top: 22px; }

/* ---------------------------------------------------------------- Drucken */

.nur-drucken { display: none; }

@media print {
  :root { --grund: #fff; --karte: #fff; --karte-hoch: #fff; --text: #000;
          --text-leise: #444; --linie: #bbb; --akzent: #000; }
  body { padding: 0; font-size: 11pt; }
  .kopf, .fussleiste, .nicht-drucken, .meldungen, .warum { display: none !important; }
  .nur-drucken { display: block; }
  .karte { border: none; border-bottom: 1px solid #ddd; border-radius: 0;
           padding: 8px 0; margin: 0; page-break-inside: avoid; }
  .waehler input { display: none; }
  .auswaehlbar:not(.mitnehmen) { display: none !important; }
  a { color: #000; text-decoration: none; }
  .druckkopf { margin-bottom: 14px; }
}
