/* Dokio — Optik nach dem Mockup (2026-10-29): ruhig, Petrol als Akzent,
   Vorschläge gestrichelt, Fristen in Bernstein. Aufbau wie pendel-check.
   Wird über index.php mit ?v=VERSION geladen. */
:root {
  --grund: #f3f5f7; --karte: #ffffff; --rand: #dce1e6; --linie: #e4e8ec;
  --text: #17212b; --leise: #5a6573; --feld: #b8c2cc; --knopf-rand: #c9d1d9;
  --akzent: #0f6a73; --akzent-dunkel: #0b5158; --akzent-hell: #e3eef0; --akzent-text: #0b5158;
  --warn: #7a4800; --warn-grund: #fff1d6; --frist: #9a5b00;
  --schlecht: #8f1d16; --schlecht-grund: #fde8e6; --rot: #b42318;
  --ok: #1f7a4d; --neutral: #3e4955; --neutral-grund: #e4e8ec;
  --schatten: 0 1px 3px rgba(23, 33, 43, .16);
  --papier: #ffffff; --papier-strich: #d5dbe1; --papier-kopf: #aeb8c2;
  /* Schrift auf Akzentflächen: hell auf Petrol, im Dunkeln dunkel auf Hellpetrol */
  --auf-akzent: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0f1619; --karte: #172126; --rand: #2a3a40; --linie: #233237;
    --text: #e6eef0; --leise: #9db0b6; --feld: #4a5d64; --knopf-rand: #3a4d54;
    --akzent: #4fb7c1; --akzent-dunkel: #8fd6dd; --akzent-hell: #16343a; --akzent-text: #a8e0e5;
    --warn: #f4c27a; --warn-grund: #3a2a12; --frist: #f4c27a;
    --schlecht: #ff9d94; --schlecht-grund: #3d1a18; --rot: #ff8a80;
    --ok: #7fd49a; --neutral: #c3cfd4; --neutral-grund: #223137;
    --papier: #e9edef; --papier-strich: #b9c3ca; --papier-kopf: #8c98a2;
    --auf-akzent: #082326;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; touch-action: manipulation;
}
a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
.klein { font-size: 14px; color: var(--leise); }
.leise { color: var(--leise); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grundgerüst */
.huelle { max-width: 680px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.kopf { padding: calc(12px + env(safe-area-inset-top)) 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.haushalt-knopf { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 0; border: 0; background: none; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); min-width: 0; }
.haushalt-knopf span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.haushalt-knopf img { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.kopf h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.kopf .unterzeile { margin: 2px 0 0; font-size: 14px; color: var(--leise); }
.kopf-zurueck { padding: calc(8px + env(safe-area-inset-top)) 8px 4px; display: flex; align-items: center; gap: 2px; }
.kopf-zurueck .zurueck { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 2px; text-decoration: none; font-size: 16px; font-weight: 500; color: var(--akzent); background: none; border: 0; cursor: pointer; }
.kopf-zurueck .zurueck svg { width: 22px; height: 22px; }
.kopf-zurueck .rechts { margin-left: auto; display: flex; gap: 2px; }
.inhalt { flex: 1; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.nav { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid var(--rand); background: var(--karte); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; color: var(--leise); font-size: 12px; font-weight: 500; position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--akzent); font-weight: 700; }
.nav .plus { width: 56px; height: 56px; min-height: 56px; border-radius: 28px; background: var(--akzent); color: var(--auf-akzent); margin: 0 28px; box-shadow: var(--schatten); }
.nav .plus svg { width: 28px; height: 28px; }
.nav .plus:hover { color: var(--auf-akzent); background: var(--akzent-dunkel); }
.nav .zahl { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--akzent); color: var(--auf-akzent); border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }

/* ---------- Bausteine */
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; }
.karte-pad { padding: 14px 16px; }
.karte h2 { font-size: 16px; font-weight: 700; }
.liste > * + * { border-top: 1px solid var(--linie); }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; text-decoration: none; color: inherit; }
.zeile .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zeile .pfeil { width: 16px; height: 16px; color: var(--feld); flex: none; }
.titel-abschnitt { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); margin: 8px 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.gestrichelt { background: transparent; border: 1px dashed var(--akzent); color: var(--akzent); padding: 3px 8px; }
.chip.warn { background: var(--warn-grund); color: var(--warn); }
.chip.neutral { background: var(--neutral-grund); color: var(--neutral); }
.chip.rahmen { background: transparent; border: 1px solid var(--knopf-rand); color: var(--neutral); padding: 3px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kreis { display: inline-flex; width: 24px; height: 24px; border-radius: 12px; background: #2f5d8a; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; flex: none; }
.kreis.gross { width: 32px; height: 32px; border-radius: 16px; font-size: 13px; }
.kreis.f1 { background: #8b4a1f; } .kreis.f2 { background: #5b4ba8; } .kreis.f3 { background: #1f7a4d; } .kreis.f4 { background: #7a3b5a; }
.hinweis { padding: 12px 14px; border-radius: 12px; font-size: 15px; margin: 0; }
.hinweis-fehler { background: var(--schlecht-grund); color: var(--schlecht); }
.hinweis-info { background: var(--akzent-hell); color: var(--text); }
.hinweis-warn { background: var(--warn-grund); color: var(--warn); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--knopf-rand); background: var(--karte); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--leise); color: var(--text); }
.btn-haupt { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.btn-haupt:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: var(--auf-akzent); }
.btn-klein { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-gefahr { color: var(--rot); }
.btn-gefahr:hover { color: var(--rot); background: var(--schlecht-grund); border-color: transparent; }
.btn-link { color: var(--akzent); border-color: transparent; background: transparent; padding: 0 6px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopf-reihe > .btn { flex: 1 1 140px; }
.knopf-stapel { display: flex; flex-direction: column; gap: 8px; }
.icon-knopf { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); flex: none; text-decoration: none; padding: 0; }
.icon-knopf svg { width: 22px; height: 22px; }
.icon-knopf:hover { background: var(--neutral-grund); }

/* Schalter */
.schalter { position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; cursor: pointer; flex: none; background: var(--feld); padding: 0; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.schalter[aria-checked="true"] { background: var(--akzent); }
.schalter[aria-checked="true"]::after { left: 23px; }
.schalter-zeile { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.schalter-zeile label { flex: 1; font-size: 15px; }

/* Formulare */
.feld, input[type=email], input[type=text], input[type=date], input[type=search], select, textarea {
  min-height: 46px; border-radius: 10px; border: 1px solid var(--feld); padding: 0 12px; font-size: 16px; background: var(--karte); width: 100%; min-width: 0;
}
textarea { padding: 10px 12px; min-height: 84px; resize: vertical; line-height: 1.4; }
select { appearance: auto; }
/* Datumsfelder: schmaler Innenabstand, sonst schneidet Chrome das Kalenderzeichen ab */
input[type=date] { padding: 0 8px; }
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, .schalter:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 55%, transparent); outline-offset: 2px; }
.feld-gruppe { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feld-gruppe > label, .feldname { font-size: 13px; font-weight: 600; color: var(--leise); }
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.felder .breit { grid-column: 1 / -1; }
.umschalter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--neutral-grund); }
.umschalter button, .umschalter a { min-height: 38px; border-radius: 9px; border: 0; font-size: 14px; font-weight: 500; cursor: pointer; background: transparent; color: var(--neutral); display: flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.umschalter [aria-current="true"], .umschalter [aria-pressed="true"] { background: var(--karte); color: var(--text); font-weight: 600; box-shadow: var(--schatten); }

/* ---------- Dokument-Karten (Eingang, Ablage) */
.dok-karte { display: flex; gap: 12px; padding: 14px; background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; text-decoration: none; color: var(--text); }
.dok-karte:hover { border-color: var(--feld); color: var(--text); }
.dok-karte .mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dok-karte .oben { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dok-karte .titel { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dok-karte .betrag { font-size: 15px; font-weight: 600; flex: none; }
.dok-karte .meta { font-size: 13px; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dok-karte .fund { font-size: 13px; color: var(--neutral); background: var(--neutral-grund); border-radius: 6px; padding: 4px 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dok-karte .fund mark { background: color-mix(in srgb, var(--warn-grund) 70%, #ffd666); color: inherit; border-radius: 2px; }
.dok-karte .unten { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--neutral); min-height: 24px; }
.dok-karte .unten svg { width: 16px; height: 16px; flex: none; }
.dok-karte .unten .kreis { margin-left: auto; }
.dok-karte .unten.frist { color: var(--frist); font-weight: 600; }
.miniatur { flex: none; width: 46px; height: 60px; border: 1px solid var(--knopf-rand); border-radius: 6px; background: var(--papier); overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 9px 7px; }
.miniatur img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.miniatur.mit-bild { padding: 0; }
.miniatur span { display: block; height: 3px; border-radius: 2px; background: var(--papier-strich); }
.miniatur span:first-child { background: var(--papier-kopf); width: 70%; }
.dreht { animation: drehen .9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dreht { animation: none; opacity: .6; } }

.suche-zeile { display: flex; gap: 8px; }
.suche-zeile input { flex: 1; }
.filter-feld { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.aktive-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.aktive-filter button { border: 0; cursor: pointer; min-height: 32px; }
.aktive-filter svg { width: 14px; height: 14px; }

/* ---------- Dokument-Ansicht */
.dok-kopf { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.dok-kopf h1 { font-size: 25px; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.dok-kopf .meta { margin: 0; font-size: 14px; color: var(--leise); }
.dok-kopf .chips button.chip { cursor: pointer; border: 1px solid var(--knopf-rand); background: var(--karte); color: var(--neutral); min-height: 30px; padding: 3px 10px; }
.dok-kopf .chips button.chip svg, .dok-kopf .chips .chip svg { width: 14px; height: 14px; }
.seiten-reihe { display: flex; gap: 10px; overflow-x: auto; padding: 14px 20px 6px; scroll-snap-type: x proximity; }
.seiten-reihe button { flex: none; width: 104px; height: 140px; padding: 0; border: 1px solid var(--knopf-rand); border-radius: 6px; background: var(--papier); overflow: hidden; cursor: zoom-in; box-shadow: 0 2px 6px rgba(23, 33, 43, .08); position: relative; scroll-snap-align: start; }
.seiten-reihe button img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.seiten-reihe button .nr { position: absolute; right: 4px; bottom: 4px; background: rgba(23, 33, 43, .72); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.seiten-reihe .platzhalter { flex: none; width: 104px; height: 140px; border: 1px dashed var(--feld); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--leise); text-align: center; padding: 8px; }
.seiten-reihe .platzhalter svg { width: 22px; height: 22px; }
.text-zeile { display: flex; align-items: center; gap: 6px; padding: 0 20px; font-size: 13px; color: var(--neutral); }
.text-zeile svg { width: 16px; height: 16px; flex: none; color: var(--ok); }
.text-zeile.fehler { color: var(--schlecht); }
.text-zeile.fehler svg { color: var(--schlecht); }
.abschnitte { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.abschnitt { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.gespeichert { font-size: 13px; color: var(--ok); font-weight: 600; opacity: 0; transition: opacity .2s; }
.gespeichert.zeigen { opacity: 1; }
.schlagwort-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; padding: 0 2px 0 11px; min-height: 34px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-text); }
.schlagwort-chip button { width: 30px; height: 30px; border: 0; background: none; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 15px; padding: 0; }
.schlagwort-chip button svg { width: 14px; height: 14px; }
.schlagwort-neu { display: flex; gap: 8px; }
.schlagwort-neu input { flex: 1; }
.erkannt { margin: 0; white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--neutral); max-height: 360px; overflow: auto; background: var(--grund); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-weight: 700; font-size: 16px; min-height: 28px; list-style-position: inside; }
.verlauf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.verlauf li { display: flex; flex-direction: column; }
.verlauf .zeit { font-size: 12px; color: var(--leise); }
.aktion-leiste { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--karte); border-top: 1px solid var(--rand); margin-top: 16px; z-index: 5; }
.aktion-leiste.eins { grid-template-columns: 1fr; }

/* ---------- Hinzufügen */
.ablage-feld { display: flex; flex-direction: column; gap: 10px; }
.auswahl-knopf { position: relative; overflow: hidden; }
.auswahl-knopf input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.auswahl-teil { position: relative; aspect-ratio: 3 / 4; border: 1px solid var(--knopf-rand); border-radius: 8px; background: var(--papier); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #3e4955; text-align: center; padding: 6px; }
.auswahl-teil img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auswahl-teil svg { width: 26px; height: 26px; }
.auswahl-teil .weg { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 16px; border: 0; background: rgba(23, 33, 43, .72); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 1; }
.auswahl-teil .weg svg { width: 16px; height: 16px; }
.auswahl-teil .nr { position: absolute; left: 4px; bottom: 4px; background: rgba(23, 33, 43, .72); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; z-index: 1; }
.auswahl-teil .name { overflow-wrap: anywhere; }
.fortschritt { height: 8px; border-radius: 4px; background: var(--neutral-grund); overflow: hidden; }
.fortschritt div { height: 100%; background: var(--akzent); width: 0; transition: width .2s; }
.weg-zeile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px; text-decoration: none; color: inherit; }
.weg-zeile .symbol { flex: none; display: flex; width: 40px; height: 40px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-text); align-items: center; justify-content: center; }
.weg-zeile .symbol svg { width: 20px; height: 20px; }
.weg-zeile .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.weg-zeile strong { font-size: 15px; }

/* ---------- Kurzbefehl, Konto, Verwaltung */
.schritte { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.schluessel { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--grund); border: 1px dashed var(--feld); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; user-select: all; }
.mitglied { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.mitglied .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mitglied .wachsen > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitglied.anfrage { flex-wrap: wrap; }
.mitglied.anfrage .wachsen { flex: 1 1 100%; }
.mitglied.anfrage .knopf-reihe { flex: 1 1 100%; }
.pruef-zeile { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 10px 16px; font-size: 14px; }
.pruef-zeile svg { width: 18px; height: 18px; margin-top: 2px; }
.pruef-zeile > * { min-width: 0; overflow-wrap: anywhere; }
.pruef-zeile .ok { color: var(--ok); }
.pruef-zeile .nein { color: var(--rot); }
.pruef-zeile .egal { color: var(--leise); }
.code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--grund); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }

/* ---------- Anmeldung */
.anmelden { max-width: 440px; margin: 0 auto; padding: calc(56px + env(safe-area-inset-top)) 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.anmelden .marke { display: flex; flex-direction: column; gap: 14px; }
.anmelden .zeichen { width: 64px; height: 64px; }
.anmelden h1 { font-size: 30px; }
.anmelden h2 { font-size: 24px; }
.anmelden p { margin: 0; }
.anmelden .unterzeile { font-size: 17px; color: var(--leise); }
.anmelden .btn-haupt { min-height: 52px; font-size: 17px; }
.formular { display: flex; flex-direction: column; gap: 12px; }
.karte.formular { padding: 16px; }
.code-feld { font-size: 28px !important; letter-spacing: .3em; text-align: center; font-weight: 700; height: 60px !important; }
.zeile-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 15px; }
.inline { display: inline; }
.link-knopf { border: 0; background: none; padding: 0; color: var(--akzent); text-decoration: underline; cursor: pointer; font-size: 15px; }
.ios-tipp { padding: 14px 16px; font-size: 14px; }

/* ---------- Dialog, Meldung, Leer */
.schleier { position: fixed; inset: 0; background: rgba(8, 16, 20, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding: 16px; }
@media (min-width: 600px) { .schleier { align-items: center; } }
.dialog { background: var(--karte); border-radius: 18px; width: 100%; max-width: 440px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); max-height: calc(100dvh - 32px); overflow: auto; }
.dialog h2 { font-size: 19px; }
.dialog p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--grund); padding: 12px 16px; border-radius: 12px; font-size: 15px; z-index: 30; max-width: calc(100% - 32px); box-shadow: var(--schatten); white-space: pre-line; }
.laedt { padding: 40px 16px; text-align: center; color: var(--leise); }
.leer { padding: 32px 16px; text-align: center; color: var(--leise); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.leer svg { width: 40px; height: 40px; color: var(--feld); }
.fuss { padding: 8px 16px 16px; font-size: 12px; color: var(--leise); text-align: center; }

/* ---------- Seitenbetrachter (Muster aus kon-wiki/trip-planner) */
.bild-overlay { position: fixed; inset: 0; z-index: 60; background: var(--grund); display: flex; flex-direction: column; }
.bild-kopf { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--rand); background: var(--karte); }
.bild-titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.bild-titel .leise { font-weight: 400; }
.bild-werkzeuge { display: flex; gap: 6px; align-items: center; flex: none; }
.bild-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation;
  background: var(--grund); border: 1px solid var(--rand); color: var(--text); cursor: pointer; }
.bild-btn svg { width: 20px; height: 20px; }
.bild-btn:hover { border-color: var(--akzent); }
.bild-btn:disabled { opacity: .35; }
.bild-zu { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
@media (max-width: 700px) {
  .bild-kopf { flex-wrap: wrap; gap: 6px 8px; }
  .bild-titel { flex: 1 1 100%; }
  .bild-werkzeuge { flex: 1 1 100%; justify-content: space-between; }
}
.bild-koerper { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); text-align: center; background: var(--grund); }
.bild-img { display: block; margin: 0 auto; max-width: none; height: auto; border-radius: 4px; box-shadow: 0 2px 12px rgba(0, 0, 0, .25); background: #fff; }
.bild-meldung { color: var(--leise); padding: 16px; }
