/* Design „Seitenleiste“ (Auswahl 24.10.2026 aus drei modernen Entwürfen, Musterseite „Pietas modern“, Variante B):
   dunkle Menüleiste links, helle Arbeitsfläche, Linien-Symbole, abgerundete Felder, Gold als Akzent.
   Kompakt wie gewünscht (14 px am PC). Vorige Fassungen: Git-Stände „oberflaeche-anthrazit-1“ (klassisch, Serifen)
   und „oberflaeche-kompakt-1“. */
:root {
  --hintergrund: #f3f2ef;
  --flaeche: #ffffff;
  --flaeche-leise: #faf9f7;  /* Kästen innerhalb von Karten */
  --text: #1f2023;
  --text-leise: #67635b;
  --akzent: #1f2023;         /* Knöpfe, aktive Reiter */
  --akzent-text: #ffffff;
  --gold: #b08d57;
  --gold-text: #7a5a24;      /* Gold als Schrift – kräftig genug zum Lesen */
  --gold-hell: #f6efe1;
  --rot-hell: #fbe9e6;
  --gruen-hell: #e7f2e9;
  --rand: #e6e2da;
  --rand-feld: #d3cdc2;
  --feld: #faf9f7;
  --gut: #2f6b3a;
  --schlecht: #a8331f;
  --leiste: #1e1f22;
  --leiste-text: #c9c5bd;
  --leiste-leise: #8d8980;
  --leiste-aktiv: #2f3035;
  --logo: #c7a46a;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hintergrund: #161719;
    --flaeche: #1f2023;
    --flaeche-leise: #232428;
    --text: #ece8e1;
    --text-leise: #a7a39a;
    --akzent: #d9bf8c;
    --akzent-text: #1a1b1d;
    --gold: #b08d57;
    --gold-text: #d9bf8c;
    --gold-hell: #2c2820;
    --rot-hell: #3a221e;
    --gruen-hell: #1f2e22;
    --rand: #33343a;
    --rand-feld: #4a4b52;
    --feld: #19191c;
    --gut: #5cc27a;
    --schlecht: #f2786b;
    --leiste: #101113;
    --leiste-text: #c9c5bd;
    --leiste-leise: #85817a;
    --leiste-aktiv: #26272b;
    --logo: #d9bf8c;
    --schatten: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* Am PC 16 px Grundschrift; auf schmalen Bildschirmen 16 px (kleinere Schrift lässt Handys beim Antippen hineinzoomen) */
html { font-size: 16px; }  /* Wunsch 24.10.2026: größer (vorher 14, dann 15 px); mit A−/A+ unten in der Leiste einstellbar */
@media (max-width: 48rem) { html { font-size: 16px; } }

body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: var(--hintergrund);
  color: var(--text);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-text); }
h1, h2, h3 { letter-spacing: -0.01em; }
.sym { flex: 0 0 auto; display: block; }
[hidden] { display: none !important; }  /* sonst heben display-Regeln (z. B. .feld) das Ausblenden auf */
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.inline { display: inline; margin: 0; }

/* --- Seitenleiste --------------------------------------------------------------------------------- */
body.mit-leiste { display: flex; min-height: 100vh; }
.hauptbereich { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.leiste {
  flex: 0 0 13.5rem; width: 13.5rem; background: var(--leiste); color: var(--leiste-text);
  position: sticky; top: 0; z-index: 40; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;  /* über dem Fallkopf (30), sonst verdeckt er den Klappknopf */
  padding: 0.9rem 0.6rem; gap: 1rem; scrollbar-width: thin;
}
.leiste-kopf { display: flex; align-items: center; justify-content: space-between; padding: 0 0.4rem; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; color: #f1eee8; text-decoration: none; font-weight: 650; font-size: 1.05rem; }
.logo-zeichen {
  width: 1.85rem; height: 1.85rem; border-radius: 7px; background: var(--logo); color: #1e1f22;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.leiste-menueknopf { display: none; background: none; border: none; color: inherit; padding: 0.3rem; border-radius: 6px; cursor: pointer; }
.leiste-inhalt { display: flex; flex-direction: column; gap: 1rem; flex: 1 1 auto; }
.mandant-wahl { margin: 0; padding: 0 0.2rem; }
.mandant-wahl select, .mandant-name {
  font: inherit; font-size: 0.9rem; width: 100%; padding: 0.35rem 0.5rem; border-radius: 7px;
  background: var(--leiste-aktiv); color: #f1eee8; border: 1px solid #3c3d43; display: block;
}
.mandant-name { border-color: transparent; background: none; color: var(--leiste-leise); padding: 0 0.4rem; }
/* Firmenlogo ganz klein neben dem Firmennamen (Wunsch 15.11.2026, etwa 0,5 cm); auf hellem Grund, damit auch dunkle Logos zu sehen sind */
.mandant-name, .mandant-wahl { display: flex; align-items: center; gap: 0.5rem; }
.mandant-name > span { min-width: 0; overflow-wrap: anywhere; }
.mandant-wahl select { min-width: 0; flex: 1 1 auto; width: auto; }
.mandant-logo { flex: none; width: auto; max-width: 3rem; height: 0.5cm; padding: 1px 2px; border-radius: 4px; background: #fff; object-fit: contain; }
.navigation { display: flex; flex-direction: column; gap: 1px; }
.navigation a {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.42rem 0.6rem; border-radius: 7px;
  color: var(--leiste-text); text-decoration: none; font-size: 0.95rem;
}
.navigation a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.navigation a.aktiv { background: var(--leiste-aktiv); color: #fff; font-weight: 600; }
.navigation a.aktiv .sym { color: var(--logo); }
.navigation-titel {
  display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--leiste-leise);
  padding: 0.7rem 0.6rem 0.3rem;
}
.leiste-fuss { margin-top: auto; display: flex; align-items: center; gap: 0.3rem; padding: 0.6rem 0.2rem 0; border-top: 1px solid #2c2d31; }
.leiste-konto { display: flex; align-items: center; gap: 0.55rem; color: var(--leiste-text); text-decoration: none; font-size: 0.9rem; flex: 1 1 auto; min-width: 0; padding: 0.25rem 0.3rem; border-radius: 7px; }
.leiste-konto span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste-konto:hover { background: rgba(255, 255, 255, 0.06); }
.kuerzel-kreis {
  flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #3a3b40; color: #f1eee8;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600;
}
.leiste-abmelden { background: none; border: none; color: var(--leiste-leise); padding: 0.35rem; border-radius: 7px; cursor: pointer; }
.leiste-abmelden:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
/* Anmeldeseite: nur das Logo */
body.ohne-leiste .leiste { position: static; width: auto; height: auto; flex: none; padding: 0.7rem 1rem; }

/* --- Arbeitsfläche, Karten -------------------------------------------------------------------------- */
/* Wunsch 15.11.2026: die Fensterbreite nutzen – der Inhalt wächst bis 130rem (bisher 84rem), die Abschnitte der Formulare
   stehen je nach Platz in 1 bis 3 Spalten (siehe „Abschnitte nebeneinander“) */
.inhalt { --inhalt-breite: 130rem; --rand-x: 1.4rem; --rand-y: 1rem; width: 100%; max-width: var(--inhalt-breite); margin: 0; padding: var(--rand-y) var(--rand-x); flex: 1 0 auto; }
.karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  padding: 0.85rem 1.05rem; box-shadow: var(--schatten);
}
.karte h1 { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 650; }
.karte h2 { margin: 0 0 0.5rem; font-size: 1.08rem; font-weight: 600; }
.karte h3 { margin: 0.8rem 0 0.35rem; font-size: 0.98rem; font-weight: 600; }
.karte p { margin: 0.3rem 0; }
.karte + .karte { margin-top: 0.75rem; }
.schmal { max-width: 28rem; }
section.karte.schmal { margin: 0 auto; }
.leise { color: var(--text-leise); font-size: 0.9rem; }
.titelzeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.titelzeile h1, .titelzeile h2 { margin: 0; }
.fuss { text-align: center; color: var(--text-leise); font-size: 0.82rem; padding: 0.8rem 1rem 1rem; }
.gut { color: var(--gut); }
.schlecht { color: var(--schlecht); }

/* --- Formulare -------------------------------------------------------------------------------------- */
/* Abschnitte: Überschrift statt Rahmen, getrennt durch eine feine Linie */
.gruppe { border: none; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.gruppe > legend { padding: 0 0 0.25rem; margin: 0 0 0.45rem; width: 100%; border-bottom: 1px solid var(--rand); font-weight: 600; font-size: 0.98rem; color: var(--text); }
/* Wunsch 10.11.2026: seltene Abschnitte einzeln aufklappbar – Kopf wie eine Abschnittsüberschrift, zugeklappt ruhiger */
.gruppe-klappbar > summary { cursor: pointer; padding: 0 0 0.25rem; margin: 0 0 0.45rem; border-bottom: 1px solid var(--rand); font-weight: 600; font-size: 0.98rem; color: var(--text); }
.gruppe-klappbar:not([open]) { margin-bottom: 0.5rem; }
.gruppe-klappbar:not([open]) > summary { color: var(--text-leise, var(--text)); font-weight: 500; margin-bottom: 0; }
/* Tabs je Kind (Wunsch 12.11.2026) */
.person-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--rand); margin: 0 0 0.75rem; }
.person-tab { border: 1px solid var(--rand); border-bottom: none; border-radius: 6px 6px 0 0; background: transparent; color: var(--text); padding: 0.3rem 0.8rem; margin-bottom: -1px; cursor: pointer; font: inherit; }
.person-tab.aktiv { background: var(--flaeche); font-weight: 600; border-bottom: 1px solid var(--flaeche); }
.person-tab-neu { font-weight: 600; padding: 0.3rem 0.65rem; }
/* Wunsch 24.10.2026: Beschriftung links, Feld rechts, ein Feld je Zeile – schneller zu lesen, was gefragt ist.
   Ein Raster bricht in Spalten zu je mindestens 23rem um: im halbbreiten Abschnitt eine, in Listen (volle Breite) zwei. */
/* Wunsch 25.10.2026: spaltenweise – erst von oben nach unten, dann die nächste Spalte (Mehrspaltensatz statt Raster) */
/* Rückmeldung 16.11.2026: Die Felder eines Blocks stehen untereinander in einer Spalte – nebeneinander stehen die Blöcke.
   Damit die Felder in einem breiten Abschnitt nicht über die ganze Seite laufen, ist ein Block höchstens 40rem breit. */
.raster { display: block; max-width: 40rem; }
.raster.ereignis-haupt, .gruppe-anschrift > .raster, .gruppe-zeitpunkt .raster { max-width: none; }
.raster > * { break-inside: avoid; }
.feld {
  display: grid; grid-template-columns: var(--beschriftung, 9.5rem) minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.15rem;
  align-items: center; margin-bottom: 1px; min-width: 0;
}
.feld > label { grid-column: 1; font-weight: 500; font-size: 0.93rem; color: var(--text-leise); text-align: right; line-height: 1.2; overflow-wrap: anywhere; }
.feld > :not(label) { grid-column: 2; min-width: 0; }
.feld > label:only-child { grid-column: 1 / -1; text-align: left; }
.feld-eingabe { display: block; }
.feld:has(textarea) > label, .feld-mehrfach > label { align-self: start; padding-top: 0.3rem; }
.feld input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .feld select, .feld textarea,
.suchleiste input[type="search"], .suchleiste-einfach input, .suchleiste select, .gruppen-aktionen select, .kopf-dialog textarea {
  font: inherit; padding: 0.1rem 0.42rem; border: 1px solid var(--rand-feld); border-radius: 5px;
  background: var(--feld); color: var(--text); width: 100%; min-height: 1.75rem;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.feld textarea, .kopf-dialog textarea { min-height: 0; }
.feld input:focus, .feld select:focus, .feld textarea:focus, .suchleiste input:focus, .suchleiste-einfach input:focus, .suchleiste select:focus,
.gruppen-aktionen select:focus, .kopf-dialog textarea:focus {
  outline: none; border-color: var(--gold); background: var(--flaeche); box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.25);
}
.knopf:focus-visible, .knopf-zweit:focus-visible, .knopf-klein:focus-visible, .knopf-symbol:focus-visible, a:focus-visible,
.status-knopf:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
/* so genau wie die Grundregel für .feld input, sonst bliebe der Rahmen grau (29.10.2026) */
.feld-fehler input, .feld-fehler select, input.eingabe-ungueltig,
.feld.feld-fehler input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.feld input.eingabe-ungueltig:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { border-color: var(--schlecht); }
.feld input.eingabe-ungueltig:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { background: var(--rot-hell); }
.feld input.eingabe-datum { max-width: 8.5rem; font-variant-numeric: tabular-nums; }
.feld input.eingabe-zeit { max-width: 5.5rem; font-variant-numeric: tabular-nums; }
.hilfe { color: var(--text-leise); font-size: 0.8rem; }
.hilfe ul { margin: 0.25rem 0; padding-left: 1.2rem; }
/* „i“ zum Drübergehen (Wunsch 15.11.2026): Erklärungen stehen nicht mehr als Absatz auf der Seite, siehe {% info %} */
.info { position: relative; display: inline-flex; vertical-align: middle; margin-left: 0.35rem; cursor: help; outline: none;
  font-size: 1rem; font-weight: normal; }
.info-zeichen { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1px solid var(--rand-feld); background: var(--feld);
  color: var(--text-leise); display: inline-flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 650;
  font-family: Georgia, "Times New Roman", serif; line-height: 1; }
.info:hover .info-zeichen, .info:focus .info-zeichen, .info:focus-within .info-zeichen { border-color: var(--gold); color: var(--gold-text); background: var(--gold-hell); }
.info-text { display: none; position: absolute; z-index: 80; top: 100%; left: 0; width: max-content; max-width: min(30rem, calc(100vw - 1.5rem));
  padding: 0.6rem 0.8rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
  color: var(--text); font-size: 0.88rem; font-weight: normal; line-height: 1.45; text-align: left; white-space: normal; cursor: default;
  overflow-wrap: anywhere; }
.info:hover .info-text, .info:focus .info-text, .info:focus-within .info-text { display: block; }
.info-text ul, .info-text ol { margin: 0.3rem 0; padding-left: 1.2rem; }
/* am Feld: rechts in der Spalte der Beschriftung */
.feld > .info.feld-info { grid-column: 1; grid-row: 1; justify-self: end; align-self: center; margin: 0; }
.feld:has(> .feld-info) > label { padding-right: 1.45rem; }
.feld:has(> .feld-info) > label, .feld:has(> .feld-info) > .feld-eingabe { grid-row: 1; }
@media (max-width: 48rem) { .feld:has(> .feld-info) > .feld-eingabe { grid-row: 2; } }
.feld:has(textarea) > .info.feld-info, .feld-mehrfach > .info.feld-info { align-self: start; margin-top: 0.4rem; }
.feld-paar > .feld > .info.feld-info { grid-row: 1; }
.feld-paar > .feld:first-child > .info.feld-info { grid-column: 1; }
.feld-paar > .feld:nth-child(2) > .info.feld-info { grid-column: 3; }
.fehlertext { color: var(--schlecht); font-size: 0.85rem; }
.warntext { color: var(--gold-text); font-size: 0.85rem; }
.feld-mehrfach > div { display: flex; flex-direction: column; gap: 0.25rem; }
.feld-mehrfach label { font-weight: normal; color: var(--text); }
.feld-mehrfach > label { font-weight: 500; color: var(--text-leise); }
/* Schalter statt Kästchen bei Ja/Nein-Feldern */
.feld-schalter > label { cursor: pointer; }
.feld-schalter .feld-eingabe { display: flex; align-items: center; min-height: 1.75rem; }
/* ältere Schalter-Markierung (Label um das Kästchen, z. B. Import): über beide Spalten */
.feld-schalter > label:only-child { display: flex; gap: 0.55rem; align-items: center; min-height: 1.75rem; color: var(--text); font-weight: normal; }
/* Kurze Angaben schmal, damit man an der Breite sieht, was erwartet wird */
.feld input[name$="hausnummer"], .feld input[name$="plz"], .feld input[type="number"] { max-width: 7rem; }
.feld-schalter input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 2.15rem; height: 1.2rem; margin: 0; border-radius: 999px;
  background: var(--rand-feld); position: relative; cursor: pointer; transition: background 0.15s;
}
.feld-schalter input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2rem - 4px); height: calc(1.2rem - 4px);
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: left 0.15s;
}
.feld-schalter input[type="checkbox"]:checked { background: var(--akzent); }
.feld-schalter input[type="checkbox"]:checked::after { left: calc(100% - 1.2rem + 2px); }
.feld-schalter input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.feld-schalter input[type="checkbox"]:disabled { opacity: 0.55; cursor: default; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--akzent); }
.logo-vorschau img { max-height: 5rem; max-width: 16rem; background: #fff; padding: 0.25rem; border-radius: 6px; }

/* --- Knöpfe ----------------------------------------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 0.24rem 0.7rem; border: 1px solid transparent; border-radius: 6px; background: var(--akzent); color: var(--akzent-text);
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.knopf:hover { filter: brightness(1.15); }
.knopf.gefahr { background: var(--schlecht); color: #fff; }
.knopf-zweit {
  display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; font-size: 0.9rem; font-weight: 500; padding: 0.24rem 0.65rem;
  border: 1px solid var(--rand-feld); border-radius: 6px; background: var(--flaeche); color: var(--text);
  cursor: pointer; margin-right: 0.4rem; text-decoration: none; line-height: 1.2;
}
.knopf-zweit:hover { border-color: var(--gold); }
.knopf-link { font: inherit; padding: 0; border: none; background: none; color: var(--gold-text); text-decoration: underline; cursor: pointer; }
.knopf-klein {
  font: inherit; font-size: 0.86rem; font-weight: 500; line-height: 1.2; padding: 0.18rem 0.55rem; border: 1px solid var(--rand-feld);
  border-radius: 6px; background: var(--flaeche); color: var(--text); cursor: pointer;
}
.knopf-klein:hover { border-color: var(--gold); }
.knopf-symbol {
  display: inline-flex; align-items: center; justify-content: center; width: 1.85rem; height: 1.85rem; padding: 0;
  border: 1px solid var(--rand-feld); border-radius: 6px; background: var(--flaeche); color: var(--text); cursor: pointer;
}
.knopf-symbol:hover { border-color: var(--gold); }

/* --- Meldungen -------------------------------------------------------------------------------------- */
.meldungen { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.meldung, .fehler, .hinweis {
  padding: 0.5rem 0.8rem; border-radius: var(--radius); border: 1px solid var(--rand); background: var(--flaeche); margin-bottom: 0.5rem;
}
.fehler p, .hinweis p { margin: 0 0 0.25rem; }
.fehler p:last-child, .hinweis p:last-child { margin-bottom: 0; }
.meldung.success { background: var(--gruen-hell); border-color: color-mix(in srgb, var(--gut) 35%, transparent); }
.meldung.error, .fehler { background: var(--rot-hell); border-color: color-mix(in srgb, var(--schlecht) 35%, transparent); }
.meldung.info, .meldung.warning, .hinweis { background: var(--gold-hell); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.hinweis.hauptadmin { background: var(--rot-hell); border-color: color-mix(in srgb, var(--schlecht) 35%, transparent); }
.warnung {
  padding: 0.6rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--schlecht); background: var(--rot-hell); margin-bottom: 0.8rem;
}
.warnung p { margin: 0 0 0.5rem; }
.warnung ul { margin: 0 0 0.5rem; padding-left: 1.2rem; }

/* --- Angaben und Tabellen --------------------------------------------------------------------------- */
.angaben { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; }
.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: 0.38rem 0.55rem; border-bottom: 1px solid var(--rand); white-space: nowrap; }
.tabelle th { color: var(--text-leise); font-weight: 600; font-size: 0.82rem; }
.tabelle tbody tr:hover td { background: var(--flaeche-leise); }
.tabelle tr.inaktiv td { color: var(--text-leise); }
.tabelle tr.zwischenzeile th { padding-top: 0.6rem; color: var(--text); font-weight: 600; font-size: 0.9rem; border-bottom: 1px solid var(--rand-feld); }
.tabelle td.knoepfe { width: 1%; }
/* Platzhalter-Verzeichnis (Wunsch 09.11.2026): einzeilig, schlank, ohne seitliches Scrollen – Langes gekürzt, ganz im Tooltip */
.tabelle.platzhalter { table-layout: fixed; font-size: 0.88rem; }
.tabelle.platzhalter td, .tabelle.platzhalter thead th { padding: 0.12rem 0.45rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tabelle.platzhalter tr.zwischenzeile th { white-space: normal; padding-top: 0.5rem; }
.tabelle.platzhalter code { font-size: 0.95em; }
.tabelle.platzhalter td.optionen { color: var(--text-leise); }
.tabelle.platzhalter td.optionen code { margin-right: 0.15rem; }
.tabelle.platzhalter td.knoepfe { width: auto; text-align: right; overflow: visible; }
.tabelle.platzhalter td.knoepfe .knopf-klein { padding-block: 0.05rem; }
.tabelle.platzhalter col.sp-platzhalter { width: 21%; }
.tabelle.platzhalter col.sp-kurz { width: 11%; }
.tabelle.platzhalter col.sp-bedeutung { width: 19%; }
.tabelle.platzhalter col.sp-art { width: 7%; }
.tabelle.platzhalter col.sp-optionen { width: 14%; }
.tabelle.platzhalter col.sp-beispiel { width: 16%; }
.tabelle.platzhalter col.sp-knoepfe { width: 9.5rem; }
@media (max-width: 768px) {  /* Handy: nur Platzhalter, Bedeutung und Kopieren */
  .tabelle.platzhalter col.sp-kurz, .tabelle.platzhalter col.sp-art, .tabelle.platzhalter col.sp-optionen, .tabelle.platzhalter col.sp-beispiel { width: 0; }
  .tabelle.platzhalter td:nth-child(2), .tabelle.platzhalter td:nth-child(4), .tabelle.platzhalter td:nth-child(5), .tabelle.platzhalter td:nth-child(6),
  .tabelle.platzhalter thead th:nth-child(2), .tabelle.platzhalter thead th:nth-child(4), .tabelle.platzhalter thead th:nth-child(5),
  .tabelle.platzhalter thead th:nth-child(6) { display: none; }
}
.tabelle td.unterbegriff { padding-left: 2rem; }
.tabelle td.unterbegriff::before { content: "↳ "; color: var(--text-leise); }
.tabelle td.umbruch { white-space: normal; min-width: 12rem; }
.tabelle.protokoll td { vertical-align: top; }
.tabelle.protokoll tr.protokoll-anfang td { border-top: 2px solid var(--rand); }
.marke {
  font-size: 0.75rem; font-weight: 600; color: var(--gold-text); background: var(--gold-hell); margin-left: 0.4rem;
  padding: 0.05rem 0.4rem; border-radius: 5px; white-space: nowrap;
}
.listenkacheln { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.listenkacheln li { border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.6rem 0.8rem; display: flex; flex-direction: column; background: var(--flaeche); }
.matrix th { white-space: normal; vertical-align: bottom; font-size: 0.82rem; }
.matrix td.stufe { text-align: center; font-weight: 600; }
.matrix .stufe-B, .matrix .stufe-ja { color: var(--gut); }
.matrix .stufe-L { color: var(--gold-text); }
.matrix .stufe-–, .matrix .stufe-nein { color: var(--text-leise); font-weight: normal; }

/* --- Status ----------------------------------------------------------------------------------------- */
.status {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.55rem;
  border-radius: 999px; white-space: nowrap; background: var(--flaeche-leise); color: var(--text-leise); border: 1px solid var(--rand);
}
.status-beauftragt, .status-in_bearbeitung { color: var(--gold-text); background: var(--gold-hell); border-color: transparent; }
.status-abgeschlossen { color: var(--gut); background: var(--gruen-hell); border-color: transparent; }
.status-storniert { color: var(--schlecht); background: var(--rot-hell); border-color: transparent; text-decoration: line-through; }
ul.status { display: block; border: none; background: none; font-size: inherit; font-weight: normal; padding: 0 0 0 1.2rem; border-radius: 0; color: inherit; }

/* --- Fall: Kopf ------------------------------------------------------------------------------------- */
.fall-oben { margin-bottom: 0.9rem; }
.fallkopf {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; box-shadow: var(--schatten);
  padding: 0.85rem 1.1rem 0; display: flex; flex-direction: column; gap: 0.55rem;
}
.fallkopf:not(:has(.oberreiter)) { padding-bottom: 0.85rem; }
.fallkopf-oben { display: flex; gap: 0.9rem; align-items: center; }
.fallkopf-foto {
  flex: 0 0 auto; width: 3.7rem; height: 3.7rem; border-radius: 50%; object-fit: cover; background: var(--hintergrund);
  border: 1px solid var(--rand);
}
.fallkopf-inhalt { flex: 1 1 auto; min-width: 0; }
.fallkopf-meta { margin: 0 0 0.1rem; display: flex; flex-wrap: wrap; gap: 0 0.5rem; font-size: 0.86rem; color: var(--text-leise); }
.fallkopf-meta > span + span::before { content: "·"; margin-right: 0.5rem; color: var(--rand-feld); }
.fallnummer { font-family: ui-monospace, Consolas, monospace; font-weight: 600; color: var(--text); }
.fallkopf-name { margin: 0; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.lebensdaten { font-size: 1rem; font-weight: normal; color: var(--text-leise); margin-left: 0.6rem; white-space: nowrap; letter-spacing: 0; }
.fallkopf-aktionen { display: flex; gap: 0.45rem; align-items: center; flex: 0 0 auto; }
.status-wahl { display: inline-flex; margin: 0; }
.status-knopf {
  position: relative; display: inline-flex; align-items: center; gap: 0.45rem; height: 1.85rem; padding: 0 0.6rem;
  border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--flaeche); color: var(--text);
  font-weight: 600; font-size: 0.92rem; white-space: nowrap; text-decoration: none;
}
.status-knopf select {
  appearance: none; -webkit-appearance: none; border: none; background: transparent; color: inherit; font: inherit;
  padding: 0 1.1rem 0 0; margin-right: -1.1rem; cursor: pointer; position: relative; z-index: 1;
}
.status-knopf select option { color: var(--text); background: var(--flaeche); font-weight: normal; }
.status-knopf select:focus { outline: none; }
.status-knopf:hover:not(.nur-lesen) { border-color: var(--gold); }
.status-punkt { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--text-leise); flex: 0 0 auto; }
.status-beauftragt .status-punkt, .status-in_bearbeitung .status-punkt { background: var(--gold); }
.status-abgeschlossen .status-punkt { background: var(--gut); }
.status-storniert .status-punkt { background: var(--schlecht); }
.status-knopf.status-storniert { text-decoration: line-through; }
.fallkopf-symbole { display: flex; flex-wrap: wrap; gap: 0.3rem 1.05rem; list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.symbol, .symbol a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.symbol a:hover .symbol-text { text-decoration: underline; text-underline-offset: 2px; }
.symbol-rot, .symbol-rot a { color: var(--schlecht); font-weight: 600; }
.symbol-warn, .symbol-warn a { color: var(--gold-text); }
.kopf-dialog .raster { margin-bottom: 0.5rem; }

/* Oberreiter: unterstrichen im Kopf */
.reiter { display: flex; flex-wrap: wrap; }
.oberreiter { gap: 0 1.3rem; border-top: 1px solid var(--rand); margin: 0.1rem -1.1rem 0; padding: 0 1.1rem; }
.reiter-eintrag {
  display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-leise); text-decoration: none; font-weight: 500;
}
.oberreiter .reiter-eintrag { padding: 0.6rem 0 0.55rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.oberreiter .reiter-eintrag:hover { color: var(--text); }
.oberreiter .reiter-eintrag.aktiv { color: var(--text); font-weight: 600; border-bottom-color: var(--gold); }
.reiter-eintrag.folgt { color: var(--text-leise); opacity: 0.6; cursor: default; }
.reiter-nummer { font-size: 0.72rem; color: var(--text-leise); font-weight: 600; font-variant-numeric: tabular-nums; }
.reiter-fehlend {
  font-size: 0.7rem; font-weight: 700; min-width: 1.15rem; text-align: center; padding: 0 0.3rem; line-height: 1.15rem;
  border-radius: 999px; color: var(--schlecht); background: var(--rot-hell);
}

/* --- Fall: Unterreiter links, Inhalt rechts ---------------------------------------------------------- */
.fall-rumpf { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.fall-rumpf > .fall-inhalt:only-child { grid-column: 1 / -1; }
.fall-inhalt { min-width: 0; }
.fall-rumpf > .fall-breit { grid-column: 1 / -1; min-width: 0; }  /* z. B. PDF-Vorschau beim Erzeugen, unter den Unterreitern */
.fall-seitennav { display: flex; flex-direction: column; gap: 0.2rem; }
.unterreiter { flex-direction: column; gap: 1px; }
.unterreiter .reiter-eintrag { padding: 0.42rem 0.6rem; border-radius: 7px; font-size: 0.95rem; }
.unterreiter .reiter-eintrag:hover { background: rgba(0, 0, 0, 0.035); color: var(--text); }
.unterreiter .reiter-eintrag.aktiv { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: var(--schatten), 0 0 0 1px var(--rand); }
.unterreiter .reiter-fehlend { margin-left: auto; }
.auf-dieser-seite { display: flex; flex-direction: column; margin-top: 0.4rem; }
.auf-dieser-seite[hidden] { display: none; }
.auf-dieser-seite .navigation-titel { color: var(--text-leise); padding-left: 0.6rem; }
.auf-dieser-seite a { padding: 0.24rem 0.6rem; color: var(--text-leise); text-decoration: none; font-size: 0.88rem; border-radius: 6px; }
.auf-dieser-seite a:hover, .auf-dieser-seite a.aktiv { color: var(--text); }
.auf-dieser-seite a.aktiv { font-weight: 600; }

/* --- Fall: Listen, Personen, Abschnitte ------------------------------------------------------------- */
.gruppen-aktionen { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: center; margin: 0 0 0.4rem; font-size: 0.88rem; }
.gruppen-aktionen select { max-width: 22rem; width: auto; }
.listeneintrag { border-top: 1px solid var(--rand); padding-top: 0.4rem; margin-top: 0.4rem; }
.listeneintrag.erledigt { opacity: 0.6; }
.person { border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.55rem 0.8rem 0.2rem; margin: 0 0 0.6rem; background: var(--flaeche); }
.person > h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.person .marke { font-weight: 600; }
.kuerzel { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; color: var(--text-leise); font-weight: normal; }
.uebernahme { padding: 0.5rem 0.7rem; border: 1px dashed var(--rand-feld); border-radius: var(--radius); }
.reiter-knoepfe { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; margin-top: 0.6rem; }
.vorschau { border: 1px dashed var(--rand-feld); border-radius: var(--radius); padding: 0.6rem 0.9rem; margin-bottom: 1rem; }
.beispielnummern code { font-size: 1.05rem; }

/* --- Automatisches Speichern, F4-Schnellsuche, F1-Hilfe, Dialoge ------------------------------------ */
.speicher-hinweis {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50; max-width: 26rem; padding: 0.55rem 0.9rem;
  border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); font-size: 0.9rem; opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.speicher-hinweis.sichtbar { opacity: 1; }
.speicher-hinweis.gut { background: var(--gruen-hell); }
.speicher-hinweis.schlecht { background: var(--rot-hell); }
.speicher-hinweis.mit-link { pointer-events: auto; }
/* Vorlage duplizieren (Seitenkopf) */
details.duplizieren { position: relative; }
details.duplizieren > summary { list-style: none; cursor: pointer; }
details.duplizieren > summary::-webkit-details-marker { display: none; }
.duplizieren-form {
  position: absolute; right: 0; top: calc(100% + 0.3rem); z-index: 40; width: min(22rem, calc(100vw - 2rem));
  display: grid; gap: 0.4rem; padding: 0.8rem; background: var(--flaeche); border: 1px solid var(--rand-feld);
  border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
/* Platzhalter-Vorschläge (Suchfeld und nach „{“ im Feld) */
.platzhalter-vorschlaege {
  position: absolute; z-index: 60; margin: 0; padding: 0.25rem 0; list-style: none; max-width: min(48rem, calc(100vw - 2rem));
  max-height: 24rem; overflow-y: auto; background: var(--flaeche); color: var(--text); border: 1px solid var(--rand-feld);
  border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); font-size: 0.88rem;
}
.platzhalter-vorschlaege li { padding: 0.3rem 0.7rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platzhalter-vorschlaege li.aktiv { background: var(--gold-hell); }
.platzhalter-vorschlaege code.kurz { text-decoration: underline dotted; }
.platzhalter-vorschlaege code.kurz:hover { background: var(--gold); color: #fff; border-radius: 3px; }
dialog.schnellsuche, dialog.hilfe-dialog {
  width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 4rem); border: 1px solid var(--rand);
  border-radius: 12px; background: var(--flaeche); color: var(--text); padding: 1.1rem 1.3rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
dialog::backdrop { background: rgba(20, 20, 22, 0.45); }
.schnellsuche h2, .hilfe-dialog h2 { margin: 0 0 0.6rem; font-size: 1.15rem; font-weight: 600; }
.hilfe-dialog h3 { margin: 1rem 0 0.4rem; font-size: 1rem; }
.hilfe-dialog .tabelle th { white-space: nowrap; color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.hilfe-dialog .tabelle td { white-space: normal; }
.schnellsuche input[type="search"] {
  width: 100%; font: inherit; padding: 0.5rem 0.7rem; border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--feld); color: var(--text);
}
.schnellsuche .treffer { list-style: none; margin: 0.6rem 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.schnellsuche .treffer li { padding: 0.45rem 0.65rem; border-radius: 6px; cursor: pointer; }
.schnellsuche .treffer li.gewaehlt { background: var(--gold-hell); outline: 1px solid var(--gold); }
.suchbereich { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--text-leise); }
.suchbereich .knopf-klein.aktiv { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.ort-auswahl {
  position: absolute; z-index: 60; list-style: none; margin: 0; padding: 0.25rem 0; max-height: 16rem; overflow-y: auto;
  border: 1px solid var(--rand-feld); border-radius: var(--radius); background: var(--flaeche); color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.ort-auswahl li { padding: 0.3rem 0.75rem; cursor: pointer; white-space: nowrap; }
.ort-auswahl li.gewaehlt { background: var(--gold-hell); }
.ort-auswahl .ort-auswahl-kopf { font-size: 0.8rem; color: var(--text-leise); cursor: default; border-bottom: 1px solid var(--rand); }
.tipp-auswahl { max-width: min(42rem, calc(100vw - 2rem)); }
.tipp-auswahl li { white-space: normal; }
.tipp-auswahl li .leise { font-size: 0.85rem; }

/* --- Adressbuch, Listen, Verwaltung ----------------------------------------------------------------- */
.suchleiste { display: flex; flex-wrap: wrap; gap: 0.45rem 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.suchleiste input[type="search"] { flex: 1 1 16rem; }
.suchleiste input[type="search"], .suchleiste select { width: auto; max-width: 100%; }
.schalter { display: inline-flex; gap: 0.35rem; align-items: center; white-space: nowrap; }
.seiten { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; margin-top: 1rem; }
.kategorien .feld-mehrfach > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem 1rem; }
.kategorien .feld-mehrfach > div > div > label { font-weight: 600; color: var(--text-leise); font-size: 0.9rem; }
fieldset[hidden] { display: none; }
details.inaktive { margin-top: 1rem; }
details.inaktive summary { cursor: pointer; color: var(--text-leise); }

/* Zwei-Faktor-Einrichtung */
.schritte li { margin-bottom: 0.75rem; }
.qr-code { background: #fff; display: inline-block; padding: 0.5rem; margin: 0.5rem 0; border-radius: var(--radius); }
.qr-code svg { display: block; width: 12rem; height: 12rem; }
.schluessel { font-size: 1.05rem; letter-spacing: 0.05em; word-break: break-all; }

/* Zuordnung der Formularfelder: übernommene Vorschläge markieren, Eingaben über die volle Breite */
.zuordnung tr.uebernommen td { background: color-mix(in srgb, var(--gut) 12%, transparent); }
.zuordnung textarea, .zuordnung input[type="text"] { width: 100%; min-width: 16rem; }
.zuordnung .vorschlag code { white-space: normal; }

/* Dokumente im Fall: Auswahl, Hinweise, Vorschau */
.erzeugen-hinweise { margin-bottom: 0.8rem; }
.ausgabe-knoepfe { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ausgabe-knoepfe form { margin: 0; }
iframe.vorschau { width: 100%; height: 80vh; min-height: 30rem; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; }
.mehrspaltig { columns: 18rem auto; column-gap: 1.5rem; }
.mehrspaltig label { display: block; break-inside: avoid; padding: 0.1rem 0; }

/* Hochladen in die Ablage */
.ablagefeld { border: 2px dashed var(--rand-feld); border-radius: 10px; padding: 1.2rem 1rem; background: var(--flaeche-leise); text-align: center; }
.ablagefeld p { margin: 0.35rem 0; }
.ablagefeld svg { vertical-align: -0.25em; color: var(--gold); }
.ablagefeld-leer > p:first-child svg { display: block; margin: 0 auto 0.3rem; }
.ablagefeld .knopf-zweit { margin-right: 0; }
.ablagefeld.ziehen { border-color: var(--gold); background: var(--gold-hell); }
.ablagefeld.gefuellt { padding: 0.4rem; text-align: left; }
/* unterer Teil mit Plus: weitere Dateien hineinziehen oder auswählen (Wunsch 29.10.2026) */
.ablagefeld-mehr { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; padding: 0.45rem 0.5rem 0.2rem; border-top: 1px dashed var(--rand-feld); }
.ablagefeld-mehr[hidden] { display: none; }
.ablagefeld-mehr .symbol-knopf { border-color: var(--rand-feld); background: var(--flaeche); }
.ablagefeld-mehr .leise { font-size: 0.85rem; }
.dateiliste { list-style: none; margin: 0; padding: 0; counter-reset: datei; }
.dateiliste li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.4rem; border: 1px solid transparent; border-radius: 6px;
  background: var(--flaeche); cursor: pointer; }
.dateiliste li:hover { border-color: var(--gold); }
.dateiliste li.gewaehlt { border-color: var(--gold); background: var(--gold-hell); }
.dateiliste li:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.dateiliste .dateitext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dateiliste .dateiangaben { font-size: 0.8rem; overflow-wrap: anywhere; }
.dateiliste li + li { margin-top: 0.3rem; }
.dateiliste li::before { counter-increment: datei; content: counter(datei); flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--gold-hell); color: var(--gold-text); font-size: 0.78rem; font-weight: 600; line-height: 1.4rem; text-align: center; }
.dateiliste .dateiname { overflow-wrap: anywhere; }
.dateiliste .leise { flex: 0 0 auto; font-size: 0.82rem; }
.dateiliste .knoepfe { flex: 0 0 auto; display: inline-flex; gap: 0.15rem; }
.hochladen-optionen { display: flex; flex-direction: column; gap: 0.7rem; }
.hochladen-optionen .feld { display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem; }
.hochladen-optionen .feld > label { align-self: flex-start; text-align: left; }
.hochladen-fuss { margin: 0.2rem 0 0; }
.optionen-fuer { margin: 0; padding-bottom: 0.35rem; border-bottom: 1px solid var(--rand); font-size: 0.9rem; color: var(--text-leise); overflow-wrap: anywhere; }
.optionen-fuer strong { color: var(--text); }
/* Auswahl als zusammenhängende Knöpfe (Fotos verkleinern) */
.segmente { border: none; margin: 0; padding: 0; min-width: 0; }
.segmente legend { padding: 0; margin-bottom: 0.25rem; font-weight: 500; color: var(--text-leise); }
.segmente-knoepfe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rand-feld); border-radius: 7px; overflow: hidden; background: var(--flaeche); }
.segmente-knoepfe label { position: relative; cursor: pointer; }
.segmente-knoepfe label + label { border-left: 1px solid var(--rand-feld); }
.segmente-knoepfe input { position: absolute; opacity: 0; pointer-events: none; }
.segmente-knoepfe span { display: flex; flex-direction: column; justify-content: center; height: 100%; box-sizing: border-box; padding: 0.4rem 0.6rem; line-height: 1.2; text-align: center; }
.segmente-knoepfe small { color: var(--text-leise); font-size: 0.75rem; }
.segmente-knoepfe label:hover span { background: var(--gold-hell); }
.segmente-knoepfe input:checked + span { background: var(--akzent); color: var(--akzent-text); }
.segmente-knoepfe input:checked + span small { color: inherit; opacity: 0.8; }
.segmente-knoepfe input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.zusammenfassen { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center;
  padding: 0.5rem 0.7rem; border: 1px solid var(--rand); border-radius: 8px; }
.zusammenfassen[hidden] { display: none; }
.zusammenfassen > label { display: flex; flex-direction: column; gap: 0.1rem; color: var(--text); font-weight: normal; }

/* Übersicht „Unterlagen“ im Fall */
.aufbewahren { margin: 0.5rem 0 1rem; }
.aufbewahren label { font-weight: 600; }

@media (max-width: 30rem) {
  .angaben { grid-template-columns: 1fr; }
  .angaben dd { margin-bottom: 0.5rem; }
}

/* --- Großer Bildschirm: Fallkopf bleibt beim Scrollen oben, Unterreiter links ebenfalls (Wunsch 24.10.2026) -- */
@media (min-width: 48.01rem) and (min-height: 34rem) {
  .fall-oben {
    position: sticky; top: 0; z-index: 30; background: var(--hintergrund);
    padding-top: 1rem; margin-top: -1rem;
  }
  .fall-oben.gescrollt .fallkopf { box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.25); }
  /* beim Scrollen platzsparend: Name, Status und Reiter bleiben */
  .fall-oben.gescrollt .fallkopf { padding-top: 0.45rem; gap: 0.3rem; }
  .fall-oben.gescrollt .fallkopf-meta { display: none; }
  .fall-oben.gescrollt .fallkopf-name { font-size: 1.2rem; }
  .fall-oben.gescrollt .fallkopf-foto { width: 2.3rem; height: 2.3rem; }
  .fall-oben.gescrollt .symbol-text { display: none; }
  .fall-oben.gescrollt .oberreiter .reiter-eintrag { padding: 0.4rem 0 0.35rem; }
  .fall-seitennav { position: sticky; top: var(--fall-oben-hoehe, 11rem); max-height: calc(100vh - var(--fall-oben-hoehe, 11rem) - 1rem); overflow-y: auto; }
  html:has(.fall-oben) { scroll-padding-top: var(--fall-oben-hoehe, 11rem); }
}

/* --- Schmale Bildschirme (Tablet hochkant, Handy) ---------------------------------------------------- */
@container inhalt (max-width: 46rem) {  /* Container statt Fenster: wächst mit der Schriftgröße (Wunsch 25.10.2026) */
  .fall-rumpf { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .fall-seitennav { position: static; max-height: none; }
  .unterreiter { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .unterreiter .reiter-eintrag { flex: 0 0 auto; }
  .auf-dieser-seite { display: none; }
}
@media (max-width: 48rem) {
  body.mit-leiste { display: block; }
  .leiste { position: sticky; top: 0; z-index: 40; width: auto; height: auto; max-height: 100vh; padding: 0.5rem 0.75rem; gap: 0.6rem; }
  .leiste-kopf { padding: 0; }
  .leiste-menueknopf { display: inline-flex; }
  .leiste-inhalt { display: none; padding-bottom: 0.4rem; }
  body.menue-offen .leiste-inhalt { display: flex; }
  .inhalt { --rand-x: 0.55rem; --rand-y: 0.7rem; }
  .karte { padding: 0.75rem 0.8rem; }
  .fallkopf { padding: 0.7rem 0.8rem 0; }
  .fallkopf-oben { flex-wrap: wrap; }
  .fallkopf-aktionen { width: 100%; }
  .fallkopf-foto { width: 3rem; height: 3rem; }
  .fallkopf-name { font-size: 1.3rem; }
  .lebensdaten { display: block; margin: 0.1rem 0 0; }
  .oberreiter { margin: 0 -0.8rem; padding: 0 0.8rem; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .oberreiter .reiter-eintrag { flex: 0 0 auto; }
  .suchleiste select, .suchleiste input[type="search"] { flex: 1 1 9rem; }
  .tabelle { display: block; overflow-x: auto; }
  .titelzeile > span, .ausgabe-knoepfe { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .knopf-zweit { margin-right: 0; }
  .zuordnung textarea, .zuordnung input[type="text"] { min-width: 12rem; }
  iframe.vorschau { height: 70vh; min-height: 20rem; }
  .speicher-hinweis { left: 0.5rem; right: 0.5rem; max-width: none; }
  .navigation .zuletzt { display: none; }  /* keine Fälle im Handy-Menü (Wunsch 03.11.2026) */
}

/* --- Seitenleiste: zuletzt geöffnete Fälle unter „Fälle“, Menü einfahrbar (Wunsch 24.10.2026) --------- */
.navigation .zuletzt { display: flex; flex-direction: column; gap: 1px; margin: 0.1rem 0 0.35rem 1.45rem; padding-left: 0.5rem; border-left: 1px solid #3a3b40; }
.navigation .zuletzt a { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0.28rem 0.5rem; white-space: nowrap; max-width: 100%; overflow: hidden; }
.navigation .zuletzt a.aktiv { background: rgba(199, 164, 106, 0.16); color: #fff; font-weight: normal; }
.zuletzt-nummer { font-family: ui-monospace, Consolas, monospace; font-size: 0.76rem; color: var(--leiste-leise); line-height: 1.25; }
.zuletzt a.aktiv .zuletzt-nummer { color: var(--logo); }
.zuletzt-name { font-size: 0.88rem; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.leiste-einfahren { background: none; border: none; color: var(--leiste-leise); padding: 0.3rem; border-radius: 6px; cursor: pointer; }
.leiste-einfahren:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
@media (min-width: 48.01rem) {
  html.leiste-zu .leiste { flex-basis: 5.4rem; width: 5.4rem; padding-left: 0.6rem; padding-right: 0.6rem; }  /* 50 % breiter (26.10.2026) */
  html.leiste-zu .navigation a .sym { width: 24px; height: 24px; }
  html.leiste-zu .navigation a { width: 2.9rem; height: 2.9rem; margin: 0 auto; padding: 0; border-radius: 9px; }  /* quadratisch (26.10.2026) */
  html.leiste-zu .leiste { scrollbar-width: none; }  /* Scrollbalken würde die Mitte verschieben; Mausrad geht weiter */
  html.leiste-zu .leiste::-webkit-scrollbar { display: none; }
  html.leiste-zu .navigation { gap: 0.15rem; }
  html.leiste-zu .kuerzel-kreis { width: 2.2rem; height: 2.2rem; font-size: 0.9rem; }
  html.leiste-zu .leiste-abmelden .sym, html.leiste-zu .postfach-knopf .sym { width: 20px; height: 20px; }
  html.leiste-zu .logo-zeichen { width: 2.3rem; height: 2.3rem; font-size: 1.15rem; }
  html.leiste-zu .leiste-kopf { flex-direction: column; gap: 0.6rem; padding: 0; }
  html.leiste-zu .logo-text, html.leiste-zu .nav-text, html.leiste-zu .mandant-wahl, html.leiste-zu .mandant-name,
  html.leiste-zu .navigation .zuletzt, html.leiste-zu .navigation-titel { display: none; }
  html.leiste-zu .navigation a { justify-content: center; }
  html.leiste-zu .leiste-fuss { flex-direction: column; padding-left: 0; padding-right: 0; }
  html.leiste-zu .leiste-konto { justify-content: center; padding: 0.25rem 0; }
  html.leiste-zu .leiste-einfahren .sym { transform: scaleX(-1); }
}
@media (max-width: 48rem) { .leiste-einfahren { display: none; } }

/* --- Zwei Abschnitte nebeneinander (Wunsch 24.10.2026); Listen (Termine, Mitwirkende, Aufgaben, Ereignisse …),
   Tabellen und alles außer Abschnitten über die volle Breite. Schmalere Bildschirme: untereinander. ------- */
@container karte (min-width: 50rem) {  /* zwei Abschnitte nur, wenn je Spalte etwa 24 Zeichenbreiten (rem) Platz sind */
  form:has(> fieldset.gruppe):not(.schmal form) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.2rem; align-items: start;
  }
  form:has(> fieldset.gruppe):not(.schmal form) > fieldset.gruppe-zweizeilig { grid-row: span 2; }
  form:has(> fieldset.gruppe):not(.schmal form) > :not(fieldset.gruppe),
  form:has(> fieldset.gruppe):not(.schmal form) > fieldset.gruppe:has(.person, .tabelle, table, .gruppe-breit) {
    grid-column: 1 / -1;
  }
}
/* Zusammengehörige kleine Abschnitte untereinander in einer Spalte (Wunsch 15.11.2026: Grabkreuz und Grabstein) */
.gruppen-stapel { display: flex; flex-direction: column; min-width: 0; }
@container karte (min-width: 50rem) {
  form:has(> fieldset.gruppe):not(.schmal form) > div.gruppen-stapel { grid-column: auto; }
}
/* Wunsch 15.11.2026: auf breiten Fenstern drei Abschnitte nebeneinander – je Spalte bleiben gut 24rem */
@container karte (min-width: 78rem) {
  form:has(> fieldset.gruppe):not(.schmal form) { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.9rem; }
  /* kleine Abschnitte rücken in freie Spalten neben den oberen auf, statt unter einem breiten Abschnitt allein zu stehen */
  form:has(> fieldset.gruppe):not(.schmal form) { grid-auto-flow: row dense; }
}
/* Rückmeldung 15.11.2026: Vier Spalten sind zu breit – bei drei ist Schluss.
   Und: In Karten mit mehreren Blöcken (Termin, Person, Bestellung) stehen die Felder eines Blocks untereinander, die Blöcke
   nebeneinander – nicht die Felder eines Blocks quer über die ganze Breite verteilt. */
@container karte (min-width: 50rem) {
  .person:has(> fieldset.gruppe) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.2rem; align-items: start; }
  .person:has(> fieldset.gruppe) > :not(fieldset.gruppe),
  .person:has(> fieldset.gruppe) > fieldset.gruppe:has(.tabelle, table, .gruppe-breit) { grid-column: 1 / -1; }
}
@container karte (min-width: 78rem) {
  .person:has(> fieldset.gruppe) { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.9rem; }
}
/* Personenkarte (Rückmeldung 16.11.2026): links „Person“, daneben „Anschrift und Kontakt“ über die ganze Höhe, rechts
   untereinander, was sonst eingeklappt war – Anderer Elternteil, Geburt, Bankverbindung (aufgeklappt von static/js/eingabe.js) */
@container karte (min-width: 50rem) {
  .person:has(> fieldset.gruppe) > details.gruppe-klappbar { grid-column: auto; }
  .person:has(> details.gruppe-klappbar) { grid-auto-flow: row dense; }
  .person:has(> details.gruppe-klappbar) > fieldset.gruppe { grid-row: span 3; }
}
/* Handy: Beschriftung wieder über dem Feld */
@media (max-width: 48rem) {
  .feld { grid-template-columns: minmax(0, 1fr); row-gap: 0.2rem; }
  .feld > label, .feld > :not(label) { grid-column: 1; text-align: left; }
  .feld:has(textarea) > label, .feld-mehrfach > label { padding-top: 0; }
  .feld-schalter { grid-template-columns: minmax(0, 1fr) auto; }
  .feld-schalter > label { grid-column: 1; }
  .feld-schalter > .feld-eingabe { grid-column: 2; grid-row: 1; }
}

/* --- Übersicht im Fall (Wunsch 24.10.2026): zwei Spalten, Notiz wächst mit dem Inhalt ------------------- */
.uebersicht { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 0.9rem; align-items: start; margin-bottom: 0.75rem; }
.uebersicht-spalte { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.uebersicht .karte + .karte { margin-top: 0; }
.uebersicht > :not(.uebersicht-spalte) { grid-column: 1 / -1; }
.uebersicht-knoepfe { margin: 0; }
.uebersicht-notiz textarea {
  width: 100%; font: inherit; line-height: 1.4; padding: 0.45rem 0.6rem; border: 1px solid var(--rand-feld); border-radius: 6px;
  background: var(--feld); color: var(--text); resize: vertical; min-height: calc(4 * 1.4em + 0.9rem); field-sizing: content;
}
.uebersicht-notiz textarea:focus { outline: none; border-color: var(--gold); background: var(--flaeche); box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.25); }
.summen { width: 100%; border-collapse: collapse; margin-top: 0.6rem; font-variant-numeric: tabular-nums; }
.summen th { text-align: left; font-weight: 500; color: var(--text-leise); padding: 0.2rem 0; }
.summen td { text-align: right; padding: 0.2rem 0; }
.summen .summe-offen th, .summen .summe-offen td { border-top: 1px solid var(--rand-feld); padding-top: 0.4rem; font-weight: 700; color: var(--text); }
.ansprech-name { margin: 0 0 0.3rem; }
.kontaktliste, .kurzliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.kurzliste li { padding: 0.15rem 0; border-bottom: 1px solid var(--rand); }
.kurzliste li:last-child { border-bottom: none; }
.termin-zeile { padding: 0.35rem 0; border-bottom: 1px solid var(--rand); }
.termin-zeile:last-child { border-bottom: none; }
/* vergangene Termine: nur die Schrift blasser – keine Transparenz, sonst wird auch die Kontaktkarte durchsichtig */
.termin-zeile.vorbei .termin-titel, .termin-zeile.vorbei .termin-titel strong, .termin-zeile.vorbei .kontakt-name { color: var(--text-leise); }
.termin-titel, .termin-kontakte { margin: 0; }
.termin-kontakte { color: var(--text-leise); margin-top: 0.15rem; }
/* Mitwirkende: Name mit Kontaktkarte beim Darüberfahren, auf dem Handy beim Antippen */
.kontakt { position: relative; display: inline-block; }
.kontakt-name {
  font: inherit; color: var(--gold-text); background: none; border: none; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.kontakt-karte {
  display: none; position: absolute; left: 0; top: 100%; z-index: 45; min-width: 14rem; max-width: 20rem; margin-top: 0.3rem;
  padding: 0.55rem 0.75rem; border: 1px solid var(--rand-feld); border-radius: var(--radius); background: var(--flaeche);
  color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); flex-direction: column; gap: 0.2rem; white-space: normal;
}
.kontakt:hover .kontakt-karte, .kontakt:focus-within .kontakt-karte { display: flex; }
@container fallinhalt (max-width: 46rem) {
  .uebersicht { grid-template-columns: minmax(0, 1fr); }
}
/* Ansprechpartner oben links, mit beschrifteten Zeilen (Wunsch 24.10.2026) */
.uebersicht-ansprech { min-height: 10.5rem; }
.ansprech-angaben { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.3rem 0.75rem; margin: 0.5rem 0 0; }
.ansprech-angaben dt { color: var(--text-leise); font-size: 0.93rem; text-align: right; }
.ansprech-angaben dd { margin: 0; overflow-wrap: anywhere; }

/* --- Fallkopf und Reiter in der Optik der Menüleiste (Wunsch 24.10.2026): dunkel, helle Schrift, Gold --------- */
.fallkopf { background: var(--leiste); border-color: var(--leiste); color: var(--leiste-text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.fallkopf-name { color: #f1eee8; }
.fallkopf-meta, .lebensdaten { color: var(--leiste-leise); }
.fallkopf-meta > span + span::before { color: #4a4b50; }
.fallkopf .fallnummer { color: var(--logo); }
.fallkopf-foto { border-color: #3c3d43; background: var(--leiste-aktiv); }
.fallkopf .status-knopf, .fallkopf .knopf-symbol { background: var(--leiste-aktiv); border-color: #3c3d43; color: #f1eee8; }
.fallkopf .status-knopf:hover:not(.nur-lesen), .fallkopf .knopf-symbol:hover { border-color: var(--logo); }
.fallkopf .status-knopf select option { color: var(--text); background: var(--flaeche); }
.fallkopf .status-anfrage .status-punkt { background: var(--leiste-leise); }
.fallkopf .symbol, .fallkopf .symbol a { color: var(--leiste-text); }
.fallkopf .symbol-rot, .fallkopf .symbol-rot a { color: #f2786b; }
.fallkopf .symbol-warn, .fallkopf .symbol-warn a { color: var(--logo); }
.oberreiter { border-top-color: #2c2d31; }
.oberreiter .reiter-eintrag { color: var(--leiste-leise); }
.oberreiter .reiter-eintrag:hover { color: #fff; }
.oberreiter .reiter-eintrag.aktiv { color: #fff; border-bottom-color: var(--logo); }
.fallkopf .reiter-nummer { color: #6f6b64; }
.fallkopf .reiter-eintrag.aktiv .reiter-nummer { color: var(--logo); }
.fallkopf .reiter-fehlend, .fall-seitennav .reiter-fehlend { color: #f2786b; background: rgba(242, 120, 107, 0.16); }
.fall-oben.gescrollt .fallkopf { box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45); }
/* Unterreiter links: dunkle Fläche wie das Menü */
.fall-seitennav { background: var(--leiste); border-radius: 10px; padding: 0.45rem; color: var(--leiste-text); }
.unterreiter .reiter-eintrag { color: var(--leiste-text); }
.unterreiter .reiter-eintrag:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.unterreiter .reiter-eintrag.aktiv { background: var(--leiste-aktiv); color: #fff; box-shadow: none; }
.fall-seitennav .reiter-nummer { color: #6f6b64; }
.unterreiter .reiter-eintrag.aktiv .reiter-nummer { color: var(--logo); }
.auf-dieser-seite { border-top: 1px solid #2c2d31; padding-top: 0.2rem; }
.auf-dieser-seite .navigation-titel { color: var(--leiste-leise); }
.auf-dieser-seite a { color: var(--leiste-leise); }
.auf-dieser-seite a:hover, .auf-dieser-seite a.aktiv { color: #fff; }

/* --- Fallseiten: Kopf bündig an der Menüleiste, ganz oben und über die volle Breite (Wunsch 24.10.2026);
   Hinweise und Meldungen stehen darunter, der Inhalt behält seine größte Breite --------------------------- */
.inhalt:has(> .fall-oben), .inhalt:has(> .seitenkopf) { display: flex; flex-direction: column; max-width: none; }
.inhalt:has(> .fall-oben) > *, .inhalt:has(> .seitenkopf) > * { width: 100%; max-width: calc(var(--inhalt-breite) - 2 * var(--rand-x)); margin-left: 0; margin-right: 0; }  /* linksbündig an der Leiste (Wunsch 24.10.2026) */
.inhalt:has(> .fall-oben) > .fall-oben, .inhalt:has(> .seitenkopf) > .seitenkopf {
  order: -1; width: auto; max-width: none; padding: 0;
  margin: calc(-1 * var(--rand-y)) calc(-1 * var(--rand-x)) 0.9rem;
}
.fall-oben .fallkopf { border: none; border-radius: 0; padding-left: var(--rand-x); padding-right: var(--rand-x); }
.fall-oben .oberreiter { margin-left: calc(-1 * var(--rand-x)); margin-right: calc(-1 * var(--rand-x)); padding: 0 var(--rand-x); }

/* --- Übrige Seiten: dunkler Seitenkopf wie beim Fall, mit Titel, Zurück-Link und Knöpfen (Wunsch 25.10.2026) -- */
.inhalt:has(> .seitenkopf) > .seitenkopf {
  padding: 0.85rem var(--rand-x); background: var(--leiste); color: var(--leiste-text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  /* so hoch wie der Fallkopf mit Reitern (in rem, damit es bei jeder Schriftgröße passt); Inhalt mittig */
  min-height: 8.95rem; display: flex; flex-direction: column; justify-content: center;
}
.seitenkopf:has(.oberreiter) .seitenkopf-zeile { margin-block: auto; }
.inhalt:has(> .seitenkopf) > .seitenkopf:has(.oberreiter) { padding-bottom: 0; }
.seitenkopf-zurueck { margin: 0 0 0.15rem; font-size: 0.86rem; }
.seitenkopf-zurueck a { color: var(--leiste-leise); text-decoration: none; }
.seitenkopf-zurueck a:hover { color: #fff; }
.seitenkopf-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem 2rem; }  /* Knöpfe direkt neben der Überschrift statt am rechten Rand (Wunsch 01.11.2026) */
.seitenkopf h1 { margin: 0; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; color: #f1eee8; }
.seitenkopf-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.seitenkopf-aktionen > span { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.seitenkopf-aktionen .knopf-zweit { margin-right: 0; background: var(--leiste-aktiv); border-color: #3c3d43; color: #f1eee8; }
.seitenkopf-aktionen .knopf-zweit:hover { border-color: var(--logo); }
.seitenkopf-aktionen .knopf { background: var(--logo); color: #1a1b1d; }
.seitenkopf-aktionen .leise { color: var(--leiste-leise); }
.seitenkopf .oberreiter { margin: 0.55rem calc(-1 * var(--rand-x)) 0; padding: 0 var(--rand-x); }
@media (max-width: 48rem) { .seitenkopf h1 { font-size: 1.3rem; } }

/* --- Ein-/Ausklappknopf auf der Kante der Menüleiste, halb innen, halb außen, auf Höhe des Logos ---------- */
@media (min-width: 48.01rem) {
  .leiste-einfahren {
    position: fixed; z-index: 60; top: 1.05rem; left: calc(13.5rem - 0.8rem); width: 1.6rem; height: 1.6rem; padding: 0;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--leiste-aktiv); border: 1px solid #4a4b50; color: #f1eee8; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  }
  .leiste-einfahren:hover { background: var(--leiste-aktiv); border-color: var(--logo); color: var(--logo); }
  html.leiste-zu .leiste-einfahren { left: calc(5.4rem - 0.8rem); top: 1.3rem; }
}

/* --- Persönliches Postfach unten in der Menüleiste (Wunsch 24.10.2026) ------------------------------------- */
.postfach { position: static; }
.postfach-knopf { position: relative; display: inline-flex; list-style: none; }
.postfach-knopf::-webkit-details-marker { display: none; }
.postfach[open] .postfach-knopf { color: #fff; background: rgba(255, 255, 255, 0.08); }
.postfach-zahl {
  position: absolute; top: -0.2rem; right: -0.25rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem;
  border-radius: 999px; background: #e05a47; color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 1.05rem; text-align: center;
  box-shadow: 0 0 0 2px var(--leiste);
}
/* Liste neben der Leiste (fest positioniert, weil die Leiste selbst scrollt und sonst abschneiden würde) */
.postfach-liste {
  position: fixed; z-index: 70; left: calc(13.5rem + 0.5rem); bottom: 0.8rem; width: min(24rem, calc(100vw - 15rem));
  max-height: 70vh; overflow-y: auto; padding: 0.7rem 0.85rem; border: 1px solid var(--rand); border-radius: 10px;
  background: var(--flaeche); color: var(--text); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}
html.leiste-zu .postfach-liste { left: calc(5.4rem + 0.5rem); }
.postfach-titel { margin: 0 0 0.5rem; font-weight: 600; }
.postfach-eintrag { padding: 0.5rem 0.6rem; border-radius: var(--radius); background: var(--flaeche-leise); border: 1px solid var(--rand); }
.postfach-eintrag + .postfach-eintrag { margin-top: 0.4rem; }
.postfach-eintrag p { margin: 0.2rem 0 0; font-size: 0.92rem; }
.postfach-eintrag.wichtig { background: var(--rot-hell); border-color: color-mix(in srgb, var(--schlecht) 35%, transparent); }
.postfach-eintrag.neu > strong::after { content: "neu"; margin-left: 0.45rem; font-size: 0.7rem; font-weight: 700; color: #fff; background: #e05a47; padding: 0.05rem 0.35rem; border-radius: 999px; vertical-align: 1px; }
@media (max-width: 48rem) {
  .postfach-liste { left: 0.5rem; right: 0.5rem; width: auto; bottom: 0.5rem; }
}

/* --- Schriftgröße: kleines und großes A über dem Benutzer (Wunsch 24.10.2026) ------------------------------ */
.schriftgroesse { margin-top: auto; display: flex; align-items: center; gap: 0.3rem; padding: 0 0.3rem; color: var(--leiste-leise); font-size: 0.85rem; }
.schriftgroesse .nav-text { flex: 1 1 auto; }
.schriftgroesse + .leiste-fuss { margin-top: 0.4rem; }
.schrift-knopf {
  width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  border: 1px solid #3c3d43; border-radius: 7px; background: var(--leiste-aktiv); color: #f1eee8; cursor: pointer; font-family: inherit; font-weight: 600;
}
.schrift-knopf.klein { font-size: 0.78rem; }
.schrift-knopf.gross { font-size: 1.1rem; }
.schrift-knopf:hover { border-color: var(--logo); color: var(--logo); }
.schrift-knopf:focus-visible { outline: 2px solid var(--logo); outline-offset: 2px; }
@media (min-width: 48.01rem) {
  html.leiste-zu .schriftgroesse { flex-direction: column; padding: 0; }
}

/* Feste Einträge in Listen (Geburt als erstes Personenstandsereignis, 25.10.2026) */
.listeneintrag.ereignis-fest { border-top: none; margin-top: 0; padding-top: 0; }

/* --- Umbruch in eine Spalte abhängig von der Schriftgröße (Wunsch 25.10.2026): Abfragen auf die Breite der
   Inhaltsfläche bzw. Karte in rem – rem ist die eingestellte Schriftgröße, größere Schrift bricht also früher um */
.inhalt { container: inhalt / inline-size; }
.fall-inhalt { container: fallinhalt / inline-size; }
.karte { container: karte / inline-size; }

/* Platz unter dem Formular, damit auch der letzte Abschnitt per „Auf dieser Seite“ ganz nach oben rollen kann */
@media (min-width: 48.01rem) {
  .mit-abschnitten .fall-inhalt { padding-bottom: calc(100vh - var(--fall-oben-hoehe, 11rem) - 8rem); }
}

/* Todeszeitpunkt (Wunsch 25.10.2026): Schalter „Zeitpunkt ungewiss“ fest rechts oben; links entweder Sterbedatum
   und -zeit oder „zuletzt gesehen“ und „aufgefunden“ – der Schalter springt beim Umschalten nicht */
.gruppe-zeitpunkt .raster { display: grid; columns: auto; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.2rem; }
.gruppe-zeitpunkt .raster > .feld { grid-column: 1; }
.gruppe-zeitpunkt .raster > .feld-schalter {
  grid-column: 2; grid-row: 1 / span 4; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
}
.gruppe-zeitpunkt .raster > .feld-schalter > label { text-align: left; }

/* Mitwachsende Textfelder (Grabkreuzinschrift u. a.) */
.feld textarea[data-wachsen] { field-sizing: content; min-height: calc(2 * 1.4em + 0.7rem); line-height: 1.4; resize: vertical; }

/* Standesamt-Vorschlag in Reiter 2.2 (25.10.2026) */
.standesamt-vorschlag {
  margin: 0 0 0.6rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); font-size: 0.92rem;
  background: var(--gold-hell); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.standesamt-vorschlag.gut { background: var(--gruen-hell); border-color: color-mix(in srgb, var(--gut) 35%, transparent); }
.standesamt-vorschlag p { margin: 0.15rem 0; }
.vorschlag-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; }
.knopf-klein u { text-underline-offset: 2px; }

/* Pflichthinweis mit „Für diesen Fall ausblenden“ (25.10.2026) */
.pflicht-hinweis { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; }
.pflicht-hinweis p { margin: 0; }
.pflicht-hinweis .knopf-link, .pflicht-aus .knopf-link { font-size: 0.88rem; }
.pflicht-aus { margin: 0 0 0.5rem; }

/* Personenstandsereignisse (25.10.2026): die Auswahl „Ereignis“ steht allein in der ersten Zeile, die übrigen Felder darunter */
.ereignis-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.6rem; }
.ereignis-kopf > .feld:first-child { flex: 0 1 32rem; }
.ereignis-kopf > .feld-schalter { flex: 0 0 auto; }
/* Wunsch 27.10.2026: Ereignis als Überschrift (schwarz, halbfett) statt Auswahl */
.ereignis-titel { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.ereignis-titel .leise { font-weight: normal; }
/* festes, nicht änderbares Feld (z. B. Ereignis „Geburt“) */
.feld input.feld-fest { background: transparent; border-color: var(--rand); color: var(--text); cursor: default; }
.feld input.feld-fest:focus { box-shadow: none; border-color: var(--rand); }

/* Hinweis über dem Eingabefeld (z. B. Standesamt der Geburt, 25.10.2026); die Beschriftung bleibt auf Höhe des Feldes */
.feld.hilfe-oben > .hilfe { grid-row: 1; grid-column: 2; }
.feld.hilfe-oben > label { grid-row: 2; }
.feld.hilfe-oben > .feld-eingabe { grid-row: 2; }

/* Löschen zweistufig: Schalter, dann Papierkorb (25.10.2026) */
.loeschen-steuerung { display: inline-flex !important; align-items: center; gap: 0.6rem; }
.loeschen-knopf {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0;
  border: 1px solid transparent; border-radius: 7px; background: none; color: var(--text); cursor: pointer;
}
.loeschen-knopf:disabled { color: var(--text-leise); opacity: 0.4; cursor: not-allowed; }
.loeschen-knopf:not(:disabled):hover { color: var(--schlecht); border-color: var(--schlecht); background: var(--rot-hell); }
.loeschen-knopf:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Anschrift mit Namen (Ort der Termine, Lieferort; Wunsch 27.10.2026): Name allein oben, darunter als Block links Straße und
   Hausnummer, rechts PLZ und Ort – zusammengehörige Angaben stehen beieinander, neben dem Namen bleibt es frei */
@container gruppe (min-width: 44rem) {
  .gruppe-anschrift > .raster { display: grid; columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.6rem; }
  .gruppe-anschrift > .raster > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .gruppe-anschrift > .raster > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .gruppe-anschrift > .raster > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .gruppe-anschrift > .raster > :nth-child(4) { grid-column: 2; grid-row: 2; }
  .gruppe-anschrift > .raster > :nth-child(5) { grid-column: 2; grid-row: 3; }
}

/* Feldpaar (26.10.2026): Anrede und Titel „halblang“ nebeneinander in einer Zeile derselben Spalte;
   die Beschriftung der ersten Hälfte steht wie gewohnt links, die der zweiten Hälfte dazwischen */
.feld-paar {
  display: grid; grid-template-columns: var(--beschriftung, 9.5rem) minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 0.75rem; row-gap: 0.15rem; align-items: center; margin-bottom: 1px; break-inside: avoid;
}
.feld-paar > .feld { display: contents; }
.feld-paar > .feld > * { grid-row: 2; }
.feld-paar > .feld > label, .feld-paar > .feld > .feld-eingabe { grid-row: 1; }
.feld-paar > .feld:first-child > label { grid-column: 1; }
.feld-paar > .feld:first-child > :not(label) { grid-column: 2; }
.feld-paar > .feld:nth-child(2) > label { grid-column: 3; }
.feld-paar > .feld:nth-child(2) > :not(label) { grid-column: 4; }
@media (max-width: 48rem) {
  .feld-paar { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.6rem; }
  .feld-paar > .feld { display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .feld-paar > .feld > label { text-align: left; }
  .feld-paar > .feld > * { grid-row: auto; grid-column: auto; }
}
/* Rotes Ausrufezeichen neben „minderjährig“: am Todestag minderjährig, inzwischen volljährig (26.10.2026) */
.minderjaehrig-hinweis {
  display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-left: 0.45rem;
  border-radius: 50%; background: var(--schlecht); color: #fff; font-weight: 700; font-size: 0.82rem; cursor: help;
}
/* Schriftknöpfe: hochgestelltes − bzw. + am A (26.10.2026) */
.schrift-knopf { position: relative; }
.schrift-knopf sup { position: absolute; top: 0.08rem; right: 0.18rem; font-size: 0.72rem; line-height: 1; font-weight: 700; }

/* Personenstandsereignisse (26.10.2026): weitere Angaben (Partner, Gericht …) unter dem Viererfeld, leicht abgesetzt */
.ereignis-zusatz:has(> .feld:not([hidden])) { border-top: 1px dashed var(--rand-feld); padding-top: 0.5rem; margin-top: 0.15rem; }
/* Rückfrage bei unplausiblen Personenstandsereignissen (26.10.2026) */
.plausi-dialog { border-top: 4px solid var(--schlecht); }
.plausi-dialog ul { margin: 0.4rem 0 0.6rem; padding-left: 1.2rem; }

/* Viererfeld der Personenstandsereignisse (26.10.2026): feste Plätze – links Datum und Ort, rechts Standesamt bzw. Gericht
   (Scheidung) und Registernummer bzw. Aktenzeichen; auch wenn Felder ausgeblendet sind */
@container gruppe (min-width: 40rem) {
  .ereignis-haupt { display: grid; columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.6rem; }
  .ereignis-haupt > .feld:has([name$="-datum"]) { grid-area: 1 / 1; }
  .ereignis-haupt > .feld:has([name$="-ort"]) { grid-area: 2 / 1; }
  .ereignis-haupt > .feld:has([name$="-standesamt"]), .ereignis-haupt > .feld:has([name$="-gericht"]) { grid-area: 1 / 2; }
  .ereignis-haupt > .feld:has([name$="-registernummer"]), .ereignis-haupt > .feld:has([name$="-aktenzeichen"]) { grid-area: 2 / 2; }
}

/* Personenkarten (26.10.2026): ruhiger Kopf, „Daten übernehmen“ als Aufklappmenü rechts */
.person-kopf { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.person-kopf h3 { margin: 0; }
.uebernahme-menue { position: relative; }
.uebernahme-menue > summary { list-style: none; cursor: pointer; }
.uebernahme-menue > summary::-webkit-details-marker { display: none; }
.uebernahme-menue[open] > summary { border-color: var(--gold); }
.uebernahme-inhalt {
  position: absolute; right: 0; top: calc(100% + 0.3rem); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  min-width: 22rem; padding: 0.6rem 0.7rem; border: 1px solid var(--rand-feld); border-radius: var(--radius);
  background: var(--flaeche); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.uebernahme-inhalt select { flex: 1 1 12rem; min-height: 2rem; width: auto; min-width: 0; max-width: 100%; }
.uebernahme-inhalt > label { flex: 0 0 auto; }
.uebernahme-inhalt { padding-right: 2rem; }
.menue-schliessen {
  position: absolute; top: 0.25rem; right: 0.3rem; width: 1.5rem; height: 1.5rem; padding: 0; border: none; border-radius: 50%;
  background: none; color: var(--text-leise); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.menue-schliessen:hover, .menue-schliessen:focus-visible { background: var(--gold-hell); color: var(--text); }
@media (max-width: 48rem) { .uebernahme-inhalt { position: relative; } }
@media (max-width: 48rem) { .uebernahme-menue[open] { flex-basis: 100%; min-width: 0; } .uebernahme-inhalt { position: static; min-width: 0; margin-top: 0.3rem; box-shadow: none; } }
/* Geburtsdatum neben „minderjährig“: das Datumsfeld behält seine Breite */
.feld-paar:has([name$="geburtsdatum"]) { grid-template-columns: var(--beschriftung, 9.5rem) 8.5rem auto minmax(0, 1fr); }
@media (max-width: 48rem) { .feld-paar:has([name$="geburtsdatum"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Feldpaare passen sich der Breite des Abschnitts an (26.10.2026): zu schmal → zweites Feld in der nächsten Zeile */
.gruppe { container: gruppe / inline-size; }
@container gruppe (max-width: 30rem) {
  .feld-paar, .feld-paar:has([name$="geburtsdatum"]) { grid-template-columns: var(--beschriftung, 9.5rem) minmax(0, 1fr); row-gap: 0.4rem; }
  .feld-paar > .feld:first-child > label { grid-area: 1 / 1; }
  .feld-paar > .feld:first-child > :not(label) { grid-area: 1 / 2; }
  .feld-paar > .feld:nth-child(2) > label { grid-area: 2 / 1; }
  .feld-paar > .feld:nth-child(2) > :not(label) { grid-area: 2 / 2; }
}

/* --- Symbole „aus dem / ins Adressbuch“ neben der Abschnittsüberschrift, Popup „Neuer Eintrag“ (Wunsch 25.10.2026) -- */
.adressbuch-symbole { display: inline-flex; align-items: center; gap: 0.15rem 0.5rem; flex-wrap: wrap; vertical-align: middle; margin-left: 0.4rem; font-weight: normal; }
/* In Überschriften ohne Einfluss auf die Zeilenhöhe: alle Trennlinien liegen gleich, mit oder ohne Symbol (27.10.2026) */
.gruppe > legend .adressbuch-symbole { margin-block: -0.4rem; }
.symbol-knopf {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.15rem; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--gold-text); cursor: pointer; line-height: 1;
}
.symbol-knopf:hover, .symbol-knopf:focus-visible { border-color: var(--gold); background: var(--gold-hell); }
.symbol-knopf[hidden] { display: none; }
[id^="bereich-"] { scroll-margin-top: 13rem; }  /* Sprungziel unter dem festen Fallkopf */
dialog.adressbuch-popup {
  width: min(84rem, 96vw); height: min(52rem, 92vh); padding: 0.8rem 1rem 0; border: 1px solid var(--rand); border-radius: 10px;
  background: var(--flaeche); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
dialog.adressbuch-popup[open] { display: flex; flex-direction: column; }
.adressbuch-popup h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.adressbuch-popup iframe { flex: 1 1 auto; width: 100%; border: none; border-top: 1px solid var(--rand); margin-top: 0.4rem; }
body.popup { background: var(--flaeche); }
body.popup .inhalt { max-width: none; padding: 0.6rem 0.2rem; }
body.popup .karte { border: none; box-shadow: none; padding: 0; }
/* Popup „Ins Adressbuch übernehmen“: Kategorien links abgesetzt, rechts daneben zwei Spalten mit den Feldern (Wunsch 26.10.2026) */
.popup-spalten { display: grid; grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.6rem; align-items: start; }
.popup-kategorien { position: sticky; top: 0; max-height: calc(100vh - 5rem); overflow-y: auto; padding-right: 1.2rem; border-right: 1px solid var(--rand); }
.popup-kategorien .feld { display: block; }
.popup-kategorien .feld > label:first-child { display: none; }  /* steht schon in der Überschrift */
.popup-kategorien #id_kategorien { display: block; }
.popup-kategorien #id_kategorien > div { margin-bottom: 0.7rem; }
.popup-kategorien #id_kategorien > div > label { display: block; font-weight: 600; color: var(--text-leise); font-size: 0.9rem; margin-bottom: 0.15rem; }
.popup-kategorien #id_kategorien label[for] { display: flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0; }
@media (max-width: 56rem) {
  .popup-spalten { grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); }
  .popup-spalten > .popup-spalte:last-child { grid-column: 2; }
}
@media (max-width: 36rem) {
  .popup-spalten { grid-template-columns: 1fr; }
  .popup-spalten > .popup-spalte:last-child { grid-column: auto; }
  .popup-kategorien { position: static; max-height: none; border-right: none; padding-right: 0; }
}

/* Reiter 4.1 (Wunsch 27.10.2026): links Bestattung, darunter Friedhof (und Krematorium), rechts daneben Grab */
@container karte (min-width: 50rem) {
  #reiter-formular:has(> .abschnitt-grab) > .abschnitt-bestattung { grid-column: 1; grid-row: 1; }
  #reiter-formular:has(> .abschnitt-grab) > .abschnitt-friedhof { grid-column: 1; grid-row: 2; }
  #reiter-formular:has(> .abschnitt-grab) > .abschnitt-krematorium { grid-column: 1; grid-row: 3; }
  #reiter-formular:has(> .abschnitt-grab) > div.abschnitt-grab { grid-column: 2; grid-row: 1 / span 3; }
}

/* --- Reiter 5.2 Dokumente (Wunsch 27.10.2026): abgesetzte Bereiche, Vorlagen als Liste (28.10.2026), Unterlagen mit Fortschritt,
   Ablage mit Symbolknöpfen statt vier Textknöpfen je Zeile ---------------------------------------------------------- */
.bereich { border: 1px solid var(--rand); border-radius: 10px; padding: 0.9rem 1.1rem 1rem; margin: 0 0 1.1rem; background: var(--flaeche); }
.bereich-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem;
  margin: -0.15rem 0 0.8rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--rand); }
.bereich-kopf h3 { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 1.05rem; }
.bereich-kopf h3 .sym { color: var(--gold-text); }
.bereich-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin: 0.9rem 0 0; }
.zaehler { display: inline-block; min-width: 1.5rem; padding: 0 0.45rem; border-radius: 999px; background: var(--gold-hell);
  color: var(--gold-text); font-size: 0.8rem; font-weight: 600; line-height: 1.5rem; text-align: center; }
.suchleiste-einfach input { width: min(100%, 26rem); }
.vorlagen-tabelle { margin-top: 0.8rem; max-height: 26rem; overflow-y: auto; }
.vorlagen-tabelle thead th { position: sticky; top: 0; z-index: 1; background: var(--flaeche); }
.vorlagen-tabelle tbody tr[data-vorlage] { cursor: pointer; }
.vorlagen-tabelle tbody tr[data-vorlage]:hover { background: var(--gold-hell); }
.vorlagen-tabelle tbody tr:has(input:checked) { background: var(--gold-hell); }
.vorlagen-tabelle tr[hidden] { display: none; }
.vorlagen-tabelle .spalte-wahl { width: 2rem; padding-right: 0; }
.vorlagen-tabelle label { cursor: pointer; font-weight: 600; }
.vorlagen-tabelle .stern { color: var(--gold); }
.vorlagen-tabelle td.leise { font-size: 0.85rem; }
.unterlagen { list-style: none; padding: 0; margin: 0 0 0.9rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 0.8rem; font-size: 0.85rem; }
@media (max-width: 760px) { .unterlagen { grid-template-columns: minmax(0, 1fr); } }
.unterlagen li { padding: 0.2rem 0.55rem; border: 1px solid var(--rand); border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unterlagen li strong { font-weight: 600; }
.unterlagen li .leise { margin-left: 0.4rem; font-size: 0.78rem; }
/* eingeklappter Bereich (Unterlagen, Wunsch 29.10.2026) */
.bereich-klappe > summary { cursor: pointer; list-style: none; }
.bereich-klappe > summary::-webkit-details-marker { display: none; }
.bereich-klappe > summary::after { content: "▸"; color: var(--text-leise); margin-left: auto; transition: transform 0.15s; }
.bereich-klappe[open] > summary::after { transform: rotate(90deg); }
.bereich-klappe:not([open]) > summary { margin-bottom: -0.15rem; padding-bottom: 0; border-bottom: none; }
/* Ablagefeld halb so breit, die Optionen rechts daneben (Wunsch 28.10.2026) */
.hochladen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; align-items: start; margin: 0.9rem 0 0; }
@media (max-width: 760px) { .hochladen { grid-template-columns: minmax(0, 1fr); } }
.format-marke, .art-marke { display: inline-block; padding: 0 0.45rem; border-radius: 4px; font-size: 0.78rem; line-height: 1.35rem; }
.format-marke { background: var(--flaeche-leise); border: 1px solid var(--rand); color: var(--text-leise); }
.art-marke { background: var(--gold-hell); color: var(--gold-text); }

/* --- Reiter 5.1 Abmeldungen (Wunsch 27.10.2026): Listeneinträge mit Kopfzeile und Status-Marke; Speichern nicht über die volle Breite -- */
.listeneintrag-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; margin: 0 0 0.55rem; padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--rand); }
.status-marke { display: inline-block; padding: 0 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; line-height: 1.4rem;
  background: var(--gold-hell); color: var(--gold-text); }
.status-marke.status-erledigt, .status-marke.status-ausgezahlt { background: var(--gruen-hell); color: var(--gut); }
.status-marke.status-offen, .status-marke.status-zu-beantragen { background: var(--rot-hell); color: var(--schlecht); }
#reiter-formular > button.knopf { justify-self: start; min-width: 10rem; }

/* --- Fußleiste mit Speichern, bleibt beim Blättern unten stehen (Popup 26.10., alle Formulare 27.10.2026) -------- */
.speichern-leiste, .reiter-knoepfe:has(> button.knopf) {
  position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; align-items: center;
  margin: 0.9rem 0 0; padding: 0.65rem 0;
  background: var(--flaeche); border-top: 1px solid var(--rand);
  box-shadow: 0 -6px 12px -10px rgba(0, 0, 0, 0.25);
}
form:has(> fieldset.gruppe) > .speichern-leiste { grid-column: 1 / -1; }
/* Mit Tab angesprungene Felder nicht hinter der Fußleiste verstecken (Wunsch 27.10.2026) */
html:has(.speichern-leiste) { scroll-padding-bottom: 4.5rem; }
/* Sprünge (Anker, „Auf dieser Seite“, Tab) sichtbar scrollen statt springen – nicht bei „Bewegung reduzieren“ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.speichern-leiste .leiste-rechts { margin-left: auto; display: flex; gap: 0.5rem; }
.gefahr-zweit { color: var(--schlecht); }
.gefahr-zweit:hover { border-color: var(--schlecht); }
body.popup .speichern-leiste { margin: 0.8rem -0.2rem 0; padding: 0.6rem 0.2rem; border-radius: 0; }

/* --- Telefonnummern (Wunsch 27.10.2026): anklickbar ohne Link-Optik; Ländervorwahl als Knopf vor der Nummer ------- */
a.tel, a.tel:visited { color: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
a.tel:hover { color: var(--gold-text); }
.tel-anzeige { white-space: nowrap; }
.tel-land, .tel-land:visited { margin-right: 0.35rem; padding: 0 0.3rem; border-radius: 4px; background: var(--flaeche-leise);
  border: 1px solid var(--rand); color: var(--text-leise); font-size: 0.8em; text-decoration: none; }
.tel-land:hover { border-color: var(--gold); color: var(--gold-text); }
.tel-feld { display: flex; align-items: stretch; width: 100%; }
.tel-land-knopf { display: inline-flex; align-items: center; padding: 0 0.45rem; border: 1px solid var(--rand-feld); border-right: none;
  border-radius: 6px 0 0 6px; background: var(--flaeche-leise); color: var(--text); font-size: 0.9em; text-decoration: none; white-space: nowrap; }
.tel-land-knopf:hover { color: var(--gold-text); border-color: var(--gold); }
.tel-land-pfeil { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.3rem;
  border: 1px solid var(--rand-feld); border-left: none; border-right: none; background: var(--flaeche-leise); color: var(--text-leise); font-size: 0.8em; }
.tel-land-pfeil:hover { color: var(--gold-text); }
.feld .tel-feld select.tel-land-wahl { position: absolute; inset: 0; width: 100%; min-height: 0; opacity: 0; cursor: pointer; padding: 0; }
.feld .tel-feld input { border-radius: 0 6px 6px 0; min-width: 0; flex: 1 1 auto; }

/* --- Startseite und Fallliste (Wunsch 27.10.2026) ------------------------------------------------------------- */
.seiten-aktion { margin: 0 0 1rem; order: -1; }  /* direkt unter dem Seitenkopf, vor Hinweisen und Meldungen */
.knopf-gross { padding: 0.36rem 0.9rem; font-size: 0.95rem; background: var(--logo); color: #1a1b1d; box-shadow: 0 3px 10px rgba(176, 141, 87, 0.35); }
.knopf-gross .sym { margin-right: 0.1rem; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.9rem; margin: 0 0 1.1rem; }
.kennzahl { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center;
  padding: 0.9rem 1.1rem; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche); box-shadow: var(--schatten);
  color: var(--text); text-decoration: none; transition: border-color 0.12s, transform 0.12s; }
.kennzahl:hover { border-color: var(--gold); transform: translateY(-1px); }
.kennzahl-symbol { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; background: var(--gold-hell); color: var(--gold-text); }
.kennzahl-wert { font-size: 1.7rem; font-weight: 650; line-height: 1.1; }
.kennzahl-text { font-size: 0.86rem; color: var(--text-leise); }
.kennzahl-warnung .kennzahl-symbol { background: var(--rot-hell); color: var(--schlecht); }
.kennzahl-warnung strong { color: var(--schlecht); }
.start-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 0 1.1rem; }
.start-spalten > .karte { margin: 0 0 1.1rem; }
.start-liste { list-style: none; margin: 0; padding: 0; }
.start-liste li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.55rem 0; border-top: 1px solid var(--rand); }
.start-liste li:first-child { border-top: none; }
.start-datum { flex: 0 0 4.6rem; display: flex; flex-direction: column; padding: 0.15rem 0.45rem; border-radius: 6px;
  background: var(--flaeche-leise); font-size: 0.85rem; text-align: center; }
.start-datum.heute { background: var(--gold-hell); color: var(--gold-text); }
.start-datum.ueberfaellig { background: var(--rot-hell); color: var(--schlecht); }
.start-inhalt { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.system-status { margin-top: 0.4rem; font-size: 0.82rem; }
.fall-suche .weitere-filter { flex: 1 1 100%; }
.fall-suche .weitere-filter > summary { cursor: pointer; color: var(--text-leise); font-size: 0.9rem; width: max-content; }
.fall-suche .weitere-filter-inhalt { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.fall-tabelle tbody tr[data-href] { cursor: pointer; }
.fall-tabelle tbody tr[data-href]:hover td { background: var(--gold-hell); }
.fall-tabelle .fallnummer-spalte a { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9rem; color: var(--gold-text); text-decoration: none; }
.kuerzel-kreis { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--leiste-aktiv); color: #f1eee8; font-size: 0.72rem; font-weight: 600; vertical-align: middle; }

/* E-Mail-Vorlagen (28.10.2026): Probe wie eine E-Mail */
.email-vorlage textarea[name="text"] { width: 100%; min-height: 16rem; }
.email-vorlage input[name="betreff"] { width: 100%; }
.email-probe { border: 1px solid var(--rand-feld); border-radius: 8px; padding: 0.7rem 0.9rem; margin: 0.7rem 0; background: var(--flaeche-leise); }
.email-probe p { margin: 0.15rem 0; }
.email-text { white-space: pre-wrap; font: inherit; margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rand-feld); }
.email-html { white-space: normal; }

/* E-Mail aus dem Fall (28.10.2026): geteilter Knopf im Fallkopf, Fenster und Übergabe */
.geteilter-knopf { display: inline-flex; position: relative; }
.geteilter-knopf > .knopf-symbol:has(+ .geteilt-menue) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.geteilt-menue > summary { list-style: none; width: 1.5rem; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.geteilt-menue > summary::-webkit-details-marker { display: none; }
.geteilt-menue ul {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 14rem; margin: 0; padding: 0.3rem 0; list-style: none;
  background: var(--flaeche); border: 1px solid var(--rand-feld); border-radius: 8px; box-shadow: var(--schatten);
}
.geteilt-menue li a { display: block; padding: 0.4rem 0.8rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.geteilt-menue li a:hover, .geteilt-menue li a:focus-visible { background: var(--gold-hell); }
.email-fenster .titelzeile { flex-wrap: wrap; gap: 0.5rem; }
.email-vorlage-wahl { display: inline-flex; gap: 0.5rem; align-items: center; }
.email-adressen { margin-top: 0.8rem; }
.email-adressen input { width: 100%; }
.email-adressbuch .eingabe-zeile { display: flex; gap: 0.4rem; }
.email-modus label, .auswahl-zeile { display: block; margin: 0.2rem 0; }
.email-anlagen { list-style: none; padding: 0; margin: 0; }
.email-anlagen li { padding: 0.25rem 0; border-bottom: 1px solid var(--rand); }
.email-knoepfe { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 0.6rem; }
.email-knoepfe form { margin: 0; }

/* Etappe 2, Schritt 5: Rahmen auf PDF-Vorlagen mit der Maus aufziehen */
.rahmen-werkzeuge { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.8rem; }
.rahmen-zoom { display: inline-flex; gap: 0.4rem; align-items: center; font-variant-numeric: tabular-nums; }
.rahmen-status { color: var(--text-leise); font-size: 0.9rem; }
.rahmen-status.schlecht { color: var(--schlecht); }
.rahmen-arbeit { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.rahmen-flaeche { overflow: auto; max-height: calc(100vh - 11rem); background: var(--flaeche-leise); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.rahmen-seite { position: relative; box-shadow: var(--schatten); background: #fff; flex: none; }
.rahmen-seite canvas { display: block; }
.rahmen-seite-nr { position: absolute; top: -0.1rem; left: -2.2rem; font-size: 0.8rem; color: var(--text-leise); }
.rahmen-ebene { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.rahmen-ebene.nur-lesen { cursor: default; }
.rahmen-kasten { position: absolute; border: 1.5px solid #2f5fb3; background: rgba(47, 95, 179, 0.08); cursor: move;
  overflow: hidden; color: #1d3f7a; font: 11px/1.15 system-ui, sans-serif; }
.rahmen-kasten.kreuz { border-color: #8a4fb0; background: rgba(138, 79, 176, 0.1); }
.rahmen-kasten.vorschlag { border-style: dashed; }
.rahmen-kasten.leer { background: rgba(176, 141, 87, 0.12); border-color: #b08d57; }
.rahmen-kasten.ausgewaehlt { border-width: 2px; border-color: #d0661b; background: rgba(208, 102, 27, 0.1); z-index: 2; }
.rahmen-kasten.fehlerhaft { border-color: #a8331f; background: rgba(168, 51, 31, 0.15); }
.rahmen-kasten .titel { position: absolute; top: 0; left: 0; padding: 0 3px; font-size: 9px; background: rgba(255, 255, 255, 0.85);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.rahmen-kasten .wert { position: absolute; left: 3px; right: 3px; bottom: 1px; white-space: nowrap; text-overflow: ellipsis; color: #111;
  font-family: "Crimson Pro", Georgia, serif; pointer-events: none; overflow: hidden; }
.rahmen-kasten.kreuz .wert { left: 0; right: 0; text-align: center; }
.rahmen-kasten .wert.mehrzeilig { white-space: pre-line; top: 1px; bottom: auto; }
.rahmen-kasten .titel:empty { display: none; }
.rahmen-griff { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; background: #d0661b; cursor: nwse-resize; }
.rahmen-neu { position: absolute; border: 1.5px dashed #d0661b; background: rgba(208, 102, 27, 0.08); pointer-events: none; }
.rahmen-panel { position: sticky; top: 1rem; max-height: calc(100vh - 11rem); overflow: auto; }
.rahmen-panel h2 { margin-top: 0; }
.rahmen-panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.rahmen-panel .feld { display: block; margin-bottom: 0.6rem; }
.rahmen-panel .feld > label { display: block; text-align: left; margin-bottom: 0.15rem; }
.rahmen-panel .feld > .hilfe { display: block; margin-top: 0.15rem; }
.rahmen-zweispaltig { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.6rem; }
.rahmen-zweispaltig > .feld:nth-child(n+4) { grid-column: 1 / -1; }
.rahmen-beispiel { background: var(--gold-hell); border-radius: 6px; padding: 0.35rem 0.55rem; font-family: "Crimson Pro", Georgia, serif;
  white-space: pre-line; min-height: 1.6rem; }
.rahmen-beispiel:empty { display: none; }
.rahmen-knoepfe { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gefahr-text { color: var(--schlecht); }
@media (max-width: 60rem) {
  .rahmen-arbeit { grid-template-columns: minmax(0, 1fr); }
  .rahmen-panel { position: static; max-height: none; }
  .rahmen-flaeche { max-height: 70vh; }
}

/* Scan-Eingang (Wunsch 28.10.2026): Vorschaubilder links, große Seite in der Mitte, Zuordnen rechts */
.scan-mandanten { margin: 0 0 1rem; border-top: 0; }
.scan-arbeit { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.scan-miniaturen { display: flex; flex-direction: column; gap: 0.6rem; max-height: calc(100vh - 12rem); overflow: auto; padding: 0.3rem; }
.scan-miniatur { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.4rem;
  border: 2px solid transparent; border-radius: var(--radius); background: var(--flaeche); box-shadow: var(--schatten); cursor: pointer;
  font: inherit; color: var(--text); }
.scan-miniatur canvas { display: block; background: #fff; }
.scan-miniatur-text { font-size: 0.8rem; color: var(--text-leise); }
.scan-miniatur.gewaehlt { border-color: var(--gold); background: var(--gold-hell); }
.scan-miniatur.aktuell { outline: 2px solid var(--akzent); outline-offset: 1px; }
.scan-miniatur.zugeordnet canvas { opacity: 0.45; }
.scan-miniatur-marke { position: absolute; left: 0.4rem; right: 0.4rem; top: 40%; background: var(--gruen-hell); color: var(--gut);
  font-size: 0.72rem; font-weight: 600; border-radius: 6px; padding: 0.15rem 0.3rem; text-align: center; overflow-wrap: anywhere; }
.scan-miniatur-erkannt { max-width: 100%; font-size: 0.72rem; line-height: 1.2; color: var(--text-leise); text-align: center;
  overflow-wrap: anywhere; }
.scan-miniatur-erkannt.treffer { color: var(--akzent); font-weight: 600; }
.scan-erkannt { margin: 0 0 0.8rem; padding: 0.45rem 0.6rem; border-radius: 6px; background: var(--flaeche-leise); font-size: 0.88rem; }
.scan-erkannt.warnung { background: var(--gold-hell); }
.scan-gross { min-width: 0; }
.scan-gross-leiste { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; color: var(--text-leise); }
.scan-gross-flaeche { background: var(--flaeche-leise); border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px;
  max-height: calc(100vh - 13rem); overflow: auto; display: flex; justify-content: center; }
.scan-gross-flaeche canvas { box-shadow: var(--schatten); background: #fff; }
.scan-zuordnen { position: sticky; top: 1rem; }
.scan-zuordnen h2 { margin-top: 0; }
.scan-zuordnen .feld { display: block; margin-bottom: 0.6rem; }
.scan-zuordnen .feld > label { display: block; text-align: left; margin-bottom: 0.15rem; }
@media (max-width: 70rem) {
  .scan-arbeit { grid-template-columns: 9rem minmax(0, 1fr); }
  .scan-zuordnen { grid-column: 1 / -1; position: static; }
}
@media (max-width: 40rem) {
  .scan-arbeit { grid-template-columns: minmax(0, 1fr); }
  .scan-miniaturen { flex-direction: row; max-height: none; overflow-x: auto; }
}

/* Verwaltung → Pflichtangaben (Wunsch 29.10.2026) */
.pflicht-einstellung .schalter-zeile { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }
.pflicht-anzeige, .pflicht-gruppe ul { list-style: none; margin: 0; padding: 0; }
.pflicht-anzeige li { margin: 0.2rem 0; }
.pflicht-gruppe { border: 0; padding: 0; margin: 0 0 0.75rem; }
.pflicht-gruppe legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
.pflicht-gruppe ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.15rem 1rem; }
.pflicht-gruppe label, .pflicht-anzeige label { display: flex; align-items: baseline; gap: 0.4rem; cursor: pointer; }

/* IBAN-Prüfung beim Tippen (Wunsch 01.11.2026): grüner Haken bzw. rotes Verbotszeichen neben dem Feld */
.feld-eingabe:has(> .iban-status) { display: flex; align-items: center; gap: 0.5rem; }
.iban-status { display: inline-flex; flex: none; width: 18px; }
.iban-ok { color: var(--gut); }
.iban-falsch { color: var(--schlecht); }

/* --- Bereich Vorlagen aufgeräumt (Wunsch 01.11.2026, Punkte A–F) ---------------------------------------------- */
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.knopfreihe .knopf-zweit { margin-right: 0; }
details.weitere-einstellungen, details.hilfe-klapp, details.klapp-abschnitt { margin: 0.6rem 0 0.9rem; }
details.weitere-einstellungen > summary, details.hilfe-klapp > summary, details.klapp-abschnitt > summary {
  cursor: pointer; color: var(--gold-text); font-weight: 600; padding: 0.3rem 0; }
details.weitere-einstellungen[open] > summary { margin-bottom: 0.5rem; }
details.hilfe-klapp > summary { font-weight: 500; font-size: 0.92rem; }
details.klapp-abschnitt > summary { font-size: 1.05rem; color: var(--text); }
/* Schrittleiste der Vorlagenseite */
.schritte-karte { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; }
.schritte { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.schritt { display: flex; gap: 0.55rem; align-items: flex-start; line-height: 1.3; }
.schritt-zeichen { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; border: 1.5px solid var(--rand-feld); color: var(--text-leise); font-size: 0.85rem; font-weight: 700; }
.schritt.erledigt .schritt-zeichen { background: var(--gut); border-color: var(--gut); color: #fff; }
.schritt.offen .schritt-zeichen { border-color: var(--gold); color: var(--gold-text); }
.marke-fertig { background: color-mix(in srgb, var(--gut) 14%, transparent); color: var(--gut); border-color: color-mix(in srgb, var(--gut) 40%, transparent); }
.marke-offen { background: var(--gold-hell); color: var(--gold-text); border-color: var(--gold); }
.reiter-inhalt[hidden] { display: none; }
/* Zuordnung: Werkzeugleiste bleibt oben stehen, Vorschläge brechen um (Punkte D und 5) */
.tabelle.zuordnung td { white-space: normal; }
.zuordnung .vorschlag { display: block; margin-top: 0.25rem; }
.zuordnung .vorschlag code { overflow-wrap: anywhere; }
.zuordnung-leiste { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center;
  margin: 0 -1.1rem 0.8rem; padding: 0.6rem 1.1rem; background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.zuordnung-leiste .suchleiste { margin: 0; flex: 1 1 26rem; }
.zuordnung-leiste input[type="search"], .zuordnung-leiste #einfuegen { min-width: 12rem; flex: 1; }
.zuordnung.nur-leere tbody tr.belegt { display: none; }
/* Rahmen: Nebenaktionen im Menü „Weitere“ (Punkt F) */
.weitere-menue { position: relative; display: inline-block; }
.weitere-menue > summary { list-style: none; cursor: pointer; }
.weitere-menue > summary::-webkit-details-marker { display: none; }
.weitere-menue .weitere-liste { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: 16rem; padding: 0.3rem;
  background: var(--flaeche); border: 1px solid var(--rand-feld); border-radius: 8px; box-shadow: var(--schatten);
  display: flex; flex-direction: column; gap: 0.2rem; }
.weitere-menue .weitere-liste form { display: block; }
.weitere-menue .weitere-liste button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 0.45rem 0.7rem;
  border-radius: 6px; font: inherit; cursor: pointer; }
.weitere-menue .weitere-liste button:hover, .weitere-menue .weitere-liste button:focus-visible { background: var(--gold-hell); }
/* Formularfrage: Felder, die zur gewählten Art nicht passen, ausblenden (Punkt E) */
.feld[hidden] { display: none; }
.frage-vorschau code { display: inline-block; margin: 0.1rem 0; }

/* --- Verwaltung → Flex-Felder (Wunsch 03.11.2026) --------------------------------------------------- */
.flex-reiter > summary { display: flex; align-items: baseline; gap: 0.75rem; cursor: pointer; list-style-position: outside; }
.flex-reiter > summary h2 { display: inline; margin: 0; }
.flex-abschnitt { border: 0; padding: 0; margin: 0.75rem 0 0; }
.flex-abschnitt legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
.flex-zeile { display: grid; grid-template-columns: auto minmax(8rem, 22rem) minmax(8rem, 12rem); gap: 0.4rem; align-items: center; margin: 0.15rem 0; }
@media (max-width: 30rem) { .flex-zeile { grid-template-columns: auto 1fr; } .flex-zeile select { grid-column: 2; } }

/* --- Kopf bleibt beim Scrollen stehen, auf allen Seiten (Wunsch 01.11.2026, 9b): Seitenkopf mit Überschrift und Knöpfen,
   Suche/Filter der Listen und die Spaltenüberschriften. Nur auf großen Bildschirmen; am Handy bleibt der Platz dem Inhalt.
   Spaltenüberschriften nur, wenn die Tabelle in die Breite passt (sonst muss sie seitlich scrollen können). -------------- */
@media (min-width: 48.01rem) and (min-height: 34rem) {
  .inhalt > .seitenkopf { position: sticky; top: 0; z-index: 30; transition: min-height .15s, padding .15s; }
  .inhalt > .seitenkopf.gescrollt { min-height: 0; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .inhalt > .seitenkopf.gescrollt:has(.oberreiter) { padding-bottom: 0; }
  .inhalt > .seitenkopf.gescrollt .seitenkopf-zurueck, .inhalt > .seitenkopf.gescrollt > p.leise { display: none; }
  .inhalt > .seitenkopf.gescrollt h1 { font-size: 1.2rem; }
  .inhalt > .seitenkopf.gescrollt .oberreiter { margin-top: 0.3rem; }
  .inhalt > .seitenkopf.gescrollt .oberreiter .reiter-eintrag { padding-top: 0.4rem; padding-bottom: 0.35rem; }
  html:has(.inhalt > .seitenkopf) { scroll-padding-top: calc(var(--kopf-hoehe, 9rem) + var(--such-hoehe, 0px) + 0.75rem); }
  .inhalt:has(> .seitenkopf) .suchleiste[role="search"] {
    position: sticky; top: var(--kopf-hoehe, 9rem); z-index: 20; background: var(--flaeche);
    margin-top: -0.35rem; padding: 0.35rem 0; box-shadow: 0 6px 8px -8px rgba(0, 0, 0, 0.25);
  }
  .tabelle-rahmen.passt { overflow-x: visible; }
  .inhalt:has(> .seitenkopf) .tabelle-rahmen.passt > .tabelle > thead th {
    position: sticky; top: calc(var(--kopf-hoehe, 9rem) + var(--such-hoehe, 0px)); z-index: 10; background: var(--flaeche);
    box-shadow: inset 0 -1px 0 var(--rand);
  }
}

/* Drucker und Arbeitsplätze (Wunsch 09.11.2026) */
.zeile-formular { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0; }
.zeile-formular input[type=text] { width: auto; min-width: 12rem; }
/* Druckereinrichtung (Wunsch 15.11.2026: lesbar) – je Wert ein Kasten: Name, Zahl, darunter woher der Wert sonst kommt */
.korrektur-wahl { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; margin: 0; }
.korrektur-wahl > div { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 18rem; min-width: 0; }
.korrektur-wahl label { font-size: 0.86rem; font-weight: 500; color: var(--text-leise); }
.korrektur-wahl select { width: 100%; min-height: 2.3rem; padding: 0.3rem 0.5rem; font: inherit; border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--feld); color: var(--text); }
.korrektur-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.7rem; margin: 0.6rem 0 0.9rem; }
.korrektur-feld { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.65rem 0.8rem; background: var(--flaeche-leise); border: 1px solid var(--rand); border-radius: 9px; min-width: 0; }
.korrektur-feld.eigen { border-color: var(--gold); background: var(--gold-hell); }
.korrektur-feld label { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.korrektur-feld input { width: 7.5rem; min-height: 2.4rem; padding: 0.3rem 0.6rem; font: inherit; font-size: 1.1rem; font-variant-numeric: tabular-nums;
  border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--flaeche); color: var(--text); }
.korrektur-feld input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.korrektur-feld input[readonly] { background: transparent; }
.korrektur-feld .woher { font-size: 0.84rem; color: var(--text-leise); line-height: 1.35; }
.korrektur-felder > .kette { align-self: center; justify-self: start; }
.korrektur-tabelle td:not(:first-child), .korrektur-tabelle th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.korrektur-tabelle tr.aktiv-ebene td { font-weight: 600; background: var(--gold-hell); }
.kette { margin: 0.2rem 0 0.6rem; font-size: 0.85rem; }
.tabelle td.aktiv-ebene, .tabelle tr.aktiv-ebene td { font-weight: 600; }

/* Schlanke Tabellen (Wunsch 09.11.2026, Dokumente: Neues Dokument und Ablage gleich): eine niedrige Zeile je Eintrag,
   feste Spalten, zu lange Texte gekürzt (ganz im Tooltip) */
.tabelle.schlank { table-layout: fixed; font-size: 0.88rem; }
.tabelle.schlank th, .tabelle.schlank td { padding: 0.1rem 0.45rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  line-height: 1.45rem; }
.tabelle.schlank input[type=checkbox] { margin: 0; vertical-align: middle; }
.tabelle.schlank col.sp-wahl { width: 1.9rem; }
.tabelle.schlank col.sp-name { width: 38%; }
.tabelle.schlank col.sp-art { width: 18%; }
.tabelle.schlank col.sp-datum { width: 8.2rem; }
.tabelle.schlank col.sp-knoepfe { width: 10.5rem; }
.tabelle.schlank td.knoepfe { width: auto; text-align: right; overflow: visible; }
.tabelle.schlank .symbol-knopf { padding: 0.1rem 0.15rem; }
.tabelle.schlank .format-marke, .tabelle.schlank .marke { font-size: 0.72rem; line-height: 1.1rem; padding: 0 0.3rem; margin-left: 0.2rem; }
.tabelle.schlank td.herkunft { color: var(--text-leise); padding-right: 0; }
.tabelle.schlank td.herkunft .sym { vertical-align: middle; }
.vorlagen-tabelle .tabelle.schlank label { font-weight: 600; }
@media (max-width: 760px) {
  .tabelle.schlank col.sp-art, .tabelle.schlank col.sp-datum { width: 0; }
  .tabelle.schlank td:nth-child(3), .tabelle.schlank th:nth-child(3), .tabelle.ablage td:nth-child(4), .tabelle.ablage th:nth-child(4),
  .tabelle.ablage td:nth-child(5), .tabelle.ablage th:nth-child(5) { display: none; }
}

/* Auswahl aus wenigen Möglichkeiten (z. B. Rechnungsempfänger, Wunsch 09.11.2026): Möglichkeiten als helle Kärtchen mit Abstand */
.feld-wahl { margin-block: 0.35rem 0.6rem; }
.feld-wahl > label { align-self: start; padding-top: 0.35rem; }
.feld-wahl .feld-eingabe > div { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.feld-wahl .feld-eingabe > div > div > label {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.75rem 0.3rem 0.55rem; border: 1px solid var(--rand);
  border-radius: 6px; background: var(--flaeche-leise); cursor: pointer; font-weight: normal; color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}
.feld-wahl .feld-eingabe > div > div > label:hover { border-color: var(--gold); }
.feld-wahl .feld-eingabe > div > div > label:has(input:checked) { border-color: var(--gold); background: var(--gold-hell); font-weight: 500; }
.feld-wahl input[type="radio"] { margin: 0; }

/* RV-Nummer (Wunsch 09.11.2026): feste Schriftbreite, damit die Blöcke untereinander stehen; untypisch = orange mit „!“ */
.feld input.rv-nummer { font-family: ui-monospace, Consolas, "Cascadia Mono", monospace; letter-spacing: 0.02em; max-width: 17rem;
  white-space: pre; }
.feld input.rv-untypisch:not([type="checkbox"]) { border-color: #d9822b; box-shadow: 0 0 0 1px #d9822b; }
.feld-eingabe:has(> .rv-hinweis) { display: flex; align-items: center; gap: 0.45rem; }
.rv-hinweis { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem;
  border-radius: 50%; background: #d9822b; color: #fff; font-weight: 700; font-size: 0.85rem; cursor: help; }

/* Knopf rechts in der Überschrift eines Abschnitts (z. B. „An Renten Service melden“ bei Rente, Wunsch 09.11.2026) */
.gruppe > legend .legende-rechts { float: right; margin-top: -0.15rem; font-weight: 500; }

/* Kästchen im Rahmen-Editor (Wunsch 09.11.2026): Hilfslinien je Kästchen, Zeichen mittig, Blockgrenzen kräftiger */
.rahmen-kasten.kaest .titel { display: none; }
.kaestchen-ebene { position: absolute; inset: 0; pointer-events: none; }
.kaestchen-feld { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #111;
  border-left: 1px dotted rgba(47, 95, 179, 0.55); border-right: 1px dotted rgba(47, 95, 179, 0.55); line-height: 1; }
.kaestchen-feld.blockende { border-right: 1.5px solid rgba(47, 95, 179, 0.85); }
.kaestchen-feld.markiert { background: rgba(217, 130, 43, 0.35); }
.rahmen-kaestchen { border-top: 1px solid var(--rand); padding-top: 0.4rem; margin-top: 0.4rem; }
.kaestchen-einzeln summary { cursor: pointer; font-weight: 500; margin: 0.3rem 0; }
.kaestchen-abstaende { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); gap: 0.25rem 0.35rem; }
.kaestchen-abstand { display: flex; flex-direction: column; font-size: 0.72rem; color: var(--text-leise); }
.kaestchen-abstand input { width: 100%; font: inherit; font-size: 0.82rem; padding: 0.05rem 0.2rem; border: 1px solid var(--rand-feld);
  border-radius: 4px; background: var(--feld); color: var(--text); }
.kaestchen-abstand.blockgrenze span { color: var(--gold-text); font-weight: 600; }

/* Renten Service: drei Wege als Knöpfe mit „i“ (Wunsch 10.11.2026) */
.rs-wege { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.rs-wege .knopf-klein { display: inline-flex; align-items: center; gap: 0.25rem; }
.rs-info-knopf { width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1px solid var(--rand-feld); background: var(--feld);
  color: var(--text); font: italic 600 0.85rem/1 Georgia, serif; cursor: pointer; padding: 0; }
.rs-info-knopf:hover { border-color: var(--gold); }
.rs-info { max-width: 34rem; width: calc(100% - 2rem); padding: 1rem 1.2rem; border: 1px solid var(--rand); border-radius: 8px;
  background: var(--flaeche, var(--feld)); color: var(--text); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); font-size: 0.92rem; }
.rs-info::backdrop { background: rgba(0, 0, 0, 0.2); }
.rs-info h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.rs-info dt { font-weight: 600; margin-top: 0.6rem; display: flex; align-items: center; gap: 0.3rem; }
.rs-info dd { margin: 0.15rem 0 0 0; }
.rs-info-zu { float: right; border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; }

/* Wunsch 11.11.2026: Ablagefläche der Dokumente links unter den Unterreitern – auf der dunklen Leiste, schmal und niedrig */
.ablagefeld-seite { margin-top: 0.45rem; padding: 1.6rem 0.5rem; min-height: 15rem; display: flex; flex-direction: column; justify-content: center; border-color: #4a4b50; background: rgba(255, 255, 255, 0.08);
  color: var(--leiste-text); font-size: 0.86rem; }
.ablagefeld-seite p { margin: 0.3rem 0; }
.ablagefeld-seite > p:first-child svg { display: block; margin: 0 auto 0.25rem; }
.ablagefeld-seite strong { color: #fff; font-weight: 600; }
.ablagefeld-seite .ablagefeld-hinweis { color: var(--leiste-leise); font-size: 0.8rem; }
.ablagefeld-seite .ablagefeld-link { color: var(--leiste-leise); font-size: 0.8rem; }
.ablagefeld-seite .ablagefeld-link:hover { color: #fff; }
.ablagefeld-seite.ziehen { border-color: var(--gold); background: rgba(201, 168, 106, 0.16); }
@container inhalt (max-width: 46rem) {  /* schmal: eine Zeile unter den Reitern */
  .ablagefeld-seite { display: flex; flex-direction: row; min-height: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.2rem 0.7rem; padding: 0.45rem; }
  .ablagefeld-seite > p:first-child svg { display: inline; margin: 0 0.3rem 0 0; vertical-align: -0.3em; }
}
/* Wunsch 11.11.2026: gesperrter Knopf (z. B. Online-Meldung an den Renten Service ohne gültige RV-Nummer) – Grund im Tooltip */
.knopf-klein.gesperrt { opacity: 0.45; cursor: not-allowed; }
.knopf-klein.gesperrt:hover { border-color: var(--rand-feld); background: inherit; }

/* Wunsch 11.11.2026: Versionen einer Vorlage kompakt – eine Kopfzeile mit Links, Angaben in einer Zeile, Prüfmeldungen als Liste */
.version-neu form { margin-top: 0.4rem; }
.versionen-liste { display: flex; flex-direction: column; }
.version-zeile { padding: 0.5rem 0; border-top: 1px solid var(--rand); }
.version-zeile:first-child { border-top: none; padding-top: 0; }
.version-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; }
.version-kopf h3 { margin: 0; font-size: 1rem; }
.version-links { font-size: 0.88rem; }
.version-angaben { margin: 0.15rem 0 0; font-size: 0.85rem; }
.version-meldungen { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.version-meldungen li { margin: 0.05rem 0; }
.oktext { color: var(--gut, #3f7d4e); font-size: 0.85rem; }
.version-vergleich { margin: 0.2rem 0 0; font-size: 0.85rem; }
.version-details { margin-top: 0.2rem; font-size: 0.88rem; }
.version-details > summary { cursor: pointer; color: var(--text-leise); }

/* --- Mandantenwahl nach der Anmeldung (Wunsch 12.11.2026): füllt den Bildschirm, sonst ist nichts zu sehen -------- */
body.mandantenwahl { background: var(--leiste); color: #f1eee8; }
body.mandantenwahl .hauptbereich { min-height: 100vh; }
body.mandantenwahl .inhalt { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
body.mandantenwahl .warnung { display: none; }  /* Hinweise der Arbeitsfläche erscheinen nach der Wahl */
.mandantenwahl-flaeche { width: 100%; max-width: 34rem; text-align: center; }
.mandantenwahl-logo { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 1.5rem; font-weight: 650; margin-bottom: 2rem; }
.mandantenwahl-logo .logo-zeichen { width: 2.6rem; height: 2.6rem; font-size: 1.4rem; border-radius: 9px; }
.mandantenwahl-flaeche h1 { margin: 0 0 0.4rem; font-size: 1.6rem; font-weight: 650; }
.mandantenwahl-text { margin: 0 0 1.6rem; color: var(--leiste-text); }
.mandantenwahl-text.klein { margin: 1.2rem 0 0; font-size: 0.85rem; color: var(--leiste-leise); }
.mandantenwahl-flaeche .fehler { text-align: left; margin-bottom: 1rem; color: var(--text); }
.mandantenwahl-flaeche .hinweis { text-align: left; color: var(--text); }
.mandantenwahl-liste { display: flex; flex-direction: column; gap: 0.8rem; margin: 0; }
.mandantenwahl-knopf {
  display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 4.6rem; padding: 0.9rem 1.2rem; font: inherit; text-align: left;
  background: var(--leiste-aktiv); color: #f1eee8; border: 1px solid #3c3d43; border-radius: 12px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.mandantenwahl-knopf:hover, .mandantenwahl-knopf:focus-visible { border-color: var(--logo); background: #37383e; outline: none; transform: translateY(-1px); }
.mandantenwahl-knopf:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--logo) 35%, transparent); }
.mandantenwahl-knopf.vorschlag { border-color: var(--logo); }
.mandantenwahl-zeichen {
  flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 9px; background: #3a3b40; color: #f1eee8;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 650;
}
.mandantenwahl-knopf.vorschlag .mandantenwahl-zeichen { background: var(--logo); color: #1e1f22; }
.mandantenwahl-name { flex: 1 1 auto; min-width: 0; font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.mandantenwahl-name small { display: block; font-size: 0.88rem; font-weight: 400; color: var(--leiste-leise); }
.mandantenwahl-hinweis { flex: 0 0 auto; font-size: 0.78rem; color: var(--logo); white-space: nowrap; }
.mandantenwahl-abmelden {
  margin-top: 2rem; font: inherit; font-size: 0.9rem; background: none; border: none; color: var(--leiste-leise);
  text-decoration: underline; cursor: pointer; padding: 0.4rem 0.6rem;
}
.mandantenwahl-abmelden:hover { color: #fff; }
@media (max-width: 30rem) {
  .mandantenwahl-flaeche h1 { font-size: 1.3rem; }
  .mandantenwahl-hinweis { display: none; }
}
/* Anmeldung im selben Aussehen (Wunsch 15.11.2026) */
.anmelde-flaeche { max-width: 26rem; }
.anmelde-formular { display: flex; flex-direction: column; gap: 0.9rem; margin: 0; text-align: left; }
.anmelde-feld { display: flex; flex-direction: column; gap: 0.3rem; }
.anmelde-feld label { font-size: 0.9rem; font-weight: 500; color: var(--leiste-text); }
.anmelde-feld input {
  width: 100%; min-height: 3.2rem; padding: 0.6rem 0.95rem; font: inherit; font-size: 1.1rem; color: #f1eee8; background: var(--leiste-aktiv);
  border: 1px solid #44454b; border-radius: 12px; transition: border-color 0.12s, background 0.12s;
}
.anmelde-feld input::placeholder { color: var(--leiste-leise); }
.anmelde-feld input:hover { border-color: #5a5b62; }
.anmelde-feld input:focus { outline: none; border-color: var(--logo); background: #37383e; box-shadow: 0 0 0 3px color-mix(in srgb, var(--logo) 35%, transparent); }
/* vom Browser ausgefüllte Felder bleiben dunkel */
.anmelde-feld input:-webkit-autofill, .anmelde-feld input:autofill {
  -webkit-text-fill-color: #f1eee8; caret-color: #f1eee8; box-shadow: 0 0 0 100px var(--leiste-aktiv) inset; transition: background-color 9999s;
}
.anmelde-feld.mit-fehler input { border-color: #e07a66; }
.anmelde-fehler { color: #f0a394; font-size: 0.88rem; }
.anmelde-knopf {
  margin-top: 0.4rem; min-height: 3.2rem; border: 1px solid var(--logo); border-radius: 12px; background: var(--logo); color: #1e1f22;
  font: inherit; font-size: 1.1rem; font-weight: 650; cursor: pointer; transition: transform 0.12s, filter 0.12s;
}
.anmelde-knopf:hover, .anmelde-knopf:focus-visible { filter: brightness(1.08); transform: translateY(-1px); outline: none; }
.anmelde-knopf:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--logo) 35%, transparent); }
.anmelde-flaeche .mandantenwahl-text a { color: var(--leiste-text); }
body.anmeldung .meldungen { width: 100%; max-width: 26rem; color: var(--text); }
@media (prefers-reduced-motion: reduce) { .anmelde-knopf { transition: none; } .anmelde-knopf:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mandantenwahl-knopf { transition: none; } .mandantenwahl-knopf:hover { transform: none; } }

/* --- Adressbuch als Fenster über der Seite (Wunsch 12.11.2026) ------------------------------------------------------ */
.navigation a .nav-fenster {
  margin-left: auto; display: inline-flex; align-items: center; padding: 0.15rem; border: none; border-radius: 5px;
  background: none; color: var(--leiste-leise); cursor: pointer; opacity: 0;
}
.navigation a:hover .nav-fenster, .navigation a:focus-within .nav-fenster { opacity: 1; }
.navigation a .nav-fenster:hover, .navigation a .nav-fenster:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.12); opacity: 1; }
html.leiste-zu .navigation a .nav-fenster { display: none; }
@media (hover: none) { .navigation a .nav-fenster { opacity: 1; } }
/* Wunsch 13.11.2026: über die ganze Breite. Wunsch 15.11.2026: rundherum ein Rand, durch den die Seite durchscheint –
   ein Klick darauf schließt das Fenster. Auf dem Handy bleibt es bei der ganzen Fläche. */
dialog.adressbuch-fenster { width: calc(100vw - 6rem); max-width: none; height: calc(100vh - 4.5rem); max-height: none; padding: 0.5rem 0.8rem 0; }
@media (max-width: 760px) { dialog.adressbuch-fenster { width: calc(100vw - 1rem); height: calc(100vh - 1rem); } }
.adressbuch-fenster .fenster-zu {
  font: inherit; font-size: 1.15rem; line-height: 1; width: 2.1rem; height: 2.1rem; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--text);
}
.adressbuch-fenster .fenster-zu:hover, .adressbuch-fenster .fenster-zu:focus-visible { border-color: var(--gold); background: var(--gold-hell); outline: none; }
dialog.adressbuch-fenster::backdrop { background: rgba(0, 0, 0, 0.45); cursor: pointer; }
/* im Fenster: nur der Inhalt, kein Menü und keine Fußzeile */
html.im-fenster .leiste, html.im-fenster .fuss { display: none; }
html.im-fenster body.mit-leiste { display: block; }
html.im-fenster .inhalt { max-width: none; }

/* --- Formularzuordnung: Nebenmenü mit den Platzhaltern als Baum (Wunsch 12.11.2026) -------------------------------- */
.zuordnung-spalten { display: flex; align-items: flex-start; gap: 0.75rem; }
.zuordnung-spalten > section.karte { flex: 1 1 auto; min-width: 0; }
.zuordnung-spalten > .karte + .karte { margin-top: 0; }
.platzhalter-baum { flex: 0 0 19rem; position: sticky; top: 0.5rem; max-height: calc(100vh - 1rem); overflow-y: auto; }
.platzhalter-baum h2 { margin-bottom: 0.2rem; }
.platzhalter-baum input[type="search"] { width: 100%; margin: 0.4rem 0 0.5rem; }
.baum-bereich { border-top: 1px solid var(--rand); }
.baum-bereich > summary { cursor: pointer; padding: 0.3rem 0.1rem; font-weight: 600; font-size: 0.93rem; }
.baum-bereich > summary:hover { color: var(--gold-text); }
.baum-bereich ul { list-style: none; margin: 0 0 0.4rem; padding: 0 0 0 0.9rem; }
.baum-bereich li { display: flex; align-items: baseline; gap: 0.4rem; }
.baum-angabe, .baum-kurz { font: inherit; border: none; background: none; cursor: pointer; padding: 0.12rem 0.3rem; border-radius: 5px; color: var(--text); text-align: left; }
.baum-angabe { flex: 1 1 auto; font-size: 0.9rem; }
.baum-kurz { flex: 0 0 auto; font-size: 0.78rem; color: var(--text-leise); font-family: ui-monospace, Consolas, monospace; }
.baum-angabe:hover, .baum-kurz:hover, .baum-angabe:focus-visible, .baum-kurz:focus-visible { background: var(--gold-hell); color: var(--gold-text); outline: none; }
@media (max-width: 70rem) {
  .zuordnung-spalten { flex-direction: column-reverse; align-items: stretch; }
  .platzhalter-baum { flex: none; position: static; max-height: 18rem; }
}

/* Formularzuordnung (Wunsch 13.11.2026): Beschriftung höchstens ein gutes Viertel der Breite und zwei Zeilen, dann „…“ –
   der ganze Text erscheint beim Darüberfahren. Der Platz kommt der Spalte „Inhalt bzw. Bedingung“ zugute. */
.tabelle.zuordnung { table-layout: fixed; width: 100%; }
.tabelle.zuordnung th:nth-child(1) { width: 15%; }
.tabelle.zuordnung th:nth-child(2) { width: 27%; }
.tabelle.zuordnung th:nth-child(4) { width: 4.5rem; }
.tabelle.zuordnung td { overflow-wrap: anywhere; }
.tabelle.zuordnung td.beschriftung { cursor: help; }
.zuordnung .zwei-zeilen { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.zuordnung .eine-zeile { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zuordnung textarea, .zuordnung input[type="text"] { min-width: 0; }

/* --- Kalender (Etappe 4, Schritt 1) --------------------------------------------------------------------------------- */
.knopf-zweit.aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.kal-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.kal-leiste h2 { margin: 0; font-size: 1.2rem; }
.kal-blaettern { display: inline-flex; gap: 0.25rem; }
.kal-filter { margin: 0 0 0.8rem; }
.kal-filter > summary { cursor: pointer; font-weight: 600; font-size: 0.93rem; }
.kal-filter-form { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 0.5rem; }
.kal-filter-form fieldset { border: none; margin: 0; padding: 0; min-width: 11rem; }
.kal-filter-form legend { font-weight: 600; font-size: 0.85rem; color: var(--text-leise); padding: 0; margin-bottom: 0.2rem; }
.kal-filter-form label { display: flex; align-items: center; gap: 0.4rem; padding: 0.08rem 0; }
.kal-filter-form > p { flex-basis: 100%; margin: 0.2rem 0 0; }
.kal-filter-knoepfe { display: flex; align-items: center; gap: 0.8rem; }
/* Monat: sieben gleich breite Spalten */
.kal-wochentage, .kal-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kal-wochentage span { padding: 0.2rem 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--text-leise); }
.kal-monat { border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.kal-woche { border-top: 1px solid var(--rand); }
.kal-tag { min-height: 6.2rem; padding: 0.2rem 0.3rem 0.35rem; border-left: 1px solid var(--rand); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kal-tag:first-child { border-left: none; }
.kal-tag.fremd { background: var(--flaeche-leise); }
.kal-tag.fremd .kal-tagzahl { color: var(--text-leise); }
.kal-tag.heute { box-shadow: inset 0 0 0 2px var(--gold); }
.kal-tagzahl { align-self: flex-end; font-size: 0.82rem; color: var(--text); text-decoration: none; padding: 0 0.25rem; border-radius: 5px; }
.kal-tagzahl:hover { background: var(--gold-hell); }
.kal-eintrag { display: block; font-size: 0.8rem; line-height: 1.25; padding: 0.1rem 0.3rem; border-radius: 5px; text-decoration: none; color: var(--text);
  background: var(--gold-hell); border-left: 3px solid var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-eintrag:hover { filter: brightness(0.96); }
.kal-eintrag.kal-abholung { background: var(--gruen-hell); border-left-color: var(--gut); }
.kal-eintrag .kal-zeit { font-variant-numeric: tabular-nums; font-weight: 600; }
.kal-eintrag .kal-name { color: var(--text-leise); }
.erledigt.kal-eintrag, .erledigt.kal-karte { opacity: 0.6; }
/* Woche: sieben Spalten mit Karten; Tag und Liste: Karten untereinander */
.kal-wochenansicht { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; }
.kal-spalte h3, .kal-listentag h3 { margin: 0 0 0.35rem; font-size: 0.95rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--rand); }
.kal-spalte h3 a { color: inherit; text-decoration: none; }
.kal-spalte.heute h3, .kal-listentag.heute h3 { border-bottom-color: var(--gold); }
.kal-listentag { margin-bottom: 0.9rem; }
.kal-karte { border: 1px solid var(--rand); border-left: 3px solid var(--gold); border-radius: 6px; background: var(--flaeche-leise); padding: 0.35rem 0.5rem; margin-bottom: 0.4rem; }
.kal-karte.kal-abholung { border-left-color: var(--gut); }
.kal-karte p { margin: 0; overflow-wrap: anywhere; }
.kal-karte .kal-zeit { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: 0.4rem; }
.kal-karte .kal-fall { font-size: 0.92rem; }
.kal-karte .kal-ort { font-size: 0.86rem; }
.kal-verschieben { margin-top: 0.25rem; font-size: 0.86rem; }
.kal-verschieben > summary { cursor: pointer; color: var(--gold-text); }
.kal-verschieben form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.3rem 0.6rem; margin-top: 0.3rem; }
.kal-verschieben label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-leise); }
.kal-verschieben input { width: auto; }
.kal-fuss { margin-top: 0.8rem; }
/* Etappe 4, Schritte 2 bis 5: Reiter, eigene Einträge, Einteilung, Ressourcen, Tagestour */
.kal-reiter { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin-top: 0.5rem; border-bottom: 1px solid var(--rand); }
.kal-reiter a { padding: 0.25rem 0.1rem; color: var(--text-leise); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.kal-reiter a.aktiv { color: var(--text); font-weight: 600; border-bottom-color: var(--gold); }
/* im dunklen Seitenkopf: helle Schrift, das Gewählte in Weiß mit goldenem Strich bzw. als goldener Knopf */
.seitenkopf .kal-reiter { border-bottom-color: #3c3d43; }
.seitenkopf .kal-reiter a { color: var(--leiste-text); }
.seitenkopf .kal-reiter a:hover { color: #fff; }
.seitenkopf .kal-reiter a.aktiv { color: #fff; border-bottom-color: var(--logo); }
.seitenkopf-aktionen .knopf-zweit.aktiv { background: var(--logo); border-color: var(--logo); color: #1a1b1d; font-weight: 650; }
.kal-neu { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.kal-eintrag.kal-buero, .kal-karte.kal-buero { border-left-color: var(--akzent); }
.kal-eintrag.kal-buero { background: var(--flaeche-leise); }
.kal-eintrag.kal-fahrt, .kal-karte.kal-fahrt { border-left-color: var(--text-leise); }
.kal-eintrag.kal-fahrt { background: var(--flaeche-leise); }
.kal-eintrag.kal-fahrzeug, .kal-karte.kal-fahrzeug { border-left-color: var(--schlecht); }
.kal-eintrag.kal-fahrzeug { background: var(--rot-hell); }
.kal-offen { border-left-style: dashed; opacity: 0.85; }
.kal-eintrag.kal-warnung { box-shadow: inset 0 0 0 1px var(--schlecht); }
.kal-einteilungen { list-style: none; margin: 0.25rem 0 0; padding: 0; font-size: 0.88rem; }
.kal-einteilungen li { display: flex; align-items: baseline; gap: 0.3rem; }
.kal-einteilungen form { display: inline; }
.kal-weg { border: none; background: none; color: var(--text-leise); cursor: pointer; padding: 0 0.15rem; font-size: 0.8rem; }
.kal-weg:hover { color: var(--schlecht); }
.kal-einteilen select, .kal-einteilen-offen select { width: auto; max-width: 12rem; }
form.kal-einteilen-offen { display: flex; flex-wrap: wrap; align-items: end; gap: 0.3rem 0.6rem; margin-top: 0.5rem; }
form.kal-einteilen-offen label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-leise); }
form.kal-einteilen-offen input { width: auto; }
.kal-antraege { margin-bottom: 0.7rem; }
.kal-antrag { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-top: 0.3rem; }
.kal-antrag input { width: auto; flex: 0 1 16rem; }
.kal-ressourcen { table-layout: fixed; }
.kal-ressourcen th:first-child { width: 11rem; }
.kal-ressourcen td { vertical-align: top; padding: 0.2rem; }
.kal-ressourcen td .kal-eintrag { margin-bottom: 2px; }
.kal-ressourcen .heute { box-shadow: inset 0 2px 0 var(--gold); }
.kal-ressourcen thead a { color: inherit; text-decoration: none; }
.kal-sperre { display: block; font-size: 0.8rem; padding: 0.1rem 0.3rem; border-radius: 5px; background: var(--rot-hell); color: var(--schlecht); margin-bottom: 2px; }
.tour-buendel { border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.5rem 0.7rem; margin-bottom: 0.9rem; }
.tour-buendel h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.tour-halte { margin: 0 0 0.4rem; padding-left: 1.5rem; }
.tour-halte.tour-einzeln { list-style: none; padding-left: 0; }
.tour-halt { border-left: 3px solid var(--text-leise); background: var(--flaeche-leise); border-radius: 6px; padding: 0.35rem 0.5rem; margin-bottom: 0.4rem; }
.tour-halt.erledigt { opacity: 0.6; }
.tour-halt p { margin: 0; overflow-wrap: anywhere; }
.tour-halt .kal-zeit { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: 0.3rem; }
.tour-knoepfe { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.tour-knoepfe form.inline { display: inline; }
.tour-buendeln { display: flex; flex-wrap: wrap; align-items: end; gap: 0.4rem 0.8rem; border: 1px dashed var(--rand); border-radius: 6px; padding: 0.4rem 0.6rem; }
.tour-buendeln label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-leise); }
.tour-buendeln input, .tour-buendeln select { width: auto; }
.fahrt-suche, .fahrt-kontakte { display: flex; flex-wrap: wrap; align-items: end; gap: 0.4rem; margin: 0.5rem 0 0; }
.fahrt-suche input, .fahrt-kontakte select { width: auto; }
.fahrt-treffer { margin-top: 0.4rem; }
.fahrt-treffer label, .fahrt-mitnahmen label { display: flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0; }
.fahrt-mitnahmen { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.fahrt-mitnahmen li { display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; }
@media (max-width: 60rem) {
  .kal-wochenansicht { grid-template-columns: 1fr; }
  .kal-tag { min-height: 3.6rem; }
  .kal-eintrag .kal-titel { display: none; }
}

/* To-do-Liste des Betriebs (Wunsch 13.11.2026) – zuerst für das Handy gedacht: eine Zeile zum Eintragen, große Knöpfe */
.todo-frage { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.todo-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.todo-zeile input[type="text"] { flex: 1 1 16rem; min-width: 0; width: auto; }
.todo-zeile select { flex: 0 1 12rem; width: auto; }
.todo-dringend { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.todo-mehr { margin-top: 0.5rem; }
/* Eintragen (Wunsch 15.11.2026): Feld oben, darunter Foto und „dringend“, darunter die Bereiche als Knöpfe */
.todo-neu input[name="text"] { width: 100%; min-height: 2.6rem; padding: 0.4rem 0.7rem; font: inherit; font-size: 1.05rem; color: var(--text);
  border: 1px solid var(--rand-feld); border-radius: 8px; background: var(--flaeche); }
.todo-neu input[name="text"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.todo-zusatz { margin: 0.6rem 0; gap: 0.5rem 1.2rem; }
.todo-foto-knopf { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.4rem; }
.todo-dringend.feld-schalter { gap: 0.5rem; cursor: pointer; font-weight: 500; }
.todo-dringend.feld-schalter:has(input:checked) span { color: var(--schlecht); font-weight: 650; }
.todo-dringend.feld-schalter input[type="checkbox"]:checked { background: var(--schlecht); }
.todo-bereiche { border: none; margin: 0.2rem 0 0.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.todo-bereiche legend { width: 100%; padding: 0; margin-bottom: 0.3rem; font-size: 0.86rem; font-weight: 500; color: var(--text-leise); }
.todo-bereich { position: relative; display: inline-flex; cursor: pointer; }
.todo-bereich input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.todo-bereich span { display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0.3rem 0.95rem; border: 1px solid var(--rand-feld); border-radius: 8px;
  background: var(--flaeche); font-weight: 500; }
.todo-bereich.unter span { min-height: 2.1rem; padding: 0.2rem 0.7rem; font-size: 0.9rem; font-weight: 400; color: var(--text-leise); border-style: dashed; }
.todo-bereich:hover span { border-color: var(--gold); background: var(--gold-hell); }
.todo-bereich input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.todo-bereich input:checked + span { background: var(--akzent); border-color: var(--akzent); border-style: solid; color: var(--akzent-text); font-weight: 650; }
.todo-absenden { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0.2rem 0 0; }
.todo-absenden .knopf { min-height: 2.5rem; padding-inline: 1.4rem; }
.todo-absenden .knopf:disabled { background: var(--rand); color: var(--text-leise); box-shadow: none; cursor: not-allowed; }
@media (max-width: 48rem) {
  .todo-bereich { flex: 1 1 auto; }
  .todo-bereich span { width: 100%; justify-content: center; min-height: 2.75rem; }
  .todo-absenden .knopf { flex: 1 1 100%; min-height: 3rem; }
}
.todo-mehr summary { cursor: pointer; color: var(--text-leise); font-size: 0.9rem; }
.todo-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-bottom: 0.6rem; }
.todo-filter .aktiv { font-weight: 650; box-shadow: inset 0 -2px 0 var(--gold); }
.todo-trenner { width: 1px; align-self: stretch; background: var(--rand); margin: 0 0.3rem; }
.todo-zahl { font-size: 0.78rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.todo-gruppe { margin: 0.9rem 0 0.3rem !important; font-size: 0.95rem !important; color: var(--text-leise); }
/* To-do-Liste im Büro (Wunsch 15.11.2026): drei Knöpfe oben, Bereiche links, je Punkt eine Zeile, höchstens 20 sichtbar */
.todo-rumpf { margin-top: 0.2rem; }
@media (min-width: 48.01rem) { .todo-rumpf > .fall-seitennav { top: 6rem; max-height: calc(100vh - 7rem); } }
.todo-nav-zahl { margin-left: auto; min-width: 1.5rem; padding: 0 0.4rem; border-radius: 0.8rem; background: rgba(255, 255, 255, 0.1); color: #fff;
  font-size: 0.8rem; text-align: center; font-variant-numeric: tabular-nums; }
.todo-rumpf .unterreiter .reiter-eintrag { display: flex; align-items: center; gap: 0.5rem; }
.todo-kopfzeile { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem 1rem; margin-bottom: 0.7rem; }
.todo-zeige { display: inline-flex; border: 1px solid var(--rand-feld); border-radius: 9px; overflow: hidden; background: var(--flaeche-leise); }
.todo-zeige-knopf { min-width: 6rem; padding: 0.5rem 0.9rem; white-space: nowrap; text-align: center; text-decoration: none; color: var(--text); font-weight: 500; }
.todo-zeige-knopf + .todo-zeige-knopf { border-left: 1px solid var(--rand-feld); }
.todo-zeige-knopf:hover { background: var(--gold-hell); }
.todo-zeige-knopf.aktiv { background: var(--akzent); color: var(--akzent-text); font-weight: 650; }
.todo-zeige-zahl { display: inline-block; min-width: 1.35rem; padding: 0 0.35rem; margin-left: 0.2rem; border-radius: 0.8rem; background: var(--schlecht); color: #fff;
  font-size: 0.78rem; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
/* das Formular klappt der Knopf „Eintragen“ oben in der Leiste auf; ohne Skript bleibt die Zeile „Eintragen“ zum Anklicken */
.todo-neu-klapp { flex: 1 1 100%; order: 5; }
.todo-neu-klapp > summary { cursor: pointer; color: var(--text-leise); font-size: 0.9rem; }
.todo-neu-klapp > summary { display: none; }
.todo-neu-klapp:not([open]) { display: none; }
.todo-neu-klapp[open] { padding: 0.7rem 0.8rem; border: 1px solid var(--gold); border-radius: 9px; background: var(--flaeche-leise); }
.todo-rolle { --zeile: 2.35rem; max-height: calc(20 * var(--zeile)); overflow-y: auto; border: 1px solid var(--rand); border-radius: 9px; scrollbar-width: thin; }
.todo-rolle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.todo-rolle .todo-gruppe { position: sticky; top: 0; z-index: 1; margin: 0 !important; height: var(--zeile); display: flex; align-items: center; gap: 0.5rem;
  padding: 0 0.7rem; background: var(--flaeche-leise); border-bottom: 1px solid var(--rand); font-size: 0.82rem !important; letter-spacing: 0.04em; text-transform: uppercase; }
.todo-reihe { display: flex; align-items: center; gap: 0.6rem; height: var(--zeile); padding: 0 0.7rem; border-bottom: 1px solid var(--rand); min-width: 0; }
.todo-zeilen:last-child .todo-reihe:last-child { border-bottom: none; }
.todo-reihe:hover { background: var(--flaeche-leise); }
.todo-reihe.dringend { box-shadow: inset 3px 0 0 var(--schlecht); }
.todo-reihe form { margin: 0; display: flex; flex: none; }
.todo-reihe .todo-kasten { width: 1.4rem; height: 1.4rem; }
.todo-reihe .marke { flex: none; }
.todo-reihe-text { flex: 0 1 auto; min-width: 4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; text-decoration: none; }
.todo-reihe-text:hover { text-decoration: underline; }
.todo-reihe.erledigt .todo-reihe-text { font-weight: 400; color: var(--text-leise); text-decoration: line-through; }
.todo-reihe-marke { flex: none; padding: 0.05rem 0.5rem; border: 1px solid var(--rand); border-radius: 0.8rem; font-size: 0.78rem; color: var(--text-leise); white-space: nowrap; }
.todo-reihe-foto { flex: none; display: inline-flex; color: var(--text-leise); }
.todo-reihe-foto:hover { color: var(--gold-text); }
.todo-reihe-meta { flex: 1 1 8rem; min-width: 0; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-leise); font-size: 0.85rem; }
@media (max-width: 48rem) {
  .todo-rolle { --zeile: 2.9rem; }
  .todo-reihe .todo-kasten { width: 1.9rem; height: 1.9rem; }
  .todo-reihe-meta, .todo-reihe-marke { display: none; }
  .todo-zeige { flex: 1 1 100%; }
  .todo-zeige-knopf { flex: 1 1 0; min-width: 0; padding: 0.7rem 0.4rem; }
  .todo-rumpf .unterreiter .reiter-eintrag { min-height: 2.6rem; }
  /* Wunsch 15.11.2026: am Handy keine Leiste zum seitlichen Wischen – die Bereiche brechen auf mehrere Zeilen um */
  .todo-rumpf .unterreiter { flex-wrap: wrap; overflow-x: visible; gap: 0.3rem; }
  .todo-rumpf .unterreiter .reiter-eintrag { flex: 1 1 auto; justify-content: center; padding: 0.3rem 0.7rem; background: rgba(255, 255, 255, 0.05); }
  .todo-rumpf .todo-nav-zahl { margin-left: 0; }
  /* und kein Blättern in der Liste selbst: Am Handy läuft sie mit der Seite */
  .todo-rolle { max-height: none; overflow: visible; }
  .todo-rolle .todo-gruppe { position: static; }
}
.todo-liste { list-style: none; margin: 0; padding: 0; }
.todo-punkt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; border-left: 3px solid var(--text-leise); background: var(--flaeche-leise);
  border-radius: 6px; padding: 0.45rem 0.6rem; margin-bottom: 0.4rem; }
.todo-punkt.dringend { border-left-color: var(--schlecht); }
.todo-punkt.erledigt { opacity: 0.7; }
.todo-inhalt { flex: 1 1 18rem; min-width: 0; }
.todo-inhalt p { margin: 0; overflow-wrap: anywhere; }
.todo-text { font-weight: 600; }
.todo-text a { color: inherit; }
.todo-marke { background: var(--rot-hell); color: var(--schlecht); }
.todo-haken { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; }
.todo-haken input { width: 11rem; }
.todo-knopf { white-space: nowrap; }
@media (max-width: 48rem) {
  .todo-zeile input[type="text"], .todo-zeile select { flex: 1 1 100%; min-height: 2.75rem; }
  .todo-zeile .knopf { flex: 1 1 auto; min-height: 2.75rem; }
  .todo-dringend { min-height: 2.75rem; }
  .todo-filter .knopf-klein { min-height: 2.2rem; display: inline-flex; align-items: center; }
  .todo-haken { flex: 1 1 100%; }
  .todo-haken input { flex: 1 1 8rem; width: auto; min-height: 2.75rem; }
  .todo-haken button { min-height: 2.75rem; padding-inline: 1rem; }
}

/* Kühlung in drei Stufen, Karten-App-Wahl (13.11.2026) */
.kuehl-formular, .kuehl-stufe { display: flex; flex-wrap: wrap; align-items: end; gap: 0.4rem 0.8rem; margin: 0.4rem 0; }
.kuehl-formular label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-leise); }
.kuehl-formular input, .kuehl-formular select { width: auto; }
.kuehl-stufe label { display: inline-flex; align-items: center; gap: 0.3rem; }
.kuehl-plaetze { list-style: none; margin: 0.3rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.4rem; }
.kuehl-plaetze li { display: flex; flex-direction: column; border: 1px solid var(--rand); border-left: 3px solid var(--text-leise); border-radius: 6px;
  padding: 0.3rem 0.5rem; background: var(--flaeche-leise); overflow-wrap: anywhere; }
.kuehl-plaetze li.frei { background: none; border-left-color: var(--rand); }
.kuehl-plaetze li.doppelt { border-left-color: var(--schlecht); }
.kuehl-nummer { font-size: 0.8rem; font-weight: 600; color: var(--text-leise); }
.kuehl-liste { list-style: none; margin: 0.2rem 0; padding: 0; }
/* Belegen von der Übersicht aus, auch ohne Fall (Wunsch 15.11.2026) */
.kuehl-belegen { margin-top: 0.3rem; }
.kuehl-belegen > summary { display: inline-flex; align-items: center; min-height: 1.9rem; padding: 0.15rem 0.7rem; border: 1px solid var(--rand-feld);
  border-radius: 7px; background: var(--flaeche); font-size: 0.88rem; cursor: pointer; list-style: none; }
.kuehl-belegen > summary::-webkit-details-marker { display: none; }
.kuehl-belegen > summary:hover, .kuehl-belegen[open] > summary { border-color: var(--gold); background: var(--gold-hell); }
.kuehl-neu { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.5rem 0 0.2rem; }
.kuehl-neu label { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.82rem; color: var(--text-leise); }
.kuehl-neu input, .kuehl-neu select { width: 100%; min-height: 2.2rem; padding: 0.25rem 0.5rem; font: inherit; color: var(--text);
  border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--feld); }
.kuehl-neu button { align-self: flex-start; }
.kuehl-plaetze li:has(.kuehl-belegen[open]) { grid-column: span 2; }
.kuehl-ohne-fall { background: var(--gold-hell); color: var(--gold-text); align-self: flex-start; }
@media (max-width: 48rem) { .kuehl-plaetze li:has(.kuehl-belegen[open]) { grid-column: 1 / -1; } .kuehl-belegen > summary { min-height: 2.6rem; } }
.kuehl-liste li { padding: 0.15rem 0; }
.karten-wahl { margin: 0.6rem 0 0; font-size: 0.9rem; }
.karten-wahl label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; color: var(--text-leise); }
.karten-wahl select { width: auto; }
@media (max-width: 48rem) {
  .kuehl-formular input, .kuehl-formular select, .kuehl-formular button { min-height: 2.5rem; }
  a[data-karten-ziel] { min-height: 2.2rem; display: inline-flex; align-items: center; }
}

/* To-do-Liste: Fotos, Unterpunkte, rotes Ausrufezeichen im Menü (13.11.2026) */
.nav-dringend { margin-left: auto; min-width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--schlecht); color: #fff; font-weight: 700;
  font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; }
.leiste-zu .navigation a { position: relative; }
.leiste-zu .nav-dringend { position: absolute; top: 0; right: 0; min-width: 0.9rem; height: 0.9rem; font-size: 0.65rem; }
.todo-foto-knopf { cursor: pointer; white-space: nowrap; }
.todo-fotos { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0 !important; }
.todo-fotos img { height: 4.5rem; width: auto; max-width: 8rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--rand); display: block; }
.todo-fotos.gross img { height: auto; width: 100%; max-width: 22rem; max-height: 22rem; object-fit: contain; }
.todo-fotos figure { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; }
.todo-unter { padding-left: 1.2rem; }
.todo-ziel { margin: 0.3rem 0 0; }
@media (max-width: 48rem) { .todo-foto-knopf { min-height: 2.75rem; display: inline-flex; align-items: center; } }

/* To-do-Liste: Aufgaben mit Unterpunkten (Wunsch 13.11.2026) – einzeln abhaken oder die ganze Aufgabe auf einmal */
.todo-schritte { list-style: none; margin: 0.35rem 0 0.2rem; padding: 0; display: grid; gap: 0.25rem; }
.todo-schritte li { display: flex; align-items: center; gap: 0.5rem; }
.todo-schritte li.erledigt a { text-decoration: line-through; color: var(--text-leise); }
.todo-schritte form { margin: 0; display: flex; }
.todo-schritte a { color: inherit; overflow-wrap: anywhere; }
.todo-kasten { width: 1.5rem; height: 1.5rem; flex: none; border: 2px solid var(--text-leise); border-radius: 5px; background: var(--flaeche); color: var(--gut, #2e7d32);
  font-weight: 700; line-height: 1; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.todo-kasten:hover, .todo-kasten:focus-visible { border-color: var(--gold); }
@media (max-width: 48rem) { .todo-kasten { width: 2.2rem; height: 2.2rem; font-size: 1.2rem; } .todo-schritte { gap: 0.4rem; } }

/* Oberfläche „Unterwegs“ (13.11.2026): eigene Startseite für das Handy, Leiste unten statt Menü links */
body.unterwegs { display: block; }
body.unterwegs .hauptbereich { padding-bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px)); }
body.unterwegs .inhalt { max-width: 46rem; margin-inline: auto; }
.uw-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-around; background: var(--leiste);
  padding: 0.3rem 0.2rem calc(0.3rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.18); }
.uw-leiste a { position: relative; flex: 1 1 0; min-width: 0; min-height: 3.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; color: var(--leiste-text); text-decoration: none; font-size: 0.74rem; border-radius: 8px; }
.uw-leiste a.aktiv { color: #fff; box-shadow: inset 0 2px 0 var(--gold); }
.uw-leiste .nav-dringend { position: absolute; top: 0.15rem; left: calc(50% + 0.5rem); margin: 0; }
/* Kopf von „Unterwegs“ (Wunsch 15.11.2026): dunkel wie der Seitenkopf im Hauptprogramm, über die ganze Breite */
.uw-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.inhalt:has(> .seitenkopf) > .seitenkopf.uw-kopf { padding: 1.1rem var(--rand-x) 1rem; min-height: 5.5rem; flex-direction: row; justify-content: space-between; align-items: center; }
@media (min-width: 48.01rem) { .inhalt:has(> .seitenkopf) > .seitenkopf.uw-kopf { padding-inline: max(var(--rand-x), calc((100% - 46rem) / 2 + var(--rand-x))); } }
.uw-kopf h1 { margin: 0; font-size: 1.35rem; font-weight: 650; }
.uw-kopf p { margin: 0.1rem 0 0; }
.uw-kopf p.leise { color: var(--leiste-text); }
.uw-kopf .uw-zurueck { color: var(--leiste-leise); }
.uw-kopf .uw-zurueck:hover { color: #fff; }
.uw-kopf .kuerzel-kreis { background: var(--logo); color: #1a1b1d; }
.uw-abmelden { background: var(--leiste-aktiv); border-color: #3c3d43; color: #f1eee8; }
.uw-abmelden:hover { border-color: var(--logo); }
/* der Inhalt darunter bleibt schmal und mittig wie bisher */
body.unterwegs .inhalt:has(> .seitenkopf.uw-kopf) { max-width: none; }
body.unterwegs .inhalt:has(> .seitenkopf.uw-kopf) > :not(.seitenkopf) { max-width: 46rem; margin-left: auto; margin-right: auto; }
.uw-kopf-rechts { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.uw-kopf-rechts form { margin: 0; }
.uw-kopf .kuerzel-kreis { text-decoration: none; }
.uw-firma { margin: 0 0 0.8rem; }
.uw-tag h2 { margin-bottom: 0.4rem; }
.uw-eintrag { border-left: 3px solid var(--gold); background: var(--flaeche-leise); border-radius: 0 8px 8px 0; padding: 0.55rem 0.7rem; }
.uw-eintrag + .uw-eintrag { margin-top: 0.5rem; }
.uw-eintrag.erledigt { opacity: 0.7; }
.uw-eintrag p { margin: 0.1rem 0; overflow-wrap: anywhere; }
.uw-zeit { font-variant-numeric: tabular-nums; font-weight: 650; margin-right: 0.3rem; }
.uw-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.uw-knoepfe .knopf-zweit, .uw-knoepfe .knopf { min-height: 2.75rem; display: inline-flex; align-items: center; text-decoration: none; }
.uw-fahrt { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0 auto; }
.uw-fahrt input { width: 4.5rem; min-height: 2.75rem; }
.todo-schritte span { overflow-wrap: anywhere; }
.todo-schritte li.erledigt span { text-decoration: line-through; color: var(--text-leise); }
.uw-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; margin: 0.75rem 0; }
.uw-kachel { display: flex; flex-direction: column; gap: 0.15rem; min-height: 4.2rem; justify-content: center; padding: 0.6rem 0.8rem; background: var(--flaeche);
  border: 1px solid var(--rand); border-radius: 10px; box-shadow: var(--schatten); color: var(--text); text-decoration: none; }
.uw-kachel span { color: var(--text-leise); font-size: 0.86rem; }
/* Wunsch 15.11.2026: Startseite nur aus Kacheln, mit Zahl oben rechts */
.uw-start { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.7rem; }
.uw-start .uw-kachel { position: relative; min-height: 6.6rem; justify-content: flex-start; padding: 0.8rem 0.85rem; }
.uw-start .uw-kachel .sym { color: var(--gold); margin-bottom: 0.35rem; }
.uw-zahl { position: absolute; top: 0.6rem; right: 0.6rem; min-width: 1.9rem; height: 1.9rem; padding: 0 0.45rem; border-radius: 1rem;
  display: inline-flex; align-items: center; justify-content: center; background: var(--akzent); color: #fff; font-size: 1.05rem;
  font-weight: 650; font-variant-numeric: tabular-nums; }
.uw-zahl.dringend { background: var(--schlecht); }
.uw-zahl.neutral { background: var(--flaeche-leise); color: var(--text); border: 1px solid var(--rand); }
.uw-zurueck { display: inline-flex; align-items: center; gap: 0.2rem; min-height: 2rem; color: var(--text-leise); text-decoration: none; font-size: 0.92rem; }
.uw-kachel:hover, .uw-kachel:focus-visible { border-color: var(--gold); }
.uw-urlaub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.3rem 0; }
.uw-hilfe summary { cursor: pointer; color: var(--text-leise); }

/* Wunsch 15.11.2026: Seiten zeigen zuerst den Zustand (Kacheln), Formulare öffnen sich erst auf Wunsch (Zeilen) */
.status-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.6rem; margin: 0 0 0.75rem; }
.status-kachel { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.65rem 0.85rem; background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: 10px; box-shadow: var(--schatten); min-width: 0; }
.status-kachel .status-name { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-leise); font-size: 0.84rem; }
.status-kachel strong { font-size: 1.08rem; font-weight: 650; overflow-wrap: anywhere; }
.status-kachel small { color: var(--text-leise); font-size: 0.82rem; overflow-wrap: anywhere; }
.status-kachel.gut { border-left: 3px solid var(--gut); }
.status-kachel.gut strong { color: var(--gut); }
.status-kachel.schlecht { border-left: 3px solid var(--schlecht); }
.status-kachel.schlecht strong { color: var(--schlecht); }
.karte.einstell-liste { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.einstell + .einstell { border-top: 1px solid var(--rand); }
.einstell > summary, .einstell-kopf { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; margin: 0; list-style: none; }
.einstell > summary { cursor: pointer; }
.einstell > summary::-webkit-details-marker { display: none; }
.einstell > summary > .sym, .einstell-kopf > .sym { flex: none; color: var(--gold); }
.einstell-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.05rem; }
.einstell-name > strong { font-weight: 600; font-size: 0.98rem; }
.einstell-name > strong label { font: inherit; color: inherit; cursor: pointer; }
.einstell-name > span { color: var(--text-leise); font-size: 0.88rem; overflow-wrap: anywhere; }
.einstell-knopf { flex: none; padding: 0.3rem 0.75rem; border: 1px solid var(--rand-feld); border-radius: 7px; background: var(--flaeche);
  color: var(--text); font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.einstell > summary:hover .einstell-knopf, a.einstell-knopf:hover, .einstell > summary:focus-visible .einstell-knopf { border-color: var(--gold); background: var(--gold-hell); }
.einstell[open] > summary .einstell-knopf { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.einstell-schalter { flex: none; }
.einstell-inhalt { padding: 0.2rem 0 1rem 2.05rem; }
.einstell-inhalt > :first-child { margin-top: 0; }
@media (max-width: 760px) {
  .einstell-inhalt { padding-left: 0; }
  .einstell > summary, .einstell-kopf { flex-wrap: wrap; }
}
/* Verwaltung als Übersicht (Entwurf E3) */
.vw-gruppe { margin: 1.1rem 0 0.45rem; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-leise); }
.vw-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.7rem; }
.vw-kachel { position: relative; display: flex; flex-direction: column; gap: 0.15rem; min-height: 6.2rem; padding: 0.8rem 0.9rem; background: var(--flaeche);
  border: 1px solid var(--rand); border-radius: 10px; box-shadow: var(--schatten); color: var(--text); text-decoration: none; }
.vw-kachel:hover, .vw-kachel:focus-visible { border-color: var(--gold); outline: none; }
.vw-kachel .sym { color: var(--gold); margin-bottom: 0.3rem; }
.vw-kachel strong { font-weight: 600; }
.vw-kachel span { color: var(--text-leise); font-size: 0.88rem; }
.vw-kachel.achtung { border-color: var(--schlecht); }
.vw-kachel.achtung span { color: var(--schlecht); font-weight: 500; }
.vw-kachel .vw-nur-lesen { position: absolute; top: 0.7rem; right: 0.75rem; color: var(--text-leise); }

/* Fuhrpark (Wunsch 15.11.2026) */
.fp-kacheln { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.fp-kachel.inaktiv { opacity: 0.6; }
.fp-kachel.achtung span { color: var(--text-leise); font-weight: 400; }
.fp-kachel .fp-kurz, .fp-kachel.achtung .fp-kurz { color: var(--text); }
.fp-kachel.achtung .fp-frist.ueberfaellig { color: var(--schlecht); font-weight: 650; }
.fp-kachel .fp-frist { margin-top: auto; padding-top: 0.35rem; }
.fp-frist.bald { color: var(--gold-text); font-weight: 500; }
.fp-frist.ueberfaellig { color: var(--schlecht); font-weight: 650; }
.frist-liste { list-style: none; margin: 0.2rem 0 0.6rem; padding: 0; }
.frist { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; padding: 0.4rem 0.6rem; border-left: 3px solid var(--rand-feld); border-bottom: 1px solid var(--rand); }
.frist.bald { border-left-color: var(--gold); background: var(--gold-hell); }
.frist.ueberfaellig { border-left-color: var(--schlecht); background: var(--rot-hell); }
.frist.erledigt { opacity: 0.75; }
.frist-datum { flex: none; min-width: 5.6rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.frist-text { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.frist-knoepfe { display: flex; align-items: center; gap: 0.35rem; margin: 0; }
.akte-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.2rem 2rem; margin-bottom: 0.6rem; }
.akte-gruppen h3 { margin-top: 0.4rem; }
.akte-formular { margin-top: 0.6rem; }
.schmal-formular { max-width: 44rem; margin-top: 0.6rem; }
.marke.gewaehr { background: var(--gruen-hell); color: var(--gut); }
.km-melden { margin-bottom: 0.7rem; }
.km-melden input { min-height: 2.2rem; }
@media (max-width: 48rem) { .km-melden label, .km-melden input, .km-melden button { width: 100%; } .km-melden input, .km-melden button { min-height: 2.75rem; } }
.tanken-karte { max-width: 34rem; }
.tanken-knopf { min-height: 2.8rem; padding-inline: 1.6rem; }
.kosten-tabelle td:not(:first-child), .kosten-tabelle th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 48rem) { .tanken-karte input:not([type="checkbox"]):not([type="file"]), .tanken-karte select { min-height: 2.75rem; } .tanken-knopf { width: 100%; min-height: 3rem; } }
.leer-drucken { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; white-space: nowrap; }
