/* lossjonn intern – schlichtes, mobiles Layout */
:root {
  --hg: #f5f6f8; --karte: #ffffff; --text: #1f2a37; --leise: #5b6675; --linie: #d9dde3;
  --akzent: #b4232f; --akzent-text: #ffffff;
  --ok-hg: #e5f4ea; --ok: #1d6b3a; --warn-hg: #fff4d6; --warn: #7a5600; --fehler-hg: #fde8e8; --fehler: #9b1c1c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hg: #12161c; --karte: #1c222b; --text: #e8ebef; --leise: #a3acb8; --linie: #2f3843;
    --akzent: #e0505c; --akzent-text: #ffffff;
    --ok-hg: #15301f; --ok: #8fd6a7; --warn-hg: #3a2f10; --warn: #f2cf75; --fehler-hg: #3b1717; --fehler: #f4a3a3;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hg); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--akzent); }
.kopf { background: var(--karte); border-bottom: 1px solid var(--linie);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.marke { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.marke span { color: var(--akzent); }
.navi { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .95rem; }
.navi a { text-decoration: none; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--akzent); cursor: pointer; }
.inhalt { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 16px; margin: 16px 0; }
.formular { display: grid; gap: 14px; }
.formular label { display: grid; gap: 4px; font-weight: 600; }
.formular small { font-weight: 400; color: var(--leise); }
input[type=text], input[type=email], input[type=password] {
  font: inherit; font-size: 17px; padding: 12px; border: 1px solid var(--linie); border-radius: 10px;
  background: var(--karte); color: var(--text); width: 100%; }
input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
fieldset { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; padding: 0 4px; }
.formular label.haken, label.haken { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 32px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--akzent); }
.knopf { display: inline-block; background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 10px;
  padding: 13px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 48px; text-align: center; }
.hinweis { padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; }
.hinweis-ok { background: var(--ok-hg); color: var(--ok); }
.hinweis-warnung { background: var(--warn-hg); color: var(--warn); }
.hinweis-fehler { background: var(--fehler-hg); color: var(--fehler); }
.klein { font-size: .88rem; color: var(--leise); }
.marke-rolle { display: inline-block; background: var(--hg); border: 1px solid var(--linie); border-radius: 999px;
  padding: 1px 10px; font-size: .85rem; margin: 2px 2px 2px 0; }
.rechte { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rechte .ja span[aria-hidden] { color: var(--ok); font-weight: 700; }
.rechte .nein { color: var(--leise); }
.rechte .nein span[aria-hidden] { color: var(--fehler); font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.liste li { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; overflow-wrap: anywhere; }
.liste li a { display: block; color: inherit; text-decoration: none; }
.liste li.inaktiv { opacity: .6; }
.protokoll .alt { text-decoration: line-through; color: var(--leise); }
code { background: var(--hg); padding: 1px 5px; border-radius: 4px; }
.code-feld { font-size: 1.4rem !important; letter-spacing: .2em; text-align: center; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code, .schluessel { font-size: 1.05rem; padding: 6px 8px; display: inline-block; overflow-wrap: anywhere; }
.knopf-leise { background: var(--hg); color: var(--text); border: 1px solid var(--linie); }
.passwort-hinweis { margin: 2px 0 0; font-size: .92rem; font-weight: 400; min-height: 1.2em; }
.passwort-hinweis:empty { display: none; }
.passwort-ok { color: var(--ok); }
.passwort-fehler { color: var(--fehler); }
.passwort-laeuft { color: var(--leise); }
select, textarea { font: inherit; font-size: 17px; padding: 12px; border: 1px solid var(--linie); border-radius: 10px;
  background: var(--karte); color: var(--text); width: 100%; }
textarea { resize: vertical; }
input[type=tel], input[type=search], input[type=date], input[type=time], input[type=number] {
  font: inherit; font-size: 17px; padding: 12px; border: 1px solid var(--linie); border-radius: 10px;
  background: var(--karte); color: var(--text); width: 100%; }
[hidden] { display: none !important; }
.suche { display: flex; gap: 8px; margin: 0 0 14px; }
.suche input { flex: 1; }
.marke-warnung { display: inline-block; background: var(--warn-hg); color: var(--warn); border-radius: 999px; padding: 1px 10px; font-size: .85rem; }
.inhalt > h2 { margin: 24px 0 10px; }
/* Auswahl-Kacheln (statt kleiner Radio-Knöpfe) */
.wahl { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; }
.wahl legend { width: 100%; padding: 0 0 6px; }
.wahl label { flex: 1 1 0; min-width: 90px; display: block; font-weight: 600; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 8px; border: 2px solid var(--linie); border-radius: 12px; background: var(--karte); cursor: pointer; }
.wahl span small { font-weight: 400; color: var(--leise); font-size: .8rem; }
.wahl input:checked + span { border-color: var(--akzent); background: var(--akzent); color: var(--akzent-text); }
.wahl input:checked + span small { color: var(--akzent-text); }
.wahl input:focus-visible + span { outline: 3px solid var(--akzent); outline-offset: 2px; }
.wahl-gross span { min-height: 60px; font-size: 1.1rem; }
.knopf-plus { font-size: 1.2rem; width: 100%; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; }
.daten dt { color: var(--leise); }
.daten dd { margin: 0; overflow-wrap: anywhere; }
.status { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .85rem; font-weight: 600;
  background: var(--hg); border: 1px solid var(--linie); }
.status-angefragt { background: var(--warn-hg); color: var(--warn); border-color: transparent; }
.status-zugesagt, .status-vertrag_versendet, .status-vertrag_angenommen { background: var(--ok-hg); color: var(--ok); border-color: transparent; }
.status-abgesagt { text-decoration: line-through; }
.liste li.fehlt { border-left: 4px solid var(--warn); }
.karte-warnung { border-color: var(--warn); }
.stationen { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.stationen .zahl { display: inline-block; min-width: 2em; font-weight: 700; }
.stationen .leer { color: var(--leise); }
details.karte summary { cursor: pointer; font-weight: 600; }
.notiz { white-space: normal; }
.hinweis ul { margin: 6px 0 0; padding-left: 20px; }
.plz-ort { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; }
.unterfelder { display: grid; gap: 12px; padding-left: 12px; border-left: 3px solid var(--linie); }
/* Ampel */
.ampel { display: inline-flex; gap: 4px; vertical-align: middle; }
.punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.ampel-gross .punkt, .ampel-liste .punkt { width: 16px; height: 16px; }
.punkt-grau { background: #b7bec8; }
.punkt-gelb { background: #f2c230; }
.punkt-rot { background: #d93a3a; }
.punkt-gruen { background: #2f9e55; }
.ampel-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ampel-liste li { display: flex; align-items: center; gap: 8px; }
.zeile-oben { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* Hinweise unter Feldüberschriften: klein und höchstens eine Zeile */
.formular label > small, .formular legend > small, .formular label small:first-of-type {
  display: block; font-size: .78rem; font-weight: 400; color: var(--leise); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.formular label.haken small { display: inline; white-space: normal; }
/* Uhrzeit: zwei Auswahlräder */
.uhrzeit { display: flex; align-items: center; gap: 6px; border: 0; padding: 0; margin: 0; }
.uhrzeit legend { font-weight: 600; padding: 0 0 4px; width: 100%; }
.uhrzeit select { width: 5.2em; text-align: center; }
.uhrzeit span { color: var(--leise); }
