/* assets/css/app.css */
/* finanzamt-simulator.de – Designsystem „Hell“ (Fiskus 4.2): Fundament
   Ruhig, hell, sachlich: weiße Fenster, kühles Hellgrau, eine Akzentfarbe (Behördenblau) für die eine Primäraktion
   je Ansicht. Rot nur für Fehler und Stempel, Grün nur für „passt“, Bernstein für Hinweise. Glas nur sparsam
   (Dienstleiste, Menüs, Mitteilungen, Anmeldekarte) – nie auf Fenstern oder Inhalten.

   Schrift: DINish v4.007 (GitHub „playbeing“; abgeleitet von Altinn-DIN / Datto D-DIN, einer freien Digitalisierung
   der DIN 1451), SIL Open Font License 1.1 – Lizenztext in assets/fonts/OFL.txt. Lokal ausgeliefert, kein Build-Schritt.

   Diese Datei ist das erste Stylesheet überall (Spiel, Verwaltung, Rechtstexte) und enthält:
   Schrift, Tokens (Hell + Altnamen), Basis, gemeinsame Bausteine mit Präfix h- (Vertrag für alle Programme),
   die neu eingekleideten Altbausteine (.btn, .input, .notice, .status, .modal, .toast, .popmenu, .toolwin …),
   Werkzeuge (tools.js), Stempel, Druck- und Umschlag-Animation, Druckstil, Bewegung.
   Programme färben nie selbst: sie nehmen die Tokens. Papier (docs.css) folgt dem Original, nicht dem System. */

@font-face { font-family: "DINish"; src: url("../fonts/dinish-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DINish"; src: url("../fonts/dinish-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DINish Condensed"; src: url("../fonts/dinish-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ================= Tokens – Theme „classic“ = Hell ================= */
:root {
  /* Text */
  --ink: #14181F;
  --ink-2: #4B5361;          /* Meta */
  --ink-3: #5E6673;          /* Hinweise, nie unter 13px (AA auch auf --grund, --blau-zart und Glas) */
  --ink-4: #A3AAB5;          /* deaktiviert */
  /* Flächen */
  --weiss: #FFFFFF;          /* Fenster, Inhalte */
  --grund: #F5F6F8;          /* Seitennavigation, ruhige Zonen */
  --grund-2: #ECEEF1;        /* Hover, Segment-Spur */
  --tisch: #E6E9ED;          /* Leinwand hinter Dokumenten */
  --linie: #E4E7EB;          /* Haarlinie */
  --linie-2: #D2D7DE;        /* Feldrahmen, kräftiger Trenner */
  /* Akzent: Behördenblau – Fokus, Auswahl, Primäraktion, Ungelesen-Punkt, geprüfter Wert, Verweis */
  --blau: #2152A3;
  --blau-hover: #1A4489;
  --blau-druck: #163A75;
  --blau-zart: #EAF0F9;
  --blau-zart-2: #D6E2F3;
  --blau-text: #1D4A93;
  --on-primary: #FFFFFF;
  /* Signale – nur mit Bedeutung */
  --rot: #C42B1F;  --rot-zart: #FBECEA;
  --gruen: #1F7A4D; --gruen-zart: #E8F4EE;
  --bernstein: #A86400; --bernstein-zart: #FCF3E3;
  --marker: #FFE14D;         /* eigener Textmarker */
  --marker-2: #9FE0CF;       /* Kollege */
  --marker-ink: #3a3000;
  /* Vorgangsarten: nur als 8px-Marker, nie als Fläche (je FA.KINDS-Schlüssel) */
  --art-est: #5574A8; --art-ust: #4C8780; --art-einspruch: #A8604F; --art-bp: #857A9E;
  --art-mahnung: #9C5C5C; --art-frist: #9C7A3E; --art-stundung: #66788F; --art-steufa: #545C6A; --art-post: #8A919C;
  /* Glas: Dienstleiste, Startmenü, Mitteilung, Anmeldekarte, mobile Leiste – sonst nirgends */
  --glas: rgba(250, 251, 252, .82);
  --glas-dicht: rgba(252, 252, 253, .93);
  --glas-blur: blur(22px) saturate(140%);
  --scrim: rgba(20, 24, 31, .42);
  /* Radien */
  --r-fenster: 10px; --r-pop: 12px; --r-ctl: 7px; --r-klein: 5px;
  /* Schatten */
  --sch-fenster: 0 0 0 1px rgba(18, 26, 38, .07), 0 1px 2px rgba(18, 26, 38, .05), 0 8px 24px -4px rgba(18, 26, 38, .10), 0 28px 64px -16px rgba(18, 26, 38, .16);
  --sch-fenster-hinten: 0 0 0 1px rgba(18, 26, 38, .07), 0 1px 2px rgba(18, 26, 38, .04), 0 6px 18px -8px rgba(18, 26, 38, .10);
  --sch-pop: 0 0 0 1px rgba(18, 26, 38, .08), 0 4px 12px rgba(18, 26, 38, .08), 0 18px 44px -10px rgba(18, 26, 38, .18);
  --sch-ctl: 0 0 0 1px rgba(18, 26, 38, .10), 0 1px 2px rgba(18, 26, 38, .06);
  --sch-papier: 0 0 0 .5px rgba(30, 30, 30, .10), 0 1px 1px rgba(30, 30, 30, .06), 0 3px 8px rgba(30, 30, 30, .07), 0 14px 30px -12px rgba(30, 30, 30, .16);
  /* Schrift */
  --font: "DINish", "Segoe UI", system-ui, sans-serif;
  --font-eng: "DINish Condensed", "DINish", "Arial Narrow", sans-serif;
  --t-12: 12px; --t-13: 13px; --t-14: 14px; --t-16: 16px; --t-20: 20px; --t-26: 26px; --t-36: 36px; --t-64: 64px;
  /* Abstände (4er-Raster) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  /* Bewegung */
  --aus: cubic-bezier(.16, 1, .3, 1);
  --feder: cubic-bezier(.2, 1.2, .35, 1);
  --t-kurz: 120ms; --t-mittel: 220ms; --t-lang: 420ms;
  /* Maße */
  --h-leiste: 52px; --h-titel: 48px; --w-nav: 236px; --w-seiten: 172px; --w-panel: 372px;
  --fokus: var(--blau);

  /* Brücke zum Papier (docs.css): diese Namen bleiben definiert */
  --font-hand: "Ink Free", "Segoe Print", "Bradley Hand", "Noteworthy", cursive;
  --ok: var(--gruen);
  --bad: var(--rot);
  --t-1: 80ms;
  --t-2: 120ms;
  --paper: #fffdf8;

  /* ---- Altnamen: unveränderter Code wird damit Hell ---- */
  --font-ui: var(--font);
  --font-display: var(--font);
  --font-cond: var(--font-eng);
  --font-mono: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;   /* nur Papier */
  --font-receipt: "Courier New", "Nimbus Mono PS", Courier, monospace;              /* nur Papier */
  --fs-11: 12px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 14px; --fs-17: 16px; --fs-20: 20px; --fs-24: 26px; --fs-36: 36px; --fs-48: 64px;
  --lh-tight: 1.2; --lh-ui: 1.4; --lh-read: 1.55;
  --track-caps: .04em; --track-code: .08em;
  --bg: var(--weiss);
  --bg-2: var(--grund-2);
  --surface: var(--weiss);
  --surface-2: var(--grund);
  --stage: var(--tisch);
  --side: var(--grund);
  --rule: var(--linie-2);
  --line: var(--linie);
  --line-2: var(--linie-2);
  --primary: var(--blau);
  --primary-2: var(--blau-hover);
  --primary-3: var(--blau-druck);
  --focus: var(--blau);
  --link: var(--blau-text);
  --sel: var(--blau-zart);
  --primary-soft: var(--blau-zart);
  --warn: var(--bernstein);
  --warn-line: var(--bernstein);
  --bad-soft: var(--rot-zart);
  --accent: var(--ink); --accent-soft: var(--grund); --ok-soft: var(--gruen-zart); --warn-soft: var(--bernstein-zart);
  --stamp: #b42318;          /* applyTheme() setzt die gekaufte Stempelfarbe */
  --radius: var(--r-ctl);
  --radius-sm: var(--r-klein);
  --radius-stamp: 2px;       /* Gummistempel */
  --bw: 1px; --bw-rule: 1px; --bar: 3px;
  --sum-rule: 3px double var(--linie-2);
  --shadow-1: var(--sch-ctl); --shadow-2: var(--sch-pop);
  --shadow-paper: var(--sch-papier);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 40px; --sp-8: 64px;
  --gutter: 32px;
  --h-ctl-sm: 30px; --h-ctl: 36px; --h-ctl-lg: 44px; --h-row: 44px; --h-top: 52px;
  --w-app: 1280px; --w-land: 1200px; --w-text: 68ch;
  --ease: var(--aus);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --ease-stamp: cubic-bezier(.3, 1.4, .6, 1);   /* nur Stempelaufschläge */
  --t-3: 160ms; --t-4: 240ms; --t-5: 360ms; --t-roll: 180ms; --t-stagger: 30ms;
  /* Haken (Maske) für Kästchen */
  --x-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.4l2.3 2.3 4.7-5' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sel-pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%234B5361' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (max-width: 560px) { :root { --gutter: 16px; } }
/* Breitbild: Fenster und Panel bekommen mehr Raum (die ganze Oberfläche wächst zusätzlich über --os-z, os.js) */
@media (min-width: 2400px) { :root { --w-nav: 260px; --w-seiten: 188px; --w-panel: 420px; } }

/* ===== Kauf-Themes: nur Werte, Papier bleibt hell ===== */
/* „Nacht“: dunkles Hell, Papier bleibt Papier */
[data-theme="nacht"] {
  --ink: #E8EBEF; --ink-2: #B0B7C2; --ink-3: #8C95A2; --ink-4: #5F6773;
  --weiss: #1C2027; --grund: #16191F; --grund-2: #262B33; --tisch: #101318; --linie: #2B313A; --linie-2: #3B424D;
  --blau: #7FA6E6; --blau-hover: #98B8EC; --blau-druck: #B2CBF2; --blau-zart: #1E2A3D; --blau-zart-2: #2A3B57; --blau-text: #9BBAEE;
  --on-primary: #0E1522;
  --rot: #F07A70; --rot-zart: #3A2120; --gruen: #62C08C; --gruen-zart: #1B3127; --bernstein: #E2A948; --bernstein-zart: #3A2E18;
  --glas: rgba(30, 34, 41, .84); --glas-dicht: rgba(30, 34, 41, .94);
  --scrim: rgba(0, 0, 0, .55);
  --sch-fenster: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px -4px rgba(0, 0, 0, .45), 0 28px 64px -16px rgba(0, 0, 0, .55);
  --sch-fenster-hinten: 0 0 0 1px rgba(255, 255, 255, .05), 0 6px 18px -8px rgba(0, 0, 0, .5);
  --sch-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 44px -10px rgba(0, 0, 0, .6);
  --sch-ctl: 0 0 0 1px rgba(255, 255, 255, .10), 0 1px 2px rgba(0, 0, 0, .3);
  --paper: #f1f0ea;
  --sel-pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%23B0B7C2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}
[data-theme="nacht"] .stampfx__inner { mix-blend-mode: normal; }
/* „Amsel“: etwas kräftigeres, kühleres Blau */
[data-theme="amsel"] {
  --blau: #1D58C4; --blau-hover: #1749A6; --blau-druck: #123B86; --blau-zart: #E7EFFC; --blau-zart-2: #D0E0F8; --blau-text: #1A50B3;
  --grund: #F3F6FA; --grund-2: #E8EDF4; --tisch: #E2E8F0;
}
/* „Amtsstube 1987“: Tannengrün als Akzent, Flächen bleiben kühl-hell (kein Creme) */
[data-theme="retro"] {
  --blau: #2F5A45; --blau-hover: #264A39; --blau-druck: #1D392C; --blau-zart: #E8F0EC; --blau-zart-2: #D3E2DA; --blau-text: #2A5240;
  --grund: #F3F5F4; --grund-2: #E8ECEA; --tisch: #E2E7E4;
}

/* ===== Bewegung aus: System ODER Spieleinstellung (html.no-motion) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
html.no-motion *, html.no-motion *::before, html.no-motion *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
}

/* ================= Basis ================= */
*, *::before, *::after { box-sizing: border-box; }
/* Tabellenziffern überall. !important, weil jede font-Kurzschreibweise font-variant-numeric sonst zurücksetzt
   (DINish-Ziffern sind proportional). docs.css verlässt sich darauf. */
*, *::before, *::after { font-variant-numeric: tabular-nums lining-nums !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font); font-weight: 400; font-size: var(--t-14); line-height: 1.45;
  color: var(--ink); background: var(--weiss);
  font-feature-settings: "tnum" 1, "lnum" 1; font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; letter-spacing: inherit; border-radius: 0; }
button { cursor: pointer; }
a { color: var(--blau-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { color: var(--blau-hover); text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font); font-weight: 700; letter-spacing: -.005em; line-height: 1.2; }
h1, h2 { font-size: var(--t-26); }
h3 { font-size: var(--t-16); }
h4 { font-size: var(--t-14); }
p { margin: 0 0 .7em; }
p:last-child { margin-bottom: 0; }
p, li, td, dd { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
dl, dd { margin: 0; }
b, strong { font-weight: 700; }
i, em, cite, address { font-style: normal; }   /* keine Kursive in der Oberfläche; docs.css setzt sie selbst */
small { font-size: var(--t-12); }
hr { border: 0; border-top: 1px solid var(--linie); margin: 16px 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--blau) 22%, transparent); color: var(--ink); }
[hidden] { display: none !important; }

/* Hilfsklassen */
.mono { font-family: inherit; letter-spacing: .02em; }
.hand { font-family: var(--font-hand); }
.meta { font-size: var(--t-13); line-height: var(--lh-ui); color: var(--ink-2); }
.num { text-align: right; }
.sq { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c, currentColor); vertical-align: 0; margin-right: 6px; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Alte Icons (FA.icon): global aus; frei in Icon-Knöpfen und auf Papier (docs.css). Neue Symbole: FA.hicon (.h-i). */
.ico { display: none; flex: none; width: 16px; height: 16px; }
.ico svg { width: 100%; height: 100%; }
.iconbtn .ico, .doc .ico { display: inline-flex; }
.iconbtn .ico { width: 18px; height: 18px; }

/* =====================================================================================================
   GEMEINSAME BAUSTEINE (Präfix h-) – Vertrag für alle Programme
   ===================================================================================================== */
/* Symbole: eine Linienfamilie, Strich 1.7, rund, currentColor (FA.hicon) */
.h-i { display: inline-block; width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; overflow: visible; }
.h-i--xs { width: 14px; height: 14px; }
.h-i--s { width: 16px; height: 16px; }
.h-i--l { width: 22px; height: 22px; }

/* Programmsymbol „Platte“: Rechteck mit Aktenecke, neutrale Fläche, Linienglyphe (FA.osIcon) */
.h-platte { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; }
.h-platte > .h-platte__f { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.h-platte__k { fill: #EDF0F3; stroke: rgba(20, 28, 40, .10); stroke-width: .8; }
.h-platte__e { fill: #D9DFE6; }
.h-platte > .h-i { position: relative; width: 56%; height: 56%; margin-top: 6%; color: #2E3643; stroke-width: 1.8; }
/* dieselbe Platte als ein SVG (FA.osIcon): Glyphe in .h-platte__g, an = Blautönung */
.h-platte-svg { color: #2E3643; }
.h-platte-svg.is-an .h-platte__k { fill: var(--blau-zart); stroke: rgba(33, 82, 163, .22); }
.h-platte-svg.is-an .h-platte__e { fill: var(--blau-zart-2); }
.h-platte-svg.is-an { color: var(--blau); }
[data-theme="nacht"] .h-platte__k { fill: #2A3039; stroke: rgba(255, 255, 255, .08); }
[data-theme="nacht"] .h-platte__e { fill: #3A424E; }
[data-theme="nacht"] .h-platte > .h-i, [data-theme="nacht"] .h-platte-svg { color: #D9DEE5; }
[data-theme="nacht"] .h-platte-svg.is-an { color: var(--blau); }

/* ---------- Knöpfe (.btn und Varianten sind dieselben Knöpfe) ---------- */
.h-knopf, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  height: 36px; padding: 0 14px; margin: 0; border: 0; border-radius: var(--r-ctl);
  background: var(--weiss); color: var(--ink); box-shadow: var(--sch-ctl);
  font-family: var(--font); font-size: var(--t-14); font-weight: 700; line-height: 1; letter-spacing: 0;
  white-space: nowrap; text-decoration: none; user-select: none; cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus), box-shadow var(--t-kurz) var(--aus), color var(--t-kurz) var(--aus), transform var(--t-kurz) var(--aus);
}
.h-knopf:hover, .btn:hover { background: var(--grund); color: var(--ink); text-decoration: none; }
.h-knopf:active:not(:disabled), .btn:active:not(:disabled) { transform: translateY(.5px); }
.h-knopf .h-i, .btn .h-i { width: 16px; height: 16px; }
.btn .ico { display: none; }
.h-knopf--primaer, .btn--primary {
  background: var(--blau); color: var(--on-primary);
  box-shadow: 0 0 0 1px var(--blau-druck) inset, 0 1px 2px rgba(22, 58, 117, .25);
}
.h-knopf--primaer:hover, .btn--primary:hover { background: var(--blau-hover); color: var(--on-primary); }
.h-knopf--primaer:active:not(:disabled), .btn--primary:active:not(:disabled) { background: var(--blau-druck); }
.h-knopf--leise { background: transparent; box-shadow: none; color: var(--ink-2); }
.h-knopf--leise:hover { background: var(--grund-2); color: var(--ink); }
.h-knopf--gefahr, .btn--danger, .btn--danger-ghost { color: var(--rot); }
.h-knopf--gefahr:hover, .btn--danger:hover, .btn--danger-ghost:hover { background: var(--rot-zart); color: var(--rot); }
.h-knopf--gross { height: 44px; padding: 0 20px; font-size: var(--t-16); border-radius: 8px; }
.h-knopf--klein { height: 30px; padding: 0 10px; gap: 6px; font-size: var(--t-13); }
.h-knopf--voll { width: 100%; }
.h-knopf--icon { width: 36px; padding: 0; }
.h-knopf--icon.h-knopf--klein { width: 30px; }
.h-knopf:disabled, .btn:disabled, .btn[aria-disabled="true"], .h-knopf[aria-disabled="true"] {
  background: var(--grund); color: var(--ink-4); box-shadow: 0 0 0 1px var(--linie) inset; cursor: not-allowed; transform: none;
}
.h-knopf--leise:disabled { background: transparent; box-shadow: none; }
.btn.is-busy, .h-knopf.is-busy { cursor: progress; }
.btn.is-busy::after, .h-knopf.is-busy::after { content: "…"; }
/* Unter einem Modal fällt der Primärknopf auf Standard zurück: nie zwei blaue Flächen */
.is-inaktiv .h-knopf--primaer, .is-inaktiv .btn--primary { background: var(--weiss); color: var(--ink-2); box-shadow: var(--sch-ctl); }
/* Hintere Fenster ebenso: blau ist nur die Primäraktion des vorderen Fensters (Fiskus setzt .is-hinten) */
.oswin.is-hinten .h-knopf--primaer, .oswin.is-hinten .btn--primary { background: var(--weiss); color: var(--ink); box-shadow: var(--sch-ctl); }
.oswin.is-hinten .h-knopf--primaer:hover, .oswin.is-hinten .btn--primary:hover { background: var(--grund); color: var(--ink); }

.h-link, .linkbtn {
  display: inline; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--blau-text); font-family: var(--font); font-weight: 700; font-size: inherit; line-height: inherit; text-decoration: none;
}
.h-link:hover, .linkbtn:hover { color: var(--blau-hover); text-decoration: underline; text-underline-offset: 3px; }
.h-link:disabled, .linkbtn:disabled { color: var(--ink-4); text-decoration: none; cursor: default; }
.linkbtn .ico { display: none; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.iconbtn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0; margin: 0; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--ink-2); text-decoration: none;
  transition: background-color var(--t-kurz) var(--aus), color var(--t-kurz) var(--aus);
}
.iconbtn:hover { background: var(--grund-2); color: var(--ink); text-decoration: none; }
.iconbtn:disabled { background: transparent; color: var(--ink-4); cursor: not-allowed; }
.iconbtn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 2px var(--weiss); }
.iconbtn .h-i { width: 18px; height: 18px; }

/* ---------- Segment (eine Auswahl aus wenigen) ---------- */
.h-seg { display: inline-flex; align-items: stretch; gap: 2px; padding: 3px; border-radius: 8px; background: var(--grund-2); max-width: 100%; }
.h-seg__o {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  height: 30px; padding: 0 12px; margin: 0; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-2); font-family: var(--font); font-size: var(--t-14); font-weight: 400; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus), color var(--t-kurz) var(--aus);
}
.h-seg__o:hover { color: var(--ink); }
.h-seg__o[aria-pressed="true"], .h-seg__o[aria-selected="true"], .h-seg__o[aria-checked="true"], .h-seg__o.is-an {
  background: var(--weiss); color: var(--ink); font-weight: 700; box-shadow: var(--sch-ctl);
}
.h-seg__o[aria-pressed="true"] .h-i, .h-seg__o[aria-selected="true"] .h-i { color: var(--blau); }
.h-seg__o:focus-visible { outline-offset: 0; }
.h-seg__o .h-n, .h-seg .h-n { color: var(--ink-3); font-weight: 400; font-size: var(--t-13); }
.h-seg--voll { display: flex; width: 100%; }
.h-seg--voll .h-seg__o { flex: 1 1 0; }
.h-seg--klein .h-seg__o { height: 26px; padding: 0 9px; font-size: var(--t-13); }

/* ---------- Felder (.input ist dasselbe Feld) ---------- */
.h-feld, .input {
  display: block; width: 100%; height: 36px; padding: 0 12px; margin: 0;
  border: 0; border-radius: var(--r-ctl); background: var(--weiss); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--linie-2);
  font-family: var(--font); font-weight: 400; font-size: var(--t-14); line-height: 1.4;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow var(--t-kurz) var(--aus);
}
.h-feld:hover, .input:hover { box-shadow: inset 0 0 0 1px var(--ink-4); }
.h-feld:focus, .input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blau); }
.h-feld::placeholder, .input::placeholder { color: var(--ink-3); opacity: 1; }
.h-feld:disabled, .input:disabled { background: var(--grund); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--linie); cursor: not-allowed; }
.h-feld[readonly], .input[readonly] { background: var(--grund); }
.h-feld[aria-invalid="true"], .input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--rot); }
textarea.h-feld, textarea.input { height: auto; min-height: 96px; padding: 9px 12px; line-height: 1.5; resize: vertical; }
select.h-feld, select.input { padding-right: 32px; cursor: pointer; background-image: var(--sel-pfeil); background-repeat: no-repeat; background-position: right 11px center; background-size: 12px; }
input[type="search"].input::-webkit-search-decoration, input[type="search"].h-feld::-webkit-search-decoration { -webkit-appearance: none; }
input[type="number"].input { -moz-appearance: textfield; }
.h-feld--grau { background: var(--grund-2); box-shadow: none; }
.h-feld--grau:hover { box-shadow: none; }
/* Suchfeld mit Lupe (eine globale Suche gibt es nur in der Dienstleiste) */
.h-suche { position: relative; display: flex; align-items: center; min-width: 0; }
.h-suche > .h-i { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--ink-3); pointer-events: none; }
.h-suche > .h-feld, .h-suche > .input { padding-left: 34px; }
.h-tasten { display: inline-block; padding: 0 5px; border: 1px solid var(--linie-2); border-radius: 4px; font-size: var(--t-12); line-height: 18px; color: var(--ink-3); white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: var(--t-13); font-weight: 700; line-height: 1.3; color: var(--ink-2); }
.field__hint { font-size: var(--t-13); font-weight: 400; line-height: var(--lh-ui); color: var(--ink-3); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form__err { margin: 0; font-weight: 700; font-size: var(--t-13); color: var(--rot); }
.form__err:empty { display: none; }
.form > .form__note { margin: 0; font-size: var(--t-13); line-height: 1.5; color: var(--ink-3); }

/* Kästchen: rund 4px, Haken in Weiß auf Blau */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0;
  border: 0; border-radius: 5px; background: var(--weiss) center / 12px no-repeat; box-shadow: inset 0 0 0 1.5px var(--linie-2);
  vertical-align: -4px; cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background-color: var(--blau); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.4l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="radio"]:checked { box-shadow: inset 0 0 0 5px var(--blau); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { background-color: var(--grund); cursor: not-allowed; }

/* Auswahlzeilen (Ankreuzliste) */
.opt__dot { position: relative; display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 5px; background: var(--weiss); box-shadow: inset 0 0 0 1.5px var(--linie-2); }
.opt.is-on .opt__dot, .dec.is-on .opt__dot, .pack.is-on .opt__dot,
[aria-checked="true"] > .opt__dot, .opt__dot.is-on { background: var(--oc, var(--blau)); box-shadow: none; }
.opt.is-on .opt__dot::after, .dec.is-on .opt__dot::after, .pack.is-on .opt__dot::after,
[aria-checked="true"] > .opt__dot::after, .opt__dot.is-on::after {
  content: ""; position: absolute; inset: 3px; background: #fff;
  -webkit-mask: var(--x-mask) center / 100% no-repeat; mask: var(--x-mask) center / 100% no-repeat;
}
.opt:disabled .opt__dot, .dec:disabled .opt__dot { box-shadow: inset 0 0 0 1.5px var(--linie); }
/* X als SVG (Akte): zwei Striche, .is-draw zeichnet sie nacheinander */
.opt__dot--x { background: var(--weiss) !important; box-shadow: inset 0 0 0 1.5px var(--linie-2) !important; }
.opt__dot--x::after { content: none !important; }
.opt__dot--x > svg { position: absolute; left: 3px; top: 3px; width: calc(100% - 6px); height: calc(100% - 6px); overflow: visible; }
.opt__dot--x path { fill: none; stroke: var(--oc, var(--blau)); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.opt__dot--x.is-draw path { animation: fa-xdraw 60ms linear var(--xd, 0ms) backwards; }
.opt__dot--x.is-draw path + path { animation-delay: calc(var(--xd, 0ms) + 60ms); }
@keyframes fa-xdraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.opts { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 12px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  font-family: var(--font); font-size: var(--t-14); line-height: var(--lh-ui); text-align: left;
  transition: background-color var(--t-kurz) var(--aus);
}
.opt:hover:not(:disabled) { background: var(--grund); }
.opt:disabled { cursor: default; }
.opt:focus-visible { outline-offset: -2px; }
.opt > .opt__dot { margin-top: 1px; }
.opt__l { flex: 1; min-width: 0; }
.opt.is-on, .opt.is-on:hover:not(:disabled) { background: var(--blau-zart); font-weight: 700; }
.opt .pbadge { align-self: center; }

/* Einstellung: Kästchen mit Text */
.switch { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.switch__ui { position: relative; flex: none; width: 34px; height: 20px; margin-top: 1px; border-radius: 10px; background: var(--linie-2); transition: background-color var(--t-kurz) var(--aus); }
.switch__ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(18, 26, 38, .25); transition: transform var(--t-mittel) var(--aus); }
.switch input:checked + .switch__ui { background: var(--blau); }
.switch input:checked + .switch__ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch__ui { outline: 2px solid var(--fokus); outline-offset: 2px; }
.switch input:disabled + .switch__ui { opacity: .5; }
.switch b { display: block; font-size: var(--t-14); font-weight: 700; }
.switch small { display: block; font-size: var(--t-13); color: var(--ink-2); }

/* Dienststelle „Finanzamt [Ort]“: Leerstelle zum Ausfüllen mit Textknopf „Vorschlag“ */
.amtin { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; max-width: 100%; font-size: inherit; line-height: 1.3; }
.amtin__pre { flex: none; font-weight: 700; color: var(--ink); }
.amtin__in {
  flex: 0 1 17em; width: 17em; min-width: 6em; max-width: 100%; height: auto; margin: 0; padding: 4px 8px;
  border: 0; border-radius: var(--r-klein); background: var(--grund-2); color: var(--ink);
  font: inherit; font-weight: 700; line-height: 1.3; box-shadow: inset 0 -1.5px 0 var(--linie-2); -webkit-appearance: none; appearance: none;
}
.amtin__in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blau); background: var(--weiss); }
.amtin.is-bad .amtin__in { box-shadow: inset 0 0 0 2px var(--rot); }
.amtin__sug { flex: none; font-size: var(--t-13); }
.amtin__err:not(:empty) { margin-top: 4px; font-size: var(--t-13); line-height: 1.35; font-weight: 400; }
.amtx { display: block; min-width: 0; }
.amtx__show {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; max-width: 100%; margin: 0 -6px; padding: 2px 6px;
  border: 0; border-radius: var(--r-klein); background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.amtx__name { min-width: 0; overflow-wrap: anywhere; }
.amtx__edit { font-size: var(--t-13); font-weight: 700; color: var(--blau-text); }
.amtx__show:hover { background: var(--grund-2); }

/* ---------- Inline-Feld (Amsel, Prüfwerte): Zeilennummer, Wert, erklärt → geprüft ---------- */
.h-inline { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.h-inline__l { display: flex; gap: 8px; align-items: baseline; font-size: var(--t-13); color: var(--ink-2); }
.h-inline__z { color: var(--ink-3); font-family: var(--font-eng); letter-spacing: .03em; }
.h-inline__box { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 6px; background: var(--weiss); box-shadow: inset 0 0 0 1px var(--linie-2); font-size: var(--t-16); }
.h-inline__box.is-ro { background: var(--grund); box-shadow: none; }
.h-inline__box.is-geprueft { box-shadow: inset 0 0 0 1.5px var(--blau); }
.h-alt { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rot); text-decoration-thickness: 1.5px; }
.h-pfeil { color: var(--ink-3); }
.h-neu { color: var(--blau-text); font-weight: 700; }
.h-hilfe { display: flex; gap: 6px; align-items: center; font-size: var(--t-13); color: var(--ink-2); }
.h-hilfe .h-i { width: 14px; height: 14px; }
.h-hilfe.is-ok { color: var(--gruen); }
.h-hilfe.is-warn { color: var(--bernstein); }
.h-vermerk { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-14); color: var(--blau-text); }
.h-vermerk .h-meta { margin-left: 6px; }

/* ---------- Listen ---------- */
.h-liste { display: flex; flex-direction: column; min-width: 0; }
.h-zeile {
  position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 10px;
  width: 100%; padding: 14px 14px 14px 10px; margin: 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus);
}
.h-zeile + .h-zeile::before { content: ""; position: absolute; left: 30px; right: 14px; top: 0; height: 1px; background: var(--linie); }
.h-zeile:hover { background: var(--grund); }
.h-zeile:hover::before, .h-zeile:hover + .h-zeile::before { opacity: 0; }
.h-zeile.is-an, .h-zeile[aria-selected="true"] { background: var(--blau-zart); }
.h-zeile.is-an::before, .h-zeile.is-an + .h-zeile::before, .h-zeile[aria-selected="true"]::before, .h-zeile[aria-selected="true"] + .h-zeile::before { display: none; }
.h-zeile:focus-visible { outline-offset: -2px; }
.h-zeile__punkt { display: block; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--blau); }
.h-zeile.is-gelesen .h-zeile__punkt { background: transparent; }
.h-zeile__wer { display: block; font-size: var(--t-16); font-weight: 700; line-height: 1.3; }
.h-zeile.is-gelesen .h-zeile__wer { font-weight: 400; }
.h-zeile__titel { display: block; margin-top: 2px; font-size: var(--t-14); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-zeile__titel span { font-weight: 400; color: var(--ink-2); }
.h-zeile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: var(--t-13); color: var(--ink-2); }
.h-zeile__meta .h-i { width: 14px; height: 14px; color: var(--ink-3); margin-right: 3px; }
.h-zeile__rechts { display: grid; justify-items: end; align-content: start; gap: 6px; font-size: var(--t-13); color: var(--ink-3); text-align: right; }
.h-zeile.is-erledigt .h-zeile__wer, .h-zeile.is-erledigt .h-zeile__titel { color: var(--ink-3); }
.h-gruppe { padding: 18px 12px 6px; font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.h-kopfzeile { display: flex; align-items: baseline; gap: 10px; font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.h-kopfzeile .h-n, .h-n { font-weight: 400; color: var(--ink-3); }

/* ---------- Seitennavigation ---------- */
.h-nav { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 16px 12px; background: var(--grund); border-right: 1px solid var(--linie); overflow-y: auto; }
.h-nav .h-kopfzeile { padding: 14px 10px 6px; }
.h-nav .h-kopfzeile:first-child { padding-top: 0; }
.h-nav__p {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; margin: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-2); font-family: var(--font); font-size: var(--t-14); text-align: left; text-decoration: none; cursor: pointer;
}
.h-nav__p .h-i { color: var(--ink-3); }
.h-nav__p:hover { background: var(--grund-2); color: var(--ink); }
.h-nav__p.is-an, .h-nav__p[aria-current="page"], .h-nav__p[aria-selected="true"] { background: var(--weiss); color: var(--ink); font-weight: 700; box-shadow: var(--sch-ctl); }
.h-nav__p.is-an .h-i, .h-nav__p[aria-current="page"] .h-i, .h-nav__p[aria-selected="true"] .h-i { color: var(--blau); }
.h-nav__n { margin-left: auto; font-size: var(--t-13); font-weight: 400; color: var(--ink-3); }
.h-nav__fuss { display: grid; gap: 8px; margin-top: auto; padding: 12px 10px 4px; font-size: var(--t-13); color: var(--ink-2); }
.h-nav__fuss b { color: var(--ink); }

/* ---------- Seitenpanel und Prüfpunkte ---------- */
.h-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--weiss); border-left: 1px solid var(--linie); }
.h-panel.is-zu { display: none; }
.h-panel__kopf { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--linie); }
.h-panel__kopf .h-seg { flex: 1; }
.h-panel__kopf .h-seg .h-seg__o { flex: 1 1 0; }
.h-panel__inhalt { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.h-panel__fuss { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--linie); }
.h-panel__fuss .h-meta, .h-panel__fuss .meta { text-align: center; }
.h-punkt { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 12px; padding: 12px; margin: 0 -12px; border-radius: 8px; text-align: left; }
button.h-punkt { width: calc(100% + 24px); border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
button.h-punkt:hover { background: var(--grund); }
.h-punkt.is-an { background: var(--blau-zart); }
.h-punkt__z { display: grid; place-items: center; width: 22px; height: 22px; margin-top: -1px; border-radius: 50%; font-size: 13px; font-weight: 700; line-height: 1; }
.h-punkt__z .h-i { width: 13px; height: 13px; stroke-width: 2.4; }
.h-punkt--ok .h-punkt__z { background: var(--gruen-zart); color: var(--gruen); }
.h-punkt--hinweis .h-punkt__z { background: var(--bernstein-zart); color: var(--bernstein); }
.h-punkt--fehler .h-punkt__z { background: var(--rot-zart); color: var(--rot); }
.h-punkt--offen .h-punkt__z { box-shadow: inset 0 0 0 1.5px var(--linie-2); }
.h-punkt b { display: block; font-size: var(--t-14); }
.h-punkt .h-meta { display: block; margin-top: 1px; }
.h-punkt .h-zahl { font-size: var(--t-14); font-weight: 700; }
.h-punkt__detail { grid-column: 2 / 4; display: grid; gap: 8px; margin-top: 10px; }
.h-befund { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-13); line-height: 1.35; color: var(--ink); }
.h-befund .h-i { width: 15px; height: 15px; margin-top: 1px; color: var(--ink-2); }
.h-mk { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 2px; background: var(--mk, var(--marker)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.h-lauf { margin-top: 18px; }
.h-lauf > h4 { margin-bottom: 8px; font-size: var(--t-13); color: var(--ink-2); }
.h-lauf__e { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 5px 0; font-size: var(--t-13); color: var(--ink-2); }
.h-lauf__e time { color: var(--ink-3); }
.h-lauf__e b { font-weight: 400; color: var(--ink); }

/* ---------- Werkzeugleiste ---------- */
.h-werkzeug { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 52px; padding: 0 12px; background: var(--weiss); border-bottom: 1px solid var(--linie); }
.h-werkzeug__links, .h-werkzeug__rechts { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-werkzeug__mitte { display: flex; align-items: center; justify-content: center; gap: 10px; }
.h-werkzeug__rechts { justify-content: flex-end; }
.h-wtrenn { flex: none; width: 1px; height: 22px; background: var(--linie); }
.h-zoom { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); }
.h-zoom > b, .h-zoom > output { min-width: 52px; text-align: center; font-size: var(--t-14); font-weight: 400; color: var(--ink); }
.h-zoom > button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; }
.h-zoom > button:hover { background: var(--grund-2); color: var(--ink); }
/* einzige Glasfläche in einem Programm: schwebende Zoomleiste auf der Leinwand */
.h-tischleiste {
  position: absolute; left: 50%; bottom: 18px; z-index: 6; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px;
  background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
  box-shadow: var(--sch-pop); color: var(--ink-2); font-size: var(--t-13);
}

/* ---------- Status, Art, Zähler, Balken, Stufe, Aktenzeichen, Code ---------- */
.h-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.h-status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.h-status--neu { color: var(--ink); font-weight: 700; }
.h-status--neu::before { display: none; }
.h-status--arbeit::before { background: var(--blau); }
.h-status--ok::before { background: var(--gruen); }
.h-status--warte::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.h-status--fehler { color: var(--rot); }
.h-status--fehler::before { background: var(--rot); }
.h-art { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.h-art::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--art, var(--art-post)); }
.h-art--est { --art: var(--art-est); } .h-art--ust { --art: var(--art-ust); } .h-art--einspruch { --art: var(--art-einspruch); }
.h-art--bp { --art: var(--art-bp); } .h-art--mahnung { --art: var(--art-mahnung); } .h-art--frist { --art: var(--art-frist); }
.h-art--stundung { --art: var(--art-stundung); } .h-art--steufa { --art: var(--art-steufa); } .h-art--post { --art: var(--art-post); }
.h-zaehler { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--grund-2); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1; }
.h-zaehler--blau { background: var(--blau); color: var(--on-primary); }
.h-balken { display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 2px; background: var(--grund-2); }
.h-balken > i { display: block; height: 100%; border-radius: 2px; background: var(--blau); transition: width var(--t-lang) var(--aus); }
.h-stufe { display: inline-flex; align-items: flex-end; gap: 2px; }
.h-stufe > i { width: 3px; border-radius: 1px; background: var(--linie-2); }
.h-stufe > i:nth-child(1) { height: 6px; } .h-stufe > i:nth-child(2) { height: 9px; } .h-stufe > i:nth-child(3) { height: 12px; }
.h-stufe > i.is-an { background: var(--ink-2); }
.h-az { font-family: var(--font-eng); font-weight: 700; letter-spacing: .02em; }
.h-code { display: inline-block; padding: 2px 8px; border-radius: var(--r-klein); background: var(--grund-2); color: var(--ink); font-family: var(--font-eng); font-weight: 700; font-size: var(--t-14); letter-spacing: .06em; white-space: nowrap; }
.h-meta { font-size: var(--t-13); color: var(--ink-2); }
.h-leise { color: var(--ink-3); }
.h-zahl { white-space: nowrap; }

/* ---------- Personen ---------- */
.h-av { position: relative; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--av, #E3E7EC); color: var(--av-ink, #3A4250); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.h-av--gross { width: 44px; height: 44px; font-size: 15px; }
.h-av--online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 2px var(--weiss); }
.h-av.is-off { opacity: .55; }
[data-theme="nacht"] .h-av { background: var(--av, #333A45); color: var(--av-ink, #D9DEE5); }

/* ---------- Blattvorschau: verkleinerte Kopie desselben gerenderten Dokuments ---------- */
.h-blattvorschau { position: relative; flex: none; overflow: hidden; background: #fff; border-radius: 2px; box-shadow: var(--sch-papier); }
.h-blattvorschau__in { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.h-blattvorschau__in > .doc { margin: 0 !important; box-shadow: none !important; }
.h-blattvorschau--fehlt { display: grid; place-items: center; background: transparent; box-shadow: none; border: 1.5px dashed var(--linie-2); border-radius: 4px; color: var(--ink-3); }
.h-tisch { position: relative; background: var(--tisch); }

/* ---------- Ebenen: Scrim, Modal, Blatt von unten, Menü, Leerzustand ---------- */
.h-modal { background: var(--weiss); border-radius: 14px; box-shadow: var(--sch-pop), 0 40px 90px -30px rgba(18, 26, 38, .4); overflow: hidden; }
.h-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; max-height: 86vh; display: flex; flex-direction: column;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); background: var(--weiss); border-radius: 16px 16px 0 0;
  box-shadow: 0 -1px 0 rgba(18, 26, 38, .06), 0 -10px 30px -10px rgba(18, 26, 38, .2); transform: translateY(100%); transition: transform var(--t-mittel) var(--aus); }
.h-sheet.is-auf { transform: none; }
.h-sheet__griff { flex: none; width: 38px; height: 5px; margin: 0 auto 12px; padding: 0; border: 0; border-radius: 3px; background: var(--linie-2); cursor: pointer; }
.h-sheet__kopf { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.h-sheet__kopf b { display: block; font-size: var(--t-16); }
.h-sheet__inhalt { flex: 1; min-height: 0; overflow-y: auto; }
.h-pop { min-width: 200px; padding: 6px; border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop); }
.h-leer, .osrest { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100%; padding: 40px 32px; text-align: center; color: var(--ink-2); font-size: var(--t-14); }
.h-leer b, .osrest b { font-size: var(--t-20); font-weight: 700; color: var(--ink); }
.h-leer > span, .osrest > span { max-width: 46ch; }
.h-leer__ico, .osrest__ico { margin-bottom: 4px; }
.h-leer__ico svg, .osrest__ico svg { width: 48px; height: 48px; }
.h-leer__akt { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.h-fokus { outline: 2px solid var(--fokus); outline-offset: 2px; }

/* ================= Hinweise, Leerzustand, Laden (Altbausteine) ================= */
.notice {
  display: block; padding: 12px 14px; border: 0; border-radius: 8px; background: var(--grund);
  font-size: var(--t-14); line-height: 1.5; color: var(--ink-2);
}
.notice > .ico { display: none; }
.notice b, .notice strong { color: var(--ink); font-weight: 700; }
.notice p { margin: 0; max-width: var(--w-text); }
.notice p + p { margin-top: 6px; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice .btn { margin-top: 10px; }
.notice--warn { background: var(--bernstein-zart); }
.notice--warn > b:first-child, .notice--warn > :first-child > b:first-child { color: var(--bernstein); }
.notice--error, .notice--bad { background: var(--rot-zart); }
.notice--error > b:first-child, .notice--bad > b:first-child { color: var(--rot); }
.notice--ok { background: var(--gruen-zart); }
.empty { display: block; padding: 12px 0; font-size: var(--t-14); color: var(--ink-3); }
.empty .ico { display: none; }
.empty p { margin: 0; }
.empty--sm { padding: 8px 0; }
.loading { display: block; padding: 32px var(--gutter); font-size: var(--t-14); color: var(--ink-3); }

/* Tabellen (Altbestand bis zur Neugestaltung; neue Oberflächen nehmen Listen, Tabellen gehören aufs Papier) */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-14); }
.table th { padding: 8px 12px; border-bottom: 1px solid var(--linie-2); text-align: left; vertical-align: bottom; font-size: var(--t-13); font-weight: 700; line-height: 1.3; color: var(--ink-2); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.table .num, .table th.num { text-align: right; }
.table small { font-size: var(--t-12); color: var(--ink-3); }
.table tr.is-link { cursor: pointer; }
.table tr.is-link:hover td { background: var(--grund); }
.table tr.is-link:focus-visible { outline: 2px solid var(--fokus); outline-offset: -2px; }
.table tr.is-sum td { border-top: var(--sum-rule); font-weight: 700; }
/* .cells gehört allein dem Papier (Ziffernkästchen für Steuernummer und IdNr., docs.css) – hier kein UI-Stil */
/* Abschnitt */
.panel { padding: 16px 0 0; border: 0; border-top: 1px solid var(--linie); background: transparent; box-shadow: none; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel__head h3 { font-size: var(--t-16); font-weight: 700; }

/* Aktenstatus (Altklasse): Punkt + Text wie .h-status */
.status { display: inline-flex; align-items: center; gap: 6px; flex: none; height: auto; padding: 0; border: 0; border-radius: 0; background: none;
  font-family: var(--font); font-weight: 400; font-size: var(--t-13); line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.status .ico { display: none; }
.status--new { color: var(--ink); font-weight: 700; }
.status--new::before { display: none; }
.status--mail::before { background: var(--blau); }
.status--mail { color: var(--ink); font-weight: 700; }
.status--open::before { background: var(--blau); }
.status--wait::before, .status--cosignwait::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.status--cosign { color: var(--rot); font-weight: 700; }
.status--cosign::before { background: var(--rot); }
.status--done::before { background: var(--gruen); }
.status--bad { color: var(--rot); }
.status--bad::before { background: var(--rot); }
/* Text-Kennzeichen (keine Pillen) */
.pill { display: inline; height: auto; padding: 0; border: 0; border-radius: 0; background: none; font-weight: 400; font-size: var(--t-13); color: var(--ink-2); }
.pill .ico { display: none; }
.pill--ok { color: var(--gruen); }
.pill--bad { color: var(--rot); }
.pill--warn { color: var(--bernstein); }
.chip { display: inline; padding: 0; border: 0; background: none; cursor: pointer; color: var(--blau-text); font-weight: 700; font-size: inherit; line-height: inherit; }
.chip:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip .ico { display: none; }
.chip + .chip::before { content: "·"; display: inline-block; margin: 0 .45em; color: var(--ink-3); font-weight: 400; }
.diff { font-weight: 700; font-size: var(--t-13); white-space: nowrap; }

/* ================= Personen: Lichtbild (Papier) und Spieler-Kürzel ================= */
.av { display: inline-flex; flex: none; border-radius: 6px; overflow: hidden; }
.av svg { display: block; }
.pbadge {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: color-mix(in srgb, var(--pc, #6E7683) 16%, var(--weiss)); color: color-mix(in srgb, var(--pc, #3A4250) 70%, var(--ink));
  font-family: var(--font); font-weight: 700; font-size: 11.5px; line-height: 1; letter-spacing: .02em;
}
.pbadge + .pbadge { margin-left: -4px; box-shadow: 0 0 0 2px var(--weiss); }
.pbadge.is-off { opacity: .5; }
.pbadge--empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linie-2); color: var(--ink-3); }

/* ================= Logo „Eingangsstempel FA“ (Marke, Wortmarke) =================
   Größe nur über --logo-h. Farben fest (Stempelrot, Textmarker), nicht die gekaufte --stamp-Farbe. */
.logo { --logo-h: 32px; display: inline-flex; align-items: center; gap: calc(var(--logo-h) * .15625); color: var(--ink); line-height: 0; text-decoration: none; vertical-align: middle; }
.logo:hover, a.logo:hover { color: var(--ink); text-decoration: none; }
.logo__mark { display: block; flex: none; width: var(--logo-h); height: var(--logo-h); }
.logo__name { display: block; flex: none; color: var(--ink); }
.logo__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.logo__name .logo__svg { width: calc(var(--logo-h) * 5.203125); height: var(--logo-h); }
.logo--tld .logo__name .logo__svg { width: calc(var(--logo-h) * 5.890625); }
.logo__hl { fill: var(--logo-hl, #ffe14d); }
.logo__stamp { fill: var(--logo-stamp, #b42318); }
.logo__date { fill: var(--logo-date, #b42318); }
.logo__tld { font-weight: 400; }
.logo--mono { --logo-hl: transparent; --logo-stamp: currentColor; --logo-date: currentColor; }
[data-theme="nacht"] .logo { --logo-stamp: #ffffff; --logo-date: #141414; }
[data-theme="nacht"] .logo--mono { --logo-stamp: currentColor; --logo-date: currentColor; }
.amsel-logo { display: inline-flex; align-items: center; gap: 8px; }
.amsel-logo b { display: block; font-size: var(--t-14); font-weight: 700; }
.amsel-logo small { display: block; margin-top: -1px; font-size: var(--t-12); color: var(--ink-2); }

/* Inhaltsfläche eines Programms (ältere Seiten zeichnen in .view) */
.view { flex: 1; min-width: 0; width: 100%; max-width: calc(var(--w-app) + 2 * var(--gutter)); margin-inline: auto; padding: 32px var(--gutter) 64px; }
.view--case { max-width: none; padding: 0; }

/* ================= Toasts (vor dem Start von Fiskus; sonst laufen sie als Mitteilung) ================= */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px;
  border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
  font-size: var(--t-14); line-height: 1.45; color: var(--ink-2);
  opacity: 0; transform: translateY(8px); transition: opacity var(--t-mittel) var(--aus), transform var(--t-mittel) var(--aus);
}
.toast::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ink-4); }
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition-duration: var(--t-kurz); }
.toast.is-clickable { cursor: pointer; }
.toast .ico { display: none; }
.toast__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toast__body strong { font-weight: 700; color: var(--ink); }
.toast--ok::before { background: var(--gruen); }
.toast--error::before { background: var(--rot); }
.toast--mail::before, .toast--xp::before { background: var(--blau); }
body.has-modal .toasts { left: 16px; right: auto; }
@media (max-width: 560px) { .toasts > .toast:nth-last-child(n+3) { display: none; } }

/* ================= Modal (ui.modal): weißes Blatt über Scrim, kein Blur ================= */
.modal-back { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: transparent; }
.modal-back::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--scrim); opacity: 0; transition: opacity var(--t-mittel) linear; }
.modal-back.is-in::before { opacity: 1; }
.modal-back.is-out::before { opacity: 0; }
.modal { width: min(560px, 100%); margin: auto; opacity: 0; transform: translateY(12px) scale(.99); transition: transform var(--t-mittel) var(--aus), opacity var(--t-mittel) var(--aus); }
.modal-back.is-in .modal { opacity: 1; transform: none; }
.modal-back.is-out .modal { opacity: 0; transform: translateY(8px); transition-duration: var(--t-kurz); }
.modal--wide { width: min(980px, 100%); }
.modal__inner { overflow: hidden; background: var(--weiss); border: 0; border-radius: 14px; box-shadow: var(--sch-pop), 0 40px 90px -30px rgba(18, 26, 38, .4); }
.modal__head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 12px 0 24px; }
.modal__head > .ico { display: none; }
.modal__head h2 { flex: 1; min-width: 0; padding: 18px 0 8px; font-size: var(--t-20); font-weight: 700; line-height: 1.25; }
.modal__x { align-self: flex-start; margin-top: 12px; }
.modal__body { max-height: calc(100vh - 200px); padding: 8px 24px 24px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--linie); background: var(--grund); }
.modal__text { max-width: var(--w-text); font-size: var(--t-14); line-height: var(--lh-read); color: var(--ink-2); }
body.has-modal { overflow: hidden; }

/* ================= Menü (ui.menu): Glas, rund ================= */
.popmenu { position: fixed; z-index: 1500; min-width: 210px; padding: 6px; border-radius: var(--r-pop);
  background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
  opacity: 0; transform: translateY(-4px); transition: opacity var(--t-kurz) var(--aus), transform var(--t-kurz) var(--aus); }
.popmenu.is-in { opacity: 1; transform: none; }
.popmenu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; margin: 0;
  border: 0; border-radius: 7px; background: none; color: var(--ink); text-align: left; text-decoration: none;
  font-family: var(--font); font-size: var(--t-14);
}
.popmenu__item .ico { display: none; }
.popmenu__item:hover, .popmenu__item:focus-visible { background: rgba(18, 26, 38, .06); outline: none; }
.popmenu__item:focus-visible { box-shadow: inset 0 0 0 2px var(--blau); }
.popmenu__item.is-danger { color: var(--rot); }
.popmenu__sep { height: 1px; margin: 5px 8px; background: var(--linie); }

/* ================= Werkzeugfenster (ui.toolWindow) und Werkzeuge (tools.js) ================= */
/* Im Fiskus-Betrieb liegen die Werkzeugfenster in der Fensterebene (.ostools in .oslayer, Stapelordnung aus os.js:
   über dem Fenster, aus dem sie geöffnet wurden, unter Suche, Startmenü, Menüs und Mitteilungen). #toolLayer bleibt für
   Werkzeuge aus einem Dialog heraus (Briefformular), für schmale Schirme und Seiten ohne Fiskus. */
#toolLayer { position: fixed; inset: 0; z-index: 600; pointer-events: none; }
body:has(.modal--compose) #toolLayer { z-index: 1100; }
.ostools { position: absolute; inset: 0; pointer-events: none; }
.ostools .toolwin.is-owner-min { visibility: hidden; pointer-events: none; }
.toolwin {
  position: fixed; right: 90px; bottom: 90px; width: 340px; max-height: min(620px, calc(100vh - 100px));
  display: flex; flex-direction: column; pointer-events: auto; overflow: hidden;
  background: var(--weiss); border: 0; border-radius: var(--r-fenster); box-shadow: var(--sch-fenster);
  opacity: 0; transform: translateY(8px); transition: opacity var(--t-mittel) var(--aus), transform var(--t-mittel) var(--aus);
}
.toolwin--wide { width: 440px; }
.toolwin[style*="top"] { bottom: auto; max-height: calc(100vh - 68px); }
.toolwin.is-in { opacity: 1; transform: none; }
.toolwin.is-out { opacity: 0; transform: translateY(4px); transition-duration: 100ms; }
.toolwin.is-drag { transition: none; }
.toolwin.is-pulse { animation: winFlash var(--t-lang) var(--aus); }
.toolwin__head {
  flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 16px;
  background: var(--weiss); color: var(--ink); border-bottom: 1px solid var(--linie); cursor: grab; user-select: none;
  font-weight: 700; font-size: var(--t-14); line-height: 1;
}
.toolwin__head > .ico { display: none; }
.toolwin__head > span:not(.ico) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolwin__head .iconbtn { width: 34px; height: 30px; border-radius: 6px; color: var(--ink-2); }
.toolwin__head .iconbtn .ico { width: 15px; height: 15px; }
.toolwin.is-drag .toolwin__head { cursor: grabbing; }
.toolwin__body { padding: 16px; overflow-y: auto; outline: none; }
.tool__note { margin: 10px 0 0; font-size: var(--t-13); line-height: var(--lh-ui); color: var(--ink-3); }
/* Rechner */
.calc__tape { display: flex; flex-direction: column; max-height: 92px; margin-bottom: 4px; overflow-y: auto; }
.calc__tline { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px; border: 0; border-radius: 5px; background: none; text-align: left; font-size: var(--t-13); color: var(--ink-3); }
.calc__tline:hover { background: var(--grund); }
.calc__tline b { font-weight: 700; color: var(--ink-2); }
.calc__expr { min-height: 18px; font-size: var(--t-13); color: var(--ink-3); text-align: right; }
.calc__disp { padding: 4px 2px 12px; overflow-x: auto; white-space: nowrap; text-align: right; font-size: 32px; font-weight: 400; line-height: 1.2; }
.calc__pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc__key { height: 44px; border: 0; border-radius: 8px; background: var(--grund); color: var(--ink); font-size: var(--t-16); font-weight: 400; transition: background-color var(--t-kurz) var(--aus); }
.calc__key:hover { background: var(--grund-2); }
.calc__key.is-op { color: var(--blau); font-weight: 700; }
.calc__key.is-eq { grid-column: span 4; background: var(--blau); color: var(--on-primary); font-weight: 700; }
.calc__key.is-eq:hover { background: var(--blau-hover); }
.calc__key.is-clear { color: var(--rot); }
/* unter einem Modal keine zweite blaue Fläche (außer das Werkzeug liegt über dem Briefformular) */
body.has-modal:not(:has(.modal--compose)) .calc__key.is-eq { background: var(--grund-2); color: var(--ink); }
/* Kalender */
.cal { display: flex; flex-direction: column; gap: 12px; }
.cal__answer { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-14); color: var(--ink-2); }
.cal__answer b { font-weight: 700; color: var(--ink); }
.cal__answer.is-free { background: var(--rot-zart); }
.cal__answer .pill { font-weight: 700; color: var(--rot); }
.cal__answer .pill::before { content: "– "; color: var(--ink-3); font-weight: 400; }
.cal__hint { width: 100%; font-size: var(--t-13); color: var(--ink-2); }
.cal__nav { display: flex; align-items: center; justify-content: space-between; }
.cal__title { font-size: var(--t-14); font-weight: 700; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__wd { padding: 4px 0; text-align: center; font-size: var(--t-12); font-weight: 700; color: var(--ink-3); }
.cal__day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: var(--t-13); transition: background-color var(--t-kurz) var(--aus); }
.cal__day:hover { background: var(--grund-2); }
.cal__day.is-sat { color: var(--ink-3); }
.cal__day.is-sun, .cal__day.is-hol { color: var(--rot); }
.cal__day.is-hol { box-shadow: inset 0 0 0 1px var(--rot); }
.cal__day.is-sel { background: var(--blau); color: var(--on-primary); box-shadow: none; }
.cal__legend { display: flex; gap: 16px; font-size: var(--t-12); color: var(--ink-3); }
.cal__legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--rot); }
.cal__legend .is-hol::before { background: none; box-shadow: inset 0 0 0 1px var(--rot); }
/* Routenplaner */
.route, .route__res { display: flex; flex-direction: column; gap: 12px; }
.route__mapwrap { overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--linie); }
.route__map { width: 100%; }
.route__facts { display: flex; gap: 24px; }
.route__facts small { display: block; font-size: var(--t-12); color: var(--ink-3); }
.route__facts b { font-weight: 700; }
.route__km { font-size: var(--t-26); line-height: 1.2; }
.route__calc { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--linie); font-size: var(--t-13); }
.route__line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.route__line b { font-weight: 700; white-space: nowrap; }
.route__line .input { width: 90px; height: 30px; font-size: var(--t-13); }
.route__line--sum { padding-top: 8px; border-top: var(--sum-rule); font-size: var(--t-14); }
/* Handelsregister */
.reg, .reg__res { display: flex; flex-direction: column; gap: 10px; }
.reg__none { display: block; padding: 12px 14px; border-radius: 8px; background: var(--rot-zart); font-size: var(--t-14); color: var(--ink-2); }
.reg__none > .ico { display: none; }
.reg__none b { font-weight: 700; color: var(--ink); }
.reg__none p { margin: 4px 0 0; }
.reg__hit { padding: 12px 14px; border-radius: 8px; background: var(--grund); }
.reg__hit.is-bad { background: var(--rot-zart); }
.reg__name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.reg__name b { font-size: var(--t-14); font-weight: 700; }
.reg__dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); margin: 0; font-size: var(--t-13); }
.reg__dl dt, .reg__dl dd { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--linie); }
.reg__dl dt { padding-right: 10px; color: var(--ink-3); }
/* Säumnis-Rechner und Richtsätze */
.sz, .rs { display: flex; flex-direction: column; gap: 12px; }
.sz__steps { display: flex; flex-direction: column; font-size: var(--t-13); }
.sz__steps > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--linie); }
.sz__steps b { font-weight: 700; white-space: nowrap; }
.sz__steps .is-sum { margin-top: -1px; border-top: var(--sum-rule); border-bottom: 0; font-size: var(--t-14); font-weight: 700; }
.sz__res { display: block; padding: 12px 14px; border-radius: 8px; background: var(--gruen-zart); font-size: var(--t-14); color: var(--ink-2); }
.sz__res b { color: var(--ink); }
.rs__form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs__res { display: block; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-14); color: var(--ink-2); }
.rs__res.is-low { background: var(--rot-zart); }
.rs__big { font-size: var(--t-26); font-weight: 700; line-height: 1.2; color: var(--ink); }
.rs__bar { position: relative; height: 6px; margin: 14px 0 6px; border-radius: 3px; background: var(--grund-2); }
.rs__band { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--gruen); opacity: .55; }
.rs__dot { position: absolute; top: -5px; box-sizing: content-box; width: 12px; height: 12px; margin-left: -8px; border: 2px solid var(--weiss); border-radius: 50%; background: var(--ink); }
.rs__table { width: 100%; border-collapse: collapse; font-size: var(--t-13); }
.rs__table th, .rs__table td { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--linie); }
.rs__table th { font-size: var(--t-12); font-weight: 700; color: var(--ink-2); border-bottom-color: var(--linie-2); }
.rs__table .num { text-align: right; }
/* Lexikon im Fenster */
.lex { display: flex; flex-direction: column; gap: 10px; }
.lex__cols { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; min-height: 340px; }
.lex__list { display: flex; flex-direction: column; gap: 1px; max-height: 440px; overflow-x: hidden; overflow-y: auto; padding-right: 8px; border-right: 1px solid var(--linie); }
.lex__item { flex: none; min-width: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: var(--t-13); line-height: 1.35; text-align: left; }
.lex__item:hover { background: var(--grund); color: var(--ink); }
.lex__item.is-rel { font-weight: 700; color: var(--ink); }
.lex__item.is-on { background: var(--blau-zart); color: var(--ink); font-weight: 700; }
.lex__art { max-height: 440px; overflow-y: auto; }
/* Lexikon-Artikel (Fenster und Lexikon-Programm) */
.lexart { display: flex; flex-direction: column; max-width: var(--w-text); }
.lexart > h3 { margin: 0; font-size: var(--t-26); font-weight: 700; }
.lexart > p { margin: 12px 0 0; max-width: var(--w-text); font-size: var(--t-14); line-height: var(--lh-read); color: var(--ink-2); }
.lexart > p.lexart__short { font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }
.lexart p strong { font-weight: 700; color: var(--ink); }
.lexart__ex { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-14); }
.lexart__ex b { font-weight: 700; color: var(--ink); }
.lexart__ex p { margin: 0; font-size: var(--t-14); line-height: 1.5; color: var(--ink-2); }
.lexart__rel { margin-top: 16px; font-size: var(--t-14); line-height: 1.5; color: var(--ink-3); }
.lexart__rel > span { margin-right: .35em; }
.lex__art .lexart > h3 { font-size: var(--t-20); }
.lex__art .lexart > p.lexart__short { font-size: var(--t-14); }

/* ================= Stempel (der theatralische Moment) ================= */
.stampfx { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; }
.stampfx__inner {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 20px 8px; text-align: center;
  border: 4px solid var(--sc); border-radius: var(--radius-stamp); color: var(--sc); background: transparent; box-shadow: none;
  font-family: var(--font-eng); mix-blend-mode: multiply;
  opacity: 0; transform: rotate(var(--rot)) scale(1.6);
}
.stampfx__text { font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.stampfx--big .stampfx__text { font-size: clamp(30px, 4.4vw, 52px); }
.stampfx__sub {
  align-self: stretch; margin-top: 6px; padding-top: 5px; border-top: 1.5px solid currentColor;
  font-family: var(--font-eng); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.stampfx.is-hit .stampfx__inner { animation: fa-stamp 200ms var(--ease-stamp) forwards; }
.stampfx.is-done .stampfx__inner { opacity: 1; transform: rotate(var(--rot)) scale(1); animation: none; }
.is-shake { animation: shake 240ms linear; }
.is-thud { animation: fa-thud 180ms var(--aus); }
.is-bump { animation: fa-flash 640ms linear; }

/* ================= Umschlag (fliegt) ================= */
.flyenv { position: fixed; left: 0; top: 0; z-index: 3000; width: 64px; height: 44px; pointer-events: none; background: #fff; border-radius: 3px; box-shadow: var(--sch-pop); }
.flyenv__win { display: none; }
.flyenv__flap { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0L32 26L64 0' fill='none' stroke='%236E7683' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; }

/* ================= Druck-Animation (gekürzt, überspringbar) ================= */
.printfx { position: fixed; inset: 0; z-index: 2500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(20, 24, 31, .72); opacity: 0; transition: opacity var(--t-mittel) linear; cursor: pointer; }
.printfx.is-in { opacity: 1; }
.printfx.is-out { opacity: 0; }
.printfx__stage { position: relative; width: 320px; height: 360px; }
.printfx__printer { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: 104px; background: #F5F6F8; border-radius: 12px; box-shadow: 0 0 0 1px rgba(18, 26, 38, .1), 0 10px 30px -10px rgba(0, 0, 0, .4); }
.printfx__top { display: flex; align-items: center; gap: 8px; padding: 16px 18px; }
.printfx__led { width: 7px; height: 7px; border-radius: 50%; background: #1F7A4D; }
.printfx__brand { font-family: var(--font-eng); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #6E7683; }
.printfx__slot { position: absolute; left: 30px; right: 30px; bottom: 18px; height: 6px; border-radius: 3px; background: #2E3643; }
.printfx__out { position: absolute; left: 50px; right: 50px; top: 92px; z-index: 2; height: 0; overflow: hidden; transition: height 900ms steps(10, end); }
.printfx.is-printing .printfx__out { height: 260px; }
.printfx__paper { width: 220px; height: 290px; overflow: hidden; background: #fff; box-shadow: var(--sch-papier); }
.printfx__paper > .doc { width: 720px; transform: scale(.305); transform-origin: top left; pointer-events: none; --zoom: 1 !important; }
.printfx.is-fold .printfx__out { transform: translateY(110px) scaleY(.35); opacity: 0; transition: transform 240ms var(--aus), opacity 200ms 120ms linear; }
.printfx__env { position: absolute; left: 66px; right: 66px; bottom: 0; z-index: 4; height: 120px; background: #fff; border-radius: 4px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(24px); transition: opacity 160ms linear, transform 200ms var(--aus); }
.printfx__envwin { position: absolute; left: 18px; top: 50px; width: 86px; height: 28px; background: #F5F6F8; border-radius: 3px; box-shadow: inset 0 0 0 1px #E4E7EB; }
.printfx__envflap {
  position: absolute; left: 0; right: 0; top: 0; height: 56px; transform-origin: top; transform: scaleY(-1); transition: transform 160ms 80ms var(--aus);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 56' preserveAspectRatio='none'%3E%3Cpath d='M0 0L50 56L100 0' fill='none' stroke='%236E7683' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.printfx.is-fold .printfx__env { opacity: 1; transform: none; }
.printfx.is-send .printfx__envflap { transform: scaleY(1); }
.printfx.is-send .printfx__env { transform: translate(240px, -130px) scale(.6); opacity: 0; transition: transform 300ms 50ms cubic-bezier(.6, -.25, .7, 1), opacity 200ms 150ms linear; }
.printfx__label { margin: 0; font-weight: 700; font-size: var(--t-16); color: #fff; }
.printfx__skip { margin: 0; font-size: var(--t-13); color: rgba(255, 255, 255, .78); }

/* ================= Störungs- und Wartungsseite ================= */
.fatal { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 600px; margin: 0 auto; padding: 12vh var(--gutter) 48px; }
.fatal h1 { font-size: var(--t-26); }
.fatal p { margin: 0; max-width: var(--w-text); font-size: var(--t-14); line-height: var(--lh-read); color: var(--ink-2); }
.fatal__sign { align-self: stretch; }
.fatal__sign:not(.notice) { padding: 12px 14px; border-radius: 8px; background: var(--bernstein-zart); color: var(--ink-2); }
.fatal__sign:not(.notice)::before { content: "Achtung: "; font-weight: 700; color: var(--bernstein); }

/* ================= Bootlader (Grundzustand; index.php setzt die Ladefläche) ================= */
#bootload { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-start; padding: 16px; background: var(--grund); color: var(--ink); font-family: var(--font); font-weight: 700; font-size: var(--t-14); line-height: 20px; }

/* ================= Druck ================= */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .toasts, #toolLayer, .ostools, .printfx, .flyenv, .popmenu { display: none !important; }
  body.is-printing > *:not(.print-area) { display: none !important; }
  body.is-printing { background: #fff; }
  body.is-printing .print-area { display: block; }
  body.is-printing .print-area .doc { box-shadow: none !important; margin: 0 auto !important; transform: none !important; --zoom: 1 !important; border: 0 !important; }
  .fld.is-marked { background-image: none !important; }
}

/* ================= Bewegung (verbindliche Liste) ================= */
@keyframes shake { 25% { transform: translate(2px, 0); } 50% { transform: translate(-2px, 0); } 75% { transform: translate(1px, 0); } }
@keyframes winFlash { from { box-shadow: 0 0 0 2px var(--blau), var(--sch-fenster); } }
@keyframes fa-stamp { 0% { opacity: 0; transform: rotate(var(--rot, 0deg)) scale(1.6); } 100% { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1); } }
@keyframes fa-flash { 0%, 50% { background-color: var(--blau-zart); } 25%, 100% { background-color: transparent; } }
@keyframes fa-thud { 0% { transform: none; } 30% { transform: translateY(2px); } 100% { transform: none; } }
@keyframes h-auf { from { opacity: 0; transform: translateY(8px); } }

/* ================= Zählwerk (ui.counter): rollende Ziffern ohne Kasten ================= */
.zw { display: inline-flex; vertical-align: baseline; }
.zw__d { position: relative; display: block; width: .58em; height: 1.25em; overflow: hidden; }
.zw__s { display: block; text-align: center; font-weight: 700; line-height: 1.25em; color: var(--ink); }
.zw__s > span { display: block; height: 1.25em; }

/* ================= Dienstleiste: Dienstgrad, EP und Marken (A.renderHud, im Infobereich) ================= */
.hud { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hud__rank { display: flex; flex-direction: column; min-width: 0; max-width: 200px; line-height: 1.2; }
.hud__rankname { position: relative; display: block; max-width: 100%; height: 17px; overflow: hidden; }
.hud__rankname > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-13); font-weight: 700; line-height: 17px; color: var(--ink); }
.hud__lvl { font-size: var(--t-12); color: var(--ink-2); white-space: nowrap; }
.hud__ep { display: flex; flex-direction: column; gap: 4px; }
.hud__bar { position: relative; display: block; width: 72px; height: 4px; overflow: hidden; border-radius: 2px; background: var(--grund-2); }
.hud__fill { position: absolute; inset: 0; border-radius: 2px; background: var(--blau); transform-origin: left center; transform: scaleX(0); }
.hud__tick { display: none; }
.hud__eplbl { font-size: var(--t-12); line-height: 1.2; color: var(--ink-2); white-space: nowrap; }
.hud__marks { display: flex; align-items: center; gap: 6px; font-size: var(--t-14); }
.hud__coin { flex: none; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F1D27A, #C99A2E); box-shadow: inset 0 0 0 1.5px rgba(120, 80, 0, .25); }
.hud__markslbl { font-size: var(--t-13); color: var(--ink-2); }

/* ================= Rechtstexte (index.php ?p=…), lädt nur app.css + landing.css ================= */
.lp-legal { max-width: var(--w-text); margin: 32px 0 64px; }
.lp-legal h1 { margin-bottom: 16px; font-size: var(--t-36); font-weight: 700; letter-spacing: -.01em; }
.lp-legal__text { white-space: pre-line; font-size: var(--t-16); line-height: 1.6; color: var(--ink-2); -webkit-hyphens: auto; hyphens: auto; }
.lp-legal__partner { margin-top: 32px; }
.lp-legal__partner img { display: block; width: 240px; max-width: 100%; height: auto; }
.lp-legal__nav { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--linie); font-size: var(--t-14); }

/* ================= Touch (Tablets, Telefone): Ziele mindestens 40 px ================= */
@media (pointer: coarse) {
  .h-knopf, .btn, .h-knopf--klein { height: 40px; }
  .h-knopf--icon, .h-knopf--icon.h-knopf--klein { width: 40px; }
  .h-knopf--gross { height: 44px; }
  input.h-feld, select.h-feld, input.input, select.input { height: 40px; }
  .h-nav__p { height: 44px; }
  .h-seg__o, .h-seg--klein .h-seg__o { height: 38px; }
  .h-zoom > button { width: 40px; height: 40px; }
  .iconbtn, .toolwin__head .iconbtn { width: 40px; height: 40px; }
  .popmenu__item { height: 44px; }
}

/* ================= Responsiv ================= */
@media (max-width: 900px) {
  .view { padding: 20px 16px 88px; }
  .view--case { padding: 0; }
  .toolwin { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; width: auto; max-height: 70vh; }
}
@media (max-width: 560px) {
  .modal-back { padding: 8px; align-items: end; }
  .modal__head { padding-left: 18px; }
  .modal__body { padding: 8px 18px 20px; }
  .modal__foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .rs__form { grid-template-columns: minmax(0, 1fr); }
  .lex__cols { grid-template-columns: minmax(0, 1fr); }
  .lex__list { max-height: 140px; border-right: 0; border-bottom: 1px solid var(--linie); padding: 0 0 8px; }
}

/* assets/css/landing.css */
/* finanzamt-simulator.de – Sperrbildschirm (Startseite), Anmeldung, Einrichtung und Rechtstexte, Gestaltung „Hell“
   Haselstedt am Morgen über die ganze Fläche (assets/img/haselstedt.svg). EINE Gruppe, zentriert bei 46 % der Höhe:
   Dienstzeile, Uhr in DINish Condensed (148 px), Datum, Anmeldekarte (leichtes Glas). Das Finanzamt im Bild steht
   rechts, nie hinter der Karte. Unten links Dienststelle und Fiskus, unten rechts die Pflichtlinks.
   Der Sperrbildschirm ist immer hell (eigene Tokens), unabhängig vom gekauften Farbschema.
   Wird auch vom Sperren in Fiskus (os.lock, .ls--os) und von der statischen Kopie in index.php (.ls--ssr) genutzt.
   .lp, .lp-top: statische Seiten (/impressum, /datenschutz, /nutzungsbedingungen). */

/* ================= Statische Seiten (Rechtstexte aus index.php) ================= */
body.is-landing { background: var(--weiss); }
.lp { max-width: var(--w-land); margin: 0 auto; padding: 0 var(--gutter); }
:where(.lp) p { margin: 0; font-size: var(--t-16); line-height: 1.6; max-width: var(--w-text); }
.lp-top { position: sticky; top: 0; z-index: 2; background: rgba(250, 251, 252, .92); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); border-bottom: 1px solid var(--linie); }
.lp-top .lp { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.lp-top .logo { --logo-h: 28px; }
.lp-top a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); font-size: var(--t-14); font-weight: 700; text-decoration: none; }
.lp-top a:hover { color: var(--ink); }
/* Große Schirme: wachsen wie Fiskus und der Sperrbildschirm (--os-z 1.15 / 1.6) */
@media (min-width: 2200px) and (min-height: 1200px) { .lp-top, main.lp { zoom: 1.15; } }
@media (min-width: 3200px) and (min-height: 1800px) { .lp-top, main.lp { zoom: 1.6; } }

/* ================= Sperrbildschirm ================= */
.ls {
  /* immer hell: das Bild ist immer derselbe Morgen */
  --ink: #14181F; --ink-2: #4B5361; --ink-3: #5E6673; --ink-4: #A3AAB5; --weiss: #FFFFFF; --grund: #F5F6F8; --grund-2: #ECEEF1; --linie: #E4E7EB; --linie-2: #D2D7DE;
  --blau: #2152A3; --blau-hover: #1A4489; --blau-druck: #163A75; --blau-zart: #EAF0F9; --blau-text: #1D4A93; --on-primary: #FFFFFF; --rot: #C42B1F; --fokus: #2152A3;
  --sch-pop: 0 0 0 1px rgba(18, 26, 38, .08), 0 4px 12px rgba(18, 26, 38, .08), 0 18px 44px -10px rgba(18, 26, 38, .18);
  --sch-ctl: 0 0 0 1px rgba(18, 26, 38, .10), 0 1px 2px rgba(18, 26, 38, .06);
  position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  background: #EEF1F5; color: var(--ink); font-family: var(--font); color-scheme: light; -webkit-tap-highlight-color: transparent;
}
.ls-scene { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center bottom; pointer-events: none; user-select: none; }

/* Eine Gruppe: Dienstzeile, Uhr, Datum, Karte – gemeinsam bei 46 % der Höhe (unten mehr Luft als oben) */
.ls-group {
  position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; width: 100%;
  margin: auto 0; padding: 40px 16px calc(40px + 8vh); text-align: center;
}
.ls-dienst {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; max-width: 100%; min-height: 34px; margin: 0; padding: 4px 14px 4px 8px;
  border-radius: 8px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(18, 26, 38, .06);
  font-size: var(--t-14); color: var(--ink-2);
}
.ls-dienst b { color: var(--ink); }
.ls-dienst__ico { display: block; width: 22px; height: 22px; flex: none; }
.ls-dienst__ico svg { display: block; width: 100%; height: 100%; }
.ls-dienst__p { color: var(--ink-4); }
.ls-clock {
  display: block; margin-top: 22px; font-family: var(--font-eng); font-weight: 700; line-height: .9; letter-spacing: -.01em; color: #1B2230;
  font-size: clamp(76px, min(13.7vh, 26vw), 148px);
}
.ls-date { margin: 10px 0 0; font-size: var(--t-20); color: var(--ink-2); }

/* Anmeldekarte (das zweite Glas neben der Dienstleiste) */
.ls-card {
  position: relative; width: 380px; max-width: 100%; margin-top: 32px; padding: 26px 28px 20px; text-align: left;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 14px; box-shadow: var(--sch-pop);
}
.ls-card__in { display: flex; flex-direction: column; }
.ls-wer { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ls-tile { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #E3E7EC; color: #3A4250; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
/* leer (Sperre, noch kein Name): neutraler grauer Kreis mit Person – keine Farbe außer dem Akzent */
.ls-tile.is-mark { background: #E3E7EC; color: #5E6673; }
.ls-tile__ico { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ls-wer__t { min-width: 0; }
.ls-name { margin: 0; font-size: var(--t-20); line-height: 1.2; overflow-wrap: anywhere; }
.ls-meta { margin: 3px 0 0; }
.ls-form { display: flex; flex-direction: column; margin-top: 20px; }
.ls-row { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.ls-form > .ls-row:first-child, .ls-form > input + .ls-row { margin-top: 0; }
.ls-feldbox { position: relative; flex: 1; min-width: 0; }
.ls-input { height: 38px; font-size: var(--t-16); }
.ls-input--pass:not(:placeholder-shown) { letter-spacing: .3em; }
.ls-go { width: 38px; height: 38px; }
.ls-go svg { width: 18px; height: 18px; }
.ls-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 6px; border: 0; border-radius: 5px; background: none; color: var(--ink-2); font-family: var(--font); font-size: var(--t-13); cursor: pointer; }
.ls-show:hover { color: var(--ink); background: var(--grund-2); }
.ls-feldbox:has(.ls-show) .ls-input { padding-right: 84px; }
.ls-err { margin: 8px 0 0; font-size: var(--t-13); font-weight: 700; color: var(--rot); }
.ls-err:empty { display: none; }
.ls-hint { margin: 10px 0 0; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.ls-consent { margin: 12px 0 0; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.ls-submit { margin-top: 16px; }
.ls-sug { font-size: var(--t-13); }
/* Dienststelle: „Finanzamt [Ort]“ im Feld (amtInput aus app.js) */
.ls-feldbox--amt .amtin { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--linie-2); font-size: var(--t-16); }
.ls-feldbox--amt .amtin:focus-within { box-shadow: inset 0 0 0 2px var(--blau); }
.ls-feldbox--amt .amtin.is-bad { box-shadow: inset 0 0 0 2px var(--rot); }
.ls-feldbox--amt .amtin__in { flex: 1; width: auto; min-width: 0; padding: 0; background: transparent; box-shadow: none; font-size: var(--t-16); }
.ls-feldbox--amt .amtin__in:focus { box-shadow: none; background: transparent; }
/* Einladungscode: sechs Kästchen, darüber das echte Feld */
.ls-code { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ls-code__in { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; opacity: 0; cursor: text; }
.ls-code__cell { display: grid; place-items: center; height: 40px; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--linie-2); font-family: var(--font-eng); font-size: 20px; font-weight: 700; color: var(--ink); }
.ls-code__cell.is-next { box-shadow: inset 0 0 0 2px var(--blau); }
.ls-code:has(.ls-code__in[aria-invalid="true"]) .ls-code__cell { box-shadow: inset 0 0 0 2px var(--rot); }
/* Wechsel unter der Karte */
.ls-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 14px 0 0; font-size: var(--t-13); color: var(--ink-2); }
.ls-alt__b { margin: 0; padding: 4px 2px; border: 0; background: none; color: var(--ink-2); font-family: var(--font); font-size: var(--t-13); cursor: pointer; }
a.ls-alt__b { text-decoration: none; }
.ls-alt__b:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ls-alt__b.is-busy::after { content: " …"; }
.ls-wake { text-decoration: none; }

/* Fuß: Dienststelle links, Pflichtlinks rechts */
.ls-foot {
  position: absolute; left: 28px; right: 24px; bottom: 22px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: var(--t-13); color: var(--ink-2);
}
.ls-amt { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.ls-amt__mark svg { display: block; width: 22px; height: 22px; }
.ls-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ls-legal a { color: var(--ink-2); text-decoration: none; }
.ls-legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* Sperren in Fiskus: Fuß ohne Links */
.ls--os .ls-amt { position: absolute; left: 28px; bottom: 22px; z-index: 1; font-size: var(--t-13); color: var(--ink-2); }

/* Große Schirme: die Gruppe wächst wie Fiskus (--os-z) */
@media (min-width: 2200px) and (min-height: 1200px) { .ls-group, .ls-foot, .ls--os .ls-amt { zoom: 1.15; } }
@media (min-width: 3200px) and (min-height: 1800px) { .ls-group, .ls-foot, .ls--os .ls-amt { zoom: 1.6; } }

/* ================= Telefon und schmale Fenster ================= */
@media (max-width: 560px) {
  .ls-scene { object-position: 62% bottom; }
  .ls-group { padding: calc(24px + env(safe-area-inset-top)) 16px 24px; }
  .ls-dienst { font-size: var(--t-13); }
  .ls-date { font-size: var(--t-16); }
  .ls-card { width: 100%; margin-top: 24px; padding: 22px 20px 18px; }
  .ls-foot, .ls--os .ls-amt { position: static; flex-direction: column; justify-content: center; gap: 8px; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; }
  .ls-legal { justify-content: center; }
}
/* niedrig (Telefon quer): Uhr kleiner, weniger Luft */
@media (max-height: 520px) {
  .ls-group { padding-top: 16px; padding-bottom: 24px; }
  .ls-clock { margin-top: 12px; font-size: 64px; }
  .ls-date { margin-top: 4px; font-size: var(--t-14); }
  .ls-card { margin-top: 16px; }
  .ls-foot { position: static; flex: none; padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
}

/* Touch: Wechselzeile, Pflichtlinks, Anmelden und Pfeil mindestens 40–44 px hoch */
@media (pointer: coarse) {
  .ls-alt { gap: 0 4px; margin-top: 8px; }
  .ls-alt__b { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .ls-legal { gap: 0 4px; }
  .ls-legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .ls-card .h-knopf--voll { height: 44px; }
  .ls-input, .ls-feldbox--amt .amtin { height: 44px; }
  .ls-go { width: 44px; height: 44px; }
  .ls-code__cell { height: 44px; }
}

/* ================= Statische Kopie (index.php, ohne JavaScript) ================= */
.ls-noscript { max-width: 34em; margin: 16px auto 0; padding: 12px 16px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: var(--t-14); line-height: 1.45; box-shadow: var(--sch-pop); }

/* assets/css/pages.css */
/* finanzamt-simulator.de – Programme aus app.js in der Gestaltung „Hell“:
   Schichtbuch (h-sb-*), Neue Schicht (Dialog), Intranet mit Aushängen und Bestenliste (h-in-*), Ernennungsurkunde.
   Listen, Sätze und Balken statt Tabellen und Kacheln; eine Primäraktion je Ansicht. Tokens und Bausteine: app.css. */

/* ================= Schichtbuch ================= */
.os .oswin .oswin__body.view.h-sb { padding: 0; background: var(--weiss); container-type: inline-size; container-name: sb; }
.h-sb-raster { display: grid; grid-template-columns: minmax(0, 1fr) var(--w-panel); min-height: 100%; }
.h-sb-haupt { min-width: 0; padding: 28px 32px 40px; }
.h-sb-seite { min-width: 0; padding: 28px 24px 40px; background: var(--grund); border-left: 1px solid var(--linie); }
.h-sb-kopf { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding-bottom: 24px; }
.h-sb-gruss { min-width: 0; }
.h-sb-gruss h2 { font-size: var(--t-26); letter-spacing: -.01em; }
.h-sb-bilanz { margin: 6px 0 0; max-width: 62ch; color: var(--ink-2); }
.h-sb-aktionen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.h-sb-code { display: flex; align-items: center; gap: 6px; }
.h-sb-code__in { width: 104px; font-family: var(--font-eng); font-weight: 700; font-size: var(--t-16); letter-spacing: .1em; text-transform: uppercase; }
.h-sb-code__in::placeholder { letter-spacing: .1em; }
.h-sb-umlauf { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 10px 14px; border-radius: 8px; background: var(--grund); color: var(--ink-2); }
.h-sb-umlauf .h-i { color: var(--blau); }
.h-sb-kz { margin: 0 0 6px; padding: 0 12px; }
.h-sb-warte { margin: 0; padding: 12px; color: var(--ink-2); }
.h-sb-liste:focus-visible { outline-offset: 4px; border-radius: 8px; }
/* Zeile: Code · Name, Dienststelle, Stapel, Besetzung · Fortschritt · Befehle */
.h-sb-zeile { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) 190px auto; align-items: center; gap: 16px; padding: 14px 12px; border-radius: 8px; cursor: pointer; transition: background-color var(--t-kurz) var(--aus); }
.h-sb-zeile + .h-sb-zeile::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--linie); }
.h-sb-zeile:hover { background: var(--grund); }
.h-sb-zeile:hover::before, .h-sb-zeile:hover + .h-sb-zeile::before, .h-sb-zeile.is-an::before, .h-sb-zeile.is-an + .h-sb-zeile::before { opacity: 0; }
.h-sb-zeile.is-an { background: var(--blau-zart); }
/* feste Code-Spalte: alle Namen beginnen auf derselben Linie */
.h-sb-zeile__code { align-self: start; justify-self: start; margin-top: 2px; }
.h-sb-zeile__mitte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h-sb-zeile__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-16); }
.h-sb-zeile__mitte .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-sb-crew { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--t-13); color: var(--ink-2); }
.h-sb-crew .h-av { width: 22px; height: 22px; font-size: 9.5px; }
.h-sb-crew .h-av + .h-av { margin-left: -8px; box-shadow: 0 0 0 2px var(--weiss); }
.h-sb-zeile__stand { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.h-sb-zeile__zahl { font-size: var(--t-13); color: var(--ink); }
.h-sb-zeile.is-erledigt .h-sb-zeile__name, .h-sb-zeile.is-erledigt .h-sb-zeile__zahl { color: var(--ink-2); }
.h-sb-zeile.is-erledigt .h-balken > i { background: var(--gruen); }
.h-sb-zeile__akt { display: flex; align-items: center; gap: 2px; visibility: hidden; }
/* inherit statt visible: ein minimiertes (verstecktes) Fenster darf die Knöpfe nicht durchscheinen lassen */
.h-sb-zeile.is-an .h-sb-zeile__akt, .h-sb-zeile:hover .h-sb-zeile__akt { visibility: inherit; }
.h-sb-zeile__akt .h-sb-mehr { width: 30px; }
/* Leerzustand: Hausmitteilung auf dem Tisch, darunter die erste Schicht */
.h-sb-willkommen { padding: 28px; border-radius: var(--r-fenster); }
.h-sb-willkommen .doc { margin: 0 auto; }
.h-sb-los { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 12px 0; }
/* Dienstantritt */
.h-sb-antritt { position: relative; margin: 0 0 24px; padding: 18px 20px; border-radius: var(--r-fenster); background: var(--grund); }
.h-sb-antritt__t h3 { font-size: var(--t-16); }
.h-sb-antritt__t p { margin: 4px 0 0; color: var(--ink-2); max-width: 62ch; }
.h-sb-antritt__zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.h-sb-antritt__l { font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.h-sb-antritt .amtin__in { background: var(--weiss); }
.h-sb-antritt.is-done .amtin__in { background: transparent; box-shadow: none; }
/* Seitenleiste: Aushänge und Auszeichnungen */
.h-sb-block + .h-sb-block { margin-top: 32px; }
.h-sb-block__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.h-sb-block__kopf .h-kopfzeile { margin: 0; }
.h-sb-block__kopf .h-link { font-size: var(--t-13); }
.h-sb-block__satz { margin: 10px 0 0; font-size: var(--t-13); color: var(--ink-2); }
.h-sb-news { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.h-sb-news__i { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
.h-sb-news__d { font-size: var(--t-13); color: var(--ink-3); }
.h-sb-news__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.h-sb-news__p { margin: 2px 0 0; font-size: var(--t-13); color: var(--ink-2); }
.h-sb-achv { display: flex; flex-direction: column; margin: 12px 0 0; padding: 0; list-style: none; }
.h-sb-achv li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linie); }
.h-sb-achv li:first-child { border-top: 0; }
.h-sb-achv__z { color: var(--ink-2); }
.h-sb-achv b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-14); }
@container sb (max-width: 940px) {
  .h-sb-raster { grid-template-columns: minmax(0, 1fr); }
  .h-sb-seite { border-left: 0; border-top: 1px solid var(--linie); }
}
@container sb (max-width: 640px) {
  .h-sb-haupt { padding: 20px 16px 28px; }
  .h-sb-zeile { grid-template-columns: 80px minmax(0, 1fr) auto; grid-template-areas: 'code mitte akt' 'code stand akt'; row-gap: 8px; }
  .h-sb-zeile__code { grid-area: code; }
  .h-sb-zeile__mitte { grid-area: mitte; }
  .h-sb-zeile__stand { grid-area: stand; }
  .h-sb-zeile__akt { grid-area: akt; }
}
.os.is-mobile .h-sb-raster { grid-template-columns: minmax(0, 1fr); }
.os.is-mobile .h-sb-haupt { padding: 20px 12px 28px; }
.os.is-mobile .h-sb-seite { padding: 24px 16px 32px; border-left: 0; border-top: 1px solid var(--linie); }
.os.is-mobile .h-sb-kopf { padding: 0 4px 20px; }
.os.is-mobile .h-sb-gruss h2 { font-size: var(--t-20); }
.os.is-mobile .h-sb-aktionen { width: 100%; }
.os.is-mobile .h-sb-code { flex: 1; }
.os.is-mobile .h-sb-code__in { flex: 1; width: auto; }
.os.is-mobile .h-sb-zeile__akt { display: none; }
.os.is-mobile .h-sb-willkommen { padding: 12px; }

/* ================= Neue Schicht (Dialog) ================= */
.h-sb-neu { gap: 20px; }
.h-sb-neu__kopf, .h-sb-neu__zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.h-sb-neu__amt .amtin { display: flex; align-items: center; height: 36px; padding: 0 0 0 12px; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--linie-2); }
.h-sb-neu__amt .amtin:focus-within { box-shadow: inset 0 0 0 2px var(--blau); }
.h-sb-neu__amt .amtin__in { flex: 1 1 0; width: auto; background: transparent; box-shadow: none; }
.h-sb-neu__amt .amtin__in:focus { box-shadow: none; background: transparent; }
.h-sb-neu__amt .amtin__sug { margin-right: 10px; }
/* Auswahl als ruhige Zeilen (kein Kachelraster) */
.h-sb-optionen { display: flex; flex-direction: column; gap: 2px; }
.h-sb-option {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 2px 12px; width: 100%; padding: 10px 12px; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); font-size: var(--t-14);
  transition: background-color var(--t-kurz) var(--aus);
}
.h-sb-option:hover { background: var(--grund); }
.h-sb-option:focus-visible { outline-offset: -2px; }
.h-sb-option[aria-checked="true"] { background: var(--blau-zart); }
.h-sb-option > .opt__dot { margin-top: 1px; border-radius: 50%; }
.h-sb-option__name { display: flex; flex-direction: column; min-width: 0; }
.h-sb-option--paket .h-sb-option__name { flex-direction: row; align-items: center; }
.h-sb-option__desc { font-size: var(--t-13); color: var(--ink-2); }
.h-sb-option--paket { grid-template-columns: 18px minmax(0, 1fr) auto; }
.h-sb-option--paket .h-sb-option__desc { grid-column: 2 / 3; }
.h-sb-option__zahl { grid-column: 3; grid-row: 1; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.sq--mix { background: conic-gradient(var(--art-est) 0 25%, var(--art-ust) 0 50%, var(--art-einspruch) 0 75%, var(--art-bp) 0); }
/* Aktenstapel (N 8.3, 20.6): Stapel oben, darunter Sammlungen als Zeilen; die gewählte Sammlung klappt ihre Kapitel auf.
   Keine Karten-Kacheln: Zeilen, Haarlinie links für die Kapitel, schmale Balken, Schloss als Zeichen + Text. */
.h-sb-stapel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.h-sb-stapel__kz { margin: 14px 0 4px; padding: 0 12px; }
.h-sb-chip { display: inline-block; flex: none; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--ink-3)) 62%, var(--weiss)), var(--c, var(--ink-3))); }
.h-sb-option--samm { grid-template-columns: 18px minmax(0, 1fr) 132px; }
.h-sb-option--samm .h-sb-option__desc { grid-column: 2 / 3; }
/* aufgeklappte Sammlung: die Auswahl zeigt die Kapitelzeile, die Sammlung nur ihren Punkt (keine zwei blauen Flächen) */
.h-sb-option--samm[aria-controls][aria-checked="true"] { background: transparent; }
.h-sb-option--samm[aria-controls][aria-checked="true"]:hover { background: var(--grund); }
.h-sb-option__stand { display: flex; flex-direction: column; gap: 6px; grid-column: 3; grid-row: 1 / 3; align-self: center; min-width: 0; }
.h-sb-option__stand-zahl, .h-sb-kap__stand-zahl { font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.h-sb-saison { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--ink-2); white-space: nowrap; }
.h-sb-saison .h-i { color: var(--ink-3); }
/* Kapitel: verschachtelte Radiogruppe unter der gewählten Sammlung */
.h-sb-kapitel { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 21px; padding-left: 9px; border-left: 1px solid var(--linie-2); }
.h-sb-kapitel[hidden] { display: none; }
.h-sb-kap {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) 132px; align-items: start; gap: 2px 12px; width: 100%; padding: 9px 12px; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); font-size: var(--t-14);
  transition: background-color var(--t-kurz) var(--aus);
}
.h-sb-kap:hover { background: var(--grund); }
.h-sb-kap:focus-visible { outline-offset: -2px; }
.h-sb-kap[aria-checked="true"] { background: var(--blau-zart); }
.h-sb-kap > .opt__dot { margin-top: 1px; border-radius: 50%; }
.h-sb-kap__name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.h-sb-kap__desc, .h-sb-kap__schloss { grid-column: 2 / 3; font-size: var(--t-13); color: var(--ink-2); }
.h-sb-kap__schloss { display: flex; align-items: flex-start; gap: 6px; }
.h-sb-kap__schloss .h-i { flex: none; margin-top: 1px; color: var(--ink-2); }
.h-sb-kap__stand { display: flex; flex-direction: column; gap: 6px; grid-column: 3; grid-row: 1 / 3; align-self: center; min-width: 0; }
.h-sb-kap.is-zu { cursor: default; }
.h-sb-kap.is-zu:hover { background: transparent; }
.h-sb-kap.is-zu .h-sb-kap__name b { color: var(--ink-2); }
.h-sb-kap.is-zu > .opt__dot { background: var(--grund); box-shadow: inset 0 0 0 1.5px var(--linie); }
.h-sb-kap.is-zu .h-balken > i { background: var(--ink-4); }
/* Stufenpunkte ●●○○○ */
.h-sb-stufe { display: inline-flex; align-items: center; gap: 3px; }
.h-sb-stufe i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--linie-2); }
.h-sb-stufe i.is-an { background: var(--ink-2); }
.h-sb-stufe i.is-halb { background: var(--ink-4); }
/* Auffüllen und echter Umfang */
.h-sb-auffuellen { margin: 4px 12px 0; }
.h-sb-auffuellen[hidden] { display: none; }
.h-sb-umfang { margin: 0 12px; font-size: var(--t-13); color: var(--ink-2); }
.h-sb-umfang[hidden] { display: none; }
.h-sb-umfang.is-warn { color: var(--bernstein); }
@media (max-width: 560px) {
  .h-sb-neu__kopf, .h-sb-neu__zeile { grid-template-columns: minmax(0, 1fr); }
  /* einspaltig: Fortschritt unter die Beschreibung */
  .h-sb-option--samm, .h-sb-kap { grid-template-columns: 18px minmax(0, 1fr); }
  .h-sb-option__stand, .h-sb-kap__stand { grid-column: 2 / 3; grid-row: auto; flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
  .h-sb-option__stand .h-balken, .h-sb-kap__stand .h-balken { flex: 1 1 auto; max-width: 160px; }
  .h-sb-kapitel { margin-left: 8px; padding-left: 6px; }
  .h-sb-saison { margin-left: 0; }
}

/* ================= Intranet ================= */
.os .oswin .oswin__body.view.h-in { padding: 0; background: var(--weiss); }
.h-in-rahmen { max-width: 1240px; margin: 0 auto; padding: 28px 32px 40px; container-type: inline-size; container-name: in; }
.h-in-kopf { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; }
.h-in-kopf__ico svg { display: block; width: 44px; height: 44px; }
.h-in-kopf h2 { font-size: var(--t-26); letter-spacing: -.01em; }
.h-in-kopf .h-meta { margin: 4px 0 0; }
.h-in-raster { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.h-in-haupt { min-width: 0; }
.h-in-zeile1 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 12px; }
.h-in-lead { margin: 0 0 12px; color: var(--ink-2); max-width: 62ch; }
.h-in-zeile1 .h-in-lead { margin: 0; }
/* Aushänge */
.h-in-news { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.h-in-news__i { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--linie); }
.h-in-news__i:first-child { border-top: 0; padding-top: 4px; }
.h-in-news__d { display: flex; flex-direction: column; line-height: 1.15; color: var(--ink-2); font-size: var(--t-13); }
.h-in-news__d b { font-family: var(--font-eng); font-size: var(--t-26); color: var(--ink); }
.h-in-news__t h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: var(--t-16); }
.h-in-news__t p { margin: 6px 0 0; color: var(--ink-2); max-width: 68ch; }
.h-in-news__t p strong { color: var(--ink); }
/* Seitenleiste */
.h-in-seitenleiste { display: flex; flex-direction: column; gap: 28px; min-width: 0; padding: 20px 22px; border-radius: var(--r-fenster); background: var(--grund); }
.h-in-box .h-kopfzeile { margin: 0 0 10px; }
.h-in-box p { margin: 6px 0 0; color: var(--ink-2); }
.h-in-links { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.h-in-ich { display: flex; align-items: center; gap: 12px; margin: 0 0 6px !important; }
.h-in-ich > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.h-in-ich b { color: var(--ink); }
/* Bestenliste als Liste */
.h-in-rang { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.h-in-rang__i { position: relative; display: grid; grid-template-columns: 36px 28px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border-radius: 8px; }
.h-in-rang__i + .h-in-rang__i::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--linie); }
.h-in-rang__i.is-ich { background: var(--blau-zart); }
.h-in-rang__i.is-ich::before, .h-in-rang__i.is-ich + .h-in-rang__i::before { opacity: 0; }
.h-in-rang__pos { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--font-eng); font-weight: 700; font-size: var(--t-16); color: var(--ink-2); }
.h-in-rang__i.is-oben .h-in-rang__pos { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--linie-2); }
.h-in-rang__wer, .h-in-rang__zahl { display: flex; flex-direction: column; min-width: 0; }
.h-in-rang__wer b, .h-in-rang__wer .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-in-rang__wer b { font-size: var(--t-16); }
.h-in-rang__zahl { align-items: flex-end; text-align: right; }
.h-in-rang__zahl b { font-size: var(--t-16); white-space: nowrap; }
.h-in-fuss { margin: 14px 12px 0; }
@container in (max-width: 860px) {
  .h-in-raster { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@container in (max-width: 520px) {
  .h-in-rang__i { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .h-in-rang__i > .h-av { display: none; }
  .h-in-news__i { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
}
.os.is-mobile .h-in-rahmen { padding: 20px 16px 28px; }
.os.is-mobile .h-in-kopf h2 { font-size: var(--t-20); }

/* ================= Ernennungsurkunde (Papier im Dialog) ================= */
.modal--cert .modal__body { padding: 24px; background: var(--tisch); }
.cert {
  position: relative; padding: 40px 32px; background: var(--paper); box-shadow: var(--sch-papier);
  font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.4; color: #1d2329; text-align: center;
}
.cert p { margin: 0; }
.cert__seal { display: flex; justify-content: center; margin: 0 0 18px; color: #1d4e5f; }
.cert__seal svg { width: 72px; height: 72px; }
.cert__small { margin: 6px 0; font-size: 13px; color: #4a5258; }
.cert .cert__name { margin: 8px 0; font-size: 26px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cert .cert__rank { margin: 8px 0 18px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.cert__sign { margin-top: 28px; }
.cert .cert__sig { font-size: 28px; line-height: 1.1; color: #1f3f9a; }
.cert__stampzone { position: absolute; right: 16px; bottom: 20px; width: 200px; height: 100px; pointer-events: none; }
.cert .stampfx__inner { padding: 8px 14px 6px; border-width: 3px; }
.cert .stampfx__text { font-size: 24px; }
@media (max-width: 560px) {
  .modal--cert .modal__body { padding: 16px; }
  .cert { padding: 32px 20px; }
  .cert__stampzone { right: 8px; bottom: 12px; }
}

/* assets/css/case.css */
/* finanzamt-simulator.de – Fiskus „Hell“: Dialoge der Vorgänge (game.js)
   Prüfbericht (pb-*, v2 mit Kopfzeile, „Zum Mitnehmen“, Altakten-Hinweis), Briefdialog und Briefansicht, Einladung. Posteingang, Archiv und Messenger: os-vorgaenge.css;
   Akte: akte.css. Farben nur mit Bedeutung: Blau = handeln, Grün = richtig, Bernstein = Hinweis, Rot = Fehler/Stempel. */

.eta { font-variant-numeric: tabular-nums; }

/* b) Legende nach dem Abschluss (Hinweiszeile der Akte, Amsel) */
.lg { display: inline-block; width: 12px; height: 8px; margin-right: 4px; border: 2px solid currentColor; border-radius: 0; vertical-align: 0; }
.lg--tell { color: var(--ok); }
.lg--wrong { color: var(--bad); }


/* ================= Einladung ================= */
.invite { display: flex; flex-direction: column; gap: 16px; }
.invite__code { display: inline-flex; align-self: flex-start; gap: 6px; }
.invite__code span { display: grid; place-items: center; width: 44px; height: 56px; border-radius: 8px; background: var(--grund-2); color: var(--ink); font: 700 28px/1 var(--font-eng); }
.invite__row { display: flex; gap: 8px; align-items: center; }
.invite__row .h-feld { flex: 1; min-width: 0; font-size: var(--t-13); }
.invite__hint { margin: 0; font-size: var(--t-13); line-height: 1.5; color: var(--ink-2); }

/* ================= Briefe: Dialog (Formular links, Vorschau auf der Leinwand) und Ansicht ================= */
.modal--letter .modal__body, .modal--compose .modal__body { padding: 0; }
.letterview { display: flex; justify-content: center; align-items: flex-start; padding: 24px; background: var(--tisch); max-height: calc(100vh - 200px); overflow: auto; }
.letterview .doc { --zoom: .9; }
.letterview--mehrere { flex-direction: column; align-items: center; gap: 24px; justify-content: flex-start; }
.compose { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 520px; }
.compose__form { padding: 20px; border-right: 1px solid var(--linie); overflow-y: auto; max-height: calc(100vh - 200px); }
.compose__preview { display: flex; justify-content: center; align-items: flex-start; padding: 24px; background: var(--tisch); overflow: auto; max-height: calc(100vh - 200px); }
.compose__preview .doc { --zoom: .76; }
.compose__req { display: flex; flex-direction: column; gap: 8px; }
.compose__req p { margin: 0; }
.reqlist { margin: 0; padding-left: 18px; font-size: var(--t-14); line-height: 1.5; }
.compose__tools { margin: 0; font-size: var(--t-13); color: var(--ink-2); }

/* ================= Prüfbericht ================= */
.modal.pb-modal { width: min(1240px, calc(100vw - 48px)); }
.pb-modal .modal__inner { display: flex; flex-direction: column; height: min(920px, calc(100vh - 48px)); }
.pb-modal .modal__body { flex: 1; min-height: 0; max-height: none; padding: 0; overflow: hidden; display: flex; }
.pb { position: relative; flex: 1; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.pb-zu { position: absolute; right: 12px; top: 12px; z-index: 3; }
.pb-kopf { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; padding: 30px 48px 24px; border-bottom: 1px solid var(--linie); }
.pb-kopf.ohne-bescheid { grid-template-columns: minmax(0, 1fr); padding-right: 72px; }
.pb-kopf__l { position: relative; min-width: 0; }
.pb-kopf__l > .h-meta { margin: 0; padding-right: 8px; }
.pb-titel { margin: 8px 0 0; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; }
.pb-zitat { margin: 10px 0 0; max-width: 70ch; font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }
.pb-ergebnis { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 28px; margin-top: 20px; }
.pb-punkte { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.pb-punkte__z { font-size: 72px; line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pb-punkte__pz { margin-right: 8px; font-style: normal; font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink); }
.pb-punkte > span { display: flex; flex-direction: column; font-size: var(--t-14); line-height: 1.3; color: var(--ink-2); }
.pb-punkte > span b { font-size: var(--t-16); color: var(--ink); }
.pb-urteil b { display: block; font-size: var(--t-20); }
.pb-urteil span { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--t-14); }
.pb-urteil .is-ok { color: var(--gruen); }
.pb-urteil .is-nein { color: var(--rot); }
.pb-stempel {
  align-self: center; margin-left: auto; padding: 7px 12px 6px; border: 3px solid var(--stamp, var(--rot)); border-radius: 6px; color: var(--stamp, var(--rot));
  font: 700 22px/1 var(--font-eng); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: rotate(var(--rot)) scale(1.6); mix-blend-mode: multiply; pointer-events: none;
}
.pb-stempel.is-hit { animation: pb-stempel 220ms var(--feder) forwards; }
.pb-stempel.is-static { animation: none; opacity: .88; transform: rotate(var(--rot)); }
@keyframes pb-stempel { from { opacity: 0; transform: rotate(var(--rot)) scale(1.6); } to { opacity: .88; transform: rotate(var(--rot)) scale(1); } }
[data-theme="nacht"] .pb-stempel { mix-blend-mode: normal; }
.pb-ertrag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0; font-size: var(--t-16); color: var(--ink-2); }
.pb-ertrag b { color: var(--ink); }
.pb-ertrag__paar { white-space: nowrap; }
.pb-p { color: var(--ink-4); }
.pb-muenze { flex: none; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F2CF79, #C9962A); box-shadow: inset 0 0 0 1px rgba(120, 80, 0, .35); }
.pb-mess { display: grid; grid-template-columns: minmax(0, 300px); gap: 32px; margin-top: 18px; }
.pb-mess__e { font-size: var(--t-13); color: var(--ink-2); }
.pb-mess__e > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pb-mess__e b { color: var(--ink); }
.pb-bescheid { align-self: start; display: grid; gap: 8px; min-width: 0; }
.pb-bescheid > .h-meta { margin: 0; }
.pb-bescheid__blatt { display: block; padding: 0; border: 0; border-radius: 3px; background: none; cursor: zoom-in; }
.pb-bescheid__blatt .h-blattvorschau { border-radius: 3px; }
.pb-bescheid__fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--t-13); color: var(--ink-2); }
.pb-bescheid__fuss .h-link { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pb-inhalt { min-height: 0; overflow-y: auto; padding: 20px 48px 12px; }
.pb-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; font-size: var(--t-20); }
.pb-h small { font-size: var(--t-14); font-weight: 400; color: var(--ink-2); }
.pb-verlust { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 104px; gap: 0 24px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--linie); }
.pb-verlust.ohne-beweis { grid-template-columns: 28px minmax(0, 1fr) 104px; }
.pb-verlust__z { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.pb-verlust__z.is-teil { background: var(--bernstein-zart); color: var(--bernstein); }
.pb-verlust__z.is-null { background: var(--rot-zart); color: var(--rot); }
.pb-verlust__text { min-width: 0; }
.pb-verlust h4 { margin: 3px 0 0; font-size: var(--t-16); }
.pb-verlust__text > .h-meta { margin: 2px 0 0; }
.pb-verlust ul, .pb-frei__b ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pb-verlust li, .pb-frei__b li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--t-14); line-height: 1.4; }
.pb-verlust li .h-i, .pb-frei__b li .h-i { flex: none; margin-top: 3px; stroke-width: 2.2; }
.pb-verlust li.is-ok .h-i, .pb-frei__b li .h-i { color: var(--gruen); }
.pb-verlust li.is-nein .h-i { color: var(--rot); }
.pb-verlust li.is-mehr { padding-left: 22px; color: var(--ink-3); }
.pb-erkl { max-width: 64ch; margin: 8px 0 0; font-size: var(--t-14); line-height: 1.5; color: var(--ink-2); }
.pb-verlust__pkt { display: grid; justify-items: end; gap: 2px; text-align: right; }
.pb-verlust__pkt b { font-size: var(--t-26); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pb-verlust__pkt b span { font-size: var(--t-16); font-weight: 400; color: var(--ink-3); }
.pb-beweis { display: flex; gap: 14px; }
.pb-karte { display: grid; gap: 8px; }
.pb-karte.is-gestrichen .h-blattvorschau::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(196, 43, 31, .75) calc(50% - 1px), rgba(196, 43, 31, .75) calc(50% + 1px), transparent calc(50% + 1px)); }
/* Ausschnitt um eine Stelle: Verweis-Rahmen wie im Betrachter (rot = übersehen, grün = gefunden) */
.pb-karte .h-blattvorschau { position: relative; }
.pb-karte__rahmen { position: absolute; z-index: 2; border-radius: 3px; box-shadow: 0 0 0 2px var(--rot); background: rgba(196, 43, 31, .06); pointer-events: none; }
.pb-karte__rahmen.is-ok { box-shadow: 0 0 0 2px var(--gruen); background: rgba(27, 107, 58, .06); }
.pb-zeichen { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-13); font-weight: 700; }
.pb-zeichen .h-i { stroke-width: 2.4; }
.pb-zeichen.is-ok { color: var(--gruen); }
.pb-zeichen.is-nein { color: var(--rot); }
.pb-frei { display: flex; align-items: center; gap: 16px; padding: 14px 0; font-size: var(--t-14); color: var(--ink-2); }
.pb-frei > b { display: flex; align-items: center; gap: 8px; font-size: var(--t-16); color: var(--ink); white-space: nowrap; }
.pb-frei > b .h-i { color: var(--gruen); }
.pb-frei > span { min-width: 0; }
.pb-frei__auf { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pb-frei__auf:hover { background: var(--grund); }
.pb-frei__auf .h-i { transition: transform var(--t-kurz) var(--aus); }
.pb-frei__auf.is-auf .h-i { transform: rotate(180deg); }
.pb-frei__det { display: grid; gap: 12px; padding: 0 0 14px 32px; }
.pb-frei__b > b { font-size: var(--t-14); }
.pb-frei__b li { font-size: var(--t-13); }
/* Prüfbericht v2: Hinweis für Altakten, „Zum Mitnehmen“, Anlass einer Maßnahme, gespeicherter Bescheid als Zeile */
.pb-alt { display: flex; gap: 8px; align-items: flex-start; max-width: 72ch; margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--grund); font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.pb-alt .h-i { flex: none; margin-top: 1px; color: var(--ink-3); }
.pb-lernen { margin: 18px 0 4px; padding: 14px 16px; border-radius: 10px; background: var(--blau-zart); }
.pb-lernen__t { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--t-16); color: var(--ink); }
.pb-lernen__t .h-i { color: var(--blau); }
.pb-lernen ul { display: grid; gap: 6px; margin: 0; padding: 0 0 0 22px; font-size: var(--t-14); line-height: 1.5; color: var(--ink); }
.pb-lernen li p { margin: 0; }
.pb-anlass { color: var(--ink-3); }
.pb-bescheid--zeile { align-self: start; padding: 14px 16px; border-radius: 10px; background: var(--grund); }
.pb-bescheid__summe { margin: 0; font-size: var(--t-20); font-weight: 700; font-variant-numeric: tabular-nums; }
.pb-urteil span { align-items: flex-start; max-width: 60ch; line-height: 1.35; }
.pb-urteil span .h-i { flex: none; margin-top: 2px; }
/* eingebettet (FA.game.renderPruefbericht, Tests): ohne Modalrahmen, der Inhalt fließt */
.pb.pb--eingebettet { display: block; }
.pb--eingebettet .pb-inhalt { overflow: visible; }
.pb-fuss { display: flex; align-items: center; gap: 8px; padding: 16px 48px; border-top: 1px solid var(--linie); background: var(--grund); }
.pb-naechst { margin: 0 12px 0 auto; text-align: right; font-size: var(--t-13); line-height: 1.3; color: var(--ink-2); }
.pb-naechst b { display: block; font-size: var(--t-14); color: var(--ink); }
.pb-fuss .h-knopf--primaer .h-i { margin-left: 2px; }

@media (max-width: 1180px) {
  .pb-kopf { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 26px 32px 20px; }
  .pb-inhalt { padding: 18px 32px 12px; }
  .pb-fuss { padding: 14px 32px; }
  .pb-verlust { grid-template-columns: 28px minmax(0, 1fr) 96px; }
  .pb-beweis { grid-column: 2 / 3; grid-row: 2; margin-top: 12px; }
}
@media (max-width: 860px) {
  .pb-kopf { grid-template-columns: minmax(0, 1fr); }
  .pb-bescheid { max-width: 380px; }
}
/* Niedrige oder schmale Schirme: der ganze Bericht scrollt, der Fuß mit dem nächsten Schritt bleibt stehen */
@media (max-height: 820px), (max-width: 760px) {
  .pb { grid-template-rows: auto auto auto; overflow-y: auto; overscroll-behavior: contain; }
  .pb-inhalt { overflow: visible; min-height: auto; }
  .pb-fuss { position: sticky; bottom: 0; z-index: 2; }
}
@media (max-width: 760px) {
  .modal-back:has(> .pb-modal) { padding: 0; }
  .modal.pb-modal { width: 100%; }
  .pb-bescheid { min-width: 0; max-width: 100%; overflow: hidden; }
  .pb-bescheid__blatt { max-width: 100%; overflow: hidden; }
  .pb-bescheid__blatt .h-blattvorschau { max-width: 100%; overflow: hidden; }
  .pb-bescheid__fuss { flex-wrap: wrap; }
  .pb-punkte__pz { font-size: 26px; }
  .compose { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .compose__form { max-height: none; border-right: 0; border-bottom: 1px solid var(--linie); }
  .compose__preview { max-height: none; }
  .invite__code span { width: 38px; height: 50px; font-size: 24px; }
  .invite__row { flex-direction: column; align-items: stretch; }
  .modal.pb-modal { width: 100vw; }
  .pb-modal .modal__inner { height: 100vh; height: 100dvh; border-radius: 0; }
  .pb-kopf { padding: 20px 16px 16px; gap: 16px; }
  .pb-titel { font-size: 24px; padding-right: 32px; }
  .pb-punkte__z { font-size: 56px; }
  .pb-mess { grid-template-columns: 1fr; gap: 12px; }
  .pb-inhalt { padding: 14px 16px 8px; }
  .pb-verlust { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0 12px; }
  .pb-verlust__pkt b { font-size: var(--t-20); }
  .pb-beweis { grid-column: 2 / -1; }
  .pb-frei { flex-wrap: wrap; gap: 6px 12px; }
  .pb-fuss { flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .pb-naechst { display: none; }
  .pb-fuss .h-knopf--primaer { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .pb-stempel.is-hit { animation: none; opacity: .88; transform: rotate(var(--rot)); } }
html.no-motion .pb-stempel.is-hit { animation: none; opacity: .88; transform: rotate(var(--rot)); }

/* assets/css/docs.css */
/* In-World-Dokumente: Papier, Belege, Formulare, Bescheide – so nah am Original wie möglich.
   Sie behalten bewusst ihre eigenen Schriften (Arial/Helvetica im Geschäftsbrief, Antiqua im Vertrag, Thermodrucker-Monospace
   am Kassenbon, Handschrift nur bei Handgeschriebenem) und ihre eigenen Formen.
   Material: Papierton je Sorte (Büropapier weiß, Recyclingpapier der Behörde leicht grau, Thermopapier kühl), feine Körnung
   aus EINER Vektor-Kachel mit Punkten und Fasern (--grain, als Hintergrundbild gekachelt; bewusst ohne SVG-Filter:
   feTurbulence im Hintergrundbild färbt das Blatt unter der Lupe in Chromium schwarz), weicher Schatten,
   Falzkanten bei gefalteten Postsachen, Lochung bei abgehefteten Blättern, Tinte und Stempelfarbe ungleichmäßig (Vektor).
   A4-Maßstab: 720 px = 210 mm (3,43 px/mm). DIN 5008 Form B: Briefkopf 45 mm, Anschriftfeld 85 × 45 mm ab 20 mm links,
   Informationsblock ab 125 mm, Falzmarken bei 105 und 210 mm, Lochmarke bei 148,5 mm. Kassenbon 80-mm-Rolle ≈ 284 px. */
.doc {
  --zoom: 1; --ink-d: #1a1a1a; --ink-d2: #4a4a46; --ink-d3: #6b6b67; --rule-d: #1a1a1a; --hair-d: #d9d6cc;
  --paper: #fdfdfb; --pen: #1e3794;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%234f4636'%3E%3Cg fill-opacity='.07'%3E%3Ccircle cx='69' cy='157' r='.3'/%3E%3Ccircle cx='66' cy='122' r='.3'/%3E%3Ccircle cx='152' cy='154' r='.4'/%3E%3Ccircle cx='80' cy='20' r='.4'/%3E%3Ccircle cx='145' cy='60' r='.3'/%3E%3Ccircle cx='134' cy='102' r='.3'/%3E%3Ccircle cx='69' cy='5' r='.3'/%3E%3Ccircle cx='86' cy='129' r='.3'/%3E%3Ccircle cx='20' cy='30' r='.3'/%3E%3Ccircle cx='149' cy='27' r='.5'/%3E%3Ccircle cx='158' cy='119' r='.3'/%3E%3Ccircle cx='108' cy='173' r='.4'/%3E%3Ccircle cx='150' cy='26' r='.3'/%3E%3Ccircle cx='127' cy='165' r='.4'/%3E%3Ccircle cx='125' cy='33' r='.3'/%3E%3Ccircle cx='130' cy='3' r='.3'/%3E%3Ccircle cx='15' cy='27' r='.3'/%3E%3Ccircle cx='4' cy='147' r='.4'/%3E%3Ccircle cx='143' cy='168' r='.3'/%3E%3Ccircle cx='79' cy='20' r='.4'/%3E%3Ccircle cx='56' cy='69' r='.3'/%3E%3Ccircle cx='89' cy='162' r='.3'/%3E%3Ccircle cx='102' cy='48' r='.3'/%3E%3Ccircle cx='87' cy='37' r='.3'/%3E%3Ccircle cx='34' cy='180' r='.4'/%3E%3Ccircle cx='25' cy='79' r='.3'/%3E%3Ccircle cx='103' cy='103' r='.3'/%3E%3Ccircle cx='138' cy='92' r='.3'/%3E%3Ccircle cx='54' cy='43' r='.3'/%3E%3Ccircle cx='148' cy='25' r='.3'/%3E%3Ccircle cx='101' cy='112' r='.5'/%3E%3Ccircle cx='80' cy='167' r='.3'/%3E%3Ccircle cx='131' cy='51' r='.4'/%3E%3Ccircle cx='23' cy='78' r='.4'/%3E%3Ccircle cx='152' cy='32' r='.5'/%3E%3Ccircle cx='147' cy='147' r='.3'/%3E%3Ccircle cx='161' cy='141' r='.3'/%3E%3Ccircle cx='32' cy='157' r='.3'/%3E%3Ccircle cx='66' cy='143' r='.4'/%3E%3Ccircle cx='130' cy='142' r='.4'/%3E%3Ccircle cx='72' cy='88' r='.3'/%3E%3Ccircle cx='110' cy='168' r='.4'/%3E%3Ccircle cx='171' cy='28' r='.4'/%3E%3Ccircle cx='68' cy='127' r='.4'/%3E%3Ccircle cx='35' cy='118' r='.5'/%3E%3Ccircle cx='105' cy='166' r='.4'/%3E%3Ccircle cx='44' cy='153' r='.3'/%3E%3Ccircle cx='99' cy='139' r='.3'/%3E%3Ccircle cx='110' cy='21' r='.3'/%3E%3Ccircle cx='139' cy='170' r='.4'/%3E%3Ccircle cx='58' cy='86' r='.3'/%3E%3Ccircle cx='67' cy='71' r='.4'/%3E%3Ccircle cx='77' cy='25' r='.3'/%3E%3Ccircle cx='166' cy='163' r='.3'/%3E%3Ccircle cx='14' cy='34' r='.3'/%3E%3Ccircle cx='155' cy='23' r='.3'/%3E%3Ccircle cx='2' cy='79' r='.3'/%3E%3Ccircle cx='33' cy='7' r='.3'/%3E%3Ccircle cx='38' cy='163' r='.3'/%3E%3Ccircle cx='113' cy='71' r='.4'/%3E%3Ccircle cx='33' cy='73' r='.4'/%3E%3Ccircle cx='80' cy='14' r='.3'/%3E%3Ccircle cx='9' cy='8' r='.3'/%3E%3Ccircle cx='128' cy='124' r='.3'/%3E%3Ccircle cx='28' cy='20' r='.3'/%3E%3Ccircle cx='65' cy='73' r='.3'/%3E%3Ccircle cx='30' cy='14' r='.3'/%3E%3Ccircle cx='102' cy='172' r='.5'/%3E%3Ccircle cx='127' cy='69' r='.4'/%3E%3Ccircle cx='41' cy='163' r='.5'/%3E%3Ccircle cx='56' cy='60' r='.3'/%3E%3Ccircle cx='143' cy='70' r='.4'/%3E%3Ccircle cx='145' cy='26' r='.4'/%3E%3Ccircle cx='69' cy='98' r='.4'/%3E%3Ccircle cx='166' cy='93' r='.3'/%3E%3Ccircle cx='40' cy='20' r='.3'/%3E%3Ccircle cx='35' cy='102' r='.4'/%3E%3Ccircle cx='20' cy='116' r='.3'/%3E%3Ccircle cx='68' cy='15' r='.3'/%3E%3Ccircle cx='34' cy='63' r='.4'/%3E%3Ccircle cx='98' cy='60' r='.3'/%3E%3Ccircle cx='0' cy='60' r='.3'/%3E%3Ccircle cx='160' cy='143' r='.4'/%3E%3Ccircle cx='119' cy='66' r='.3'/%3E%3Ccircle cx='35' cy='21' r='.3'/%3E%3Ccircle cx='93' cy='38' r='.3'/%3E%3Ccircle cx='31' cy='126' r='.3'/%3E%3Ccircle cx='166' cy='84' r='.4'/%3E%3Ccircle cx='166' cy='84' r='.5'/%3E%3Ccircle cx='161' cy='128' r='.3'/%3E%3Ccircle cx='47' cy='128' r='.3'/%3E%3Ccircle cx='21' cy='47' r='.3'/%3E%3Ccircle cx='67' cy='77' r='.3'/%3E%3Ccircle cx='73' cy='66' r='.3'/%3E%3Ccircle cx='167' cy='10' r='.3'/%3E%3Ccircle cx='36' cy='0' r='.3'/%3E%3Ccircle cx='36' cy='172' r='.3'/%3E%3Ccircle cx='97' cy='149' r='.3'/%3E%3Ccircle cx='3' cy='15' r='.7'/%3E%3Ccircle cx='140' cy='17' r='.3'/%3E%3Ccircle cx='21' cy='22' r='.4'/%3E%3Ccircle cx='114' cy='93' r='.3'/%3E%3Ccircle cx='38' cy='89' r='.7'/%3E%3Ccircle cx='83' cy='143' r='.3'/%3E%3Ccircle cx='85' cy='1' r='.3'/%3E%3Ccircle cx='86' cy='70' r='.4'/%3E%3Ccircle cx='22' cy='62' r='.3'/%3E%3Ccircle cx='73' cy='81' r='.4'/%3E%3Ccircle cx='1' cy='60' r='.3'/%3E%3Ccircle cx='12' cy='135' r='.5'/%3E%3C/g%3E%3Cg fill-opacity='.11'%3E%3Ccircle cx='141' cy='41' r='.3'/%3E%3Ccircle cx='156' cy='83' r='.3'/%3E%3Ccircle cx='77' cy='126' r='.4'/%3E%3Ccircle cx='176' cy='160' r='.4'/%3E%3Ccircle cx='117' cy='70' r='.3'/%3E%3Ccircle cx='82' cy='153' r='.3'/%3E%3Ccircle cx='169' cy='23' r='.3'/%3E%3Ccircle cx='110' cy='105' r='.3'/%3E%3Ccircle cx='39' cy='77' r='.3'/%3E%3Ccircle cx='73' cy='77' r='.4'/%3E%3Ccircle cx='58' cy='151' r='.5'/%3E%3Ccircle cx='20' cy='141' r='.3'/%3E%3Ccircle cx='162' cy='83' r='.4'/%3E%3Ccircle cx='68' cy='91' r='.3'/%3E%3Ccircle cx='14' cy='40' r='.3'/%3E%3Ccircle cx='113' cy='161' r='.5'/%3E%3Ccircle cx='91' cy='111' r='.4'/%3E%3Ccircle cx='92' cy='34' r='.3'/%3E%3Ccircle cx='128' cy='128' r='.5'/%3E%3Ccircle cx='172' cy='81' r='.3'/%3E%3Ccircle cx='48' cy='128' r='.3'/%3E%3Ccircle cx='28' cy='92' r='.3'/%3E%3Ccircle cx='36' cy='79' r='.3'/%3E%3Ccircle cx='59' cy='168' r='.3'/%3E%3Ccircle cx='41' cy='10' r='.3'/%3E%3Ccircle cx='42' cy='56' r='.4'/%3E%3Ccircle cx='26' cy='38' r='.5'/%3E%3Ccircle cx='97' cy='110' r='.5'/%3E%3Ccircle cx='103' cy='170' r='.4'/%3E%3Ccircle cx='120' cy='82' r='.5'/%3E%3Ccircle cx='49' cy='151' r='.3'/%3E%3Ccircle cx='3' cy='24' r='.5'/%3E%3Ccircle cx='123' cy='96' r='.4'/%3E%3Ccircle cx='45' cy='27' r='.7'/%3E%3Ccircle cx='19' cy='93' r='.3'/%3E%3Ccircle cx='98' cy='122' r='.3'/%3E%3Ccircle cx='83' cy='97' r='.3'/%3E%3Ccircle cx='82' cy='21' r='.5'/%3E%3Ccircle cx='66' cy='37' r='.3'/%3E%3Ccircle cx='173' cy='98' r='.3'/%3E%3Ccircle cx='57' cy='34' r='.3'/%3E%3Ccircle cx='39' cy='15' r='.3'/%3E%3Ccircle cx='4' cy='93' r='.3'/%3E%3Ccircle cx='81' cy='134' r='.4'/%3E%3Ccircle cx='120' cy='137' r='.4'/%3E%3Ccircle cx='93' cy='92' r='.3'/%3E%3Ccircle cx='139' cy='112' r='.3'/%3E%3Ccircle cx='166' cy='95' r='.5'/%3E%3Ccircle cx='148' cy='180' r='.3'/%3E%3Ccircle cx='124' cy='30' r='.3'/%3E%3Ccircle cx='28' cy='35' r='.4'/%3E%3Ccircle cx='54' cy='110' r='.3'/%3E%3Ccircle cx='137' cy='114' r='.3'/%3E%3Ccircle cx='168' cy='38' r='.4'/%3E%3Ccircle cx='155' cy='76' r='.3'/%3E%3Ccircle cx='98' cy='62' r='.3'/%3E%3Ccircle cx='93' cy='45' r='.3'/%3E%3Ccircle cx='21' cy='16' r='.4'/%3E%3Ccircle cx='70' cy='41' r='.3'/%3E%3Ccircle cx='27' cy='70' r='.3'/%3E%3Ccircle cx='54' cy='165' r='.3'/%3E%3Ccircle cx='144' cy='143' r='.4'/%3E%3Ccircle cx='91' cy='147' r='.3'/%3E%3Ccircle cx='168' cy='140' r='.5'/%3E%3Ccircle cx='125' cy='157' r='.3'/%3E%3Ccircle cx='51' cy='157' r='.4'/%3E%3Ccircle cx='132' cy='42' r='.5'/%3E%3Ccircle cx='160' cy='30' r='.4'/%3E%3Ccircle cx='28' cy='13' r='.3'/%3E%3Ccircle cx='11' cy='38' r='.4'/%3E%3Ccircle cx='112' cy='129' r='.4'/%3E%3Ccircle cx='106' cy='114' r='.4'/%3E%3Ccircle cx='71' cy='92' r='.3'/%3E%3Ccircle cx='174' cy='39' r='.4'/%3E%3Ccircle cx='75' cy='110' r='.4'/%3E%3Ccircle cx='177' cy='167' r='.3'/%3E%3Ccircle cx='29' cy='4' r='.3'/%3E%3Ccircle cx='87' cy='38' r='.4'/%3E%3Ccircle cx='32' cy='126' r='.3'/%3E%3Ccircle cx='166' cy='36' r='.3'/%3E%3C/g%3E%3Cg fill-opacity='.16'%3E%3Ccircle cx='119' cy='37' r='.3'/%3E%3Ccircle cx='96' cy='68' r='.4'/%3E%3Ccircle cx='35' cy='155' r='.3'/%3E%3Ccircle cx='117' cy='21' r='.5'/%3E%3Ccircle cx='178' cy='110' r='.3'/%3E%3Ccircle cx='93' cy='128' r='.3'/%3E%3Ccircle cx='136' cy='27' r='.3'/%3E%3Ccircle cx='142' cy='56' r='.3'/%3E%3Ccircle cx='95' cy='82' r='.5'/%3E%3Ccircle cx='111' cy='62' r='.5'/%3E%3Ccircle cx='93' cy='31' r='.4'/%3E%3Ccircle cx='180' cy='54' r='.3'/%3E%3Ccircle cx='172' cy='131' r='.3'/%3E%3Ccircle cx='10' cy='92' r='.5'/%3E%3Ccircle cx='14' cy='22' r='.3'/%3E%3Ccircle cx='50' cy='43' r='.3'/%3E%3Ccircle cx='64' cy='179' r='.3'/%3E%3Ccircle cx='38' cy='174' r='.3'/%3E%3Ccircle cx='145' cy='65' r='.3'/%3E%3Ccircle cx='9' cy='90' r='.3'/%3E%3Ccircle cx='57' cy='7' r='.3'/%3E%3Ccircle cx='132' cy='34' r='.3'/%3E%3Ccircle cx='157' cy='172' r='.4'/%3E%3Ccircle cx='130' cy='75' r='.3'/%3E%3Ccircle cx='3' cy='139' r='.3'/%3E%3Ccircle cx='67' cy='114' r='.7'/%3E%3Ccircle cx='117' cy='168' r='.4'/%3E%3Ccircle cx='83' cy='43' r='.5'/%3E%3Ccircle cx='168' cy='29' r='.3'/%3E%3Ccircle cx='167' cy='18' r='.3'/%3E%3Ccircle cx='150' cy='164' r='.3'/%3E%3Ccircle cx='48' cy='105' r='.4'/%3E%3Ccircle cx='155' cy='139' r='.3'/%3E%3Ccircle cx='42' cy='33' r='.3'/%3E%3Ccircle cx='34' cy='58' r='.4'/%3E%3Ccircle cx='123' cy='84' r='.4'/%3E%3Ccircle cx='10' cy='22' r='.4'/%3E%3Ccircle cx='63' cy='47' r='.4'/%3E%3Ccircle cx='111' cy='19' r='.3'/%3E%3Ccircle cx='57' cy='107' r='.3'/%3E%3Ccircle cx='2' cy='21' r='.5'/%3E%3Ccircle cx='164' cy='112' r='.4'/%3E%3Ccircle cx='14' cy='69' r='.3'/%3E%3Ccircle cx='125' cy='64' r='.3'/%3E%3Ccircle cx='64' cy='123' r='.3'/%3E%3C/g%3E%3Cg fill-opacity='.22'%3E%3Ccircle cx='4' cy='66' r='.3'/%3E%3Ccircle cx='75' cy='73' r='.3'/%3E%3Ccircle cx='1' cy='113' r='.3'/%3E%3Ccircle cx='108' cy='61' r='.4'/%3E%3Ccircle cx='113' cy='155' r='.4'/%3E%3Ccircle cx='140' cy='145' r='.4'/%3E%3Ccircle cx='38' cy='135' r='.3'/%3E%3Ccircle cx='112' cy='145' r='.3'/%3E%3Ccircle cx='71' cy='103' r='.3'/%3E%3Ccircle cx='14' cy='43' r='.3'/%3E%3Ccircle cx='173' cy='38' r='.4'/%3E%3Ccircle cx='3' cy='82' r='.3'/%3E%3Ccircle cx='102' cy='165' r='.4'/%3E%3Ccircle cx='173' cy='138' r='.3'/%3E%3Ccircle cx='158' cy='14' r='.4'/%3E%3Ccircle cx='32' cy='72' r='.3'/%3E%3Ccircle cx='94' cy='133' r='.3'/%3E%3Ccircle cx='52' cy='26' r='.3'/%3E%3Ccircle cx='105' cy='39' r='.4'/%3E%3Ccircle cx='11' cy='6' r='.5'/%3E%3Ccircle cx='134' cy='156' r='.4'/%3E%3Ccircle cx='12' cy='110' r='.4'/%3E%3C/g%3E%3C/g%3E%3Cg fill='none' stroke='%236b604c' stroke-width='.35' stroke-opacity='.09'%3E%3Cpath d='M35 146q6 2 11 0'/%3E%3Cpath d='M145 107q4 0.3 7 0'/%3E%3Cpath d='M119 95q6 -0.9 12 0'/%3E%3Cpath d='M44 172q2 -0.3 5 0'/%3E%3Cpath d='M73 61q6 1 12 0'/%3E%3Cpath d='M50 140q2 1.4 5 0'/%3E%3Cpath d='M23 110q6 -0.8 12 0'/%3E%3Cpath d='M120 141q2 1.6 5 0'/%3E%3Cpath d='M12 100q6 -0.2 11 0'/%3E%3Cpath d='M65 86q4 1.9 9 0'/%3E%3Cpath d='M151 159q6 0.1 12 0'/%3E%3Cpath d='M18 116q4 1.1 8 0'/%3E%3C/g%3E%3C/svg%3E");
  --doc-shadow: 0 0 0 .5px rgba(20, 20, 20, .14), 0 1px 1.5px rgba(20, 20, 20, .10), 0 5px 12px -4px rgba(20, 20, 20, .16), 0 20px 36px -18px rgba(20, 20, 20, .24);
  zoom: var(--zoom); position: relative; color: var(--ink-d); font-family: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif; font-size: 13.5px; line-height: 1.45;
  font-variant-numeric: tabular-nums; text-align: left; letter-spacing: 0;
  background: var(--grain), var(--paper); box-shadow: var(--doc-shadow); margin: 0 auto; width: 720px; max-width: none; flex: none;
}
/* Dokumentwechsel: nur Deckkraft, 120 ms */
.doc.is-enter { animation: docIn var(--t-2) linear; }
@keyframes docIn { from { opacity: 0; } }
.doc .mono { font-variant-numeric: tabular-nums; }
.doc p { margin: 0 0 .7em; }
.doc h2, .doc h3, .doc h4 { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; letter-spacing: 0; }
.doc .hand { font-family: var(--font-hand); }
/* Stempel und Unterschriften sind Vektor; Stempel liegen nie über einem Klickziel */
.doc .stamp, .doc .sig, .doc .crest { display: block; overflow: visible; }
.din__stamp { pointer-events: none; }

/* Markierbare Felder (Textmarker-Strich 240 ms; grüner Rahmen = Auffälligkeit, schraffiert = übersehen, rot = Fehlmarkierung) */
.fld { border-radius: 2px; transition: background-color var(--t-1) linear; }
.fld.is-marked {
  background-image: linear-gradient(100deg, color-mix(in srgb, var(--mk, #ffe14d) 72%, transparent), color-mix(in srgb, var(--mk, #ffe14d) 60%, transparent) 70%, color-mix(in srgb, var(--mk, #ffe14d) 75%, transparent));
  background-repeat: no-repeat; background-size: 100% 84%; background-position: 0 70%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
tr.fld.is-marked > td { background-image: linear-gradient(color-mix(in srgb, var(--mk, #ffe14d) 65%, transparent), color-mix(in srgb, var(--mk, #ffe14d) 65%, transparent)); background-repeat: no-repeat; background-size: 100% 80%; background-position: 0 60%; }
tr.fld.is-marked { background-image: none; }
.fld.is-sweep { animation: sweep 240ms ease-out; }
tr.fld.is-sweep > td { animation: sweep 240ms ease-out; }
@keyframes sweep { from { background-size: 0% 84%; } }
.fld.is-tell { box-shadow: 0 0 0 2px var(--ok); }
.fld.is-wrong { box-shadow: 0 0 0 2px var(--bad); }
tr.fld.is-tell > td { box-shadow: inset 0 2px 0 var(--ok), inset 0 -2px 0 var(--ok); }
tr.fld.is-wrong > td { box-shadow: inset 0 2px 0 var(--bad), inset 0 -2px 0 var(--bad); }
.fld.is-tell:not(.is-marked) { box-shadow: 0 0 0 2px var(--ok); background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--ok) 14%, transparent) 5px 10px); }
tr.fld.is-tell:not(.is-marked) { box-shadow: none; }
tr.fld.is-tell:not(.is-marked) > td { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--ok) 14%, transparent) 5px 10px); }
/* weiße Eintragungsfelder lassen den Textmarker durchscheinen */
.fld.is-marked .amsel__v, .fld.is-marked .formdoc__val, .fld.is-marked .cells i { background-color: transparent; }

/* Ziffernkästchen amtlicher Vordrucke */
.cells { display: inline-flex; align-items: center; }
.cells i { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 19px; margin-left: -1px; border: 1px solid var(--fc, #333); background: #fff;
  font: 700 12.5px/1 "Courier New", "Nimbus Mono PS", Courier, monospace; font-style: normal; color: #111; }
.cells i:first-child { margin-left: 0; }
.cells i.cells__gap { width: 7px; border: 0; background: transparent; margin-left: 0; }
.cells i.cells__gap + i { margin-left: 0; }
/* Ankreuzkästchen */
.cb { position: relative; display: inline-block; flex: none; width: 11px; height: 11px; border: 1px solid #1a1a1a; background: #fff; vertical-align: -1px; }
.cb.is-x { background: linear-gradient(45deg, transparent 43%, #1b2f80 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #1b2f80 43% 57%, transparent 57%), #fff; }

/* ================= DIN-5008-Briefbogen (Briefe, Rechnungen, Schreiben und Bescheide des Finanzamts) ================= */
.doc--letter:not(.doc--handwritten), .doc--invoice, .doc--bescheid, .doc--lstb { padding: 0; }
/* Behörde: Recyclingpapier, eine Spur grauer */
.doc--bescheid, .doc:has(> .letter--amt), .doc--vermerk { --paper: #f6f5f0; }
.din { position: relative; display: flex; flex-direction: column; min-height: 1018px; padding: 0 69px 64px 86px; }
.din.din--foot { padding-bottom: 128px; }
.din__marks i { position: absolute; left: 0; height: 0; border-top: 1px solid #9a9a95; }
.din__fold--1 { top: 360px; width: 17px; }
.din__punch { top: 509px; width: 27px; }
.din__fold--2 { top: 720px; width: 17px; }
/* Falzkanten: eingegangene Post kam zweimal gefaltet im Umschlag (bei 105 und 210 mm) */
.doc--letter:not(.doc--handwritten) .din:not(.letter--amt)::after, .doc--invoice .din::after, .doc--lstb .din::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 344px, rgba(60, 50, 30, .028) 356px, rgba(40, 34, 20, .085) 359.5px, rgba(255, 255, 255, .7) 361px, rgba(60, 50, 30, .02) 364px, transparent 378px),
    linear-gradient(180deg, transparent 704px, rgba(60, 50, 30, .028) 716px, rgba(40, 34, 20, .08) 719.5px, rgba(255, 255, 255, .7) 721px, rgba(60, 50, 30, .02) 724px, transparent 738px);
}
.din__top { position: relative; flex: none; height: 340px; margin: 0 -69px 0 -86px; }
/* Briefkopf */
.din__lh { position: absolute; top: 40px; left: 86px; right: 69px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.lh__geo { flex: none; display: inline-flex; }
.lh__geo svg { display: block; }
.din__lhtext { min-width: 0; max-width: 440px; }
.din__lhname { font-size: 21px; font-weight: 700; line-height: 1.15; letter-spacing: -.005em; }
.din__lhtag { margin-top: 3px; font-size: 11px; color: var(--ink-d3); }
/* 0: Wortmarke rechts mit Linie in der Hausfarbe */
.din__lh--s0 .din__lhtext { padding-bottom: 7px; border-bottom: 2px solid var(--lc); text-align: right; }
.din__lh--s0 .din__lhname { font-size: 22px; }
/* 1: Bildmarke und Name */
.din__lh--s1 .din__lhname { font-size: 20px; }
/* 2: zentrierte Antiqua, schwarz, mit feiner Linie */
.din__lh--s2 { justify-content: center; }
.din__lh--s2 .din__lhtext { max-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--ink-d2); text-align: center; }
.din__lh--s2 .din__lhname { font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 400; letter-spacing: .02em; color: var(--ink-d); }
.din__lh--s2 .din__lhtag { font-family: Georgia, "Times New Roman", serif; font-size: 11.5px; font-style: italic; }
/* 3: linksbündig mit senkrechter Linie */
.din__lh--s3 { justify-content: flex-start; }
.din__lh--s3 .din__lhtext { padding-left: 12px; border-left: 4px solid var(--lc); }
.din__sender { position: absolute; top: 52px; right: 69px; max-width: 300px; text-align: right; font-size: 12px; line-height: 1.45; color: #333; }
.din__sender strong { display: block; font-size: 13.5px; color: var(--ink-d); }
/* Anschriftfeld: Vermerkzone 17,7 mm mit Rücksendeangabe, Anschriftzone 27,3 mm */
.din__window { position: absolute; left: 69px; top: 154px; width: 292px; height: 154px; padding-left: 17px; }
/* Rücksendeangabe: immer vollständig (in docs.js gekürzt), sehr lange Zeilen kleiner gesetzt */
.din__ret { height: 61px; display: flex; align-items: flex-end; padding-bottom: 2px; margin-bottom: 6px; border-bottom: .75px solid #8f8c84; font-size: 7.5px; line-height: 1.2; color: var(--ink-d2); white-space: nowrap; }
.din__ret--s { font-size: 6.6px; letter-spacing: -.01em; }
.din__to { font-size: 13.5px; line-height: 1.4; }
/* Informationsblock rechts */
.din__info { position: absolute; left: 429px; top: 171px; width: 257px; font-size: 10.5px; line-height: 1.5; }
.din__info--date { top: 286px; left: auto; right: 69px; width: auto; text-align: right; font-size: 13.5px; }
.din__dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; margin: 0 0 4px; align-content: start; }
.din__dl dt { color: var(--ink-d3); white-space: nowrap; }
.din__dl dd { margin: 0; overflow-wrap: anywhere; }
.din__info .din__date { margin-top: 4px; }
/* Bezugszeichen und Datum in einer Flucht (feste Spalte für die Leitwörter) */
.din__info > .din__dl { grid-template-columns: 96px minmax(0, 1fr); }
.din__info > .din__datel { margin-top: 6px; }
.din__datel .din__date { margin: 0; color: var(--ink-d); }
/* Text */
.din__body { position: relative; flex: 1; font-size: 13.5px; line-height: 1.5; }
.din__body p { margin: 0 0 .9em; }
.din__subj { margin: 0 0 22px; font-weight: 700; }
.din__sign { display: flex; flex-direction: column; align-items: flex-start; margin-top: 2px; }
.din__signrow { display: flex; align-items: flex-end; gap: 8px; }
.din__ia { padding-bottom: 8px; font-size: 13.5px; }
.din__hand { display: inline-block; margin: 0 0 -4px -6px; line-height: 0; }
.sig--x { display: inline-flex; transform: rotate(-3deg); }
.sig--x svg { display: block; }
.din__typed { font-size: 13.5px; }
.din__ps { margin-top: 18px; }
/* Firmenstempel neben der Unterschrift */
.din__stamp { width: max-content; margin: -78px 0 0 250px; transform: rotate(-3.5deg); opacity: .92; }
/* Fußzeile mit Geschäftsangaben */
.din__foot { position: absolute; left: 86px; right: 69px; bottom: 36px; display: flex; justify-content: space-between; gap: 0 18px; padding-top: 8px; border-top: .75px solid #b9b6ad; font-size: 8.5px; line-height: 1.5; color: var(--ink-d2); }
.din__foot b { display: block; color: var(--ink-d); font-weight: 700; }
.din__foot > div { flex: 0 1 auto; min-width: 0; max-width: 34%; overflow-wrap: anywhere; }
.doc .nw { white-space: nowrap; overflow-wrap: normal; }
.din__page { position: absolute; right: 69px; bottom: 18px; font-size: 8.5px; color: var(--ink-d3); }

/* ---------- Finanzamt: Schreiben und Bescheide ---------- */
.amt__head { position: absolute; top: 38px; left: 86px; right: 69px; display: flex; align-items: center; gap: 13px; }
.amt__crest { flex: none; display: inline-flex; }
.amt__htext { min-width: 0; }
.amt__land { font-size: 10px; letter-spacing: .02em; color: var(--ink-d2); }
.amt__name { font-size: 19px; font-weight: 700; line-height: 1.2; }
.amt__addr { margin-top: 2px; font-size: 10.5px; color: var(--ink-d2); }
.amt__info { top: 154px; }
.amt__info .is-strong { font-weight: 700; color: var(--ink-d); }
.amt__info dd.amt__hint { grid-column: 1 / -1; margin: -1px 0 5px; font-size: 8.5px; color: var(--ink-d3); }
.amt__list { margin: 0 0 1em; padding-left: 20px; }
.amt__list li { margin-bottom: 4px; }
.amt__table { min-width: 400px; margin: 4px 0 1.1em; border-collapse: collapse; font-size: 13px; }
.amt__table td { padding: 4px 10px 4px 0; border-bottom: .75px solid #cfccc2; }
.amt__table td.num { padding-left: 30px; text-align: right; white-space: nowrap; }
.amt__table tr.is-sum td { font-weight: 700; border-top: 1px solid var(--rule-d); border-bottom: 3px double var(--rule-d); }
.amt__strong { padding: 6px 0 6px 12px; border-left: 3px solid #1f2f3a; font-weight: 700; }
.amt__close { margin-top: 1.4em !important; }
.amt__ia { margin-bottom: 0 !important; }
.amt__signer { margin-top: 0; }
/* Bescheid: maschineller Druck des Rechenzentrums */
.bsd__title { margin: 0 0 2px; font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.bsd__sub { margin: 0 0 6px !important; font-size: 11.5px; color: var(--ink-d2); }
.bsd__h { margin: 22px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--rule-d); font-size: 13px; font-weight: 700; }
.bsd__tablewrap { display: block; }
.bsd__table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.4; }
.bsd__table th { padding: 3px 0 4px 14px; border-bottom: 1px solid var(--rule-d); font-size: 10.5px; font-weight: 700; text-align: right; vertical-align: bottom; }
.bsd__table td { padding: 3px 0 3px 14px; border-bottom: .75px solid #e2dfd5; text-align: right; white-space: nowrap; vertical-align: top; }
.bsd__table th:first-child, .bsd__table td:first-child { padding-left: 0; text-align: left; white-space: normal; }
.bsd__table--c2 td:first-child { width: 78%; }
.bsd__table tr.is-head td { padding-top: 9px; border-bottom: 0; font-weight: 700; }
.bsd__table tr.is-sub td:first-child { padding-left: 14px; }
.bsd__table tr.is-sum td { border-top: 1px solid var(--rule-d); font-weight: 700; }
.bsd__table tr.is-total td { border-top: 1px solid var(--rule-d); border-bottom: 3px double var(--rule-d); font-weight: 700; }
.bsd__table tr.is-note td { color: var(--ink-d2); }
.bsd__box { display: flex; gap: 10px; margin: 12px 0 2px; padding: 8px 12px; border: 1px solid var(--rule-d); font-size: 12.5px; line-height: 1.45; }
.bsd__box b { flex: none; }
.bsd__listwrap { display: block; }
.bsd__list { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.45; }
.bsd__list li { margin-bottom: 6px; padding-left: 2px; }
.bsd__p { margin: 0 0 .6em !important; font-size: 12px; }
.bsd__p--small { font-size: 10px; line-height: 1.45; color: var(--ink-d2); }
.bsd__machine { margin-top: 18px !important; font-size: 10.5px; color: var(--ink-d2); }
/* Bescheide und Schreiben aus Formulardaten: Angaben als zweispaltige Aufstellung */
.bsd__table--kv { margin-top: 10px; font-size: 12.5px; }
.bsd__table--kv td { padding: 5px 0 5px 16px; text-align: left; white-space: normal; }
.bsd__table--kv td:first-child { width: 42%; color: var(--ink-d2); }
.amt--form .bsd__title { margin-bottom: 6px; }
.amt--form .bsd__tablewrap { margin-bottom: 14px; }
.amt__salut { margin: 14px 0 0 !important; }
.amt__sig { display: block; margin-top: 16px; }

/* ---------- Handschriftlicher Brief: Collegeblock (liniert, Rand, Vierfachlochung) ---------- */
.doc--handwritten {
  --paper: #fdfdfa;
  background: var(--grain), repeating-linear-gradient(transparent 0 31px, #c3d3e6 31px 32px) 0 26px / 100% calc(100% - 26px) no-repeat, var(--paper);
}
.doc--handwritten::before { content: ""; position: absolute; left: 62px; top: 0; bottom: 0; width: 1px; background: #eca39c; }
.doc--handwritten::after {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 20px; pointer-events: none;
  background:
    radial-gradient(circle at 10px 98px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px),
    radial-gradient(circle at 10px 372px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px),
    radial-gradient(circle at 10px 647px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px),
    radial-gradient(circle at 10px 921px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px);
}
.letter--handwritten { min-height: 1018px; padding: 30px 50px 40px 84px; font-family: var(--font-hand); font-size: 18.5px; line-height: 32px; color: #1f2f78; }
.letter--handwritten p { margin: 0; }
.letter__hwtop { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.letter--handwritten .letter__from { font-size: 16px; line-height: 32px; }
.letter--handwritten .letter__date { margin: 0; font-size: 17px; line-height: 32px; text-align: right; }
.letter--handwritten .letter__subj { margin-bottom: 32px; font-size: 19px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.letter--handwritten .letter__sign { display: inline-block; margin-top: 4px; font-size: 28px; color: #1f2f78; transform: rotate(-2deg); }
.letter--handwritten .letter__ps { margin-top: 32px; }

/* ================= Kassenbon (Thermopapier, 80-mm-Rolle) ================= */
.doc--receipt, .lp-case__paper .doc--receipt {
  --paper: #fbfbf9;
  width: 284px; padding: 30px 14px 34px; box-shadow: none; background: var(--paper);
  font-family: "Lucida Console", Consolas, Menlo, "DejaVu Sans Mono", "Liberation Mono", monospace; font-size: 11px; line-height: 1.42; color: #2c2c2c; letter-spacing: 0;
  /* abgerissene Kanten oben und unten, unregelmäßig gezackt */
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 7' preserveAspectRatio='none'%3E%3Cpath d='M0 7V3L3 1L5 4L9 1L12 3L14 1L18 4L21 1L23 3L27 1L30 4L32 2L36 4L40 3V7Z'/%3E%3C/svg%3E") 0 0 / 40px 7px repeat-x,
    linear-gradient(#000 0 0) 0 50% / 100% calc(100% - 12px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 7' preserveAspectRatio='none'%3E%3Cpath d='M0 0H46V4L43 6L40 3L37 7L33 4L30 6L27 3L24 6L20 3L17 7L14 4L10 6L7 3L4 6L0 4Z'/%3E%3C/svg%3E") 0 100% / 46px 7px repeat-x;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 7' preserveAspectRatio='none'%3E%3Cpath d='M0 7V3L3 1L5 4L9 1L12 3L14 1L18 4L21 1L23 3L27 1L30 4L32 2L36 4L40 3V7Z'/%3E%3C/svg%3E") 0 0 / 40px 7px repeat-x,
    linear-gradient(#000 0 0) 0 50% / 100% calc(100% - 12px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 7' preserveAspectRatio='none'%3E%3Cpath d='M0 0H46V4L43 6L40 3L37 7L33 4L30 6L27 3L24 6L20 3L17 7L14 4L10 6L7 3L4 6L0 4Z'/%3E%3C/svg%3E") 0 100% / 46px 7px repeat-x;
  filter: none;
}
/* Thermodruck: ein Streifen des Druckkopfs druckt schwächer, unten verblasst der Bon etwas */
.doc--receipt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 52%, rgba(251, 251, 249, .34) 58%, rgba(251, 251, 249, .2) 63%, transparent 69%),
    linear-gradient(180deg, transparent 55%, rgba(251, 251, 249, .16));
}
/* Kontur und Schatten des Bons vom Elternelement: filter wirkt vor mask, am Bon selbst würde die Zackenmaske sie abschneiden */
.akte__paper:has(> .doc--receipt), .ak-bogen:has(> .doc--receipt), .lp-case__paper:has(> .doc--receipt) { filter: drop-shadow(0 0 .6px rgba(20, 20, 20, .38)) drop-shadow(0 5px 7px rgba(20, 20, 20, .14)); }
.receipt__logo { display: flex; justify-content: center; margin-bottom: 6px; }
.receipt__shop { font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.receipt__addr, .receipt__tax { font-size: 11px; text-align: center; }
.receipt__addr { margin-top: 3px; }
.receipt__meta { display: flex; justify-content: space-between; margin-top: 10px; }
.receipt__rule { height: 0; margin: 6px 0; border-top: 1px dashed #7a7a76; }
.receipt__rule--double { height: 4px; border-top: 1px dashed #5a5a56; border-bottom: 1px dashed #5a5a56; }
.receipt__cur { text-align: right; padding-right: 17px; }
.receipt__line { display: grid; grid-template-columns: minmax(0, 1fr) auto 10px; column-gap: 7px; padding: 0; }
.receipt__t { grid-column: 1; overflow-wrap: anywhere; }
.receipt__p { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
.receipt__v { grid-column: 3; grid-row: 1; text-align: right; }
.receipt__q { grid-column: 1; grid-row: 2; padding-left: 14px; }
.receipt__total { display: flex; justify-content: space-between; padding: 2px 17px 2px 0; font-size: 14.5px; font-weight: 700; letter-spacing: .02em; }
.receipt__pay { display: block; margin-top: 4px; }
.receipt__row { display: flex; justify-content: space-between; gap: 10px; padding-right: 17px; }
.receipt__row > span:last-child { white-space: nowrap; }
.receipt__card { margin: 5px 0 0; padding-left: 14px; font-size: 10.5px; line-height: 1.4; }
.receipt__vat { width: 100%; margin: 10px 0 4px; border-collapse: collapse; font-size: 10.5px; }
.receipt__vat th { padding: 0 0 2px; font-weight: 400; text-align: right; border-bottom: 1px dashed #7a7a76; }
.receipt__vat td { padding: 1px 0; text-align: right; }
.receipt__vat th:first-child, .receipt__vat td:first-child { text-align: left; }
.receipt__date { display: flex; justify-content: space-between; margin-top: 8px; }
.receipt__tse { display: block; margin-top: 8px; padding-top: 7px; border-top: 1px dashed #7a7a76; font-size: 9.5px; line-height: 1.38; }
.receipt__tse .receipt__row { padding-right: 0; }
.receipt__tsek { margin-top: 2px; }
.receipt__tsev { word-break: break-all; }
.receipt__qrbox { display: flex; justify-content: center; margin-top: 10px; }
.receipt__qrbox svg { display: block; }
/* ohne TSE: der Abschnitt bleibt einfach leer */
.receipt__tse--none { min-height: 30px; }
.receipt__end { display: block; }
.receipt__foot { margin-top: 12px; text-align: center; }
.receipt__code { display: flex; flex-direction: column; align-items: center; margin-top: 14px; font-size: 9.5px; letter-spacing: .14em; }
.receipt__code svg { display: block; margin-bottom: 3px; }
/* vorgedruckter Bewirtungsvordruck am Bonende */
/* Z-Bon (Tagesabschluss) */
.receipt__zhead { display: flex; flex-direction: column; align-items: center; margin-top: 10px; text-align: center; }
.receipt__zhead b { font-size: 14px; letter-spacing: .06em; }
.receipt--z .receipt__meta { margin-top: 4px; }
.receipt__sub { margin: 2px 0 3px; text-decoration: underline; text-underline-offset: 2px; }
.receipt--z .receipt__pay .receipt__sub { margin-top: 6px; }
.receipt__zcnt { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #7a7a76; }
.receipt__zcnt .receipt__row > span:last-child { white-space: pre; }
.receipt__bew { margin-top: 12px; padding-top: 8px; border-top: 1px dashed #7a7a76; font-size: 9.5px; line-height: 1.3; }
.receipt__bewh { margin-bottom: 4px; }
.receipt__bl { display: flex; align-items: flex-end; gap: 6px; min-height: 22px; border-bottom: 1px dotted #7a7a76; }
.receipt__blk { flex: none; padding-bottom: 2px; }
.receipt__blv { flex: 1; min-width: 0; padding-bottom: 1px; font-size: 13.5px; line-height: 1.15; color: var(--pen); }

/* ================= Rechnung ================= */
.inv__title { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.inv__intro { margin: 0 0 12px !important; }
.inv__table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.4; }
.inv__table th { padding: 5px 7px; background: #ebebe8; font-size: 10.5px; font-weight: 700; text-align: left; vertical-align: bottom; }
.inv__table td { padding: 7px 7px; border-bottom: .75px solid #d4d1c8; vertical-align: top; }
.inv__table th:first-child, .inv__table td:first-child { width: 40px; padding-left: 7px; }
.inv__table th:last-child, .inv__table td:last-child { padding-right: 7px; }
.inv__table .num { text-align: right; white-space: nowrap; }
.inv__desc { width: 50%; }
.inv__art { font-size: 11.5px; color: var(--ink-d2); white-space: nowrap; }
.inv__sums { width: 310px; margin: 12px 0 0 auto; padding-right: 7px; font-size: 13px; }
.inv__sum { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.inv__sum > span:last-child { white-space: nowrap; }
.inv__sum--total { margin-top: 4px; padding: 5px 0; border-top: 1px solid var(--rule-d); border-bottom: 3px double var(--rule-d); font-size: 14px; font-weight: 700; }
.inv__note { margin-top: 24px !important; font-size: 12.5px; }
.inv__hint { margin-top: 22px !important; font-size: 10.5px; color: var(--ink-d2); }
.inv__paid { display: inline-flex; flex-direction: column; align-items: center; margin: 22px 0 0 40px; transform: rotate(-6deg); }
.inv__paidstamp { display: block; opacity: .9; }
.inv__paidhand { max-width: 270px; margin-top: 4px; font-family: var(--font-hand); font-size: 17px; line-height: 1.2; color: var(--pen); text-align: center; transform: rotate(3deg); }

/* ================= Tabellen ================= */
.doc--table { padding: 44px 56px 44px; }
.tdoc__heading { font-size: 17px; font-weight: 700; line-height: 1.3; }
.tdoc__sub { margin: 2px 0 16px; font-size: 12px; color: var(--ink-d2); }
.tdoc__table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.4; }
.tdoc__table th { padding: 5px 8px; border-bottom: 1px solid var(--rule-d); font-size: 11px; font-weight: 700; text-align: left; vertical-align: bottom; }
.tdoc__table td { padding: 6px 8px; border-bottom: .75px solid #d4d1c8; vertical-align: top; }
.tdoc__table th:first-child, .tdoc__table td:first-child { padding-left: 0; }
.tdoc__table th:last-child, .tdoc__table td:last-child { padding-right: 0; }
.tdoc__table .num { text-align: right; white-space: nowrap; }
.tdoc__foot { display: block; margin-top: 0; padding-top: 6px; border-top: 3px double var(--rule-d); font-size: 12.5px; font-weight: 700; }
/* schlichte Druckzeile unter der Tabelle */
.tdoc__foot--note { margin-top: 10px; padding-top: 0; border-top: 0; font-size: 11.5px; font-weight: 400; color: var(--ink-d2); }
/* Randnotiz von Hand (Kugelschreiber) */
.tdoc__foot--hand { width: max-content; max-width: 100%; margin: 12px 0 0 auto; padding: 0; border: 0; font-size: 19px; font-weight: 400; line-height: 1.2; color: var(--pen); transform: rotate(-2deg); }
/* Eingangsstempel der Dienststelle */
.tdoc__foot--stamp { margin-top: 18px; padding: 0; border: 0; }
.tdoc__foot--stamp span { display: inline-block; padding: 5px 10px; border: 2px solid #2b3f95; color: #2b3f95; font-size: 12px; font-weight: 700; letter-spacing: .04em; transform: rotate(-3deg); opacity: .82; }
/* Ausdruck der Finanzkasse: Kopf mit Behörde links, Steuernummer und Stand rechts */
.doc--table:has(> .tdoc--amt) { --paper: #f6f5f0; }
.tdoc__amthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: -8px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-d); }
.tdoc__amtorg { display: flex; flex-direction: column; padding-left: 10px; border-left: 3px solid #1f2f3a; font-size: 13px; line-height: 1.3; }
.tdoc__amtorg span { font-size: 11px; color: var(--ink-d2); }
.tdoc__amtmeta { display: grid; grid-template-columns: auto auto; gap: 0 10px; margin: 0; font-size: 10.5px; line-height: 1.45; }
.tdoc__amtmeta dt { color: var(--ink-d3); }
.tdoc__amtmeta dd { margin: 0; white-space: nowrap; }
/* Zeilendrucker des Rechenzentrums: eine Schrift für den ganzen Ausdruck */
.tdoc--amt, .tdoc--amt .tdoc__table, .tdoc--amt .tdoc__table th, .tdoc--amt .tdoc__foot { font-family: "Courier New", "Nimbus Mono PS", Courier, monospace; }
.tdoc--amt .tdoc__table { font-size: 12px; }
.tdoc--amt .tdoc__heading { font-size: 15px; }
.tdoc--amt .tdoc__amtorg b { font-size: 13.5px; }
/* Tabellenausdruck (Tabellenkalkulation) */
.tdoc__sheethead { display: flex; justify-content: space-between; gap: 16px; margin: -26px 0 22px; font-size: 9.5px; color: var(--ink-d3); }
.tdoc--sheet .tdoc__heading { font-family: Calibri, Carlito, Arial, sans-serif; font-size: 16px; }
.tdoc--sheet .tdoc__sub { font-family: Calibri, Carlito, Arial, sans-serif; }
.tdoc--sheet .tdoc__table { font-family: Calibri, Carlito, Arial, sans-serif; font-size: 13px; border: 1px solid #a6a6a6; }
.tdoc--sheet .tdoc__table th, .tdoc--sheet .tdoc__table td { padding: 2px 6px; border: 1px solid #c8c8c8; }
.tdoc--sheet .tdoc__table th { background: #ededed; border-bottom: 1px solid #8a8a8a; }
.tdoc--sheet .tdoc__table th:first-child, .tdoc--sheet .tdoc__table td:first-child { padding-left: 6px; }
.tdoc--sheet .tdoc__table th:last-child, .tdoc--sheet .tdoc__table td:last-child { padding-right: 6px; }
.tdoc--sheet .tdoc__foot--note { margin-top: 26px; font-size: 9.5px; color: var(--ink-d3); }
/* Aufstellung aus der Textverarbeitung: Tabelle mit feinen Gitterlinien */
.tdoc--list .tdoc__table { border-top: 1px solid var(--rule-d); }
/* Kontoauszug (Kontoauszugsdrucker, DIN A5 quer, zweifach gelocht) */
.doc--table:has(> .tdoc--bank) { min-height: 508px; padding-left: 64px; }
.doc--table:has(> .tdoc--bank)::before, .doc--table:has(> .tdoc--kassenbuch)::before {
  content: ""; position: absolute; left: 18px; top: calc(50% - 147px); width: 20px; height: 294px; pointer-events: none;
  background:
    radial-gradient(circle at 10px 10px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px) 0 0 / 20px 20px no-repeat,
    radial-gradient(circle at 10px 10px, #cfd2d5 0 8px, rgba(0, 0, 0, .25) 8.6px, transparent 9.6px) 0 100% / 20px 20px no-repeat;
}
.tdoc__bankbar { display: flex; align-items: center; gap: 10px; margin: -12px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--bc, #333); }
.tdoc__bankname { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.tdoc__bankdoc { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; font-size: 10.5px; line-height: 1.35; color: var(--ink-d3); }
.tdoc__bankdoc b { font-size: 14px; color: var(--ink-d); }
.tdoc__bankacc { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.tdoc__bankacc .tdoc__heading { font-size: 14px; }
.tdoc__bankacc .tdoc__sub { margin-bottom: 0; }
.tdoc--bank .tdoc__table th { padding: 4px 8px; background: #ececea; border-bottom: 0; }
.tdoc--bank .tdoc__table th:first-child { padding-left: 6px; }
.tdoc--bank .tdoc__table th:last-child { padding-right: 6px; }
.tdoc--bank .tdoc__table td { font-size: 12px; }
.tdoc--bank .tdoc__table td:first-child { padding-left: 6px; }
.tdoc--bank .tdoc__table td:last-child { padding-right: 6px; }
.tdoc--bank .tdoc__table td:nth-child(2) { color: var(--ink-d2); }
.tdoc__bal td { padding-top: 5px; padding-bottom: 5px; font-weight: 700; border-bottom: 1px solid var(--rule-d); }
.tdoc__bal td.tdoc__ball { padding-left: 6px; }
.tdoc__bal--new td { border-top: 1px solid var(--rule-d); border-bottom: 3px double var(--rule-d); }
.tdoc__fine { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; font-size: 8.5px; color: var(--ink-d3); }
/* Kassenbuch und Fahrtenbuch: vorgedruckter Block, Einträge von Hand */
.doc--table:has(.tdoc--kassenbuch), .doc--table:has(.tdoc--fahrtenbuch) { --paper: #fcfcf6; }
.doc--table:has(> .tdoc--kassenbuch) { padding-left: 64px; }
/* vorgedruckter Kopf: „Kassenbuch | Betrieb ____ | Monat ____ | Blatt __“, Einträge von Hand */
.tdoc__pad { display: flex; align-items: flex-end; gap: 14px; margin: -10px 0 14px; padding-bottom: 6px; border-bottom: 2px solid #b03a2e; color: #8a2a22; }
.tdoc__padt { flex: none; font-size: 17px; font-weight: 700; line-height: 1.2; }
.tdoc__padf { display: flex; align-items: flex-end; gap: 6px; min-width: 0; flex: 1; }
.tdoc__padf--w { flex: 1 1 0; }
.tdoc__padf--m { flex: 0 1 auto; }
.tdoc__padf--m .tdoc__padv { flex: none; min-width: 6.5em; }
.tdoc__padf--n { flex: 0 0 58px; }
.tdoc__pad { gap: 11px; }
.tdoc__padf i { flex: none; padding-bottom: 2px; font-size: 10.5px; font-style: normal; }
/* von Hand eingetragen: lange Einträge kleiner (docs.js) und notfalls zweizeilig, nie abgeschnitten */
.tdoc__padv { flex: 1; min-width: 0; padding: 0 2px 1px; border-bottom: 1px solid #d99b93; font-size: 18px; line-height: 1.1; color: var(--pen); overflow-wrap: break-word; }
.tdoc--kassenbuch .tdoc__table td, .tdoc--fahrtenbuch .tdoc__table td { padding: 4px 8px; border-bottom-color: #e2b8b2; font-family: var(--font-hand); font-size: 16.5px; color: var(--pen); }
.tdoc--kassenbuch .tdoc__table tr:nth-child(3n+2) td, .tdoc--fahrtenbuch .tdoc__table tr:nth-child(3n+2) td { color: #22389a; }
.tdoc--kassenbuch .tdoc__table th, .tdoc--fahrtenbuch .tdoc__table th { border-bottom: 1.5px solid #b03a2e; color: #8a2a22; }
.tdoc--kassenbuch .tdoc__table td + td, .tdoc--fahrtenbuch .tdoc__table td + td { border-left: 1px solid #efc4be; }
.tdoc--kassenbuch .tdoc__foot, .tdoc--fahrtenbuch .tdoc__foot { border-top-color: #b03a2e; font-family: var(--font-hand); font-size: 17px; font-weight: 400; color: var(--pen); }

/* ================= Formular ================= */
.doc--form { width: 720px; }
.formdoc { padding: 46px 56px 48px; }
.formdoc__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; font-size: 12px; line-height: 1.45; }
.formdoc__issuer strong { display: block; font-size: 14px; }
.formdoc__issuer--org { display: flex; align-items: center; gap: 12px; }
.formdoc__issuer--org strong { font-size: 17px; line-height: 1.2; color: var(--fc); }
.formdoc__issl { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-d2); }
.formdoc__code { font-size: 10px; color: var(--ink-d3); white-space: nowrap; }
.formdoc__heading { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1.5px solid var(--rule-d); font-size: 16px; font-weight: 700; line-height: 1.3; }
/* Angaben als schlichte Aufstellung (Bescheinigungen) */
.formdoc__kv { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.formdoc__kv th, .formdoc__kv td { padding: 6px 0; border-bottom: .75px solid #d4d1c8; text-align: left; vertical-align: top; }
.formdoc__kv th { width: 38%; padding-right: 16px; font-weight: 400; color: var(--ink-d2); }
.formdoc__grid { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; border-top: 1px solid var(--rule-d); border-left: 1px solid var(--rule-d); }
.formdoc__field { position: relative; display: block; min-height: 54px; padding: 20px 10px 7px; border-right: 1px solid var(--rule-d); border-bottom: 1px solid var(--rule-d); }
.formdoc__field.is-wide { grid-column: span 2; }
.formdoc__no { position: absolute; left: 0; top: 0; min-width: 18px; height: 15px; padding: 0 3px; border-right: 1px solid var(--rule-d); border-bottom: 1px solid var(--rule-d); font-size: 9px; line-height: 15px; text-align: center; }
.formdoc__label { position: absolute; left: 26px; top: 2px; right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; color: var(--ink-d2); }
.formdoc__val { display: block; font-size: 13px; color: #111; }
.formdoc__text { font-size: 12.5px; line-height: 1.5; }
.formdoc__val.hand { font-size: 17px; line-height: 1.2; color: var(--pen); }
/* Papiervordruck der Einkommensteuererklärung: grüner Formulargrund, weiße Eintragungsfelder */
.formdoc--est { --fc: #2e6a45; }
.formdoc--est .formdoc__heading { color: #1d4a2f; border-bottom-color: var(--fc); }
.formdoc--est .formdoc__code { padding: 2px 7px; border: 1.5px solid var(--fc); color: var(--fc); font-size: 11px; font-weight: 700; }
.formdoc--est .formdoc__grid { border-color: var(--fc); background: #e6f0e7; }
.formdoc--est .formdoc__field { border-color: var(--fc); padding: 21px 8px 7px; }
.formdoc--est .formdoc__no { min-width: 22px; border-color: var(--fc); background: var(--fc); color: #fff; font-weight: 700; }
.formdoc--est .formdoc__label { left: 30px; color: #2a5a3c; }
.formdoc--est .formdoc__val { min-height: 26px; padding: 2px 6px; background: #fff; box-shadow: inset 0 0 0 1px rgba(46, 106, 69, .45); }
.formdoc__sig { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0 32px; margin-top: 30px; }
.formdoc__place { display: flex; flex-direction: column; flex: 0 0 200px; min-width: 0; }
.formdoc__sign { display: flex; flex-direction: column; flex: 1; min-width: 0; max-width: 300px; }
.formdoc__fill { display: flex; align-items: flex-end; gap: 8px; min-height: 26px; padding: 0 4px 3px; font-size: 13px; }
.formdoc__fill.hand { font-size: 17px; line-height: 1.2; color: var(--pen); }
.formdoc__ia { padding-bottom: 3px; font-size: 13px; }
.formdoc__hand { display: inline-block; margin-bottom: -6px; line-height: 0; }
.formdoc__line { padding-top: 2px; border-top: 1px solid #555; font-size: 9.5px; color: var(--ink-d3); }
.formdoc__stamp { margin-left: auto; transform: rotate(-12deg); opacity: .93; }
.formdoc__cap { flex: 0 0 100%; max-width: 532px; margin-top: 2px; padding-top: 2px; border-top: 1px solid #555; font-size: 9.5px; color: var(--ink-d3); }

/* Zuwendungsbestätigung nach amtlichem Muster */
.zb { padding: 40px 56px 40px; font-size: 12px; line-height: 1.42; }
.zb__box { position: relative; display: block; min-height: 46px; padding: 17px 8px 6px; border: 1px solid #1a1a1a; }
.zb__lab { position: absolute; left: 6px; top: 2px; font-size: 8.5px; line-height: 1.2; color: #333; }
.zb__val { display: block; font-size: 13px; }
.zb__iss { width: 62%; min-height: 78px; margin-bottom: 18px; }
.zb__iss strong { display: block; font-size: 13px; }
.zb__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.zb__law { margin: 2px 0 12px !important; font-size: 10px; line-height: 1.35; }
.zb__who { margin-bottom: -1px; }
.zb__row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
.zb__amt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.zb__amt--one { grid-template-columns: 1fr; }
.zb__amt .zb__box + .zb__box, .zb__row > .zb__day { margin-left: -1px; }
.zb__check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 12px 0 10px; }
.zb__opt { display: inline-flex; align-items: center; gap: 5px; }
.zb__line { display: flex; gap: 8px; margin: 0 0 8px; }
.zb__line .zb__lab { position: static; font-size: 12px; }
.zb__line .zb__val { font-size: 12px; }
.zb__frei { display: flex; gap: 8px; align-items: flex-start; }
.zb__frei .cb { margin-top: 3px; }
.zb__ins { padding: 0 2px; border-bottom: 1px dotted #555; font-weight: 700; }
.zb__p { margin: 0 0 8px !important; }
.zb .formdoc__sig { margin-top: 22px; }
.zb__alt { color: #222; }
.zb__blank { display: inline-block; width: 70px; height: 1em; vertical-align: -3px; border-bottom: 1px dotted #555; }
.zb__blank--l { width: 150px; }
.zb__fine { margin-top: 18px; padding-top: 8px; border-top: .75px solid #999; font-size: 8.5px; line-height: 1.4; color: #333; }

/* Verträge: Antiqua, Titel mittig, Paragrafen */
.ct { padding: 46px 70px 46px; font-family: Georgia, "Times New Roman", Times, serif; font-size: 13px; line-height: 1.5; }
.ct__top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; font-family: Arial, Helvetica, sans-serif; font-size: 10.5px; color: var(--ink-d2); }
.ct__iss strong { display: block; font-size: 12px; color: var(--ink-d); }
.ct__title { margin: 6px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 700; letter-spacing: .01em; text-align: center; }
.ct__sub { margin-bottom: 4px; font-size: 11.5px; font-style: italic; text-align: center; color: var(--ink-d2); }
.ct__body { margin-top: 18px; }
.ct__par { display: block; margin: 0 0 12px; }
.ct__ph { font-weight: 700; white-space: pre-wrap; }
.ct__pv { margin-top: 1px; }
.ct__text { font-size: 13px; }
.ct .formdoc__fill { font-family: Arial, Helvetica, sans-serif; }
.doc .ct__title { font-family: Georgia, "Times New Roman", Times, serif; }
.ct__parties { margin: 18px 0 0; text-align: center; line-height: 1.55; }
.ct__pname { display: block; font-weight: 700; }
.ct__role { margin-bottom: 6px; font-style: italic; color: var(--ink-d2); }
.ct .ct__sig { position: relative; display: block; margin-top: 30px; }
.ct__sig > .formdoc__place { width: 220px; margin-bottom: 26px; }
.ct__sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.ct__sigc { display: flex; flex-direction: column; min-width: 0; }
.ct__sigc .formdoc__fill { min-height: 52px; }
.ct__sig .formdoc__line { font-family: Arial, Helvetica, sans-serif; }
.ct__stamp { position: absolute; left: 172px; bottom: 22px; pointer-events: none; }
.ct__page { margin-top: 26px; font-family: Arial, Helvetica, sans-serif; font-size: 9.5px; color: var(--ink-d3); text-align: right; }
/* Handschriftliche Randnotiz in einem gedruckten Vordruck */
.hnotes { margin-top: 18px; }
.hnote { width: max-content; max-width: 78%; margin: 0 0 4px 24px !important; font-size: 17.5px; line-height: 1.25; color: var(--pen); transform-origin: 0 50%; }

/* ================= Ausdruck der elektronischen Lohnsteuerbescheinigung ================= */
.din.lstb { padding: 0 40px 36px 58px; font-size: 10px; line-height: 1.25; }
.lstb__grid { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 0 16px; padding-top: 36px; }
.lstb__win { position: relative; height: 128px; margin: 104px 0 0; }
.lstb__win .din__ret { height: auto; min-height: 12px; }
.lstb__win .din__to { font-size: 12.5px; }
.lstb__box { display: block; margin-top: 7px; padding: 3px 6px 4px; border: 1px solid #262626; }
.lstb__kv { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 1px 0; }
.lstb__k { flex: 1 1 auto; min-width: 0; font-size: 8.6px; color: #333; }
.lstb__v { flex: none; font: 700 10.5px/1.25 "Courier New", "Nimbus Mono PS", Courier, monospace; white-space: nowrap; }
.lstb__mh { display: flex; justify-content: space-between; margin-bottom: 2px; font-size: 9px; font-weight: 700; }
.lstb__er strong { display: block; margin-top: 2px; font-size: 11.5px; }
.lstb__er > .lstb__k + strong + div, .lstb__er div { font-size: 11px; }
.lstb__title { margin: 0 0 2px; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.lstb__intro { margin: 0 0 10px !important; font-size: 9.5px; color: #333; }
.lstb__colh, .lstb__row { display: grid; grid-template-columns: 19px minmax(0, 1fr) 104px; gap: 0 5px; }
.lstb__colh { font-size: 9px; font-weight: 700; border-bottom: 1px solid #262626; }
.lstb__rows { border-bottom: 1px solid #262626; }
.lstb__row { align-items: end; min-height: 16px; border-top: .75px solid #b5b5b0; }
.lstb__row:first-child { border-top: 0; }
.lstb__row.is-sub { border-top-style: dotted; }
.lstb__no { align-self: start; padding-top: 2px; font-size: 8.6px; font-weight: 700; }
.lstb__lab { padding: 2px 0 1px; font-size: 8.6px; line-height: 1.22; }
.lstb__row.is-sub .lstb__lab { padding-left: 12px; }
.lstb__amt { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-self: stretch; align-items: end; border-left: 1px solid #262626; font: 700 11px/1.2 "Courier New", "Nimbus Mono PS", Courier, monospace; }
.lstb__eur { padding: 0 5px 1px 0; text-align: right; }
.lstb__ct { align-self: stretch; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1px; border-left: 1px dotted #777; }
.lstb__colh .lstb__amt { font: 700 9px/1.4 Arial, Helvetica, sans-serif; }
.lstb__amt--txt { display: flex; align-items: flex-end; padding: 0 0 1px 6px; font-size: 10px; white-space: nowrap; }
.lstb__foot { margin-top: 18px; padding-top: 6px; border-top: .75px solid #999; font-size: 8.5px; color: #444; }

/* ================= Notizen ================= */
.doc--note { width: 380px; background: transparent; box-shadow: none; isolation: isolate; }
.note { position: relative; }
/* Haftnotiz: Klebestreifen oben glatt, unten leicht aufgebogen (Schatten nur an den Ecken) */
.note--postit {
  min-height: 300px; padding: 30px 24px 22px; color: #3a2e05;
  background: linear-gradient(180deg, rgba(120, 90, 0, .07) 0, rgba(120, 90, 0, 0) 30px), linear-gradient(170deg, #fff2a3 0%, #fbe78a 60%, #f6df7c 100%);
  box-shadow: 0 0 0 .5px rgba(90, 70, 0, .18), 0 1px 1px rgba(60, 40, 0, .12);
}
.note--postit::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 3px; height: 16px; z-index: -1; box-shadow: 0 10px 12px rgba(40, 30, 0, .3); border-radius: 50%; }
.note--postit .note__text { font-size: 21px; line-height: 1.3; }
.note--postit .note__text p, .note--paper .note__text p { margin: 0; }
.note__author { margin-top: 16px; font-size: 18px; text-align: right; }
/* Heftseite (kariert wäre Mathe – liniert mit Rand) */
.note--paper { padding: 24px 24px 24px 44px; background: var(--grain), repeating-linear-gradient(transparent 0 27px, #c3d3e6 27px 28px), #fdfdfa; box-shadow: var(--doc-shadow); font-size: 18px; line-height: 28px; color: #1f2f78; }
.note--paper::before { content: ""; position: absolute; left: 34px; top: 0; bottom: 0; width: 1px; background: #eca39c; }
/* Aktenvermerk / Hausmitteilung */
.doc--vermerk { width: 640px; box-shadow: var(--doc-shadow); }
.note--vermerk { padding: 36px 48px 40px; font-family: Arial, "Helvetica Neue", sans-serif; color: var(--ink-d); }
.note__vhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-d); }
.note__vorg { font-size: 13px; font-weight: 700; line-height: 1.3; }
.note__vmeta { display: grid; grid-template-columns: auto auto; gap: 0 10px; margin: 0; font-size: 10.5px; line-height: 1.45; }
.note__vmeta dt { color: var(--ink-d3); }
.note__vmeta dd { margin: 0; }
.note__vtype { margin: 16px 0 10px; font-size: 16px; font-weight: 700; }
.note--vermerk .note__text p { margin: 0 0 .45em; font-size: 13.5px; line-height: 1.5; }
.note--vermerk .note__author { margin-top: 18px; font-family: Arial, "Helvetica Neue", sans-serif; font-size: 12.5px; color: var(--ink-d2); text-align: left; }

/* ================= Foto ================= */
.doc--photo { width: 400px; padding: 0; --paper: #fff; }
.photo__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.photo__img svg { display: block; width: 100%; height: 100%; filter: saturate(.85) contrast(.97); }
.photo__overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 9px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); color: #fff; font: 600 12.5px/1.35 "Segoe UI", Arial, sans-serif; }
/* Papierabzug 10 × 15 mit weißem Rand, glänzend */
.doc:has(> .photo--print) { background: #fbfbfa; }
.photo--print { padding: 14px 14px 16px; }
.photo--print .photo__img::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .08) 100%); }
.photo__cap { margin-top: 12px; font-size: 21px; line-height: 1.2; color: var(--pen); text-align: center; }
.photo__label { margin-top: 10px; font-size: 11.5px; line-height: 1.4; color: var(--ink-d2); }
.photo__meta { display: block; margin-top: 6px; font-size: 10.5px; color: var(--ink-d3); }
.photo--print .photo__cap + .photo__meta { text-align: center; }
/* Anhang aus Amsel */
.photo--upload { font-family: "Segoe UI", Arial, sans-serif; color: #1c1c1e; }
.photo--upload .amsel__bar { padding: 10px 16px; }
.photo__file { display: block; padding: 10px 16px 8px; font-size: 12px; color: #4a4f56; }
.photo__frame { padding: 0 16px; }
.photo__desc { display: block; padding: 8px 16px 16px; font-size: 13px; line-height: 1.4; }
.photo__desc span { display: block; font-size: 11px; color: #6b7078; }
/* Bildschirmfoto eines Beitrags */
.photo--screen { padding: 14px; background: #fff; font-family: "Segoe UI", Arial, sans-serif; color: #1c1c1e; }
.post { border: 1px solid #dfe1e4; }
.post__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.post__ava { flex: none; display: inline-flex; width: 36px; height: 36px; overflow: hidden; }
.post__ava svg { display: block; width: 36px; height: 36px; }
.post__who { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.3; color: #65676b; }
.post__who b { font-size: 13.5px; color: #1c1c1e; }
.post__text { display: block; padding: 0 12px 10px; font-size: 14px; line-height: 1.45; }
.photo--screen .photo__meta { margin-top: 8px; }

/* ================= E-Mail / Amsel-Nachricht (Druckansicht) ================= */
.doc--email { width: 660px; overflow: hidden; border-radius: 0; --paper: #fff; }
.mail { font-family: "Segoe UI", Arial, sans-serif; color: #1c1c1e; }
.mail__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid #e3e5e8; font-size: 12px; color: #5a5f66; }
.mail__app { font-weight: 400; color: #4a4f56; }
.mail--amsel .mail__bar { border-bottom: 2px solid #f0a020; }
.mail__tag { font-size: 11.5px; color: #6b7078; }
.mail__subj { display: block; margin: 18px 20px 8px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.mail__head { display: flex; flex-direction: column; gap: 2px; padding: 0 20px 14px; border-bottom: 1px solid #ececec; font-size: 13px; }
.mail__row { display: block; }
.mail__k { display: inline-block; width: 56px; color: #7a7f86; }
.mail__body { padding: 18px 20px 26px; font-size: 14px; line-height: 1.55; }

/* ================= Amsel-Ausdruck (wie der amtliche Vordruck) ================= */
.doc--amsel { width: 760px; --paper: #fdfdfc; }
.amsel { --fc: #2e6a45; --ft: #f0f6f1; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; color: #1a1a1a; }
.amsel--ust { --fc: #8c3a30; --ft: #faf3f2; }
.amsel__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 2px solid #f0a020; font-family: "Segoe UI", Arial, sans-serif; }
.amsel__bar .amsel-logo b { color: #1c1c1e; }
.amsel__bar .amsel-logo small { color: #555; }
.amsel__meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; line-height: 1.45; color: #5a5f66; }
.amsel__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; padding: 18px 24px 14px; }
.amsel__to { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; gap: 4px 12px; font-size: 12.5px; }
.amsel__k { font-size: 10px; color: #555; }
.amsel__to .cells i { width: 15px; height: 20px; }
.amsel__title { text-align: right; }
.amsel__code { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border: 1.5px solid var(--fc); color: var(--fc); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.amsel__form { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; color: #1a1a1a; }
.amsel__sub { margin: 4px 0 0 !important; font-size: 11.5px; color: #555; }
.amsel__sec { margin: 0 24px 12px; border: 1px solid var(--fc); background: var(--ft); }
.amsel__band { margin: 0; padding: 5px 10px 4px; border-bottom: 1px solid var(--fc); background: color-mix(in srgb, var(--fc) 16%, #fff); color: color-mix(in srgb, var(--fc) 80%, #000); font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.amsel__rows { display: block; }
.amsel__row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 240px 30px; align-items: center; gap: 0 10px; min-height: 34px; padding: 4px 6px 4px 0; border-top: 1px solid color-mix(in srgb, var(--fc) 28%, transparent); }
.amsel__row:first-child { border-top: 0; }
.amsel__z { align-self: stretch; display: flex; align-items: center; justify-content: center; margin: -4px 0; border-right: 1px solid color-mix(in srgb, var(--fc) 40%, transparent); font-size: 11px; font-weight: 700; color: var(--fc); }
.amsel__l { font-size: 12.5px; line-height: 1.35; }
.amsel__v { min-height: 24px; padding: 3px 7px; background: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 50%, #fff); font-size: 13px; line-height: 18px; color: #111; overflow-wrap: anywhere; }
.amsel__v.is-num { font-weight: 700; text-align: right; white-space: nowrap; }
.amsel__u { font-size: 10px; font-weight: 700; color: var(--fc); }
/* USt 1 A: Kennzahlen, zwei Wertspalten (Bemessungsgrundlage volle EUR | Steuer EUR, Ct), Zeitraum zum Ankreuzen */
.amsel__period { margin: 0 24px 12px; padding: 6px 10px 8px; border: 1px solid var(--fc); background: var(--ft); }
.amsel__months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px 4px; margin-top: 4px; }
.amsel__mo { display: flex; align-items: center; gap: 3px; font-size: 9.5px; white-space: nowrap; color: #333; }
.amsel__mo b { font-size: 8.5px; color: var(--fc); }
.amsel--uva .amsel__row, .amsel__uh { grid-template-columns: 38px minmax(0, 1fr) 34px 132px 132px; gap: 0 8px; }
.amsel__uh { display: grid; align-items: end; padding: 3px 6px 3px 0; border-bottom: 1px solid color-mix(in srgb, var(--fc) 40%, transparent); font-size: 8.5px; line-height: 1.2; color: color-mix(in srgb, var(--fc) 80%, #000); text-align: center; }
.amsel--uva .amsel__row--txt .amsel__v { grid-column: 3 / 6; }
.amsel__kz { justify-self: center; min-width: 26px; padding: 1px 3px; border: 1px solid var(--fc); font-size: 10px; font-weight: 700; line-height: 1.3; text-align: center; color: var(--fc); background: #fff; }
.amsel__kz:empty { visibility: hidden; }
.amsel__v small { font-size: 9.5px; font-weight: 400; color: #555; }
.amsel__v--na { min-height: 24px; background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--fc) 14%, transparent) 4px 5px); box-shadow: none; }
.amsel__row--tax .amsel__l, .amsel__row--sub .amsel__l { padding-left: 16px; font-size: 12px; color: #333; }
.amsel__row--tax { min-height: 30px; border-top-style: dotted; }
.amsel__note { display: block; margin: 0 24px 12px; padding: 8px 10px 10px; border: 1px solid var(--fc); background: #fff; font-size: 12.5px; line-height: 1.5; }
.amsel__note b { display: block; margin-bottom: 2px; font-size: 11px; color: var(--fc); }
.amsel__foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; padding: 10px 24px 16px; border-top: 1px solid #e3e3e3; font-size: 10px; color: #6b6b6b; }

/* Nachtschicht: Papier leicht gedimmt */
[data-theme="nacht"] .doc { filter: brightness(.93) sepia(.08); }
[data-theme="nacht"] .doc--receipt { filter: brightness(.93) sepia(.08); }
[data-theme="retro"] .doc { filter: sepia(.18); }

/* Druck: kein Korn, keine Falzkanten, keine Lochung */
@media print {
  .doc { background-image: none !important; }
  .din::after, .doc--table::before, .doc--handwritten::after, .doc--receipt::after { display: none !important; }
}

/* Die Akte setzt --zoom per JS (Einpassen + Zoom). Die Briefvorschau ist auf schmalen Schirmen kleiner. */
@media (max-width: 760px) {
  .compose__preview .doc { --zoom: .5; }
}

/* Betrachter-Anbindung (Akte, game.js): runde Lupe über dem Blatt mit Schild; Inhalt ist eine vergrößerte Kopie
   desselben Blatts (D.attachLens). Miniaturen (.h-blattvorschau) tragen keinen eigenen Papierschatten. */
.lens {
  position: absolute; left: 0; top: 0; z-index: 20; width: 232px; height: 232px; overflow: hidden; pointer-events: none;
  background: #fff; border: 0; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(18, 26, 38, .18), 0 0 0 6px rgba(255, 255, 255, .92), 0 0 0 7px rgba(18, 26, 38, .12), 0 18px 40px -8px rgba(18, 26, 38, .35);
  opacity: 0; transition: opacity 120ms linear;
}
.lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 45%); pointer-events: none; }
.lens.is-on { opacity: 1; }
.lens.is-on.is-off { opacity: 0; }
.lens__inner > * { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.lens__inner .doc { box-shadow: none; }
.lens__lbl {
  position: absolute; left: 0; top: 0; z-index: 21; padding: 3px 8px; border-radius: 6px; background: #14181F; color: #fff;
  font: 700 12px/1.3 var(--font, sans-serif); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 120ms linear;
}
.lens__lbl.is-on { opacity: 1; }
.lens__lbl.is-on.is-off { opacity: 0; }
.h-blattvorschau__in .doc--receipt::before { box-shadow: none; }
/* assets/css/os.css */
/* Fiskus – Oberfläche des Betriebssystems, Gestaltung „Hell“: Schreibtisch, Fenster, Dienstleiste, Suche, Startmenü,
   Mitteilungen, Menüs, Programmwechsel, Telefon-Modus. Tokens und Bausteine kommen aus app.css.
   Glas nur auf Dienstleiste, Startmenü, Suche, Mitteilungen und Menüs – nie auf Fenstern. Fenster: weiß, Radius 10,
   weicher Schatten. Bewegt werden nur transform und opacity (os.js, Web Animations). */

:root {
  --os-z: 1;                       /* Vergrößerung großer Schirme (os.js setzt 1 / 1.15 / 1.6) */
  --os-bar: var(--h-leiste);       /* Dienstleiste */
  --os-title-h: var(--h-titel);    /* Titelleiste */
  /* Altnamen für Programme, die noch nicht neu gestaltet sind: zeigen auf Hell */
  --os-chrome: var(--grund);
  --os-chrome-2: var(--grund-2);
  --os-chrome-ink: var(--ink);
  --os-chrome-ink-2: var(--ink-2);
  --os-chrome-line: var(--linie);
  --os-frame: var(--linie-2);
  --os-frame-off: var(--linie);
  --os-title: var(--blau);
  --os-title-ink: var(--on-primary);
  --os-title-off: var(--grund-2);
  --os-title-off-ink: var(--ink-2);
  --os-accent: var(--blau);
  --os-red: var(--rot);
  --os-marker: var(--marker);
  --os-hard: var(--sch-fenster);
  --os-hard-off: var(--sch-fenster-hinten);
  --os-wall: #EEF1F5;
  --os-wall-ink: var(--ink);
  --os-wall-ink-2: var(--ink-2);
}

/* ================= Seite im Fiskus-Betrieb ================= */
html:has(body.is-os), body.is-os { height: 100%; overflow: hidden; }
body.is-os { background: var(--os-wall); overscroll-behavior: none; }
/* Ebenen außerhalb des Schreibtischs wachsen auf großen Schirmen mit (ui.js rechnet ihre Lage durch --os-z) */
body.is-os .modal-back, body.is-os #toolLayer, body.is-os .popmenu, body.is-os .printfx { zoom: var(--os-z); }

/* ================= Schreibtisch ================= */
.os {
  position: fixed; inset: 0; z-index: 1; overflow: hidden; zoom: var(--os-z);
  background: var(--os-wall); color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent;
}
.oswall { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #EEF1F5 url("../img/haselstedt.svg") center bottom / cover no-repeat; }
.oswall__scene { position: absolute; inset: 0; }
.oswall__scene svg { display: block; width: 100%; height: 100%; max-width: none; }
/* Hintergründe (IDs aus os.WALLPAPERS; „raster“ ist die Werkseinstellung Haselstedt) */
.os[data-wall="wappen"] .oswall { background: #24467F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Ccircle cx='32' cy='32' r='9' fill='none' stroke='%23fff' stroke-opacity='.10' stroke-width='1.5'/%3E%3Ccircle cx='32' cy='32' r='5' fill='none' stroke='%23fff' stroke-opacity='.08'/%3E%3C/svg%3E") 0 0 / 64px 64px; }
.os[data-wall="gebaeude"] .oswall { background: #E9EDF2; }
.os[data-wall="manila"] .oswall { background: #F4F6F9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='28'%3E%3Cpath d='M0 27.5h8' stroke='%232152A3' stroke-opacity='.10'/%3E%3C/svg%3E") 0 0 / 8px 28px; }
.os[data-wall="nacht"] .oswall { background: #121821 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='.9' fill='%23fff' fill-opacity='.10'/%3E%3C/svg%3E") 0 0 / 24px 24px; }
.os[data-wall="amsel"] .oswall { background: #1D4FA3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M-2 12L12 -2' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E") 0 0 / 10px 10px; }
.os[data-wall="stube87"] .oswall { background: radial-gradient(1200px 700px at 78% 22%, rgba(255, 236, 190, .22), transparent 60%), #2F4A3B; }

/* Telefon: Kopf der Übersicht (auf großen Schirmen aus) */
.oshome { display: none; }

/* ---------------- Symbole auf dem Schreibtisch ---------------- */
.osicons {
  position: absolute; left: 20px; top: 20px; bottom: calc(var(--os-bar) + 16px); z-index: 1;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 88px); grid-auto-columns: 88px; gap: 0 12px; align-content: start;
}
.osicon {
  display: grid; justify-items: center; align-content: start; gap: 6px; width: 88px; height: 84px; padding: 4px 2px 6px; margin: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
  font-family: var(--font); font-size: var(--t-13); line-height: 1.25; text-align: center;
  transition: background-color var(--t-kurz) var(--aus);
}
.osicon__img { display: block; width: 48px; height: 48px; flex: none; transition: transform var(--t-kurz) var(--aus); }
.osicon__img svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(18, 26, 38, .08)) drop-shadow(0 4px 10px rgba(18, 26, 38, .06)); }
.osicon .h-platte__k { fill: #fff; }
.osicon__lbl { max-width: 100%; padding: 0 2px; overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; }
.osicon:hover { background: rgba(255, 255, 255, .45); }
.osicon:hover .osicon__img { transform: translateY(-1px); }
.osicon.is-sel { background: rgba(33, 82, 163, .10); }
.osicon:focus { outline: none; }
.osicon:focus-visible { outline: 2px solid var(--fokus); outline-offset: 0; }
/* Platten auf dem Schreibtisch sind immer weiß mit dunkler Glyphe (auch im Farbschema „Nacht“) */
.osicon .h-platte__e { fill: #D9DFE6; }
.osicon .h-platte-svg { color: #2E3643; }
/* helle Hintergründe: feste dunkle Beschriftung, unabhängig vom Farbschema (Nacht hat helle --ink) */
.os.is-lightwall .osicon { color: #14181F; }
.os.is-lightwall .osfiles__head { color: #4B5361; }
.os.is-lightwall .osicon__meta .h-art { color: #4B5361; }
.os.is-lightwall .osicon__flag { color: #1D4A93; }
/* dunkle Hintergründe: helle Beschriftung */
.os:not(.is-lightwall) .osicon, .os:not(.is-lightwall) .osfiles__head { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.os:not(.is-lightwall) .osicon:hover { background: rgba(255, 255, 255, .10); }

/* Ablage rechts: offene Akten der laufenden Schicht */
.osfiles { position: absolute; right: 20px; top: 20px; bottom: calc(var(--os-bar) + 16px); z-index: 1; display: flex; flex-direction: column; gap: 6px; width: 120px; }
.osfiles[hidden] { display: none; }
.osfiles__head { margin: 0; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-13); font-weight: 700; color: var(--ink-2); text-align: center; }
.osfiles__grid { flex: 1; min-height: 0; display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; gap: 4px 8px; }
.osicon--file { width: 120px; height: auto; min-height: 96px; padding: 6px 4px 8px; gap: 4px; }
.osicon--file .osicon__img { width: 40px; height: 40px; }
.osicon--file .osicon__lbl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.osicon__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; font-size: var(--t-12); }
.osicon__meta .h-art { font-size: var(--t-12); }
.osicon__flag { font-weight: 700; color: var(--blau-text); }
.os:not(.is-lightwall) .osicon__meta .h-art, .os:not(.is-lightwall) .osicon__flag { color: #fff; }

/* ================= Fenster ================= */
.oslayer { position: absolute; left: 0; top: 0; right: 0; bottom: var(--os-bar); z-index: 2; pointer-events: none; }
.oswin {
  position: absolute; left: 0; top: 0; z-index: 10; display: flex; flex-direction: column; overflow: hidden; pointer-events: auto;
  background: var(--weiss); border-radius: var(--r-fenster); box-shadow: var(--sch-fenster);
}
.oswin.is-hinten { box-shadow: var(--sch-fenster-hinten); }
.oswin.is-vorn { box-shadow: 0 0 0 1px rgba(33, 82, 163, .22), var(--sch-fenster); }
.oswin.is-max, .oswin.is-snap-l, .oswin.is-snap-r { top: 0; bottom: 0; transform: none; width: auto; height: auto; border-radius: 0; box-shadow: 0 0 0 1px var(--linie); }
.oswin.is-max { left: 0; right: 0; }
.oswin.is-snap-l { left: 0; width: 50%; }
.oswin.is-snap-r { left: 50%; right: 0; }
.oswin.is-min { visibility: hidden; pointer-events: none; }
.oswin.is-drag, .oswin.is-resize { will-change: transform; }
.oswin.is-drag .oswin__content, .oswin.is-resize .oswin__content { pointer-events: none; }

/* Titelleiste: Platte + Titel + Untertitel · Mitte (ein Steuerelement) · Aktionen + Fensterknöpfe */
.oswin__bar {
  position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  height: var(--os-title-h); padding: 0 8px 0 14px; background: #F7F8FA; border-bottom: 1px solid var(--linie);
  color: var(--ink); user-select: none; cursor: default;
}
[data-theme="nacht"] .oswin__bar { background: #20252D; }
.oswin__back, .oswin__more { display: none; }
.oswin__head { grid-column: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.oswin__ico { flex: none; width: 24px; height: 24px; }
.oswin__ico svg { display: block; width: 100%; height: 100%; }
.oswin__tt { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; }
/* der Titel kürzt erst, wenn der Untertitel schon ganz weg ist */
.oswin__title { flex: 0 0 auto; max-width: 100%; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-14); font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.oswin__sub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-13); color: var(--ink-2); }
.oswin__mid { grid-column: 2; display: flex; justify-content: center; min-width: 0; }
.oswin__right { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.oswin__acts { display: flex; align-items: center; gap: 8px; min-width: 0; }
.oswin__acts .h-knopf { height: 30px; padding: 0 10px; font-size: var(--t-13); }
.oswin__ctl { flex: none; display: flex; gap: 2px; margin-left: 6px; }
.oswin__btn, .oswin__back, .oswin__more {
  place-items: center; width: 34px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus), color var(--t-kurz) var(--aus);
}
.oswin__btn { display: grid; }
.oswin__btn svg { width: 15px; height: 15px; stroke-width: 1.6; }
.oswin__btn:hover, .oswin__more:hover, .oswin__back:hover { background: var(--grund-2); color: var(--ink); }
.oswin__btn--close:hover { background: var(--rot-zart); color: var(--rot); }
.oswin__btn:focus-visible { outline-offset: -2px; }
/* hinteres Fenster: Titel grau, Inhalt leicht zurück */
.oswin.is-hinten .oswin__bar { background: #F2F4F6; }
.oswin.is-hinten .oswin__title, .oswin.is-hinten .oswin__sub { color: var(--ink-3); }
.oswin.is-hinten .oswin__btn { color: var(--ink-4); }
.oswin.is-hinten .oswin__content { opacity: .96; }
[data-theme="nacht"] .oswin.is-hinten .oswin__bar { background: #1A1E25; }
/* unter einem Modal: entsättigt, Primärknopf fällt zurück (app.css) */
.oswin.is-inaktiv .oswin__content { filter: grayscale(.4) brightness(.97); }
.oswin.is-busy .oswin__bar::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 30%; background: var(--blau); border-radius: 1px; animation: os-busy 1.1s var(--aus) infinite; }
@keyframes os-busy { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* Inhalt: contain: layout fängt position:fixed der Altseiten im Fenster */
.oswin__content { position: relative; flex: 1; min-height: 0; contain: layout; }
.oswin__body { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; background: var(--weiss); }
.oswin__body:focus { outline: none; }
.oswin__body.view { width: auto; max-width: none; margin: 0; padding: 24px 28px 40px; }
.oswin__body--rest { cursor: pointer; }

/* Kanten zum Ziehen der Größe (innen, das Fenster schneidet ab) */
.oswin__rz { position: absolute; z-index: 6; }
.oswin__rz--n { top: 0; left: 12px; right: 12px; height: 5px; cursor: ns-resize; }
.oswin__rz--s { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.oswin__rz--e { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.oswin__rz--w { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.oswin__rz--ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }
.oswin__rz--sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }
.oswin__rz--nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }
.oswin__rz--se { bottom: 0; right: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.oswin.is-max .oswin__rz, .oswin.is-snap-l .oswin__rz, .oswin.is-snap-r .oswin__rz { display: none; }

/* Ruhendes Fenster (Programme mit mono: nur eins arbeitet) */
.oswin__shield { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; margin: 0; padding: 0; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; }
.oswin__shield span { padding: 8px 14px; border-radius: 8px; background: var(--weiss); box-shadow: var(--sch-pop); color: var(--ink); font-size: var(--t-13); font-weight: 700; }
.oswin__shield:hover span { color: var(--blau-text); }

/* Andock-Vorschau */
.ossnap { position: absolute; z-index: 3; display: none; pointer-events: none; border-radius: var(--r-fenster); background: rgba(33, 82, 163, .08); box-shadow: inset 0 0 0 2px rgba(33, 82, 163, .35); }
.ossnap.is-on { display: block; }
.ossnap--l { left: 8px; top: 8px; bottom: calc(var(--os-bar) + 8px); width: calc(50% - 12px); }
.ossnap--r { right: 8px; top: 8px; bottom: calc(var(--os-bar) + 8px); width: calc(50% - 12px); }
.ossnap--max { left: 8px; right: 8px; top: 8px; bottom: calc(var(--os-bar) + 8px); }

/* ---------------- Altseiten im Fenster (bis zur Neugestaltung) ---------------- */
.oswin .chat { position: static; inset: auto; width: auto; height: 100%; transform: none; visibility: inherit; border: 0; transition: none; }
.oswin__body.view--chat { padding: 0; overflow: hidden; }
@media (min-width: 901px) {
  .oswin__body.view--case { padding: 0; overflow: hidden; }
  .oswin .case { height: 100%; min-height: 0; }
}
@media (max-width: 900px) { .oswin__body.view--case { padding: 0; } }
/* Akte: Dokumentbereich immer in der letzten Rasterzeile; „Stempeln“ bleibt rechts sichtbar */
.oswin .akw__body { grid-row: -2 / -1; }
.oswin .akw__stampbtn { position: sticky; right: 0; z-index: 1; background: var(--weiss); box-shadow: -6px 0 0 var(--weiss); }

/* ================= Dienstleiste ================= */
.osbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 6px;
  height: var(--os-bar); padding: 0 10px;
  background: var(--glas); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
  border-top: 1px solid rgba(18, 26, 38, .08);
}
[data-theme="nacht"] .osbar { border-top-color: rgba(255, 255, 255, .06); }
.osbar__trenn { flex: none; width: 1px; height: 24px; margin: 0 6px; background: rgba(18, 26, 38, .12); }
.osstart {
  position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus);
}
.osstart__mark { display: block; width: 28px; height: 28px; transition: transform var(--t-kurz) var(--aus); }
.osstart__mark svg { display: block; width: 100%; height: 100%; }
.osstart__ico, .osstart__t { display: none; }
.osstart:hover, .osstart.is-an { background: rgba(18, 26, 38, .06); }
.osstart:active .osstart__mark { transform: scale(.94); }
.osstart:focus-visible { outline-offset: -2px; }

/* die einzige Suche */
.ossearch { flex: none; width: 300px; margin-right: 2px; }
.ossearch > .h-i { left: 12px; }
.ossearch__q {
  width: 100%; height: 36px; padding: 0 12px 0 36px; margin: 0; border: 0; border-radius: 8px;
  background: rgba(18, 26, 38, .05); color: var(--ink); font-family: var(--font); font-size: var(--t-14);
  -webkit-appearance: none; appearance: none; transition: background-color var(--t-kurz) var(--aus), box-shadow var(--t-kurz) var(--aus);
}
.ossearch__q::placeholder { color: var(--ink-3); opacity: 1; }
.ossearch__q:hover { background: rgba(18, 26, 38, .07); }
.ossearch__q:focus { outline: none; background: var(--weiss); box-shadow: inset 0 0 0 2px var(--blau); }
.ossearch__q::-webkit-search-decoration { -webkit-appearance: none; }
[data-theme="nacht"] .ossearch__q { background: rgba(255, 255, 255, .07); }
.ossearch__pop {
  position: absolute; left: 58px; bottom: calc(var(--os-bar) + 10px); z-index: 61; width: 440px; max-height: min(560px, 64%); overflow-y: auto; padding: 8px;
  border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
  animation: h-auf var(--t-mittel) var(--aus) both;
}
.ossearch__grp { margin: 0; padding: 10px 10px 4px; }
.ossearch__i { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 7px 10px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.ossearch__i:hover { background: rgba(18, 26, 38, .05); }
.ossearch__i.is-an { background: var(--blau-zart); }
.ossearch__ico svg { display: block; width: 26px; height: 26px; }
.ossearch__txt { display: flex; flex-direction: column; min-width: 0; }
.ossearch__txt b, .ossearch__txt .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ossearch__txt b { font-size: var(--t-14); }
.ossearch__none { margin: 0; padding: 14px 10px; color: var(--ink-2); }

/* Programme: Platten 34 px, Namen ab 1600 px (das vordere ab 1100 px); laufend = Punkt, vorn = weiße Fläche + blauer Strich */
.ostasks { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.ostask {
  position: relative; flex: none; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 6px 0 5px; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer;
  font-family: var(--font); font-size: var(--t-14); white-space: nowrap;
  transition: background-color var(--t-kurz) var(--aus), box-shadow var(--t-kurz) var(--aus);
}
.ostask__ico { display: block; width: 34px; height: 34px; flex: none; }
.ostask__ico svg { display: block; width: 100%; height: 100%; }
.ostask .h-platte__e { fill: #C9D1DC; }
.ostask__gl { display: none; }
.ostask__t { display: none; padding-right: 4px; }
.ostask__n { position: absolute; top: 3px; left: 27px; height: 16px; min-width: 16px; padding: 0 4px; font-size: 10.5px; box-shadow: 0 0 0 2px #F7F8FA; }
.ostask:hover { background: rgba(18, 26, 38, .05); }
.ostask.is-open::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink-3); transition: width var(--t-mittel) var(--aus), margin var(--t-mittel) var(--aus); }
.ostask.is-active { background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: var(--sch-ctl); }
.ostask.is-active::after { width: 16px; margin-left: -8px; background: var(--blau); }
.ostask:focus-visible { outline-offset: -2px; }
[data-theme="nacht"] .ostask.is-active { background: rgba(255, 255, 255, .10); }
@media (min-width: 1100px) {
  .os:not(.is-mobile) .ostask.is-active .ostask__t { display: inline; color: var(--ink); }
  .os:not(.is-mobile) .ostask.is-active .ostask__n { position: static; box-shadow: none; }
}
@media (min-width: 1600px) {
  .os:not(.is-mobile) .ostask { padding-right: 8px; }
  .os:not(.is-mobile) .ostask__t { display: inline; }
  .os:not(.is-mobile) .ostask__n { position: static; box-shadow: none; }
}
/* Zu wenig Platz (os.js fitTasks): .is-eng ohne Dienstgrad, .is-dicht zusätzlich nur das vordere Programm mit Namen,
   danach sammelt „Weitere“ (+n) die hinteren Programme */
.os:not(.is-mobile) .osbar.is-dicht .ostask:not(.is-active):not(.ostask--mehr) { padding-right: 6px; }
.os:not(.is-mobile) .osbar.is-dicht .ostask:not(.is-active) .ostask__t { display: none; }
.os:not(.is-mobile) .osbar.is-dicht .ostask:not(.is-active) .ostask__n { position: absolute; box-shadow: 0 0 0 2px #F7F8FA; }
.ostask--mehr { gap: 4px; min-width: 44px; justify-content: center; padding: 0 10px; }
.ostask__mehr { display: grid; place-items: center; width: 22px; height: 22px; }
.ostask__mehrn { font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.ostask--mehr:hover .ostask__mehrn { color: var(--ink); }
.os.is-mobile .ostasks .ostask--mehr { display: none; }

/* Infobereich: Dienstmarken/EP, Ton, Amtsblatt, Uhr */
.ostray { flex: none; margin-left: auto; display: flex; align-items: center; gap: 4px; height: 100%; }
.ostray__hud { display: flex; align-items: center; height: 40px; padding: 0 10px; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font); }
.ostray__hud:hover { background: rgba(18, 26, 38, .05); }
.ostray .hud__rank { display: none; }
.ostray .hud__ep { flex-direction: row-reverse; align-items: center; gap: 8px; }
.ostray .hud__eplbl { font-size: var(--t-13); color: var(--ink-2); }
.ostray__btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 9px; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-family: var(--font);
  transition: background-color var(--t-kurz) var(--aus);
}
.ostray__btn:hover, .ostray__btn.is-an { background: rgba(18, 26, 38, .06); color: var(--ink); }
.ostray__btn > svg { width: 18px; height: 18px; }
.ostray__dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 2px #F7F8FA; }
.ostray__clock { display: grid; justify-items: end; align-content: center; gap: 1px; height: 40px; padding: 0 8px 0 6px; line-height: 1.15; }
.ostray__time { font-size: var(--t-14); font-weight: 700; color: var(--ink); }
.ostray__date { font-size: var(--t-12); color: var(--ink-2); white-space: nowrap; }
/* Dienstgrad nur auf sehr breiten Schirmen (Mock: Marken + EP) und nur, solange die Programme Platz haben */
@media (min-width: 2400px) { .ostray .hud__rank { display: flex; } }
.osbar.is-eng .ostray .hud__rank { display: none; }

/* Programmwechsel-Knopf (Telefon: in der Übersicht) */
.osswbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; margin: 0; border: 0; border-radius: var(--r-ctl); background: var(--weiss); color: var(--ink); box-shadow: var(--sch-ctl); font-family: var(--font); font-size: var(--t-14); font-weight: 700; cursor: pointer; }
.osswbtn__t { font-weight: 400; color: var(--ink-2); }

/* ================= Startmenü (Glas) ================= */
.osmenu {
  position: absolute; left: 10px; bottom: calc(var(--os-bar) + 10px); z-index: 60; display: flex; flex-direction: column;
  width: 680px; max-width: calc(100% - 20px); max-height: calc(100% - var(--os-bar) - 20px); overflow: hidden;
  border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
}
.osmenu__suche { display: none; }
.osmenu__kopf { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 24px 18px; }
.osmenu__wo { min-width: 0; }
.osmenu__wo h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-20); }
.osmenu__wo .h-meta { margin: 2px 0 0; }
.osmenu__fort { flex: none; display: grid; justify-items: end; gap: 6px; min-width: 200px; }
.osmenu__fort b { font-size: var(--t-14); }
.osmenu__fort .h-link { font-size: var(--t-13); }
.osmenu__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); border-top: 1px solid var(--linie); }
.osmenu__apps { min-height: 0; overflow-y: auto; padding: 14px 10px 14px 12px; border-right: 1px solid var(--linie); }
.osmenu__apps .h-kopfzeile, .osmenu__weiter .h-kopfzeile { margin: 0; padding: 4px 10px 8px; }
.osmenu__item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 10px; margin: 0;
  border: 0; border-radius: 7px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); font-size: var(--t-14);
}
.osmenu__item:hover, .osmenu__item:focus-visible { background: rgba(18, 26, 38, .05); outline: none; }
.osmenu__item:focus-visible { box-shadow: inset 0 0 0 2px var(--fokus); }
.osmenu__ico { flex: none; width: 26px; height: 26px; }
.osmenu__ico svg { display: block; width: 100%; height: 100%; }
.osmenu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osmenu__weiter { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 16px 14px 14px; }
.osmenu__case { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 10px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); }
.osmenu__case:hover, .osmenu__case:focus-visible { background: rgba(18, 26, 38, .045); outline: none; }
.osmenu__case:focus-visible { box-shadow: inset 0 0 0 2px var(--fokus); }
.osmenu__mini { width: 44px; height: 56px; border-radius: 3px; }
.osmenu__sico { display: grid; place-items: center; width: 44px; }
.osmenu__sico svg { display: block; width: 32px; height: 32px; }
.osmenu__ct { display: flex; flex-direction: column; min-width: 0; }
.osmenu__ct b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-14); }
.osmenu__ct .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osmenu__cs { font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.osmenu__leer { margin: 0; padding: 8px 10px; font-size: var(--t-13); color: var(--ink-2); max-width: 40ch; }
.osmenu__team { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--linie); font-size: var(--t-13); color: var(--ink-2); }
.osmenu__team b { color: var(--ink); }
.osmenu__team .h-code { margin-left: auto; }
.osmenu__foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; border-top: 1px solid var(--linie); background: rgba(245, 246, 248, .7); }
[data-theme="nacht"] .osmenu__foot { background: rgba(0, 0, 0, .15); }
.osmenu__wer { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 8px 4px 6px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); }
.osmenu__wer:hover { background: rgba(18, 26, 38, .05); }
.osmenu__wer > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.osmenu__wer b { font-size: var(--t-14); }
.osmenu__wer .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osmenu__rechts { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.osmenu__ver { margin: 0 4px 0 0; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); font-family: var(--font); font-size: var(--t-12); cursor: pointer; }
.osmenu__ver:hover { color: var(--ink); background: rgba(18, 26, 38, .05); }

/* ================= Kontextmenü, Panels, Programmwechsel ================= */
.osctx { position: absolute; z-index: 80; min-width: 210px; max-width: 320px; max-height: calc(100% - 12px); overflow-y: auto; overscroll-behavior: contain; }
.osctx__item { display: block; width: 100%; height: 34px; padding: 0 10px; margin: 0; overflow: hidden; border: 0; border-radius: 7px; background: none; color: var(--ink); text-align: left; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: var(--t-14); cursor: pointer; }
.osctx__item.is-bold { font-weight: 700; }
.osctx__item.is-danger { color: var(--rot); }
.osctx__item:hover:not(:disabled), .osctx__item:focus-visible { background: rgba(18, 26, 38, .06); outline: none; }
.osctx__item:focus-visible { box-shadow: inset 0 0 0 2px var(--blau); }
.osctx__item:disabled { color: var(--ink-4); cursor: default; }
.osctx__sep { height: 1px; margin: 5px 8px; background: var(--linie); }

.ospanel {
  position: absolute; right: 10px; bottom: calc(var(--os-bar) + 10px); z-index: 60; display: flex; flex-direction: column;
  width: 380px; max-width: calc(100% - 20px); max-height: calc(100% - var(--os-bar) - 20px);
  border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
  animation: h-auf var(--t-mittel) var(--aus) both;
}
.ospanel:focus { outline: none; }
.ospanel__head { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 10px; }
.ospanel__head b { font-size: var(--t-16); }
.ospanel__head .h-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ospanel__list { min-height: 0; overflow-y: auto; padding: 0 8px 10px; }
.ospanel__i { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; width: 100%; padding: 10px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; font-family: var(--font); }
.ospanel__i.is-clickable { cursor: pointer; }
.ospanel__i.is-clickable:hover { background: rgba(18, 26, 38, .05); }
.ospanel__ico svg { display: block; width: 28px; height: 28px; }
.ospanel__txt { display: flex; flex-direction: column; min-width: 0; }
.ospanel__src { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-13); color: var(--ink-2); }
.ospanel__src b { color: var(--ink); }
.ospanel__t { font-size: var(--t-14); }
.ospanel__p { font-size: var(--t-13); color: var(--ink-2); }
.osnote--error .ospanel__t { color: var(--rot); }
.ospanel__empty { margin: 0; padding: 12px 10px 16px; color: var(--ink-2); }
.ospanel--cal { width: 320px; }
.oscal { padding: 0 16px 16px; }
.oscal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 12px; text-align: center; font-size: var(--t-13); }
.oscal__grid b { font-size: var(--t-12); line-height: 2; color: var(--ink-3); }
.oscal__grid span { display: grid; place-items: center; height: 32px; border-radius: 50%; }
.oscal__grid .is-we { color: var(--ink-3); }
.oscal__grid .is-today { background: var(--blau); color: var(--on-primary); font-weight: 700; }

.osswitch { position: absolute; left: 50%; top: 42%; z-index: 90; width: 460px; max-width: calc(100% - 24px); max-height: 70%; overflow-y: auto; transform: translate(-50%, -50%); padding: 10px; }
.osswitch__head { margin: 0; padding: 6px 10px 8px; }
.osswitch__list { display: flex; flex-direction: column; gap: 2px; }
.osswitch__i { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 8px; cursor: pointer; }
.osswitch__i:hover { background: rgba(18, 26, 38, .05); }
.osswitch__i.is-an { background: var(--blau-zart); }
.osswitch__i.is-min { opacity: .72; }
.osswitch__i:focus-visible { outline-offset: -2px; }
.osswitch__ico svg { display: block; width: 32px; height: 32px; }
.osswitch__t { display: flex; flex-direction: column; min-width: 0; }
.osswitch__t b, .osswitch__t .h-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osswitch__x { display: grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.osswitch__x:hover { background: var(--rot-zart); color: var(--rot); }
.osswitch__empty { margin: 0; padding: 8px 10px 12px; color: var(--ink-2); }
.osswitch__desk { margin-top: 10px; }

/* ================= Mitteilungen (Glas, sparsam) ================= */
.osnotes { position: absolute; right: 10px; bottom: calc(var(--os-bar) + 10px); z-index: 70; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100% - 20px); pointer-events: none; transition: transform var(--t-mittel) var(--aus); }
.osnote {
  position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; padding: 14px 16px 16px; pointer-events: auto;
  border-radius: var(--r-pop); background: var(--glas-dicht); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--sch-pop);
  color: var(--ink);
}
.osnote.is-clickable { cursor: pointer; }
.osnote__ico svg { display: block; width: 32px; height: 32px; }
.osnote__body { min-width: 0; }
.osnote__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-right: 22px; font-size: var(--t-13); color: var(--ink-2); }
.osnote__src { color: var(--ink); }
.osnote__head time { flex: none; color: var(--ink-3); }
.osnote__t { display: block; margin-top: 2px; font-size: var(--t-14); }
.osnote p { margin: 2px 0 0; font-size: var(--t-14); line-height: 1.45; color: var(--ink); }
.osnote--error .osnote__t { color: var(--rot); }
.osnote__akt { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.osnote__x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity var(--t-kurz) var(--aus); }
.osnote:hover .osnote__x, .osnote:focus-within .osnote__x, .osnote__x:focus-visible { opacity: 1; }
.osnote__x:hover { background: rgba(18, 26, 38, .06); color: var(--ink); }
@media (hover: none) { .osnote__x { opacity: 1; } }

/* ================= Dialoge des Systems ================= */
.osprops { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0; font-size: var(--t-14); }
.osprops dt { color: var(--ink-2); }
.osabout { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; }
.osabout__name { margin: 0 0 4px; font-size: var(--t-20); font-weight: 700; }
.oswalls { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.oswalls__i { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; padding: 8px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font); }
.oswalls__i:hover { background: var(--grund); }
.oswalls__i.is-on { background: var(--blau-zart); }
.oswalls__t { display: flex; flex-direction: column; min-width: 0; }
.oswalls__prev { display: block; width: 96px; height: 60px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); background: #EEF1F5 url("../img/haselstedt.svg") center bottom / cover no-repeat; }
.oswalls__prev[data-wall="wappen"] { background: #24467F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='4' fill='none' stroke='%23fff' stroke-opacity='.2'/%3E%3C/svg%3E"); }
.oswalls__prev[data-wall="gebaeude"] { background: linear-gradient(#DCE6F1, #F1F4F8 70%, #D9E0E8 70%); }
.oswalls__prev[data-wall="manila"] { background: #F4F6F9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10'%3E%3Cpath d='M0 9.5h6' stroke='%232152A3' stroke-opacity='.18'/%3E%3C/svg%3E"); }
.oswalls__prev[data-wall="nacht"] { background: #121821; }
.oswalls__prev[data-wall="amsel"] { background: #1D4FA3; }
.oswalls__prev[data-wall="stube87"] { background: radial-gradient(60px 40px at 75% 25%, rgba(255, 236, 190, .35), transparent 70%), #2F4A3B; }

/* ================= Anmelden → „Profil wird geladen“ ================= */
.osboot { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: #EEF1F5 url("../img/haselstedt.svg") center bottom / cover no-repeat; color: var(--ink); font-family: var(--font); }
.osboot__mid { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: -8vh; }
.osboot__name { margin: 6px 0 0; font-size: var(--t-20); font-weight: 700; }
.osboot__txt { margin: 0; font-size: var(--t-14); color: var(--ink-2); }
.osboot__bar { display: block; width: 160px; height: 4px; margin-top: 6px; overflow: hidden; border-radius: 2px; background: rgba(18, 26, 38, .08); }
.osboot__bar i { display: block; width: 100%; height: 100%; border-radius: 2px; background: var(--blau); transform-origin: left; animation: os-laden 700ms var(--aus) both; }
@keyframes os-laden { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.osboot__foot { position: absolute; left: 28px; bottom: 24px; display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--t-13); color: var(--ink-2); }

/* Sperren: derselbe Sperrbildschirm wie bei der Anmeldung (landing.css), über dem Schreibtisch */
.ls.ls--os { z-index: 2900; }

/* ================= Telefon (os.isMobile): Programme bildschirmfüllend, unten eine Glasleiste ================= */
.os.is-mobile { --os-bar: calc(64px + env(safe-area-inset-bottom)); --os-title-h: auto; }
.os.is-mobile .oswall { background-position: 62% bottom; }
.os.is-mobile .oshome { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: calc(18px + env(safe-area-inset-top)) 16px 8px; }
.oshome > div { display: flex; flex-direction: column; min-width: 0; }
.oshome .osswbtn[hidden] { display: none; }
.oshome__t { font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.oshome__d { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-13); color: var(--ink-2); }
.os.is-mobile:not(.is-lightwall) .oshome { color: #fff; }
.os.is-mobile:not(.is-lightwall) .oshome__d { color: rgba(255, 255, 255, .8); }
.os.is-mobile .osicons { left: 8px; right: 8px; top: calc(128px + env(safe-area-inset-top)); bottom: calc(var(--os-bar) + 8px); grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); grid-template-rows: none; grid-auto-rows: 92px; gap: 4px; overflow-y: auto; }
.os.is-mobile .osicon { width: auto; }
.os.is-mobile .osfiles { display: none; }
.os.is-mobile .oslayer { bottom: var(--os-bar); }
.os.is-mobile .oswin { inset: 0 !important; width: auto !important; height: auto !important; transform: none !important; border-radius: 0; box-shadow: none; }
.os.is-mobile .oswin:not(.is-focused) { visibility: hidden; pointer-events: none; }
.os.is-mobile .oswin__rz, .os.is-mobile .oswin__ctl, .os.is-mobile .oswin__ico { display: none; }
/* Kopf: Zurück · Titel + Untertitel · „…“; darunter Mitte und Aktionen des Programms */
.os.is-mobile .oswin__bar {
  grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: auto; row-gap: 6px; column-gap: 4px; height: auto; min-height: 56px;
  padding: calc(6px + env(safe-area-inset-top)) 6px 8px; background: rgba(250, 251, 252, .96); border-bottom: 1px solid var(--linie);
}
[data-theme="nacht"] .os.is-mobile .oswin__bar { background: #20252D; }
.os.is-mobile .oswin__back { display: grid; grid-column: 1; grid-row: 1; width: 40px; height: 40px; color: var(--blau); }
.os.is-mobile .oswin__back svg, .os.is-mobile .oswin__more svg { width: 22px; height: 22px; }
.os.is-mobile .oswin__head { grid-column: 2; grid-row: 1; justify-content: center; text-align: center; }
.os.is-mobile .oswin__tt { flex-direction: column; align-items: center; gap: 0; }
.os.is-mobile .oswin__title { max-width: 100%; font-size: 15px; }
.os.is-mobile .oswin__sub { max-width: 100%; font-size: 12.5px; }
.os.is-mobile .oswin__right { display: contents; }
.os.is-mobile .oswin__more { display: grid; grid-column: 3; grid-row: 1; width: 40px; height: 40px; color: var(--blau); }
.os.is-mobile .oswin__mid { grid-column: 1 / -1; grid-row: 2; padding: 0 8px; }
.os.is-mobile .oswin__mid > .h-seg { display: flex; width: 100%; }
.os.is-mobile .oswin__mid > .h-seg .h-seg__o { flex: 1 1 0; padding: 0 6px; }
.os.is-mobile .oswin__acts { grid-column: 1 / -1; grid-row: 3; justify-content: flex-end; padding: 0 8px; }
.os.is-mobile .oswin__body.view { padding: 16px 16px 32px; }
.os.is-mobile .oswin__body.view--case { padding: 0; }
.os.is-mobile .oswin.is-hinten .oswin__content { opacity: 1; }
/* Glasleiste unten: vier Programme + „Mehr“ (Startmenü) */
.os.is-mobile .osbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0 0 env(safe-area-inset-bottom); }
.os.is-mobile .osbar > .ossearch, .os.is-mobile .osbar__trenn, .os.is-mobile .ostray { display: none; }
.os.is-mobile .ostasks { display: contents; }
.os.is-mobile .ostask, .os.is-mobile .osstart {
  display: grid; justify-items: center; align-content: center; gap: 3px; width: auto; height: 64px; padding: 0 2px; border-radius: 0;
  background: none; box-shadow: none; color: var(--ink-2); font-size: 11.5px; line-height: 1.1;
}
.os.is-mobile .ostask:nth-child(n+5) { display: none; }
.os.is-mobile .ostask__ico, .os.is-mobile .osstart__mark { display: none; }
.os.is-mobile .ostask__gl, .os.is-mobile .osstart__ico { display: block; }
.os.is-mobile .ostask__gl svg, .os.is-mobile .osstart__ico svg { display: block; width: 22px; height: 22px; }
.os.is-mobile .ostask__t, .os.is-mobile .osstart__t { display: block; max-width: 100%; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os.is-mobile .ostask.is-active, .os.is-mobile .osstart.is-an { color: var(--blau); font-weight: 700; background: none; box-shadow: none; }
.os.is-mobile .ostask::after { display: none; }
.os.is-mobile .ostask__n { position: absolute; top: 8px; left: 50%; margin-left: 4px; box-shadow: none; }
.os.is-mobile .osstart { order: 9; }
/* Startmenü als Blatt von unten, mit der Suche oben */
.os.is-mobile .osmenu { left: 0; right: 0; bottom: var(--os-bar); width: auto; max-width: none; max-height: calc(100% - var(--os-bar) - env(safe-area-inset-top) - 12px); border-radius: 16px 16px 0 0; }
.os.is-mobile .osmenu__suche { display: block; flex: none; padding: 14px 16px 0; }
.os.is-mobile .osmenu__suche .ossearch { width: 100%; }
.os.is-mobile .osmenu__suche .ossearch__q { height: 40px; }
.os.is-mobile .osmenu .ossearch__pop { position: static; width: auto; max-height: 46vh; margin: 8px 8px 0; padding: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
.os.is-mobile .osmenu__kopf { padding: 16px 16px 12px; flex-wrap: wrap; gap: 8px; }
.os.is-mobile .osmenu__fort { justify-items: start; min-width: 0; width: 100%; }
.os.is-mobile .osmenu__body { display: block; overflow-y: auto; }
.os.is-mobile .osmenu__apps { overflow: visible; border-right: 0; padding: 10px 8px 4px; }
.os.is-mobile .osmenu__weiter { overflow: visible; padding: 4px 8px 12px; border-top: 1px solid var(--linie); }
.os.is-mobile .osmenu__item { height: 46px; }
.os.is-mobile .osmenu__ver { display: none; }
.os.is-mobile .ospanel { left: 8px; right: 8px; width: auto; }
.os.is-mobile .osnotes { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(var(--os-bar) + 8px); }
.os.is-mobile .osswitch { left: 0; right: 0; top: auto; bottom: var(--os-bar); width: auto; max-width: none; max-height: calc(100% - var(--os-bar) - 40px); transform: none; border-radius: 16px 16px 0 0; padding: 14px 10px 12px; }

/* Tablet hochkant und schmale Schirme (768–1099 px): Infobereich verdichten */
@media (max-width: 1099.98px) {
  .os:not(.is-mobile) .ossearch { width: 200px; }
  .os:not(.is-mobile) .ostray .hud__ep { display: none; }
  .os:not(.is-mobile) .ostray__date { display: none; }
  .os:not(.is-mobile) .osmenu { width: 600px; }
  .os:not(.is-mobile) .osmenu__body { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 899.98px) {
  .os:not(.is-mobile) .ossearch { width: 44px; }
  .os:not(.is-mobile) .ossearch__q { padding-right: 0; color: transparent; }
  .os:not(.is-mobile) .ossearch__q::placeholder { color: transparent; }
  .os:not(.is-mobile) .ossearch__q:focus { position: absolute; left: 0; bottom: 0; width: 280px; z-index: 2; color: var(--ink); }
  .os:not(.is-mobile) .ossearch__q:focus::placeholder { color: var(--ink-3); }
}

/* Niedrige Schirme (Telefon quer, 667×375 / 844×390): Leisten flacher, Programme rollen als Ganzes */
@media (max-height: 499.98px) {
  .os.is-mobile { --os-bar: calc(50px + env(safe-area-inset-bottom)); }
  /* quer: Symbol und Name nebeneinander, gemeinsam mittig; Zähler hinter dem Namen statt darüber */
  .os.is-mobile .ostask, .os.is-mobile .osstart { height: 50px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; font-size: 12px; }
  .os.is-mobile .ostask__n { position: static; margin-left: 0; }
  .os.is-mobile .oswin__bar { min-height: 46px; padding-top: calc(2px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .os.is-mobile .oshome { padding-top: calc(8px + env(safe-area-inset-top)); }
  .os.is-mobile .oshome__t { font-size: 20px; }
  .os.is-mobile .osicons { top: calc(64px + env(safe-area-inset-top)); grid-auto-rows: 88px; }
  .os.is-mobile .oswin__content { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .os.is-mobile .oswin__body.fapp:not(.view--chat), .os.is-mobile .oswin__body.view--case,
  .os.is-mobile .oswin__body.view--amsel, .os.is-mobile .oswin__body.view--app { position: relative; inset: auto; height: max(100%, 440px); }
  .os.is-mobile .akw__head { display: none; }
  .os.is-mobile .osmenu__body { columns: 2 260px; }
}

/* Schmale Fenster (Tablet hochkant, angedockt): das Steuerelement der Mitte rückt in eine zweite Zeile, der Titel behält Platz */
.oswin { container: oswin / inline-size; }
@container oswin (max-width: 820px) {
  .os:not(.is-mobile) .oswin.has-mid .oswin__bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: var(--os-title-h) auto; row-gap: 0; height: auto; }
  .os:not(.is-mobile) .oswin.has-mid .oswin__mid { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding: 0 0 8px; }
  .os:not(.is-mobile) .oswin.has-mid .oswin__right { grid-column: 2; grid-row: 1; }
}

/* Touch im Fenster-Modus (Tablets): Fensterknöpfe, Titelleisten-Aktionen und Menüpunkte mindestens 40 px */
@media (pointer: coarse) {
  .os:not(.is-mobile) .oswin__btn { width: 44px; height: 40px; }
  .oswin__acts .h-knopf { height: 40px; }
  .oswin__acts .h-knopf--icon { width: 40px; }
  .osctx__item { height: 44px; }
  .osmenu__item { height: 44px; }
  .ostray__btn { min-width: 44px; height: 44px; }
  .ossearch__i { min-height: 48px; }
}

/* Bewegung aus */
@media (prefers-reduced-motion: reduce) { .oswin.is-busy .oswin__bar::after { animation: none; width: 100%; opacity: .5; } }
html.no-motion .oswin.is-busy .oswin__bar::after { animation: none; width: 100%; opacity: .5; }

/* assets/css/akte.css */
/* Fiskus „Hell“ – Programm „Akte“ (game.js) (Ladereihenfolge: … case, docs, os, akte, amsel …).
   Akte: Werkzeugleiste (Dokumentname · Zeigen/Textmarker/Lupe/Notiz · Zoom), links Miniaturen (--w-seiten),
   in der Mitte das Blatt auf der Leinwand (--tisch, ohne Rahmen ums Papier), rechts das einklappbare Prüfpanel
   (--w-panel). Telefon: Blatt in voller Breite, Prüfpunkte als Blatt von unten mit den Werkzeugen im Kopf.
   Eigene Klassen ak-*; .akte__stage/.akte__paper bleiben (ui.js richtet Werkzeugfenster daran aus). */

/* ================= Akte: Rahmen ================= */
.oswin__body.view--case, .os.is-mobile .oswin__body.view--case { padding: 0; overflow: hidden; background: var(--weiss); }
.ak { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--weiss); container-type: inline-size; container-name: akte; }
.ak > .ak-wz { grid-row: 1; }
.ak > .ak-bannerzeile { grid-row: 2; }
.ak > .ak-body { grid-row: 3; }

/* ---------- Werkzeugleiste ---------- */
.ak-wz { min-height: 52px; gap: 12px; }
.ak-wz .h-werkzeug__links { gap: 8px; }
.ak-wz__doc { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ak-wz__doc > b { flex: 0 0 auto; max-width: 62%; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-14); }
.ak-wz__doc > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-13); color: var(--ink-2); }
.ak-wz__doc > span.is-marker { color: var(--ink); }
.ak-wz__doc .lg { margin-left: 2px; }
.ak-wz__seg .h-seg__o { gap: 7px; padding: 0 12px 0 10px; }
.ak-farbe { flex: none; width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ak-wz__seg .h-seg__o:disabled { opacity: .45; cursor: not-allowed; }
.ak-wz .h-zoom > output { min-width: 56px; font-variant-numeric: tabular-nums; }
.ak-wz .h-zoom > button:disabled { color: var(--ink-4); cursor: default; background: none; }
.ak-wz__panel.is-zu { color: var(--blau); }
.ak-hier { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }

/* ---------- Körper: Miniaturen | Leinwand | Prüfpanel ---------- */
.ak-body { display: grid; grid-template-columns: var(--w-seiten, 172px) minmax(0, 1fr) var(--w-panel, 372px); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.ak.ohne-seiten .ak-body { grid-template-columns: 0 minmax(0, 1fr) var(--w-panel, 372px); }
.ak.is-panel-zu .ak-body { grid-template-columns: var(--w-seiten, 172px) minmax(0, 1fr) 0; }
.ak.ohne-seiten.is-panel-zu .ak-body { grid-template-columns: 0 minmax(0, 1fr) 0; }
.ak.ohne-seiten .ak-seiten, .ak.is-panel-zu .ak-panel { display: none; }

/* Miniaturen: derselbe Druck wie das Blatt, verkleinert */
.ak-seiten { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 0; padding: 18px 0 28px; overflow-y: auto; overscroll-behavior: contain; background: var(--grund); border-right: 1px solid var(--linie); scrollbar-width: thin; }
.ak-seite { position: relative; flex: none; display: grid; justify-items: center; gap: 8px; width: 140px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: var(--t-13); line-height: 1.3; text-align: center; cursor: pointer; }
.ak-seite__blatt { position: relative; display: block; border-radius: 2px; outline: 0 solid var(--blau); outline-offset: 4px; transition: outline-color var(--t-kurz) var(--aus); }
.ak-seite:hover .ak-seite__blatt { outline: 1px solid var(--linie-2); }
.ak-seite.is-an .ak-seite__blatt { outline: 2px solid var(--blau); }
.ak-seite:focus-visible { outline: none; }
.ak-seite:focus-visible .ak-seite__blatt { outline: 2px solid var(--fokus, var(--blau)); outline-offset: 5px; }
.ak-seite__t { display: block; max-width: 140px; }
.ak-seite__t b { display: block; font-weight: 400; color: var(--ink-2); overflow-wrap: anywhere; hyphens: auto; }
.ak-seite__t span { display: block; color: var(--ink-3); }
.ak-seite.is-an .ak-seite__t b { font-weight: 700; color: var(--ink); }
.ak-seite__marke, .ak-seite__neu {
  position: absolute; top: -8px; right: -12px; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 10px;
  font-size: 11.5px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--grund);
}
.ak-seite__marke { background: var(--marker); color: #5A4A00; }
.ak-seite__marke .h-i { width: 12px; height: 12px; stroke-width: 2.2; }
.ak-seite__neu { background: var(--blau); color: var(--on-primary); }
.ak-seite--fehlt { cursor: default; }
.ak-seite--neu { cursor: pointer; }
.ak-seite--neu:hover .h-blattvorschau--fehlt { border-color: var(--blau); color: var(--blau); }
.ak-seite.is-bump .ak-seite__blatt, .ak-seite.is-new .ak-seite__blatt { animation: ak-blitz 640ms var(--aus); }
@keyframes ak-blitz { 0%, 100% { box-shadow: 0 0 0 0 rgba(33, 82, 163, 0); } 35% { box-shadow: 0 0 0 6px rgba(33, 82, 163, .22); } }

/* Leinwand: Papier ohne Rahmen; Overlays (Verweis, Randvermerke) liegen auf der Leinwand, nie auf dem Papier */
.ak-mitte { grid-column: 2; grid-row: 1; position: relative; min-width: 0; min-height: 0; background: var(--tisch); overflow: hidden; }
.akte__stage.ak-tisch { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; padding: 36px 40px 72px; }
.akte__paper { display: flex; justify-content: center; justify-content: safe center; min-width: min-content; }
.ak-bogen { position: relative; flex: none; }
.ak-bogen > .doc { margin: 0; }
.ak-auflage { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.akte__paper > .ak-bogen > .doc.is-enter { animation: ak-blatt var(--t-mittel) var(--aus); }
.akte__paper[data-dir="-1"] > .ak-bogen > .doc.is-enter { animation-name: ak-blatt-l; }
@keyframes ak-blatt { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes ak-blatt-l { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.akte__paper.is-marker { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M4 22l2.5-7L17 4.5l4.5 4.5L11 19.5z' fill='%23ffe14d' stroke='%23141414' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M4 22l2.5-7 4.5 4.5z' fill='%23141414'/%3E%3C/svg%3E") 3 23, crosshair; }
.akte__paper.is-marker .fld:hover { outline: 1.5px dashed #8a7400; outline-offset: 1px; }
.has-lens .akte__paper { cursor: none; }
.ak-mitte > .stampfx { z-index: 30; }

.ak-verweis { position: absolute; border-radius: 3px; box-shadow: 0 0 0 2px var(--blau); background: rgba(33, 82, 163, .06); pointer-events: none; animation: ak-verweis var(--t-mittel) var(--aus); }
@keyframes ak-verweis { from { opacity: 0; } to { opacity: 1; } }
.ak-verweis__linie { position: absolute; top: 50%; height: 1px; background: var(--blau); }
.ak-verweis__marke {
  position: absolute; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px;
  background: var(--blau); color: var(--on-primary); font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(18, 26, 38, .18);
}
.ak-verweis__marke.is-oben { top: auto; bottom: calc(100% + 4px); right: 0; transform: none; }
.ak-verweis__marke .h-i { width: 12px; height: 12px; stroke-width: 2.2; }
.ak-rand { position: absolute; left: calc(100% + 18px); top: 28px; width: 210px; display: grid; gap: 10px; pointer-events: auto; }
.ak-rand__karte { position: relative; padding: 10px 12px; border-radius: 10px; background: var(--weiss); box-shadow: var(--sch-pop); font-size: var(--t-13); line-height: 1.4; color: var(--ink); }
.ak-rand__karte::before { content: ""; position: absolute; left: -5px; top: 16px; width: 10px; height: 10px; background: var(--weiss); transform: rotate(45deg); box-shadow: -1px 1px 0 rgba(18, 26, 38, .06); }
.ak-rand__karte p { margin: 0 0 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ak-rand__karte .h-meta, .ak-notiz .h-meta { display: flex; align-items: center; gap: 6px; font-size: var(--t-12); }
.ak-rand__karte .h-av, .ak-notiz .h-av { width: 20px; height: 20px; font-size: 9px; }

/* ---------- Prüfpanel ---------- */
.ak-panel { grid-column: 3; grid-row: 1; position: relative; }
.ak-griff { display: none; }
.ak-panel > .ak-griff, .ak-panel__kopf, .ak-panel__fuss { flex: none; }
.ak-panel__kopf { min-height: 57px; }
.ak-panel__inhalt { gap: 0; padding: 18px 20px 24px; scrollbar-width: thin; }
.ak-ansicht { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ak-stand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ak-stand b { font-size: var(--t-16); }
.ak-auftrag { margin: 0 0 12px; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.ak-auftrag > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ak-auftrag > span p { margin: 0; }
.ak-gruppe { padding: 18px 0 6px; }
.ak-punkt { cursor: pointer; transition: background-color var(--t-kurz) var(--aus); }
.ak-punkt:hover:not(.is-an) { background: var(--grund); }
.ak-punkt__btn { grid-column: 2; display: block; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ak-punkt__btn b { overflow-wrap: anywhere; }
.ak-punkt__btn:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: 3px; border-radius: 4px; }
.ak-punkt > .h-zahl { grid-column: 3; padding-left: 8px; }
/* erfasst (Feststellung, Eingabe): neutral blau, verrät keine Richtigkeit; entfallen: blass */
.ak-punkt--erfasst .h-punkt__z { background: var(--blau-zart); color: var(--blau); }
.ak-punkt--weg { opacity: .62; }
.ak-punkt--weg .h-punkt__z { box-shadow: inset 0 0 0 1.5px var(--linie); }
.ak-punkt--weg .ak-punkt__btn b { font-weight: 400; color: var(--ink-2); }
.ak-punkt .h-punkt__detail { cursor: default; }
.ak-befund { width: calc(100% + 12px); margin: 0 -6px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: var(--t-13); text-align: left; cursor: pointer; }
.ak-befund:hover { background: rgba(255, 255, 255, .75); }
.ak-opts { margin-top: 2px; gap: 2px; }
.ak-opt { min-height: 38px; padding: 9px 10px; gap: 10px; font-size: var(--t-13); }
/* Entweder-oder-Auswahl (role=radio): runde Marke wie die runden Prüfpunkt-Zeichen */
.ak-opt > .opt__dot { border-radius: 50%; }
.h-punkt.is-an .ak-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .7); }
.h-punkt.is-an .ak-opt.is-on, .ak-decs .ak-opt.is-on { background: var(--weiss); box-shadow: inset 0 0 0 1px var(--blau-zart-2); }
.ak-opt.is-right { box-shadow: inset 3px 0 0 var(--gruen) !important; }
.ak-opt.is-falsch { box-shadow: inset 3px 0 0 var(--rot) !important; }
.ak-opt__w { font-weight: 700; }
.ak-opt__w.is-ok { color: var(--gruen); }
.ak-opt__w.is-falsch { color: var(--rot); }
.ak-opt__stempel { display: block; margin-top: 2px; font-size: var(--t-12); font-weight: 400; color: var(--ink-3); }
.ak-decs .ak-opt { font-size: var(--t-14); }
.ak-erkl { margin: 2px 0 0; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.ak-erkl.is-ok b { color: var(--gruen); }
.ak-erkl.is-falsch b { color: var(--rot); }
.ak-punkt__fuss { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; font-size: var(--t-13); }
.ak-req { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-13); color: var(--ink-2); }
.ak-req .eta { font-variant-numeric: tabular-nums; }
.ak-reqtoggle.is-an { background: var(--blau-zart); color: var(--blau-text); box-shadow: inset 0 0 0 1px var(--blau-zart-2); }
.ak-hinweis { margin: 8px 0 0; color: var(--ink-2); }
.ak-summe { display: grid; gap: 2px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--linie); }
.ak-summe p { margin: 0; font-size: var(--t-16); }
.ak-reqbar {
  position: sticky; bottom: 4px; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin: 14px -8px 0; padding: 10px 12px; border-radius: 10px; background: var(--weiss); box-shadow: var(--sch-pop); font-size: var(--t-13);
}
.ak-reqbar > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.ak-reqbar > span .h-i { color: var(--blau); }
.ak-zurueck { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 0 0 12px; font-size: var(--t-13); }
.ak-abschnitt { margin-top: 20px; }
.ak-abschnitt h4 { margin: 0 0 6px; font-size: var(--t-13); color: var(--ink-2); }
.ak-abschnitt p { margin: 0 0 8px; font-size: var(--t-14); line-height: 1.5; }
.ak-abschnitt p.h-meta { font-size: var(--t-13); }
.ak-person { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.ak-person > div { display: flex; flex-direction: column; min-width: 0; font-size: var(--t-13); color: var(--ink-2); }
.ak-person b { font-size: var(--t-14); color: var(--ink); }
.ak-zeilen { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0 !important; font-size: var(--t-13) !important; color: var(--ink-2); }
.ak-vorgehen { margin: 0; padding-left: 18px; font-size: var(--t-13); line-height: 1.55; color: var(--ink-2); }
.ak-lz { display: flex; flex-direction: column; gap: 2px; }
.ak-intro { margin: 12px 0 0; font-size: var(--t-13); line-height: 1.5; color: var(--ink-2); }
.ak-ansicht .h-balken { margin-top: 10px; }
.ak-gespraech.ms-verlauf { flex: none; overflow: visible; padding: 14px 0 4px; }
.ak-gibt { margin-top: 4px !important; font-size: var(--t-13); }
.ak-fragen { display: grid; gap: 4px; }
.ak-frage { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: var(--grund); color: var(--ink); font: inherit; font-size: var(--t-13); line-height: 1.4; text-align: left; cursor: pointer; }
.ak-frage:hover { background: var(--blau-zart); }
.ak-frage .h-i { margin-top: 1px; color: var(--blau); }
.ak-brief { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.ak-brief > div { display: flex; flex-direction: column; min-width: 0; }
.ak-brief b { font-size: var(--t-14); }
.ak-post { display: grid; }
.ak-post__e { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--linie); background: none; color: var(--ink); font: inherit; font-size: var(--t-13); text-align: left; cursor: pointer; }
.ak-post__e:hover { background: var(--grund); }
.ak-post__e time { color: var(--ink-3); white-space: nowrap; }
.ak-notizen { display: grid; gap: 10px; }
.ak-notiz { padding: 10px 12px; border-radius: 10px; background: var(--grund); }
.ak-notiz p { margin: 0 0 6px; font-size: var(--t-14); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ak-notizform { display: grid; gap: 8px; margin-top: 14px; }
.ak-leer { margin: 4px 0 0; }
.ak-vier { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; padding: 12px; border-radius: 8px; background: var(--blau-zart); }
.ak-vier .h-i { color: var(--blau); margin-top: 2px; }
.ak-vier p { margin: 2px 0 0; font-size: var(--t-13); }
.ak-offen { display: grid; gap: 6px; }
.ak-fertig { position: relative; padding: 16px 16px 12px; border-radius: 10px; background: var(--grund); }
.ak-fertig h4 { margin: 0 0 8px; font-size: var(--t-16); }
.ak-fertig p { margin: 0 0 4px; font-size: var(--t-13); color: var(--ink-2); line-height: 1.45; }
.ak-fertig p b { color: var(--ink); }
.ak-fertig__stempel { position: absolute; right: 14px; top: 12px; padding: 4px 8px 3px; border: 2px solid var(--stamp, var(--rot)); border-radius: 4px; color: var(--stamp, var(--rot)); font: 700 13px/1 var(--font-eng); letter-spacing: .08em; transform: rotate(-6deg); opacity: .9; }
.ak-panel__fuss { padding: 14px 20px 18px; }
.ak-panel__fuss .h-knopf--primaer .h-i { margin-left: 2px; }
.ak-fuss__neben { justify-self: center; font-size: var(--t-13); }
/* Vorlage zur Gegenzeichnung im Fuß: was gestempelt und abgegeben wird */
.ak-vorlage { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; background: var(--grund); font-size: var(--t-13); }
.ak-vorlage__kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ak-vorlage__stempel { padding: 3px 7px 2px; border: 2px solid var(--stamp, var(--rot)); border-radius: 4px; color: var(--stamp, var(--rot)); font: 700 12px/1 var(--font-eng); letter-spacing: .08em; transform: rotate(-3deg); white-space: nowrap; }
.ak-vorlage__sub { margin: 0; color: var(--ink-2); }
.ak-vorlage__z { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.ak-vorlage__z li { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 8px; line-height: 1.4; }
.ak-vorlage__z li > span { color: var(--ink-3); }
.ak-vorlage__z li > b { min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: var(--ink); }
.ak-vorlage__abgabe { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--ink); }
.ak-vorlage__abgabe .h-i { color: var(--blau); margin-top: 2px; flex: none; }
.ak-vorlage .h-link { justify-self: start; font-size: var(--t-13); }

/* Breite Bildschirme: Panel eine Stufe größer (Breiten kommen aus --w-seiten/--w-panel) */
@media (min-width: 2400px) {
  .ak-panel .h-meta, .ak-panel .h-lauf__e, .ak-panel .h-befund, .ak-opt { font-size: var(--t-14); }
  .ak-panel .h-punkt b, .ak-panel .h-zahl, .ak-stand b { font-size: var(--t-16); }
  .ak-panel__inhalt { padding: 22px 24px 28px; }
}
/* Fensterbreite: das Blatt bleibt lesbar (Ziel ≥ 100 %). Erst schmalere Miniaturen und Panel, dann fallen die
   Miniaturen weg (Blättern in der Werkzeugleiste), zuletzt wird das Panel schmaler. Beispiele für ein A4-Blatt:
   1150 px Fenster neben dem Posteingang ≈ 106 %, 1366 maximiert ≈ 119 %, 1450 ≈ 130 %. */
.ak-wz__blaettern { display: none; }
.ak.ohne-seiten .ak-wz__blaettern { display: inline-flex; }
.ak-wz__blaettern > button:disabled { color: var(--ink-4); cursor: default; background: none; }
@container akte (max-width: 1600px) {
  .ak-body { grid-template-columns: 120px minmax(0, 1fr) 340px; }
  .ak.ohne-seiten .ak-body { grid-template-columns: 0 minmax(0, 1fr) 340px; }
  .ak.is-panel-zu .ak-body { grid-template-columns: 120px minmax(0, 1fr) 0; }
  .ak.ohne-seiten.is-panel-zu .ak-body { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .ak-seiten { gap: 14px; padding: 14px 0 24px; }
  .ak-seite, .ak-seite__t { width: 104px; max-width: 104px; }
  .ak-seite__marke, .ak-seite__neu { right: -6px; }
  .akte__stage.ak-tisch { padding: 28px 28px 64px; }
}
@container akte (max-width: 1320px) {
  .ak-wz__seg .h-seg__o > span:not(.h-n) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ak-wz__seg .h-seg__o { padding: 0 10px; }
  .ak-wz__wkz > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ak-wz__wkz { width: 30px; padding: 0; }
}
@container akte (max-width: 1240px) {
  .ak-body, .ak.ohne-seiten .ak-body { grid-template-columns: 0 minmax(0, 1fr) 336px; }
  .ak.is-panel-zu .ak-body, .ak.ohne-seiten.is-panel-zu .ak-body { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .ak-seiten, .ak-wz__seiten { display: none; }
  .ak-wz__blaettern { display: inline-flex; }
  .akte__stage.ak-tisch { padding: 24px 24px 56px; }
}
@container akte (max-width: 1080px) {
  .ak-body, .ak.ohne-seiten .ak-body { grid-template-columns: 0 minmax(0, 1fr) 312px; }
  .ak-wz .h-zoom:not(.ak-wz__blaettern) > button:last-child { display: none; }
  .akte__stage.ak-tisch { padding: 20px 16px 48px; }
  .ak-panel__kopf { gap: 4px; padding-left: 12px; padding-right: 8px; }
  .ak-panel__kopf .h-seg__o { padding: 0 6px; }
  .ak-panel__inhalt { padding: 16px 16px 20px; }
  .ak-panel__fuss { padding: 12px 16px 16px; }
}
/* Schmales, hohes Fenster (Tablet hochkant): Blatt oben in voller Breite, Prüfpanel darunter */
@container akte (max-width: 860px) {
  .os:not(.is-mobile) .ak-body, .os:not(.is-mobile) .ak.ohne-seiten .ak-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 44%); }
  .os:not(.is-mobile) .ak.is-panel-zu .ak-body, .os:not(.is-mobile) .ak.ohne-seiten.is-panel-zu .ak-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 0; }
  .os:not(.is-mobile) .ak-mitte { grid-column: 1; grid-row: 1; }
  .os:not(.is-mobile) .ak-panel { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--linie); }
}
@container akte (max-width: 820px) {
  .ak-wz__doc > span { display: none; }
  .ak-wz { gap: 6px; padding: 0 8px; }
  .ak-wz .h-werkzeug__links, .ak-wz .h-werkzeug__rechts { gap: 2px; }
  .ak-wz .h-wtrenn { display: none; }
  .ak-wz .h-zoom > output { min-width: 44px; }
}
/* Panelkopf: Segment und Einklappen dürfen nie über den Fensterrand laufen */
.ak-panel__kopf { min-width: 0; }
.ak-panel__kopf > .h-seg { min-width: 0; }
.ak-panel__kopf .h-seg__o { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-panel__kopf > .h-knopf { flex: none; }
.ak-wz .h-werkzeug__mitte { min-width: 0; }

/* ---------- Telefon: Blatt in voller Breite, Prüfpunkte als Blatt von unten ---------- */
.os.is-mobile .ak-wz { display: none; }
.os.is-mobile .ak { grid-template-rows: auto minmax(0, 1fr); }
.os.is-mobile .ak > .ak-bannerzeile { grid-row: 1; }
.os.is-mobile .ak > .ak-body { grid-row: 2; }
.os.is-mobile .ak-bannerzeile { padding: 8px 12px; }
.os.is-mobile .ak-body, .os.is-mobile .ak.is-panel-zu .ak-body, .os.is-mobile .ak.ohne-seiten .ak-body { grid-template-columns: minmax(0, 1fr); }
.os.is-mobile .ak-seiten { display: none; }
.os.is-mobile .ak-mitte { grid-column: 1; }
/* Leinwand wie Entwurf 10: das Blatt beginnt 18px unter dem Fensterkopf, nichts schwebt darüber
   (Vergrößern: Doppeltippen oder „…“ im Fensterkopf) */
.os.is-mobile .akte__stage.ak-tisch { padding: 18px 11px calc(42vh + 24px); }
.os.is-mobile .ak-panel, .os.is-mobile .ak.is-panel-zu .ak-panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; max-height: 40%; border-left: 0; border-radius: 16px 16px 0 0;
  box-shadow: 0 -1px 0 rgba(18, 26, 38, .06), 0 -10px 30px -10px rgba(18, 26, 38, .2); transition: max-height var(--t-mittel) var(--aus);
}
.os.is-mobile .ak.is-blatt-auf .ak-panel { max-height: 88%; }
/* Griff: sichtbarer Strich 38×5, Trefferfläche 120×28; Griff und Kopf lassen sich ziehen (game.js) */
.os.is-mobile .ak-griff { position: relative; display: block; flex: none; width: 120px; height: 28px; margin: 0 auto -6px; background: transparent; touch-action: none; }
.os.is-mobile .ak-griff::before { content: ""; position: absolute; left: 41px; right: 41px; top: 11px; height: 5px; border-radius: 3px; background: var(--linie-2); }
.os.is-mobile .ak-griff:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: -2px; border-radius: 8px; }
.os.is-mobile .ak-panel__kopf { flex-direction: column; align-items: stretch; gap: 10px; min-height: 0; padding: 4px 16px 10px; border-bottom: 0; touch-action: none; cursor: grab; }
.os.is-mobile .ak-panel__kopf .h-seg { touch-action: manipulation; cursor: auto; }
.ak-mkopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ak-mkopf__t { min-width: 0; }
.ak-mkopf__t b { display: block; font-size: var(--t-16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-mkopf__t .h-meta { display: block; }
.ak-mwz { flex: none; }
.ak-mwz .h-seg { border-radius: 9px; padding: 2px; }
.ak-mwz .h-seg__o { position: relative; width: 40px; height: 40px; padding: 0; border-radius: 7px; }
.ak-mwz .h-seg__o > span:not(.h-n) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ak-mwz .ak-farbe { position: absolute; right: 8px; bottom: 8px; width: 7px; height: 7px; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--grund-2); }
.os.is-mobile .ak-panel__inhalt { padding: 4px 18px 12px; }
.os.is-mobile .ak-panel__fuss { padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 0; }
.os.is-mobile .ak-rand { display: none; }
/* Hochformat (und Tablets im Telefonmodus): zugeklappt zeigt das Blatt nur den aktiven Prüfpunkt wie im Entwurf;
   ein Tipp darauf klappt es auf */
@media (orientation: portrait), (min-height: 500px) {
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-panel__kopf > .h-seg,
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-ansicht--items > .ak-stand,
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-ansicht--items > .ak-auftrag { display: none; }
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-ansicht--items:has(.ak-punkt--aktiv) > :not(.ak-punkt--aktiv) { display: none; }
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-punkt--aktiv > .h-punkt__detail { display: none; }
  .os.is-mobile .ak:not(.is-blatt-auf) .ak-punkt--aktiv { background: transparent; }
}
/* Querformat am Telefon (niedrig): das Prüfpanel steht rechts neben dem Blatt, Werkzeuge und Primäraktion bleiben sichtbar */
@media (orientation: landscape) and (max-height: 499.98px) {
  /* die Akte füllt genau das Fenster (kein Mindestmaß mit Scrollen), damit die Primäraktion unten sichtbar bleibt */
  .os.is-mobile .oswin__body.view--case { height: 100%; }
  .os.is-mobile .ak-panel__kopf > .h-seg .h-seg__o { height: 30px; font-size: var(--t-13); }
  .os.is-mobile .ak-body, .os.is-mobile .ak.is-panel-zu .ak-body, .os.is-mobile .ak.ohne-seiten .ak-body { grid-template-columns: minmax(0, 1fr) min(46%, 360px); }
  .os.is-mobile .ak-panel, .os.is-mobile .ak.is-panel-zu .ak-panel, .os.is-mobile .ak.is-blatt-auf .ak-panel {
    position: relative; left: auto; right: auto; bottom: auto; grid-column: 2; display: flex; max-height: none; border-radius: 0;
    border-left: 1px solid var(--linie); box-shadow: none; transition: none;
  }
  .os.is-mobile .ak-griff { display: none; }
  .os.is-mobile .ak-panel__kopf { gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--linie); touch-action: auto; cursor: auto; }
  .os.is-mobile .ak-mkopf__t .h-meta { display: none; }
  .os.is-mobile .ak-mkopf__t b { font-size: var(--t-14); }
  .os.is-mobile .ak-mwz .h-seg__o { width: 36px; height: 34px; }
  .os.is-mobile .ak-panel__inhalt { padding: 10px 12px; }
  .os.is-mobile .ak-panel__fuss { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .os.is-mobile .ak-panel__fuss > .h-meta { display: none; }
  .os.is-mobile .ak-panel__fuss .h-knopf--gross { height: 40px; }
  .os.is-mobile .akte__stage.ak-tisch { padding: 14px 10px 24px; }
}
/* Touch (Tablets, Telefone): Werkzeuge und Panelkopf mindestens 40 × 40 px */
@media (pointer: coarse) {
  .ak-wz { min-height: 56px; }
  .ak-wz__seg .h-seg__o { min-width: 40px; height: 40px; }
  .ak-wz__wkz { min-width: 40px; }
  .ak-panel__kopf .h-seg__o { height: 40px; }
  .ak-panel__kopf > .h-knopf--icon { width: 40px; height: 40px; }
  .os.is-mobile .ak-mwz .h-seg__o { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .akte__paper > .ak-bogen > .doc.is-enter, .ak-seite.is-bump .ak-seite__blatt, .ak-seite.is-new .ak-seite__blatt, .ak-verweis { animation: none; }
}
html.no-motion .akte__paper > .ak-bogen > .doc.is-enter, html.no-motion .ak-seite__blatt, html.no-motion .ak-verweis { animation: none; }

/* ================= Fall v2: Hinweise, Feststellungen, Nachweise, Abschluss (Paket D1) =================
   Farbe nur mit Bedeutung: Blau = handeln/ausgewählt, Grün = richtig, Bernstein = Hinweis, Rot = Fehler/Stempel.
   Keine Pillen, keine Kacheln: Zeichen + Text, Karten auf weißem Grund, Haarlinien nur zwischen Abschnitten. */

/* Hinweiszeile über dem Blatt (Schreibsperre, Wiedervorlage) */
.ak-bannerzeile { display: grid; gap: 6px; padding: 8px 16px; background: var(--weiss); border-bottom: 1px solid var(--linie); }
.ak-bannerzeile[hidden] { display: none; }
.ak-banner { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--t-13); line-height: 1.4; color: var(--ink); }
.ak-banner > span { flex: 1; min-width: 0; }
.ak-banner > .h-i { flex: none; color: var(--bernstein); }
.ak-banner > .h-knopf { flex: none; }
.ak-banner--sperre > .h-i { color: var(--rot); }
.pe-rows > .ak-banner { margin: 8px 12px; padding: 10px 12px; border-radius: 8px; background: var(--grund); }

/* Kopfzeile im Prüfpanel: Steuerjahr, Amtsdatum, „nach dem Austeilen geändert“ als Zeichen + Text */
.ak-kopfinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: -2px 0 10px; font-size: var(--t-12); color: var(--ink-2); }
.ak-kopfinfo__p { color: var(--ink-4); }
.ak-kopfinfo__e { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ak-kopfinfo__e.is-geaendert { color: var(--bernstein); }
.ak-kopfinfo__e .h-i { width: 12px; height: 12px; }
.ak-altstempel { margin-left: auto; padding: 2px 6px 1px; border: 1.5px solid var(--ink-3); border-radius: 3px; color: var(--ink-2); font: 700 11px/1.2 var(--font-eng); letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }

/* Eingabefeld einer Feststellung (Zahl mit Einheit, Datum) */
.ak-ein { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--weiss); box-shadow: inset 0 0 0 1px var(--linie); }
.ak-ein__l { font-size: var(--t-13); font-weight: 700; color: var(--ink); }
.ak-ein__zeile { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ak-ein__feld { flex: 1 1 auto; min-width: 0; max-width: 180px; height: 36px; font-variant-numeric: tabular-nums; }
.ak-ein__einheit { flex: none; font-size: var(--t-14); color: var(--ink-2); }
.ak-ein__los { flex: none; margin-left: auto; }
.ak-ein__hinweis { font-size: var(--t-12); }
.ak-ein.is-ok { box-shadow: inset 3px 0 0 var(--gruen), inset 0 0 0 1px var(--linie); }
.ak-ein.is-falsch { box-shadow: inset 3px 0 0 var(--rot), inset 0 0 0 1px var(--linie); }
.ak-ein.is-falsch .ak-ein__hinweis { color: var(--ink); }

/* Euro-Wirkung der eigenen Wahl (verrät keine Richtigkeit) */
.ak-wirkung { margin: 0; font-size: var(--t-13); font-variant-numeric: tabular-nums; color: var(--blau-text); }

/* Nachweise: Stand je Kandidat, Kandidatenliste am selben Prüfpunkt */
.ak-req__stand { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; text-align: right; }
.ak-kand { display: grid; gap: 2px; padding: 8px; border-radius: 8px; background: var(--weiss); box-shadow: var(--sch-ctl, 0 1px 2px rgba(18, 26, 38, .08)), inset 0 0 0 1px var(--linie); }
.ak-kand__t { margin: 0 0 2px 2px; }
.ak-kand__o { min-height: 36px; }
.ak-dreh { transition: transform var(--t-kurz) var(--aus); }
.ak-dreh.is-auf { transform: rotate(180deg); }

/* Abschluss: Ergebnis-Karte (Vorschau des Bescheids bzw. Ergebnis des Einspruchs) */
.ak-erg { display: grid; gap: 4px; margin: 4px 0 6px; padding: 14px 16px; border-radius: 10px; background: var(--grund); }
.ak-erg__titel { margin: 0; font-size: var(--t-12); font-weight: 700; letter-spacing: .02em; color: var(--ink-2); }
.ak-erg__text { margin: 0; font-size: var(--t-20); font-weight: 700; line-height: 1.25; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ak-erg__sub { margin: 0; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.ak-erg.is-veraltet .ak-erg__text { color: var(--bernstein); }
.ak-erg__liste { display: grid; gap: 6px; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--linie); list-style: none; }
.ak-erg__liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; font-size: var(--t-13); line-height: 1.35; }
.ak-erg__liste li > span:first-child { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.ak-erg__wert { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ak-erg__wirk { grid-column: 1 / -1; font-size: var(--t-12); color: var(--blau-text); }
.ak-erg__entwurf { justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: var(--t-13); }
.ak-info { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; }
.ak-info .h-i { flex: none; margin-top: 2px; }

/* Weitere Maßnahmen: Ankreuzzeilen mit einem Satz Erklärung; Unterauswahl und Sachverhalt klappen darunter auf */
.ak-massn { display: grid; gap: 2px; }
.ak-decs { display: grid; gap: 2px; }
.ak-mass__gruppe { margin: 10px 0 2px 10px; font-size: var(--t-12); font-weight: 700; color: var(--ink-3); }
.ak-mass { display: grid; gap: 6px; border-radius: 8px; }
.ak-mass.is-on { background: var(--blau-zart); padding-bottom: 8px; }
.ak-mass__o { align-items: flex-start; }
.ak-mass.is-on .ak-mass__o, .ak-mass.is-on .ak-mass__o:hover:not(:disabled) { background: transparent; }
.ak-mass__erkl { display: block; margin-top: 2px; font-size: var(--t-12); font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.ak-mass__ziele { display: grid; gap: 2px; margin: 0 10px 0 38px; }
.ak-mass__ziele > .h-meta { margin: 0 0 2px; font-size: var(--t-12); }
.ak-mass__ziele .ak-opt.is-on { background: var(--weiss); }
.ak-massn__leer { margin: 6px 0 0 10px; font-size: var(--t-12); }
.ak-mass__mehr { margin-top: 6px; }
.ak-mass__mehr > summary { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 8px; font-size: var(--t-13); font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
.ak-mass__mehr > summary::-webkit-details-marker { display: none; }
.ak-mass__mehr > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin-right: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform var(--t-kurz) var(--aus); }
.ak-mass__mehr[open] > summary::before { transform: rotate(45deg); }
.ak-mass__mehr > summary:hover { background: var(--grund); }
.ak-mass__mehr > summary .h-meta { font-weight: 400; }
.ak-sachv { margin: 0 10px 0 38px; padding: 10px 12px; border-radius: 8px; background: var(--weiss); }
.ak-sachv__t { margin: 0 0 4px; font-size: var(--t-12); font-weight: 700; color: var(--ink-2); }
.ak-sachv ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ak-sachv p.h-meta { margin: 0; font-size: var(--t-12); line-height: 1.45; }
.ak-vier.is-ungueltig { background: var(--bernstein-zart); }
.ak-vier.is-ungueltig .h-i { color: var(--bernstein); }

/* Posteingang: zurückgezogene Akte */
.pe-row.is-weg .h-zeile__titel b { font-weight: 400; color: var(--ink-2); }
.pe-row.is-weg .h-zeile__wer { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) { .ak-dreh, .ak-mass__mehr > summary::before { transition: none; } }
/* „Akten anfordern“: Schalter Auffüllen und Hinweis „wird mit … wirksam“ */
.ak-fuellen { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; font-size: var(--t-14); color: var(--ink); cursor: pointer; }
.ak-fuellen input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blau); }
.ak-fuellen small { display: block; margin-top: 2px; font-size: var(--t-12); }
.ak-verf__los { justify-self: start; margin: 6px 0 0 10px; font-size: var(--t-13); }
/* assets/css/amsel.css */
/* Amsel – übermittelte Einkommensteuererklärung (Programm-UI, Richtung „Hell“). Klassen as-*.
   Das Papier (Ausdruck) gehört docs.css (.amsel, .amsel__*) und wird hier nicht angefasst.
   Aufbau: .as > .as__body = Vordrucke (.as-nav) | Formular (.as-form) | Wirkung (.as-wirkung); Ausdruck: .as--aus > .as-tisch.
   Der Amsel-Kopf steckt in der Titelleiste (win.setSub / setBarCenter / setBarActions). */

/* ---------- Fensterinhalt ---------- */
.oswin__body.view--amsel, .os.is-mobile .oswin__body.view--amsel { padding: 0; overflow: hidden; background: var(--weiss); }
.as {
  container: as / inline-size;
  height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr);
  background: var(--weiss); color: var(--ink); font-family: var(--font); font-size: var(--t-14); line-height: 1.45;
}
.as button, .as select { font-family: inherit; }

/* Titelleiste: Einsicht und Übermittlung als ruhiger Untertitel rechts */
.as-info { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.as-info > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.as-info .h-i { flex: none; color: var(--ink-3); }
.as-info__p { color: var(--ink-3); }
.as-info__t { flex: none; color: var(--ink); font-family: var(--font-eng); font-weight: 700; letter-spacing: .02em; }
.oswin[data-app="amsel"] .as-druck { flex: none; width: 32px; height: 30px; }
.oswin[data-app="amsel"] .oswin__acts { max-width: 100%; }
/* Schmale Fenster: Einsicht/Übermittlung wandert aus der Titelleiste in eine Zeile über dem Formular */
.oswin[data-app="amsel"] { container: aswin / inline-size; }
.oswin[data-app="amsel"] .oswin__title { flex-shrink: 0; }
@container aswin (max-width: 1239.98px) { .as-info > span:nth-child(2), .as-info__p { display: none; } }
@container aswin (max-width: 979.98px) {
  .as-info { display: none; }
  .as .as-mobinfo { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: var(--t-13); color: var(--ink-2); }
  .as.as--aus .as-mobinfo { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--linie); background: var(--weiss); }
  .as-mobinfo .h-i { color: var(--ink-3); }
}

/* ---------- Eingabe: drei Spalten ---------- */
.as__body { display: grid; grid-template-columns: 264px minmax(0, 1fr) 340px; min-height: 0; height: 100%; }

/* Vordrucke (links) */
.as-nav { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; padding: 20px 12px 16px; background: var(--grund); border-right: 1px solid var(--linie); }
.as-nav__k { padding: 12px 12px 6px; margin: 0; }
.as-nav__k:first-child { padding-top: 0; }
.as-nav__p {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 52px;
  padding: 9px 12px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color var(--t-kurz) var(--aus);
}
.as-nav__p:hover { background: var(--grund-2); }
.as-nav__p.is-an { background: var(--weiss); box-shadow: var(--sch-ctl); }
.as-nav__p:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: 1px; }
.as-nav__tx { min-width: 0; }
.as-nav__tx b { display: block; font-size: var(--t-14); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.as-nav__tx span { display: block; font-size: var(--t-13); color: var(--ink-2); line-height: 1.35; }
.as-nav__p--doc .as-nav__tx b { font-weight: 400; }
.as-nav__p--doc.is-an .as-nav__tx b { font-weight: 700; }
.as-nav__n { font-size: var(--t-13); color: var(--ink-3); white-space: nowrap; }
.as-nav__z { display: grid; place-items: center; width: 22px; height: 22px; }
.as-nav__z--ok { color: var(--gruen); }
.as-nav__z--fehl { color: var(--rot); }
.as-nav__fuss { margin-top: 8px; padding: 6px 12px; }
.as-nav__link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); font-weight: 700; }
.as-nav--blatt { padding: 0; background: none; border: 0; overflow: visible; }

/* Formular (Mitte) */
.as-form { min-width: 0; min-height: 0; overflow-y: auto; padding: 28px 48px 48px; background: var(--weiss); }
.as-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 18px; }
.as-kopf > div:first-child { min-width: 0; }
.as-kopf h2 { margin: 4px 0 0; font-size: var(--t-26); line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.as-kopf__zus { display: block; margin-top: 2px; font-size: var(--t-14); color: var(--ink-2); }
.as-kopf__wert { flex: none; display: grid; justify-items: end; gap: 2px; text-align: right; }
.as-kopf__wert .h-az { font-size: var(--t-20); line-height: 1.2; }
.as-tipp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 16px; font-size: var(--t-13); color: var(--ink-2); }
.as-tipp .h-i { flex: none; }
.as-tipp--an { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--blau-zart); color: var(--blau-text); }
.as-lg { flex: none; display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-left: 6px; }
.as-lg:first-child { margin-left: 0; }
.as-lg--tell { box-shadow: inset 0 0 0 2px var(--gruen); background: var(--marker); }
.as-lg--miss { box-shadow: inset 0 0 0 2px var(--rot); background: repeating-linear-gradient(135deg, var(--rot) 0 1.5px, transparent 1.5px 4px); }
.as-lg--wrong { box-shadow: inset 0 0 0 2px var(--rot); background: var(--marker); }

.as-gruppe { padding: 18px 0 22px; border-top: 1px solid var(--linie); }
.as-gruppe > h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 14px; font-size: var(--t-16); font-weight: 700; }
.as-gruppe > h3 small { font-size: var(--t-13); font-weight: 400; color: var(--ink-2); }
/* Felder in Spalten nach Platz (mind. 220 px); Bezeichnung, Kasten und Hinweise je Zeile bündig (subgrid) */
.as-reihe { display: grid; gap: 0 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.as-reihe > .as-ff { grid-row: span 3; display: grid; grid-template-rows: subgrid; row-gap: 6px; align-content: start; padding-bottom: 18px; }
.as-reihe > .as-ff > .h-inline__l { align-self: end; }
.as-reihe > .as-ff > .h-inline__box { align-self: stretch; }
.as-ff__h:empty { display: none; }

/* Feld: Zeilennummer + Bezeichnung · Wertkasten · Hinweise */
.as-ff { position: relative; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 8px; }
.as-ff--breit { grid-column: span 2; }
.as-ff .h-inline__l { min-width: 0; }
.as-ff__l { min-width: 0; overflow-wrap: anywhere; }
.as-ff .h-inline__box { min-width: 0; padding: 8px 12px; line-height: 1.4; transition: background-color var(--t-kurz) var(--aus), box-shadow var(--t-kurz) var(--aus); }
.as-ff .h-inline__box.is-num { font-variant-numeric: tabular-nums; }
.as-wert { min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; overflow-wrap: anywhere; }
.as-ff__h { display: grid; gap: 4px; }
.as-ff__h .h-hilfe { align-items: flex-start; line-height: 1.4; }
.as-ff__h .h-hilfe .h-i { margin-top: 2px; }
.h-hilfe.as-hilfe--fehl { color: var(--rot); }
.h-hilfe.as-hilfe--offen { color: var(--ink-2); }
.h-hilfe.as-hilfe--offen .h-i { color: var(--bernstein); stroke-width: 2.2; }
.as-ff .h-inline__z { white-space: nowrap; }
/* Anstreichen: ganze Zeile ist ein Knopf; angestrichen = Markerfarbe der Person im Wertkasten */
.as-ff.is-markable { cursor: pointer; }
.as-ff.is-markable:hover .h-inline__box { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.as-ff.is-markable:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: 2px; }
.as-ff.is-marked .h-inline__box { background: color-mix(in srgb, var(--mk, var(--marker)) 72%, var(--weiss)); box-shadow: none; color: #14181F; }
.as-ff.is-marked .h-inline__box .h-alt, .as-ff.is-marked .h-inline__box .h-pfeil { color: #4B5361; }
.as-ff.is-marked .h-inline__box .h-neu { color: #173B78; }
/* Nach dem Abschluss: Auffälligkeit grün umrandet, übersehen schraffiert, Fehlmarkierung rot */
.as-ff.is-tell .h-inline__box { box-shadow: inset 0 0 0 2px var(--gruen); }
.as-ff.is-miss .h-inline__box { box-shadow: inset 0 0 0 2px var(--rot); background: repeating-linear-gradient(135deg, var(--weiss) 0 6px, color-mix(in srgb, var(--rot) 12%, var(--weiss)) 6px 10px); }
.as-ff.is-wrong .h-inline__box { box-shadow: inset 0 0 0 2px var(--rot); }
.as-ff.is-blink .h-inline__box { animation: asBlink 1.2s var(--aus) 1; }
@keyframes asBlink { 0%, 100% { outline: 0 solid transparent; } 20%, 60% { outline: 3px solid var(--blau-zart-2, var(--blau-zart)); outline-offset: 2px; } }
.as-ff--notiz { display: flex; }
.as-notiz { display: block; padding: 12px 14px; font-size: var(--t-14); line-height: 1.55; white-space: pre-wrap; }

/* Tage als Balken mit Kalenderjahr-Strich; Schraffur liegt ÜBER dem Teil jenseits von 365 */
.as-tage { margin-top: 20px; padding: 16px 18px; border-radius: 8px; background: var(--grund); }
.as-tage__kopf { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: var(--t-13); color: var(--ink-2); }
.as-tage__kopf b { color: var(--ink); font-size: var(--t-14); }
.as-tage__z { display: grid; grid-template-columns: 150px minmax(0, 1fr) 56px; align-items: center; gap: 14px; margin: 8px 0; font-size: var(--t-13); }
.as-tage__z b { display: block; font-size: var(--t-14); }
.as-tage__z .h-meta { display: block; }
.as-tage__wert { text-align: right; font-weight: 700; font-size: var(--t-16); font-variant-numeric: tabular-nums; }
.as-tage__wert.is-rot { color: var(--rot); }
.as-tage__bahn { position: relative; height: 14px; }
.as-tage__bahn i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.as-tage__s--0 { background: #5D6878; }
.as-tage__s--1 { background: #A9B2BF; }
.as-tage__s--2 { background: #7F8A99; }
.as-tage__bahn .as-tage__zuviel { z-index: 1; border-radius: 0 3px 3px 0; }
.as-tage__zuviel { background: repeating-linear-gradient(135deg, var(--rot) 0 2.5px, color-mix(in srgb, var(--rot) 18%, transparent) 2.5px 5px); }
.as-tage__jahr { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1.5px solid var(--ink); z-index: 2; }
.as-tage__leg { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: var(--t-13); color: var(--ink-2); }
.as-tage__leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Wirkung (rechts) */
.as-wirkung { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; padding: 24px 24px 20px; background: var(--grund); border-left: 1px solid var(--linie); }
.as-wz { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.as-wz:not(:first-child) { margin-top: 22px; }
.as-wz .h-n { font-size: var(--t-13); font-weight: 400; }
.as-punkte { display: grid; gap: 2px; }
.as-punkte .h-punkt { align-items: start; }
.as-punkte .h-punkt > span:nth-child(2) { min-width: 0; }
.as-punkte .h-punkt .h-zahl { text-align: right; white-space: nowrap; }
.as-punkte .h-punkt .h-zahl .h-alt { font-weight: 400; }
.as-punkte button.h-punkt:hover { background: var(--grund-2); }
.as-punkte button.h-punkt:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: -2px; }
.h-punkt.as-punkt--ent .h-punkt__z { box-shadow: none; background: var(--blau-zart); color: var(--blau); }
/* Erklärt: Beträge der Übermittlung als ruhige Zeilen (Bezeichnung links, Betrag rechts), Haarlinie nur zwischen Zeilen */
.as-erkl { display: grid; }
.as-erkl__e { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; border-radius: var(--r-klein, 5px); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.as-erkl__e + .as-erkl__e { box-shadow: 0 -1px 0 var(--linie); }
.as-erkl__e:hover { background: var(--grund-2); box-shadow: none; }
.as-erkl__e:hover + .as-erkl__e { box-shadow: none; }
.as-erkl__e:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: -2px; }
.as-erkl__l { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.as-erkl__z { flex: none; min-width: 34px; font-family: var(--font-eng); font-size: var(--t-13); color: var(--ink-3); }
.as-erkl__t { min-width: 0; font-size: var(--t-14); line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.as-erkl__e .h-zahl { font-size: var(--t-14); font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-erkl > .as-leise { margin-top: 6px; }
.as-gross { display: grid; gap: 2px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linie); }
.as-gross > b { font-size: var(--t-36); line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.as-gross .h-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--t-13); font-weight: 700; }
.as-striche { display: grid; gap: 8px; }
.as-striche__e { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: var(--t-14); color: var(--ink-2); }
.as-striche__e .h-mk { margin-top: 0; }
.as-striche__e b { color: var(--ink); font-variant-numeric: tabular-nums; }
.as-leise { margin: 0; line-height: 1.5; }
.as-abgleich { display: grid; gap: 12px; }
.as-abgleich__e { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: var(--t-13); color: var(--ink-2); }
.as-abgleich__e b { display: block; color: var(--ink); font-size: var(--t-14); }
.as-abgleich__e .h-i { width: 16px; height: 16px; margin-top: 2px; color: var(--ink-3); }
.as-abgleich__e.is-ok .h-i { color: var(--gruen); }
.as-abgleich__e.is-fehl .h-i { color: var(--rot); }
.as-vermerk { margin: 0 0 10px; }
.as-vermerk > span { min-width: 0; overflow-wrap: anywhere; }
.as-vermerk .h-meta { display: inline; }
.as-wirkung__fuss { display: grid; gap: 8px; margin-top: auto; padding-top: 24px; }
.as-markknopf.is-an { box-shadow: inset 0 0 0 2px var(--marker); }

/* Auswahl für schmale Fenster und Telefon (sonst ausgeblendet) */
.as-pick, .as-blattknopf, .as-mobinfo { display: none; }

/* ---------- Ausdruck: amtlicher Ausdruck auf der Leinwand ---------- */
/* Spalte statt Raster: Hinweis/Telefon-Zeile sind optional, die Leinwand füllt immer den Rest bis zur Fensterkante */
.as--aus { position: relative; display: flex; flex-direction: column; }
.as--aus > .as-mobinfo, .as--aus > .as-tipp { flex: none; }
.as-tisch { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 32px 32px 96px; background: var(--tisch); outline: none; }
.as-blatt { width: max-content; margin: 0 auto; }
.as-blatt .doc { margin: 0; }
.as-tisch.is-marking .fld { cursor: pointer; }
.as-tisch.is-marking .fld:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--marker) 80%, #8a6d00); }
.as-tipp--tisch { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--linie); background: var(--weiss); }
.as-tipp--tisch.as-tipp { color: var(--ink-2); }
/* Im Ausdruck zeichnet docs.css „übersehen“ grün schraffiert und markiert ohne Füllung um – die Legende folgt dem Papier */
.as-tipp--tisch .as-lg--miss { box-shadow: inset 0 0 0 2px var(--ok, var(--gruen)); background: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--ok, var(--gruen)) 30%, transparent) 2px 4px); }
.as-tipp--tisch .as-lg--wrong { box-shadow: inset 0 0 0 2px var(--bad, var(--rot)); }
.as-leiste { white-space: nowrap; }
.as-leiste__b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: var(--t-13); cursor: pointer; }
.as-leiste__b:hover:not(:disabled) { background: var(--grund-2); color: var(--ink); }
.as-leiste__b:disabled { color: var(--ink-4); cursor: default; }
.as-leiste__b.is-an { background: var(--weiss); color: var(--ink); font-weight: 700; box-shadow: var(--sch-ctl); }
.as-leiste__mark.is-an .h-i { color: #8a6d00; }
.as-leiste__b:focus-visible, .as-leiste .h-zoom > button:focus-visible { outline: 2px solid var(--fokus, var(--blau)); outline-offset: 0; }
.as-zoomwert { font-variant-numeric: tabular-nums; }

/* ---------- Schmalere Fenster ---------- */
@container as (max-width: 1240px) {
  .as__body { grid-template-columns: 236px minmax(0, 1fr) 300px; }
  .as-form { padding: 24px 32px 40px; }

}
/* Wirkung wandert unter das Formular; alles rollt gemeinsam */
@container as (max-width: 1040px) {
  .as__body { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: max-content minmax(max-content, 1fr); overflow-y: auto; height: 100%; }
  .as-nav { grid-row: 1 / span 2; overflow: visible; min-height: auto; }
  .as-form, .as-wirkung { overflow: visible; min-height: auto; }
  .as-wirkung { grid-column: 2; border-left: 0; border-top: 1px solid var(--linie); padding: 20px 32px 28px; }
  .as-wirkung__fuss { grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: start; }
  .as-wirkung__fuss .h-knopf--voll { width: auto; }
}
/* Ohne Seitenleiste: Vordruck über eine Auswahl */
@container as (max-width: 760px) {
  .as__body { grid-template-columns: minmax(0, 1fr); }
  .as-nav { display: none; }
  .as-wirkung { grid-column: 1; padding: 20px 20px 28px; }
  .as-form { padding: 16px 20px 28px; }
  .as-pick { display: block; width: 100%; margin-bottom: 16px; }
  .as-reihe { grid-template-columns: minmax(0, 1fr); }
  .as-ff--breit { grid-column: auto; }
  .as-kopf { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .as-kopf__wert { justify-items: start; text-align: left; }
  .as-kopf h2 { font-size: var(--t-20); }
  .as-tage__z { grid-template-columns: 74px minmax(0, 1fr) 44px; gap: 10px; }
  .as-tisch { padding: 16px 12px 88px; }
  .as-leiste__b span { display: none; }
  .as-leiste__mark span { display: inline; }
}

/* ---------- Telefon: Vollbild, Vordrucke als Blatt von unten ---------- */
.os.is-mobile .oswin[data-app="amsel"] .oswin__acts { display: none; }
.os.is-mobile .as-mobinfo { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: var(--t-13); color: var(--ink-2); }
.os.is-mobile .as--aus .as-mobinfo { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--linie); background: var(--weiss); }
.os.is-mobile .as-mobinfo .h-i { color: var(--ink-3); }
.os.is-mobile .as-pick { display: none; }
.os.is-mobile .as-blattknopf { display: flex; justify-content: flex-start; gap: 8px; height: 44px; margin-bottom: 16px; text-align: left; }
.os.is-mobile .as-blattknopf b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os.is-mobile .as-blattknopf .as-blattknopf__k { color: var(--ink-2); font-weight: 400; }
.os.is-mobile .as-form { padding: 16px 16px 24px; }
.os.is-mobile .as-wirkung { padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); }
.os.is-mobile .as-wirkung__fuss { grid-template-columns: minmax(0, 1fr); }
.os.is-mobile .as-wirkung__fuss .h-knopf--voll { width: 100%; }
.os.is-mobile .as-tisch { padding: 12px 8px 88px; }
.os.is-mobile .as-tipp--tisch { padding: 10px 16px; }
.h-sheet .as-nav--blatt .as-nav__p { min-height: 52px; }

/* ---------- Große Schirme: Fiskus vergrößert per --os-z; nur mehr Raum ---------- */
@media (min-width: 2400px) {
  .as__body { grid-template-columns: 280px minmax(0, 1fr) 372px; }
}
@container as (min-width: 1700px) {
  .as-form { padding-left: 64px; padding-right: 64px; }
  .as-reihe { column-gap: 36px; }
}

/* Bewegung aus */
@media (prefers-reduced-motion: reduce) { .as-ff.is-blink .h-inline__box { animation: none; } }
html.no-motion .as-ff.is-blink .h-inline__box { animation: none; }

/* assets/css/hilfsprogramme.css */
/* Fiskus 4.2 · Hilfsprogramme im Design „Hell“: Lexikon (lx-), Materialausgabe (ma-), Personalakte (pa-), Kurzanleitung (kh-),
   Rundgang (hptour), Design-Miniatur (hpmini), Dienstausweis (hpid). Nur Tokens und h-Bausteine aus app.css; keine eigenen
   Farben außer den Vorschauen der Kauf-Designs. Keine Tabellen, keine Kacheln, keine Pillen. Schmale Fenster und Telefon:
   Container-Abfragen auf dem Fensterinneren (Container „fx“), eine Ebene nach der anderen (data-pane). */

.oswin__body.view--app, .os.is-mobile .oswin__body.view--app { padding: 0; overflow: hidden; container: fx / inline-size; }
/* Telefon: das Lexikon blättert über den Verweis „Verzeichnis“; die Fächer der Materialausgabe passen in eine Zeile */
.os.is-mobile .oswin[data-app="lexikon"] .oswin__acts { display: none; }
.os.is-mobile .oswin__mid > .h-seg.ma-fach .h-seg__o { padding: 0 4px; font-size: var(--t-13); }
.fxa { position: relative; display: grid; height: 100%; min-height: 0; color: var(--ink); font-size: var(--t-14); line-height: 1.45; }
.fxa h1, .fxa h2, .fxa h3 { margin: 0; letter-spacing: 0; }
.fx-zurueck { display: none; align-items: center; gap: 4px; margin: 0 0 14px -2px; font-size: var(--t-14); }
.fx-zurueck .h-i { width: 16px; height: 16px; }
mark.fx-hl { padding: 0 1px; border-radius: 2px; background: var(--blau-zart-2); color: inherit; }

/* =====================================================================================================
   LEXIKON
   ===================================================================================================== */
.fxa.lx { grid-template-columns: 284px minmax(0, 1fr); }
.lx-nav { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--grund); border-right: 1px solid var(--linie); }
.lx-nav__kopf { display: grid; gap: 10px; padding: 16px 14px 8px; }
.lx-nav__liste { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 24px; }
.lx-treffer { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; font-size: var(--t-13); color: var(--ink-2); }
.lx-treffer:empty { display: none; }
.lx-treffer .h-link { font-size: var(--t-13); }
.lx-it { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-size: var(--t-14); line-height: 1.3; text-decoration: none; }
.lx-it:hover { background: var(--grund-2); color: var(--ink); text-decoration: none; }
.lx-it[aria-current="page"] { background: var(--weiss); color: var(--ink); font-weight: 700; box-shadow: var(--sch-ctl); }
.lx-it:focus-visible { outline-offset: -2px; }
.lx-it__t { flex: 1; min-width: 0; }
.lx-it__ok { display: inline-flex; flex: none; color: var(--ink-4); }
.lx-it--home { margin-bottom: 2px; }
.lx-it--home .h-i { color: var(--ink-3); }
.lx-it--home[aria-current="page"] .h-i { color: var(--blau); }
.lx-it--hit { flex-direction: column; align-items: stretch; gap: 3px; padding: 10px; }
.lx-it--hit + .lx-it--hit { margin-top: 2px; }
.lx-it--hit .lx-it__t { color: var(--ink); font-weight: 700; }
.lx-it__s { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--t-13); font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.lx-it__g { color: var(--ink-3); }
.lx-grp { display: flex; align-items: center; gap: 6px; width: 100%; margin: 0; padding: 16px 10px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: 700 var(--t-13)/1.3 var(--font); text-align: left; cursor: pointer; }
.lx-grp:hover { color: var(--ink); }
.lx-grp:focus-visible { outline-offset: -2px; }
.lx-grp__c { color: var(--ink-3); transition: transform var(--t-kurz) var(--aus); }
.lx-grp[aria-expanded="true"] .lx-grp__c { transform: rotate(90deg); }
.lx-grp .h-n { margin-left: auto; }
.lx-buchst { margin: 0; padding: 14px 10px 4px; font-size: var(--t-13); font-weight: 700; color: var(--ink-3); }
.lx-leer { margin: 8px 10px; font-size: var(--t-13); color: var(--ink-2); }
.lx-doc { min-width: 0; min-height: 0; overflow-y: auto; background: var(--weiss); outline: none; }
.lx-x { color: var(--blau-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blau) 35%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lx-x:hover { text-decoration-color: currentColor; }
/* Artikel: Lesespalte, rechts „Siehe auch“ */
.lx-art { display: grid; grid-template-columns: minmax(0, 66ch) minmax(220px, 280px); justify-content: center; gap: 56px; padding: 40px 48px 56px; }
.lx-crumb { margin: 0 0 10px; font-size: var(--t-13); color: var(--ink-2); }
.lx-crumb a { color: var(--ink-2); text-decoration: none; }
.lx-crumb a:hover { color: var(--blau-text); text-decoration: underline; }
.lx-art__t { font-size: var(--t-26); font-weight: 700; line-height: 1.2; }
.lx-art__lead { margin: 8px 0 0; font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }
.lx-art__meta { margin: 14px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--linie); font-size: var(--t-13); color: var(--ink-3); }
.lx-body { margin-top: 22px; }
.lx-body p { margin: 0 0 14px; font-size: var(--t-16); line-height: 1.62; color: var(--ink); }
.lx-body strong, .lx-ex strong { font-weight: 700; }
.lx-ex { margin: 22px 0 0; padding: 16px 18px; border-radius: 8px; background: var(--grund); }
.lx-ex__k { display: block; margin-bottom: 4px; font-size: var(--t-13); color: var(--ink-2); }
.lx-ex p { margin: 0; font-size: var(--t-14); line-height: 1.55; }
.lx-pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--linie); }
.lx-pn__a { display: grid; gap: 2px; max-width: 48%; color: var(--ink); text-decoration: none; }
.lx-pn__a b { color: var(--blau-text); font-size: var(--t-14); }
.lx-pn__a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.lx-pn__a--r { text-align: right; }
.lx-art__aside { position: sticky; top: 0; display: grid; align-content: start; gap: 28px; padding-top: 30px; }
.lx-refs { display: flex; flex-direction: column; margin-top: 6px; }
.lx-ref { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--linie); color: var(--ink); text-decoration: none; }
.lx-ref:first-child { border-top: 0; }
.lx-ref b { color: var(--blau-text); font-size: var(--t-14); }
.lx-ref span { font-size: var(--t-13); line-height: 1.4; color: var(--ink-2); }
.lx-ref:hover b { text-decoration: underline; text-underline-offset: 3px; }
/* Übersicht */
.lx-home { max-width: 900px; margin: 0 auto; padding: 40px 48px 56px; }
.lx-home h1 { font-size: var(--t-26); font-weight: 700; line-height: 1.2; }
.lx-home__lead { max-width: 62ch; margin: 8px 0 0; font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }
.lx-fort { display: grid; gap: 8px; max-width: 420px; margin-top: 26px; }
.lx-fort p { margin: 0; }
.lx-fort b { font-size: var(--t-20); }
.lx-sec { margin-top: 36px; }
.lx-sec > .h-kopfzeile { margin-bottom: 10px; }
.lx-sec > .lx-refs { max-width: 560px; }
.lx-reg { columns: 2 260px; column-gap: 48px; }
.lx-reg__g { margin-bottom: 26px; break-inside: avoid; }
.lx-reg__g h3 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: var(--t-14); font-weight: 700; }
.lx-reg__g ul { margin: 0; padding: 0; list-style: none; }
/* Begriffe in Schriftfarbe; Blau erst beim Zeigen oder Fokus (Blau heißt handeln/ausgewählt) */
.lx-reg__g li a { display: block; padding: 4px 0; color: var(--ink); font-size: var(--t-14); text-decoration: none; }
.lx-reg__g li a.is-read { color: var(--ink-2); }
.lx-reg__g li a:hover, .lx-reg__g li a:focus-visible { color: var(--blau-text); text-decoration: underline; text-underline-offset: 3px; }
.lx-tasten { margin-top: 28px; line-height: 2; }
@container fx (max-width: 1080px) {
  .lx-art { grid-template-columns: minmax(0, 66ch); gap: 0; }
  .lx-art__aside { position: static; padding-top: 34px; }
}
@container fx (max-width: 760px) {
  .fxa.lx { grid-template-columns: minmax(0, 1fr); }
  .fxa.lx[data-pane="doc"] .lx-nav, .fxa.lx[data-pane="nav"] .lx-doc { display: none; }
  .lx-nav { border-right: 0; }
  .lx-nav__kopf { padding: 12px 12px 6px; }
  .lx-it { min-height: 44px; }
  .lx-art, .lx-home { padding: 16px 16px 40px; }
  .lx-art .fx-zurueck { display: inline-flex; }
  .lx-body p { font-size: 15px; }
}

/* =====================================================================================================
   MATERIALAUSGABE – Bühne auf dem Tisch, Infozeile, Artikelliste
   ===================================================================================================== */
.fxa.ma { grid-template-columns: minmax(0, 1fr) clamp(360px, 32%, 460px); grid-template-rows: minmax(0, 1fr); }
.ma-geld { display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; font-size: var(--t-14); white-space: nowrap; }
.ma-geld__n { font-weight: 700; font-variant-numeric: tabular-nums; }
.ma-geld__l { font-size: var(--t-13); color: var(--ink-2); }
.ma-buehne { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; background: var(--tisch); }
.ma-buehne__zur { display: none; }
.ma-tisch { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 0; padding: 44px 28px 0; overflow: hidden; }
.ma-tisch--theme, .ma-tisch--wall, .ma-tisch--title, .ma-tisch--pack { align-items: center; padding: 32px; }
.ma-bogen { position: relative; flex: none; }
.ma-bogen > .doc { margin: 0; }
/* Eingangsstempel: im freien Feld rechts neben dem Anschriftfeld, Datum wie ein Datumsstempel */
.ma-abdruck { position: absolute; left: 470px; top: 88px; z-index: 3; width: 210px; height: 84px; pointer-events: none; }
.ma-abdruck .stampfx__inner { padding: 5px 12px 4px; border-width: 2.5px; border-radius: 4px; }
.ma-abdruck .stampfx.is-done .stampfx__inner { opacity: .9; }
.ma-abdruck .stampfx__text { font-family: "Courier New", Courier, monospace; font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.ma-abdruck .stampfx__sub { margin-top: 3px; padding-top: 3px; border-top-width: 1px; font-family: Arial, Helvetica, sans-serif; font-size: 8px; letter-spacing: .14em; }
.ma-ausgabe { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ma-ausgabe .stampfx__text { font-size: 40px; }
/* Bildschirm (Design, Hintergrund) und Dienstausweis auf dem Tisch */
.ma-schirm { position: relative; width: min(680px, 92%); aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: var(--weiss); box-shadow: var(--sch-fenster); }
.ma-schirm--ico { display: grid; place-items: center; }
.ma-schirm .hpmini, .ma-schirm .oswalls__prev { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.ma-wallbig { position: relative; display: block; background-size: cover; }
.ma-wallbig__fenster { position: absolute; left: 24%; top: 16%; width: 46%; height: 52%; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(18, 26, 38, .18); }
.ma-wallbig__fenster b { position: absolute; left: 0; right: 0; top: 0; height: 13%; border-bottom: 1px solid #E4E7EB; background: #F7F8FA; border-radius: 6px 6px 0 0; }
.ma-wallbig__leiste { position: absolute; left: 0; right: 0; bottom: 0; height: 8%; background: rgba(250, 251, 252, .82); }
.ma-karte { display: grid; place-items: center; }
/* Infozeile */
.ma-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; padding: 24px 40px 26px; background: var(--weiss); border-top: 1px solid var(--linie); }
.ma-info__text { min-width: 0; }
.ma-info__text > .h-meta { margin: 0; }
.ma-info__text h2 { margin-top: 4px; font-size: var(--t-26); font-weight: 700; line-height: 1.2; }
.ma-info__desc { max-width: 60ch; margin: 6px 0 0; line-height: 1.5; color: var(--ink-2); }
.ma-tinten { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: var(--t-13); color: var(--ink-2); }
.ma-tinte { width: 22px; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); cursor: pointer; }
.ma-tinte.is-an { box-shadow: 0 0 0 2px var(--weiss), 0 0 0 4px var(--ink); }
.ma-tinte:focus-visible { outline-offset: 5px; }
.ma-kasse { display: grid; justify-items: end; gap: 6px; text-align: right; }
.ma-kasse__z { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--t-14); color: var(--ink-2); white-space: nowrap; }
.ma-kasse__z b { font-size: var(--t-26); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ma-kasse__z .hud__coin { width: 18px; height: 18px; }
.ma-kasse__z.is-eq, .ma-kasse__z.is-eq b { color: var(--gruen); }
.ma-kasse__z.is-eq b, .ma-kasse__z.is-zu b { font-size: var(--t-20); }
.ma-kasse__z.is-zu b { color: var(--ink-2); }
.ma-kasse__n { margin: 0; }
.ma-kasse__n .is-knapp, .ma-kasse__n.is-knapp { color: var(--bernstein); }
.ma-kasse__k { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ma-probe { display: flex; align-items: center; gap: 6px; color: var(--blau-text); }
/* Artikelliste */
.ma-listwrap { display: flex; min-width: 0; min-height: 0; background: var(--weiss); border-left: 1px solid var(--linie); }
.ma-liste { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 28px; outline: none; }
/* Tastatur: Fokusrahmen um die Liste (innen, damit er nicht abgeschnitten wird), dazu Ring um den gewählten Artikel */
.ma-liste:focus-visible { outline: 2px solid var(--fokus); outline-offset: -2px; }
.ma-gruppe + .ma-gruppe { margin-top: 18px; }
.ma-gruppe__k { margin: 0; padding: 8px 12px 6px; }
.ma-ware { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background-color var(--t-kurz) var(--aus); }
.ma-ware:hover { background: var(--grund); }
.ma-ware[aria-selected="true"] { background: var(--blau-zart); }
.ma-liste:focus-visible .ma-ware[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--fokus); }
.ma-ware__t { display: grid; gap: 2px; min-width: 0; }
.ma-ware__t b { font-size: var(--t-14); line-height: 1.3; }
.ma-ware__t .h-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ma-bild { position: relative; display: grid; place-items: center; flex: none; width: 88px; height: 60px; overflow: hidden; border-radius: 5px; background: #FBFBF9; box-shadow: inset 0 0 0 1px var(--linie); }
.ma-bild > .hpmini, .ma-bild > .oswalls__prev { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.ma-bild--wall, .ma-bild--theme { box-shadow: none; }
.ma-bild--wall::after, .ma-bild--theme::after { content: ""; position: absolute; inset: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(18, 26, 38, .10); pointer-events: none; }
.ma-bild__stempel { position: absolute; inset: 0; }
.ma-bild__stempel .stampfx__inner { padding: 3px 7px 2px; border-width: 2px; border-radius: 3px; }
.ma-bild__stempel .stampfx__text { font-size: 13px; letter-spacing: .06em; }
.ma-bild__stempel .stampfx__sub { margin-top: 2px; padding-top: 2px; border-top-width: 1px; font-size: 6px; }
.ma-bild__ico svg { width: 36px; height: 36px; }
.ma-preis { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-14); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ma-preis.is-knapp { color: var(--ink-2); font-weight: 400; }
.ma-stand { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.ma-stand.is-eq { color: var(--gruen); font-weight: 700; }
.ma-stand.is-zu { color: var(--ink-3); }
@container fx (max-width: 1180px) {
  .ma-info { padding: 20px 28px 22px; gap: 24px; }
  .ma-ware { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; }
  .ma-bild { width: 72px; height: 50px; }
}
@container fx (max-width: 1000px) {
  .ma-info { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ma-kasse { justify-items: start; text-align: left; }
  .ma-kasse__k { justify-content: flex-start; }
}
@container fx (max-width: 860px) {
  .fxa.ma { grid-template-columns: minmax(0, 1fr); }
  .fxa.ma[data-pane="list"] .ma-buehne, .fxa.ma[data-pane="det"] .ma-listwrap { display: none; }
  .ma-buehne { grid-template-rows: auto auto auto; overflow-y: auto; }
  .ma-buehne__zur { display: block; padding: 12px 16px 10px; background: var(--weiss); border-bottom: 1px solid var(--linie); }
  .ma-buehne__zur .fx-zurueck { display: inline-flex; margin: 0; }
  .ma-tisch { height: 300px; padding: 24px 16px 0; }
  .ma-tisch--theme, .ma-tisch--wall, .ma-tisch--title, .ma-tisch--pack { padding: 20px 16px; }
  .ma-info { padding: 18px 16px 24px; gap: 16px; }
  .ma-info__text h2 { font-size: var(--t-20); }
  .ma-kasse { justify-items: stretch; }
  .ma-kasse__k { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
  .ma-kasse__k .h-knopf { width: 100%; height: 44px; }
  .ma-listwrap { border-left: 0; }
  .ma-liste { padding: 8px 8px 24px; }
  .ma-ware { min-height: 64px; }
  .ma-karte .hpid { transform: scale(.78); }
}

/* Design-Miniatur: kleiner Fiskus-Schreibtisch in den Farben des Designs (Werte wie die Kauf-Themes in app.css) */
.hpmini { --w-bg: linear-gradient(#DFE7F0, #F1F4F8); --w-win: #FFFFFF; --w-kopf: #F7F8FA; --w-bar: rgba(250, 251, 252, .9); --w-ak: #2152A3; --w-ln: #E1E5EA; --w-tx: #CBD2DB;
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: var(--w-bg); }
.hpmini[data-t="nacht"] { --w-bg: linear-gradient(#0E141C, #18202B); --w-win: #1C2027; --w-kopf: #20252D; --w-bar: rgba(30, 34, 41, .92); --w-ak: #7FA6E6; --w-ln: #2B313A; --w-tx: #3B424D; }
.hpmini[data-t="amsel"] { --w-bg: linear-gradient(#1A4896, #2762C2); --w-ak: #1D58C4; --w-tx: #C8D6EE; }
.hpmini[data-t="retro"] { --w-bg: radial-gradient(60% 50% at 75% 25%, rgba(255, 236, 190, .3), transparent 70%), #2F4A3B; --w-ak: #2F5A45; --w-tx: #CFDAD3; }
.hpmini i, .hpmini b, .hpmini u, .hpmini s, .hpmini em { position: absolute; display: block; text-decoration: none; }
.hpmini__win { left: 22%; top: 13%; width: 56%; height: 63%; overflow: hidden; border-radius: 4px; background: var(--w-win); box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .16); }
.hpmini__win--hinten { left: 8%; top: 8%; width: 40%; height: 46%; opacity: .92; }
.hpmini__win > b { left: 0; right: 0; top: 0; height: 14%; background: var(--w-kopf); border-bottom: 1px solid var(--w-ln); }
.hpmini__win > b > s { left: 5%; top: 30%; width: 7%; height: 40%; border-radius: 2px; background: var(--w-tx); }
.hpmini__win > i { left: 0; right: 0; top: 14%; bottom: 0; }
.hpmini__win > i > u { left: 8%; height: 6%; border-radius: 2px; background: var(--w-tx); }
.hpmini__win > i > u:nth-child(1) { top: 16%; width: 64%; }
.hpmini__win > i > u:nth-child(2) { top: 32%; width: 52%; }
.hpmini__win > i > u.k { top: 48%; width: 36%; }
.hpmini__win > em { right: 7%; bottom: 9%; width: 24%; height: 11%; border-radius: 3px; background: var(--w-ak); }
.hpmini__bar { left: 0; right: 0; bottom: 0; height: 10%; background: var(--w-bar); }
.hpmini__bar > s { left: 2%; top: 22%; width: 3.2%; height: 56%; border-radius: 2px; background: var(--w-ak); }
.hpmini__bar > u { top: 22%; width: 3.2%; height: 56%; border-radius: 2px; background: var(--w-tx); }
.hpmini__bar > u:nth-child(2) { left: 9%; }
.hpmini__bar > u:nth-child(3) { left: 14%; }
.hpmini__bar > u:nth-child(4) { left: 19%; }
.hpmini--big .hpmini__win { border-radius: 8px; }

/* Dienstausweis: Kunststoffkarte */
.hpid { position: relative; width: 440px; max-width: 100%; padding: 18px 22px 20px; overflow: hidden; border-radius: 14px; background: linear-gradient(160deg, #FFFFFF, #F1F4F8); color: #14181F; box-shadow: var(--sch-fenster); }
.hpid__kopf { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #E4E7EB; font-size: var(--t-14); }
.hpid__kopf > span:last-child { margin-left: auto; font-size: var(--t-12); color: #6E7683; }
.hpid__mark { display: inline-flex; }
.hpid__body { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; margin-top: 16px; }
.hpid__foto { display: grid; place-items: center; width: 96px; height: 116px; border-radius: 8px; background: color-mix(in srgb, var(--pc, #6E7683) 12%, #F5F6F8); }
.hpid__foto .h-av { width: 64px; height: 64px; font-size: 22px; }
.hpid__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hpid__name { font-size: var(--t-20); line-height: 1.2; overflow-wrap: anywhere; }
.hpid__rang { font-size: var(--t-14); color: #4B5361; }
.hpid__titel { margin-top: 6px; font-size: var(--t-14); font-weight: 700; color: #1D4A93; }
.hpid__titel.is-leer { font-weight: 400; color: #A3AAB5; }
.hpid__nr { margin-top: auto; padding-top: 10px; font-size: var(--t-12); color: #6E7683; }
.hpid__siegel { position: absolute; right: 16px; bottom: 14px; opacity: .3; }
.hpid__siegel svg { display: block; width: 70px; height: 70px; }
.hpid--mini { display: block; width: 66px; height: 42px; padding: 0; border-radius: 5px; box-shadow: 0 0 0 1px rgba(18, 26, 38, .10), 0 2px 5px rgba(18, 26, 38, .12); }
.hpid--mini > i { position: absolute; display: block; }
.hpid--mini .hpid__foto { left: 6px; top: 8px; width: 15px; height: 20px; border-radius: 2px; background: color-mix(in srgb, var(--pc, #6E7683) 40%, #FFFFFF); }
.hpid--mini .hpid__z { left: 26px; top: 11px; width: 32px; height: 4px; border-radius: 1px; background: #CBD2DB; }
.hpid--mini .hpid__z--k { top: 19px; width: 20px; background: #DDE2E8; }

/* =====================================================================================================
   PERSONALAKTE
   ===================================================================================================== */
.fxa.pa, .fxa.kh { grid-template-columns: var(--w-nav) minmax(0, 1fr); }
.pa-nav, .kh-nav { min-height: 0; }
.pa-ich { display: flex; align-items: center; gap: 12px; padding: 2px 10px 16px; margin-bottom: 4px; border-bottom: 1px solid var(--linie); }
.pa-ich > span:last-child { display: grid; min-width: 0; }
.pa-ich b { overflow: hidden; font-size: var(--t-14); white-space: nowrap; text-overflow: ellipsis; }
.pa-ich .h-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pa-nav .h-kopfzeile { padding-top: 16px; }
.pa-warnpunkt { flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--bernstein); }
.pa-main, .kh-main { min-width: 0; min-height: 0; overflow-y: auto; background: var(--weiss); outline: none; }
.pa-seite { max-width: 800px; padding: 32px 40px 56px; }
.pa-kopf h1 { font-size: var(--t-26); font-weight: 700; line-height: 1.2; }
.pa-kopf p { max-width: 62ch; margin: 6px 0 0; color: var(--ink-2); }
.pa-abs { margin-top: 32px; }
.pa-abs__t { margin-bottom: 8px; }
.pa-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 14px 0; }
.pa-zeile + .pa-zeile { border-top: 1px solid var(--linie); }
.pa-zeile__l { display: grid; gap: 3px; min-width: 0; }
.pa-zeile__l b { font-size: var(--t-14); }
.pa-zeile__c { display: flex; justify-content: flex-end; min-width: 0; }
.pa-zeile--breit { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pa-zeile--breit .pa-zeile__c { justify-content: flex-start; }
.pa-zeile--gefahr .pa-zeile__l b { color: var(--rot); }
.pa-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pa-schalter { align-items: center; }
.pa-mail { display: grid; gap: 6px; width: 100%; max-width: 460px; }
.pa-mail .h-feld { flex: 1 1 220px; width: auto; }
.pa-anrede { width: 300px; max-width: 100%; }
.pa-wert__v { font-weight: 700; }
.pa-farben { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-farbe { width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); cursor: pointer; }
.pa-farbe.is-an { box-shadow: 0 0 0 2px var(--weiss), 0 0 0 4px var(--ink); }
.pa-farbe:focus-visible { outline-offset: 5px; }
.pa-hinweis { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.pa-hinweis .h-i { margin-top: 1px; color: var(--ink-3); }
.pa-hinweis--warn { margin-top: 20px; background: var(--bernstein-zart); color: var(--ink); font-size: var(--t-14); }
.pa-hinweis--warn .h-i { color: var(--bernstein); }
.pa-tasten { font-size: var(--t-13); color: var(--ink-2); white-space: nowrap; }
.pa-fuss { margin: 10px 0 0; }
/* Personalbogen */
.pa-bogen { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 0 90px 26px 0; border-bottom: 1px solid var(--linie); }
.pa-bogen > .h-av { width: 72px; height: 72px; font-size: 24px; }
.pa-bogen__t > .h-meta { margin: 0; }
.pa-bogen h1 { margin-top: 2px; font-size: var(--t-26); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pa-bogen__rang { margin: 2px 0 6px; font-size: var(--t-16); }
.pa-bogen__siegel { position: absolute; right: 0; top: 0; opacity: .32; }
.pa-bogen__siegel svg { display: block; width: 72px; height: 72px; }
.pa-stufe { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.pa-stufe span { color: var(--ink-2); }
.pa-abs .h-balken + .h-meta { margin: 8px 0 0; }
.pa-satz { max-width: 62ch; margin: 0; font-size: var(--t-14); line-height: 1.55; }
.pa-quote { display: grid; grid-template-columns: 70px minmax(0, 280px) auto; align-items: center; gap: 12px; margin: 16px 0 4px; font-size: var(--t-13); color: var(--ink-2); }
.pa-quote b { font-size: var(--t-14); color: var(--ink); }
.pa-werte { margin-top: 14px; columns: 2 260px; column-gap: 40px; }
.pa-wert { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--linie); color: var(--ink-2); break-inside: avoid; }
.pa-wert b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* Laufbahn als Zeitstrahl */
.pa-lauf { position: relative; margin: 6px 0 0; padding: 0; list-style: none; }
.pa-lauf__e { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 0; color: var(--ink-3); }
.pa-lauf__e::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--linie); }
.pa-lauf__e:first-child::before { top: 50%; }
.pa-lauf__e:last-child::before { bottom: 50%; }
.pa-lauf__e.is-done::before { background: var(--linie-2); }
.pa-lauf__p { position: relative; z-index: 1; justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--weiss); box-shadow: inset 0 0 0 2px var(--linie-2); }
.pa-lauf__e.is-done { color: var(--ink-2); }
.pa-lauf__e.is-done .pa-lauf__p { background: var(--ink-3); box-shadow: none; }
.pa-lauf__e.is-jetzt { color: var(--ink); font-weight: 700; }
.pa-lauf__e.is-jetzt .pa-lauf__p { width: 14px; height: 14px; box-shadow: inset 0 0 0 4px var(--blau), 0 0 0 4px var(--blau-zart); }
.pa-lauf__jetzt { margin-left: 10px; font-size: var(--t-12); font-weight: 700; color: var(--blau-text); }
.pa-lauf__xp { font-size: var(--t-13); font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Auszeichnungen */
.pa-fort { max-width: 420px; margin: 16px 0 6px; }
.pa-ausz { margin: 18px 0 0; padding: 0; list-style: none; }
.pa-ausz__e { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; }
.pa-ausz__e + .pa-ausz__e { border-top: 1px solid var(--linie); }
.pa-ausz__z { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--linie-2); color: var(--ink-4); }
.pa-ausz__e.is-hat .pa-ausz__z { background: var(--blau-zart); box-shadow: none; color: var(--blau); }
.pa-ausz__t { display: grid; gap: 2px; min-width: 0; }
.pa-ausz__t b { font-size: var(--t-14); color: var(--ink-2); }
.pa-ausz__e.is-hat .pa-ausz__t b { color: var(--ink); }
.pa-ausz__d { font-size: var(--t-13); color: var(--ink-3); white-space: nowrap; }
.pa-ausz__e.is-hat .pa-ausz__d { color: var(--ink-2); }
/* Ausrüstung */
.pa-eintrag { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 0; }
.pa-eintrag + .pa-eintrag { border-top: 1px solid var(--linie); }
.pa-eintrag__t { display: grid; gap: 2px; min-width: 0; }
.pa-eintrag__t b { font-size: var(--t-14); }
.pa-eintrag__t .h-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ma-bild.pa-th { width: 64px; height: 42px; }
.pa-th .hpid--mini { transform: scale(.82); }
.pa-th .ma-bild__stempel .stampfx__text { font-size: 10px; }
.pa-aktiv { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-13); font-weight: 700; color: var(--gruen); white-space: nowrap; }
.pa-mehr { margin: 28px 0 0; color: var(--ink-2); }
/* Auswahl in Zeilen (Design, Hintergrund) */
.pa-wahlen { display: flex; flex-direction: column; }
.pa-wahl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; width: calc(100% + 24px); margin: 0 -12px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-kurz) var(--aus); }
.pa-wahl:hover { background: var(--grund); }
.pa-wahl.is-an { background: var(--blau-zart); }
.pa-wahl:focus-visible { outline-offset: -2px; }
.pa-wahl__th { position: relative; display: block; width: 64px; height: 42px; overflow: hidden; border-radius: 5px; }
.pa-wahl__th::after { content: ""; position: absolute; inset: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(18, 26, 38, .10); }
.pa-wahl__th > .hpmini, .pa-wahl__th > .oswalls__prev { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.pa-wahl__t { display: grid; gap: 2px; min-width: 0; }
.pa-wahl__t b { font-size: var(--t-14); }
.pa-wahl__t .h-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pa-wahl.is-zu .pa-wahl__t b { color: var(--ink-2); }
.pa-wahl__zu { color: var(--ink-3); }
.pa-wahl__r { grid-column: 4; width: 18px; height: 18px; border-radius: 50%; background: var(--weiss); box-shadow: inset 0 0 0 1.5px var(--linie-2); }
.pa-wahl.is-an .pa-wahl__r { box-shadow: inset 0 0 0 5px var(--blau); }
@container fx (max-width: 760px) {
  .fxa.pa, .fxa.kh { grid-template-columns: minmax(0, 1fr); }
  .fxa.pa[data-pane="main"] .pa-nav, .fxa.pa[data-pane="nav"] .pa-main,
  .fxa.kh[data-pane="main"] .kh-nav, .fxa.kh[data-pane="nav"] .kh-main { display: none; }
  .pa-nav, .kh-nav { border-right: 0; }
  .pa-nav .h-nav__p, .kh-nav .h-nav__p { height: 44px; }
  .pa-seite { padding: 16px 16px 40px; }
  .pa-seite .fx-zurueck, .kh-seite .fx-zurueck { display: inline-flex; }
  .pa-bogen { padding-right: 0; }
  .pa-bogen__siegel { display: none; }
  .pa-zeile { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pa-zeile__c { justify-content: flex-start; }
  .pa-quote { grid-template-columns: 60px minmax(0, 1fr) auto; }
}

/* =====================================================================================================
   KURZANLEITUNG
   ===================================================================================================== */
.kh-nav .h-kopfzeile { padding-top: 16px; }
.kh-nav .h-kopfzeile:first-child { padding-top: 0; }
.kh-it__n { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--grund-2); font-size: var(--t-12); font-weight: 700; color: var(--ink-2); }
.kh-it__t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kh-it__ok { display: inline-flex; flex: none; color: var(--ink-4); }
.kh-it[aria-current="step"] { background: var(--weiss); color: var(--ink); font-weight: 700; box-shadow: var(--sch-ctl); }
.kh-it[aria-current="step"] .h-i { color: var(--blau); }
.kh-it[aria-current="step"] .kh-it__n { background: var(--blau); color: var(--on-primary); }
.kh-nav .h-nav__fuss { gap: 6px; padding-top: 18px; }
.kh-seite { max-width: 980px; padding: 36px 44px 48px; }
.kh-seite > .h-meta { margin: 0; }
.kh-seite h1 { margin-top: 4px; font-size: var(--t-26); font-weight: 700; line-height: 1.2; }
.kh-lead { max-width: 60ch; margin: 8px 0 0; font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }
.kh-stationen { max-width: 620px; margin: 26px 0 0; padding: 0; list-style: none; }
.kh-stationen li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 14px; padding: 8px 0; }
.kh-stationen li::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--linie); }
.kh-stationen li:first-child::before { top: 50%; }
.kh-stationen li:last-child::before { bottom: 50%; }
.kh-stationen__n { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--weiss); box-shadow: inset 0 0 0 1.5px var(--linie-2); font-size: var(--t-13); font-weight: 700; color: var(--ink-2); }
.kh-stationen li > span:last-child { display: grid; gap: 1px; }
.kh-stationen b { font-size: var(--t-14); }
.kh-akt { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 12px; }
.kh-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); align-items: start; gap: 40px; margin-top: 20px; }
.kh-txt p { max-width: 60ch; margin: 0 0 12px; font-size: var(--t-16); line-height: 1.6; }
.kh-txt p strong { font-weight: 700; }
.kh-txt .kh-akt { margin-top: 18px; }
.kh-merke { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0 !important; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-14) !important; line-height: 1.45 !important; }
.kh-merke .h-i { margin-top: 2px; color: var(--blau); }
.kh-fig { margin: 0; }
.kh-fig figcaption { margin-bottom: 8px; }
.kh-fig__tisch { display: grid; place-items: center; min-height: 250px; padding: 28px 24px; border-radius: 10px; background: var(--tisch); }
.kh-attrappe { pointer-events: none; }
.kh-karte { display: grid; gap: 10px; width: 100%; max-width: 340px; padding: 18px; border-radius: 10px; background: var(--weiss); box-shadow: var(--sch-fenster-hinten); }
.kh-karte > .h-meta, .kh-karte > p { margin: 0; }
.kh-karte__t { font-size: var(--t-16); }
.kh-karte > .h-seg { justify-self: start; max-width: 100%; overflow: hidden; }
.kh-karte > .h-seg .h-seg__o { padding: 0 8px; font-size: var(--t-13); }
.kh-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.kh-code .h-code { font-size: var(--t-20); letter-spacing: .14em; }
.kh-punkte { display: grid; }
.kh-punkte .h-punkt { margin: 0; padding: 10px 4px; }
.kh-punkte .h-punkt + .h-punkt { border-top: 1px solid var(--linie); border-radius: 0; }
.kh-papier { position: relative; width: 100%; max-width: 320px; padding: 20px 22px; background: #FDFDFB; box-shadow: var(--sch-papier); color: #1A1A1A; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.5; }
.kh-papier p { margin: 0 0 4px; }
.kh-papier__k { margin-bottom: 10px !important; font-size: 14px; font-weight: 700; }
.kh-papier__z { display: flex; justify-content: space-between; margin-top: 10px !important; padding-top: 8px; border-top: 1px solid #1A1A1A; }
.kh-papier i { display: block; height: 6px; margin: 9px 0; border-radius: 1px; background: #E3E3E0; }
.kh-papier i.k { width: 60%; }
.kh-lupe { position: absolute; right: -16px; top: -16px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--weiss); color: var(--ink-2); box-shadow: var(--sch-pop); }
.kh-brief { display: grid; justify-items: center; gap: 16px; width: 100%; }
.kh-status { display: grid; gap: 10px; }
.kh-status .h-status { font-size: var(--t-14); }
.kh-karte--liste { gap: 0; padding: 6px 18px; }
.kh-wz { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: var(--t-14); }
.kh-wz + .kh-wz { border-top: 1px solid var(--linie); }
.kh-paar { display: flex; align-items: center; gap: 6px; }
.kh-paar .h-meta { margin-left: 6px; }
.kh-stempelfeld { position: relative; height: 96px; }
.kh-stempelfeld .stampfx__text { font-size: 24px; }
.kh-ertrag { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.kh-ertrag b { font-size: var(--t-26); line-height: 1.1; color: var(--ink); }
.kh-lex b { font-size: var(--t-20); }
.kh-lex p { font-size: var(--t-14); line-height: 1.5; color: var(--ink-2); }
.kh-blaettern { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--linie); }
@container fx (max-width: 900px) {
  .kh-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .kh-fig__tisch { min-height: 0; }
}
@container fx (max-width: 760px) {
  .kh-seite { padding: 16px 16px 40px; }
  .kh-txt p { font-size: 15px; }
  .kh-blaettern .h-knopf { flex: 1 1 auto; height: 44px; }
}

/* =====================================================================================================
   RUNDGANG – Markierung auf den echten Bedienelementen, Karte daneben
   ===================================================================================================== */
.hptour { position: absolute; inset: 0; z-index: 2000; }
/* wie die Hinweise des Tutorials: Ring mit Hof statt Abdunkeln; ein ganz leichter Schleier zeigt nur, dass der Rundgang
   die Oberfläche hält (Klicks daneben bleiben wirkungslos) */
.hptour:not(.has-hole) { background: rgba(20, 24, 31, .08); }
.hptour__hole { position: absolute; left: 0; top: 0; display: none; width: 0; height: 0; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--blau), 0 0 0 7px rgba(33, 82, 163, .16), 0 0 0 9999px rgba(20, 24, 31, .08);
  box-shadow: 0 0 0 2px var(--blau), 0 0 0 7px color-mix(in srgb, var(--blau) 16%, transparent), 0 0 0 9999px rgba(20, 24, 31, .08);
  transition: transform var(--t-mittel) var(--aus), width var(--t-mittel) var(--aus), height var(--t-mittel) var(--aus); }
.hptour.has-hole .hptour__hole { display: block; }
.hptour__card { position: absolute; left: 0; top: 0; width: 360px; max-width: calc(100% - 16px); padding: 14px 18px 14px; border-radius: var(--r-pop); background: var(--weiss); color: var(--ink);
  box-shadow: var(--sch-pop), 0 24px 60px -20px rgba(18, 26, 38, .35); outline: none; transition: transform var(--t-mittel) var(--aus); }
.hptour__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -8px 4px 0; }
.hptour__x { width: 30px; height: 30px; }
.hptour__t { margin: 0; font-size: var(--t-16); font-weight: 700; line-height: 1.3; }
.hptour__p { margin: 6px 0 0; font-size: var(--t-14); line-height: 1.5; color: var(--ink-2); }
.hptour__fort { margin-top: 14px; }
.hptour__fort .h-balken { height: 3px; }
.hptour__foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.hptour__sp { flex: 1; }
.os.is-mobile .hptour__card { padding: 16px 18px; }
.os.is-mobile .hptour__foot .h-knopf { height: 40px; }

/* assets/css/tutorial.css */
/* Fiskus 4.2 – Tutorial (tutorial.js), Design „Hell“.
   Programm: dieselbe Zwei-Ebenen-Anlage wie die frühere Kurzanleitung (.fxa.kh aus hilfsprogramme.css, data-pane auf
   schmalen Fenstern), dazu tu-*. Hinweise auf der Oberfläche (FA.coach): Ring in Behördenblau mit weichem Hof, weiße Karte
   (Radius Pop-up, Schatten Pop-up), kein Abdunkeln, kein Glas. Telefon: Karte über der Leiste bzw. unter dem Fensterkopf. */

/* ---------------- Programm ---------------- */
.tu-nav .h-nav__p.tu-it { flex: none; height: auto; min-height: 48px; padding: 7px 10px; align-items: flex-start; }
/* Nachschlagen: in der rollenden Spalte nicht auf Texthöhe zusammendrücken (36 px wie .h-nav__p, Telefon 44 px) */
.tu-nav .h-nav__p.tu-it--t { flex: none; min-height: 36px; height: auto; }
.os.is-mobile .tu-nav .h-nav__p.tu-it--t { min-height: 44px; }
.tu-it .kh-it__n { margin-top: 2px; }
.tu-it__t { display: grid; flex: 1; min-width: 0; gap: 1px; }
/* lange Kapitelnamen umbrechen statt abschneiden */
.tu-it__name { overflow-wrap: anywhere; line-height: 1.3; }
.tu-it__meta { font-size: var(--t-12); font-weight: 400; color: var(--ink-3); }
.tu-it.is-fertig .tu-it__ok { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linie-2); color: var(--ink-2); }
.tu-it[aria-current="step"] .tu-it__meta { color: var(--ink-2); }
.tu-it[aria-current="step"].is-fertig .tu-it__ok { background: var(--blau); box-shadow: none; color: var(--on-primary); }
.tu-it[aria-current="step"].is-fertig .tu-it__ok .h-i, .tu-it.is-fertig .tu-it__ok .h-i { color: inherit; }
.tu-it--t { color: var(--ink-2); }
.tu-seite h1 { margin-bottom: 0; }
.tu-cols { margin-top: 12px; }
.fxa .tu-uebt { margin: 28px 0 0; padding: 0; }
.tu-uebt + .kh-stationen { margin-top: 8px; }
.tu-akt { margin-bottom: 8px; }
.tu-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 4px 0 0; font-size: var(--t-14); }
.tu-zaehlt { display: flex; align-items: flex-start; gap: 10px; max-width: 60ch; margin: 18px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--grund); font-size: var(--t-14); line-height: 1.45; color: var(--ink-2); }
.tu-zaehlt .h-i { flex: none; margin-top: 2px; color: var(--blau); }
.tu-zaehlt + .tu-zaehlt { margin-top: 8px; }
.kh-ueben { margin: 14px 0 0 !important; font-size: var(--t-14) !important; }
.kh-ueben .h-link { display: inline-flex; align-items: center; gap: 6px; }

/* kleine Anschauungsstücke (aus echten Bausteinen) */
.tu-fig-desk { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 4px; }
.tu-fig-desk__i { display: grid; justify-items: center; gap: 6px; width: 84px; font-size: var(--t-13); color: var(--ink); text-align: center; }
.tu-fig-desk__i svg { display: block; }
.tu-fig-bon { display: grid; place-items: center; }
.tu-fig-bon .h-blattvorschau { border-radius: 2px; box-shadow: 0 1px 2px rgba(18, 26, 38, .12), 0 8px 24px -8px rgba(18, 26, 38, .28); }
.tu-fig-chat { display: grid; gap: 10px; width: 100%; max-width: 320px; }
.tu-fig-chat__m { display: flex; align-items: flex-end; gap: 8px; }
.tu-fig-chat__m p { margin: 0; padding: 9px 12px; border-radius: 12px 12px 12px 4px; background: var(--weiss); box-shadow: var(--sch-ctl); font-size: var(--t-14); line-height: 1.4; }
.tu-fig-chat__m.is-ich { justify-content: flex-end; }
.tu-fig-chat__m.is-ich p { border-radius: 12px 12px 4px 12px; background: var(--blau-zart); box-shadow: none; }
.tu-fig-ma { justify-items: start; }
/* Stempel stehen auf Papier – auch im Farbschema „Nacht“ */
[data-theme="nacht"] .kh-stempelfeld { border-radius: 6px; background: #FAFAF7; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* Prüfbericht einer Übungsakte: eine Zeile statt Ertrag */
.pb-ertrag.pb-ertrag--uebung { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 8px; font-size: var(--t-14); line-height: 1.45; color: var(--ink-2); }
.pb-ertrag--uebung > span { flex: 1 1 auto; min-width: 0; }
.pb-ertrag--uebung .h-i { flex: none; margin-top: 2px; color: var(--blau); }

/* ---------------- Hinweise auf der Oberfläche (FA.coach) ---------------- */
.tu-coach { position: fixed; inset: 0; z-index: 1800; pointer-events: none; font-family: var(--font); }
.tu-coach[hidden], .tu-coach [hidden] { display: none !important; }
.tu-ring { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 10px; pointer-events: none;
  /* erst ohne color-mix() (ältere Browser verwerfen sonst die ganze Angabe und der Ring fehlt) */
  box-shadow: 0 0 0 2px var(--blau), 0 0 0 7px rgba(33, 82, 163, .16);
  box-shadow: 0 0 0 2px var(--blau), 0 0 0 7px color-mix(in srgb, var(--blau) 16%, transparent), 0 0 32px 6px color-mix(in srgb, var(--blau) 14%, transparent);
  transition: transform var(--t-mittel) var(--aus), width var(--t-mittel) var(--aus), height var(--t-mittel) var(--aus); }
/* kleine Ziele (Segmente, Knöpfe): schmaler Hof, damit Nachbarn (z. B. eine Zahl daneben) lesbar bleiben */
.tu-ring.is-eng { border-radius: 8px; box-shadow: 0 0 0 2px var(--blau), 0 0 0 4px rgba(33, 82, 163, .12);
  box-shadow: 0 0 0 2px var(--blau), 0 0 0 4px color-mix(in srgb, var(--blau) 12%, transparent); }
.tu-ring::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 2px var(--blau); opacity: 0; animation: tu-puls 2.4s var(--aus) infinite; }
@keyframes tu-puls { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.06); } }
.tu-karte { position: absolute; left: 0; top: 0; width: 344px; max-width: calc(100vw - 16px); padding: 12px 16px 14px; border-radius: var(--r-pop); background: var(--weiss); color: var(--ink);
  box-shadow: var(--sch-pop); pointer-events: auto; outline: none; transition: transform var(--t-mittel) var(--aus); }
.tu-karte:focus-visible { box-shadow: var(--sch-pop), 0 0 0 2px var(--blau); }
.tu-karte__kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -8px 2px 0; }
.tu-karte__kopf .h-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tu-karte__x.h-knopf { width: 30px; height: 30px; }
.tu-karte__t { margin: 0; font-size: var(--t-16); font-weight: 700; line-height: 1.3; outline: none; }
.tu-karte__p { margin: 6px 0 0; font-size: var(--t-14); line-height: 1.5; color: var(--ink-2); }
.tu-karte__tasten { margin: 8px 0 0; font-size: var(--t-13); color: var(--ink-3); }
/* Coach-Hinweis einer Person (Lukas): Kopfbild + Satz auf hellem Grund, ohne Signalfarbe */
.tu-karte__tipp { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--grund); font-size: var(--t-14); line-height: 1.45; color: var(--ink-2); }
.tu-karte__tipp > span:last-child { flex: 1 1 auto; min-width: 0; }
.tu-karte__tipp b { color: var(--ink); font-weight: 600; }
.tu-karte__tipp .h-av { flex: none; width: 28px; height: 28px; font-size: var(--t-12); }
.tu-karte.is-dock .tu-karte__tipp { margin-top: 6px; padding: 8px 10px; }
.tu-karte__weg { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--grund); font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.tu-karte__weg .h-i { flex: none; margin-top: 1px; color: var(--ink-3); }
.tu-karte__weg > span { flex: 1 1 200px; }
.tu-karte__fort { margin-top: 12px; }
.tu-karte__fort .h-balken { height: 3px; }
.tu-karte__fuss { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.tu-karte__sp { flex: 1; }
.tu-karte__skip { font-size: var(--t-14); }
.tu-karte__zur.h-knopf { width: 32px; padding: 0; }
.tu-karte__ende { display: grid; gap: 10px; margin-top: 14px; }
.tu-karte__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.tu-karte__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tu-karte__ende .h-link { font-size: var(--t-14); }
.tu-karte.is-dock { max-width: none; padding: 10px 14px 12px; transition: none; }
.tu-karte.is-dock .tu-karte__p { margin-top: 4px; line-height: 1.45; }
.tu-karte.is-dock .tu-karte__fort { margin-top: 8px; }
.tu-karte.is-dock .tu-karte__fuss { margin-top: 6px; }
.tu-karte.is-dock .h-knopf--klein { height: 40px; }
.tu-karte.is-dock .tu-karte__skip { padding: 8px 2px; }

/* angehalten: kleine Leiste über der Dienstleiste; tutorial.js setzt die Lage (frei von Primäraktion und Prüfpanel) */
.tu-pause { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pop); background: var(--weiss); box-shadow: var(--sch-pop); pointer-events: auto; }
.tu-pause__los { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-family: var(--font); text-align: left; cursor: pointer; }
.tu-pause__los:hover { background: var(--grund); }
.tu-pause__los:focus-visible { outline: 2px solid var(--blau); outline-offset: 0; }
.tu-pause__ico svg { display: block; }
.tu-pause__t { display: grid; gap: 1px; font-size: var(--t-14); }
.tu-pause__t > span { font-size: var(--t-13); color: var(--blau-text); }
.tu-pause__x.h-knopf { width: 32px; height: 32px; }

@media (prefers-reduced-motion: reduce) {
  .tu-ring, .tu-karte { transition: none; }
  .tu-ring::after { animation: none; }
}
.no-motion .tu-ring, .no-motion .tu-karte { transition: none; }
.no-motion .tu-ring::after { animation: none; }

/* assets/css/os-vorgaenge.css */
/* Fiskus „Hell“ – Programme „Posteingang“ (pe-*), „Archiv“ (ar-*) und „Amtsmessenger“ (ms-*); Fensterflächen ohne
   Innenabstand. Die Aufteilung richtet sich nach der Breite des FENSTERS (Container Queries auf .fapp). */

/* ================= Baukasten ================= */
.oswin__body.fapp,
.os.is-mobile .oswin__body.fapp {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  container-type: inline-size; container-name: fapp; background: var(--weiss);
}
/* Alte Befehlsknöpfe (FA.fbtn, FA.fsep) im Hell-Aussehen */
.fbar__sep { align-self: center; margin: 0 4px; }
.fbtn { gap: 7px; }
.fbtn__g { display: grid; place-items: center; width: 16px; height: 16px; flex: none; }
.fbtn__g svg { width: 16px; height: 16px; }

/* ================= Posteingang ================= */
.pe { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: var(--w-nav, 236px) minmax(0, 1fr) minmax(380px, 560px); grid-template-rows: minmax(0, 1fr); }
.pe.ohne-vorschau { grid-template-columns: var(--w-nav, 236px) minmax(0, 1fr) 0; }
.pe.ohne-vorschau .pe-vs { display: none; }
.pe-nav { grid-column: 1; grid-row: 1; min-height: 0; }
.pe-nav .h-nav__p > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-nav__art .h-art { min-width: 0; font-size: var(--t-14); color: inherit; }
.pe-team { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pe-code { margin-left: auto; border: 0; font-size: var(--t-13); cursor: pointer; }
.pe-code:hover { background: var(--linie); }
.pe-team__frei { font-size: var(--t-13); }
.pe-nav__chat .h-nav__n.is-neu { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blau); color: var(--on-primary); font-weight: 700; line-height: 20px; text-align: center; }
/* Ersatz der Navigation im schmalen Fenster (Menü „Postfächer“ im Listenkopf) */
.pe-navknopf { display: none; }
.pe-navknopf > .h-i:last-child { margin-left: 2px; color: var(--ink-3); }

.pe-liste { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--linie); }
.pe-liste__kopf { flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 18px 28px 6px; }
.pe-liste__akt { display: inline-flex; align-items: center; gap: 4px; }
.pe-liste__akt .h-knopf--leise { color: var(--ink-2); font-weight: 400; }
.pe-speed { width: auto; height: 32px; margin-left: 8px; font-size: var(--t-13); }
.pe-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 28px; outline: none; scrollbar-width: thin; }
.pe-rows:focus-visible { box-shadow: inset 0 0 0 2px var(--fokus, var(--blau)); }
.pe-row__m { display: block; min-width: 0; }
.pe-row .h-zeile__punkt { margin-top: 8px; }   /* ungelesen: blauer Punkt vor dem Namen (wie im Entwurf) */
.pe-row__sub { color: var(--ink-3); }
.pe-row .h-zeile__rechts .h-status { font-weight: 400; }
.pe-row .h-zeile__rechts .h-status--neu { font-weight: 700; }
.pe-row.is-erledigt .h-zeile__rechts .h-status { color: var(--ink-3); }
.pe-row.is-new { animation: pe-neu 860ms var(--aus) both; }
@keyframes pe-neu { 0% { opacity: 0; transform: translateY(-6px); } 30% { opacity: 1; transform: none; box-shadow: inset 0 0 0 999px var(--blau-zart); } 100% { box-shadow: none; } }
.pe-row.is-bump, .pe-lauf.is-bump { animation: pe-blitz 640ms var(--aus); }
@keyframes pe-blitz { 0%, 100% { box-shadow: none; } 30% { box-shadow: inset 0 0 0 999px var(--blau-zart-2); } }
.pe-keine { margin: 0; padding: 24px 12px; color: var(--ink-2); }
.pe-rows > .h-leer { min-height: 70%; }
.pe-stempel {
  display: inline-block; margin-bottom: 10px; padding: 7px 16px 6px; border: 3px solid var(--stamp, var(--rot)); border-radius: 6px; color: var(--stamp, var(--rot));
  font: 700 26px/1 var(--font-eng); letter-spacing: .12em; text-transform: uppercase; opacity: .9; transform: rotate(-5deg); mix-blend-mode: multiply;
}
.pe-stempel.is-hit { animation: pe-stempel 260ms var(--feder) both; }
.pe-stempel.is-static { animation: none; }
@keyframes pe-stempel { from { opacity: 0; transform: rotate(-5deg) scale(1.6); } to { opacity: .9; transform: rotate(-5deg) scale(1); } }
[data-theme="nacht"] .pe-stempel { mix-blend-mode: normal; }
.pe-lauf__eta { font-size: var(--t-20); color: var(--ink); font-variant-numeric: tabular-nums; }
.pe-protokoll { margin: 0; padding: 0 12px; }
.pe-protokoll .h-lauf__e { grid-template-columns: 48px minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: var(--t-14); }
.pe-protokoll .h-lauf__e b { font-weight: 700; }

/* Vorschau: echte, verkleinerte Unterlagen; eine Primäraktion */
.pe-vs { grid-column: 3; grid-row: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px 36px 40px; scrollbar-width: thin; }
.pe-vs > .h-leer { min-height: 70%; }
.pe-vs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--t-13); color: var(--ink-2); }
.pe-vs__name { margin: 8px 0 0; font-size: var(--t-26); line-height: 1.2; overflow-wrap: anywhere; }
.pe-vs__sub { margin: 4px 0 0; color: var(--ink-2); }
.pe-vs__akt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.pe-vs__mit { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: var(--t-13); color: var(--ink-2); }
.pe-vs__erg { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 12px; border-radius: 8px; background: var(--grund); font-size: var(--t-13); line-height: 1.45; color: var(--ink-2); }
.pe-vs__erg p { margin: 0; }
.pe-vs__erg b { color: var(--ink); }
.pe-vs__z { flex: none; }
.pe-vs__z.is-ok { background: var(--gruen-zart); color: var(--gruen); }
.pe-vs__z.is-fehler { background: var(--rot-zart); color: var(--rot); }
.pe-vs__abschnitt { margin-top: 28px; }
.pe-vs__abschnitt h3 { margin: 0 0 8px; font-size: var(--t-14); }
.pe-vs__abschnitt h3 .h-meta { margin-left: 4px; font-weight: 400; }
.pe-vs__abschnitt > p, .pe-vs__abschnitt > p p { max-width: 60ch; margin: 0; line-height: 1.55; }
.pe-vs__summe { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.pe-vs__summe b { font-size: var(--t-26); }
.pe-vs__posten { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linie); }
.pe-vs__posten span { display: block; font-size: var(--t-13); color: var(--ink-2); }
.pe-vs__ulagen { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-top: 4px; }
.pe-ulage { display: grid; gap: 8px; width: 104px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: var(--t-13); line-height: 1.3; text-align: left; cursor: pointer; }
.pe-ulage b { display: block; font-weight: 400; color: var(--ink); overflow-wrap: anywhere; hyphens: auto; }
.pe-ulage.is-neu b { font-weight: 700; }
.pe-ulage .h-blattvorschau { transition: box-shadow var(--t-kurz) var(--aus); }
.pe-ulage:hover .h-blattvorschau { box-shadow: var(--sch-papier), 0 0 0 2px var(--blau-zart-2); }
.pe-ulage--fehlt { cursor: default; }
@media (min-width: 2400px) { .pe { grid-template-columns: var(--w-nav, 260px) minmax(0, 1fr) minmax(420px, 640px); } }
@container fapp (max-width: 1280px) {
  .pe { grid-template-columns: 212px minmax(0, 1fr) 380px; }
  .pe.ohne-vorschau { grid-template-columns: 212px minmax(0, 1fr) 0; }
  .pe-vs { padding: 24px 24px 32px; }
  .pe-liste__kopf { padding: 16px 20px 6px; }
  .pe-rows { padding: 0 10px 24px; }
}
@container fapp (max-width: 1040px) {
  .pe, .pe.ohne-vorschau { grid-template-columns: 0 minmax(0, 1fr) 340px; }
  .pe.ohne-vorschau { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .pe-nav { display: none; }
  .pe-row .h-zeile__titel span { display: none; }
  .pe-navknopf { display: inline-flex; }
  .pe-liste__kopf > .h-kopfzeile { display: none; }
}
@container fapp (max-width: 759px) {
  .pe, .pe.ohne-vorschau { grid-template-columns: minmax(0, 1fr); }
  .pe-nav, .pe-vs { display: none; }
  .pe-liste { grid-column: 1; border-right: 0; }
  .pe-liste__kopf { padding: 12px 14px 4px; }
  .pe-liste__akt .h-knopf > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pe-rows { padding: 0 6px 24px; }
  .pe-row { padding: 14px 10px 14px 6px; }
  .pe-row .h-zeile__titel { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pe-row__az, .pe-row .h-stufe, .pe-row__mk { display: none; }
}
/* Telefon: keine Auswahl-Hinterlegung (ein Tipp öffnet die Akte) – die Trennlinien um die gewählte Zeile bleiben */
.os.is-mobile .pe-row.is-an, .os.is-mobile .pe-row[aria-selected="true"] { background: transparent; }
.os.is-mobile .pe-row.is-an::before, .os.is-mobile .pe-row.is-an + .pe-row::before,
.os.is-mobile .pe-row[aria-selected="true"]::before, .os.is-mobile .pe-row[aria-selected="true"] + .pe-row::before { display: block; }
.os.is-mobile .pe-row:hover::before, .os.is-mobile .pe-row:hover + .pe-row::before { opacity: 1; }

/* ================= Archiv ================= */
.oswin__body.ar-app, .os.is-mobile .oswin__body.ar-app { padding: 0; background: var(--weiss); }
.ar { max-width: 1120px; margin: 0 auto; padding: 22px 20px 40px; }
.ar-kopf { padding: 0 12px 8px; }
.ar-pct { font-size: var(--t-16); color: var(--ink); }
.ar-row .h-zeile__rechts .h-link { font-size: var(--t-13); }

/* ================= Amtsmessenger ================= */
.ms { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; height: 100%; background: var(--weiss); }
.ms-kopf { flex: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.ms-person { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.ms-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ms-person b { font-size: var(--t-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-person .h-meta { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-12); }
.ms-person--frei { cursor: pointer; }
.ms-person--frei .h-av { background: var(--grund-2); color: var(--ink-3); }
.ms-person--frei:hover b { color: var(--blau-text); }
.ms-verlauf { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; outline: none; }
.ms-verlauf:focus-visible { box-shadow: inset 0 0 0 2px var(--fokus, var(--blau)); }
.ms-verlauf > .h-leer { flex: 1; min-height: 0; }
.ms-m { display: flex; }
.ms-m.is-ich { justify-content: flex-end; }
.ms-m.is-folge { margin-top: -4px; }
.ms-m.is-pending { opacity: .6; }
.ms-blase { max-width: 84%; padding: 9px 12px; border-radius: 12px; background: var(--grund-2); font-size: var(--t-14); line-height: 1.45; overflow-wrap: anywhere; }
.ms-m.is-ich .ms-blase { background: var(--blau-zart); }
.ms-blase p { margin: 0; white-space: pre-wrap; }
.ms-blase small { display: block; margin-top: 3px; font-size: var(--t-12); color: var(--ink-3); }
.ms-m.is-ich .ms-blase small { text-align: right; }
.ms-akte { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--weiss); box-shadow: var(--sch-ctl); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ms-akte:hover { box-shadow: var(--sch-ctl), 0 0 0 1px var(--blau-zart-2); }
.ms-akte__ico { flex: none; width: 28px; height: 28px; }
.ms-akte__ico svg { display: block; width: 28px; height: 28px; }
.ms-akte__t { display: flex; flex-direction: column; min-width: 0; font-size: var(--t-13); }
.ms-akte__t b { font-size: var(--t-13); }
.ms-tag { align-self: center; margin: 8px 0 2px; font-size: var(--t-12); font-weight: 700; color: var(--ink-3); }
.ms-sys { align-self: center; margin: 2px 0; font-size: var(--t-12); color: var(--ink-3); text-align: center; }
.ms-eingabe { flex: none; display: flex; align-items: center; gap: 4px; padding: 12px; border-top: 1px solid var(--linie); }
.ms-in { flex: 1; min-width: 0; height: 38px; }
.ms-senden { flex: none; margin-left: 4px; }

/* Bewegung aus */
@media (prefers-reduced-motion: reduce) { .pe-row.is-new, .pe-row.is-bump, .pe-lauf.is-bump, .pe-stempel.is-hit { animation: none; } }
html.no-motion .pe-row.is-new, html.no-motion .pe-row.is-bump, html.no-motion .pe-stempel.is-hit { animation: none; }

