@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/commissioner-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/commissioner-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/commissioner-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/commissioner-cyrillic-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }

:root {
  --papier: #F4F6F2;
  --flaeche: #FFFFFF;
  --flaeche-2: #EBEEE8;
  --linie: #D6DBD2;
  --tinte: #1B2230;
  --leise: #5B6472;
  --korr: #2E4BA0;
  --korr-hell: #E3E9F8;
  --rech: #1F7A64;
  --rech-hell: #DDF0E9;
  --frist: #B23A22;
  --blatt: #FFFFFF;
  --blatt-rand: #CFD5CB;
  --schatten: 0 1px 2px rgba(27, 34, 48, .06), 0 8px 24px rgba(27, 34, 48, .07);
  --akzent: var(--korr);
  --akzent-hell: var(--korr-hell);
  --r: 10px;
  --schrift: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --papier: #14171C; --flaeche: #1B1F26; --flaeche-2: #232833; --linie: #2E3440;
    --tinte: #E5E8ED; --leise: #9AA3B2; --korr: #93A9F2; --korr-hell: #232C45;
    --rech: #5FC4A6; --rech-hell: #1B332D; --frist: #F08A70; --blatt: #20252D; --blatt-rand: #3A414D;
    --schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dunkel"] {
  --papier: #14171C; --flaeche: #1B1F26; --flaeche-2: #232833; --linie: #2E3440;
  --tinte: #E5E8ED; --leise: #9AA3B2; --korr: #93A9F2; --korr-hell: #232C45;
  --rech: #5FC4A6; --rech-hell: #1B332D; --frist: #F08A70; --blatt: #20252D; --blatt-rand: #3A414D;
  --schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
.typ-recherche { --akzent: var(--rech); --akzent-hell: var(--rech-hell); }
.typ-korrespondenz { --akzent: var(--korr); --akzent-hell: var(--korr-hell); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 16px/1.55 var(--schrift); -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type=range], input[type=checkbox] { accent-color: var(--akzent); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
a { color: var(--akzent); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Grundgerüst ---------- */
#app { height: 100%; }
.rahmen { display: grid; grid-template-columns: 300px 1fr; height: 100dvh; }
.seite { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--flaeche);
  border-right: 1px solid var(--linie); }
.haupt { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100dvh; }
@media (max-width: 760px) {
  .rahmen { grid-template-columns: 1fr; }
  .rahmen.zeigt-chat .seite, .rahmen:not(.zeigt-chat) .haupt { display: none; }
  .seite { border-right: 0; height: 100dvh; }
}

/* ---------- Seitenleiste ---------- */
.seite-kopf { padding: calc(14px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 10px; }
.marke { font-weight: 700; font-size: 19px; letter-spacing: -.01em; flex: 1; }
.marke small { display: block; font-weight: 450; font-size: 13px; color: var(--leise); letter-spacing: 0; }
.knopf-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px;
  background: transparent; border: 0; color: var(--leise); }
.knopf-icon:hover { background: var(--flaeche-2); color: var(--tinte); }
.neu-leiste { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 16px 12px; }
.neu-knopf { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-align: left; }
.neu-knopf span { font-weight: 450; font-size: 12.5px; color: var(--leise); line-height: 1.3; }
.neu-knopf.korr { background: var(--korr-hell); color: var(--korr); }
.neu-knopf.rech { background: var(--rech-hell); color: var(--rech); }
.neu-knopf:hover { border-color: currentColor; }
.suche { margin: 0 16px 8px; position: relative; }
.suche input { width: 100%; padding: 9px 12px 9px 36px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--papier); }
.suche svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--leise); width: 18px; height: 18px; }
.liste { flex: 1; overflow-y: auto; padding: 4px 8px calc(16px + env(safe-area-inset-bottom)); }
.gruppe { margin-top: 6px; }
.gruppe-kopf { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px; border: 0; background: none;
  color: var(--leise); font-size: 13.5px; font-weight: 600; text-align: left; border-radius: 8px; }
.gruppe-kopf:hover { background: var(--flaeche-2); }
.gruppe-kopf .zahl { margin-left: auto; font-weight: 500; font-size: 12.5px; }
.gruppe-kopf svg { width: 16px; height: 16px; transition: transform .15s; }
.gruppe.zu .gruppe-kopf svg.pfeil { transform: rotate(-90deg); }
.gruppe.zu .eintraege { display: none; }
.eintrag { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  text-align: left; border-radius: 9px; min-height: 42px; }
.eintrag:hover { background: var(--flaeche-2); }
.eintrag.aktiv { background: var(--akzent-hell); }
.eintrag .punkt { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  color: var(--akzent); background: var(--akzent-hell); flex: none; }
.eintrag .punkt svg { width: 14px; height: 14px; }
.eintrag .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.eintrag .vorschlag-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--frist); flex: none; }
.leer-hinweis { color: var(--leise); font-size: 14px; padding: 16px 10px; }

/* ---------- Chatkopf ---------- */
.kopf { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  border-bottom: 1px solid var(--linie); background: var(--flaeche); min-height: 56px; }
.kopf .zurueck { display: none; }
.werkzeuge { display: flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .kopf { flex-wrap: wrap; row-gap: 4px; }
  .kopf .zurueck { display: inline-grid; }
  .kopf .werkzeuge { order: 5; flex-basis: 100%; padding: 2px 0 2px 4px; }
  .kopf .werkzeuge select { flex: 1; max-width: none; }
}
.kopf-titel { flex: 1; min-width: 0; }
.kopf-titel button { background: none; border: 0; padding: 0; text-align: left; font-weight: 650; font-size: 16px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.kopf-titel .unter { font-size: 13px; color: var(--leise); display: flex; gap: 8px; align-items: center; }
.typ-marke { display: inline-flex; align-items: center; gap: 4px; color: var(--akzent); font-weight: 600; }
.typ-marke svg { width: 14px; height: 14px; }
.kopf select { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 6px 8px; font-size: 14px; max-width: 42vw; }
.sprachwahl { display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.sprachwahl button { border: 0; background: none; padding: 6px 9px; font-size: 13px; font-weight: 600; color: var(--leise); }
.sprachwahl button.an { background: var(--akzent); color: #fff; }
:root[data-theme="dunkel"] .sprachwahl button.an { color: #10141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .sprachwahl button.an { color: #10141A; } }

.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 16px 0; padding: 10px 14px;
  border-radius: var(--r); background: var(--akzent-hell); font-size: 14.5px; }
.banner .text { flex: 1; min-width: 160px; }
.banner-knoepfe { display: flex; gap: 6px; margin-left: auto; }
.banner button { border: 0; border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 14px; }
.banner .ja { background: var(--akzent); color: #fff; }
.banner .nein { background: transparent; color: var(--leise); }

/* ---------- Verlauf ---------- */
.verlauf { flex: 1; overflow-y: auto; padding: 20px 16px 8px; overscroll-behavior: contain; }
.spalte { max-width: 760px; margin: 0 auto; }
.nachricht { margin: 0 0 22px; }
.nachricht.user { display: flex; flex-direction: column; align-items: flex-end; }
.blase { background: var(--akzent-hell); padding: 10px 14px; border-radius: 16px 16px 4px 16px; max-width: 88%;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.anh-reihe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 6px; }
.anh-bild { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche-2); }
.anh-pdf { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--linie); background: var(--flaeche); font-size: 13.5px; max-width: 220px; }
.anh-pdf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.antwort { overflow-wrap: anywhere; }
.antwort > :first-child { margin-top: 0; }
.antwort p { margin: 0 0 .75em; }
.antwort ul, .antwort ol { padding-left: 1.3em; margin: 0 0 .75em; }
.antwort li { margin: .2em 0; }
.antwort h1, .antwort h2, .antwort h3 { font-size: 1.05em; margin: 1.1em 0 .4em; }
.antwort strong { font-weight: 650; }
.typ-korrespondenz .antwort strong { color: var(--frist); }
.antwort code { background: var(--flaeche-2); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.antwort pre { background: var(--flaeche-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
.antwort table { border-collapse: collapse; display: block; overflow-x: auto; margin: 0 0 .75em; font-size: 14.5px; }
.antwort th, .antwort td { border: 1px solid var(--linie); padding: 6px 9px; text-align: left; }
.antwort blockquote { margin: 0 0 .75em; padding-left: 12px; border-left: 3px solid var(--linie); color: var(--leise); }
.status { color: var(--leise); font-size: 14px; display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.status .lupe { animation: puls 1.2s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .35; } }
.tipp { display: inline-block; width: 8px; height: 16px; background: var(--akzent); vertical-align: -2px; border-radius: 2px; animation: puls 1s infinite; }
.fehler-box { color: var(--frist); background: color-mix(in srgb, var(--frist) 10%, transparent); padding: 10px 12px; border-radius: 8px; font-size: 14.5px; }

.aktionen { display: flex; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.aktion { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 9px;
  border-radius: 8px; color: var(--leise); font-size: 13.5px; }
.aktion:hover { background: var(--flaeche-2); color: var(--tinte); }
.aktion svg { width: 17px; height: 17px; }
.aktion.an { color: var(--akzent); }

.quellen { margin-top: 8px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); }
.quellen summary { cursor: pointer; padding: 9px 12px; font-size: 14px; color: var(--leise); font-weight: 550; }
.quellen ol { margin: 0; padding: 0 12px 10px 32px; font-size: 14px; }
.quellen li { margin: 6px 0; }
.quellen .zeile { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.quellen .qt { flex: 1; min-width: 160px; }
.quellen .qd { color: var(--leise); font-size: 12.5px; }
.klein-knopf { white-space: nowrap; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 7px; padding: 3px 8px; font-size: 12.5px; }

/* ---------- Briefblatt (das eine besondere Element) ---------- */
.blatt-karte { margin: 14px 0 16px; background: var(--blatt); border: 1px solid var(--blatt-rand); border-radius: 4px;
  box-shadow: var(--schatten); position: relative; overflow: hidden; }
.blatt-karte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--korr); }
.blatt-karte::after { content: ""; position: absolute; right: 0; top: 0; width: 26px; height: 26px;
  background: linear-gradient(225deg, var(--papier) 50%, var(--blatt-rand) 50%, var(--flaeche-2) 60%); }
.blatt-kopf { padding: 14px 40px 0 22px; font-size: 13.5px; color: var(--leise); display: grid; gap: 2px; }
.blatt-kopf .art { font-weight: 650; color: var(--korr); display: flex; align-items: center; gap: 6px; }
.blatt-kopf .art svg { width: 15px; height: 15px; }
.blatt-betreff { padding: 10px 22px 0; font-weight: 700; }
.blatt-text { padding: 10px 22px 16px; white-space: pre-wrap; font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.blatt-leiste { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; border-top: 1px dashed var(--blatt-rand); }
.blatt-leiste .aktion { color: var(--tinte); }
.blatt-leiste .aktion.haupt-aktion { background: var(--korr); color: #fff; }
:root[data-theme="dunkel"] .blatt-leiste .aktion.haupt-aktion { color: #10141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .blatt-leiste .aktion.haupt-aktion { color: #10141A; } }

/* ---------- Leerer Chat ---------- */
.leer { max-width: 480px; margin: 12vh auto 0; text-align: center; padding: 0 12px; }
.leer .symbol { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px;
  background: var(--akzent-hell); color: var(--akzent); }
.leer .symbol svg { width: 30px; height: 30px; }
.leer h2 { margin: 0 0 6px; font-size: 20px; }
.leer p { margin: 0; color: var(--leise); }

/* ---------- Eingabe ---------- */
.eingabe { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--papier); }
.eingabe-box { max-width: 760px; margin: 0 auto; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 18px; padding: 8px; box-shadow: var(--schatten); }
.eingabe-box:focus-within { border-color: var(--akzent); }
.vorschau { display: flex; gap: 8px; flex-wrap: wrap; padding: 2px 4px 8px; }
.vorschau .stueck { position: relative; }
.vorschau .stueck img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.vorschau .stueck .anh-pdf { height: 64px; }
.vorschau .weg { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: var(--tinte); color: var(--papier); display: grid; place-items: center; padding: 0; }
.vorschau .weg svg { width: 13px; height: 13px; stroke-width: 2.4; }
.vorschau .laedt { opacity: .5; }
.eingabe textarea { width: 100%; border: 0; background: none; resize: none; padding: 6px 8px; outline: none;
  max-height: 40vh; min-height: 28px; line-height: 1.45; font-size: 16px; }
.eingabe-leiste { display: flex; align-items: center; gap: 2px; }
.eingabe-leiste .platz { flex: 1; }
.senden { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--akzent); color: #fff; display: grid; place-items: center; }
.senden:disabled { opacity: .35; cursor: default; }
:root[data-theme="dunkel"] .senden { color: #10141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .senden { color: #10141A; } }
.knopf-icon.aufnahme { color: #fff; background: var(--frist); animation: puls 1.2s infinite; }

/* ---------- Ebenen: Dialoge, Leseansicht, Einstellungen ---------- */
.ebene { position: fixed; inset: 0; z-index: 50; background: rgba(15, 18, 24, .45); display: flex; justify-content: center; align-items: flex-end; }
@media (min-width: 761px) { .ebene { align-items: center; padding: 24px; } }
.dialog { background: var(--flaeche); width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column;
  border-radius: 18px 18px 0 0; box-shadow: var(--schatten); }
@media (min-width: 761px) { .dialog { border-radius: 16px; } }
.dialog-kopf { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 18px; }
.dialog-kopf h2 { margin: 0; font-size: 17px; flex: 1; }
.dialog-inhalt { padding: 4px 18px 18px; overflow-y: auto; }
.dialog-fuss { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); display: flex; gap: 8px; justify-content: flex-end; }
.feld { display: block; margin: 0 0 12px; }
.feld > span { display: block; font-size: 13.5px; color: var(--leise); margin-bottom: 4px; font-weight: 550; }
.feld input, .feld textarea, .feld select { width: 100%; border: 1px solid var(--linie); border-radius: 9px; padding: 9px 11px; background: var(--papier); font-size: 16px; }
.feld textarea { min-height: 200px; resize: vertical; line-height: 1.5; }
.hinweis { font-size: 13.5px; color: var(--leise); margin: -4px 0 12px; }
.knopf { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px; padding: 9px 15px; font-weight: 600; font-size: 15px; }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
:root[data-theme="dunkel"] .knopf.primaer { color: #10141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .knopf.primaer { color: #10141A; } }
.knopf.gefahr { color: var(--frist); }
.knopf:disabled { opacity: .5; }
.haken { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 15px; }
.meldung { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  background: var(--tinte); color: var(--papier); padding: 10px 16px; border-radius: 10px; font-size: 14.5px; max-width: 90vw; }

.lesen { position: fixed; inset: 0; z-index: 60; background: var(--papier); display: flex; flex-direction: column; }
.lesen .kopf .quelle { font-size: 13px; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesen-inhalt { flex: 1; overflow-y: auto; padding: 24px 18px calc(40px + env(safe-area-inset-bottom)); }
.artikel { max-width: 680px; margin: 0 auto; font-size: 17.5px; line-height: 1.7; }
.artikel h1.lesetitel { font-size: 27px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
.artikel .meta { color: var(--leise); font-size: 14px; margin-bottom: 22px; }
.artikel table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.artikel td, .artikel th { border: 1px solid var(--linie); padding: 5px 8px; }

.einst { flex: 1; overflow-y: auto; padding: 8px 16px calc(40px + env(safe-area-inset-bottom)); }
.einst .spalte { max-width: 640px; }
.abschnitt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; margin: 14px 0; }
.abschnitt h3 { margin: 0 0 12px; font-size: 16px; }
.segmente { display: inline-flex; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.segmente button { border: 0; background: none; padding: 8px 14px; font-weight: 550; font-size: 14.5px; }
.segmente button.an { background: var(--akzent); color: #fff; }
:root[data-theme="dunkel"] .segmente button.an { color: #10141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .segmente button.an { color: #10141A; } }
.zeilen-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
.zeilen-liste .z { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.zeilen-liste .z .inhalt { flex: 1; min-width: 0; }
.zeilen-liste .z .inhalt div:first-child { font-weight: 600; }
.zeilen-liste .z .inhalt div + div { font-size: 13.5px; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .raster-2 { grid-template-columns: 1fr; } }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.anmeldung form { width: 100%; max-width: 360px; }
.anmeldung .symbol { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px; }
.anmeldung h1 { font-size: 26px; margin: 0 0 4px; }
.anmeldung p { color: var(--leise); margin: 0 0 22px; }
.anmeldung .knopf { width: 100%; padding: 12px; margin-top: 6px; }

/* ---------- Druck: DIN 5008 Form B ---------- */
#druck { position: fixed; inset: 0; z-index: 80; background: #6b7280; overflow: auto; }
#druck .druck-leiste { position: sticky; top: 0; display: flex; gap: 8px; justify-content: center; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: #374151; z-index: 2; }
#druck .druck-hinweis { color: #fff; text-align: center; margin: 10px 16px 0; font-size: 14px; }
#druck .druck-leiste .knopf { background: #fff; color: #111; border: 0; }
#druck .druck-leiste .knopf.primaer { background: #2E4BA0; color: #fff; }
.a4-rahmen { padding: 20px 0 40px; display: flex; justify-content: center; }
.a4 { width: 210mm; min-height: 297mm; background: #fff; color: #000; font: 11pt/1.45 Arial, "Helvetica Neue", Helvetica, sans-serif;
  padding: 0 20mm 20mm 25mm; position: relative; box-shadow: 0 4px 30px rgba(0,0,0,.35); transform-origin: top center; }
.a4 .briefkopf { height: 45mm; padding-top: 12mm; text-align: right; font-size: 10pt; line-height: 1.35; }
.a4 .briefkopf b { font-size: 12pt; }
.a4 .anschriftfeld { height: 45mm; width: 85mm; position: relative; }
.a4 .ruecksende { font-size: 7pt; height: 12.7mm; padding-top: 7mm; white-space: nowrap; overflow: hidden; }
.a4 .empfaenger { font-size: 11pt; line-height: 1.3; white-space: pre-line; }
.a4 .infoblock { position: absolute; left: 125mm; top: 50mm; width: 65mm; font-size: 10pt; }
.a4 .betreff { margin-top: 8.46mm; font-weight: bold; }
.a4 .rumpf { margin-top: 8mm; white-space: pre-wrap; }
.a4 .falz { position: absolute; left: 5mm; width: 4mm; border-top: 0.2mm solid #999; }
.a4 .f1 { top: 105mm; } .a4 .f2 { top: 210mm; } .a4 .loch { top: 148.5mm; left: 4mm; width: 6mm; }
@media screen and (max-width: 800px) { .a4 { zoom: .5; } }
@media screen and (max-width: 440px) { .a4 { zoom: .44; } }

@media print {
  @page { size: A4; margin: 20mm 0 20mm 0; }
  @page :first { margin: 0 0 20mm 0; }
  html, body { background: #fff !important; height: auto; }
  body > *:not(#druck) { display: none !important; }
  #druck { position: static; background: #fff; overflow: visible; }
  #druck .druck-leiste, #druck .druck-hinweis { display: none; }
  .a4-rahmen { padding: 0; display: block; }
  .a4 { box-shadow: none; zoom: 1; min-height: 0; width: auto; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
