/* 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;
  /* Zeichen auf Grün/Rot und der gewählte Reiter – im Dunkeln eigene Werte für Kontrast */
  --auf-ok: #ffffff; --auf-rot: #ffffff; --umschalter-an: #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;
    --auf-ok: #0b2416; --auf-rot: #2a0b09; --umschalter-an: #34484f;
    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 img { width: 30px; height: 30px; border-radius: 9px; flex: none; }
/* Umschalter der Bereiche (Kopf am Handy, Seitenleiste breit) und sein Menü */
.bereich-knopf { font-family: inherit; text-align: left; }
.bereich-knopf .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bereich-knopf > svg { width: 18px; height: 18px; flex: none; color: var(--leise); margin-left: -4px; }
.bereich-zahl { flex: none; background: transparent; color: var(--akzent); box-shadow: inset 0 0 0 1.5px var(--akzent); border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center; }
.bereich-menue { position: fixed; z-index: 60; width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 80px); overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
.bereich-menue button { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.bereich-menue button:hover, .bereich-menue button[aria-checked="true"] { background: var(--akzent-hell); }
.bereich-menue .symbol, .bereich-zeile .symbol { flex: none; display: flex; width: 36px; height: 36px; border-radius: 10px; background: var(--grund); color: var(--akzent-text); align-items: center; justify-content: center; }
.bereich-menue .symbol svg, .bereich-zeile .symbol svg { width: 20px; height: 20px; }
.bereich-menue .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bereich-menue strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bereich-menue .haken { flex: none; width: 20px; height: 20px; color: var(--akzent); }
.bereich-menue .haken svg { width: 20px; height: 20px; }
.bereich-menue a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; margin-top: 4px; border-top: 1px solid var(--linie); font-size: 15px; font-weight: 600; text-decoration: none; }
.bereich-zeile { width: 100%; border: 0; border-bottom: 1px solid var(--linie); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.bereich-zeile:last-child { border-bottom: 0; }
.bereich-zeile[aria-current="true"] { background: var(--akzent-hell); }
.bereich-zeile[aria-current="true"]:first-child { border-radius: 14px 14px 0 0; }
.bereich-zeile[aria-current="true"]:last-child { border-radius: 0 0 14px 14px; }
.bereich-zeile[aria-current="true"]:only-child { border-radius: 14px; }
.bereich-zeile strong { font-size: 15px; overflow-wrap: anywhere; }
.bereich-zeile[aria-current="true"] .chip, .bereich-menue [aria-checked="true"] .chip { background: var(--karte); }
.landet-in { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--akzent-hell); color: var(--akzent-text); font-size: 15px; }
.landet-in > svg { width: 20px; height: 20px; flex: none; }
.landet-in .wachsen { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.landet-in .btn { min-height: 44px; flex: none; }
.ziel-wahl { display: flex; flex-direction: column; gap: 8px; }
.ziel-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; border: 1px solid var(--knopf-rand); border-radius: 12px; cursor: pointer; }
.ziel-option:has(input:checked) { border: 2px solid var(--akzent); background: var(--akzent-hell); padding: 5px 13px; }
.ziel-option input { width: 20px; height: 20px; accent-color: var(--akzent); flex: none; margin: 0; }
.ziel-option .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ziel-regeln { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
/* Freigaben: Dialog je Bereich, Hinweis im freigegebenen Dokument */
.freigabe-liste { display: flex; flex-direction: column; gap: 8px; }
.freigabe-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--knopf-rand); border-radius: 12px; }
.freigabe-zeile .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.freigabe-zeile strong { overflow-wrap: anywhere; }
.freigabe-zeile select { width: auto; flex: none; max-width: 52%; min-height: 42px; font-size: 15px; }
.freigabe-hinweis { display: flex; gap: 10px; align-items: flex-start; }
.freigabe-hinweis > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.chip.rahmen svg, .chip svg { width: 14px; height: 14px; flex: none; }
.kopf h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.kopf-titel { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kopf-titel > div { min-width: 0; }
.kopf-titel > .btn { flex: none; margin-bottom: 2px; }
.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; }
.kopf-zurueck .folge { display: flex; align-items: center; margin-right: 6px; }
.kopf-zurueck .folge-zahl { font-size: 13px; color: var(--leise); min-width: 2.6em; text-align: center; font-variant-numeric: tabular-nums; }
.kopf-zurueck .icon-knopf.aus { opacity: .3; }
.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 1fr auto 1fr 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 6px; box-shadow: var(--schatten); }
.nav a .kreis { width: 24px; height: 24px; font-size: 10px; }
.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-link:hover { color: var(--akzent-dunkel); border-color: transparent; background: var(--akzent-hell); }
.btn-link.btn-gefahr:hover { color: var(--rot); background: var(--schlecht-grund); }
.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); }
.icon-knopf.nur-breit, .text-zeile.nur-breit { display: none; }
@media (min-width: 1000px) { .icon-knopf.nur-breit, .text-zeile.nur-breit { display: flex; } }

/* Drucken: nur der Druckbereich (dokumentDrucken), je Seite ein Blatt.
   Höhe in mm statt vh – passt auf A4 wie Letter, auch in Safari */
.druck { display: none; }
@media print {
  @page { margin: 8mm; }
  body { background: #fff !important; }
  body > *:not(.druck) { display: none !important; }
  .druck { display: block; color: #000; }
  .druck-seite { break-after: page; page-break-after: always; }
  .druck-seite:last-child { break-after: auto; page-break-after: auto; }
  .druck-seite img { display: block; max-width: 100%; max-height: 260mm; margin: 0 auto; }
  .druck-titel { font-size: 16pt; margin: 0 0 6mm; }
  .druck-text { white-space: pre-wrap; font: 10pt/1.4 ui-monospace, Menlo, monospace; margin: 0; }
}

/* 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; }
/* Eigener Pfeil: Safari zeichnet Auswahlfelder sonst als niedrigen
   Mac-Knopf, der Höhe und Innenabstand ignoriert */
select { appearance: none; -webkit-appearance: none; padding-right: 32px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--leise) 50%), linear-gradient(135deg, var(--leise) 50%, transparent 50%);
  background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; }
/* Datumsfelder: schmaler Innenabstand, sonst schneidet Chrome das Kalenderzeichen ab */
input[type=date] { padding: 0 8px; }
/* iPhone/iPad: das eingebaute Datumsfeld ist breiter als seine Spalte und
   steht mittig – ohne eigene Darstellung hält es die Breite (Auswahl bleibt) */
@supports (-webkit-touch-callout: none) {
  input[type=date] { -webkit-appearance: none; appearance: none; display: block; padding: 0 12px; }
  input[type=date]::-webkit-date-and-time-value { text-align: left; }
}
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .schalter:focus-visible,
.auswahl-knopf:has(input: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, .feld-kopf > label, .feldname { font-size: 13px; font-weight: 600; color: var(--leise); }
.feld-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.feld-kopf .herkunft { margin-left: 0; }
/* Felder unten bündig: eine umbrechende Beschriftung verschiebt das Nachbarfeld nicht */
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.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(--umschalter-an); color: var(--text); font-weight: 600; box-shadow: var(--schatten); }
.umschalter button:not([aria-pressed="true"]):hover, .umschalter a:not([aria-current="true"]):hover { color: var(--text); }

/* ---------- 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; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.dok-karte .betrag { font-size: 15px; font-weight: 600; flex: none; }
.dok-karte .meta { font-size: 13px; color: var(--leise); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.dok-karte .mitte { gap: 3px; }
.dok-karte .oben { align-items: flex-start; }
.dok-karte .titel { font-weight: 700; line-height: 1.3; }
.dok-karte .betrag { font-weight: 700; font-size: 16px; line-height: 1.3; }
.dok-karte .absender { font-size: 14px; color: var(--neutral); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dok-karte .stand { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--neutral); }
.dok-karte .st { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.dok-karte .st svg { width: 15px; height: 15px; flex: none; }
.st.frist { color: var(--frist); } .st.ueber { color: var(--rot); } .st.ok { color: var(--ok); } .st.warn { color: var(--warn); }
.dok-karte .tags { font-size: 12px; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); margin-right: 6px; vertical-align: 2px; }
.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; }
@media (pointer: coarse) {
  .btn-klein { min-height: 44px; }
  .aktive-filter button { min-height: 40px; }
  .auswahl-teil .weg { width: 40px; height: 40px; border-radius: 20px; top: 2px; right: 2px; }
}
.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; }
/* Schlagwörter: Chips und Eingabe in einem Feld; „Hinzufügen“ erst, wenn etwas getippt ist */
.sw-feld { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 5px 6px; border: 1px solid var(--feld); border-radius: 10px; background: var(--karte); cursor: text; }
.sw-feld:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--akzent) 55%, transparent); outline-offset: 2px; }
#sw-liste { display: contents; }
.schlagwort-neu { flex: 1 1 150px; display: flex; gap: 6px; min-width: 0; }
.schlagwort-neu input { flex: 1; min-height: 34px; border: 0; padding: 0 6px; background: transparent; }
.schlagwort-neu input:focus-visible { outline: none; }
.schlagwort-neu .btn { min-height: 34px; }
.schlagwort-neu input:placeholder-shown ~ .btn { display: none; }
#notiz textarea { min-height: 64px; field-sizing: content; max-height: 50vh; }
.versicherung-bereich { display: flex; flex-direction: column; gap: 8px; }
.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; }
/* Am Handy fest am unteren Rand: „sticky“ in der Spalte rutschte auf dem
   iPhone beim Scrollen mit nach oben. Unten Platz, damit nichts darunter verschwindet */
@media (max-width: 999px) {
  .aktion-leiste { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; box-shadow: 0 -2px 14px rgba(0, 0, 0, .08); }
  .dok-spalte { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- 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: var(--neutral); 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; }
.kurzbefehl-laden { display: flex; gap: 20px; align-items: flex-start; }
.kurzbefehl-laden .schritte { flex: 1; }
/* Der QR-Code hilft nur am Rechner – auf dem iPhone reicht der Knopf */
.kurzbefehl-qr { display: none; width: 148px; flex: none; background: #fff; padding: 6px; border-radius: 10px; }
@media (min-width: 700px) { .kurzbefehl-qr { display: block; } }
.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; }
/* Menü im Dialog (Mehr …): Zeilen mit Symbol, nach Zweck gegliedert */
.menue { display: flex; flex-direction: column; gap: 12px; }
.menue-gruppe { display: flex; flex-direction: column; gap: 6px; }
.menue-gruppe h3 { margin: 0 4px; font-size: 12px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
.menue-liste { display: flex; flex-direction: column; border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; }
.menue-liste.reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menue-eintrag { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; border-top: 1px solid var(--linie); background: var(--karte);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.menue-liste > .menue-eintrag:first-child { border-top: 0; }
.menue-liste.reihe > .menue-eintrag { border-top: 0; }
.menue-liste.reihe > .menue-eintrag + .menue-eintrag { border-left: 1px solid var(--linie); }
.menue-eintrag:hover { background: var(--neutral-grund); }
.menue-eintrag svg { width: 20px; height: 20px; flex: none; color: var(--akzent); }
.menue-eintrag span { min-width: 0; overflow-wrap: anywhere; }
.menue-eintrag.gefahr, .menue-eintrag.gefahr svg { color: var(--rot); }
.dialog.mit-menue .knopf-stapel .btn { min-height: 44px; }
/* Seiten entfernen: Seiten zum Antippen, gewählte rot markiert */
.seiten-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.seite-wahl { position: relative; display: block; padding: 0; border: 2px solid var(--rand); border-radius: 10px; background: var(--papier); overflow: hidden; cursor: pointer; aspect-ratio: 0.71; }
.seite-wahl img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.seite-wahl .nr { position: absolute; left: 6px; bottom: 6px; font-size: 12px; font-weight: 700; background: rgba(23, 33, 43, .75); color: #fff; border-radius: 6px; padding: 1px 6px; }
.seite-wahl .weg-zeichen { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; background: color-mix(in srgb, var(--rot) 30%, transparent); color: var(--auf-rot); }
.seite-wahl .weg-zeichen svg { width: 40px; height: 40px; background: var(--rot); border-radius: 50%; padding: 6px; }
.seite-wahl[aria-pressed="true"] { border-color: var(--rot); }
.seite-wahl[aria-pressed="true"] .weg-zeichen { display: flex; }
.btn-gefahr:disabled { opacity: .5; cursor: default; }
.freigabe-teil { margin: 4px 4px 0; font-size: 12px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
.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-zahl { min-width: 44px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--neutral); }
.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; }

/* ---------- Stufe 2: Vorschläge, Herkunft, Aufgaben, Fristen, GiroCode */
.herkunft { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; border-radius: 6px; background: var(--neutral-grund); color: var(--neutral); vertical-align: 1px; }
.herkunft.vorschlag { background: transparent; border: 1px dashed var(--akzent); color: var(--akzent); line-height: 16px; }
/* Vorschlag übernehmen: klein im Bild, zum Tippen größer */
button.herkunft { position: relative; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; font-family: inherit; }
button.herkunft::after { content: ""; position: absolute; inset: -9px -4px; }
button.herkunft svg { width: 11px; height: 11px; stroke-width: 3; }
button.herkunft:hover { background: var(--akzent-hell); }
input.vorschlag, select.vorschlag { border: 1.5px dashed var(--akzent); background-color: color-mix(in srgb, var(--akzent-hell) 45%, var(--karte)); }
.kurzfassung { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--neutral); background: var(--akzent-hell); border-radius: 10px; padding: 10px 12px; }
.kurzfassung svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--akzent); }
.text-zeile { margin-top: 4px; }
.text-zeile.ki svg { color: var(--akzent); }
details.zahlung > summary { font-size: 14px; font-weight: 700; color: var(--neutral); min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; border-radius: 8px; }
details.zahlung > summary::-webkit-details-marker { display: none; }
details.zahlung > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 3px 0 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
details.zahlung[open] > summary::before { transform: rotate(45deg); }
details.zahlung > summary:hover { color: var(--text); }
details.zahlung > summary .klein { font-weight: 400; color: var(--leise); }
details.zahlung > .felder { margin-top: 8px; }
.regel-zeile { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 8px 10px; border-radius: 10px; background: var(--grund); }
.regel-zeile > svg { width: 18px; height: 18px; flex: none; color: var(--akzent); }
.regel-zeile .wachsen { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.regel-neu { justify-content: flex-start; text-align: left; padding: 0; white-space: normal; min-height: 40px; }
.schlagwort-chip.vorschlag { background: transparent; border: 1px dashed var(--akzent); color: var(--akzent); padding-left: 0; }
.schlagwort-chip .vs-an { width: auto; padding: 0 2px 0 11px; font: inherit; font-weight: 600; border-radius: 15px; }
.aufgaben-liste { display: flex; flex-direction: column; }
.aufgabe-zeile { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.aufgabe-zeile + .aufgabe-zeile { border-top: 1px solid var(--linie); }
.aufgabe-zeile.ist-vorschlag { border: 1px dashed var(--akzent); border-radius: 10px; padding: 6px 0 6px 10px; margin-top: 6px; gap: 4px; }
.aufgabe-zeile.ist-vorschlag + .aufgabe-zeile, .aufgabe-zeile + .aufgabe-zeile.ist-vorschlag { border-top: 1px dashed var(--akzent); }
.aufgabe-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; color: inherit; font: inherit; }
.aufgabe-text strong { font-size: 15px; }
.aufgabe-text .herkunft { margin: 0 0 2px; }
.aufgabe-zeile.erledigt strong, .frist-zeile.erledigt strong { text-decoration: line-through; color: var(--leise); }
.haken-knopf { position: relative; flex: none; width: 44px; height: 44px; margin-left: -8px; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: var(--auf-ok); }
.haken-knopf::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--feld); box-sizing: border-box; }
.haken-knopf[aria-pressed="true"]::after { background: var(--ok); border-color: var(--ok); }
.haken-knopf svg { position: relative; z-index: 1; width: 14px; height: 14px; }
.frist-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; min-height: 64px; }
.frist-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.frist-text strong { font-size: 15px; }
.frist-text .klein { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frist-datum { font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--neutral); }
.frist-datum.frist { color: var(--frist); }
.frist-datum.ueber, .aufgabe-text .ueber { color: var(--rot); font-weight: 600; }
.dok-karte .unten.ueber { color: var(--rot); font-weight: 600; }
.dialog .girocode { width: 100%; max-width: 240px; align-self: center; background: #fff; padding: 8px; border-radius: 10px; }
.giro-daten { display: flex; flex-direction: column; gap: 6px; }
.giro-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.giro-zeile .klein, .giro-zeile strong { grid-column: 1; }
.giro-zeile strong { font-size: 15px; overflow-wrap: anywhere; }
.giro-zeile button { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- Breite Fenster: Dokument links, Angaben rechts (0.2.1) */
.dok-ansicht { display: none; }
.umschalter.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) {
  .huelle.weit { max-width: 1480px; }
  .dok-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 540px); gap: 20px; align-items: start; padding: 0 16px 0 20px; }
  .dok-spalte { min-width: 0; }
  .dok-spalte .dok-kopf { padding: 0 4px; }
  .dok-spalte .text-zeile { padding: 0 4px; }
  .dok-spalte .abschnitte { padding: 12px 0 0; }
  .dok-spalte .aktion-leiste { border-radius: 14px 14px 0 0; border: 1px solid var(--rand); border-bottom: 0; }
  .nur-schmal { display: none !important; }
  .dok-ansicht { display: flex; flex-direction: column; position: sticky; top: 12px; height: calc(100vh - 24px); height: calc(100dvh - 24px);
    background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; overflow: hidden; }
  .ansicht-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rand); }
  .ansicht-kopf .umschalter { min-width: 240px; }
  .zoom { display: flex; gap: 2px; }
  .seiten-stapel { flex: 1; overflow: auto; padding: 16px; background: var(--grund); display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .stapel-seite { position: relative; flex: none; display: block; width: calc(100% * var(--zoom, 1)); max-width: none; }
  .stapel-seite img { width: 100%; display: block; background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
  /* Unsichtbare Wörter über dem Bild zum Markieren (textebeneBauen) */
  .textebene { position: absolute; inset: 0; container-type: size; overflow: hidden; color: transparent; font: 0/1 sans-serif; cursor: text; -webkit-user-select: text; user-select: text; }
  .textebene span { position: absolute; white-space: pre; line-height: 1; font-family: sans-serif; transform-origin: 0 0; }
  .textebene span::selection { background: color-mix(in srgb, var(--akzent) 38%, transparent); color: transparent; }
  .textebene br::selection { background: transparent; }
  .seite-gross { position: absolute; top: 8px; right: 8px; z-index: 2; background: color-mix(in srgb, var(--karte) 88%, transparent); box-shadow: var(--schatten); opacity: .8; }
  .seite-gross:hover, .seite-gross:focus-visible { opacity: 1; }
  .text-quelle { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
  .text-quelle .klein { margin: 0; }
  .text-quelle pre { margin: 0; white-space: pre-wrap; font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: text; color: var(--text); }
  .text-quelle pre::selection { background: color-mix(in srgb, var(--akzent) 30%, transparent); }
}
.uebernahme { position: fixed; z-index: 40; display: flex; flex-wrap: wrap; gap: 6px; width: min(420px, calc(100vw - 24px)); padding: 10px;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .22); }
.uebernahme .titel { flex: 1 1 100%; font-size: 12px; font-weight: 700; color: var(--leise); }
.uebernahme .btn { min-height: 38px; }
@media (max-width: 999px) { .uebernahme { left: 12px; right: 12px; width: auto; bottom: calc(96px + env(safe-area-inset-bottom)); } }
input.gerade, textarea.gerade { outline: 3px solid color-mix(in srgb, var(--akzent) 55%, transparent); outline-offset: 1px; }

/* ---------- 0.3.0: bezahlt, Versicherung, Einreichungen */
.chip.ok { background: color-mix(in srgb, var(--ok) 14%, var(--karte)); color: var(--ok); }
.bezahlt-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 48px; }
/* Beschriftung von Schalterzeilen mit Vorschlags-Knopf daneben */
.zeile-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 15px; }
.zeile-name > label { flex: none; font-size: inherit; }
.zeile-name .herkunft { margin-left: 0; }
.bezahlt-zeile input[type=date] { order: 3; width: auto; flex: 0 1 220px; margin-bottom: 8px; }
/* Zeilenumbruch vor dem Datum erzwingen (ein flex-basis von 100 % allein bricht nicht, wenn max-width greift) */
#giro-bereich:empty { display: none; }
.bezahlt-zeile:has(input[type=date])::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
.bezahlt-zeile.ist-vorschlag, .schalter-zeile.ist-vorschlag { border: 1px dashed var(--akzent); border-radius: 10px; padding: 0 10px; }
.einreichung-hinweis .symbol { flex: none; display: flex; width: 36px; height: 36px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-text); align-items: center; justify-content: center; }
.einreichung-hinweis .symbol svg { width: 18px; height: 18px; }
.einreichung-hinweis strong { font-size: 15px; }
.zeile-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; min-height: 40px; font-size: 14px; font-weight: 600; text-decoration: none; }
.zeile-link .pfeil { width: 14px; height: 14px; }
.ein-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 14px; min-height: 60px; }
.ein-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.ein-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ein-text .klein { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ein-betrag { font-size: 15px; font-weight: 600; white-space: nowrap; }
.ein-dokumente { display: flex; flex-direction: column; gap: 10px; }
/* Einreichungen-Übersicht (0.28.0): Summen, links einzureichen + Filter, rechts Jahre */
.ein-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ein-kachel { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px; border: 1px solid var(--rand); border-radius: 12px; background: var(--karte);
  color: var(--text); font: inherit; text-align: left; }
button.ein-kachel { cursor: pointer; }
button.ein-kachel:hover { border-color: var(--feld); }
.ein-kachel .k-titel { font-size: 12px; font-weight: 600; color: var(--leise); }
.ein-kachel .k-wert { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ein-kachel .k-unter { font-size: 12px; color: var(--leise); }
.ein-kachel.warn { background: var(--warn-grund); border-color: color-mix(in srgb, var(--warn) 30%, var(--warn-grund)); }
.ein-kachel.warn .k-titel, .ein-kachel.warn .k-unter { color: var(--warn); }
.ein-kachel.ok .k-wert { color: var(--ok); }
.ein-raster { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
/* Neben der Tabelle schmal; reicht der Platz nicht, darüber – dann Karten nebeneinander */
.ein-seite { flex: 1 1 340px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; align-items: start; }
.ein-haupt { flex: 999 1 680px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.titel-klein { margin: 0; font-size: 13px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
#ein-offen .ein-zeile { padding: 6px 0; min-height: 52px; }
.ein-filter { gap: 12px; }
.ein-filter-gruppe { display: flex; flex-direction: column; gap: 6px; }
.chip-reihe { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--knopf-rand); background: var(--karte); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.filter-chip[aria-pressed="true"] { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent-text); font-weight: 600; }
.ein-gruppe { display: flex; flex-direction: column; gap: 8px; }
.ein-gruppe-kopf { display: flex; align-items: baseline; gap: 10px; padding: 0 4px; flex-wrap: wrap; }
.ein-gruppe-kopf h2 { font-size: 20px; }
.ein-gruppe-kopf .btn { margin-left: auto; min-height: 32px; }
.ein-tabelle { display: flex; flex-direction: column; overflow: hidden; }
/* Am Handy: Datum vorne (Tag groß), daneben wer und wie viele, rechts Betrag und Stand */
.ein-reihe { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "datum wer betrag" "datum dok stand";
  column-gap: 12px; row-gap: 3px; align-items: center; padding: 9px 14px; min-height: 58px; border-bottom: 1px solid var(--linie); text-decoration: none; color: var(--text); }
.ein-reihe:last-child { border-bottom: 0; }
a.ein-reihe:hover { background: color-mix(in srgb, var(--neutral-grund) 50%, transparent); }
.ein-reihe .r-datum { grid-area: datum; }
.ein-reihe .r-datum .lang { display: none; }
.ein-reihe .r-datum .kurz { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--leise); line-height: 1.15; }
.ein-reihe .r-datum .kurz strong { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.ein-reihe .r-wer { grid-area: wer; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ein-reihe .r-wer strong { font-weight: 600; }
.ein-reihe .r-dok { grid-area: dok; font-size: 13px; color: var(--leise); }
.ein-reihe .r-betrag { grid-area: betrag; justify-self: end; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ein-reihe .r-stand { grid-area: stand; justify-self: end; }
.ein-reihe .r-stand .chip { font-size: 12px; }
.ein-reihe .pfeil { display: none; }
.ein-kopfzeile { display: none; }
.ein-jahr-zu { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; font: inherit; color: var(--text); text-align: left; cursor: pointer; width: 100%; }
.ein-jahr-zu svg { width: 16px; height: 16px; color: var(--leise); flex: none; }
.ein-jahr-zu strong { font-size: 17px; }
@media (min-width: 700px) {
  .ein-kachel { padding: 14px 16px; gap: 5px; }
  .ein-kachel .k-titel { font-size: 13px; }
  .ein-kachel .k-wert { font-size: 24px; }
  .ein-kachel .k-unter { font-size: 14px; }
  .ein-raster { gap: 20px; }
  /* Breit: Tabelle mit Spaltenköpfen */
  .ein-reihe { grid-template-columns: 92px minmax(0, 1fr) 96px 100px 150px 16px; grid-template-areas: none; column-gap: 10px; padding: 0 14px; min-height: 50px; }
  .ein-reihe .r-datum, .ein-reihe .r-wer, .ein-reihe .r-dok, .ein-reihe .r-betrag, .ein-reihe .r-stand { grid-area: auto; }
  .ein-reihe .r-datum .kurz { display: none; }
  .ein-reihe .r-datum .lang { display: inline; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .ein-reihe .r-betrag { font-weight: 500; }
  .ein-reihe .r-stand { justify-self: start; }
  .ein-reihe .pfeil { display: block; width: 16px; height: 16px; color: var(--feld); }
  .ein-kopfzeile { display: grid; min-height: 38px; font-size: 12px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
  .ein-kopfzeile .r-betrag { font-size: 12px; font-weight: 700; }
}
.ein-dok { display: flex; align-items: center; gap: 4px; }
.ein-dok .dok-karte { flex: 1; min-width: 0; }
.summen { margin: 0 4px; font-size: 14px; color: var(--neutral); }
.dialog .karte.liste { max-height: 50vh; overflow: auto; }

/* ---------- 0.6.0: Rechner – Seitenleiste, Karten im Raster, zwei Spalten.
   Am Handy bleibt alles untereinander in derselben Reihenfolge. */
.karten-liste { display: flex; flex-direction: column; gap: 10px; }
.fristen-liste, .frist-gruppen, .frist-gruppe { display: flex; flex-direction: column; gap: 14px; }
.ablage-raster, .ablage-treffer, .spalten, .spalte, .konto-raster, .kb-raster { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.aktive-filter:empty { display: none; }
/* Auswahl: mehrere Dokumente auf einmal */
.listen-leiste { display: flex; align-items: center; gap: 8px; margin: -4px 0 -6px; }
.listen-leiste #auswaehlen { margin-left: auto; }
.sortierung select { min-height: 36px; width: auto; max-width: 100%; font-size: 14px; font-weight: 600; border-radius: 9px; padding-left: 10px; }
/* Sortierung darf schrumpfen (lange Namen werden gekürzt), damit Statistik und „Auswählen“ in 390 px passen */
.listen-leiste .sortierung { flex: 0 1 auto; min-width: 0; }
.listen-leiste .sortierung select { width: 100%; }
.listen-leiste #zur-statistik { flex: none; margin-left: auto; }
.listen-leiste #zur-statistik + #auswaehlen { margin-left: 0; flex: none; }
.waehlt #liste .dok-karte { position: relative; }
.waehlt #liste .dok-karte::before { content: ''; position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--akzent); background: var(--karte); z-index: 2; box-shadow: var(--schatten); }
.waehlt #liste .dok-karte.gewaehlt { box-shadow: 0 0 0 2px var(--akzent); }
.waehlt #liste .dok-karte.gewaehlt::before { background: var(--akzent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.wahl-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--karte); border-top: 1px solid var(--rand); box-shadow: 0 -2px 14px rgba(0, 0, 0, .1);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.wahl-oben { display: flex; align-items: center; gap: 6px; }
.wahl-oben strong { flex: 1; font-size: 15px; }
.wahl-aktionen { display: flex; gap: 8px; }
.wahl-aktionen .btn { flex: 1; min-width: 0; padding: 0 10px; }
body.waehlt .inhalt { padding-bottom: 150px; }
@media (max-width: 999px) { body.waehlt .nav { display: none; } }
@media (min-width: 1000px) { .wahl-leiste { left: auto; right: 24px; bottom: 24px; width: 560px; border: 1px solid var(--rand); border-radius: 14px; } }
@media (prefers-color-scheme: dark) {
  .waehlt #liste .dok-karte.gewaehlt::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082326' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
}
.nav .marke, .nav .nav-suche, .nav .nav-statistik, .nav .nav-einreichungen, .nav .plus-text, .ziel-flaeche { display: none; }
/* Am Handy gehören die Einreichungen zu „Fristen“ (breit eigener Punkt in der Seitenleiste) */
@media (max-width: 999px) { .nav a.auch-hier { color: var(--akzent); font-weight: 700; } }
.nav.nav-unter { display: none; }
@media (hover: hover) and (pointer: fine) {
  .ziel-flaeche { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; padding: 16px;
    border: 2px dashed var(--feld); border-radius: 12px; color: var(--leise); font-size: 15px; text-align: center; }
  .ziel-flaeche svg { width: 30px; height: 30px; }
}
/* Dateien werden ins Fenster gezogen */
body.zieht::after { content: "Loslassen zum Hinzuf\fc gen"; position: fixed; inset: 12px; z-index: 70; display: flex; align-items: center; justify-content: center;
  border: 3px dashed var(--akzent); border-radius: 18px; background: color-mix(in srgb, var(--akzent-hell) 85%, transparent);
  color: var(--akzent-text); font-size: 22px; font-weight: 700; pointer-events: none; }

@media (min-width: 1000px) {
  .huelle.mit-leiste { max-width: none; margin: 0; padding-left: 248px; }
  .mit-leiste > .kopf, .mit-leiste > .kopf-zurueck, .mit-leiste > .inhalt { width: 100%; max-width: 1640px; margin-inline: auto; }
  .mit-leiste > .kopf { padding: 28px 32px 10px; }
  .mit-leiste > .kopf .kopf-zeile { display: none; }
  .mit-leiste > .kopf-zurueck { padding: 18px 22px 0; }
  .mit-leiste > .inhalt { padding: 8px 32px 48px; gap: 16px; }
  .mit-leiste > .inhalt > .umschalter { width: 100%; max-width: 480px; }

  /* Seitenleiste */
  .nav, .nav.nav-unter { position: fixed; top: 0; bottom: 0; left: 0; width: 248px; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 12px; border-top: 0; border-right: 1px solid var(--rand); overflow-y: auto; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--neutral); }
  .nav a:hover { background: var(--neutral-grund); color: var(--text); }
  .nav a[aria-current="page"] { background: var(--akzent-hell); color: var(--akzent-text); }
  .nav a svg { width: 20px; height: 20px; flex: none; }
  .nav .zahl { position: static; margin-left: auto; }
  .nav .marke { order: -3; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px; margin-bottom: 10px; border: 0; border-radius: 10px; background: none;
    font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; }
  .nav .marke:hover { background: var(--neutral-grund); }
  .nav .marke img { width: 30px; height: 30px; border-radius: 9px; flex: none; }
  .nav .marke .bereich-zahl { margin-left: auto; }
  .nav .plus { order: -2; width: auto; height: 44px; min-height: 44px; margin: 0 0 8px; border-radius: 12px; justify-content: center; gap: 8px; font-weight: 600; box-shadow: none; }
  .nav .plus svg { width: 20px; height: 20px; }
  .nav .plus-text { display: inline; }
  .nav .nav-statistik, .nav .nav-einreichungen { display: flex; }
  .nav .nav-suche { order: -1; display: flex; margin-bottom: 12px; border: 1px solid var(--feld); background: var(--karte); color: var(--leise); }
  .nav .nav-suche kbd { margin-left: auto; font: 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0 6px; border: 1px solid var(--knopf-rand); border-radius: 5px; }
  .nav .konto { order: 1; margin-top: auto; }
  .toast { bottom: 24px; }
  body:has(.mit-leiste) .toast { left: calc(50% + 124px); }

  /* Eingang, Ablage, Papierkorb: Karten nebeneinander */
  .karten-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  a.zeile:hover, button.zeile:hover { background: color-mix(in srgb, var(--neutral-grund) 55%, var(--karte)); }
  .dok-karte:hover { box-shadow: var(--schatten); }
  .karten-liste > :not(.dok-karte) { grid-column: 1 / -1; }
  #mehr-laden { justify-self: center; min-width: 260px; }
  /* Ablage: Filter stehen links */
  #filter-knopf { display: none; }
  .ablage-raster { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
  .filter-feld[hidden] { display: grid !important; }
  .filter-feld { grid-template-columns: 1fr; gap: 12px; position: sticky; top: 16px; }
  /* Fristen: Gruppen nebeneinander */
  .frist-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px 20px; align-items: start; }
  /* Unterseiten: zwei Spalten */
  .spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .spalten.zwei-eins { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .konto-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; gap: 16px 20px; align-items: start;
    grid-template-areas: "profil menue" "abmelden menue" "fuss fuss"; }
  .k-profil { grid-area: profil; }
  .k-menue { grid-area: menue; }
  .k-abmelden { grid-area: abmelden; }
  .konto-raster .fuss { grid-area: fuss; }
  /* Kurzbefehl: Schlüssel und Selbst-Anlegen links, der fertige Kurzbefehl mit QR-Code rechts */
  .kb-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; gap: 16px 20px; align-items: start;
    grid-template-areas: "schluessel laden" "protokoll laden" "anlegen laden"; }
  .kb-raster.ohne-laden { grid-template-areas: "schluessel anlegen" "protokoll anlegen"; grid-template-rows: auto 1fr; }
  .kb-protokoll { grid-area: protokoll; }
  .kb-schluessel { grid-area: schluessel; }
  .kb-laden { grid-area: laden; }
  .kb-anlegen { grid-area: anlegen; }
  /* Regeln als Tabelle */
  .regel-liste .mitglied .wachsen { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) 110px; column-gap: 20px; align-items: center; }
  .regel-liste .mitglied .wachsen > :last-child { text-align: right; }
  /* Dokument: mehr Platz für die Angaben, Seiten nicht riesig */
  .huelle.weit { max-width: 1760px; }
  .dok-raster { grid-template-columns: minmax(0, 1fr) minmax(440px, 600px); }
  .stapel-seite { width: calc(min(100%, 960px) * var(--zoom, 1)); }
}

/* ---------- Scanner (scannen.php) */
.ecken-rahmen { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ecken-rahmen .foto { display: block; max-width: 100%; max-height: 62vh; max-height: 62dvh; width: auto; height: auto; border-radius: 8px; }
.ecken-rahmen svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ecken-rahmen polygon { fill: rgba(79, 183, 193, .16); stroke: #4fb7c1; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.ecke { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #4fb7c1; background: rgba(255, 255, 255, .3); padding: 0; cursor: grab; touch-action: none; }
.ecke::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #4fb7c1; }
.lupe { position: absolute; top: 8px; width: 120px; height: 120px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); pointer-events: none; }
.lupe.links { left: 8px; }
.lupe.rechts { right: 8px; }
.lupe.unten { top: auto; bottom: 8px; }
.scan-status { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.scan-status svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.hinweis-ok { background: var(--akzent-hell); color: var(--akzent-text); }
/* Live-Kamera: Blattrand im Bild, Auslöser, Seiten, Fertig */
.live-bild { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; }
.live-bild video { display: block; max-width: 100%; max-height: 60vh; max-height: 60dvh; width: auto; height: auto; }
.live-bild svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.live-bild polygon { fill: rgba(79, 183, 193, .18); stroke: #4fb7c1; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.live-bild polygon.ruhig { fill: rgba(79, 193, 120, .28); stroke: #5fd08a; }
.blitz { position: absolute; inset: 0; background: #fff; opacity: .7; }
.live-leiste { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.ausloeser { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--akzent); background: var(--karte); box-shadow: inset 0 0 0 4px var(--karte), inset 0 0 0 40px var(--akzent); cursor: pointer; padding: 0; }
.ausloeser:active { transform: scale(.94); }
.live-seiten { justify-self: start; width: 52px; height: 64px; border-radius: 8px; border: 1px solid var(--knopf-rand); background: var(--papier) center / cover no-repeat; position: relative; cursor: pointer; padding: 0; }
.live-seiten:disabled { opacity: .4; cursor: default; }
.live-seiten span { position: absolute; right: -8px; top: -8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--akzent); color: var(--auf-akzent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.live-fertig { justify-self: end; min-width: 0; }
.live-optionen { display: flex; flex-direction: column; gap: 8px; }
.seite-bild { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
/* Nur auf der Scan-Seite – ohne .scanner verstellte das ab 0.8.0 die
   Umschalter der App (Eingang, Seiten/Text im Dokument) */
.scanner .umschalter { display: flex; padding: 0; gap: 0; background: none; border: 1px solid var(--knopf-rand); border-radius: 12px; overflow: hidden; }
.scanner .umschalter button { flex: 1; min-height: 42px; border: 0; border-radius: 0; background: var(--karte); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.scanner .umschalter button + button { border-left: 1px solid var(--knopf-rand); }
.scanner .umschalter button[aria-checked="true"] { background: var(--akzent); color: var(--auf-akzent); }

/* Absender (Konto › Absender): Liste mit Auswahl, Doppelte als Gruppen */
.abs-zeile { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 14px; min-height: 60px; border-bottom: 1px solid var(--rand); }
.abs-zeile:last-child { border-bottom: 0; }
.abs-zeile.gewaehlt { background: color-mix(in srgb, var(--akzent-hell) 55%, var(--karte)); }
.abs-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; padding: 8px 4px; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.abs-name strong { font-size: 15px; overflow-wrap: anywhere; }
.abs-name .klein { overflow-wrap: anywhere; }
.abs-gruppe { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--grund); }
.abs-wahl-zeile { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.abs-wahl-zeile input { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--akzent); }
.abs-wahl-zeile .wachsen { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.abs-gruppe-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.abs-ungenutzt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.abs-ungenutzt span { flex: 1 1 200px; }
.abs-ziel { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.abs-ziel legend { margin-bottom: 4px; }
.abs-ziel input[type=text] { margin-top: 4px; }

/* Vorschläge beim Tippen (statt datalist, die Safari kaum zeigt) */
.vorschlag-liste { position: absolute; z-index: 50; margin: 0; padding: 4px; list-style: none; max-height: 360px; overflow-y: auto; background: var(--karte);
  border: 1px solid var(--rand); border-radius: 12px; box-shadow: var(--schatten); overscroll-behavior: contain; }
.vorschlag-liste li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.vorschlag-liste li:hover, .vorschlag-liste li[aria-selected="true"] { background: var(--akzent-hell); }
.vorschlag-liste .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vorschlag-liste .zusatz { flex: none; font-size: 12px; color: var(--leise); }
.vorschlag-liste mark { background: none; color: inherit; font-weight: 700; }

/* Mögliche Dubletten: Hinweis im Dokument, Gruppen zum Vergleichen */
.dubletten-hinweis { border-color: color-mix(in srgb, var(--warn) 45%, var(--rand)); background: var(--warn-grund); }
.dubletten-hinweis h2 { display: flex; align-items: center; gap: 6px; color: var(--warn); }
.dubletten-hinweis h2 svg { width: 18px; height: 18px; }
.dublette-zeile { display: flex; align-items: center; gap: 8px; }
.dublette-zeile a.wachsen { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--text); }
.dublette-zeile a.wachsen strong { overflow-wrap: anywhere; }
/* Vergleich: Kandidaten nebeneinander (erste Seite groß, Angaben, Unterschiede hervorgehoben) */
.vergleich-reihe { display: grid; grid-template-columns: repeat(var(--spalten, 2), minmax(0, 1fr)); gap: 12px; align-items: start; }
.vergleich-kachel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vergleich-kachel > .btn { align-self: flex-start; }
.vergleich-bild, .vergleich-seite { position: relative; display: block; padding: 0; border: 1px solid var(--knopf-rand); border-radius: 6px; background: var(--papier); overflow: hidden; cursor: zoom-in; }
.vergleich-bild img, .vergleich-seite img { display: block; width: 100%; height: auto; }
.vergleich-seite .nr { position: absolute; left: 6px; bottom: 6px; background: rgba(23, 33, 43, .72); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.vergleich-leer { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 1px dashed var(--feld); border-radius: 6px; color: var(--leise); font-size: 13px; text-align: center; padding: 8px; }
.vergleich-titel { display: flex; flex-direction: column; text-decoration: none; color: var(--text); min-width: 0; }
.vergleich-titel strong { overflow-wrap: anywhere; }
.vergleich-fakten { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.vergleich-fakten div { display: flex; gap: 6px; min-width: 0; padding: 1px 4px; border-radius: 4px; }
.vergleich-fakten dt { flex: none; width: 82px; color: var(--leise); }
.vergleich-fakten dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vergleich-fakten .anders { background: var(--warn-grund); color: var(--warn); font-weight: 600; }
.vergleich-fakten .anders dt { color: inherit; }
.vergleich-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.vergleich-kopf p { flex: 1 1 260px; }
@media (max-width: 999px) {
  .vergleich-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vergleich-fakten dt { width: auto; }
  .vergleich-fakten div { flex-direction: column; gap: 0; }
}

/* ---------- Statistik: Kennzahlen, Säulen über die Zeit, Balkenlisten (eine Farbe, „ohne …“ grau) */
.aktive-filter a.chip { min-height: 32px; text-decoration: none; }
.stat-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-kachel { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-kachel strong { font-size: 22px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.25; }
.stat-kachel .klein { font-size: 13px; }
.stat-ablage { align-self: flex-start; }
.stat-raster { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stat-teil { min-width: 0; }
.stat-leer { margin: 0; }
.stat-zeilen { display: flex; flex-direction: column; margin: -4px 0; }
.stat-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 5px; align-items: baseline; padding: 8px 0;
  min-height: 44px; text-decoration: none; color: var(--text); border-radius: 6px; }
a.stat-zeile:hover .stat-name { color: var(--akzent); }
.stat-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-zeile.ohne .stat-name { color: var(--leise); font-style: italic; }
.stat-wert { display: flex; align-items: baseline; gap: 8px; font-size: 15px; white-space: nowrap; }
.stat-wert span { font-size: 13px; color: var(--leise); }
.stat-spur { grid-column: 1 / -1; display: block; height: 8px; }
.stat-spur span { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--akzent); }
.stat-zeile.ohne .stat-spur span { background: var(--feld); }
.stat-alle { align-self: flex-start; }
.stat-anzeige { margin: -4px 0 0; font-size: 14px; color: var(--leise); min-height: 20px; }
.saeulen { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; border-bottom: 1px solid var(--linie); padding-top: 4px; }
.saeule { display: flex; flex-direction: column; align-items: stretch; text-decoration: none; color: var(--leise); cursor: default; outline-offset: 2px; border-radius: 4px; }
a.saeule { cursor: pointer; }
.saeule-feld { height: 128px; display: flex; align-items: flex-end; justify-content: center; }
.saeule-balken { display: block; width: min(24px, 70%); min-height: 1px; border-radius: 4px 4px 0 0; background: var(--akzent); }
.saeule-balken.alt { background: var(--feld); }
.saeule:hover .saeule-balken, .saeule:focus-visible .saeule-balken { background: var(--akzent-dunkel); }
.saeule-achse { font-size: 11px; text-align: center; padding: 4px 0 0; white-space: nowrap; overflow: hidden; }
.saeulen + .stat-ohne-datum { align-self: flex-start; }
.stat-zeit .saeulen { border-bottom: 0; }
.stat-zeit .saeule-feld { border-bottom: 1px solid var(--linie); }
.stat-unter { font-size: 14px; font-weight: 700; margin: 6px 0 -4px; }
.stat-hoechste { display: flex; flex-direction: column; margin: 0 -16px -16px; }
.stat-hoechste .zeile { border-top: 1px solid var(--linie); min-height: 48px; padding: 8px 16px; }
.stat-hoechste .wachsen { min-width: 0; display: flex; flex-direction: column; }
.stat-hoechste .wachsen strong { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-betrag { white-space: nowrap; font-size: 15px; }
@media (min-width: 1000px) {
  .stat-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .mit-leiste > .inhalt > .umschalter.zwei { max-width: 320px; }
  .stat-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px 20px; align-items: start; }
  .stat-raster .stat-zeit { grid-column: 1 / -1; }
  .stat-zeit .saeule-feld { height: 180px; }
}

/* ---------- Per Mail senden */
.mail-adresse { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-text); }
.mail-adresse strong { font-size: 17px; overflow-wrap: anywhere; min-width: 0; }
.mail-regeln { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.mail-liste .mitglied strong { overflow-wrap: anywhere; font-weight: 500; }
/* Export (Konto › Export) */
.export-zeile .wachsen { gap: 2px; }
/* umbrechen statt abschneiden: Größe und Ablaufdatum stehen hinten */
.export-zeile .wachsen > * { white-space: normal; overflow-wrap: anywhere; }
.export-zeile .fortschritt { margin-top: 6px; }
.export-zeile .export-fehler { color: var(--schlecht); white-space: normal; }
.export-zeile .btn { flex: none; }
/* Konto-Menü: Symbol mit fester Größe – ein SVG ohne Größe schrumpft in Safari auf 0 */
.k-menue .symbol { flex: none; display: flex; width: 36px; height: 36px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-text); align-items: center; justify-content: center; }
.k-menue .symbol svg { width: 20px; height: 20px; }
/* Eingereichte Einreichung: Dokumente fest */
.ein-fest { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.ein-fest svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ein-fest .link-knopf { display: inline; padding: 0; margin-left: 2px; }
/* KI für den Bestand (Verwaltung) */
#nachtrag { gap: 10px; }
.nachtrag-lauf { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.nachtrag-lauf .fortschritt { align-self: stretch; }
.nachtrag-probe summary { cursor: pointer; font-size: 14px; color: var(--akzent); }
.nachtrag-probe .liste { margin-top: 8px; max-height: 320px; overflow: auto; }
/* Vertrag und Garantie (Dokument, Konto › Verträge) */
.vertrag-info { margin: 0; }
.vertrag-vorbei summary { cursor: pointer; margin: 8px 4px; }
/* Mitteilungen auf diesem Gerät (Konto) */
.push-block { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rand); padding-top: 14px; margin-top: 4px; }
.push-block .schalter-zeile { justify-content: flex-start; gap: 8px; min-height: 0; }

/* ---------- 0.34.0: Übersetzung lesen */
.text-zeile .wachsen { flex: 1; min-width: 0; }
.text-zeile .btn { min-height: 34px; flex: none; }
.text-zeile.uebersetzt svg { color: var(--akzent); }
.lese-koerper { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--karte); }
.lese-koerper > * { max-width: 68ch; margin-left: auto; margin-right: auto; }
.lese-text { font-size: 16px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.lese-text p, .lese-text ul { margin: 0 0 12px; }
.lese-text ul { padding-left: 20px; }
.lese-text h3 { font-size: 18px; line-height: 1.3; margin: 18px 0 8px; }
.lese-text h3:first-child { margin-top: 0; }
.lese-seite { font-size: 12px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--rand); padding-top: 10px; margin: 20px 0 10px !important; }
.lese-hinweis { font-size: 13px; color: var(--leise); font-style: italic; }
.lese-tabelle { overflow-x: auto; margin: 0 0 12px; }
.lese-tabelle table { border-collapse: collapse; font-size: 15px; }
.lese-tabelle td { padding: 4px 14px 4px 0; border-bottom: 1px solid var(--rand); vertical-align: top; }
.lese-fuss { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--leise); margin-top: 16px; margin-bottom: 0; }
.lese-fuss svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--akzent); }
.lese-original { margin: 0; white-space: pre-wrap; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; color: var(--text); }
.lese-overlay .bild-werkzeuge .btn { min-height: 40px; }
/* Lange Titel auf zwei Zeilen statt abgeschnitten über den Rand */
.lese-overlay .bild-titel { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.lese-knoepfe { display: flex; gap: 6px; }
body:has(.bild-overlay) .toast { z-index: 70; }
@media (min-width: 1000px) { .text-uebersetzung { flex: 1; overflow: auto; padding: 16px 20px; } }

/* ---------- 0.37.0: Dokument – erst lesen, dann bearbeiten (Mockup 1) */
#textzeile:empty, #kurzfassung:empty, #vorschlag-leiste:empty { display: none; }
#textzeile { display: flex; flex-direction: column; gap: 4px; }
.abschnitte .text-zeile, .dok-spalte .abschnitte .text-zeile { padding: 0 4px; margin-top: 0; }
.abschnitte #seiten .seiten-reihe { padding: 8px 0 2px; }
.kopfkarte { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kk-oben { display: flex; align-items: flex-start; gap: 12px; }
.kk-oben > .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kk-oben .klein { font-size: 13px; color: var(--leise); }
.kk-absender { font-size: 16px; overflow-wrap: anywhere; }
.kk-betrag { font-size: 28px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.kk-frist { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--neutral-grund); color: var(--neutral); }
.kk-frist .wachsen { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.kk-frist .klein { font-size: 13px; flex: none; }
.kk-frist svg { width: 18px; height: 18px; flex: none; }
.kk-frist.frist { background: var(--warn-grund); color: var(--warn); }
.kk-frist.ueber { background: var(--schlecht-grund); color: var(--schlecht); }
.kk-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 14px; }
.kk-raster > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.kk-raster .klein { color: var(--leise); font-size: 13px; }
.kk-raster strong { font-weight: 600; }
.kopfkarte .st.ueber { color: var(--schlecht); } .kopfkarte .st.ok { color: var(--ok); } .kopfkarte .st.warn { color: var(--warn); }
.kopfkarte > .btn { width: 100%; }
.vs { border-bottom: 1.5px dashed var(--akzent); }
.vorschlag-leiste { border: 1.5px dashed var(--akzent); border-radius: 12px; background: var(--akzent-hell); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.vl-kopf { display: flex; align-items: center; gap: 8px; color: var(--akzent-text); font-size: 15px; }
.vl-kopf svg { width: 18px; height: 18px; flex: none; }
.vl-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vl-knoepfe .btn { min-height: 44px; }
.vl-knoepfe .btn:not(.btn-haupt) { border-color: var(--akzent); color: var(--akzent-text); }
#angaben.lesen .angaben-form { display: none; }
#angaben:not(.lesen) .angaben-lesen { display: none; }
.angaben-liste { margin: 0; display: grid; grid-template-columns: 116px minmax(0, 1fr); font-size: 14px; }
.angaben-liste dt { padding: 10px 0; color: var(--leise); border-top: 1px solid var(--linie); }
.angaben-liste dd { margin: 0; padding: 10px 0 10px 8px; border-top: 1px solid var(--linie); overflow-wrap: anywhere; }
.angaben-fuss { margin: 0; font-size: 12px; color: var(--leise); }
.seite-vorschau { display: flex; flex-direction: column; width: 100%; padding: 0; border: 1px solid var(--rand); border-radius: 12px; background: var(--karte); overflow: hidden; cursor: zoom-in; color: inherit; text-align: left; font: inherit; }
.seite-vorschau img { display: block; width: 100%; height: 180px; object-fit: cover; object-position: top; background: var(--papier); border-bottom: 1px solid var(--linie); }
.sv-text { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--leise); }
.sv-link { color: var(--akzent); font-weight: 600; flex: none; }
.klapp-liste { display: flex; flex-direction: column; padding: 0; }
.klapp + .klapp { border-top: 1px solid var(--linie); }
.klapp > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; border-radius: 14px; }
.klapp > summary::-webkit-details-marker { display: none; }
.klapp > summary > svg { width: 18px; height: 18px; flex: none; color: var(--leise); }
.klapp > summary .klein { font-weight: 400; color: var(--leise); font-size: 13px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.klapp > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 2px solid var(--feld); border-bottom: 2px solid var(--feld); transform: rotate(45deg); transition: transform .15s; }
.klapp[open] > summary::after { transform: rotate(-135deg); }
.klapp-inhalt { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.klapp-inhalt .btn-link { align-self: flex-start; }
.aktion-leiste:has(.teilen-knopf) { grid-template-columns: 56px minmax(0, 1fr); }
.teilen-knopf { padding: 0; }
.teilen-knopf .nur-breit-text { display: none; }
.vs-blatt .vs-liste { display: flex; flex-direction: column; max-height: 58vh; overflow: auto; }
.vs-fortschritt { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.vs-balken { height: 6px; border-radius: 3px; background: var(--neutral-grund); overflow: hidden; }
.vs-balken span { display: block; height: 100%; background: var(--akzent); transition: width .2s; }
.vs-posten { display: flex; align-items: center; gap: 6px; padding: 10px 0; border-top: 1px solid var(--linie); }
.vs-posten .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vs-posten .klein { font-size: 12px; color: var(--leise); }
.vs-posten strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.vs-posten .icon-knopf { border: 1px solid var(--knopf-rand); border-radius: 50%; }
.vs-posten .vs-ja { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.vs-posten .icon-knopf:disabled { opacity: .4; }
.vs-ergebnis { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--leise); }
.vs-ergebnis.an { color: var(--ok); }
.vs-ergebnis svg { width: 14px; height: 14px; }
@media (min-width: 1000px) {
  .teilen-knopf .nur-breit-text { display: inline; }
  .aktion-leiste:has(.teilen-knopf) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 0.38.0: Konto gegliedert, Bereich-Seite, Reiter unter Fristen (Mockups 4 und 5) */
.konto-gruppen { display: flex; flex-direction: column; gap: 6px; }
.konto-gruppe { display: flex; flex-direction: column; gap: 6px; }
.konto-gruppe + .konto-gruppe { margin-top: 8px; }
.konto-gruppe .titel-abschnitt { margin: 0 4px; }
.konto-gruppe .symbol, .bereich-seite .person-neu .symbol { flex: none; display: flex; width: 36px; height: 36px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-text); align-items: center; justify-content: center; }
.konto-gruppe .symbol svg, .bereich-seite .person-neu .symbol svg { width: 20px; height: 20px; }
.konto-gruppe .zeile strong { font-size: 15px; }
.konto-gruppe button.zeile { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.konto-gruppe button.zeile + .zeile, .konto-gruppe .zeile + .zeile { border-top: 1px solid var(--linie); }
.zeile-zahl { flex: none; font-size: 14px; color: var(--leise); font-variant-numeric: tabular-nums; }
.zeile-zahl:empty { display: none; }
.konto-ende { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.reiter { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--rand); overflow-x: auto; }
.reiter a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; font-size: 15px; font-weight: 600; color: var(--leise); text-decoration: none;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter a:hover { color: var(--text); }
.reiter a[aria-current="page"] { color: var(--text); border-bottom-color: var(--akzent); }
.reiter-zahl { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-grund); color: var(--warn); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.bereich-seite .person-neu { width: 100%; border: 0; border-top: 1px solid var(--linie); background: none; font: inherit; color: var(--akzent-text); text-align: left; cursor: pointer; }
.bereich-seite .ki-aus-zeile { width: 100%; padding: 10px 0 0; border: 0; border-top: 1px solid var(--linie); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.bereich-seite .ki-aus-zeile:disabled { cursor: default; }
.bereich-seite .schalter-zeile .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bereich-seite .schalter-zeile label { font-size: 15px; font-weight: 600; }
.bereich-seite > .spalte > .btn { width: 100%; }
#b-gespeichert { display: inline-flex; align-items: center; gap: 4px; flex: none; }
#b-gespeichert svg { width: 14px; height: 14px; }
.bereiche-seite { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.k-mitteilungen .gespeichert { align-self: flex-end; }
@media (min-width: 1000px) {
  .konto-gruppen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
  .konto-gruppe + .konto-gruppe { margin-top: 0; }
  .konto-gruppen .k-bereich { grid-row: span 3; }
  .konto-ende { margin-top: 0; }
}
/* „Gespeichert“ im Kopf der Bereich-Seite schwebt – es soll der Unterzeile keinen Platz nehmen */
#b-kopf { position: relative; }
#b-kopf #b-gespeichert { position: absolute; right: 16px; top: 0; background: var(--grund); padding: 2px 4px; }
.kopf + .reiter, .reiter { margin-bottom: 8px; }

/* ---------- 0.39.0: nicht hochgeladene Scan-Seiten fortsetzen */
.puffer-hinweis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; background: var(--warn-grund); color: var(--warn); font-size: 15px; }
.puffer-hinweis span { flex: 1 1 100%; }
.puffer-hinweis .btn { flex: 1; }

/* ---------- 0.40.0: Doppelte entscheiden (Mockup 6) */
.dub-paar { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.dub-grund { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; background: var(--warn-grund); color: var(--warn); font-size: 14px; line-height: 1.45; }
.dub-grund svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.dub-bilder { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; padding: 14px 16px 6px; align-items: end; }
.dub-bilder > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dub-bilder strong { font-size: 13px; text-align: center; }
.dub-bild { display: block; aspect-ratio: 0.71; border: 1px solid var(--rand); border-radius: 6px; background: var(--papier); overflow: hidden; max-width: 100%; }
.dub-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dub-tabelle { border-collapse: collapse; width: 100%; font-size: 13px; table-layout: fixed; }
.dub-tabelle col.dub-feld { width: 108px; }
.dub-tabelle tr { border-top: 1px solid var(--linie); }
.dub-tabelle th { text-align: left; font-weight: 500; color: var(--leise); padding: 9px 0 9px 16px; vertical-align: top; }
.dub-tabelle td { padding: 9px 6px; vertical-align: top; overflow-wrap: break-word; hyphens: auto; }
.dub-tabelle td:last-child { padding-right: 16px; }
.dub-tabelle tr.anders { background: var(--warn-grund); }
.dub-tabelle tr.anders th { color: var(--warn); font-weight: 600; }
.dub-tabelle tr.anders td { font-weight: 600; font-variant-numeric: tabular-nums; }
.dub-paar > .btn-link { align-self: flex-start; margin: 4px 8px 8px; }
.dub-entscheidung { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dub-entscheidung h2 { margin: 0 4px; font-size: 15px; }
.dub-entscheidung .klein { margin: 2px 4px 0; line-height: 1.45; }
.dub-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dub-knoepfe .btn { min-height: 52px; }
.dub-rechts { border-color: var(--akzent); color: var(--akzent-text); }
.dublette-knoepfe { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
@media (min-width: 1000px) { .dub-paar, .dub-entscheidung { max-width: 720px; } }

/* ---------- 0.41.0: Live-Scanner im Vollbild (Mockup 4) – immer dunkel, das Kamerabild füllt den Schirm */
.live-vollbild:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: block; background: #000; color: #fff; }
body:has(.live-vollbild:not([hidden])) { overflow: hidden; }
.live-vollbild .live-bild { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; }
.live-vollbild .live-bild video { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.live-oben { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.live-oben .wachsen { flex: 1; }
.live-rund { flex: none; width: 44px; height: 44px; border-radius: 22px; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; }
.live-rund svg { width: 22px; height: 22px; }
.live-pille { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: rgba(0, 0, 0, .45); color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.live-pille svg { width: 16px; height: 16px; }
.live-oben #auto[aria-checked="true"] { background: rgba(15, 106, 115, .9); }
.live-oben #auto[aria-checked="false"] { color: rgba(255, 255, 255, .75); }
.live-modus { padding: 3px; gap: 2px; }
.live-modus button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.live-modus button[aria-checked="true"] { background: #fff; color: #17212b; }
.live-vollbild #live-status { position: absolute; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); width: max-content; max-width: calc(100% - 32px);
  margin: 0; padding: 7px 14px; border-radius: 999px; font-size: 14px; background: rgba(0, 0, 0, .6); color: #fff; }
.live-vollbild #live-status.hinweis-ok { background: rgba(15, 106, 115, .92); }
.live-vollbild #live-status.hinweis-warn, .live-vollbild #live-status.hinweis-fehler { background: rgba(122, 72, 0, .92); }
.live-vollbild #live-status svg { width: 16px; height: 16px; color: #fff; }
.live-info { position: absolute; left: 16px; right: 16px; top: calc(112px + env(safe-area-inset-top, 0px)); margin: 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .85); }
.live-info:empty { display: none; }
.live-unten { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.live-vollbild .live-ziel select { width: auto; min-height: 0; height: auto; padding: 0 2px; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; }
.live-vollbild .live-ziel select option { color: #17212b; }
.live-tipp { margin: 0; align-self: flex-start; padding: 0 max(16px, env(safe-area-inset-left, 0px)); font-size: 12px; color: rgba(255, 255, 255, .85); }
.live-vollbild .live-leiste { width: 100%; background: rgba(10, 14, 16, .82);
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.live-vollbild .ausloeser { width: 76px; height: 76px; border: 4px solid #fff; background: transparent; box-shadow: inset 0 0 0 4px rgba(10, 14, 16, .82), inset 0 0 0 40px #fff; }
.live-vollbild .live-seiten { width: 52px; height: 68px; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.live-vollbild .live-seiten:disabled { opacity: .35; }
.live-vollbild .live-seiten span { background: #ffc861; color: #17212b; }
.live-vollbild .live-fertig { min-height: 48px; }
.scanner .toast { z-index: 60; }
.live-vollbild .live-fertig { padding: 0 12px; font-size: 14px; white-space: nowrap; }
.live-tipp, .live-info { text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }

/* ---------- 0.42.0: Dokument am Rechner als Arbeitsplatz (Mockup 5) – am Handy unsichtbar */
.nav-kompakt, .dok-reiter, .dok-tasten, .dok-leiste-titel, .leiste-aktion { display: none; }
@media (min-width: 1000px) {
  .huelle.dok-arbeitsplatz { padding-left: 64px; }
  .nav-kompakt { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 64px; z-index: 30; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 0; border-right: 1px solid var(--rand); background: var(--grund); }
  .nav-kompakt .nk-logo { width: 34px; height: 34px; border-radius: 9px; margin-bottom: 8px; }
  .nav-kompakt a { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--neutral); text-decoration: none; }
  .nav-kompakt a:hover { background: var(--neutral-grund); color: var(--text); }
  .nav-kompakt a[aria-current="page"] { background: var(--akzent-hell); color: var(--akzent-text); }
  .nav-kompakt a.nk-plus { background: var(--akzent); color: var(--auf-akzent); margin-bottom: 6px; }
  .nav-kompakt svg { width: 22px; height: 22px; }
  .nav-kompakt .nk-zahl { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--akzent); color: var(--auf-akzent);
    font-size: 11px; font-weight: 700; display: grid; place-items: center; }
  .nav-kompakt .wachsen { flex: 1; }
  /* Feste Kopfleiste: zurück, ‹ 2/6 ›, Titel, Teilen, Drucken, Laden, ⋯, Ablegen */
  .dok-arbeitsplatz > .kopf-zurueck { position: sticky; top: 0; z-index: 20; background: var(--grund); border-bottom: 1px solid var(--rand); padding: 6px 16px; }
  .dok-arbeitsplatz > .kopf-zurueck .rechts { flex: 1; min-width: 0; align-items: center; }
  .dok-leiste-titel { display: block; flex: 1; min-width: 0; margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
  .leiste-aktion { display: inline-flex; margin-left: 6px; }
  .leiste-aktion kbd, .dok-tasten kbd { font: 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0 5px; border: 1px solid currentColor; border-radius: 4px; opacity: .75; }
  .dok-arbeitsplatz .aktion-leiste { display: none; }
  .dok-arbeitsplatz .dok-kopf h1 { display: none; }
  .dok-arbeitsplatz .dok-raster { padding-top: 14px; }
  .dok-arbeitsplatz .dok-ansicht { top: 72px; height: calc(100vh - 86px); height: calc(100dvh - 86px); }
  /* Reiter statt gestapelter Karten */
  .dok-reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--rand); order: -1; }
  .dok-reiter button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px;
    background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--leise); cursor: pointer; }
  .dok-reiter button:hover { color: var(--text); }
  .dok-reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); }
  .dok-spalte .abschnitte > .freigabe-hinweis, .dok-spalte #textzeile, .dok-spalte .dubletten-hinweis { order: -2; }
  .dok-spalte[data-reiter="einordnen"] [data-r]:not([data-r~="einordnen"]),
  .dok-spalte[data-reiter="geld"] [data-r]:not([data-r~="geld"]),
  .dok-spalte[data-reiter="vertrag"] [data-r]:not([data-r~="vertrag"]),
  .dok-spalte[data-reiter="aufgaben"] [data-r]:not([data-r~="aufgaben"]),
  .dok-spalte[data-reiter="verlauf"] [data-r]:not([data-r~="verlauf"]) { display: none !important; }
  /* Am Rechner ist das Formular immer offen – Liste und Umschalter nur am Handy */
  .dok-arbeitsplatz #angaben .angaben-lesen, .dok-arbeitsplatz #angaben > .abschnitt-kopf h2, .dok-arbeitsplatz #angaben [data-tun="angaben-modus"] { display: none; }
  .dok-arbeitsplatz #angaben.lesen .angaben-form { display: grid; }
  .dok-arbeitsplatz #angaben > .abschnitt-kopf { min-height: 0; justify-content: flex-end; }
  .dok-arbeitsplatz #angaben details.vertrag-teil > summary { display: none; }
  .dok-tasten { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin: 4px 0 16px; font-size: 12px; color: var(--leise); }
}
@media (min-width: 1000px) {
  /* Ohne Überschrift und Umschalter bleibt vom Kopf der Angaben nur „Gespeichert“ – schwebend, ohne Leerraum */
  .dok-arbeitsplatz #angaben { position: relative; }
  .dok-arbeitsplatz #angaben > .abschnitt-kopf { position: absolute; top: 10px; right: 16px; min-height: 0; }
}

/* ---------- 0.44: Kurzbefehl über den iCloud-Link, die Datei nur noch für den Mac */
.icloud-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.icloud-form .feld-gruppe { flex: 1 1 240px; }
.kb-datei > summary { font-size: 15px; font-weight: 600; color: var(--akzent); }
.kb-datei[open] { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 0.45: Protokoll des Kurzbefehls – was beim Server ankam, auch Abgelehntes */
.kb-versuch { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; }
.kb-versuch .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.kb-versuch strong { font-size: 14px; font-weight: 600; }
.kb-symbol { flex: none; display: flex; padding-top: 1px; }
.kb-symbol svg { width: 18px; height: 18px; }
.kb-versuch.ok .kb-symbol { color: var(--ok); }
.kb-versuch.fehler .kb-symbol { color: var(--rot); }
