/* Theo regelt – Grundgestaltung. Farben aus brand/tokens/tokens.json (Test prüft das), Systemschriften (keine Webfonts). */
:root {
  --paper: #F6F8FC; --card: #FFFFFF; --ink: #16213A; --muted: #586179; --line: #DCE2EC;
  --blue: #2443B8; --blue-soft: #E7ECFB; --marker: #FFE45C; --ok: #1F7A4D; --bad: #B42318;
  --line-strong: #7D879E; --on-blue: #FFFFFF;
  /* Schrift auf Textmarker-Gelb, in beiden Modi dunkel (tokens.json on-marker). Fehlte bis 0.25.0: „bald fällig“
     stand im Dunkelmodus hell auf Gelb (1,2 : 1). */
  --on-marker: #16213A;
  --radius: 14px;
  /* 0.25.0 (ADR-51): Abstände, Radien und Schriftstufen als Tokens – Werte aus MARKE.md/tokens.json */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-s: 6px; --radius-m: 10px; --radius-l: 14px; --radius-pill: 999px;
  --text-titel: 1.65rem; --text-abschnitt: 1.2rem; --text-klein: .875rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* Bewegung (0.23.0, ruhiger als 0.22.0): Öffnen weich auslaufend, Schließen etwas schneller */
  --t-kurz: 200ms; --t-mittel: 320ms; --t-lang: 400ms; --t-raus: 300ms;
  --kurve: cubic-bezier(.22, 1, .36, 1); --kurve-raus: cubic-bezier(.4, 0, .6, 1);
  color-scheme: light;
}
/* Dunkel: wie das Gerät, außer „Hell“ ist gewählt – oder von Hand „Dunkel“ (0.24.1, ADR-50). Beide Blöcke tragen
   dieselben Werte; test_marke.py vergleicht sie, Farben kommen aus den Tokens. */
@media (prefers-color-scheme: dark) {
  :root:not([data-modus="hell"]) { --paper: #0E1525; --card: #172038; --ink: #E8ECF5; --muted: #A1AAC0; --line: #283350;
    --blue: #8CA2FF; --blue-soft: #1E2A4D; --marker: #F2D53C; --ok: #5BC48D; --bad: #FF8A80;
    --line-strong: #64718F; --on-blue: #0E1525; color-scheme: dark; }
}
:root[data-modus="dunkel"] { --paper: #0E1525; --card: #172038; --ink: #E8ECF5; --muted: #A1AAC0; --line: #283350;
    --blue: #8CA2FF; --blue-soft: #1E2A4D; --marker: #F2D53C; --ok: #5BC48D; --bad: #FF8A80;
    --line-strong: #64718F; --on-blue: #0E1525; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--font);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(24px + env(safe-area-inset-bottom)) env(safe-area-inset-left); }
#app { max-width: 720px; margin: 0 auto; padding: 0 16px; }
h1, h2 { line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; hyphens: auto; overflow-wrap: break-word; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; }
h1:focus, h2:focus { outline: none; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); }
.mono { font-family: var(--mono); }
.loading { padding: 48px 0; color: var(--muted); text-align: center; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }   /* 0.41.0: 16 → 10 px, mehr Platz für Inhalt */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand img { border-radius: 8px; }
.family { color: var(--muted); font-size: .95rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
form.card, .card { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.card > * { min-width: 0; }
label { font-weight: 600; margin-top: 6px; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line-strong); border-radius: 10px; padding: 11px 14px; width: 100%; min-width: 0; }
input:focus, select:focus { border-color: var(--blue); outline: none; }
/* Tastatur: deutlich sichtbarer Ring wie bei Knöpfen, nicht nur ein farbiger Rand (A11Y-03) */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
input[type=file] { padding: 9px; }
/* Ankreuzfelder: feste Größe statt Feldbreite (sonst rutscht der Haken mitten in die Zeile), 24 px Ziel */
input[type=checkbox], input[type=radio] { width: 24px; height: 24px; flex: none; padding: 0; margin: 0; accent-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.btn { font: 600 1rem var(--font); border-radius: 999px; border: 2px solid var(--blue); background: var(--blue); color: var(--on-blue);
  padding: 12px 22px; cursor: pointer; justify-self: start; margin-top: 8px; min-height: 48px; }
/* Symbole in Knöpfen ohne eigene Größe: nie größer als die Schrift (0.36.0 – ein Plus füllte sonst die ganze Zeile) */
.btn > svg { width: 1.25em; height: 1.25em; flex: none; }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.small { padding: 6px 14px; min-height: 44px; font-size: .95rem; margin-top: 0; }
.btn:disabled { opacity: .6; cursor: progress; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.msg { min-height: 0; margin: 0; font-size: .95rem; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); font-weight: 600; }
.msg.info { color: var(--muted, #555); }
.msg.warn { color: var(--bad); font-weight: 600; background: var(--blue-soft); border-radius: 8px; padding: .5rem .6rem; }
.msg.warn[hidden], .msg[hidden] { display: none; }
.item-sub.keep.over { color: var(--bad); }
.scan[hidden] { display: none; }
.scan .preview { max-height: 220px; width: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: normal; line-height: 1.5; }
.check input { margin-top: 0; }   /* Haken neben der ersten Zeile, auch wenn der Text umbricht */
fieldset.erkannt { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: .75rem; margin: .5rem 0; display: grid; gap: .35rem; }
fieldset.erkannt legend { font-weight: 600; padding: 0 .25rem; }
fieldset.erkannt[hidden] { display: none; }
.warn { background: var(--blue-soft); border-radius: 10px; padding: 12px 14px; }
.hint { color: var(--muted); font-size: .92rem; }

.rk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 1.25rem; font-weight: 600; letter-spacing: .06em; }
.rk span { background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 4px; text-align: center; }

/* Navigation (0.26.0, ADR-51): Start · Kalender · Neu · Dokumente · Familie. Handy unten, ab Tablet-Breite oben. */
/* Breite nach Inhalt verteilt (flex: 1 1 auto): „Dokumente“ bekommt mehr Platz als „Neu“ – sonst wird es mit breiteren
   Systemschriften (z. B. DejaVu unter Linux) auf 320–360 px abgeschnitten */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex;
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
  padding: 6px 2px; border: 0; background: none; color: var(--muted); font: 600 clamp(.7rem, 3.4vw, .8rem) var(--font); cursor: pointer;
  flex: 1 1 auto; min-width: 48px; }
.bottom-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Aktueller Bereich: Farbe UND Unterstrich – nie nur Farbe (WCAG 1.4.1) */
.bottom-nav button[aria-current="page"] { color: var(--blue); }
.bottom-nav button[aria-current="page"] span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
#app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
/* Fokus nie unter der Leiste (WCAG 2.4.11): Scrollen zum Fokus/Sprungziel hält Abstand zur Leiste */
html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  html { scroll-padding-bottom: 0; scroll-padding-top: 84px; }
  .bottom-nav { position: sticky; top: 0; bottom: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding-bottom: 0; }
  #app { padding-bottom: 24px; }
}
.back { margin-bottom: 8px; }
.mehr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mehr-list button, .mehr-list a { display: grid; gap: 2px; width: 100%; text-align: left; padding: 14px 16px; min-height: 56px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
.mehr-list button:hover, .mehr-list a:hover { border-color: var(--blue); }
.faq { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.faq p { margin: 4px 0 0; }

.items, .members, .joins { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.item, .members li, .joins li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; min-width: 0; }
/* Kein Inhalt darf die Seite verbreitern (Umbruch auf 320 px, WCAG 1.4.10) */
.item > *, .members li > *, .joins li > * { min-width: 0; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; min-width: 0; }
.item-title { overflow-wrap: anywhere; }
.item-sub { color: var(--muted); font-size: .9rem; margin: 0; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.empty { color: var(--muted); border: none !important; }
.chip { justify-self: start; font-size: .78rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.familie { background: var(--marker); color: #16213A; border-color: transparent; }
.chip.eltern { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.chip.bad, li.bad { color: var(--bad); border-color: var(--bad); }
.code { color: var(--muted); font-size: .85rem; margin: 0; }
.invite-link { display: grid; gap: 8px; }
.qr svg { width: min(240px, 70vw); height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); }
.due { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.due li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.due li.urgent { border-left-color: var(--marker); }
.due li.overdue { border-left-color: var(--bad); }
.due li.empty { display: block; border: none; color: var(--muted); }
.due li.hinweis { display: block; }
.due li.hinweis p { margin: 0 0 8px; }
/* Verträge und Fixkosten */
.big { font: 700 1.6rem var(--font); margin: 4px 0; }
.item.vertrag.termin .status-termin { color: var(--ink); font-weight: 600; }
.item.vertrag.beendet .item-title { color: var(--muted); }
.due .when { font-weight: 700; }
.due li.overdue .when { color: var(--bad); }
.due .msg { grid-column: 1 / -1; }
@media (max-width: 420px) { .due li { grid-template-columns: 1fr auto; } .due .when { grid-column: 1 / -1; } }

/* Alltag: Einkaufsliste und Aufgaben */
.stack { display: grid; gap: 8px; }
.add-row input:first-child { flex: 1 1 10rem; min-width: 0; }
.add-row .menge { flex: 0 1 6rem; min-width: 0; }
/* 0.28.0: Eingabe und Knopf in einer Reihe – auch auf 320 px (vorher rutschte „Dazu“ allein in die nächste Zeile) */
.add-row { flex-wrap: nowrap; }
.add-row input:first-child { flex-basis: 0; }
.add-row .menge { flex: 0 1 5rem; padding-left: 10px; padding-right: 10px; }
@media (max-width: 359px) { .add-row .menge { flex-basis: 4.2rem; } }
.add-row .btn.rund { flex: none; display: inline-flex; align-items: center; justify-content: center; }
.add-row .btn.rund svg { width: 22px; height: 22px; }
.zeilen > li.haken .zeile { gap: var(--space-2); padding-right: 0; }
h3.sub { font-size: 1rem; margin: 14px 0 4px; }
.checklist { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.checklist li.urgent { border-left-color: var(--marker); }
.checklist li.overdue { border-left-color: var(--bad); }
.checklist li.empty { display: block; border: none; color: var(--muted); }
.checklist li.lesen { display: block; }
.checklist li.gruppe, .items li.gruppe { display: block; border: none; padding: 10px 2px 0; font-weight: 700; color: var(--ink); }
.checklist .notiz { font-size: .82rem; }
/* Schmale Handys: Löschen unter den Text, damit der Text die ganze Breite bekommt */
@media (max-width: 420px) { .checklist li > .btn { grid-column: 2; justify-self: start; } }
.checklist .what { overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.checklist .what .item-sub { display: block; }
.checklist.done .what strong { text-decoration: line-through; color: var(--muted); }
.tick { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--card);
  color: var(--ok); font: 700 1.3rem var(--font); cursor: pointer; }
.tick[aria-pressed="true"] { border-color: var(--ok); }
.tick:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* Notfall */
.notrufe { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.notrufe .tel { font-weight: 700; font-size: 1.1rem; color: var(--blue); }
.notfall-felder { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0; }
.notfall-felder dt { color: var(--muted); }
.notfall-felder dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }

/* Farbe je Person (web/js/familie.js FARBEN; Test vergleicht) – nur Markierung, der Name steht immer daneben */
.p-blau { --p: #2443B8; } .p-gruen { --p: #1F7A4D; } .p-rot { --p: #B42318; } .p-orange { --p: #B54708; } .p-lila { --p: #7A2E8E; } .p-tuerkis { --p: #0E7490; } .p-pink { --p: #C11574; } .p-braun { --p: #6B5B3E; }
@media (prefers-color-scheme: dark) { :root:not([data-modus="hell"]) .p-blau { --p: #8CA2FF; } :root:not([data-modus="hell"]) .p-gruen { --p: #5BC48D; } :root:not([data-modus="hell"]) .p-rot { --p: #FF8A80; } :root:not([data-modus="hell"]) .p-orange { --p: #F7A23B; } :root:not([data-modus="hell"]) .p-lila { --p: #D49BE6; } :root:not([data-modus="hell"]) .p-tuerkis { --p: #4FC3D9; } :root:not([data-modus="hell"]) .p-pink { --p: #F58AC4; } :root:not([data-modus="hell"]) .p-braun { --p: #C9B48A; } }
:root[data-modus="dunkel"] .p-blau { --p: #8CA2FF; } :root[data-modus="dunkel"] .p-gruen { --p: #5BC48D; } :root[data-modus="dunkel"] .p-rot { --p: #FF8A80; } :root[data-modus="dunkel"] .p-orange { --p: #F7A23B; } :root[data-modus="dunkel"] .p-lila { --p: #D49BE6; } :root[data-modus="dunkel"] .p-tuerkis { --p: #4FC3D9; } :root[data-modus="dunkel"] .p-pink { --p: #F58AC4; } :root[data-modus="dunkel"] .p-braun { --p: #C9B48A; }
.pdot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--p, var(--line)); margin-right: .35em; vertical-align: -.05em; flex: none; }
.agenda li.person { border-left: 4px solid var(--p, var(--line)); padding-left: 8px; }
.agenda strong + .item-sub { margin-left: .4em; }
.farbwahl { display: flex; flex-wrap: wrap; gap: 8px; }
.farbwahl button { min-width: 44px; min-height: 44px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 600 .9rem var(--font); padding: 4px 12px; cursor: pointer; }
.farbwahl button[aria-pressed="true"] { border-color: var(--ink); }
.agenda li.frist .item-title, .agenda li.kuendigung strong, .agenda li.aufgabe strong, .agenda li.garantie strong { font-weight: 600; }

#druck { display: none; }
@media print {
  body { background: #fff; color: #000; }
  /* Notfallkarte drucken (0.23.0): nur der eigene Druckbereich, App und Fenster nicht */
  body.druck-notfall > :not(#druck) { display: none !important; }
  body.druck-notfall #druck { display: block; }
  .top, .btn, label, input, .msg, .tabs, .bottom-nav { display: none !important; }
  .card { border: none; }
  .rk span { border: 1px solid #000; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, *::backdrop { transition: none !important; animation: none !important; } }

.banner { margin: 0 auto 12px; max-width: 720px; padding: 12px 14px; border-radius: 12px;
  background: #fff4d6; color: #5a4200; border: 1px solid #f0d58a; line-height: 1.4; }
.banner a { color: inherit; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-modus="hell"]) .banner { background: #3a3112; color: #ffe7a8; border-color: #6b5a22; } }
:root[data-modus="dunkel"] .banner { background: #3a3112; color: #ffe7a8; border-color: #6b5a22; }

/* Rechnungen */
.chip.pay.offen { background: var(--blue-soft); color: var(--blue); }
.chip.pay.ueberfaellig { background: var(--bad); color: var(--card); }
.chip.pay.bezahlt { background: var(--ok); color: var(--card); }
.msg.giro { display: grid; gap: .4rem; justify-items: start; }
svg.girocode { width: 220px; height: 220px; background: #fff; border-radius: 8px; }

/* Geräte koppeln */
.code-big { font-size: 1.8rem; letter-spacing: .15em; text-align: center; margin: .5rem 0; }
.code-big[hidden] { display: none; }
.link-box .qr svg, #link-qr svg { width: 240px; height: 240px; background: #fff; }
.devices { list-style: none; padding: 0; display: grid; gap: .4rem; }
.card.routine { border-left: 6px solid var(--marker); }

/* Familienwand (Tablet) */
.wall-brand { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.wall-titel { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.wall-clock { color: var(--muted); font-size: 1.1rem; }
/* 0.49: Countdown am 31.12., Pinnwand und Essen an der Wand */
.wall-countdown { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; margin-inline-start: 12px; }
.wand-zettel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wand-zettel li { padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.wand-zettel li.angeheftet { outline: 2px solid var(--blue); outline-offset: -2px; }
.essen-zeile { display: block; }
/* 0.50: an der Wand bedienen – große Haken (Finger, nicht Maus), Eingabe darunter */
.wand-liste { list-style: none; margin: 0; padding: 0; }
.wand-haken { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 4px; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.wand-haken .kasten { flex: none; width: 30px; height: 30px; border: 2px solid var(--blue); border-radius: 8px;
  display: grid; place-items: center; font-weight: 700; color: var(--blue); }
.wand-haken.fertig { opacity: .65; }
.wand-haken.fertig strong { text-decoration: line-through; }
.wand-haken:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wand-eingabe { display: flex; gap: 8px; margin-top: 10px; }
.wand-eingabe input { flex: 1; min-width: 0; }
.wand-fertig { margin-top: 10px; }
.wall-brand { padding: 10px 0; }
#wall-docs li, #wall-mine li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wall-personen { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.wall-personen .lab { color: var(--muted); font-size: .95rem; font-weight: 600; }
.wall-personen .people { margin: 0; gap: 8px; }
.wall-personen .people .btn { margin: 0; }
/* Familienwand ohne Scrollen (0.42.0, ADR-65, R9): Die Seite ist genau so hoch wie der Bildschirm, die Spalten teilen
   ihn sich. Was in einer Spalte nicht passt, lässt sich darin wischen – ein Verlauf am unteren Rand zeigt es an. */
body.wand { padding-bottom: env(safe-area-inset-bottom); }
body.wand #app { max-width: none; padding: 0 20px 12px; }
body.wand #wall-pin, body.wand #wall-personal { max-width: 720px; margin-inline: auto; }
@media (min-width: 700px) {
  body.wand { font-size: 18px; }
  body.wand #app:has(> #wall-overview) { display: flex; flex-direction: column; height: 100dvh; }
  body.wand #app > #wall-overview { flex: 1; min-height: 0; }
  .wand-raster { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-areas: "woche monat rechts"; }
  #wall-woche { grid-area: woche; } #wall-monat { grid-area: monat; } #wall-rechts { grid-area: rechts; }
  .wand-spalte { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; align-content: start; }
  .wand-rechts > .card { margin-bottom: 16px; }
  .wand-rechts > .card:last-child { margin-bottom: 0; }
  .wand-spalte.laeuft-ueber { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
  .wand-spalte:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .wand-raster h1 { font-size: 1.35rem; }
}
/* Hochkant (z. B. 768 × 1024): oben der Monat über die ganze Breite, darunter Woche und der Rest */
@media (min-width: 700px) and (orientation: portrait) {
  .wand-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "monat monat" "woche rechts"; }
  #wall-monat { overflow: visible; }
}
.people .btn.person { font-size: 1.2rem; padding: 14px 22px; }
.pin-dots { font-size: 2.4rem; letter-spacing: .4em; text-align: center; margin: 8px 0; }
.pin-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 320px; margin: 0 auto 12px; }   /* 0.42.0: width – mit „margin: auto“ im Raster der Karte schrumpfte es auf die Ziffern */
.pin-key { font-size: 1.6rem; padding: 16px 0; justify-self: stretch; margin: 0; }
.wall-night { position: fixed; inset: 0; background: #000; color: #333; display: flex; align-items: flex-end;
  justify-content: center; padding: 24px; z-index: 50; cursor: pointer; }
.agenda { list-style: none; padding: 0; margin: 0; }
.agenda li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.agenda li.stunde { color: var(--muted); }
.agenda .when { min-width: 7.5em; font-variant-numeric: tabular-nums; }
.agenda-day h3 { margin: 14px 0 4px; font-size: 1rem; }
.plan-row.pruefen { outline: 2px solid var(--marker); outline-offset: 2px; border-radius: var(--radius-s); }
.plan-foto-status { margin: 8px 0; }
.plan-foto-status p { margin: 4px 0; }
.plan-raster-zeile { display: grid; grid-template-columns: 2.5em repeat(2, minmax(0, 1fr)); gap: 6px; align-items: center; margin-bottom: 6px; }
/* Zwei Zeilen je Stunde (0.40.0): Tag · von · bis, darunter Fach · Raum – auf 320 px bleibt jede Uhrzeit lesbar */
.plan-row { display: grid; grid-template-columns: 5em repeat(2, minmax(0, 1fr)); gap: 6px; padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); }
.plan-row > :nth-child(4) { grid-column: 1 / 3; }
.plan-row input[type=time], .plan-raster-zeile input[type=time] { padding-left: 8px; padding-right: 6px; min-width: 0; }
label.check { display: flex; gap: .5rem; align-items: flex-start; }
.agenda-day.heute h3 { color: var(--blue); }
.wall-text { white-space: pre-wrap; max-height: 50vh; overflow: auto; font-family: var(--mono); }

/* Neue Version bereit (PERF-03): unten fest, über allem, ohne die Seite zu verdecken */
.update-note { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; background: var(--card); color: var(--ink); border: 2px solid var(--blue);
  border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
@media print { .update-note { display: none !important; } }

/* Aufklappbare Zusatzfelder in Formularen (0.20.0) */
.mehr-optionen { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 4px 12px; margin: 10px 0; }
.mehr-optionen summary { cursor: pointer; font-weight: 600; color: var(--blue); min-height: 44px; display: flex; align-items: center; }
.mehr-optionen[open] { padding-bottom: 12px; }
/* von/bis nebeneinander – auch auf 320 px (Uhrzeitfelder brauchen ~130 px) */
.zeit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.zeit > div { display: grid; min-width: 0; }
.steps.erste { list-style: none; padding: 0; margin: 0 0 8px; }
.steps.erste li { display: grid; gap: 0; margin-bottom: 8px; }
.steps.erste .linkish { padding: 6px 0 0; }
.linkish { background: none; border: 0; padding: 10px 0; min-height: 44px; font: 600 1rem var(--font); color: var(--blue); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Kalender: Monatsansicht (0.21.0). Raster mit 7 Spalten passt bis 320 px (Zelle ≥ 32 px breit, 48 px hoch). */
[hidden] { display: none !important; }
.umschalter { display: inline-flex; justify-self: start; width: max-content; margin: 12px 0 4px; border: 2px solid var(--blue); border-radius: 999px; overflow: hidden; }
.umschalter .btn { border: 0; border-radius: 0; margin: 0; min-width: 88px; min-height: 44px; flex: none; box-sizing: border-box; }
.umschalter .btn[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }
.monat-kopf { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
.monat-kopf h2 { flex: 1; margin: 0; text-align: center; font-size: 1.1rem; }
.monat-kopf .btn { padding-left: 14px; padding-right: 14px; }
.mehr-zahl { font-size: .65rem; line-height: 1; color: var(--muted); }

/* ---- 0.22.0: Fenster, Rückfragen, Meldungen, Plus-Knopf, ruhige Zeilen (ADR-47) ---------------------------
   Bewegung nur, wo sie erklärt, woher etwas kommt oder wohin es geht: Fenster fahren von unten hoch, Meldungen
   gleiten ein, der Monat schiebt in Blätterrichtung, Abgehaktes gleitet weg, Neues leuchtet einmal auf.
   Ruhig (200–400 ms, 0.23.0), nie springend; mit „Bewegung reduzieren“ alles aus. */
/* 0.24.0: Bewegung als Keyframes (wie FamilyCal) statt Übergang mit doppeltem rAF – und der Dialog scrollt nie
   (overflow: clip), sonst schob ein Fokus das Fenster vor dem Hochfahren halb ins Bild („hüpft“). */
dialog.sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0;
  border: 0; background: rgba(14, 21, 37, .45); color: var(--ink); overflow: clip; }
dialog.sheet[open] { display: flex; align-items: flex-end; justify-content: center; animation: abdunkeln var(--t-lang) var(--kurve) both; }
dialog.sheet::backdrop { background: transparent; }
dialog.sheet.schliesst { animation: aufhellen var(--t-raus) var(--kurve-raus) both; }
@keyframes abdunkeln { from { background-color: rgba(14, 21, 37, 0); } }
@keyframes aufhellen { to { background-color: rgba(14, 21, 37, 0); } }
@keyframes hoch { from { transform: translateY(100%); } }
@keyframes runter { to { transform: translateY(100%); } }
@keyframes auftauchen { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes abtauchen { to { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-panel { box-sizing: border-box; width: 100%; max-width: 560px; max-height: calc(100% - 32px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); background: var(--card); border-radius: 20px 20px 0 0;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); will-change: transform; }
dialog.sheet.offen .sheet-panel { animation: hoch var(--t-lang) var(--kurve) both; }
dialog.sheet.schliesst .sheet-panel { animation: runter var(--t-raus) var(--kurve-raus) both; }
.sheet-griff { justify-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--line); }
.sheet-kopf { display: flex; align-items: center; gap: 12px; }
.sheet-kopf h2 { flex: 1; margin: 0; font-size: 1.3rem; }
.sheet-close { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--paper); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-close svg { width: 20px; height: 20px; }
.sheet-body, .sheet-form { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.sheet-form label { margin-top: 2px; }
.btn.breit { width: 100%; margin-top: 6px; }
.btn.gefahr { background: var(--bad); border-color: var(--bad); color: var(--card); }
.sheet-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.frage-text { margin: 0; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.wahl { display: grid; gap: 8px; }
.wahl-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; margin: 0; border: 2px solid var(--line-strong);
  border-radius: 12px; font-weight: 600; cursor: pointer; transition: border-color var(--t-kurz) ease, background-color var(--t-kurz) ease; }
.wahl-option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
@media (min-width: 760px) {
  dialog.sheet[open] { align-items: center; }
  .sheet-panel { border-radius: var(--radius); max-height: calc(100% - 64px); padding-bottom: 24px; }
  dialog.sheet.offen .sheet-panel { animation: auftauchen var(--t-mittel) var(--kurve) both; }
  dialog.sheet.schliesst .sheet-panel { animation: abtauchen var(--t-kurz) var(--kurve-raus) both; }
  .sheet-griff { display: none; }
}
/* Einzelheiten im Fenster */
.sheet-eintrag { display: flex; align-items: center; gap: 10px; }
.sheet-eintrag .strich { width: 6px; height: 28px; border-radius: 3px; background: var(--p, var(--line-strong)); }
.details { margin: 0; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); row-gap: 10px; column-gap: 12px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.aktionen { display: grid; gap: 0; }
.aktionen .btn { margin-bottom: 8px; }
.aktion { display: flex; align-items: center; min-height: 52px; width: 100%; padding: 0 2px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--blue); font: 600 1.05rem var(--font); text-align: left; cursor: pointer; }
.aktion.gefahr { color: var(--bad); }
.giro-box:empty { display: none; }
/* Kacheln im +-Fenster */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel { display: grid; gap: 10px; align-content: start; min-height: 108px; padding: 16px; border: 0; border-radius: var(--radius);
  background: var(--blue-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform var(--t-kurz) var(--kurve); }
.kachel svg { width: 28px; height: 28px; color: var(--blue); }
.kachel strong { display: block; font-size: 1.05rem; }
.kachel:active { transform: scale(.97); }
/* Kurze Meldung */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(152px + env(safe-area-inset-bottom)); z-index: 30; max-width: 520px; margin: 0 auto;
  box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px;
  border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 600; opacity: 0; transform: translateY(12px);
  transition: opacity var(--t-mittel) var(--kurve), transform var(--t-mittel) var(--kurve); pointer-events: none; }
.toast.sichtbar { opacity: 1; transform: none; pointer-events: auto; }
.toast:empty { display: none; }
.toast-aktion { flex: none; min-height: 44px; padding: 0 10px; border: 0; background: none; color: inherit; font: 700 1rem var(--font);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (min-width: 760px) { .toast { bottom: 24px; } }
/* Ruhige Zeilen statt Karten mit Knöpfen */
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen > li + li { border-top: 1px solid var(--line); }
.zeile { box-sizing: border-box; width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 4px; border: 0;
  border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-kurz) ease; }
.zeile:hover { background: var(--paper); }
.zeile:active { background: var(--blue-soft); }
.zeile:disabled { cursor: default; background: none; }
.zeile .strich { flex: none; width: 4px; align-self: stretch; margin: 4px 0; border-radius: 2px; background: var(--p, var(--line-strong)); }
.zeile .strich.quadrat { width: 10px; height: 10px; align-self: center; margin: 0 -3px; }
.zeile .wann { flex: none; min-width: 4.2em; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.zeile .was { flex: 1; min-width: 0; display: grid; gap: 2px; }
.zeile .was strong { font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.zeile > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.zeilen .empty { padding: 12px 4px; color: var(--muted); }
/* „in 3 Tagen“ als Kennzeichen rechts – überfällig rot, diese Woche gelb (immer mit Wort, nie Farbe allein) */
.frist-chip { flex: none; font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.zeilen.due li.urgent .frist-chip { background: var(--marker); color: var(--on-marker); }
.zeilen.due li.overdue .frist-chip { background: var(--bad); color: var(--card); }
.kopfzeile { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.kopfzeile h1, .kopfzeile h2 { margin: 0; }
.kopfzeile .umschalter { margin: 0; }
.bereich-kopf { margin: 4px 0 12px; }   /* 0.41.0: Umschalter + Hauptknopf eines Bereichs in einer Zeile */
.bereich-kopf #dok-bereich { margin: 0; }
.btn.mit-symbol { display: inline-flex; align-items: center; gap: 6px; }
/* Abo (0.43.0, ADR-66): Hinweis auf dem Start mit Streifen wie die Routine-Karte – rot nur, wenn es eilt */
.card.abo-hinweis { border-left: 6px solid var(--marker); }
.card.abo-hinweis.dringend { border-left-color: var(--bad); }
.card.abo-hinweis h2 { font-size: 1.1rem; margin: 0; }
.card.abo-hinweis .btn { justify-self: start; }
.abo-stand strong { font-size: 1.15rem; }
/* Link als Knopf („Abo verwalten“): „.sheet-body a“ färbte die Schrift blau auf blauem Grund – unsichtbar */
a.btn:not(.ghost), .sheet-body a.btn:not(.ghost) { color: var(--on-blue); text-decoration: none; text-align: center; }
.btn.rund { width: 44px; padding: 0; font-size: 1.3rem; }
/* Bewegungen */
/* Nur Deckkraft, KEIN transform und kein „both“: Eine laufende oder gehaltene transform-Animation macht <main>
   zum Bezugsrahmen für position: fixed – der Plus-Knopf stand dann mitten in der Seite statt über der Leiste
   (0.24.2, Rückmeldung Pascal). test_e2e prüft die Lage des Plus-Knopfs in jedem Bereich. */
main.neu { animation: einblenden var(--t-mittel) var(--kurve) backwards; }
@keyframes einblenden { from { opacity: 0; } }
.gleitet-vor { animation: von-rechts var(--t-mittel) var(--kurve) both; }
.gleitet-zurueck { animation: von-links var(--t-mittel) var(--kurve) both; }
@keyframes von-rechts { from { opacity: 0; transform: translateX(24px); } }
@keyframes von-links { from { opacity: 0; transform: translateX(-24px); } }
.mo-tag { transition: background-color var(--t-kurz) ease, border-color var(--t-kurz) ease; }
li.frisch > .zeile { animation: aufleuchten 2.2s ease-out; }
@keyframes aufleuchten { from { background: var(--marker); color: var(--on-marker); } }
.checklist li.abgehakt, .zeilen li.abgehakt { animation: weggleiten var(--t-mittel) var(--kurve-raus) forwards; }
@keyframes weggleiten { to { opacity: 0; transform: translateX(24px); } }
details.mehr-optionen > summary::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform var(--t-mittel) var(--kurve); }
details.mehr-optionen[open] > summary::after { transform: rotate(225deg) translateY(-3px); }
details.mehr-optionen > summary { list-style: none; }
details.mehr-optionen > summary::-webkit-details-marker { display: none; }
/* Zeilen übernehmen die alten Listen .due/.agenda – deren Raster und Ränder gelten dort nicht mehr */
.zeilen.due, .zeilen.agenda { display: block; margin: 4px 0 0; }
.zeilen.due > li, .zeilen.agenda > li { display: block; padding: 0; border: 0; border-radius: 0; background: none; }
.zeilen.due > li + li, .zeilen.agenda > li + li { border-top: 1px solid var(--line); }
.zeilen.due > li.empty { padding: 12px 4px; }
.zeilen .item-sub { margin-left: 0 !important; }

/* ---- 0.23.0: überall Zeile → Fenster (ADR-48) ------------------------------------------------------------- */
.gruss { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 2px; font-weight: 600; color: var(--muted); }
a.zeile { text-decoration: none; }
.zeile.still { cursor: default; }
.zeile.still:hover, .zeile.still:active { background: none; }
.zeile .symbol { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center; }
.zeile .symbol svg { width: 22px; height: 22px; }
.notfall-zeile .symbol { color: var(--bad); }
.zeile .pdot { margin: 0 2px 0 4px; }
.zeile .chip, .zeile .frist-chip { flex: none; }
.zeile .was > .frist-chip { justify-self: start; margin-bottom: 2px; }
.zeilen > li.gruppe { padding: 16px 4px 4px; font-weight: 700; color: var(--ink); }
.zeilen > li.gruppe + li { border-top: 0; }
.zeilen .empty p { margin: 0 0 10px; }
/* Haken links, Zeile rechts – Einkauf und Aufgaben */
.zeilen > li.haken { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 2px; }
.zeilen > li.haken .zeile { flex: 1; min-width: 0; }
/* 0.28.0: Fälligkeit als Wort in einer Pille und wer zuständig ist als Kreis – keine farbigen Ränder mehr */
.haken-liste.done .zeile strong { text-decoration: line-through; color: var(--muted); }
.haken-liste .notiz { font-size: .85rem; }
/* Lebenslagen: Punkte zum Auswählen */
.wahl-punkt .check { width: 100%; padding: 10px 2px; margin: 0; align-items: flex-start; }
.wahl-punkt .was { display: grid; gap: 2px; }
.wahl-punkt.vorbei .was strong { color: var(--muted); }   /* 0.41.0: vor heute – nicht vorausgewählt */
/* Summen (Fixkosten, Hausrat): Bezeichnung links, Betrag rechts */
.summen { list-style: none; margin: 4px 0; padding: 0; }
.summen li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line); }
.summen li:first-child { border-top: 0; }
.summen strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* „Ansicht als …“ */
.sicht > li { padding: 10px 2px; display: grid; gap: 2px; }
.sicht-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sicht .zahl { font-weight: 700; font-variant-numeric: tabular-nums; }
.sicht li.leer .zahl, .sicht li.leer strong { color: var(--muted); font-weight: 600; }
/* Mitglieder als Zeilen (die alten Kästchen-Regeln für .members gelten hier nicht) */
.zeilen.members { display: block; margin: 0; }
.zeilen.members > li { display: block; border: 0; border-radius: 0; padding: 0; }
.zeilen.members > li + li { border-top: 1px solid var(--line); }
/* Filter als Reihe von Kennzeichen, umbrechend (vier Möglichkeiten passen auf 320 px nicht in einen Umschalter) */
.umschalter.chipreihe { display: flex; flex-wrap: wrap; gap: 8px; width: auto; border: 0; border-radius: 0; overflow: visible; margin: 4px 0 0; }
.umschalter.chipreihe .btn { border: 2px solid var(--blue); border-radius: 999px; min-width: 0; padding: 6px 14px; }
.filter-box:empty { display: none; }
/* Notfall: große Nummern zum Antippen */
.notrufe { gap: 8px; grid-template-columns: minmax(0, 1fr); }
/* umbrechend: „Ärztlicher Bereitschaftsdienst …“ rutscht auf 320 px unter die Nummer statt die Seite zu verbreitern */
.notruf { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; }
.notruf > span { flex: 1 1 9rem; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
a.notruf:hover { border-color: var(--bad); }
.notruf .nummer { flex: none; min-width: 3.6em; font-size: 1.35rem; color: var(--bad); font-variant-numeric: tabular-nums; }
.kontakte-feld { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 6px 0 0; display: grid; gap: 10px; }
.kontakte-feld legend { font-weight: 600; padding: 0 4px; }
.kontakt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kontakt > :last-child { grid-column: 1 / -1; }
.notfall .notrufe.kontakte { margin-top: 4px; }
/* Fenster-Inhalte */
.einstellung { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.einstellung > * { min-width: 0; }
.vertrag-status { margin: 0; font-weight: 600; }
.vertrag-status.status-fehlt { color: var(--muted); font-weight: 400; }
.vorschau-box:empty { display: none; }
.vorschau-box img { max-height: 60vh; width: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.sheet-body .aktionen:first-child .aktion:first-child { border-top: 0; }
.aktion:disabled { color: var(--muted); cursor: progress; }
.zeile[aria-busy="true"], .tick[aria-busy="true"] { opacity: .6; }
.einstellungen h2 { font-size: 1rem; color: var(--muted); margin-bottom: 4px; }
/* Telefon-Links in Notfallkarten in Markenfarbe, nicht in Browser-Blau */
.notfall a.tel, .sheet-body a { color: var(--blue); font-weight: 700; }

/* ---- 0.24.0: Kalender wie in FamilyCal – Monat mit Titeln und Balken, Woche und Tag als Zeitraster (ADR-49) --
   Alles in Rastern mit minmax(0, 1fr): auf 320 px ist eine Tagesspalte gut 38 px breit; Titel werden
   abgeschnitten statt die Seite zu verbreitern. Volle Namen stehen im Tagesknopf (Screenreader) und im Fenster. */
.kal-flaeche { touch-action: pan-y; overflow: hidden; }
.personen { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.person-filter { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--p, var(--blue)); border-radius: 999px;
  background: none; color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; }
.person-filter[aria-pressed="true"] { background: var(--p, var(--blue)); color: var(--on-blue); }
.person-filter[aria-pressed="true"] .pdot { background: var(--on-blue); }
.person-filter:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* Ansicht umschalten: vier Teile in einer Pille, passt auf 320 px */
.umschalter.chipreihe.kompakt { display: inline-flex; flex-wrap: nowrap; gap: 0; width: max-content; max-width: 100%; border: 2px solid var(--blue); border-radius: 999px; overflow: hidden; margin: 0; }
.umschalter.chipreihe.kompakt .btn { border: 0; border-radius: 0; padding: 0 12px; min-width: 0; min-height: 44px; font-size: .95rem; }
.monat-kopf .btn.small:not(.ghost) { box-shadow: 0 0 0 3px var(--blue-soft); }
#kal-legende { margin: 8px 0 0; font-size: .85rem; }
.kalender > .umschalter { margin: 12px 0 0; }
.kalender.volle-breite > .umschalter:first-of-type { margin-top: 0; }
.monat-kopf #kal-heute { flex: none; }
/* 0.41.0 (R2): Auf dem Handy steckten Kalender und Dokumente als Karte in der Seite – 16 px Rand plus 20 px Innenabstand
   ließen dem Monatsraster 286 von 360 px. Ohne Rahmen bekommt es die volle Breite (328 px). */
@media (max-width: 600px) {
  .card.volle-breite { background: transparent; border: 0; border-radius: 0; padding: 4px 0 0; }
}
.schnell-darstellung { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 4px 0 8px; }
.schnell-darstellung .label { font-weight: 600; }
.schnell-darstellung .umschalter { margin: 0; }
.schnell-darstellung .umschalter .btn { padding-inline: 16px; }
#kal-titel { line-height: 1.2; }
#kal-titel .unter { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* Monat */
.monat { display: grid; }
.mo-kopf, .mo-woche { display: grid; grid-template-columns: 20px minmax(0, 1fr); }
.mo-kopf { grid-template-columns: 20px repeat(7, minmax(0, 1fr)); padding: 4px 0; }
.mo-kopf .wt { font-size: .75rem; font-weight: 600; color: var(--muted); text-align: center; }
.monat .kw { font-size: .62rem; color: var(--muted); text-align: center; padding-top: 7px; font-variant-numeric: tabular-nums; }
.mo-woche { border-top: 1px solid var(--line); }
/* leere Wochen bleiben niedrig (≥ 50 px, Knopf ≥ 44 px), volle wachsen bis drei Zeilen und „+n“ */
.mo-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 28px repeat(3, auto) minmax(20px, auto); padding-bottom: 2px; }
.mo-zelle { grid-row: 1 / -1; display: flex; min-width: 0; }
.mo-tag { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-start; padding: 3px 0 0; border: 2px solid transparent;
  border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.mo-tag .zahl { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: .85rem; font-variant-numeric: tabular-nums; }
.mo-tag.fremd { color: var(--muted); }
.mo-tag.heute .zahl { background: var(--blue); color: var(--on-blue); font-weight: 700; }
.mo-tag[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); }
.mo-tag:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
/* Titel und Balken liegen über dem Tagesknopf; Tipps gehen durch zum Tag */
.mo-chip, .mo-balken, .monat .mehr-zahl { position: relative; z-index: 1; pointer-events: none; min-width: 0; overflow: hidden; white-space: nowrap;
  font-size: .62rem; line-height: 15px; height: 15px; margin: 1px 1px 0; padding: 0 3px; border-radius: 3px; }
.mo-chip.termin, .mo-balken { background: var(--p, var(--blue)); color: var(--on-blue); font-weight: 600; }
.mo-chip.frist { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--p, var(--line-strong)); }
/* 0.45: Feiertage rot (wie im Papierkalender), Schulferien hellgrün – nur aus vorhandenen Farben gemischt.
   Kontrast: Feiertag 5,2 : 1 hell / 5,6 : 1 dunkel; Ferien mit Grundschrift (Grün auf Grün wäre hell nur 4,4 : 1). */
.mo-chip.feiertag, .zr-chip.feiertag { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--bad); }
.mo-chip.ferien, .zr-chip.ferien, .mo-balken.ferien, .zr-balken.ferien { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ink); font-weight: 600; }
.mo-tag.feiertag:not(.heute) .zahl { color: var(--bad); font-weight: 700; }
.zeile .strich.feiertag, li.feiertag .zeile .strich, .sheet-eintrag.feiertag .strich { background: var(--bad); }
li.ferien .zeile .strich, .sheet-eintrag.ferien .strich { background: var(--ok); }
.agenda li.feiertag .item-title, .agenda li.feiertag strong { color: var(--bad); }
.mo-balken { margin-left: 0; margin-right: 0; border-radius: 0; }
.mo-balken.anfang { margin-left: 2px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.mo-balken.ende { margin-right: 2px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.monat .mehr-zahl { color: var(--muted); font-weight: 700; text-align: center; padding: 0; }

/* Woche und Tag */
.zeitansicht { display: grid; margin-top: 6px; }
.zr-kopf, .zr-ganztags, .zr-raster { display: grid; grid-template-columns: 28px repeat(7, minmax(0, 1fr)); }
.spalten-1 { grid-template-columns: 28px minmax(0, 1fr); }
.zr-ecke { font-size: .6rem; color: var(--muted); align-self: center; text-align: center; }
.zr-tag { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; min-width: 0; padding: 2px 0;
  border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.zr-tag .wt { font-size: .7rem; color: var(--muted); font-weight: 600; }
.zr-tag .zahl { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-variant-numeric: tabular-nums; }
.zr-tag.heute .zahl { background: var(--blue); color: var(--on-blue); }
.zr-tag:hover { background: var(--blue-soft); }
.zr-tag:focus-visible, .zr-termin:focus-visible, .zr-balken:focus-visible, .zr-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; z-index: 3; }
.zr-ganztags { grid-auto-rows: minmax(24px, auto); gap: 2px 0; padding: 4px 0; border-top: 1px solid var(--line); }
.zr-balken, .zr-chip { min-width: 0; min-height: 24px; margin: 0 1px; padding: 0 5px; border: 0; border-radius: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-align: left; font: 600 .7rem/24px var(--font); background: var(--p, var(--blue)); color: var(--on-blue); cursor: pointer; }
.zr-balken.anfang, .zr-chip { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.zr-balken.ende, .zr-chip { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.zr-balken { margin: 0; } .zr-balken.anfang { margin-left: 2px; } .zr-balken.ende { margin-right: 2px; }
.zr-chip.frist { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--p, var(--line-strong)); }
.zr-raster { border-top: 1px solid var(--line); }
.zr-skala { position: relative; }
.zr-skala span { position: absolute; right: 4px; font-size: .65rem; line-height: 1; padding-top: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zr-spalte { position: relative; min-width: 0; border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); }
.zr-spalte.heute { background-color: color-mix(in srgb, var(--blue-soft) 55%, transparent); }
.zr-termin { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 2px 4px; border: 0; border-radius: 5px;
  overflow: hidden; text-align: left; font: .68rem/1.2 var(--font); background: var(--p, var(--blue)); color: var(--on-blue); box-shadow: 0 0 0 1px var(--card); cursor: pointer; z-index: 1; }
.zr-termin strong { font-weight: 700; hyphens: auto; overflow-wrap: anywhere; }
/* 0.41.0 (R3): In der Woche (Spalten ~40 px) zerlegte die Silbentrennung „Elternabend“ in „El-tern-abe-nd“. Dort
   bricht der Titel nur zwischen Wörtern um; was nicht passt, wird abgeschnitten – antippen zeigt den ganzen Titel. */
.woche .zr-termin strong { hyphens: manual; overflow-wrap: normal; max-width: 100%; overflow: hidden; }
.zr-chip.zr-mehrere { text-align: center; font-size: .8rem; background: var(--blue-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.zr-termin.stunde { background: color-mix(in srgb, var(--p, var(--blue)) 16%, var(--card)); color: var(--ink); border-left: 3px solid var(--p, var(--blue)); border-radius: 3px 5px 5px 3px; }
.zr-termin.kurz { flex-direction: row; gap: 4px; white-space: nowrap; }
.tagesansicht .zr-termin { font-size: .85rem; padding: 4px 8px; }
.tagesansicht .zr-termin.kurz { align-items: center; padding-top: 0; padding-bottom: 0; }
.zr-zeit { font-variant-numeric: tabular-nums; opacity: .9; }
.zr-sub { opacity: .9; }
.zr-jetzt { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.zr-jetzt::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.zr-leer { margin: 8px 0; }

/* ---- 0.25.0: Grundbausteine für Theo 2.0 (bausteine.js, ADR-51) --------------------------------------------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  background: var(--p, var(--blue)); color: var(--on-blue); font-weight: 700; line-height: 1; }
.avatar-s { width: 28px; height: 28px; font-size: .8rem; }
.avatar-m { width: 36px; height: 36px; font-size: .95rem; }
.avatar-l { width: 44px; height: 44px; font-size: 1.05rem; }
.avatar-gruppe { display: inline-flex; flex: none; }
.avatar-gruppe .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }
.seitenkopf { display: grid; gap: var(--space-1); margin: var(--space-1) 0 var(--space-5); }
.seitenkopf .ueber { margin: 0; color: var(--muted); font-size: .95rem; }
.seitenkopf h1 { margin: 0; font-size: var(--text-titel); }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-2); }
.abschnitt-kopf h2 { margin: 0; font-size: var(--text-abschnitt); }
.abschnitt-link { min-height: 44px; padding: 0 var(--space-1); border: 0; background: none; color: var(--blue); font: 600 .95rem var(--font); cursor: pointer; }
.abschnitt-link:hover { text-decoration: underline; }
.abschnitt-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: var(--radius-s); }
.status { display: inline-block; flex: none; font-size: var(--text-klein); font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.status-neutral { background: var(--blue-soft); color: var(--ink); }
.status-warn { background: var(--marker); color: var(--on-marker); }
.status-bad { background: var(--bad); color: var(--card); }
.status-ok { background: transparent; color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok); }
.leer { display: grid; justify-items: start; gap: var(--space-2); padding: var(--space-2) 0; color: var(--muted); }
.leer p { margin: 0; }

/* Profilkreis oben rechts (0.25.0): Hell/Dunkel, Einstellungen, Familie, Hilfe, Rückmeldung */
.top .rechts { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.top .family { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-knopf { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: -2px -2px -2px 0;
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.profil-knopf:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.profil-kopf { display: flex; align-items: center; gap: var(--space-3); }
.profil-kopf .wer { display: grid; }
#profil-fenster .schnell-darstellung { margin: var(--space-2) 0 var(--space-3); }

/* Neuer Start (0.25.0) */
.start-abschnitt { margin-bottom: var(--space-4); }
.start-abschnitt > .card { margin-bottom: 0; }
.start-abschnitt .unter-kopf { margin: var(--space-3) 0 var(--space-1); font-size: 1rem; color: var(--muted); }
.zeilen.due li.mehr-zeile[hidden] { display: none; }
.familie-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.familie-kachel { display: grid; gap: 2px; align-content: start; min-height: 72px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.familie-kachel strong { font-size: 1.02rem; }
.familie-kachel:hover { border-color: var(--line-strong); }
.familie-kachel:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.familie-kachel.notfall-kachel { grid-column: 1 / -1; }
/* 0.25.0: Statuswort nur so breit wie sein Text; bei 320px kein Umbruch im Schriftzug – der Familienname steht dann im Profilfenster */
.zeile .was > .status { justify-self: start; margin-bottom: 2px; }
.top .brand { white-space: nowrap; }
@media (max-width: 359px) { .top .family { display: none; } }

/* 0.26.0: „Neu“ in der Mitte der Leiste – blauer Kreis statt schwebendem Plus-Knopf je Bereich. Kein transform an
   Vorfahren der Leiste (Lehre 09.11.: sonst steht ein fixes Element mitten in der Seite). */
.bottom-nav .nav-neu { color: var(--ink); }
.nav-neu-kreis { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 32px; border-radius: var(--radius-pill);
  background: var(--blue); color: var(--on-blue); }
.bottom-nav .nav-neu-kreis svg { width: 22px; height: 22px; stroke-width: 2.4; }
.bottom-nav .nav-neu:active .nav-neu-kreis { filter: brightness(.92); }
@media (min-width: 760px) {
  .bottom-nav .nav-neu { flex-direction: row; gap: 6px; }
  .nav-neu-kreis { width: 32px; height: 28px; }
}
/* Übersicht Familie und Umschalter Dokumente | Verträge */
.familie-kopf { margin-bottom: var(--space-4); }
#dok-bereich { margin: 0 0 var(--space-3); }

/* ---- 0.28.0: Familie im Aussehen von Theo 2.0 --------------------------------------------------------------- */
/* Nur für Screenreader (Text bleibt im Namen eines Knopfs, ist aber nicht zu sehen) */
.nur-vorlesen { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mitglieder-leiste { display: flex; align-items: flex-start; gap: var(--space-2); overflow-x: auto; margin: 0 calc(-1 * var(--space-1)) var(--space-4); padding: var(--space-1);
  scrollbar-width: none; }
.mitglieder-leiste::-webkit-scrollbar { display: none; }
.mitglieder-knopf { display: flex; flex: none; gap: var(--space-2); padding: var(--space-1); border: 0; border-radius: var(--radius-m); background: none;
  color: var(--ink); font: inherit; cursor: pointer; }
.mitglieder-knopf:hover { background: var(--card); }
.mitglieder-knopf:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mitglieder-knopf .person { display: grid; justify-items: center; gap: var(--space-1); width: 64px; }
.mitglieder-knopf .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-klein); font-weight: 600; }
.mitglieder-knopf.einladen .name { color: var(--blue); }
.plus-kreis { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.plus-kreis svg { width: 20px; height: 20px; }
.familie-kachel.notfall-kachel { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; }
.notfall-kachel .symbol { flex: none; width: 40px; height: 40px; border-radius: var(--radius-m); background: var(--blue-soft); color: var(--bad);
  display: flex; align-items: center; justify-content: center; }
.notfall-kachel .symbol svg { width: 22px; height: 22px; }
.notfall-kachel .was { flex: 1; min-width: 0; display: grid; gap: 2px; }
.notfall-kachel > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.abschnitt-zahl { color: var(--muted); font-size: var(--text-klein); font-weight: 600; }
.abschnitt-kopf.mit-umschalter { align-items: center; }
.abschnitt-kopf .umschalter { margin: 0; width: auto; }
.abschnitt-link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.abschnitt-text { margin: 0 0 var(--space-3); }
.hint.klein { font-size: var(--text-klein); margin-bottom: 0; }
.item-sub.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); }
.item-sub.meta .status { margin: 1px 0; }
li.haken .zeile .avatar { margin-left: var(--space-1); }
.zeilen > li.gruppe-mehr { padding: 0 0 var(--space-1) 54px; border-top: 0; }
.zeilen > li.mehr-zeile[hidden] { display: none; }
.zeilen > li.empty .leer { padding: var(--space-1) 0; }
.zeilen.joins { display: block; margin: 0; }
.zeilen.joins > li { display: grid; gap: var(--space-2); border: 0; border-radius: 0; padding: var(--space-3) 2px; }
.zeilen.joins > li + li { border-top: 1px solid var(--line); }
.zeilen.joins > li.bad { box-shadow: inset 4px 0 0 var(--bad); padding-left: var(--space-3); }
#mitglieder .btn.breit { margin-top: var(--space-3); }

/* ---- 0.29.0: Einrichtung und Sicherheit ------------------------------------------------------------------ */
.schritt { margin: 0; color: var(--muted); font-size: var(--text-klein); font-weight: 600; letter-spacing: .02em; }
.rk-probe { display: grid; grid-template-columns: auto minmax(0, 7rem); align-items: center; gap: var(--space-2) var(--space-3); }
.rk-probe label { margin: 0; }
.rk-probe input { font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.sicherheit-stand > li.stand-zeile { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 2px; }
.sicherheit-stand .was { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sicherheit-stand strong { hyphens: auto; overflow-wrap: break-word; }
.sicherheit-stand .status { flex: none; margin-top: 2px; }
.rk-pruefen { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.rk-pruefen .unter-kopf { margin: 0; }
/* Offline (0.29.0): oben, über dem Inhalt, nicht über der Leiste; hebt sich ab, ohne zu erschrecken */
.offline-hinweis { position: fixed; top: 0; left: 0; right: 0; z-index: 60; margin: 0;
  padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-2);
  background: var(--marker); color: var(--on-marker); font-weight: 600; font-size: var(--text-klein); text-align: center; }
.offline-hinweis[hidden] { display: none; }
.vis-vorschau { margin: calc(-1 * var(--space-1)) 0 var(--space-2); }

/* ---- 0.30.0: Dokumente – Ordnen und Finden (ADR-52) ------------------------------------------------------- */
.such-feld input[type=search] { width: 100%; min-height: 48px; font-size: 1.05rem; margin: var(--space-3) 0 var(--space-2); }
.filter-chips { display: flex; flex-wrap: nowrap; gap: var(--space-2); overflow-x: auto; padding: 2px 2px var(--space-1);
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips.umbruch { flex-wrap: wrap; overflow: visible; }
.filter-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; box-sizing: border-box;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--card); color: var(--ink);
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.filter-chip svg { width: 16px; height: 16px; flex: none; }
.filter-chip.auf svg { transform: rotate(90deg); color: var(--muted); }
.filter-chip.an { background: var(--blue-soft); border-color: var(--blue); }
.filter-chip:focus-visible, .ansicht-knopf:focus-visible, .angabe:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.filter-chip .anzahl { background: var(--marker); color: var(--on-marker); border-radius: var(--radius-pill); padding: 0 7px; font-size: .8rem; line-height: 1.6; }
.dok-leiste { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: var(--space-2) 0; }
.dok-zahl { margin: 0; color: var(--muted); font-size: var(--text-klein); font-weight: 600; }
.ansicht-wahl { display: flex; gap: var(--space-1); }
.ansicht-knopf { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-m);
  background: transparent; color: var(--muted); cursor: pointer; }
.ansicht-knopf svg { width: 22px; height: 22px; }
.ansicht-knopf[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.dok-liste { list-style: none; margin: 0; padding: 0; }
.dok-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 640px) { .dok-kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .dok-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dok-kacheln > li { min-width: 0; }
.dok-kacheln > li.empty { grid-column: 1 / -1; padding: 12px 4px; color: var(--muted); }
.zeile.dok-kachel { height: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.zeile.dok-kachel:hover { border-color: var(--line-strong); background: var(--card); }
.zeile.dok-kachel .was { padding: var(--space-2) 10px var(--space-3); }
.zeile.dok-kachel .item-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .98rem; line-height: 1.3; }
.zeile.dok-kachel .item-sub { font-size: .82rem; }
.dok-bild { flex: none; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--paper); color: var(--muted); }
.dok-kachel .dok-bild { width: 100%; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.dok-zeile .dok-bild { width: 44px; height: 56px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); }
.dok-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; background: #FFFFFF; }
.dok-platzhalter { display: grid; justify-items: center; gap: 2px; font-size: .75rem; font-weight: 600; }
.dok-platzhalter svg { width: 26px; height: 26px; }
.dok-zeile .dok-platzhalter span { display: none; }
/* 0.44 (R12): Textanfang statt Symbol, wenn es kein Vorschaubild gibt – wie ein Stück Papier */
.dok-textanfang { display: none; }
.dok-kachel .dok-bild.mit-text { align-items: stretch; justify-content: stretch; background: #FFFFFF; color: #3A3A3A; }
.dok-kachel .dok-bild.mit-text .dok-platzhalter { display: none; }
.dok-kachel .dok-textanfang { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden;
  width: 100%; padding: 8px 10px; font-size: .68rem; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.dok-zeile .dok-platzhalter svg { width: 20px; height: 20px; }
.dok-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.treffer { display: block; margin-top: 2px; color: var(--ink); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.treffer-wo { color: var(--muted); font-weight: 600; }
mark { background: var(--marker); color: var(--on-marker); border-radius: 3px; padding: 0 2px; }
#dok-mehr { margin-top: var(--space-3); }
#dok-mehr[hidden] { display: none; }
.dok-nachholen:empty { display: none; }
.dok-nachholen { margin-top: var(--space-3); }
/* Dokument-Fenster */
.doc-kopf { display: flex; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-3); }
.dok-bild.gross { width: 132px; aspect-ratio: 3 / 4; border-radius: var(--radius-m); border: 1px solid var(--line-strong); }
.dok-bild.gross img { object-fit: contain; }
.dok-bild.gross:not(.mit-bild) { width: 88px; }   /* ohne Bild kein großer leerer Kasten */
.doc-kopf-text { display: grid; gap: var(--space-2); justify-items: start; min-width: 0; }
.doc-faellig { display: grid; gap: var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); }
.doc-faellig-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; font-weight: 700; }
.doc-faellig-knoepfe { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.doc-faellig .giro-box:empty { display: none; }
.angaben { display: grid; margin-bottom: var(--space-3); }
.angabe { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 52px; padding: var(--space-2) 2px; box-sizing: border-box;
  border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
button.angabe { cursor: pointer; }
button.angabe:hover { background: var(--paper); }
.angabe + .angabe { border-top: 1px solid var(--line); }
.angaben-mehr { margin: 4px 0 0; }   /* 0.41.0 (R7): leere Angaben gebündelt */
.angaben-mehr .angabe + .angabe { border-top: 1px solid var(--line); }
.angabe .lab { flex: none; width: 6.5rem; color: var(--muted); font-size: .95rem; }
.angabe .wert { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.angabe .wert.leer { color: var(--muted); font-weight: 400; }
button.angabe .wert.leer { color: var(--blue); font-weight: 600; }
.angabe .wert.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.angabe > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.item-sub.block { display: block; margin-top: 4px; }
.zeilen.auswahl { margin: 0 0 var(--space-2); }

/* ---- 0.30.1: Papierkorb, Mehrfachauswahl, Eingang (ADR-54) ----------------------------------------------- */
.dok-fuss { display: flex; justify-content: flex-end; margin-top: var(--space-2); }
.dok-korb { display: inline-flex; align-items: center; gap: 6px; }
.dok-korb[hidden] { display: none; }
.dok-korb svg { width: 18px; height: 18px; }
.korb-zeile { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.korb-zeile + .korb-zeile { border-top: 1px solid var(--line); }
.korb-zeile .dok-bild { width: 44px; height: 56px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); }
.korb-zeile .dok-platzhalter span { display: none; }
.korb-zeile .was { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
#papierkorb-leeren[hidden] { display: none; }
/* Mehrfachauswahl */
.auswahl-kopf { display: flex; align-items: center; gap: var(--space-2); width: 100%; background: var(--blue-soft); border-radius: var(--radius-m); padding: 2px 6px 2px 2px; }
.auswahl-kopf .auswahl-zahl { flex: 1; font-size: 1.05rem; }
.dok-liste.waehlen .zeile { position: relative; }
.auswahl-haken { position: absolute; top: 8px; left: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 8px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 2px solid var(--line-strong); color: var(--on-blue); }
.auswahl-haken svg { width: 18px; height: 18px; stroke-width: 3; }
.zeile.gewaehlt .auswahl-haken { background: var(--blue); border-color: var(--blue); }
.zeile.gewaehlt { box-shadow: inset 0 0 0 3px var(--blue); }
.dok-zeile .auswahl-haken { position: static; flex: none; }
.auswahl-aktionen { position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 14; display: flex; justify-content: space-around;
  gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px -12px rgba(22, 33, 58, .45); }
.auswahl-aktionen[hidden] { display: none; }
.auswahl-aktion { flex: 1 1 0; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: var(--radius-m); background: none; color: var(--blue); font: 600 .8rem var(--font); cursor: pointer; }
.auswahl-aktion svg { width: 22px; height: 22px; }
.auswahl-aktion.gefahr { color: var(--bad); }
.auswahl-aktion:disabled { color: var(--muted); opacity: .55; cursor: default; }
.auswahl-aktion:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.dok-liste.waehlen { padding-bottom: 76px; }
@media (min-width: 760px) { .auswahl-aktionen { bottom: 16px; max-width: 560px; margin: 0 auto; } }
/* Eingang */
.eingang-box:empty { display: none; }
.eingang-hinweis { display: flex; align-items: center; gap: var(--space-3); width: 100%; margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 0; border-radius: var(--radius); background: var(--blue-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.eingang-hinweis > svg { flex: none; width: 24px; height: 24px; }
.eingang-hinweis .was { flex: 1; min-width: 0; display: grid; gap: 2px; }
.eingang-hinweis .item-sub { color: var(--ink); }
.eingang-hinweis:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.eingang-kopf { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.eingang-kopf .ueber { margin: 0; font-weight: 700; color: var(--muted); }
.schritte-balken { display: flex; gap: 6px; }
.schritte-balken span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.schritte-balken span.an { background: var(--blue); }
.eingang-titel { font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.eingang label .chip { margin-left: 6px; vertical-align: middle; }
.eingang .angabe { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: var(--space-2) 0; }
.lern-karte { display: grid; gap: var(--space-3); background: var(--blue-soft); border-radius: var(--radius); padding: var(--space-4); }
.lern-karte p { margin: 0; }
.lern-kopf { display: flex; align-items: center; gap: var(--space-2); }
.lern-kopf svg { width: 22px; height: 22px; color: var(--ok); stroke-width: 3; flex: none; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip.pruefen { background: var(--marker); color: var(--on-marker); border-color: transparent; font-weight: 700; }

/* ---- 0.31.0: Erfassen – Seiten und Stapel ---------------------------------------------------------------- */
.seiten, .stapel { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.seiten[hidden], .stapel[hidden] { display: none; }
.seiten-kopf { margin: 0; }
.seiten-liste { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: 4px; }
.seiten-liste li { position: relative; flex: none; display: grid; justify-items: center; gap: 2px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.seiten-liste img { width: 64px; height: 84px; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid var(--line-strong); background: #FFFFFF; }
.seite-weg { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); cursor: pointer; padding: 0; }
.seite-weg svg { width: 14px; height: 14px; }
.seite-weg::after { content: ''; position: absolute; inset: -8px; }   /* Tippfläche 44 px */
#seite-dazu { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
#seite-dazu svg { width: 18px; height: 18px; }
.stapel-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 200px; overflow-y: auto; }
.stapel-liste li { display: flex; justify-content: space-between; gap: var(--space-2); font-size: .92rem; }
.stapel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stapel .umschalter[hidden] { display: none; }
.stapel-kopf { font-weight: 700; }

/* ---- 0.31.1: Regeln, gemerkte Absender, fast gleiche Dokumente --------------------------------------------- */
.regel-zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) 0; }
.regel-zeile .was { display: grid; gap: 2px; min-width: 0; }
.regel-zeile .item-title, .regel-zeile .item-sub { overflow-wrap: anywhere; }
.regel-zeile .chip { margin-top: 2px; }
.regel-zeile .btn { flex: none; }
.regel-neu { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2) var(--space-3); margin: var(--space-3) 0; }
.regel-neu summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.regel-form { margin-top: var(--space-2); }
.pruef-doppelt { display: grid; gap: var(--space-2); }
.pruef-doppelt p { margin: 0; }
.dok-fuss { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }

/* ---- 0.32.0: Papier – Ordner, Etiketten, Codes, Ansichten, ähnliche Dokumente ----------------------------------- */
.filter-zeile { display: flex; gap: var(--space-2); align-items: flex-start; }
.filter-zeile > .filter-chips { flex: 1; min-width: 0; }
.filter-zeile > .filter-chip { margin-top: 2px; }
.regel-neu summary svg { width: 20px; height: 20px; flex: none; margin-right: 6px; }
.code-treffer { list-style: none; padding: var(--space-2) 0; }
.aehnliche h3 { margin: var(--space-4) 0 var(--space-2); font-size: 1rem; }
.aktionen-zeile { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.aktionen-zeile select { width: auto; min-width: 88px; }
.code-kamera { width: 100%; max-height: 50vh; border-radius: var(--radius); background: #000; object-fit: cover; }
/* Etiketten: echte Maße, auf dem Bildschirm verkleinert gezeigt; immer Schwarz auf Weiß (auch im Dunkelmodus) */
.etikett-vorschau { display: flex; justify-content: center; padding: var(--space-3); background: var(--paper); border-radius: var(--radius); overflow-x: auto; }
.etikett { box-sizing: border-box; display: flex; gap: 2.5mm; align-items: center; background: #fff; color: #000;
  border: 0.3mm dashed #888; padding: 2mm; font-family: var(--font); }
.etikett-ordner { width: 90mm; height: 38mm; }
.etikett-asn { width: 60mm; height: 25mm; }
.etikett-qr svg { display: block; }
.etikett-ordner .etikett-qr svg { width: 32mm; height: 32mm; }
.etikett-asn .etikett-qr svg { width: 20mm; height: 20mm; }
.etikett-text { display: flex; flex-direction: column; gap: 0.8mm; min-width: 0; flex: 1; }
.etikett-code { font-size: 5.5mm; line-height: 1; letter-spacing: .02em; }
.etikett-asn .etikett-code { font-size: 4mm; }
.etikett-name { font-size: 3.6mm; font-weight: 600; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.etikett-ort { font-size: 2.8mm; line-height: 1.1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.etikett .strichcode { width: 100%; height: 8mm; margin-top: auto; }
.etikett-asn .strichcode { height: 7mm; }
@media print {
  body.druck-etikett > :not(#druck) { display: none !important; }
  body.druck-etikett #druck { display: flex; flex-wrap: wrap; gap: 4mm; }
  .druck-etiketten .etikett { border: 0.2mm solid #ccc; break-inside: avoid; }
}

/* ---- 0.32.1: Teilen – Freigabelinks, Fassungen ------------------------------------------------------------------ */
.feld-titel { font-weight: 600; margin: var(--space-3) 0 var(--space-1); }
.freigabe-neu { display: grid; gap: var(--space-2); }
.freigabe-neu p { margin: 0; }
.freigabe-neu input { width: 100%; font-family: var(--mono); font-size: .85rem; }
#doc-fassungen .chip { flex: none; }
.freigabe-seite { max-width: 34rem; margin: 0 auto; padding: var(--space-4); display: grid; gap: var(--space-4); }
.freigabe-seite .marke { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; }
.freigabe-seite .marke img { width: 32px; height: 32px; }
.freigabe-seite .vorschau-bild { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
#doc-fassungen .regel-zeile { flex-wrap: wrap; }
#doc-fassungen .regel-zeile .was { flex: 1 1 60%; min-width: 11rem; }

/* ---- 0.33.0: Alltag schneller – Schnelleingabe, Monat an der Wand ---------------------------------------------- */
.schnell { display: grid; gap: var(--space-1); margin-bottom: var(--space-4); }
.schnell label { font-weight: 600; }
.schnell .hint { margin: 0; }
#wall-monat-tag { margin-top: var(--space-3); }
#wall-monat-tag h3 { margin: 0 0 var(--space-2); }
.schnell .add-row { display: flex; gap: var(--space-2); align-items: center; }

/* ---- 0.34.0: Einfache Ansicht (Kinderprofile) – größere Schrift und Knöpfe, nur auf diesem Gerät ---------------- */
html.einfach { font-size: 112.5%; }
html.einfach .familie-kachel, html.einfach .kachel { min-height: 88px; }

/* ---- 0.35.0: PDF-Werkzeuge – Seiten als Zeilen mit Bild, Knöpfe brechen auf 320 px unter den Text ---------------- */
.pdf-seiten { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.pdf-seite { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.pdf-seite .blatt { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; overflow: hidden; background: var(--paper); border-radius: 6px; }
.pdf-seite .blatt img { max-width: 72px; max-height: 72px; transition: transform .2s; }
.pdf-seite .blatt img.dreh-90 { transform: rotate(90deg); }
.pdf-seite .blatt img.dreh-180 { transform: rotate(180deg); }
.pdf-seite .blatt img.dreh-270 { transform: rotate(270deg); }
.pdf-seite .was { flex: 1 1 120px; display: grid; }
.pdf-seite .seite-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.pdf-seite .seite-knoepfe .btn { min-width: 44px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* ---- 0.36.0: Eigene Lebenslagen – kompakte, nummerierte Punkte; Hinweis nur auf Wunsch ------------------------------ */
.le-punkte { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; counter-reset: le; }
.le-punkt { counter-increment: le; display: grid; grid-template-columns: 1.4em minmax(0, 1fr); column-gap: 6px; row-gap: 6px;
  align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.le-punkt::before { content: counter(le) "."; grid-row: 1; grid-column: 1; color: var(--muted); font-weight: 600; text-align: right; }
.le-punkt > .le-was, .le-punkt > .le-wann, .le-punkt > .le-hinweis { grid-column: 2; }
.le-was { display: flex; gap: 4px; align-items: center; }
.le-was .le-text { flex: 1 1 auto; }
.le-was .le-weg { flex: none; display: inline-flex; align-items: center; justify-content: center; border-color: transparent; background: none; color: var(--muted); }
.le-was .le-weg:hover { color: var(--bad); }
.le-weg svg { width: 20px; height: 20px; }
.le-wann { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.le-wann .le-tage { width: 3.8em; flex: none; padding-left: 10px; padding-right: 4px; }
.le-wann .le-richtung { width: auto; flex: none; padding-left: 10px; padding-right: 6px; }
.le-wann .le-hinweis-knopf { margin-left: auto; padding: 0 4px; }
.le-dazu { display: inline-flex; align-items: center; gap: 6px; justify-self: start; }
.le-dazu svg { width: 18px; height: 18px; flex: none; }

/* ---- 0.39.0: Zugriffsprotokoll – Name und Zeitpunkt in einer Zeile, umbrechend ------------------------------------ */
.zeilen.zugriffe > li { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; padding: 6px 0; }
.doc-kopf-text #doc-zugriff-hinweis { margin: 6px 0 0; }
.zeilen.zugriffe > li > button { flex: 1 1 100%; }

/* 0.45: Aufgaben-Priorität – „Wichtig“ mit Textmarker-Strich, „Kann warten“ leiser */
li.haken.prio-hoch .zeile { box-shadow: inset 3px 0 0 var(--marker); }
li.haken.prio-hoch .item-sub:first-of-type { font-weight: 600; }
li.haken.prio-niedrig strong { color: var(--muted); font-weight: 500; }

/* 0.45: Emoji je Person */
.avatar.emoji { font-size: 1.15em; line-height: 1; }
.emojiwahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.emoji-wahl { min-width: 44px; min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 1.35rem; line-height: 1; cursor: pointer; }
.emoji-wahl#emoji-keins { font-size: .9rem; font-weight: 700; }
.emoji-wahl[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.emoji-wahl:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }

/* 0.46: Familienbereiche (Essen, Pinnwand, Schule, Punkte, Urlaub, Wiki) */
.symbol.emoji-symbol { font-size: 1.3rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.wochen-navi { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.wochen-navi .item-sub { text-align: center; flex: 1; }
.wochenplan { display: grid; gap: 10px; }
.essen-tag.heute { box-shadow: inset 3px 0 0 var(--blue); }
.zeile.leise { color: var(--muted); font-weight: 500; justify-content: flex-start; }
.pinnwand { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.zettel { display: block; width: 100%; text-align: left; background: color-mix(in srgb, var(--marker) 22%, var(--card)); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; font: inherit; }
.zettel.fest { border-color: var(--marker); box-shadow: 0 0 0 2px color-mix(in srgb, var(--marker) 60%, transparent); }
.zettel:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.zettel-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.zettel-text, .wiki-text { white-space: pre-wrap; overflow-wrap: anywhere; display: block; }
.noten-tabelle { width: 100%; border-collapse: collapse; margin: 8px 0; }
.noten-tabelle th, .noten-tabelle td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.noten-tabelle td { font-variant-numeric: tabular-nums; }
.punkte-konto { display: grid; gap: 8px; }
.punkte-kopf { display: flex; align-items: center; gap: 12px; }
.punkte-kopf .big { margin: 0; }
.punkte-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.wer-faehrt { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.haken-liste { list-style: none; padding: 0; margin: 0; }
.haken-liste li { padding: 4px 0; }
li.vorbei { opacity: .7; }
#wiki-suche { width: 100%; margin: 8px 0; }

/* ---- 0.47: Desktop-Ansicht ab 960 px (Abgleich Archivar: „am PC verschenkt Theo Platz“) -----------------------
   Leiste als Seitenleiste links, Inhalt breiter, Fenster als Spalte am rechten Rand statt in der Mitte – die Seite
   dahinter bleibt sichtbar (Brief sortieren, Steuer). Nur für die App selbst (#app mit Leiste), nicht für die Wand. */
@media (min-width: 960px) {
  #app:has(> .bottom-nav) {
    max-width: 1280px; padding: 0 24px 32px; display: grid; column-gap: 40px; align-items: start;
    grid-template-columns: 232px minmax(0, 1fr); grid-template-areas: "top top" "banner banner" "nav main";
  }
  #app:has(> .bottom-nav) > .top { grid-area: top; }
  #app:has(> .bottom-nav) > .banner { grid-area: banner; }
  #app:has(> .bottom-nav) > main { grid-area: main; min-width: 0; }
  #app > .bottom-nav {
    grid-area: nav; position: sticky; top: 16px; flex-direction: column; align-items: stretch; gap: 4px; margin: 0;
    padding: 10px; border: 1px solid var(--line); border-radius: var(--radius);
  }
  #app > .bottom-nav button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 10px 14px;
    border-radius: 12px; font-size: .95rem; }
  #app > .bottom-nav button:hover { background: var(--paper); color: var(--ink); }
  #app > .bottom-nav button[aria-current="page"] { background: var(--blue-soft); }
  #app > .bottom-nav button[aria-current="page"] span { text-decoration: none; }
  /* „Neu eintragen“ oben als Hauptknopf */
  #app > .bottom-nav .nav-neu { order: -1; margin-bottom: 8px; background: var(--blue); color: var(--on-blue); justify-content: center; }
  #app > .bottom-nav .nav-neu:hover { background: var(--blue); color: var(--on-blue); filter: brightness(1.08); }
  #app > .bottom-nav .nav-neu .nav-neu-kreis { background: transparent; width: auto; height: auto; }
  html { scroll-padding-top: 16px; }
  /* Listen nutzen die Breite: Übersichten zweispaltig, Zeilen bleiben einspaltig lesbar */
  #main .wochenplan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #main .pinnwand { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Fenster als Spalte rechts, volle Höhe; Dokument-Fenster breiter (Vorschau) */
  dialog.sheet { background: rgba(14, 21, 37, .28); }
  dialog.sheet[open] { align-items: stretch; justify-content: flex-end; }
  .sheet-panel { max-width: 520px; height: 100%; max-height: 100%; border-radius: var(--radius) 0 0 var(--radius); padding: 16px 28px 32px; }
  dialog#dokument .sheet-panel, dialog#ablegen-fenster .sheet-panel { max-width: min(760px, 60vw); }
  dialog.sheet.offen .sheet-panel { animation: reinRechts var(--t-mittel) var(--kurve) both; }
  dialog.sheet.schliesst .sheet-panel { animation: rausRechts var(--t-kurz) var(--kurve-raus) both; }
  /* Rückfragen („Wirklich löschen?“) bleiben klein in der Mitte */
  dialog#frage[open] { align-items: center; justify-content: center; }
  dialog#frage .sheet-panel { height: auto; max-height: calc(100% - 64px); border-radius: var(--radius); max-width: 480px; }
  dialog#frage.offen .sheet-panel { animation: auftauchen var(--t-mittel) var(--kurve) both; }
  .toast { left: auto; right: 24px; margin: 0; }
}
@keyframes reinRechts { from { transform: translateX(100%); } }
@keyframes rausRechts { to { transform: translateX(100%); } }

/* ---- 0.48: Kleine Feste – Silvester-Countdown, Feuerwerk, Adventskranz ------------------------------------ */
.silvester-karte { text-align: center; background: linear-gradient(135deg, #1B2550, #3A1D5C); color: #fff; border-color: transparent; }
.silvester-karte .item-sub { color: rgba(255, 255, 255, .85); }
.countdown { margin: 4px 0; font: 800 clamp(2.4rem, 12vw, 3.6rem)/1.1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.silvester.letzte-minute .countdown { color: #FFD54A; }
.fest-buehne { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .35s ease; }
.fest-buehne.an { opacity: 1; }
.fest-buehne.weg { opacity: 0; }
.fest-neujahr { background: radial-gradient(ellipse at 50% 30%, #1E2A5A 0%, #0B1030 60%, #05071A 100%); }
.fest-advent { background: radial-gradient(ellipse at 50% 55%, #3B2414 0%, #1A1020 65%, #0D0A14 100%); }
.fest-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fest-text { position: relative; text-align: center; color: #fff; padding: 0 24px; margin-bottom: 40vh; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); pointer-events: none; }
.fest-advent .fest-text { margin-bottom: 52vh; }
.fest-titel { margin: 0; font: 800 clamp(2.6rem, 14vw, 5.5rem)/1 var(--font); }
.fest-unter { margin: 8px 0 0; font: 600 clamp(1.1rem, 4.5vw, 1.6rem)/1.3 var(--font); }
.fest-weiter { position: absolute; bottom: calc(32px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.fest-weiter:focus-visible { outline: 3px solid #FFD54A; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fest-buehne { transition: none; } }
