/* beidseits – Prototyp. Grundwerte in tokens.css (design/system/tokens.css). */
*, *::before, *::after { box-sizing: border-box; }
/* Seitenebene scrollt nie seitwärts (Vorgabe); clip statt hidden, damit sticky funktioniert */
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--schrift); font-size: var(--t-m); line-height: var(--zeile);
  overflow-wrap: break-word; hyphens: auto;
}
h1, h2, h3, h4 { line-height: var(--zeile-eng); margin: 0 0 var(--r3); font-weight: 700; hyphens: manual; }
h1 { font-size: var(--t-display); letter-spacing: -0.015em; max-width: 24ch; }
h2 { font-size: var(--t-xl); letter-spacing: -0.01em; }
h3 { font-size: var(--t-l); }
p { margin: 0 0 var(--r4); max-width: 68ch; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono, time, .betrag { font-family: var(--schrift-mono); font-variant-numeric: tabular-nums; }
.leise { color: var(--tinte-2); }
.klein { font-size: var(--t-s); }
svg.ik { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Rahmen ---------- */
.sprung { position: absolute; left: var(--r3); top: -10rem; z-index: 50; background: var(--aktion); color: var(--aktion-text); padding: var(--r3) var(--r4); border-radius: var(--rund); font-weight: 700; }
.sprung:focus { top: var(--r3); }
.prototyp-hinweis { background: var(--flaeche-2); color: var(--tinte-2); font-size: var(--t-s); padding: var(--r2) var(--r4); border-bottom: 1px solid var(--linie); }
@media (max-width: 40em) { .prototyp-hinweis .nur-breit-text { display: none; } }
.prototyp-hinweis a { color: var(--tinte); display: inline-block; padding: 0.125rem 0; min-height: 1.5rem; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--r3) var(--r5); padding: var(--r3) var(--r4); border-bottom: 1px solid var(--linie); background: var(--papier); }
.marke-wort { display: inline-flex; align-items: center; gap: var(--r2); font-weight: 700; font-size: var(--t-l); letter-spacing: -0.02em; text-decoration: none; min-height: var(--ziel); }
.marke-wort svg { width: 1.75rem; height: 1.75rem; }
.kopf .familie { color: var(--tinte-2); font-size: var(--t-s); }
.perspektive { margin-left: auto; display: flex; align-items: center; gap: var(--r2); }
.perspektive label { font-size: var(--t-s); color: var(--tinte-2); white-space: nowrap; }
/* Schmale Breite: Kopf in drei kurzen Zeilen. Die Marke darf die Auswahl nicht
   auf eine eigene hohe Zeile drücken, sonst beginnt „Guten Tag“ bei 320×568
   und 150 % Schrift unter der festen Leiste. „Ansicht als“ bleibt sichtbar. */
@media (max-width: 40em) {
  .prototyp-hinweis { font-size: 13px; line-height: 1.3; padding: 6px 12px; }
  .kopf { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; row-gap: 2px; padding: 6px 12px; }
  .kopf .marke-wort { font-size: 17px; min-height: 44px; min-width: 0; }
  .kopf .marke-wort svg { width: 1.5rem; height: 1.5rem; }
  .kopf .familie { font-size: 13px; line-height: 1.25; }
  .perspektive { margin-left: 0; width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; }
  .perspektive label { white-space: nowrap; font-size: 13px; margin-bottom: 0; }
  .perspektive select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; font-size: 16px; }
  main { padding-top: 12px; padding-left: 12px; padding-right: 12px; }
  .kicker { font-size: 13px; line-height: 1.35; margin-bottom: 4px; }
}
.perspektive select { min-height: var(--ziel); }

main { display: block; padding: var(--r5) var(--r4) calc(var(--r8) + 4rem); container-type: inline-size; container-name: inhalt; }
main:focus { outline: none; }
/* Überschriften bekommen beim Seitenwechsel den Fokus (für Screenreader), sind aber kein Bedienelement */
h1[tabindex="-1"]:focus { outline: none; }
.seite { max-width: var(--spalte); margin: 0 auto; }
.seite--breit { max-width: var(--breit); }

/* Hauptnavigation: unten auf dem Handy, Seitenleiste ab 60em */
.hauptnav { position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--flaeche); border-top: 1px solid var(--linie-stark); }
.hauptnav ul { list-style: none; margin: 0; padding: 0 0 env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.hauptnav li.nur-breit { display: none; }
.hauptnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem; min-height: 3.5rem; padding: var(--r2) 0.125rem; text-decoration: none; font-size: min(var(--t-xs), 15px); hyphens: manual; position: relative; font-weight: 700; text-align: center; line-height: 1.15; color: var(--tinte-2); }
/* Untere Leiste: Beschriftung wächst bei 125/150 % nur bis 15 px, sonst zerfallen die Wörter auf fünf Spalten. Zähler sitzt am Symbol. */
.hauptnav a .zahl { position: absolute; top: 0.25rem; left: calc(50% + 0.5rem); }
.hauptnav a svg { width: 1.5rem; height: 1.5rem; }
.hauptnav a[aria-current="page"] { color: var(--tinte); background: var(--flaeche-2); box-shadow: inset 0 3px 0 var(--tinte); }
.hauptnav .zahl { display: inline-block; min-width: 1.25rem; padding: 0 0.3rem; border-radius: 1rem; background: var(--tinte); color: var(--flaeche); font-size: 0.75rem; line-height: 1.25rem; }

@media (min-width: 60em) {
  .shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: calc(100vh - 2.5rem); }
  .kopf { grid-column: 1 / -1; padding: var(--r3) var(--r5); }
  .hauptnav { position: sticky; top: 0; align-self: start; inset: auto; border-top: 0; border-right: 1px solid var(--linie); background: transparent; height: calc(100vh - 6rem); overflow-y: auto; }
  .hauptnav ul { grid-auto-flow: row; grid-auto-columns: auto; padding: var(--r4) var(--r3); gap: 2px; }
  .hauptnav li.nur-breit { display: block; }
  .hauptnav li.nur-schmal { display: none; }
  .hauptnav a { flex-direction: row; justify-content: flex-start; gap: var(--r3); min-height: var(--ziel); padding: var(--r2) var(--r3); font-size: var(--t-m); text-align: left; border-radius: var(--rund); color: var(--tinte); font-weight: 400; }
  .hauptnav a[aria-current="page"] { font-weight: 700; box-shadow: inset 3px 0 0 var(--tinte); }
  .hauptnav .trenner { border-top: 1px solid var(--linie); margin: var(--r3) var(--r3); }
  .hauptnav a .zahl { position: static; margin-left: var(--r2); }
  main { padding: var(--r6) var(--r6) var(--r8); }
}

/* ---------- Typografische Bausteine ---------- */
.kicker { hyphens: manual; font-family: var(--schrift-mono); font-size: var(--t-s); color: var(--tinte-2); margin: 0 0 var(--r2); letter-spacing: 0.01em; }
.lead { font-size: var(--t-l); max-width: 60ch; }
.abschnitt { margin-top: var(--r7); }
.abschnitt > h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--tinte); margin-bottom: var(--r3); }
.hinweis { border-left: 4px solid var(--linie-stark); background: var(--flaeche-2); padding: var(--r3) var(--r4); margin: var(--r4) 0; max-width: 68ch; }
.hinweis > :last-child { margin-bottom: 0; }
.hinweis--warnung { border-color: var(--warnung); background: var(--warnung-flaeche); }
.hinweis--erfolg { border-color: var(--erfolg); background: var(--erfolg-flaeche); }
.hinweis--fehler { border-color: var(--fehler); background: var(--fehler-flaeche); }
.hinweis--offen { border-color: var(--offen); background: var(--offen-flaeche); }
.hinweis strong:first-child { display: block; margin-bottom: var(--r1); }

/* Linierte Liste statt Kartenraster */
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.liste > li { padding: var(--r4) 0; border-bottom: 1px solid var(--linie); display: grid; gap: var(--r2) var(--r4); grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.liste > li > .rechts { justify-self: end; text-align: right; }
.liste .titel { font-weight: 700; display: block; }
.liste .meta { color: var(--tinte-2); font-size: var(--t-s); display: block; }
@container inhalt (max-width: 30rem) { .liste > li { grid-template-columns: minmax(0, 1fr); } .liste > li > .rechts { justify-self: start; text-align: left; } }
dl.fakten { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: var(--r2) var(--r4); margin: 0; }
dl.fakten dt { color: var(--tinte-2); }
dl.fakten dd { margin: 0; }
@container inhalt (max-width: 32rem) { dl.fakten { grid-template-columns: minmax(0, 1fr); } dl.fakten dd { margin-bottom: var(--r3); } }

/* ---------- Bedienelemente ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: var(--r2); min-height: var(--ziel); padding: var(--r2) var(--r5); border-radius: var(--rund); border: 2px solid var(--aktion); background: var(--aktion); color: var(--aktion-text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background var(--dauer); text-align: center; max-width: 100%; white-space: normal; }
.knopf:hover { background: var(--aktion-hover); border-color: var(--aktion-hover); }
.knopf--zweit { background: transparent; color: var(--tinte); border-color: var(--linie-stark); }
.knopf--zweit:hover { background: var(--flaeche-2); border-color: var(--tinte); }
.knopf--gefahr { background: transparent; color: var(--fehler); border-color: var(--fehler); }
.knopf--gefahr:hover { background: var(--fehler-flaeche); border-color: var(--fehler); }
.knopf--klein { min-height: var(--ziel); padding: var(--r1) var(--r3); font-size: var(--t-s); }
.knopf[disabled], .knopf[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.knoepfe { display: flex; flex-wrap: wrap; gap: var(--r3); margin: var(--r4) 0; align-items: center; }
.link-knopf { background: none; border: 0; padding: var(--r2) 0; min-height: var(--ziel); font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.umschalter { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 2px solid var(--linie-stark); border-radius: var(--rund); overflow: hidden; }
.umschalter a, .umschalter button { min-height: var(--ziel); display: inline-flex; align-items: center; padding: 0 var(--r4); text-decoration: none; background: transparent; border: 0; font: inherit; color: var(--tinte); cursor: pointer; }
.umschalter [aria-current="page"], .umschalter [aria-pressed="true"] { background: var(--aktion); color: var(--aktion-text); font-weight: 700; }

form .feld { margin: 0 0 var(--r5); max-width: 34rem; }
label, .label, legend { display: block; font-weight: 700; margin-bottom: var(--r1); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--r5); min-width: 0; }
.hilfe { display: block; color: var(--tinte-2); font-size: var(--t-s); margin: 0 0 var(--r2); font-weight: 400; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="time"], input[type="month"], input:not([type]), select, textarea {
  width: 100%; min-height: var(--ziel); padding: var(--r2) var(--r3); font: inherit; color: var(--tinte); background: var(--flaeche);
  border: 1.5px solid var(--linie-stark); border-radius: var(--rund);
}
textarea { min-height: 7rem; resize: vertical; line-height: var(--zeile); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--fehler); }
.fehlertext { color: var(--fehler); font-weight: 700; font-size: var(--t-s); margin: var(--r1) 0 0; display: flex; gap: var(--r2); align-items: flex-start; }
.wahl { display: flex; gap: var(--r3); align-items: flex-start; min-height: var(--ziel); padding: var(--r2) 0; font-weight: 400; cursor: pointer; }
.wahl input { width: 1.375rem; height: 1.375rem; margin: 0.125rem 0 0; flex: none; accent-color: var(--aktion); }
.wahl .hilfe { margin: 0; }
.schalter { display: inline-flex; align-items: center; gap: var(--r3); min-height: var(--ziel); background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.schalter .bahn { width: 2.75rem; height: 1.5rem; border-radius: 1rem; border: 2px solid var(--linie-stark); position: relative; flex: none; background: var(--flaeche); transition: background var(--dauer); }
.schalter .bahn::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--linie-stark); transition: transform var(--dauer); }
.schalter[aria-checked="true"] .bahn { background: var(--aktion); border-color: var(--aktion); }
.schalter[aria-checked="true"] .bahn::after { transform: translateX(1.25rem); background: var(--aktion-text); }

/* ---------- Elternfarben ---------- */
.p-a { --p: var(--a); --p-flaeche: var(--a-flaeche); --p-text: var(--a-text); --p-muster: var(--a-flaeche); }
.p-b { --p: var(--b); --p-flaeche: var(--b-flaeche); --p-text: var(--b-text); --p-muster: repeating-linear-gradient(135deg, var(--b-flaeche) 0 0.375rem, var(--b-streifen) 0.375rem 0.75rem); }
.p-p { --p: var(--siegel); --p-flaeche: var(--flaeche-2); --p-text: var(--tinte); --p-muster: var(--flaeche-2); }
.p-mitte { --p: var(--linie-stark); --p-flaeche: var(--flaeche-2); --p-text: var(--tinte); --p-muster: var(--flaeche-2); }
.muster { background: var(--p-muster); }
.farbfeld { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; border: 1.5px solid var(--p); background: var(--p-muster); vertical-align: -0.15em; }
.name-marke { display: inline-flex; align-items: center; gap: var(--r2); font-weight: 700; }
.legende { display: flex; flex-wrap: wrap; gap: var(--r2) var(--r5); font-size: var(--t-s); color: var(--tinte-2); margin: var(--r3) 0; padding: 0; list-style: none; }
.legende li { display: inline-flex; gap: var(--r2); align-items: center; }

/* Tagesbalken: Wer hat die Kinder zu welcher Tageszeit (Teile in %) */
.balken { display: flex; height: 2.25rem; border-radius: 3px; overflow: hidden; border: 1.5px solid var(--linie-stark); background: var(--flaeche); }
.balken .teil { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--t-xs); color: var(--p-text); background: var(--p-muster); min-width: 0; overflow: hidden; }
.balken .teil + .teil { border-left: 2px solid var(--tinte); }
.balken--leer { background: repeating-linear-gradient(90deg, var(--flaeche) 0 4px, var(--flaeche-2) 4px 8px); }

/* Wochenband auf „Heute“ */
.woche { list-style: none; margin: var(--r4) 0 var(--r2); padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--r3) 3px; }
.woche li { min-width: 0; }
.woche .tagkopf { display: block; font-size: var(--t-xs); color: var(--tinte-2); margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.kreuz { font-weight: 700; line-height: 1; color: var(--tinte); }
.woche .kreuz { display: block; font-size: 13px; margin-bottom: 0.1rem; }
.woche .heute .tagkopf { color: var(--tinte); font-weight: 700; }
.woche .heute .balken { outline: 3px solid var(--tinte); outline-offset: 1px; }
.woche .ferienzeichen { display: block; height: 3px; margin-bottom: 0.2rem; background: transparent; }
.woche .ferien .ferienzeichen { background: var(--tinte-2); }

/* Nächste Übergabe */
.uebergabe { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--r2) var(--r5); align-items: baseline; padding: var(--r5) 0; border-top: 3px solid var(--tinte); border-bottom: 1px solid var(--linie); }
.uebergabe .uhr { font-family: var(--schrift-mono); font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.uebergabe .was { font-size: var(--t-l); }
.uebergabe .knoepfe { grid-column: 1 / -1; margin-bottom: 0; }
@container inhalt (max-width: 26rem) { .uebergabe { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kalender ---------- */
.kal-kopf { display: flex; flex-wrap: wrap; gap: var(--r3); align-items: center; justify-content: space-between; margin-bottom: var(--r4); }
.kal-kopf h1 { margin: 0; font-size: var(--t-xxl); }
.monatsnav { display: flex; gap: var(--r2); }
.monat { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.monat caption { text-align: left; color: var(--tinte-2); font-size: var(--t-s); padding-bottom: var(--r2); }
.monat th { font-size: var(--t-xs); color: var(--tinte-2); font-weight: 700; text-align: left; padding: 0 0.125rem; }
.monat td { padding: 0; vertical-align: top; }
.monat td.aussen { visibility: hidden; }
.tag-knopf { display: flex; flex-direction: column; gap: 0.25rem; width: 100%; min-height: 4.25rem; padding: 0.25rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); font: inherit; color: inherit; text-align: left; cursor: pointer; contain: paint; }
.tag-knopf:hover { border-color: var(--linie-stark); }
.tag-knopf .nr { font-family: var(--schrift-mono); font-size: var(--t-s); font-weight: 700; display: flex; justify-content: space-between; gap: 2px; }
.tag-knopf .zeichen { display: flex; gap: 2px; font-size: 0.75rem; }
.tag-knopf .balken { height: 1.5rem; margin-top: auto; }
.tag-knopf.heute { border: 2px solid var(--tinte); }
.tag-knopf.ferien { border-top: 4px solid var(--tinte-2); }
.tag-knopf.anfrage .balken { outline: 2px dashed var(--offen); outline-offset: 2px; }
.tag-knopf.vorher { background: var(--flaeche-2); }
.punkt { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--tinte); }
.punkt--feiertag { background: transparent; border: 2px solid var(--tinte); }
.punkt--anfrage { background: var(--offen); border-radius: 1px; }
@container inhalt (max-width: 30rem) {
  .monat { border-spacing: 2px; }
  .tag-knopf { min-height: 3.5rem; padding: 0.125rem; }
  .tag-knopf .balken .teil { font-size: 0; }
}
.tagesliste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.tagesliste li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--r2) var(--r4); padding: var(--r3) 0; border-bottom: 1px solid var(--linie); }
.tagesliste li.heute { box-shadow: inset 4px 0 0 var(--tinte); padding-left: var(--r3); }
.tagesliste .datum { font-family: var(--schrift-mono); font-weight: 700; }
.tagesliste .balken { height: 1.75rem; margin-bottom: var(--r2); }
@container inhalt (max-width: 26rem) { .tagesliste li { grid-template-columns: minmax(0, 1fr); } }
.modelle { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--r4); }
.modelle li { border-top: 1px solid var(--linie); padding-top: var(--r3); }
.modelle .zwei-wochen { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; margin-top: var(--r2); }
.modelle .zwei-wochen .balken { height: 1.25rem; }
.modelle .zwei-wochen .balken .teil { font-size: 0; }

/* ---------- Nachrichten ---------- */
.verlauf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--r4); }
.verlauf .tagtrenner { align-self: center; font-family: var(--schrift-mono); font-size: var(--t-s); color: var(--tinte-2); padding: var(--r2) 0; }
.nachricht { max-width: min(36rem, 88%); padding: var(--r3) var(--r4); background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--p); border-radius: var(--rund); }
.nachricht.eigen { align-self: flex-end; border-left-width: 1px; border-right: 5px solid var(--p); }
.nachricht header { display: flex; flex-wrap: wrap; gap: var(--r1) var(--r3); justify-content: space-between; font-size: var(--t-s); margin-bottom: var(--r1); }
.nachricht header .wer { font-weight: 700; color: var(--p-text); }
.nachricht p { margin: 0; }
.stempel { display: flex; flex-wrap: wrap; gap: 0 var(--r3); margin-top: var(--r2); font-family: var(--schrift-mono); font-size: var(--t-xs); color: var(--siegel); }
.stempel .pruef::before { content: "◆ " / ""; }
.verfassen { background: var(--papier); padding-top: var(--r4); margin-top: var(--r5); border-top: 3px solid var(--tinte); }
.verfassen textarea { min-height: 4.5rem; }
/* Nur auf großen Bildschirmen klebt das Eingabefeld unten; auf dem Handy würde es den Verlauf verdecken */
@media (min-width: 60em) and (min-height: 44em) { .verfassen { position: sticky; bottom: 0; padding-bottom: var(--r4); } }
.ton { border-left: 4px solid var(--warnung); background: var(--warnung-flaeche); padding: var(--r3) var(--r4); margin: var(--r3) 0; }
.ton ul { margin: var(--r2) 0; padding-left: var(--r5); }

/* ---------- Zeitleiste (Protokoll): Jana links, Tobias rechts, Gemeinsames in der Mitte ---------- */
.zeitleiste { list-style: none; margin: 0; padding: 0; position: relative; }
.zeitleiste::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--linie-stark); transform: translateX(-1px); }
.zeitleiste .tag { position: relative; text-align: center; margin: var(--r5) 0 var(--r3); }
.zeitleiste .tag h3 { display: inline-block; background: var(--papier); padding: var(--r1) var(--r3); font-size: var(--t-s); font-family: var(--schrift-mono); margin: 0; border: 1px solid var(--linie-stark); border-radius: var(--rund); }
.eintrag { position: relative; width: calc(50% - 1.5rem); margin-bottom: var(--r3); padding: var(--r3) var(--r4); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); }
.eintrag::after { content: ""; position: absolute; top: 1.1rem; width: 0.875rem; height: 0.875rem; border-radius: 50%; background: var(--p-muster); border: 2px solid var(--p); }
.eintrag.seite-a { margin-right: auto; border-right: 4px solid var(--p); }
.eintrag.seite-a::after { right: calc(-1.5rem - 0.5rem); }
.eintrag.seite-b { margin-left: auto; border-left: 4px solid var(--p); }
.eintrag.seite-b::after { left: calc(-1.5rem - 0.5rem); }
.eintrag.seite-mitte { width: min(28rem, 80%); margin-left: auto; margin-right: auto; text-align: left; background: var(--flaeche-2); border-style: dashed; border-color: var(--linie-stark); }
.eintrag.seite-mitte::after { display: none; }
.eintrag .art { font-size: var(--t-xs); font-weight: 700; color: var(--p-text); display: flex; gap: var(--r2); justify-content: space-between; }
.eintrag .art time { font-weight: 400; color: var(--tinte-2); }
.eintrag p { margin: var(--r1) 0 0; }
.eintrag.abweichung { border-color: var(--warnung); }
@container inhalt (max-width: 40rem) {
  .zeitleiste::before { left: 0.5rem; }
  .zeitleiste .tag { text-align: left; padding-left: 1.5rem; }
  .eintrag, .eintrag.seite-mitte { width: auto; margin-left: 1.75rem; margin-right: 0; border-left: 4px solid var(--p); border-right: 1px solid var(--linie); }
  .eintrag.seite-mitte { border-left: 4px dashed var(--linie-stark); }
  .eintrag::after, .eintrag.seite-a::after, .eintrag.seite-b::after { left: -1.75rem; right: auto; }
}
.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--r3) var(--r5); align-items: end; padding: var(--r4); background: var(--flaeche-2); border-radius: var(--rund); margin-bottom: var(--r4); }
.filter fieldset { margin: 0; grid-column: 1 / -1; }
.filter .wahlen { display: flex; flex-wrap: wrap; gap: 0 var(--r5); }
.filter .feld { margin: 0; }

/* ---------- Geld ---------- */
.unternav { display: flex; gap: var(--r2); margin: 0 0 var(--r5); }
.saldo { font-size: var(--t-xl); font-weight: 700; margin: 0 0 var(--r2); max-width: 30ch; }
.betrag { white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: var(--r1); font-size: var(--t-s); font-weight: 700; padding: 0 var(--r2); border-radius: var(--rund); border: 1.5px solid currentColor; line-height: 1.6; }
.status--ok { color: var(--erfolg); }
.status--offen { color: var(--offen); border-style: dashed; }
.status--aus { color: var(--fehler); }
.rechner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--r5); align-items: start; }
@container inhalt (max-width: 42rem) { .rechner { grid-template-columns: minmax(0, 1fr); } }
.ergebnis { border-top: 3px solid var(--tinte); padding-top: var(--r3); }
.ergebnis .gross { font-family: var(--schrift-mono); font-size: var(--t-xxl); font-weight: 700; line-height: 1.1; }
.rollrahmen { max-width: 100%; overflow-x: auto; contain: paint; position: relative; }
table.tabelle { border-collapse: collapse; width: 100%; font-size: var(--t-s); }
table.tabelle th, table.tabelle td { text-align: left; padding: var(--r2) var(--r3) var(--r2) 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.tabelle th { color: var(--tinte-2); font-weight: 700; }
table.tabelle td.zahl, table.tabelle th.zahl { text-align: right; font-family: var(--schrift-mono); }

/* ---------- Dokumente ---------- */
.dok-symbol { width: 2.5rem; height: 3rem; border: 1.5px solid var(--linie-stark); border-radius: 3px 10px 3px 3px; display: grid; place-items: center; background: var(--flaeche); font-family: var(--schrift-mono); font-size: 0.625rem; font-weight: 700; color: var(--tinte-2); }
.liste > li.dok { grid-template-columns: auto minmax(0, 1fr) auto; }
@container inhalt (max-width: 30rem) { .liste > li.dok { grid-template-columns: auto minmax(0, 1fr); } .liste > li.dok > .rechts { grid-column: 1 / -1; } }

/* ---------- Einladung / Schritte ---------- */
.schritte { list-style: none; display: flex; gap: var(--r2); padding: 0; margin: 0 0 var(--r5); counter-reset: s; flex-wrap: wrap; }
.schritte li { counter-increment: s; display: flex; align-items: center; gap: var(--r2); color: var(--tinte-2); font-size: var(--t-s); }
.schritte li::before { content: counter(s); display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 2px solid var(--linie-stark); font-weight: 700; font-family: var(--schrift-mono); }
.schritte li[aria-current="step"] { color: var(--tinte); font-weight: 700; }
.schritte li[aria-current="step"]::before { background: var(--aktion); color: var(--aktion-text); border-color: var(--aktion); }
.schritte li.fertig::before { content: "✓" / ""; border-color: var(--erfolg); color: var(--erfolg); }
.wer-sieht { width: 100%; border-collapse: collapse; margin: var(--r3) 0 var(--r5); }
.wer-sieht th, .wer-sieht td { text-align: left; padding: var(--r2) var(--r3) var(--r2) 0; border-bottom: 1px solid var(--linie); vertical-align: top; }

/* ---------- Start ---------- */
.einstiege { list-style: none; margin: var(--r6) 0; padding: 0; border-top: 3px solid var(--tinte); counter-reset: e; }
.einstiege > li { counter-increment: e; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--r2) var(--r4); padding: var(--r5) 0; border-bottom: 1px solid var(--linie); }
.einstiege > li::before { content: counter(e, decimal-leading-zero); font-family: var(--schrift-mono); font-size: var(--t-xl); font-weight: 700; color: var(--tinte-2); line-height: 1.2; }
.einstiege h2 { font-size: var(--t-xl); margin-bottom: var(--r2); }
.einstiege .knoepfe { margin-bottom: 0; }
.bildmarke { display: block; width: min(16rem, 60%); margin: 0 0 var(--r5); }

/* ---------- Export-Blatt ---------- */
.blatt { background: var(--flaeche); border: 1px solid var(--linie); box-shadow: 0 1px 0 var(--linie), 0 12px 32px -18px rgba(43, 38, 32, 0.35); padding: clamp(1rem, 4vw, 3rem); max-width: 52rem; margin: var(--r5) auto; }
.blatt header { border-bottom: 3px solid var(--tinte); padding-bottom: var(--r3); margin-bottom: var(--r4); }
.blatt h1 { font-size: var(--t-xxl); max-width: none; }
.blatt h2 { font-size: var(--t-l); margin-top: var(--r6); }
.blatt tr.veraendert td { background: var(--fehler-flaeche); }
.blatt .kette { font-family: var(--schrift-mono); font-size: var(--t-xs); color: var(--siegel); word-break: break-all; }

/* ---------- Dialog und Meldung ---------- */
dialog { border: 0; border-top: 4px solid var(--tinte); border-radius: var(--rund-gross); padding: var(--r5); max-width: min(34rem, calc(100vw - 2rem)); width: 100%; background: var(--flaeche); color: var(--tinte); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35); }
dialog::backdrop { background: rgba(28, 25, 22, 0.55); }
dialog h2 { font-size: var(--t-xl); padding-right: 3rem; }
dialog .zu { position: absolute; top: var(--r3); right: var(--r3); width: var(--ziel); height: var(--ziel); display: grid; place-items: center; background: none; border: 0; border-radius: var(--rund); color: var(--tinte); cursor: pointer; }
dialog .zu:hover { background: var(--flaeche-2); }
.toast { position: fixed; left: var(--r4); right: var(--r4); bottom: 7rem; margin-inline: auto; width: fit-content; max-width: 36rem; hyphens: manual; z-index: 40; background: var(--aktion); color: var(--aktion-text); padding: var(--r3) var(--r5); border-radius: var(--rund); font-weight: 700; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4); }
.toast:empty { display: none; }
@media (min-width: 60em) { .toast { bottom: var(--r5); } }

.pro-banner { display: flex; gap: var(--r3); align-items: flex-start; background: var(--flaeche-2); border: 1.5px solid var(--linie-stark); padding: var(--r3) var(--r4); border-radius: var(--rund); margin-bottom: var(--r5); }
.naechte { display: flex; height: 2rem; border: 1.5px solid var(--linie-stark); border-radius: 3px; overflow: hidden; max-width: 34rem; margin: var(--r2) 0; }
.naechte > span { display: flex; align-items: center; padding-left: var(--r2); font-size: var(--t-s); font-weight: 700; color: var(--p-text); background: var(--p-muster); white-space: nowrap; overflow: hidden; }
.naechte > span + span { border-left: 2px solid var(--tinte); }

@media print {
  .prototyp-hinweis, .kopf, .hauptnav, .sprung, .nicht-drucken, .toast, .pro-banner { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  main { padding: 0; }
  .blatt { border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .rollrahmen { overflow: visible; }
  table.tabelle tr { break-inside: avoid; }
  .blatt h2 { break-after: avoid; }
}
