/* =========================================================================
   Clubkern - Oberfläche
   Basis ist das Designsystem des Portalkerns (Papier, Haarlinien, Tabellen-
   ziffern). Die Vereinsfarben setzt brand_style_tag() (lib/brand.php) aus den
   Einstellungen; die Werte hier sind nur die Rückfallfarben.
   ========================================================================= */

:root {
    /* Schriftstufen (#336): klein · normal · mittel · Zwischenüberschrift · Grundgröße · Überschriften.
       Feste Werte nur für die Grundschrift (body, Druck), SVG-Beschriftungen und relative em-Angaben. */
    --fs-xs: .78rem;
    --fs-sm: .85rem;
    --fs-md: .92rem;
    --fs-lg: 1.1rem;
    --fs-base: 1rem;
    --fs-xl: 1.35rem;
    --fs-2xl: 1.6rem;
    --fs-3xl: 1.9rem;
    --paper:         #f2f3f1;
    --surface:       #ffffff;
    --surface-2:     #f7f8f6;
    --line:          #e1e4e0;
    --line-strong:   #c9cec9;
    --field-line:    #767b76;   /* Rand von Feldern: mind. 3:1 gegen den Hintergrund (WCAG 1.4.11) */
    --ink:           #181b1d;
    --ink-2:         #3d4347;
    --muted:         #5f686e;
    --muted-2:       #626c72;

    --accent:        #8a6100;
    --accent-strong: #6b4b00;
    --accent-ink:    #ffffff;
    --accent-soft:   #f7efdc;
    --accent-line:   #e6d3a3;
    --brand:         #cc9714;
    --primary:       #22262a;
    --primary-strong:#0f1113;
    --primary-ink:   #ffffff;
    --info:          #1d5f8a;
    --info-soft:     #e3eef6;

    --ok:            #1e7a4b;
    --ok-soft:       #e3f2e9;
    --warn:          #925307;
    --warn-soft:     #fbeed8;
    --danger:        #b3261e;
    --badge-bg:      #b3261e;
    --danger-soft:   #fbe7e5;

    /* Aliase für ältere Inline-Stile */
    --bg:            var(--paper);
    --bg-deep:       #e9ebe8;

    --shadow-float:  0 12px 32px -12px rgba(24, 27, 29, .28), 0 2px 6px rgba(24, 27, 29, .08);

    --r-ctl:  6px;
    --r-card: 10px;
    --r-dlg:  14px;
    --r-sm:   var(--r-ctl);
    --r:      var(--r-card);
    --r-lg:   var(--r-dlg);

    --side-w: 240px;
    --font:         "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-small:   "Segoe UI Variable Small", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono:         "Cascadia Mono", Consolas, "SFMono-Regular", "Liberation Mono", monospace;

    --t: 150ms ease;
}

html[data-theme="dark"] {
    --paper:         #141617;
    --surface:       #1c1f21;
    --surface-2:     #232628;
    --line:          #2c3033;
    --line-strong:   #3c4145;
    --field-line:    #7b8187;
    --ink:           #e7e9e6;
    --ink-2:         #c3c8c6;
    --muted:         #8f979b;
    --muted-2:       #929ca2;

    --accent:        #e2b44d;
    --accent-strong: #f0c969;
    --accent-ink:    #17140c;
    --accent-soft:   #2e2614;
    --accent-line:   #5a4a22;
    --brand:         #cc9714;
    --primary:       #e2b44d;
    --primary-strong:#f0c969;
    --primary-ink:   #17140c;
    --info:          #7fb8df;
    --info-soft:     #16293a;

    --ok:            #57c283;
    --ok-soft:       #15301f;
    --warn:          #e0a44a;
    --warn-soft:     #33260f;
    --danger:        #f08a80;
    --danger-soft:   #3a1c19;

    --bg-deep:       #0f1112;
    --shadow-float:  0 16px 40px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { scroll-padding-top: 4.5rem; scroll-padding-bottom: 5rem; }   /* feste Kopf- und Speicherleiste verdecken den Fokus nicht (WCAG 2.4.11) */
summary { cursor: pointer; min-height: 24px; }   /* Aufklapper mindestens 24 px hoch (WCAG 2.5.8) */
html { background: var(--paper); color-scheme: light; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }   /* kein grauer Tipp-Blitz (Rückmeldung über :active unten), keine Schriftvergrößerung im Querformat */
/* Touch: Klick ohne Doppeltipp-Wartezeit; Bedienelemente ohne Textauswahl und Kontextblase beim langen Drücken */
button, a, summary, label, select, [role="button"], input:is([type=checkbox], [type=radio], [type=range]) { touch-action: manipulation; }
.btn, .icon-btn, .nav-item, .tab, .seg a, .pager a, .side-close, summary, button { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
html[data-theme="dark"] { color-scheme: dark; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration: underline; text-underline-offset: 2px; } }

h1, h2, h3, h4 {
    overflow-wrap: anywhere;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.012em;
    line-height: 1.25;
    color: var(--ink);
}
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-base); }
h4 { font-size: var(--fs-md); }
p  { margin: 0 0 .8em; }

/* Seitenüberschrift innerhalb des Inhalts */
.page-h { font-size: var(--fs-2xl); letter-spacing: -.02em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-ctl);
}

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--accent); color: var(--accent-ink);
    padding: .6rem 1rem; border-radius: 0 0 var(--r-ctl) 0;
}
.skip:focus { left: 0; }

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

/* ------------------------------------------------------------------ Layout */

.shell { display: flex; min-height: 100%; }

.side {
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    background: var(--paper);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;   /* sichtbare Höhe; 100vh ragt auf dem Smartphone hinter die Adressleiste */
    padding-left: env(safe-area-inset-left, 0px);
    z-index: 60;
}

.side-top { display: flex; align-items: center; gap: .5rem; padding: 1.1rem 1rem .6rem; }

.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); flex: 1; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .brand:hover { text-decoration: none; } }
.brand-mark {
    width: 30px; height: 30px; flex: none;
    display: grid; place-items: center;
    border-radius: 7px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 700; font-size: var(--fs-md);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: var(--fs-md); letter-spacing: -.01em; }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); }

.side-close { display: none; }

.nav { display: flex; flex-direction: column; gap: 1px; padding: .5rem .6rem; overflow-y: auto; }
.nav-sub { padding-top: .6rem; }
/* Schatten zeigt, dass das Menü weiter scrollt (Klassen setzt initSideScroll) */
.nav.can-down { box-shadow: inset 0 -14px 10px -12px rgba(24, 27, 29, .35); }
.nav.can-up { box-shadow: inset 0 14px 10px -12px rgba(24, 27, 29, .35); }
.nav.can-up.can-down { box-shadow: inset 0 14px 10px -12px rgba(24, 27, 29, .35), inset 0 -14px 10px -12px rgba(24, 27, 29, .35); }
/* Verlauf am unteren Rand (QA 29.10. ux-15, #859): Auf dem Smartphone liegen ganze Gruppen unter dem Falz, der Schatten allein fiel nicht auf.
   Das Pseudoelement klebt am unteren Rand des sichtbaren Bereichs (über den Innenabstand der Liste hinweg) und nimmt keinen Platz ein. */
.nav.can-down::after {
    content: ""; flex: none; position: sticky; bottom: -.5rem;
    height: 2.5rem; margin-top: -2.5rem;
    background: linear-gradient(to bottom, transparent, var(--side-bg, var(--paper)));
    pointer-events: none;
}

.nav-item {
    display: flex; align-items: center; gap: .6rem;
    min-height: 36px;
    padding: .4rem .65rem;
    border-radius: var(--r-ctl);
    color: var(--ink-2);
    font-size: var(--fs-md);
    font-weight: 500;
    transition: background var(--t), color var(--t);
}
.nav-item { position: relative; }
@media (hover: hover) and (pointer: fine) { .nav-item:hover { background: var(--surface); color: var(--ink); text-decoration: none; } }
/* Aktiver Punkt als Pille (Cloudflare-Stil) */
.nav-item.is-active { background: var(--nav-active); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.nav-item.is-active .i { color: var(--accent); }
:root { --nav-active: #ffffff; --nav-ease: cubic-bezier(.2, .8, .2, 1); }
html[data-theme="dark"] { --nav-active: #272b2e; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --nav-active: #272b2e; } }
.nav-item .i { flex: none; opacity: .8; }
.nav-item.is-active .i { opacity: 1; }

.side-foot { margin-top: auto; flex: none; border-top: 1px solid var(--line); padding-bottom: .4rem; }
.side-account { position: relative; }
.side-account > summary {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    color: var(--muted); cursor: pointer; list-style: none;
}
.side-account > summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .side-account > summary:hover { background: var(--surface); color: var(--ink); } }
.side-account > summary > .i { transition: transform var(--t); }
.side-account[open] > summary > .i { transform: rotate(180deg); }
.side-account-panel {
    position: absolute; bottom: calc(100% + 6px); left: 8px; z-index: 2;
    width: 236px; max-width: calc(100vw - 32px); max-height: min(70dvh, 440px); overflow-y: auto;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 4px 0;
}
.side-account:not([open]) > .side-account-panel { display: none; }
/* Beschriftungen bleiben auch in der schmalen Symbolleiste lesbar. */
html.nav-mini .side-account-panel .nav-item { justify-content: flex-start; padding: .4rem .65rem; }
html.nav-mini .side-account-panel .nav-item > span, html.nav-mini .side-account-panel .whoami span,
html.nav-mini .side-account-panel .version { display: block; }
html.nav-mini .side-account-panel .whoami { justify-content: flex-start; padding: .5rem 1.25rem .6rem; }
@media (prefers-reduced-motion: reduce) { .side-account > summary > .i { transition: none; } }

.whoami {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem 1.25rem .6rem; color: var(--muted); font-size: var(--fs-sm);
}
.whoami span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-backdrop {
    position: fixed; inset: 0; background: rgba(24, 27, 29, .45);
    z-index: 55;
}

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-right: env(safe-area-inset-right, 0px); }   /* Querformat mit Kamera-Aussparung (viewport-fit=cover) */

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: .75rem;
    min-height: 58px;
    padding: .5rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar-title {
    font-family: var(--font-display);
    font-size: var(--fs-lg); font-weight: 600; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: .6rem; }

.icon-btn.nav-toggle { display: none; }   /* nur auf kleinen Bildschirmen, siehe unten */

.main { padding: 1.5rem; max-width: 1920px; width: 100%; }


/* ------------------------------------------------------------- Bausteine */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}
.card + .card { margin-top: 1rem; }
/* In Rastern und Stapeln regelt gap den Abstand – sonst sitzen Karten versetzt */
.grid > .card + .card, .grid-side > .card + .card, .stack > .card + .card { margin-top: 0; }
.card-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .9rem 1.15rem .6rem;
}
/* Titel nie abschneiden: lieber rutschen Chips und Knöpfe in die nächste Zeile */
.card-head h2, .card-head h3 { flex: 1 1 auto; min-width: min(100%, max-content); }
.card-head .i { color: var(--accent); }
.card-body { padding: .5rem 1.15rem 1.15rem; }
.card > .card-body:first-of-type { padding-top: 1.15rem; }   /* ohne Kopfzeile davor */
.card > .card-head + .card-body { padding-top: .35rem; }
.card-body.tight { padding: .35rem 1.15rem 1rem; }
.card > .table-wrap { border-top: 1px solid var(--line); }
.card > .card-body + .table-wrap { border-top: 0; }

/* Kleine Überschrift über einer Gruppe - Satzschreibung, keine Versalien */
.eyebrow {
    font-family: var(--font-small);
    font-size: var(--fs-sm); color: var(--muted); font-weight: 500;
    margin: 0 0 .1rem;
}

.grid { display: grid; gap: 1rem; }
.grid.grid-top { align-items: start; }
.pre-line { white-space: pre-line; }
/* Rasterkinder dürfen unter ihre Inhaltsbreite schrumpfen; Tabellen scrollen im eigenen Bereich. */
.grid > *, .grid-side > *, .form-grid > *, .filters > * { min-width: 0; }
/* Höchstens zwei bzw. drei Spalten, damit Karten auf breiten Bildschirmen nicht schmal gequetscht werden;
   min(100%, …) verhindert Überlauf auf sehr schmalen Handys. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(320px, calc(50% - .5rem))), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(250px, calc(33.333% - .67rem))), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(200px, calc(25% - .75rem))), 1fr)); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-end { margin-left: auto; }
.spacer { flex: 1; }

/* Kennzahlen: eine flache Reihe, getrennt durch Haarlinien. Umbrechende
   Zeilen bekommen ihre Trennlinie ueber den negativen Rand, der Rahmen
   schneidet die ueberstehenden Linien ab. Raster statt Flex, damit eine
   einzelne Kachel in der letzten Reihe nicht die ganze Breite einnimmt (#527 ui-4). */
.grid-4:has(> .stat) {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
}
.stat {
    padding: .9rem 1.15rem;
    display: flex; flex-direction: column; gap: .1rem;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin: -1px 0 0 -1px;
    min-width: 0;
}
.stat-label { font-family: var(--font-small); font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
/* Beschriftung, Zahl und Hinweis liegen je Kachelreihe auf einer Linie, auch wenn eine Beschriftung zweizeilig umbricht */
@supports (grid-template-rows: subgrid) {
    .grid-4:has(> .stat) > .stat { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: .1rem; align-content: start; }
    .grid-4:has(> .stat) > .stat > .stat-label { align-self: start; }
    .grid-4:has(> .stat) > .stat > .stat-value { align-self: end; }
}
.stat-value {
    font-family: var(--font-display);
    font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.03em; line-height: 1.1;
    margin-top: .1rem; white-space: nowrap; overflow: hidden;   /* zu lange Zahlen verkleinert portal.js (fitStatValues) */   /* „452 / 145“ bricht nicht um */
}
.stat-hint { font-family: var(--font-small); font-size: var(--fs-xs); color: var(--muted); margin-top: .15rem; }
.stat-accent { color: var(--accent); }
.stat-ok { color: var(--ok); }
.stat-danger { color: var(--danger); }

.trend { font-size: var(--fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }

/* Mitglieder-Saldo: Minus rot, Guthaben grün, 0 neutral */
.saldo-neg { color: var(--danger); font-weight: 600; }
.saldo-pos { color: var(--ok); font-weight: 600; }
.col-picker .check { margin: .15rem 0; }
.col-picker > summary { cursor: pointer; font-size: var(--fs-sm); }

/* Drag-&-Drop-Ablagefläche für Datei-Uploads */
.dropzone { display: block; box-sizing: border-box; max-width: 100%; min-width: 0; border: 1px dashed var(--line); border-radius: 8px; padding: .6rem .8rem; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone input[type=file] { display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }   /* natives Dateifeld hat sonst eine Mindestbreite, Seite scrollt bei 320 px (#546 a11y-1) */
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; }
.dropzone-hint { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: .35rem; }
.dropzone-msg { display: block; font-size: var(--fs-sm); color: var(--warn); margin-top: .2rem; }
.dropzone-msg:empty { display: none; }
.dropzone-files { display: block; font-size: var(--fs-sm); color: var(--ink-2); margin-top: .2rem; word-break: break-all; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 36px;
    padding: .4rem .9rem;
    border-radius: var(--r-ctl);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font: inherit; font-size: var(--fs-sm); font-weight: 500;
    cursor: pointer;
    transition: background var(--t), border-color var(--t), color var(--t);
    text-decoration: none;
    white-space: nowrap;
    max-width: 100%;
}
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--surface-2); border-color: var(--muted-2); text-decoration: none; } }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); } }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .btn-danger:hover { background: var(--danger); color: #fff; } }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; } }
.btn-sm { min-height: 30px; padding: .25rem .65rem; font-size: var(--fs-sm); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .i { width: 16px; height: 16px; }

.icon-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: var(--r-ctl); border: 1px solid transparent;
    background: transparent; color: var(--muted); cursor: pointer;
    transition: background var(--t), color var(--t);
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface-2); color: var(--ink); } }
/* Dunkelmodus-Umschalter (#858): Mond im hellen, Sonne im dunklen Modus */
.theme-toggle > span { display: grid; place-items: center; }
.theme-toggle .theme-icon-light, html[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-light { display: grid; }

.i { width: 18px; height: 18px; }

/* Chips / Tags */
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .5rem; border-radius: 5px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-family: var(--font-small);
    font-size: var(--fs-xs); color: var(--ink-2); font-weight: 500;
    white-space: nowrap; line-height: 1.5;
}
.chip .i { width: 14px; height: 14px; }
.chip-quarter { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.chip-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.chip-strong { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

.tag {
    display: inline-block; padding: .05rem .45rem; border-radius: 4px;
    background: var(--accent-soft); color: var(--accent);
    font-family: var(--font-small); font-size: var(--fs-xs); font-weight: 500;
}

/* Formulare */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field > label, .lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field > label.check { font-weight: 400; color: inherit; }   /* Kästchen im Feldrahmen (Meldung und Hinweis darunter) */
/* Im mehrspaltigen Feldraster steht das Kästchen auf Höhe der Eingabefelder daneben, nicht ihrer Beschriftungen (#856 ui-7):
   Abstand = Beschriftungszeile (--fs-sm × 1,5) + Feldabstand, Höhe = Eingabefeld (38 px) */
@media (min-width: 641px) {
    .form-grid > .field > label.check:first-child { padding-top: calc(var(--fs-sm) * 1.5 + .3rem); min-height: calc(var(--fs-sm) * 1.5 + .3rem + 38px); align-items: center; }
    .form-grid > .field > label.check:first-child input { margin-top: 0; }
}
.field .hint { font-family: var(--font-small); font-size: var(--fs-xs); color: var(--muted); }
.main > .sub-banner, .sub-banner + section, .sub-banner + .mb { margin-bottom: 1rem; }   /* Abstand zur ersten Sektion (#562 ui-6) */
.sub-banner-compact { padding-top: .35rem; padding-bottom: .35rem; }
.sub-banner-compact > summary { cursor: pointer; }
.quick-contact { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; }
.show-if-cell { display: contents; }
.show-if-cell[hidden], [data-visible-for][hidden] { display: none; }
form[data-autosave] [hidden] { display: none; }   /* Sofort speichern (#677): ausgeblendeter Speichern-Knopf samt Zeile, trotz display: flex der .field */
.field .field-error { font-size: var(--fs-sm); font-weight: 600; color: var(--danger); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.toast-err a { color: inherit; text-decoration: underline; }
.toast-err .error-list { margin: .35rem 0 0; padding-left: 1.2rem; }

input:not([type]), input[type=text], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], input[type=url], input[type=email], input[type=tel],
input[type=datetime-local], input[type=month], input[type=week],
select, textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 38px;
    padding: .45rem .65rem;
    font: inherit; font-size: var(--fs-md);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--field-line);
    border-radius: var(--r-ctl);
    transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
/* Gesperrte Felder (z. B. geprüfte Eingangsrechnung) sichtbar als nicht bearbeitbar */
input:disabled, select:disabled, textarea:disabled { color: var(--muted); background: var(--surface-2); border-style: dashed; cursor: not-allowed; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
select {
    appearance: none; padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
input[type=file] { font-size: var(--fs-sm); }
input[type=number] { font-variant-numeric: tabular-nums; }

.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(240px, calc(25% - .75rem))), 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
/* Folgezeilen derselben Gruppe (z. B. Positionen eines Mitglieds im Beitragslauf, #490) ohne Trennlinie */
.tbl tbody tr:has(+ tr.grp-cont) { border-bottom-color: transparent; }
.tbl tbody tr.grp-cont td { padding-top: .15rem; }
/* Drei kurze Felder fest in einer Zeile, z. B. Datum, Beginn, Ende (#490) */
.form-grid.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .form-grid.form-grid-3 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: flex-start; gap: .5rem; font-size: var(--fs-sm); cursor: pointer; }
.check input { margin-top: .2rem; accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.main input:is([type=checkbox], [type=radio]):not(.switch input) { width: 20px; height: 20px; }   /* auch Kästchen ohne .check, z. B. im Dokumenteditor */

fieldset {
    border: 1px solid var(--line); border-radius: var(--r-card);
    padding: .9rem 1rem .6rem; margin: 0 0 1rem;
    min-inline-size: 0;      /* sonst erzwingt der Browser die Mindestbreite des Inhalts */
}
legend { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); padding: 0 .4rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
/* Scrollhinweis (#340): Schatten am Rand, solange die Tabelle seitlich weitergeht; deckende Flächen wandern mit dem Inhalt */
.card .table-wrap {
    background:
        linear-gradient(to right, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
        linear-gradient(to left, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
        linear-gradient(to right, rgba(0, 0, 0, .28), transparent) left center / 14px 100% no-repeat scroll,
        linear-gradient(to left, rgba(0, 0, 0, .28), transparent) right center / 14px 100% no-repeat scroll;   /* kräftiger, damit abgeschnittene Spalten auffallen (#579 ui-8) */
}
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th, .tbl td { padding: .55rem .8rem; text-align: left; vertical-align: top; }
.tbl thead th {
    font-family: var(--font-small);
    font-size: var(--fs-sm); color: var(--muted); font-weight: 600;
    border-bottom: 1px solid var(--line);
    white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
.tbl tbody tr { border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .tbl tbody tr:hover { background: var(--surface-2); } }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.name { min-width: 9rem; }   /* Namensspalte: lange Doppelnamen brechen auf zwei bis drei Zeilen um, nicht auf sechs (Grenzdaten, break-ui) */
/* Mitgliederliste: Vorschau-Knopf rechts in der Namenszelle; zweite Zeile (Nr., Alter, Abteilung) nur auf dem Smartphone,
   wo diese Spalten ausgeblendet sind oder rechts außerhalb des Bildschirms liegen */
.tbl .name-kopf { display: flex; align-items: center; gap: .25rem; }   /* Knopf direkt hinter dem Namen: am Zellenrand läge er bei breiter Namensspalte außerhalb des Bildschirms */
.tbl .name-kopf > span { min-width: 0; }
.tbl .row-peek { flex: none; }
/* Maus: Der Knopf nimmt keinen Platz weg (sonst bricht jeder Name um) und erscheint beim Überfahren der Zeile sowie mit
   Tastaturfokus. Auf Touch-Geräten steht er immer sichtbar neben dem Namen. */
@media (hover: hover) and (pointer: fine) {
    .tbl .name-kopf { position: relative; }
    .tbl .row-peek { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; opacity: 0; background: var(--surface-2); }
}
@media (hover: hover) and (pointer: fine) { .tbl tr:hover .row-peek, .tbl .row-peek:focus-visible { opacity: 1; } }
.tbl .name-sub { display: none; }
/* Schmale Bildschirme (#856 ui-8): Tabellen, die ohnehin seitlich scrollen (portal.js setzt .tbl-weit), in natürlicher Spaltenbreite
   statt Wort für Wort umgebrochen. Höchstbreite der Tabelle und der Blöcke in Zellen begrenzt lange Texte auf wenige Zeilen. */
@media (max-width: 640px) {
    .table-wrap > table.tbl-weit { width: max-content; min-width: 100%; max-width: 60rem; }
    .tbl-weit td > :is(div, p, form) { max-width: 24rem; }
}
/* Filterzeile unter den Spaltenköpfen (Mitgliederliste): Felder gehören per form= zum Filterformular */
.tbl-filter th { position: static; padding: .3rem .4rem .5rem; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 400; }
.tbl-filter input, .tbl-filter select { width: 100%; min-width: 4.5rem; min-height: 32px; padding: .2rem .45rem; font-size: var(--fs-sm); }
.tbl-filter input[name="nr"] { min-width: 3.2rem; }
.tbl-filter select { min-width: 4rem; }
.tbl-filter input[name="name"] { min-width: 6rem; }
.tbl-filter .range { display: flex; flex-direction: column; gap: .2rem; }
/* Bereichsfeld (live_list_span): ein Feld für von/bis; Erklärung erscheint beim Fokus unter dem Feld (auch auf Touch) */
.range-field { position: relative; display: block; min-width: 6.5rem; }
.range-field[data-range="int"] { min-width: 4.5rem; }   /* Alter: schmale Spalte, damit die Liste ohne seitliches Scrollen passt (#515) */
.range-field input { width: 100%; }
.range-field.is-invalid input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.range-hint { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: max-content; max-width: min(22rem, 80vw);
    padding: .35rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-float); font-size: var(--fs-xs); font-weight: 400; line-height: 1.35; white-space: normal; text-align: left; }
.range-field:focus-within .range-hint { display: block; }
.range-field.is-invalid .range-hint { color: var(--danger); }
.tbl-filter th.num .range-hint { left: auto; right: 0; }   /* von/bis untereinander: die Spalte bleibt so schmal wie ihr Kopf */
.tbl-filter .range input[type="number"] { min-width: 2.7rem; padding: .2rem .3rem; appearance: textfield; -moz-appearance: textfield; }   /* ohne Drehknöpfe, sonst passt die Liste am Desktop nicht mehr ohne seitliches Scrollen (#515) */
.tbl-filter .range input[type="number"]::-webkit-inner-spin-button, .tbl-filter .range input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tbl-filter .tbl-filter-name { display: flex; gap: .25rem; align-items: center; }
.tbl-filter .tbl-filter-reset { width: 32px; height: 32px; flex: none; font-size: var(--fs-lg); line-height: 1; }
.tbl-filter .tbl-filter-reset[hidden] { display: none; }   /* .icon-btn setzt display: grid und würde hidden sonst aufheben */
/* Spaltenbreiten (lib/live_list.php, portal.js): schmale Spalten ohne gespeicherte Breite nur so breit wie ihr Inhalt,
   den freien Platz bekommen Name und Textspalten. Griff zum Ziehen nur ab 901 px; darunter wirken gespeicherte Breiten nicht. */
.tbl th.col-schmal { width: 1%; white-space: nowrap; }
.tbl:not(.tbl-fest) .tbl-filter th.col-schmal select { min-width: max-content; }   /* Auswahl in schmaler Spalte: gewählter Wert bleibt lesbar */
.col-grip { display: none; }
.live-per .linkbtn[hidden] { display: none; }   /* .linkbtn setzt display: inline-flex und würde hidden sonst aufheben */
@media (max-width: 900px) {
    .tbl > colgroup[data-list] > col { width: auto !important; }   /* gespeicherte Breiten (style am <col>) gelten nur am Desktop */
}
@media (min-width: 901px) {
    /* Griff mittig über der Spaltengrenze. Der Kopf ist dafür relativ statt sticky positioniert (im .table-wrap klebt er ohnehin
       nicht): sticky bildet einen eigenen Stapelkontext, und die rechte Hälfte des Griffs läge unter dem nächsten Kopf. */
    .tbl #liveHead > th { position: relative; }
    .tbl thead .col-grip {
        display: block; position: absolute; top: 0; right: -12px; bottom: 0; width: 24px; cursor: col-resize;   /* Trefferfläche 24 px wie .side-resize */
        touch-action: none; z-index: 2;
    }
    .tbl #liveHead > th:last-child .col-grip { right: 0; }   /* letzte Spalte: kein seitlicher Überlauf der Tabelle */
    .tbl #liveHead > th:last-child .col-grip::after { right: 0; }
    .col-grip::after { content: ""; position: absolute; top: 22%; bottom: 22%; right: 11px; width: 2px; border-radius: 1px; background: var(--line); transition: background var(--t); }
    .col-grip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-ctl); }
    .col-grip:focus-visible::after, .col-grip.is-dragging::after { background: var(--accent); }
    @media (hover: hover) and (pointer: fine) { .col-grip:hover::after { background: var(--accent-line); } }
    html.col-resizing, html.col-resizing * { cursor: col-resize !important; user-select: none; }
    /* Feste Breiten: Summe der Spalten (portal.js setzt --tbl-w), mindestens die Kartenbreite; Inhalt bleibt in seiner Spalte */
    table.tbl.tbl-fest { table-layout: fixed; width: var(--tbl-w, 100%); min-width: 100%; }
    .tbl-fest .tbl-filter-name { flex-wrap: wrap; }   /* Name auf 48 px gezogen: der Rücksetzknopf × rutscht unter das Feld, statt die Nachbarspalte zu überdecken */
    .tbl-fest > colgroup > col[data-rest] { width: auto !important; }   /* Füllspalte: nimmt den Rest, gespeicherte Breite = Mindestbreite (über --tbl-w) */
    .tbl-fest td, .main .tbl.tbl-fest td { overflow: hidden; overflow-wrap: normal; }   /* zu schmal gezogen: Nummern abschneiden statt Ziffer für Ziffer umbrechen */
    /* Beschriftung statt Kopfzelle abschneiden: overflow am <th> schnitte die rechte Hälfte des Griffs ab */
    .tbl-fest #liveHead > th > :is(.th-sort, .th-text) { max-width: 100%; overflow: hidden; vertical-align: top; }
    .tbl-fest #liveHead > th > .th-text { display: inline-block; text-overflow: ellipsis; }
    .tbl-fest .tbl-filter input, .tbl-fest .tbl-filter select, .tbl-fest .range-field, .tbl-fest td.name { min-width: 0; }
}
.tbl.htmx-request tbody { opacity: .55; transition: opacity var(--t); }   /* htmx setzt die Klasse während der Anfrage (hx-indicator) */
.tbl-empty td { text-align: center; color: var(--muted); padding: 1.5rem; }
/* Zeilenaktionen einheitlich rechts (#490) */
.tbl td.row-actions { text-align: right; white-space: nowrap; }
.tbl td.row-actions > .row, .tbl td.row-actions > form.row { justify-content: flex-end; }
.tbl a.rowlink { color: var(--ink); font-weight: 600; min-width: 24px; }   /* ein einziger Buchstabe als Titel bleibt als Ziel treffbar (WCAG 2.5.8) */
/* Bearbeitbare Tabellen (Kriterienkatalog): Felder nicht unter Lesbarkeit schrumpfen lassen */
.tbl td input:not([type=checkbox]), .tbl td select { min-width: 120px; }
.tbl td textarea { min-width: 220px; min-height: 58px; }
.tbl td input[type=number] { min-width: 72px; }

.sortable th[data-sort] { cursor: pointer; user-select: none; }
@media (hover: hover) and (pointer: fine) { .sortable th[data-sort]:hover { color: var(--ink); } }
.sortable th .arrow { opacity: .5; font-size: .7em; }

/* Fortschritt */
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.danger > span { background: var(--danger); }



/* Meldungen */
.toast {
    padding: .6rem .85rem; border-radius: var(--r-ctl);
    font-size: var(--fs-sm); margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}
.toast-ok   { background: var(--ok-soft);     border-color: transparent; color: var(--ok); }
.toast-err  { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.toast-warn { background: var(--warn-soft);   border-color: transparent; color: var(--warn); }
.toast-info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.toasts { position: fixed; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
.toasts .toast { box-shadow: var(--shadow-float); margin: 0; min-width: 220px; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty h3, .empty .empty-title { color: var(--ink); margin-bottom: .3rem; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); }
.empty .btn { margin-top: .6rem; }

.notice {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    padding: .65rem .9rem; border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
    font-size: var(--fs-sm); color: var(--ink);
}
.notice-warn   { border-color: var(--warn);   background: var(--warn-soft); }
.notice-danger { border-color: var(--danger); background: var(--danger-soft); }
.notice-ok     { border-color: var(--ok);     background: var(--ok-soft); }
.notice-ok svg.i { width: 1em; height: 1em; vertical-align: -.15em; color: var(--ok); }

/* Hinweis des Betreibers unter der Kopfzeile (lib/betreiber_hinweise.php): schiebt den Inhalt, überdeckt nichts.
   Der Text steht zweimal im Markup: breit (ab 721 px) offen als .betreiber-hinweis-voll, schmal (bis 720 px) zugeklappt als
   details.betreiber-hinweis-kurz; die jeweils andere Fassung ist display:none. Zugeklappt bleibt die Überschrift auf einer Zeile.
   Die Statusabfrage tauscht nur bei Änderung, der Zustand bleibt. */
.betreiber-hinweis {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .25rem .9rem;
    padding: .5rem .75rem .5rem calc(1.5rem - 4px);
    border-left: 4px solid var(--info); border-bottom: 1px solid var(--line);
    background: var(--info-soft); color: var(--ink); font-size: var(--fs-sm); overflow-wrap: anywhere;
}
.betreiber-hinweis-wartung  { border-left-color: var(--warn);   background: var(--warn-soft); }
.betreiber-hinweis-stoerung { border-left-color: var(--danger); background: var(--danger-soft); }
.betreiber-hinweis-art { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.6rem; font-weight: 600; color: var(--info); white-space: nowrap; }
.betreiber-hinweis-wartung .betreiber-hinweis-art  { color: var(--warn); }
.betreiber-hinweis-stoerung .betreiber-hinweis-art { color: var(--danger); }
.betreiber-hinweis-inhalt { min-width: 0; padding-top: .2rem; }
.betreiber-hinweis-kurz { display: none; }
.betreiber-hinweis summary { cursor: pointer; user-select: text; }
.betreiber-hinweis p { margin: .15rem 0 0; }
.betreiber-hinweis-aus { margin: -.25rem 0; }
.betreiber-hinweis-aus .icon-btn { width: 44px; height: 44px; color: var(--ink-2); }
@media (max-width: 720px) {
    .betreiber-hinweis { grid-template-columns: minmax(0, 1fr) auto; column-gap: .25rem; padding: .4rem .25rem .4rem calc(1rem - 4px); }
    .betreiber-hinweis-art { grid-area: 1 / 1; font-size: var(--fs-xs); min-height: 0; }
    .betreiber-hinweis-inhalt { grid-area: 2 / 1; padding-top: 0; }
    .betreiber-hinweis-voll { display: none; }
    .betreiber-hinweis-kurz { display: block; }
    .betreiber-hinweis-aus { grid-area: 1 / 2 / 3 / 3; margin: 0; }
    .betreiber-hinweis details:not([open]) strong { display: inline-block; max-width: calc(100% - 1.25em); vertical-align: top;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}

/* Schrittanzeige eines Ablaufs (z. B. Lastschriftlauf) */
.flow { display: flex; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: none; }
.flow li { flex: 1; display: flex; align-items: center; gap: .6rem; min-width: 0; padding: .6rem .75rem;
    border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.flow-dot { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    border: 1.5px solid var(--line-strong); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.flow-dot svg.i { width: 1rem; height: 1rem; }
.flow-text { display: flex; flex-direction: column; min-width: 0; }
.flow-label { font-weight: 600; font-size: var(--fs-md); hyphens: auto; overflow-wrap: break-word; }
.flow-hint { font-family: var(--font-small); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.flow li.done .flow-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow li.current { border-color: var(--accent-line); background: var(--accent-soft); }
.flow li.current .flow-dot { border-color: var(--accent); color: var(--accent); }
/* Abbruch rot, Folgeschritte ausgegraut, Rückfrage gelb, „wer ist dran“ hervorgehoben (#710) */
.flow li.failed { border-color: var(--danger); background: var(--danger-soft); }
.flow li.failed .flow-dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.flow li.skipped { opacity: .55; }
.flow li.note { border-color: var(--warn); background: var(--warn-soft); }
.flow-turn { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
.flow-note { font-size: var(--fs-xs); font-weight: 600; }
.flow-wrap .flow { margin: 0; }
.flow-compact { display: none; }
.flow-compact-text { display: block; font-weight: 600; margin-bottom: .35rem; }
/* Smartphone: eine Zeile „Schritt x von n · Name“ mit Balken statt vier bis fünf Kästen (#710) */
@media (max-width: 600px) { .flow-wrap .flow { display: none; } .flow-compact { display: block; } }
.auth-card .flow-wrap .flow { display: none; }   /* schmale Antragskarte (#711): immer die Kompaktzeile */
.auth-card .flow-compact { display: block; }
@media (min-width: 601px) and (max-width: 720px) { .flow { flex-direction: column; } }
/* Assistent: Schritte als Knöpfe; nur erledigte sind anklickbar (portal.js) */
.flow-btn { all: unset; display: flex; align-items: center; gap: .6rem; min-width: 0; width: 100%; }
.flow-btn:not(:disabled) { cursor: pointer; }
@media (hover: hover) { .flow-btn:not(:disabled):hover .flow-label { text-decoration: underline; } }
.flow-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.wizard-on [data-wizard-step]:not(.is-active), .actions-row .btn[hidden] { display: none; }
/* Aktiver Schritt füllt den Bildschirm: Speicherleiste klebt immer unten, „Weiter“ bleibt an einer Stelle und unter dem Lotse-Knopf frei */
.main .wizard-on [data-wizard-step].is-active { min-height: calc(100dvh - 16rem); }
[data-wizard-step]:focus { outline: none; }   /* Fokus nur zum Vorlesen des neuen Schritts, kein Rahmen um den ganzen Abschnitt */
.wizard-summary dl { margin: 0 0 .25rem; }
.wizard-summary h3 { display: flex; gap: .75rem; align-items: baseline; font-size: var(--fs-md); margin: 1rem 0 .4rem; }
.wizard-summary h3:first-child { margin-top: 0; }
.wizard-summary h3 .btn { flex: none; }
.wizard-summary dt { color: var(--muted); }
.wizard-summary dd.is-missing { color: var(--warn); font-weight: 600; }   /* wichtiges Feld leer (QA 29.10. ux-11, #859) */

/* Zwei Wege zur Bank: direkt (hervorgehoben) oder per Datei */
.send-ways { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.send-way { border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem 1.1rem; }
.send-way-main { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.send-way-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.send-way-head h3 { margin: 0; }
.send-way-head svg.i { width: 1.2rem; height: 1.2rem; color: var(--accent); }
.send-parts { list-style: none; margin: 0; padding: 0; }
.send-parts li { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; justify-content: space-between; padding: .15rem 0; }
.send-parts li.is-sent > span:first-child { color: var(--muted); }
@media (max-width: 900px) { .send-ways { grid-template-columns: 1fr; } }
.announce .list-plain li { justify-content: space-between; }
.announce .list-plain form { display: flex; gap: .5rem; align-items: center; }
.announce .list-plain select { width: auto; }
.timing .check { margin: .3rem 0; }
.timing-body { margin: .3rem 0 .8rem 1.5rem; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.center { text-align: center; }

/* Dialoge */
dialog.confirm, dialog.sheet {
    border: 1px solid var(--line); border-radius: var(--r-dlg);
    padding: 0; background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-float); max-width: 420px; width: calc(100% - 2rem);
}
dialog::backdrop { background: rgba(24, 27, 29, .5); }
dialog.confirm form { padding: 1.25rem; }
dialog.confirm h2 { margin-bottom: .4rem; font-size: var(--fs-lg); }
dialog.confirm p { color: var(--ink-2); font-size: var(--fs-md); }
dialog.confirm menu { display: flex; justify-content: flex-end; gap: .5rem; margin: 1.1rem 0 0; padding: 0; }

/* Login / Setup */
.auth-body { background: var(--paper); display: grid; place-items: center; padding: 1.5rem; }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-dlg); padding: 1.75rem;
}
.auth-card.wide { max-width: none; }
.auth-wrap.wide { max-width: 640px; }
.auth-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; font-family: var(--font-display); font-size: var(--fs-lg); }
.auth-card h1, .auth-card h2 { font-size: var(--fs-xl); margin-bottom: .3rem; }
.auth-card .sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1.2rem; }
.auth-note { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin-top: 1rem; }
.legal-links { display: block; margin-top: .4rem; }

/* Seitenleiste: Versionsangabe */
.version { padding: 0 1.25rem .6rem; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.version a { color: var(--muted); text-decoration: none; display: inline-block; padding: .4rem 0; }
@media (hover: hover) and (pointer: fine) { .version a:hover { color: var(--ink); } }
html.nav-mini .version { display: none; }

/* Administration → Module */
.module-list { display: grid; gap: .7rem; }
.module-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); cursor: pointer; transition: border-color var(--t); }
@media (hover: hover) and (pointer: fine) { .module-item:hover { border-color: var(--line-strong, var(--muted)); } }
.module-item:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.module-ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.module-item:has(input:checked) .module-ico { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--accent); }
.module-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.module-hint { color: var(--muted); font-style: italic; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* Schalter (#527 a11y-03): Aus-Zustand mit Feldrand (3 : 1 zum Hintergrund), An-Zustand in der kontrastgeprüften Akzentfarbe */
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--field-line); transition: background var(--t), border-color var(--t); pointer-events: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 1px var(--field-line), 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t); }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-links a { color: var(--muted); }

.otp-input {
    font-family: var(--mono); font-size: var(--fs-2xl); letter-spacing: .4em;
    text-align: center; padding: .55rem .3rem .55rem .7rem;
}

.qr { display: block; margin: 0 auto; border-radius: var(--r-ctl); max-width: 100%; height: auto; background: #fff; }
.seed {
    font-family: var(--mono); font-size: var(--fs-md); letter-spacing: .06em;
    background: var(--surface-2); border: 1px dashed var(--line-strong);
    border-radius: var(--r-ctl); padding: .55rem .7rem; text-align: center;
    word-break: break-all;
}
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .4rem; }
.codes code {
    font-family: var(--mono); font-size: var(--fs-md); text-align: center;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r-ctl); padding: .4rem;
}

.steps { display: flex; gap: .4rem; margin-bottom: 1.2rem; }
.step { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.step.done { background: var(--brand); }

/* Kacheln der Portal-Startseite */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.tile {
    display: flex; flex-direction: column; gap: .45rem;
    padding: 1.25rem; border-radius: var(--r-card);
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink);
    transition: border-color var(--t), background var(--t);
}
@media (hover: hover) and (pointer: fine) { a.tile:hover { text-decoration: none; border-color: var(--accent); } }
.tile-icon {
    width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent); margin-bottom: .3rem;
}
.tile-icon .i { width: 20px; height: 20px; }
.tile strong { font-family: var(--font-display); font-size: var(--fs-lg); }
.tile span { font-size: var(--fs-sm); color: var(--muted); }
.tile.disabled { color: var(--muted); border-style: dashed; background: transparent; }
.tile.disabled .tile-icon { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

/* Diagramme */
.chartbox { width: 100%; overflow-x: auto; }
svg.chart { display: block; width: 100%; height: auto; }
svg.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
svg.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
svg.chart .lbl { fill: var(--muted); font-size: var(--fs-xs); font-family: var(--font-small); }   /* Schriftmaß aus den Variablen (#560 ui-4) */
svg.chart .ser { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .pt { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
svg.chart .barfill { fill: var(--accent); }
svg.chart .barfill.soft { fill: var(--accent-line); }

.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: .3rem; }

/* Anhänge */
.att-list { display: flex; flex-direction: column; gap: .4rem; }
.att {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--r-ctl);
    background: var(--surface-2); font-size: var(--fs-sm);
}
.att .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mailbox {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl);
    padding: .7rem .85rem; font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word;
    max-height: 380px; overflow: auto;
}

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; align-items: end; }
.filters .field { margin-bottom: 0; }
/* Mobil (#262): weitere Filter einklappbar; ohne JavaScript bleiben alle sichtbar */
.filters-extra, .filters-haupt { display: contents; }
.filters-toggle-cell { display: none; }
/* Filterkarte einklappbar (Mitglieder): Suche bleibt, der Rest hinter „Filter“; ohne JavaScript alles sichtbar */
.filters-card-toggle-cell { display: none; }
.js-filters-card .filters-card-toggle-cell { display: block; }
.js-filters-card.is-collapsed .filters-haupt, .js-filters-card.is-collapsed .filters-toggle-cell, .js-filters-card.is-collapsed .filters-extra,
.js-filters-card.is-collapsed .filters-actions, .js-filters-card.is-collapsed .sfbar { display: none !important; }
/* Smartphone: „Filter“ öffnet alles auf einmal, ein zweiter Knopf „Weitere Filter“ entfällt */
@media (max-width: 560px) {
    .js-filters-card .filters-toggle-cell { display: none !important; }
    .js-filters-card:not(.is-collapsed) .filters.js-filters .filters-haupt { display: contents !important; }
    .js-filters-card:not(.is-collapsed) .filters.js-filters .filters-extra { display: contents !important; }
    .js-filters-card:not(.is-collapsed) .filters.js-filters .filters-actions { display: flex !important; }
}
/* Mitgliederliste (#515): Hauptfilter immer sichtbar, die übrigen hinter „Weitere Filter“ – auch am Desktop */
.filters.filters-stufen.js-filters .filters-toggle-cell { display: block; }
.filters.filters-stufen.js-filters:not(.is-open) .filters-extra { display: none; }
/* Bereich der Rechnungsposition: breit genug für die längste Kurzform „Zweckbetrieb“ (Prüfung rc.17) */
#itemsTbl select[name="it_sphere[]"] { min-width: 9rem; }
/* Menge, Einheit und Preis folgen ihren Spaltenbreiten statt der allgemeinen Mindestbreite von 120 px; die Beschreibung bekommt den Rest */
#itemsTbl td input:not([type=checkbox]) { width: 100%; min-width: 4rem; }
#itemsTbl td input[name="it_desc[]"] { min-width: 10rem; }
#itemsTbl td input[name="it_unit[]"] { min-width: 5.5rem; }
/* Knopf „Position entfernen“ am Zeilenende */
#itemsTbl .it-del { width: 44px; padding-left: 0; text-align: right; }
/* Rabatt: Zahl und Auswahl „%“/„€“ nebeneinander (Position und Rabatt auf die Summe, lib/rabatt.php) */
.rabatt-feld { display: flex; gap: .3rem; align-items: center; }
#itemsTbl .rabatt-feld input, .rabatt-summe .rabatt-feld input { min-width: 0; width: 100%; }
.rabatt-feld select, #itemsTbl .rabatt-feld select { width: 4.2rem; min-width: 4.2rem; flex: none; }   /* id-Regel: die Kartenansicht setzt Auswahlfelder sonst auf 100 % */
#itemsTbl .rabatt-feld input { flex: 1; }
.rabatt-summe { max-width: 22rem; }
.rabatt-summe .field { margin-bottom: 0; }
/* Rechnungspositionen: Die Darstellung folgt der Breite der Tabelle (Containerabfrage an .pos-wrap), nicht der des Fensters.
   Das Menü ist im Admin Panel breiter als im Vereinsportal, die Tabelle bei gleichem Fenster also schmaler; bei 1280 px
   war die Beschreibung nur 160 px breit und die Tabelle lief im Portal seitlich über (PR #1055).
   ab 1250 px: Tabelle mit engen Zellen (seit der Rabattspalte, PR #1057; vorher 1100 px) · 760 bis 1249 px: Beschreibung in voller Breite, alle Felder in einer zweiten Zeile ·
   darunter: Karten (#261, #340 ui-7) */
.pos-wrap { container-type: inline-size; }
@container (min-width: 1250px) {
    #itemsTbl th, #itemsTbl td { padding-left: .35rem; padding-right: .35rem; }
}
@container (max-width: 1249px) {
    #itemsTbl thead { display: none; }
    #itemsTbl, #itemsTbl tbody { display: block; }
    #itemsTbl tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .4rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
    #itemsTbl td { display: flex; flex-direction: column; gap: .2rem; padding: 0; border: 0; }
    #itemsTbl td::before { content: attr(data-label); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
    #itemsTbl td:first-child { grid-column: 1 / -1; }
    /* Kostenstelle und Bereich über die volle Breite, sonst sind die Auswahltexte abgeschnitten (Prüfung rc.17) */
    #itemsTbl td:nth-last-child(2) { grid-column: 1 / -1; }
    /* Knopf „Position entfernen“: eigene Zeile der Karte, rechts, ohne Beschriftung davor */
    #itemsTbl td.it-del { grid-column: 1 / -1; width: auto; align-items: flex-end; }
    #itemsTbl td.it-del::before { content: none; }
    #itemsTbl input, #itemsTbl select { width: 100%; min-width: 0; }
}
@container (min-width: 760px) and (max-width: 1249px) {
    /* Zweite Zeile: Menge, Einheit, Einzelpreis, Steuer, Kostenstelle (mit Bereich) und der Knopf nebeneinander */
    #itemsTbl tr { grid-template-columns: 5rem 6rem 7.5rem minmax(0, 1.3fr) minmax(0, 1fr) 44px; align-items: start; }
    #itemsTbl tr:has(.it-rabatt) { grid-template-columns: 4.5rem 5.5rem 7rem 9rem minmax(0, 1.3fr) minmax(0, 1fr) 44px; }
    #itemsTbl td:nth-last-child(2), #itemsTbl td.it-del { grid-column: auto; }
    #itemsTbl td.it-del { padding-top: 1.25rem; }   /* auf Höhe der Felder, nicht ihrer Beschriftungen */
}
@media (max-width: 560px) {
    .quick-contact .btn { min-height: 44px; }
    .filters.js-filters .filters-toggle-cell { display: block; }
    .filters.js-filters:not(.is-open) .filters-extra, .filters.js-filters:not(.is-open):not(.is-haupt) .filters-haupt,
    .filters.js-filters:not(.is-open) .filters-actions { display: none; }
}
/* Schaltflächen in Filter- und Formularrastern nicht auf Spaltenbreite strecken (#126) */
.filters > .btn, .filters > button, .form-grid > .btn, .form-grid > button, .filters .field > .btn { justify-self: start; width: auto; }
/* Knopf in einer Feldhülle: .field ist eine Flex-Spalte, ohne align-self streckt sie ihn auf Spaltenbreite (#703) */
.filters .field > .btn { align-self: flex-start; }
/* Kompaktes Einzelfeld mit Schaltfläche, z. B. Bearbeitungsstand speichern */
/* Mitgliederliste (#490): Suchfeld doppelt breit, Aktionen rechts, Spaltenauswahl als Aufklappliste */
.filters-breit > .field:first-child { grid-column: span 2; }
.filters-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: .5rem; flex-wrap: wrap; }
/* „Filter“ und „Spalten“ nebeneinander; die Spaltenauswahl bleibt auch bei eingeklappter Filterkarte und ohne JavaScript sichtbar */
.filters .field.filters-knoepfe { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem; }
.filters .col-picker > summary.btn { line-height: normal; }   /* Knopfhöhe wie „Filter“: die Zeilenhöhe der Aufklapper (24/44 px) käme zum Innenabstand dazu */
.filters .col-picker { position: relative; }
.filters .col-picker > summary { list-style: none; }
.filters .col-picker > summary::-webkit-details-marker { display: none; }
.col-picker-list {
    position: absolute; left: 0; top: calc(100% + .3rem); z-index: 40; min-width: 220px; max-width: calc(100vw - 2rem); max-height: 60vh; overflow: auto;
    padding: .5rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-float);
}
/* „Übernehmen“ und „Ansicht zurücksetzen“ bleiben am unteren Rand des Menüs sichtbar, auch wenn die Spaltenliste scrollt */
.col-picker-fuss { position: sticky; bottom: -.5rem; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; padding: .5rem 0; background: var(--surface); border-top: 1px solid var(--line); }
.filters + .sfbar { justify-content: flex-end; }
/* Nur Suchfeld (#490): Feld bis 480 px, schmaler Knopf daneben – auch auf dem Smartphone in einer Zeile */
.filters.filters-suche { grid-template-columns: minmax(0, 480px) auto auto; justify-content: start; }
/* Hilfe (#491): Themen links in Gruppen, gewählte Anleitung rechts */
.help-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.help-nav { position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow: auto; }
.help-nav h3, .help-nav .help-group { margin: .9rem 0 .25rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.help-nav h3:first-child, .help-nav .help-group:first-child { margin-top: 0; }
.help-nav ul { list-style: none; margin: 0; padding: 0; }
.help-nav a { display: block; padding: .3rem .5rem; border-radius: var(--r-ctl); color: var(--ink); font-size: var(--fs-sm); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .help-nav a:hover { background: var(--surface-2); } }
.help-nav a[aria-current="true"] { background: var(--surface-2); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.help-content { display: grid; gap: 1rem; min-width: 0; }
.help-guide, [data-wizard-head] { scroll-margin-top: 4.5rem; }
@media (max-width: 900px) { .help-guide, [data-wizard-head] { scroll-margin-top: 7.5rem; } }
.help-layout.is-single .help-guide:not(.is-active) { display: none; }
@media (max-width: 900px) {
    .help-layout { grid-template-columns: 1fr; }
    .help-nav { position: static; max-height: none; }
}
.filters.filters-compact { grid-template-columns: minmax(180px, 320px) auto; justify-content: start; }

.seg { display: inline-flex; border: 1px solid var(--field-line); border-radius: var(--r-ctl); overflow: hidden; }
.seg a { padding: .3rem .7rem; min-height: 30px; display: inline-flex; align-items: center;
    font-size: var(--fs-sm); color: var(--muted); background: var(--surface); }
.seg a + a { border-left: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .seg a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); } }
.seg a.is-active { background: var(--primary); color: var(--primary-ink); font-weight: 600; }

.pager { display: flex; gap: .35rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
    padding: .3rem .5rem;
    border: 1px solid var(--line); border-radius: var(--r-ctl);
    font-size: var(--fs-sm); color: var(--muted); background: var(--surface);
}
@media (hover: hover) and (pointer: fine) { .pager a:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); } }
.pager .is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
/* Zeilen je Seite unter der Tabelle (lib/live_list.php, live_list_per) */
.live-per { display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: .75rem; font-size: var(--fs-sm); color: var(--muted); }
.live-per label { display: inline-flex; gap: .5rem; align-items: center; }
.live-per select { width: auto; min-width: 4.5rem; min-height: 32px; padding: .2rem .45rem; font-size: var(--fs-sm); }

/* ----------------------------------------------------------- Clubkern */

.brand-logo { width: 34px; height: 34px; flex: none; object-fit: contain; }

/* Navigation in Gruppen */
.nav-top { padding-bottom: .35rem; margin-bottom: .35rem; border-bottom: 1px solid var(--line); }
.nav-group > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: .6rem; min-height: 36px; padding: .4rem .65rem;
    border-radius: var(--r-ctl); font-size: var(--fs-md); font-weight: 600; color: var(--ink-2);
    transition: background var(--t), color var(--t);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .i { flex: none; opacity: .8; }
.nav-group > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group > summary::after {
    content: ""; flex: none; width: 6px; height: 6px; margin-right: 3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-1px) rotate(-45deg); transition: transform .25s var(--nav-ease); opacity: .6;
}
.nav-group[open] > summary::after { transform: translateY(-3px) rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .nav-group > summary:hover { background: var(--surface); color: var(--ink); } }
.nav-group.has-active > summary { color: var(--ink); }
.nav-group.has-active > summary .i { color: var(--brand); opacity: 1; }
/* Unterpunkte: Führungslinie unter dem Gruppen-Icon, aktiver Punkt leuchtet auf der Linie */
.nav-items { position: relative; margin-left: calc(.65rem + 8px); padding: .15rem 0 .3rem .7rem; overflow: hidden; }
.nav-items::before { content: ""; position: absolute; left: 0; top: .15rem; bottom: .3rem; width: 1px; background: var(--line); }
.nav-group .nav-item { min-height: 32px; padding: .3rem .65rem; font-size: var(--fs-sm); font-weight: 450; transition: background var(--t), color var(--t), transform .2s var(--nav-ease); }
@media (hover: hover) and (pointer: fine) { .nav-group .nav-item:hover { transform: translateX(2px); } }
.nav-group .nav-item .i { display: none; }
/* Schmale Seitenleiste (#856 ui-3): Name kürzt mit „…“ (voller Name im title), der Zähler bleibt in der Pille */
.nav-items .nav-item > span:not(.nav-badge) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group .nav-item.is-active { font-weight: 600; transform: none; }
.nav-group .nav-item.is-active::before {
    content: ""; position: absolute; left: calc(-.7rem); top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--brand);
    animation: navGlow .35s var(--nav-ease) both;
}
.nav-group.is-closing > summary::after { transform: translateY(-1px) rotate(-45deg); }
.nav-group.is-opening .nav-items > * { animation: navIn .32s var(--nav-ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes navIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes navGlow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.side { transition: width .25s var(--nav-ease), flex-basis .25s var(--nav-ease); }
@media (prefers-reduced-motion: reduce) {
    .nav-group.is-opening .nav-items > *, .nav-group .nav-item.is-active::before { animation: none; }
    .side, .nav-group .nav-item { transition: none; }
}

/* Einklappen auf eine Icon-Leiste */
.side-mini {
    flex: none; width: 28px; height: 28px; border: 0; border-radius: var(--r-ctl); background: transparent;
    color: var(--muted); cursor: pointer; font-size: var(--fs-base); line-height: 1;
}
@media (hover: hover) and (pointer: fine) { .side-mini:hover { background: var(--surface); color: var(--ink); } }
/* Menübreite ziehen (#743): nur breite Ansicht, nicht in der Icon-Leiste */
.side-resize { display: none; }
@media (min-width: 901px) {
    html:not(.nav-mini) { --side-w: var(--side-w-user, 240px); }
    html:not(.nav-mini) .side-resize {
        display: block; position: absolute; top: 0; right: -12px; width: 24px; height: 100%; cursor: col-resize;   /* Trefferfläche 24 px (WCAG 2.5.8, #856) */
        touch-action: none; z-index: 2;
    }
    .side-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 11px; width: 2px; background: transparent; transition: background var(--t); }
    .side-resize:focus-visible { outline: none; }
    .side-resize:focus-visible::after, .side-resize.is-dragging::after { background: var(--accent); }
    @media (hover: hover) and (pointer: fine) { .side-resize:hover::after { background: var(--accent-line); } }
    html.side-resizing, html.side-resizing * { cursor: col-resize !important; user-select: none; }
    html.side-resizing .side { transition: none; }
    html.nav-mini { --side-w: 60px; }
    html.nav-mini .side-top { flex-direction: column; padding: .9rem .5rem .4rem; }
    html.nav-mini .brand { flex: none; }
    html.nav-mini .side-mini { transform: rotate(180deg); }
    html.nav-mini .brand-text, html.nav-mini .nav-item > span, html.nav-mini .nav-group > summary > span,
    html.nav-mini .nav-group > summary::after, html.nav-mini .nav-fav, html.nav-mini .whoami span { display: none; }
    html.nav-mini .nav { padding: .5rem .45rem; }
    html.nav-mini .nav-item, html.nav-mini .nav-group > summary { justify-content: center; padding: .4rem; }
    html.nav-mini .nav-group > :not(summary) { display: none; }
    html.nav-mini .whoami { justify-content: center; padding: .5rem 0 .6rem; }
}

/* Menüfilter über dem Seitenmenü: Rahmen und Fokus wie die globale Suche */
.nav-filter { flex: none; padding: .1rem .6rem .35rem; }
.nav-filter[hidden] { display: none; }
.nav-filter-box {
    display: flex; align-items: center; gap: .45rem;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl);
    padding: 0 .6rem; color: var(--muted);
}
.nav-filter-box:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.nav-filter-box .i { flex: none; }
.nav-filter-box input { border: 0 !important; box-shadow: none !important; background: transparent !important; outline: none; padding-left: 0; padding-right: 0; min-height: 34px; font-size: var(--fs-sm); }
.nav-filter-empty { margin: .5rem .1rem 0; color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.nav-filter-empty:empty { display: none; }
.nav .nav-filter-out { display: none !important; }
@media (min-width: 901px) { html.nav-mini .nav-filter { display: none; } }
@media (max-width: 900px) { .nav-filter-box input { min-height: 44px; font-size: 16px; } }   /* unter 16 px zoomt iOS in das Feld */

/* Globale Suche */
.gsearch {
    flex: 1; max-width: 560px; position: relative;
    display: flex; align-items: center; gap: .45rem;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl);
    padding: 0 .6rem; color: var(--muted);
}
.gsearch:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
/* Der Fokusrahmen liegt auf dem Suchrahmen (focus-within), nicht auf dem inneren Feld */
.gsearch input { border: 0 !important; box-shadow: none !important; background: transparent !important; outline: none; padding-left: 0; min-height: 36px; }
.gsearch kbd {
    font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 .35rem;
}
.gsearch-pop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: var(--shadow-float); max-height: 70vh; overflow: auto; padding: .3rem;
}
.gsearch-pop a { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .6rem; border-radius: var(--r-ctl); color: var(--ink); }
.gsearch-pop a.is-sel { background: var(--accent-soft); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .gsearch-pop a:hover { background: var(--accent-soft); text-decoration: none; } }
.gsearch-pop .k { font-family: var(--font-small); font-size: var(--fs-xs); color: var(--muted); min-width: 88px; }
.gsearch-pop .s { color: var(--muted); font-size: var(--fs-sm); margin-left: auto; }
.gsearch-pop .none { padding: .6rem; color: var(--muted); font-size: var(--fs-sm); }

.bell { position: relative; }
.bell-n {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;   /* gleiche Lage an Uhr und Glocke; wächst nach links, „99+“ bleibt im Knopf (#856) */
    border-radius: 8px; background: var(--badge-bg); color: #fff; font-size: var(--fs-xs); font-weight: 700;
    display: grid; place-items: center; line-height: 1;
}

/* Kopf einer Seite */
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; font-size: var(--fs-sm); color: var(--muted); margin-bottom: .5rem; }
.crumbs a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--ink); } }
.page-top { display: flex; align-items: baseline;   /* Titel, Einstellungen und Knöpfe auf einer Schriftlinie */ gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-top .page-h { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.page-sub { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--fs-sm); flex: 1 1 100%; order: 2; }
/* Hauptknopf immer rechts oben in der Titelzeile; Untertitel und Filter rutschen darunter (#354). */
.page-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-left: auto; order: 1; }
/* Seitenkopf (#489): Nebenaktionen in einer Höhe, Hauptaktion ganz rechts, „Mehr“ direkt davor */
.page-actions .btn-sm { min-height: 36px; padding: .4rem .9rem; }
.page-actions > .menu-more { order: 8; }
.page-actions > .btn-primary, .page-actions > form:has(> .btn-primary) { order: 9; }
.menu-more { position: relative; }
.menu-more > summary { list-style: none; }
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-more[open] > summary { background: var(--surface-2); }
.menu-more-list {
    position: absolute; right: 0; top: calc(100% + .3rem); z-index: 60;
    min-width: 230px; max-width: calc(100vw - 2rem); margin: 0; padding: .3rem; list-style: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-float);
}
.menu-more.is-left .menu-more-list { right: auto; left: 0; }
.menu-more-list li, .menu-more-list form { display: block; margin: 0; }
.menu-more-list .btn {
    width: 100%; justify-content: flex-start; min-height: 36px; padding: .4rem .7rem;
    border-color: transparent; background: transparent; color: var(--ink); white-space: normal; text-align: left;
}
.menu-more-list .btn:focus-visible { background: var(--surface-2); border-color: transparent; }
@media (hover: hover) and (pointer: fine) { .menu-more-list .btn:hover { background: var(--surface-2); border-color: transparent; } }
.menu-more-list .btn-danger { color: var(--danger); }
.menu-more-list .btn-danger:focus-visible { background: var(--danger-soft); color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .menu-more-list .btn-danger:hover { background: var(--danger-soft); color: var(--danger); } }

/* Tabs */
.tabs {
    display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
    /* Scrollhinweis wie .card .table-wrap (#527 ui-5): Schatten am Rand, solange Reiter seitlich weitergehen */
    background:
        linear-gradient(to right, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
        linear-gradient(to left, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
        linear-gradient(to right, rgba(0, 0, 0, .16), transparent) left center / 12px 100% no-repeat scroll,
        linear-gradient(to left, rgba(0, 0, 0, .16), transparent) right center / 12px 100% no-repeat scroll;
}
.tab {
    padding: .55rem .85rem; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center;
}
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); text-decoration: none; } }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tab-n { font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 0 .4rem; color: var(--muted); }

/* Chips: weitere Arten */
.chip-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.chip-muted { background: transparent; color: var(--muted); }
.chip-brand { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

.req { color: var(--danger); }
form.inline { display: inline; margin: 0; }
.th-sort { color: inherit; display: inline-flex; gap: .2rem; }
@media (hover: hover) and (pointer: fine) { .th-sort:hover { color: var(--ink); text-decoration: none; } }

/* Definitionslisten auf Detailseiten */
.dl { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: .45rem 1rem; margin: 0; font-size: var(--fs-md); }
.dl dt { color: var(--muted); font-size: var(--fs-sm); min-width: 0; overflow-wrap: normal; hyphens: auto; }   /* Silbentrennung statt Umbruch mitten im Wort (#559 ui-3) */
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Gespeicherte Filter */
.sfbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.sf { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: var(--fs-sm); }
.sf a { padding: .15rem .5rem; color: var(--ink-2); }
.sf-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 .4rem; min-width: 24px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-base); line-height: 1; }
@media (hover: hover) and (pointer: fine) { .sf-x:hover { color: var(--danger); } }
.sf-save > summary { list-style: none; }
.sf-save > summary::-webkit-details-marker { display: none; }
.sf-save[open] form { margin-top: .4rem; }
.sf-save input { max-width: 220px; }

/* Massenaktionen */
.bulkbar {
    position: sticky; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); z-index: 30;
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    padding: .6rem 1rem; background: var(--primary); color: var(--primary-ink);
    border-radius: var(--r-card); margin-top: .8rem; box-shadow: var(--shadow-float);
}
.bulkbar[hidden] { display: none; }
.bulkbar select, .bulkbar input { max-width: 240px; min-height: 34px; width: auto; }
.bulkbar .btn { min-height: 34px; }
.tbl td.sel, .tbl th.sel { width: 34px; padding-right: 0; }
.tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl li { position: relative; padding: 0 0 1rem 1.6rem; }
.tl li::before {
    content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--line-strong);
}
.tl li.k-note::before { border-color: var(--brand); }
.tl li.k-task::before { border-color: var(--info); }
.tl li.k-mail::before { border-color: var(--ok); }
.tl li.k-finance::before { border-color: var(--accent); }
.tl-head { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; font-size: var(--fs-sm); }
.tl-head strong { font-weight: 600; }
.tl-meta { font-family: var(--font-small); font-size: var(--fs-xs); color: var(--muted); }
.tl-text { font-size: var(--fs-sm); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .1rem; }

/* Kopf einer Detailseite */
.hero { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.hero > div { min-width: 0; max-width: 100%; }
.avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: var(--primary); color: var(--primary-ink);
    font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg);
}
html[data-theme="dark"] .avatar { color: var(--primary-ink); }
.avatar-img { display: block; object-fit: cover; background: var(--surface-2); }
.avatar-lg { width: 96px; height: 96px; font-size: var(--fs-3xl); }
.avatar-form { margin: 0; }
.avatar-edit { position: relative; display: block; cursor: pointer; border-radius: 50%; }
.avatar-caption { display: block; text-align: center; margin-top: .25rem; }
.avatar-cam {
    position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
    background: rgba(0, 0, 0, .45); color: #fff; opacity: 0; transition: opacity var(--t);
}
.avatar-edit:focus-within .avatar-cam { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .avatar-edit:hover .avatar-cam { opacity: 1; } }
.photo-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Live-Filter (#856 ui-16): ohne JavaScript sichtbarer Knopf „Filtern“; mit JavaScript (html.js aus theme.js) nur für Enter im Markup */
html.js .live-filter-submit { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Absendeknopf nur ohne JavaScript (Livevorschau des Imports: Haken und Auswahl senden mit htmx bei change) */
html.js .nur-ohne-js { display: none; }
/* Importvorschau im Abgleich (#imTable): maskierte IBAN am Stück; auf schmalen Bildschirmen Karten statt seitlich scrollender
   Tabelle, damit Treffer, Feldvergleich und Haken in der Hinweisspalte ohne Wischen erreichbar sind */
#imTable .mask { white-space: nowrap; }
#imTable .list-plain li > form { flex: 1 1 100%; }   /* Haken „überschreiben“ in eigener Zeile unter „bisher · neu“ */
@media (max-width: 640px) {
    #imTable thead { display: none; }
    #imTable, #imTable tbody { display: block; width: 100%; }
    #imTable tr { display: grid; grid-template-columns: auto 1fr auto; gap: .3rem .6rem; padding: .6rem .9rem; }
    #imTable td { padding: 0; border: 0; }
    #imTable td:last-child { grid-column: 1 / -1; }
}
/* `.hero > div { min-width: 0 }` ist spezifischer als `.hero-main`; ohne diese Regel quetschte die Aktionsleiste den Titelblock auf 150 px (#704) */
.hero > .hero-main { flex: 1; min-width: 280px; }
.hero-main h1 { font-size: var(--fs-2xl); letter-spacing: -.02em; }
.hero-meta a, .page-sub a, .main .row > a:not(.btn) { display: inline-flex; align-items: center; min-height: 24px; }
.hero-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .3rem; color: var(--muted); font-size: var(--fs-sm); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.list-plain li:first-child { border-top: 0; }
/* Titelspalte mit style="flex:1" (41 Stellen): Grundbreite 0 ließ den Titel neben Datum und Status bis auf einen Buchstaben
   schrumpfen; mit 12 rem bricht er auf schmalen Bildschirmen in eine eigene Zeile um (#716) */
.list-plain li > [style*="flex:1"] { flex-basis: 12rem !important; }   /* !important: schlägt das Inline-Style */

.mask { font-family: var(--mono); letter-spacing: .02em; }
/* Übersicht (#515): Statistik eingeklappt am Seitenende */
.dash-more { margin-top: 1rem; }
.dash-more > summary { padding: .9rem 1.15rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; }
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more > summary::before { content: '▸'; color: var(--accent); }
.dash-more[open] > summary::before { content: '▾'; }
.dash-more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: .6rem; }

.grid-side { display: grid; gap: 1rem; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; margin-top: .4rem; }
/* Speichern-Leiste bleibt beim Scrollen am unteren Rand sichtbar (lange Einstellungsformulare) */
.actions-sticky { position: sticky; bottom: 0; z-index: 5; align-items: center; padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
.card .actions-sticky { background: var(--surface); }
.beleg-vorschau { display: block; width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }
img.beleg-vorschau { height: auto; max-height: 70vh; object-fit: contain; }
.jump { display: flex; flex-wrap: wrap; gap: .4rem; }
.jump a { padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: var(--fs-sm); text-decoration: none; }
/* Speichern je Karte der Vereinsdaten (#345): Status links, Knopf rechts */
.card-save { align-items: center; justify-content: space-between; }
.card-save [data-save-status].is-err, .card-save [data-save-status] .is-err { color: var(--danger, #b3261e); }
.jump a:focus-visible { border-color: var(--brand, var(--ink)); }
@media (hover: hover) and (pointer: fine) { .jump a:hover { border-color: var(--brand, var(--ink)); } }
.row-danger td { background: var(--danger-soft); }
.row-warn td { background: var(--warn-soft); }

/* -------------------------------------------------------------- Responsiv */

@media (max-width: 900px) {
    .grid-side { grid-template-columns: 1fr; }
    .main-wrap { padding-left: env(safe-area-inset-left, 0px); }   /* Seitenleiste ist eingeklappt, Inhalt reicht bis zur Aussparung */
    .gsearch kbd { display: none; }
    .side {
        position: fixed; inset: 0 auto 0 0;
        background: var(--surface);
        --side-bg: var(--surface);   /* Verlauf des Menüs (.nav.can-down::after) in derselben Farbe */
        transform: translateX(-100%);
        transition: transform .18s ease;
    }
    body.nav-open .side { transform: none; box-shadow: var(--shadow-float); }   /* geschlossen ohne Schatten: der Unschärfesaum ragte sonst an den linken Rand */
    body:not(.nav-open) .side-backdrop { display: none; }
    .side-close { display: grid; place-items: center; width: 36px; height: 36px;
        border: 0; background: transparent; color: var(--muted); font-size: var(--fs-xl); cursor: pointer; border-radius: var(--r-ctl); }
    .icon-btn.nav-toggle { display: grid; }
    .side-mini { display: none; }
    .nav-item { min-height: 44px; }
    .main { padding: 1rem; }
    .topbar { padding: .5rem .9rem; }
    .btn, .btn-sm, .page-actions .btn-sm { min-height: 44px; }
    .icon-btn, .side-close { width: 44px; height: 44px; }
    input, select, textarea { font-size: 16px; }   /* unter 16 px zoomt iOS beim Antippen in das Feld */
    .tbl-filter input, .tbl-filter select { font-size: 16px; }   /* die Filterzeile (spezifischer als die Regel darüber) zoomt sonst auf dem iPhone */
    .stat { flex-basis: 45%; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .page-h { font-size: var(--fs-xl); }
    .hero-main h1 { font-size: var(--fs-xl); }
    .stat-value { font-size: var(--fs-2xl); }
    .card-head { padding: .8rem .9rem .5rem; }
    .card-body { padding: .35rem .9rem .9rem; }
    .tiles { grid-template-columns: 1fr; }
    .dl { grid-template-columns: 1fr; gap: .1rem; }
    .dl dd { margin-bottom: .45rem; }
    .page-actions { margin-left: 0; }
    /* Kopf der Mitgliedsseite: Schnellkontakt und Aktionen gleich ausgerichtet (#561 ui-5) */
    .hero { justify-content: flex-start; }
    .hero-main, .hero-meta, .quick-contact { text-align: left; justify-content: flex-start; }
    .hero .page-actions { width: 100%; justify-content: flex-start; }
    .tbl .hide-sm { display: none; }
    .tbl .name-sub { display: block; overflow-wrap: anywhere; }
    .filters { grid-template-columns: 1fr 1fr; gap: .45rem; }
    .filters .field.filters-knoepfe { grid-column: 1 / -1; }   /* „Filter“ und „Spalten“ in einer Zeile */
    .filters .field:first-of-type, .filters .field:last-of-type { grid-column: 1 / -1; }   /* of-type: vorn kann ein verstecktes Feld stehen, hinten hängt portal.js bei Auto-Filtern einen span.sr-only an */
    .filters .field:nth-of-type(even):nth-last-of-type(2) { grid-column: 1 / -1; }   /* allein in der Zeile vor dem letzten Feld: ganze Breite */
    .filters.filters-suche { grid-template-columns: minmax(0, 1fr) auto; }
    .filters.filters-suche > a { grid-column: 1 / -1; justify-self: start; }
    .filters.filters-suche .field:first-of-type, .filters.filters-suche .field:last-of-type, .filters.filters-suche .field:nth-of-type(even):nth-last-of-type(2) { grid-column: auto; }
    .filters .field > label { font-size: var(--fs-xs); }
}

/* ---------------------------------------------------------------- Lotse (Hilfe-Assistent) */
/* Knopf unten rechts auf jeder Seite nach der Anmeldung; Fenster unten rechts, auf dem Smartphone als Blatt von unten */
.lotse-knopf {
    position: fixed; right: calc(1rem + env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 50;
    display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; min-width: 44px; padding: .5rem 1rem;
    border-radius: 999px; background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-float);
    font-size: var(--fs-sm); font-weight: 600; text-decoration: none; transition: background var(--t);
}
@media (hover: hover) and (pointer: fine) { .lotse-knopf:hover { background: var(--primary-strong); text-decoration: none; } }
.lotse-knopf:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.lotse-knopf svg.i { width: 1.2rem; height: 1.2rem; }
body:has(> .lotse-knopf) .main { padding-bottom: 5.5rem; }   /* Seitenende nicht unter dem Knopf */
body:has(> .lotse-knopf) .toasts { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
/* Fest unten liegende Leisten (Speichern, Massenaktionen): Knopf darüber. Ohne Fußabstand bleibt die Leiste auch am
   Seitenende am unteren Rand, statt um den Abstand nach oben und unter den Knopf zu rücken (#537) */
/* Sichtbare Speicherleiste (nicht in Dialog oder zugeklapptem Details): Knopf über der angehefteten Leiste (#705) */
body:has(.actions-sticky:not(dialog *, details:not([open]) *), .bulkbar:not([hidden])) .lotse-knopf { bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
/* Seitenende frei halten: angehobener Knopf reicht bis rund 120 px über den Rand; mit Abstand 0 lag er auf „Speichern“,
   sobald unter dem Formular noch eine Karte folgt (Wiederkehrende Rechnung, KI-Verbindungen, #705) */
body:has(> .lotse-knopf):has(.actions-sticky:not(dialog *, details:not([open]) *), .bulkbar:not([hidden])) .main { padding-bottom: calc(8rem + env(safe-area-inset-bottom)); }
/* Fokus (Tab, Weiter auf der Bildschirmtastatur) rollt Felder über den angehobenen Knopf: 4,75 rem + 44 px Knopf + Luft (#856 ui-2) */
html:has(body > .lotse-knopf):has(.actions-sticky:not(dialog *, details:not([open]) *), .bulkbar:not([hidden])) { scroll-padding-bottom: calc(8.5rem + env(safe-area-inset-bottom)); }
dialog.lotse {
    position: fixed; inset: auto calc(1rem + env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) auto; margin: 0;
    width: 360px; max-width: calc(100vw - 2rem); max-height: min(640px, calc(100dvh - 2rem)); padding: 0;
    border: 1px solid var(--line); border-radius: var(--r-dlg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float);
}
dialog.lotse[open] { display: flex; flex-direction: column; }
dialog.lotse::backdrop { background: rgba(24, 27, 29, .25); }
.lotse-kopf { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--line); }
.lotse-kopf h2 { margin: 0; font-size: var(--fs-lg); }
.lotse-seite { margin: 0; padding: .55rem 1rem; display: flex; flex-wrap: wrap; gap: .1rem .4rem; align-items: baseline; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.lotse-seite > span { color: var(--muted); }
.lotse-seite a { font-weight: 600; overflow-wrap: anywhere; display: inline-flex; align-items: center; min-height: 24px; }
.lotse-verlauf { flex: 1; min-height: 7rem; overflow-y: auto; overscroll-behavior: contain; padding: .75rem 1rem; display: flex; flex-direction: column; gap: 1rem; }
.lotse-leer { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.lotse-eintrag { display: flex; flex-direction: column; gap: .5rem; }
.lotse-frage { align-self: flex-end; max-width: 85%; margin: 0; padding: .4rem .7rem; border-radius: var(--r-card); background: var(--accent-soft); color: var(--ink); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.lotse-antwort h3 { margin: 0 0 .25rem; font-size: var(--fs-md); }
.lotse-auszug { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.lotse-weg { margin: .3rem 0 0; color: var(--muted); font-size: var(--fs-xs); }
.lotse-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.lotse-auch { list-style: none; margin: .25rem 0 0; padding: 0; color: var(--muted); font-size: var(--fs-sm); }
.lotse-auch li + li { margin-top: .2rem; }
.lotse-hinweis { font-size: var(--fs-sm); }
.lotse-hinweis p { margin: 0 0 .3rem; }
.lotse-form { padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .35rem; }
.lotse-form > label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.lotse-zeile { display: flex; gap: .5rem; }
.lotse-zeile input { flex: 1; min-width: 0; }
.lotse-hinweis-sammlung { margin: .2rem 0 0; color: var(--muted); font-size: var(--fs-xs); }
.lotse-karte { margin: 1rem 0; }
@media (max-width: 640px) {
    .lotse-seite a { min-height: 44px; }
    dialog.lotse { inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 85dvh; border-width: 1px 0 0; border-radius: var(--r-dlg) var(--r-dlg) 0 0; }
    .lotse-form { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
    .lotse-zeile .btn, .lotse-kopf .btn { min-height: 44px; }
    .lotse-links .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
    dialog.lotse[open] { animation: lotse-auf .16s ease-out; }
    @keyframes lotse-auf { from { transform: translateY(12px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* ---------------------------------------------------------------- Drucken */

@media print {
    :root { --paper: #fff; --surface: #fff; --line: #d4d4d4; --ink: #000; --ink-2: #222; --muted: #555; }
    .side, .topbar, .toasts, .side-backdrop, .no-print,
    .btn, .icon-btn, dialog, .pager, .filters, .lotse-knopf { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .shell { display: block; }
    .main { padding: 0; max-width: none; }
    .card { border: 1px solid #ddd; break-inside: avoid; page-break-inside: avoid; }
    .print-only { display: block !important; }
    a { color: #000; text-decoration: none; }
    @page { margin: 16mm 14mm; }
}
.print-only { display: none; }
@media print {
    body.print-codes * { visibility: hidden; }
    body.print-codes [data-recovery-codes], body.print-codes [data-recovery-codes] * { visibility: visible; }
    body.print-codes [data-recovery-codes] { position: absolute; top: 0; left: 0; right: 0; }
    body.print-codes [data-recovery-codes]::before { content: "Clubkern – Wiederherstellungscodes (je Code einmal verwendbar)"; display: block; grid-column: 1 / -1; font-weight: 600; margin-bottom: .6rem; }
}

.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .linkbtn:hover { text-decoration: underline; } }
a.stat-link { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { a.stat-link:hover { background: var(--surface-2); text-decoration: none; } }

.mailframe { width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; }

/* Dokumentansicht */
.doc-view { overflow: hidden; }
.doc-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 480px; border: 0; background: #525659; }
.doc-img { text-align: center; }
.doc-img img { max-width: 100%; height: auto; }
/* Unterschriftsfeld auf der Seitenvorschau platzieren (signatur-feld.js) */
/* Touch (#856 ui-10): senkrechtes Wischen rollt die Seite, Tippen setzt das Feld; nur der Rahmen fängt jedes Ziehen ab */
.sign-place { position: relative; max-width: 640px; margin: 0 auto; border: 1px solid var(--line-strong); background: #fff;
    cursor: crosshair; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sign-place-page { display: block; width: 100%; height: auto; pointer-events: none; }
.sign-place-box { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    border: 2px solid #b42318; background: rgb(180 35 24 / 12%); color: #b42318;   /* feste Farben: die Seite ist immer weiß */
    font-size: var(--fs-xs); font-weight: 600; cursor: move; overflow: hidden; touch-action: none; }
.sign-place-caption { position: absolute; display: flex; flex-direction: column; line-height: 1.2; color: #15263a; border-top: 1px solid #15263a;
    padding-top: .3em; white-space: nowrap; pointer-events: none; }   /* Vorschau von Name und Datum unter dem Feld */
.sign-place-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.doc-text { margin: 0; padding: 16px; max-height: calc(100vh - 220px); overflow: auto; font-size: var(--fs-sm); white-space: pre-wrap; }

/* Texteditor */
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface-2); }
.rte-btn { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.rte-btn:focus-visible { background: var(--surface); border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) { .rte-btn:hover { background: var(--surface); border-color: var(--line-strong); } }
.rte-ph { width: auto; height: 30px; margin-left: auto; padding: 0 8px; font-size: var(--fs-sm); }
.rte-area { min-height: 280px; max-height: 60vh; overflow: auto; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 0 0 8px 8px; background: var(--surface); color: var(--ink); line-height: 1.55; }
.rte-area:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.rte-area p { margin: 0 0 .7em; }
.rte-area h2, .rte-area h3 { margin: .8em 0 .4em; font-size: var(--fs-lg); }
.rte-area ul, .rte-area ol { margin: 0 0 .7em 1.4em; padding: 0; }
.minutes-body h2, .minutes-body h3 { font-size: var(--fs-lg); margin: 1em 0 .4em; }
.minutes-body p { margin: 0 0 .7em; }
mark { background: var(--accent-soft); color: inherit; padding: 0 1px; }

/* Online-Antrag */
.apply-docs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.apply-submit { flex: 1 1 auto; }   /* Antrag absenden: volle Breite, im Assistenten neben „Zurück“ (#711) */
.apply-photo-preview { max-width: 140px; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); margin-top: .4rem; }
.doc-public { width: 100%; height: 75vh; border: 0; border-radius: 8px; background: #525659; }
input[type=file] { color: var(--ink-2); font: inherit; font-size: var(--fs-sm); max-width: 100%; }
input[type=file]::file-selector-button { margin-right: .7rem; padding: .4rem .8rem; font: inherit; color: var(--ink); background: var(--surface-2);
    border: 1px solid var(--line-strong); border-radius: var(--r-ctl); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { input[type=file]::file-selector-button:hover { border-color: var(--muted-2); } }

/* Livesuche für Zuordnungen */
.pick-wrap { position: relative; }
.pick-pop { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 2px); max-height: 300px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.pick-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: .45rem .7rem; border: 0; border-bottom: 1px solid var(--line);
    background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.pick-item span { font-size: var(--fs-xs); color: var(--muted); }
.pick-item.is-sel { background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .pick-item:hover { background: var(--accent-soft); } }
.pick-chosen { color: var(--ok, #2e7d32); }
/* Einstellungen */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; align-items: start; }
.logo-preview { display: flex; align-items: center; gap: 1rem; padding: .8rem; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); }
.logo-preview img { max-height: 80px; max-width: 200px; }
/* Steckbrief der Vereinsseite (#781): Logo, Name und Anschrift, rechts die Knöpfe; schmal untereinander */
.club-profile-body { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.club-profile-logo { max-height: 72px; max-width: 160px; flex: 0 0 auto; }
.club-profile-text { flex: 1 1 16rem; min-width: 0; }
.club-profile-text h2 { margin: 0 0 .2rem; overflow-wrap: anywhere; }
.club-profile-text p { margin: 0 0 .2rem; overflow-wrap: anywhere; }
.club-profile-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
/* Übersichtskarten der Vereinsseite: Spalten statt Raster, damit ungleich hohe Karten keine Löcher lassen */
.club-sections { columns: 2 340px; column-gap: 1rem; }
.club-sections > .card { break-inside: avoid; margin: 0 0 1rem; }
.color-dot { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: var(--dot); border: 1px solid var(--line-strong); vertical-align: -.15em; }
pre.cmd { white-space: pre-wrap; word-break: break-all; margin: 0 0 .5rem; padding: .6rem .7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; user-select: all; }
ul.pruef-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }

/* Mailclient (eigenes Fenster) */
.mc-body { margin: 0; background: var(--paper); color: var(--ink); height: 100dvh; display: flex; flex-direction: column; }
.mc-top { display: flex; align-items: center; gap: .8rem; padding: .55rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.mc-body > #betreiber-hinweis { flex: none; }
.mc-brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; min-width: 0; }
.mc-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-search { flex: 1; max-width: 420px; margin-left: auto; }
.mc-shell { flex: 1; display: grid; grid-template-columns: 190px minmax(260px, 380px) 1fr; min-height: 0; }
.mc-folders { border-right: 1px solid var(--line); padding: .5rem; overflow-y: auto; background: var(--paper); }
.mc-folders-h { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .8rem .4rem .3rem; }
.mc-folder { display: flex; justify-content: space-between; align-items: center; padding: .4rem .6rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); }
@media (hover: hover) and (pointer: fine) { .mc-folder:hover { background: var(--surface); } }
.mc-folder.is-active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.mc-count { font-size: var(--fs-xs); font-weight: 700; background: var(--brand); color: #22262a; border-radius: 10px; padding: 0 .45rem; }
.mc-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.mc-list-h { display: flex; justify-content: space-between; align-items: center; padding: .5rem .8rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mc-item { display: flex; flex-direction: column; gap: 1px; padding: .55rem .8rem; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; border-left: 3px solid transparent; }
@media (hover: hover) and (pointer: fine) { .mc-item:hover { background: var(--surface-2); } }
.mc-item.is-active { background: var(--accent-soft); border-left-color: var(--brand); }
.mc-item.is-unread .mc-from, .mc-item.is-unread .mc-subj { font-weight: 700; color: var(--ink); }
.mc-row { display: flex; justify-content: space-between; gap: .5rem; }
.mc-from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-date { font-size: var(--fs-xs); color: var(--muted); flex: none; }
.mc-subj { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-prev { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-read { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.mc-read-h { padding: .9rem 1.1rem .6rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.mc-read-h h1 { font-size: var(--fs-lg); margin: 0 0 .4rem; }
.mc-actions { margin-top: .6rem; flex-wrap: wrap; }
.mc-atts { padding: .5rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.mc-frame { flex: 1; width: 100%; min-height: 60vh; border: 0; background: #fff; }
.mc-pad { padding: .6rem .8rem; }
.mc-empty { margin: auto; padding: 2rem; text-align: center; }
.mc-compose { max-width: 900px; width: 100%; margin: 1rem auto; padding: 0 1rem; overflow-y: auto; }
@media (max-width: 900px) {
    .mc-shell { grid-template-columns: 1fr; }
    .mc-folders { display: flex; flex-wrap: wrap; gap: .2rem; border-right: 0; border-bottom: 1px solid var(--line); }
    .mc-folders-h { display: none; }
    .mc-list { border-right: 0; max-height: 45vh; }
}

/* Favoriten in der Navigation */
.nav-row { display: flex; align-items: center; }
.nav-row .nav-item { flex: 1; min-width: 0; }
.nav-fav { flex: none; width: 26px; height: 26px; border: 0; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 6px; font-size: var(--fs-md); line-height: 1; opacity: 0; }
.nav-fav:focus-visible, .nav-fav.is-on { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .nav-row:hover .nav-fav { opacity: 1; } }
@media (hover: none) {
    .nav-fav { opacity: 1; }
}
.nav-fav.is-on { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .nav-fav:hover { background: var(--surface); color: var(--accent); } }

/* Mindestgröße 24 × 24 px für kleine Klickziele (WCAG 2.5.8); mobil gelten die größeren Werte darunter. */
.linkbtn, .th-sort, .tbl a.rowlink, .list-plain a { min-height: 24px; }
.th-sort { align-items: center; }
.linkbtn, .tbl a.rowlink, .list-plain a { display: inline-flex; align-items: center; }

/* Größere Trefferflächen auf kleinen Bildschirmen; die Desktopansicht bleibt kompakt. */
@media (max-width: 900px) {
    .linkbtn, .version a, .stat a, .tiles a, .admin-tile, summary {
        min-height: 44px;
        align-content: center;
    }
    .linkbtn, .version a, .stat a { display: inline-flex; align-items: center; }
    .linkbtn { padding-inline: 8px; }
    .crumb a, .th-sort, .rowlink, .list-plain a, .main a:not([class]):not(:where(p a, li a, td a)) {
        min-height: 24px; display: inline-flex; align-items: center;
    }
    .main input:is([type="checkbox"], [type="radio"]) { min-width: 24px; width: 24px; min-height: 24px; height: 24px; flex-shrink: 0; }
    .nav-fav, .bar .icon-btn { min-width: 44px; width: 44px; height: 44px; }
    .nav-row .nav-item, .nav-group > summary { min-height: 44px; }
    .check { min-height: 44px; align-items: center; }
    .check input { margin-top: 0; }
    .tbl input[type="checkbox"] { width: 24px; height: 24px; }
}

/* Eigene Arbeitsfläche für Dokumentvorlagen, ohne Portal-Seitenleiste. */
.document-workspace .main { max-width: none; padding: .75rem; }
.document-workspace-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.document-workspace-head h1 { font-size: var(--fs-xl); margin: 0; }
.pdf-template-settings { margin-bottom: .5rem; }
.pdf-template-settings > summary { cursor: pointer; padding: .4rem .6rem; }
.pdf-template-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem; }
.pdf-template-toolbar .field { margin: 0; }
#pdfTemplateStatus:empty { display: none; }
#pdfTemplateStatus { margin: 0; }
.pdf-template-designer { height: max(420px, calc(100dvh - 190px)); background: white; color: #222; }
.pdf-template-kinds { margin-bottom: .5rem; }
.pdf-template-tools { padding-top: 0; }
.pdf-template-mode button { padding: .3rem .8rem; min-height: 36px; border: 0; font: inherit; font-size: var(--fs-sm); color: var(--muted); background: var(--surface); cursor: pointer; }
.pdf-template-mode button + button { border-left: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .pdf-template-mode button:hover { background: var(--surface-2); color: var(--ink); } }
.pdf-template-mode button.is-active { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.pdf-template-mode button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pdf-template-tools select { min-height: 36px; max-width: 22rem; }
.pdf-template-advanced { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-sm); color: var(--muted); }
.pdf-template-hint { margin: 0 .5rem .4rem; font-size: var(--fs-sm); color: var(--muted); }
.pdf-template-hint kbd, .pdf-template-help kbd { font: inherit; font-size: var(--fs-xs); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 .3rem; background: var(--surface-2); }
#pdfTemplateWarn { margin: 0 .5rem .5rem; }
#pdfTemplateStatus { padding: 0 .5rem .4rem; }
.pdf-template-preview { height: max(420px, calc(100dvh - 190px)); background: var(--surface-2); }
.pdf-template-preview iframe { width: 100%; height: 100%; border: 0; display: block; background: white; }
.pdf-template-versions { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .35rem; }
.pdf-template-versions li.is-open > a { font-weight: 600; }
.pdf-template-help ol { padding-left: 1.2rem; display: grid; gap: .4rem; }
.pdf-template-mobile { display: none; margin: 0 .5rem .5rem; }
@media (max-width: 760px) { .pdf-template-mobile { display: block; } }
.pdf-template-previewing .pdf-template-edit-only { display: none; }
.pdf-template-selected { margin: 0 .5rem .4rem; font-size: var(--fs-sm); }
.pdf-template-selected:empty { display: none; }
/* Datenfelder im Editor: grün umrandet, Bezeichnung beim Überfahren */
.pdf-template-designer .selectable[data-ck-field] { box-shadow: inset 0 0 0 1px #1e7a4b; background-color: rgba(30, 122, 75, .07); }
@media (hover: hover) and (pointer: fine) { .pdf-template-designer .selectable[data-ck-field]:hover::before { content: "Datenfeld: " attr(data-ck-field); position: absolute; left: 0; bottom: 100%; z-index: 5;
    padding: 1px 6px; border-radius: 3px; background: #1e7a4b; color: #fff; font: 12px/1.4 system-ui, sans-serif; white-space: nowrap; pointer-events: none; } }

/* Benutzermenü in beiden Portalen. Native Details bleiben ohne JavaScript bedienbar. */
.user-menu{position:relative;flex:none}
.user-menu>summary{display:flex;align-items:center;gap:9px;cursor:pointer;list-style:none;border-radius:4px;padding:3px 5px;font-size:var(--fs-xs)}
.user-menu>summary::-webkit-details-marker{display:none}
.user-menu>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.user-menu .admin-profile{display:grid;place-items:center;border-radius:50%;width:30px;height:30px;background:var(--brand);color:#fff;font-size:var(--fs-xs);flex:none}
.user-menu-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-menu>nav{position:absolute;right:0;top:calc(100% + 10px);min-width:245px;z-index:100;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:4px;box-shadow:0 5px 18px #0002;padding:6px}
.user-menu>nav>strong{display:block;font-size:var(--fs-xs);padding:10px;overflow-wrap:anywhere}
.user-menu>nav>a{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:2px;color:inherit;text-decoration:none;font-size:var(--fs-xs)}
.user-menu>nav>a:focus-visible {background:var(--surface-2)}
@media (hover: hover) and (pointer: fine) { .user-menu>nav>a:hover {background:var(--surface-2)} }
.user-menu>nav svg{width:16px;height:16px;flex:none}
.support-text{white-space:normal;overflow-wrap:anywhere}
.support-comment{border-top:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}
@media(max-width:700px){.user-menu-name{display:none}.user-menu>nav{max-width:calc(100vw - 20px)}}

/* -------------------------------------------- Benachrichtigungen (Toasts, Badges, Glocke) */
/* Toasts blenden mit Slide-/Flatter-Effekt ein und nach 5 s wieder aus (#77). */
.toast { transition: opacity .35s ease, transform .35s ease; }
.toast-live { opacity: 0; transform: translateX(1.5rem); }
.toast-live.toast-in { opacity: 1; transform: none; }
.toast-out { opacity: 0 !important; transform: translateX(1.75rem) !important; }
@media (prefers-reduced-motion: reduce) {
    .toast, .toast-live, .toast-live.toast-in, .toast-out { transition: none; transform: none; }
}

/* Zähler-Badge am Menüpunkt (#90) */
.nav-item { position: relative; }
.nav-badge {
    margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--badge-bg); color: #fff; font-size: var(--fs-xs); font-weight: 700;
    display: inline-grid; place-items: center; line-height: 1; flex: none;
}

/* Benachrichtigungen als Dropdown an der Glocke (#94) – am Benutzermenü ausgerichtet */
.bell-menu { position: relative; flex: none; }
.background-jobs-menu { position: relative; flex: none; }
.background-jobs-menu > summary { list-style: none; cursor: pointer; }
.topbar-right .icon-btn { width: 44px; height: 44px; }   /* Uhr, Glocke und Dunkelmodus gleich groß: Badges auf einer Linie, Touchfläche 44 px */
.background-jobs-menu > summary::-webkit-details-marker { display: none; }
.background-jobs-panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 100;
    width: min(380px, 90vw); max-height: 65vh; overflow: auto; overscroll-behavior: contain;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
    box-shadow: 0 5px 18px #0002; padding: 6px;
}
.background-jobs-count { display: contents; }   /* Zähler-Hülle (immer mit Screenreader-Text) bildet keine eigene Grid-Zeile, sonst sitzt die Uhr höher als Glocke und Mond */
.background-job { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.background-job-title { display: block; min-height: 44px; align-content: center; font-weight: 600; }
.background-job progress { width: 100%; height: 8px; accent-color: var(--accent); }
.background-job p { margin: 0; }
.background-jobs-note { padding: 6px 10px; }
.admin-panel .topbar .background-jobs-menu[open] > summary,
.admin-panel .topbar .background-jobs-menu > summary:focus-visible { background: var(--surface); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .admin-panel .topbar .background-jobs-menu > summary:hover { background: var(--surface); color: var(--ink); } }
@media (max-width: 600px) {
    .background-jobs-menu { position: static; }
    .background-jobs-panel { position: fixed; left: 8px; right: 8px; width: auto; top: var(--jobs-panel-top, 58px); max-height: 60vh; }
    .topbar-right .feedback-trigger > span { display: none; }
    .topbar-right .feedback-trigger { min-width: 44px; min-height: 44px; padding: 0; }
}
@media (max-width: 420px) { .topbar-right { flex-wrap: wrap; gap: 0; flex-basis: 0; } }
.bell-menu > summary { list-style: none; cursor: pointer; }
.bell-menu > summary::-webkit-details-marker { display: none; }
.bell-menu > nav {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, 90vw); z-index: 100;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
    box-shadow: 0 5px 18px #0002; padding: 6px; max-height: 70vh; overflow: auto;
}
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 8px 10px; }
.bell-head-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }   /* Zielgröße 24 px (WCAG 2.5.8, #858) */
.bell-head-link:focus-visible { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .bell-head-link:hover { text-decoration: underline; } }
.bell-empty { padding: 14px 10px; }
.bell-item { display: block; margin: 0; border-radius: 2px; }
.bell-item.is-unread { background: var(--accent-soft); }
.bell-item .bell-link {
    display: grid; gap: 2px; width: 100%; min-width: 0; text-align: left; padding: 9px 10px;
    background: none; border: 0; cursor: pointer; color: inherit; font: inherit;
}
.bell-item .bell-link:focus-visible { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .bell-item .bell-link:hover { background: var(--surface-2); } }
.bell-title { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.bell-item .bell-link > * { min-width: 0; overflow-wrap: anywhere; }
/* Schmale Bildschirme: Menü am Bildschirmrand statt am Glockenknopf ausrichten (#333) */
@media (max-width: 600px) {
    .bell-menu { position: static; }
    .bell-menu > nav { position: fixed; left: 8px; right: 8px; top: var(--bell-menu-top, 58px); width: auto; max-width: none; }   /* portal.js misst die Kopfzeile mit Suchzeile (#856) */
}
code { overflow-wrap: anywhere; }
.bell-all { display: block; text-align: center; padding: 9px 10px; font-size: var(--fs-sm); border-top: 1px solid var(--line); margin-top: 4px; }

/* Zahnrad-Adminmenü: Klick öffnet den Adminbereich, Überfahren klappt die Punkte auf */
.gear-menu { position: relative; flex: none; }
.gear-menu > .gear { position: relative; }
.gear-pop {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, 90vw); z-index: 100;
    /* Schließt erst nach kurzer Verzögerung: kleine Mausbewegungen über den Rand hinaus lassen das Menü offen. */
    visibility: hidden; opacity: 0; transition: opacity .12s ease .3s, visibility 0s linear .42s;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
    box-shadow: 0 5px 18px #0002; padding: 6px; max-height: 70vh; overflow: auto;
}
.gear-menu:focus-within .gear-pop { visibility: visible; opacity: 1; transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .gear-menu:hover .gear-pop { visibility: visible; opacity: 1; transition-delay: 0s; } }
/* Brücke über den Abstand zum Menü */
@media (hover: hover) and (pointer: fine) { .gear-menu:hover::after { content: ''; position: absolute; right: 0; top: 100%; width: min(300px, 90vw); height: 12px; } }
.gear-menu.is-dismissed .gear-pop { visibility: hidden; opacity: 0; transition: none; }   /* Esc schließt das Menü, bis Maus oder Fokus es verlassen (WCAG 1.4.13) */
.gear-pop > strong { display: block; font-size: var(--fs-xs); padding: 10px; }
.gear-pop > a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 2px; color: inherit; text-decoration: none; font-size: var(--fs-xs); }
.gear-pop > a:focus-visible { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .gear-pop > a:hover { background: var(--surface-2); } }
.gear-pop svg { width: 16px; height: 16px; flex: none; }

/* Admin-Übersicht (eigenes Fenster): Kacheln der Bereiche */
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-top: 1rem; }
.admin-tile {
    display: flex; align-items: center; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface); color: inherit; text-decoration: none; font-weight: 600; transition: border-color .15s, background .15s;
}
.admin-tile:focus-visible { border-color: var(--accent); background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .admin-tile:hover { border-color: var(--accent); background: var(--surface-2); } }
.admin-tile svg { width: 22px; height: 22px; flex: none; color: var(--muted); }

/* Administration → Module */
.module-card{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:var(--surface);margin-bottom:10px}
.module-card.is-on{border-color:var(--accent-line)}
.module-card-static .module-card-head{cursor:default}
.module-card.is-locked{display:flex;gap:12px;align-items:center;opacity:.65}
.module-card-head{display:flex;gap:12px;align-items:flex-start;cursor:pointer}
.module-card-head>div{flex:1;display:flex;flex-direction:column;gap:2px}
.module-card details{margin-top:8px}
.module-card summary{cursor:pointer;color:var(--accent);font-size: var(--fs-md)}
.module-fn{display:flex;gap:10px;align-items:flex-start;padding:6px 0}
.module-pick{display:flex;flex-wrap:wrap;gap:6px 16px}

/* Bankumsatz direkt in der Liste verbuchen (#106) */
/* Bankabgleich: Kassenbuch-Formular in einer Zeile unter dem Umsatz (#569 ux-26) */
.tx-book-row > td { background: var(--surface-2); }
.tx-book-row form { max-width: 480px; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* Moduleinstellungen: Knopf neben dem Seitentitel, Seitenleiste von rechts (mobil Vollbild) */
.page-top .settings-btn { align-self: baseline; }
@media (max-width: 640px) { .settings-btn-modul { display: none; } }
dialog.settings-drawer {
    margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line);
    width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float);
}
dialog.settings-drawer[open] { display: flex; flex-direction: column; }
.settings-drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.settings-drawer-head h2 { font-size: var(--fs-lg); margin: 0; }
.settings-drawer-body { padding: 1.25rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.settings-drawer-body .card { box-shadow: none; }
@media (max-width: 640px) { dialog.settings-drawer { width: 100vw; border-left: 0; } }
/* Seitenleiste: kurze Felder nebeneinander statt untereinander */
.settings-drawer .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: start; }
.settings-drawer-body h3 { margin: 0 0 .5rem; }
@media (prefers-reduced-motion: no-preference) {
    dialog.settings-drawer[open] { animation: settings-in .18s ease-out; }
    @keyframes settings-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Schmale Bildschirme: lange Beschriftungen umbrechen statt die Seite seitlich zu verbreitern */
@media (max-width: 640px) { .btn { white-space: normal; text-align: center; } }

/* Smartphone: Suche in eigener Zeile unter Menü und Symbolen, damit der Hinweistext lesbar bleibt */
/* Kopfzeile schmal (#544 ui-1): Menüschalter und Symbole bleiben in einer Zeile, nur die Suche bricht in die zweite */
@media (max-width: 520px) {
    .topbar { flex-wrap: wrap; row-gap: .45rem; column-gap: .4rem; padding-inline: .6rem; }
    .topbar .gsearch { order: 3; flex: 1 0 100%; max-width: none; }
    .topbar-right { margin-left: auto; gap: .25rem; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
    .topbar-right .btn { padding-inline: .6rem; }
}

/* Notizen an Kunden und Kundeninstanzen (lib/notes.php): + klappt das Eingabefeld auf, Stift und Papierkorb je Notiz */
.notes-card { position: relative; }
.notes-head { display: flex; align-items: center; gap: .5rem; min-height: 36px; padding-right: 44px; }
.notes-head h3 { margin: 0; }
.notes-count { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--surface-2);
    color: var(--muted); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4rem; text-align: center; vertical-align: middle; }
.notes-add > summary { position: absolute; top: 0; right: 0; list-style: none; }
.notes-card.card .notes-add > summary { top: .65rem; right: .8rem; }
.notes-add > summary::-webkit-details-marker { display: none; }
.notes-add > summary .i { transition: transform var(--t); }
.notes-add[open] > summary { color: var(--ink); background: var(--surface-2); }
.notes-add[open] > summary .i { transform: rotate(45deg); }
.notes-form { display: grid; gap: .5rem; margin: .5rem 0 .75rem; }
.notes-form textarea { width: 100%; min-height: 4.5rem; resize: vertical; }
.notes-form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.notes-list { list-style: none; margin: 0; padding: 0; }
.note { display: flex; gap: .5rem; align-items: flex-start; padding: .65rem 0; border-top: 1px solid var(--line); }
.notes-list .note:first-child { border-top: 0; }
.note.is-editing { display: block; }
.note:target { background: var(--accent-soft); border-radius: var(--r-ctl); padding-inline: .5rem; }
.note-main { flex: 1; min-width: 0; }
.note-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-meta { margin: .2rem 0 0; color: var(--muted); font-size: var(--fs-sm); }
.note-actions { display: flex; gap: .15rem; flex: none; }
.note-actions form { margin: 0; }
@media (hover: hover) and (pointer: fine) { .note-actions .icon-btn:hover:last-child { color: var(--danger); } }
@media (prefers-reduced-motion: reduce) { .notes-add > summary .i { transition: none; } }
@media (max-width: 640px) { .note-actions .icon-btn, .notes-add > summary.icon-btn { width: 44px; height: 44px; } }

/* Menü: Zwischenüberschriften in langen Gruppen und Zähler am Gruppenkopf (#346) */
.nav-sub > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem;
    padding: .55rem .65rem .2rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary::after {
    content: ""; margin-left: auto; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(-45deg); transition: transform .15s;
}
.nav-sub[open] > summary::after { transform: translateY(-2px) rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .nav-sub > summary:hover { color: var(--ink); } }
.nav-sub > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-ctl); }
@media (prefers-reduced-motion: reduce) { .nav-sub > summary::after { transition: none; } }
@media (max-width: 900px) { .nav-sub > summary { min-height: 44px; } }
.nav-group > summary .nav-group-badge { margin-left: auto; flex: none; }
.nav-group[open] > summary .nav-group-badge { display: none; }
html.nav-mini .nav-sub > summary { display: none; }
html.nav-mini .nav-sub:not([open]) > .nav-sub-items { display: block; }

/* Klickziele mindestens 24 × 24 px (WCAG 2.5.8, #373): Aufklapper, Dashboard-Werte, Brotkrumen, Spaltenköpfe */
.sub-banner summary, details.more > summary, .col-picker > summary, details.card > summary { min-height: 24px; line-height: 24px; }   /* kein display:flex: sonst verschwindet das Aufklapp-Dreieck */
.dl dd a, .crumbs a { display: inline-block; min-height: 24px; line-height: 24px; }
a.th-sort { min-width: 24px; }

/* Sehr lange Werte (Namen, Orte, Adressen) brechen überall im Inhalt um und sprengen weder Brotkrumen noch Suchtreffer (#310) */
.main { overflow-wrap: anywhere; }
/* In Tabellen nicht „anywhere“: das ließe Spalten auf ein Zeichen schrumpfen und Nummern buchstabenweise umbrechen; lange Werte scrollen im .table-wrap */
.main .tbl, .main .tbl td, .main .tbl th { overflow-wrap: break-word; }

/* Vorschau in der Seitenleiste (#487): Raster der Zielseite einspaltig */
.vorschau-inhalt .grid-side, .vorschau-inhalt .grid, .vorschau-inhalt .grid-2 { grid-template-columns: 1fr; }
.vorschau-inhalt .card + .card, .vorschau-inhalt .stack + .stack { margin-top: 1rem; }

/* Prüfliste ui-ux-pro-max (#521): Trefferflächen auf dem Smartphone mindestens 44 px, auch für die 24-px-Regeln oben */
@media (max-width: 900px) {
    .sub-banner summary, details.more > summary, .col-picker > summary, details.card > summary { min-height: 44px; line-height: 44px; }
    .rowlink, .list-plain a, .dl dd a { min-height: 44px; }
    .nav .nav-item, .nav-group .nav-item { min-height: 44px; }
    .user-menu > summary { min-width: 44px; }
    .main :is(input, select, textarea), .gsearch input, .bulkbar :is(input, select, .btn), .seg a, .pdf-template-mode button, .pdf-template-tools select { min-height: 44px; }
    .tab { min-height: 44px; display: inline-flex; align-items: center; }
    .rte-btn { min-width: 44px; height: 44px; }
    a.th-sort, .jump a { min-height: 44px; }
    .pager a, .pager span { min-width: 44px; min-height: 44px; }
    .main .crumbs a { padding-inline: .35rem; }
    .main .crumbs { align-items: center; }
    .main .crumbs a { display: inline-flex; align-items: center; min-height: 44px; line-height: 1.4; }
}

/* ---------------------------------------------- Druck-Rückmeldung (Touch) */
/* Hover gilt nur mit Maus (hover: hover); beim Antippen zeigt :active denselben Zustand sofort, statt des Tipp-Blitzes. */
.btn:active { background: var(--surface-2); border-color: var(--muted-2); }
.btn-primary:active, .lotse-knopf:active { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-danger:active { background: var(--danger); color: #fff; }
.btn-ghost:active, .icon-btn:active, .tab:active, .seg a:active, .pager a:active, .help-nav a:active,
.user-menu>nav>a:active, .gear-pop > a:active, .bell-item .bell-link:active, .menu-more-list .btn:active { background: var(--surface-2); color: var(--ink); }
.nav-item:active, .side-account > summary:active, .nav-group > summary:active, .side-mini:active { background: var(--surface); color: var(--ink); }
a.tile:active, .admin-tile:active { border-color: var(--accent); }
.btn[disabled]:active { background: var(--surface); }

/* Karte „Neu in Clubkern“ auf der Startseite */
.news-list { margin: 0; padding-left: 1.1em; }
.news-list li + li { margin-top: .6rem; }

/* E-Mail-Einrichtung: Postfachliste, Assistent, Prüfergebnis (Administration → E-Mail) */
.mb-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .9rem 0; border-top: 1px solid var(--line); }
.mb-row:first-child { border-top: 0; padding-top: 0; }
.mb-main { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.mb-main > strong { overflow-wrap: anywhere; }
.mb-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.mb-act { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.mb-err { margin: .3rem 0 0; color: var(--danger); }
.mb-av { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.mb-av[data-tone="info"] { background: var(--info-soft); color: var(--info); }
@media (max-width: 640px) { .mb-row { grid-template-columns: auto minmax(0, 1fr); } .mb-act { grid-column: 1 / -1; justify-content: flex-start; } }

.mb-steps { display: flex; list-style: none; margin: 0 0 1.25rem; padding: 0; counter-reset: mbs; }
.mb-wizard:not(.is-js) .mb-steps { display: none; }
.mb-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--muted); counter-increment: mbs; min-height: 32px; }
.mb-steps li::before { content: counter(mbs); width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-weight: 700; background: var(--surface); }
.mb-steps li.is-on { color: var(--ink); font-weight: 600; }
.mb-steps li.is-on::before { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.mb-steps li.is-done::before { content: "✓"; background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.mb-steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line); margin: 0 .5rem; }
@media (max-width: 640px) { .mb-steps li > span { display: none; } .mb-steps li.is-on > span { display: inline; } }
.mb-step { margin-bottom: 1rem; }
.mb-step[hidden], .mb-panel[hidden] { display: none; }

.mb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.mb-tiles-sm { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mb-tile { position: relative; display: flex; text-align: left; min-height: 72px; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.mb-tile > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mb-tile-body { display: flex; flex-direction: column; gap: .1rem; padding: .75rem .85rem; min-width: 0; }
.mb-tile-body > span { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.mb-tile[aria-pressed="true"], .mb-tile:has(> input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mb-tile:has(> input:focus-visible), .mb-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .mb-tile:hover { border-color: var(--accent-line); } }

.mb-srv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.mb-srv > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: .6rem .8rem; font-size: var(--fs-sm); }
.mb-srv dl { margin: .3rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; }
.mb-srv dt { color: var(--muted); }
.mb-srv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.mb-test { list-style: none; margin: 0; padding: 0; }
.mb-test li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.mb-test li:first-child { border-top: 0; }
.mb-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; }
.mb-ic-ok { background: var(--ok-soft); color: var(--ok); }
.mb-ic-warn { background: var(--warn-soft); color: var(--warn); }
.mb-ic-bad { background: var(--danger-soft); color: var(--danger); }

.mb-sw { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.mb-sw:first-of-type { border-top: 0; }
.mb-sw > span { display: flex; flex-direction: column; }
.mb-sw > input { width: 22px; height: 22px; accent-color: var(--primary); }
[data-mb-detail] .tabs { margin: .4rem 0 1rem; }
[data-mb-detail] .tab { background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; cursor: pointer; }
.mb-danger { color: var(--danger); }
@media (prefers-reduced-motion: no-preference) { .mb-tile { transition: background .12s, border-color .12s; } }

.mb-tile-body > strong { overflow-wrap: break-word; hyphens: auto; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

/* Mailliste: Fehlertext bei der Statusmarke auf zwei Zeilen begrenzt, voller Text im Tooltip (#856 ui-5 mit ui-8);
   ebenso der Bezug, dessen lange Aufgabentitel in der schmalen Ansicht sonst vier Zeilen füllten */
.mail-fehler, .mail-bezug { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* Belegungsplan (#910): Anlagen × Wochentage, auf schmalen Bildschirmen Tagesliste */
.belegung-tbl th[scope=row] { min-width: 10rem; max-width: 16rem; overflow-wrap: anywhere; font-weight: 600; }
.belegung-tbl td { vertical-align: top; min-width: 7.5rem; }
.belegung-tbl .belegung-heute { background: var(--surface-2); }
.belegung-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.belegung-liste li { line-height: 1.3; overflow-wrap: anywhere; }
.belegung-tbl th.belegung-teil { font-weight: 400; padding-left: 1.5rem; }
.belegung-hinweis { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .25rem; font-weight: 400; }
.belegung-feiertag { flex: 1; }
.belegung-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.belegung-ort { display: block; }
.belegung-abgesagt strong, .belegung-abgesagt > a { text-decoration: line-through; }
.belegung-tage { display: none; }
.belegung-tag { font-size: var(--fs-sm, .95rem); margin: .9rem 0 .35rem; padding-bottom: .2rem; border-bottom: 1px solid var(--line); }
.belegung-tag:first-child { margin-top: 0; }
@media (max-width: 720px) {
    .belegung-woche { display: none; }
    .belegung-tage { display: block; }
}

/* ----------------------------------------------- Saisonale Akzente und Funken (lib/saison.php, Spec 2026-11-13) */
/* Feste Motivfarben aus --warn, --info, --danger, --ok: --brand folgt der Vereinsfarbe (Kürbis und Sonne wären sonst grün). */
/* Motiv neben der Begrüßung: rein dekorativ, feste Größe (höchstens eine Zeilenhöhe der Überschrift, ≤ 1,6 rem),
   nicht klickbar. Ohne Bewegung ist der Grundzustand das fertige Bild; animiert werden nur transform und opacity. */
.saison { display: inline-block; position: relative; width: .95em; height: .95em; margin-left: .4em; vertical-align: -.12em;
    pointer-events: none; user-select: none; -webkit-user-select: none; }
.saison > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.saison > i { position: absolute; display: block; }
.page-sub .saison-text { color: var(--ink-2); }

.saison-kerze { fill: var(--info); }
.saison-flamme { fill: var(--warn); transform-box: fill-box; transform-origin: 50% 100%; }
.saison-blatt { fill: var(--danger); fill-opacity: .45; }
.saison-mitte, .saison-sonne { fill: var(--warn); }
.saison-strahl { stroke: var(--warn); stroke-width: 2; stroke-linecap: round; fill: none; }
.saison-ei { fill: var(--info); }
.saison-band { fill: var(--surface); fill-opacity: .7; }
.saison-schwarz { fill: #000; }
.saison-rot { fill: #dd0000; }
.saison-gold { fill: #ffce00; }
.saison-einheit > svg { height: auto; margin-top: .3em; }
html[data-theme="dark"] .saison-einheit > svg { outline: 1px solid var(--line-strong); }   /* Schwarz auf dunklem Grund sichtbar */
.saison-stiel { fill: var(--ok); }
.saison-kuerbis { fill: var(--warn); }
.saison-rille { stroke: var(--surface); stroke-opacity: .45; stroke-width: 1.2; fill: none; }
.saison-herz { fill: var(--danger); }

/* Partikel (je Motiv drei <i>): Endbild als feste Anordnung */
.saison-weihnachten > i { width: .34em; height: .34em;
    background: linear-gradient(var(--info), var(--info)) center / 1.5px 100% no-repeat; }
.saison-weihnachten > i::before, .saison-weihnachten > i::after { content: ""; position: absolute; inset: 0;
    background: inherit; transform: rotate(60deg); }
.saison-weihnachten > i::after { transform: rotate(-60deg); }
.saison-weihnachten > i:nth-child(1) { left: 0; top: .1em; }
.saison-weihnachten > i:nth-child(2) { left: .5em; top: 0; width: .42em; height: .42em; }
.saison-weihnachten > i:nth-child(3) { left: .3em; top: .55em; }

.saison-neujahr > i { width: .22em; height: .22em; border-radius: 50%; }
.saison-neujahr > i:nth-child(1) { left: .05em; top: .45em; background: var(--brand); }
.saison-neujahr > i:nth-child(2) { left: .38em; top: .05em; background: var(--danger); }
.saison-neujahr > i:nth-child(3) { left: .68em; top: .5em; background: var(--info); }

.saison-karneval > i, .saison-vereinsgeburtstag > i { width: .14em; height: .34em; border-radius: 1px; }
.saison-karneval > i:nth-child(1), .saison-vereinsgeburtstag > i:nth-child(1) { left: .05em; top: .4em; background: var(--brand); transform: rotate(-25deg); }
.saison-karneval > i:nth-child(2), .saison-vereinsgeburtstag > i:nth-child(2) { left: .4em; top: .08em; background: var(--danger); transform: rotate(35deg); }
.saison-karneval > i:nth-child(3), .saison-vereinsgeburtstag > i:nth-child(3) { left: .72em; top: .5em; background: var(--info); transform: rotate(-60deg); }

/* Neuigkeitenkarte (A + C) und Effekte über die ganze Seite (saison_effekt(), D, B, Schnee). Lage, Farbe und Takt je
   Teilchen über :nth-child(); animiert nur transform und opacity, Leuchten und Schweif sind statisch. Ohne Bewegung ist
   alles unsichtbar, nur der goldene Kartenrand bleibt. Gold und Pink haben keine passende Variable: eigene im Abschnitt. */
.news-feuerwerk, .news-funkeln, .saison-effekt { --saison-gold: #e9b62c; --saison-pink: #e46aae; }
.card:has(> .news-feuerwerk) { position: relative; }
.news-feuerwerk, .news-funkeln { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.news-feuerwerk *, .news-funkeln *, .saison-effekt * { pointer-events: none; }
.news-feuerwerk b, .saison-effekt-feuerwerk b { position: absolute; width: 0; height: 0; }
.news-feuerwerk b::before, .saison-effekt-feuerwerk b::before { content: ""; position: absolute; left: -1.5px; top: 0; width: 3px; height: 18px;
    border-radius: 2px; background: linear-gradient(currentColor, transparent); opacity: 0; }
.news-feuerwerk i, .saison-effekt-feuerwerk i { position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 7px currentColor; opacity: 0; --r: 56px; }
.news-feuerwerk i::after, .saison-effekt-feuerwerk i::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: inherit; opacity: .4; transform: translateY(7px) scale(.7); }
.news-feuerwerk i:nth-child(3n+2) { --r: 48px; } .news-feuerwerk i:nth-child(3n) { --r: 40px; }
.news-feuerwerk i:nth-child(1) { --a: 0deg; } .news-feuerwerk i:nth-child(2) { --a: 30deg; } .news-feuerwerk i:nth-child(3) { --a: 60deg; } .news-feuerwerk i:nth-child(4) { --a: 90deg; } .news-feuerwerk i:nth-child(5) { --a: 120deg; } .news-feuerwerk i:nth-child(6) { --a: 150deg; } .news-feuerwerk i:nth-child(7) { --a: 180deg; } .news-feuerwerk i:nth-child(8) { --a: 210deg; } .news-feuerwerk i:nth-child(9) { --a: 240deg; } .news-feuerwerk i:nth-child(10) { --a: 270deg; } .news-feuerwerk i:nth-child(11) { --a: 300deg; } .news-feuerwerk i:nth-child(12) { --a: 330deg; }
/* A: drei Raketen, versetzt um 0 / 0,6 / 1,2 s */
.news-feuerwerk b { --h: 170px; }
.news-feuerwerk b:nth-child(1) { left: 55%; top: 44px; color: var(--saison-gold); --d: 0s; }
.news-feuerwerk b:nth-child(2) { left: 80%; top: 64px; color: var(--danger); --d: .6s; }
.news-feuerwerk b:nth-child(3) { left: 32%; top: 58px; color: var(--info); --d: 1.2s; }
/* C: sieben Funkelsterne am Rand, nicht rechts oben (dort erwartet man einen Schließknopf), goldener Rand (bleibt auch ohne Bewegung) */
.news-funkeln::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--saison-gold); border-radius: inherit; opacity: .35; }
.news-funkeln i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; opacity: 0; background: currentColor; color: var(--saison-gold);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }   /* vierzackiger Stern mit spitzen Enden, nie gedreht (sonst ×) */
.news-funkeln i:nth-child(1) { left: 4%; top: 12px; --d: 0s; }
.news-funkeln i:nth-child(2) { left: 55%; top: calc(100% - 12px); color: var(--saison-pink); --d: .65s; }
.news-funkeln i:nth-child(3) { left: 62%; top: 10px; color: var(--brand); --d: 1.3s; }
.news-funkeln i:nth-child(4) { left: calc(100% - 12px); top: 60%; color: var(--danger); --d: 1.95s; }
.news-funkeln i:nth-child(5) { left: 12px; top: 70%; color: var(--info); --d: 2.6s; }
.news-funkeln i:nth-child(6) { left: 80%; top: calc(100% - 12px); --d: 3.25s; }
.news-funkeln i:nth-child(7) { left: 30%; top: calc(100% - 12px); color: var(--saison-pink); --d: 3.9s; }

/* Ebene über die ganze Seite: bewusst über Kopfleiste samt ihren Menüs (Stapelkontext 40), Lotse-Knopf (50) und Seitenleiste (60),
   unter Hinweisen (120) und Dialogen; Klicks gehen durch (pointer-events: none), der Effekt endet nach wenigen Sekunden */
.saison-effekt { display: none; position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; contain: strict; }
/* D: Feuerwerk, fünf Ringe à acht Funken, Seite kurz leicht abgedunkelt (höchstens 25 %) */
.saison-effekt-feuerwerk::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; }
.saison-effekt-feuerwerk i { left: -6px; top: -6px; width: 12px; height: 12px; box-shadow: 0 0 10px currentColor; --r: min(112px, 24vw); }
.saison-effekt-feuerwerk i:nth-child(odd) { --r: min(92px, 20vw); }
.saison-effekt-feuerwerk i:nth-child(1) { --a: 0deg; } .saison-effekt-feuerwerk i:nth-child(2) { --a: 45deg; } .saison-effekt-feuerwerk i:nth-child(3) { --a: 90deg; } .saison-effekt-feuerwerk i:nth-child(4) { --a: 135deg; } .saison-effekt-feuerwerk i:nth-child(5) { --a: 180deg; } .saison-effekt-feuerwerk i:nth-child(6) { --a: 225deg; } .saison-effekt-feuerwerk i:nth-child(7) { --a: 270deg; } .saison-effekt-feuerwerk i:nth-child(8) { --a: 315deg; }
.saison-effekt-feuerwerk b:nth-child(1) { left: 20%; --y: 25vh; color: var(--brand); --d: 0s; }
.saison-effekt-feuerwerk b:nth-child(2) { left: 72%; --y: 18vh; color: var(--danger); --d: .5s; }
.saison-effekt-feuerwerk b:nth-child(3) { left: 45%; --y: 38vh; color: var(--info); --d: 1.1s; }
.saison-effekt-feuerwerk b:nth-child(4) { left: 80%; --y: 46vh; color: var(--saison-gold); --d: 1.7s; }
.saison-effekt-feuerwerk b:nth-child(5) { left: 28%; --y: 14vh; color: var(--saison-pink); --d: 2.3s; }
.saison-effekt-feuerwerk b { top: var(--y); --h: calc(100vh - var(--y)); }
/* B: Konfetti, 30 Stücke; Spalte aus 10n, Versatz aus 3n, Farbe aus 5n, Takt aus 4n, Drift aus 7n */
.saison-effekt-konfetti i, .saison-effekt-schnee i { position: absolute; top: -24px; left: calc(var(--sp) + var(--sv)); opacity: 0;
    --sp: 0%; --sv: 1%; --x: 0px; --t: 4s; --d: 0s; }
.saison-effekt-konfetti i { width: 10px; height: 14px; border-radius: 2px; background: var(--brand); --rot: 420deg; }
.saison-effekt-konfetti i:nth-child(even) { --rot: -480deg; width: 8px; height: 16px; }
.saison-effekt-konfetti i:nth-child(5n+2) { background: var(--danger); } .saison-effekt-konfetti i:nth-child(5n+3) { background: var(--info); }
.saison-effekt-konfetti i:nth-child(5n+4) { background: var(--saison-gold); } .saison-effekt-konfetti i:nth-child(5n) { background: var(--saison-pink); }
.saison-effekt i:nth-child(10n+1) { --sp: 3%; --k: 0; } .saison-effekt i:nth-child(10n+2) { --sp: 41%; --k: 1; } .saison-effekt i:nth-child(10n+3) { --sp: 79%; --k: 2; } .saison-effekt i:nth-child(10n+4) { --sp: 17%; --k: 3; } .saison-effekt i:nth-child(10n+5) { --sp: 55%; --k: 4; }
.saison-effekt i:nth-child(10n+6) { --sp: 93%; --k: 5; } .saison-effekt i:nth-child(10n+7) { --sp: 29%; --k: 6; } .saison-effekt i:nth-child(10n+8) { --sp: 67%; --k: 7; } .saison-effekt i:nth-child(10n+9) { --sp: 7%; --k: 8; } .saison-effekt i:nth-child(10n) { --sp: 45%; --k: 9; }
.saison-effekt i:nth-child(3n+2) { --sv: -4%; } .saison-effekt i:nth-child(3n) { --sv: 4%; }
.saison-effekt i:nth-child(7n+1) { --x: -90px; } .saison-effekt i:nth-child(7n+2) { --x: -60px; } .saison-effekt i:nth-child(7n+3) { --x: -30px; } .saison-effekt i:nth-child(7n+4) { --x: 0px; } .saison-effekt i:nth-child(7n+5) { --x: 30px; } .saison-effekt i:nth-child(7n+6) { --x: 60px; } .saison-effekt i:nth-child(7n) { --x: 90px; }
.saison-effekt-konfetti i { --d: calc(var(--k) * .14s); --t: 3.4s; }
.saison-effekt-konfetti i:nth-child(4n+2) { --t: 3.8s; } .saison-effekt-konfetti i:nth-child(4n+3) { --t: 4.2s; } .saison-effekt-konfetti i:nth-child(4n) { --t: 3.6s; }
/* Schnee: 30 runde helle Flocken, langsam (5,6–7,4 s), leichte Drift; bläulicher Schein macht sie auch auf hellem Grund sichtbar */
.saison-effekt-schnee i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--info) 22%, #fff);
    box-shadow: 0 0 3px color-mix(in srgb, var(--info) 55%, transparent);
    --d: calc(var(--k) * .22s); --t: 6.2s; }
.saison-effekt-schnee i:nth-child(3n+2) { width: 6px; height: 6px; } .saison-effekt-schnee i:nth-child(3n) { width: 12px; height: 12px; }
.saison-effekt-schnee i:nth-child(4n+2) { --t: 7.4s; } .saison-effekt-schnee i:nth-child(4n+3) { --t: 5.6s; } .saison-effekt-schnee i:nth-child(4n) { --t: 6.8s; }

@media (prefers-reduced-motion: no-preference) {
    /* Weihnachten: Flocken fallen langsam durch das Motiv (Schleife 9–11 s, versetzt) */
    .saison-weihnachten > i { animation: saison-flocke 10s linear infinite; }
    .saison-weihnachten > i:nth-child(2) { animation-duration: 11s; animation-delay: -4s; }
    .saison-weihnachten > i:nth-child(3) { animation-duration: 9s; animation-delay: -7s; }
    @keyframes saison-flocke {
        0%   { transform: translateY(-.35em) rotate(0deg); opacity: 0; }
        15%  { opacity: 1; }
        85%  { opacity: 1; }
        100% { transform: translateY(.45em) rotate(90deg); opacity: 0; }
    }
    /* Neujahr: Funken steigen einmal auf */
    .saison-neujahr > i { animation: saison-steigen 1.2s ease-out both; }
    .saison-neujahr > i:nth-child(2) { animation-delay: .15s; }
    .saison-neujahr > i:nth-child(3) { animation-delay: .3s; }
    @keyframes saison-steigen { from { transform: translateY(.6em) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
    /* Karneval und Vereinsgeburtstag: Konfetti rieselt einmal herab (Endbild = Grundzustand mit eigener Drehung) */
    .saison-karneval > i, .saison-vereinsgeburtstag > i { animation: saison-rieseln 1.4s ease-out both; }
    .saison-karneval > i:nth-child(2), .saison-vereinsgeburtstag > i:nth-child(2) { animation-delay: .12s; }
    .saison-karneval > i:nth-child(3), .saison-vereinsgeburtstag > i:nth-child(3) { animation-delay: .24s; }
    @keyframes saison-rieseln { from { translate: 0 -.6em; opacity: 0; } to { translate: 0 0; opacity: 1; } }
    /* Geburtstag: Flamme flackert leicht */
    .saison-flamme { animation: saison-flackern 2.6s ease-in-out infinite alternate; }
    @keyframes saison-flackern { 0% { transform: scale(1, 1); } 50% { transform: scale(.92, 1.08); } 100% { transform: scale(1.04, .95); } }
    /* A: Rakete steigt aus dem unteren Kartenrand, Ring zerplatzt; zusammen ca. 3,5 s, einmal je Seitenaufruf */
    .news-feuerwerk b::before, .saison-effekt-feuerwerk b::before { animation: saison-rakete .7s ease-out forwards; animation-delay: var(--d); }
    .news-feuerwerk i, .saison-effekt-feuerwerk i { animation: saison-funke 1.4s cubic-bezier(.15, .7, .3, 1) forwards;
        animation-delay: calc(var(--d) + .65s); }
    @keyframes saison-rakete { 0% { opacity: 0; transform: translateY(var(--h)); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
    @keyframes saison-funke {
        0%   { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.8); }
        10%  { opacity: 1; }
        70%  { opacity: .95; transform: rotate(var(--a)) translateY(calc(-.9 * var(--r))) scale(1); }
        100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) scale(.6); }
    }
    /* C: Sterne funkeln versetzt in einer 4,5-s-Schleife, solange die Karte steht */
    .news-funkeln i { animation: saison-funkeln 4.5s ease-in-out infinite; animation-delay: var(--d); }
    @keyframes saison-funkeln { 0%, 100% { opacity: 0; transform: scale(.2); } 50% { opacity: .95; transform: scale(1); } }
    /* Über die ganze Seite: einmal, endet unsichtbar */
    .saison-effekt { display: block; }
    .saison-effekt-feuerwerk i { animation-duration: 1.9s; }
    .saison-effekt-feuerwerk::before { animation: saison-schleier 6s ease forwards; }
    @keyframes saison-schleier { 0% { opacity: 0; } 10%, 80% { opacity: .25; } 100% { opacity: 0; } }
    .saison-effekt-konfetti i { animation: saison-konfetti var(--t) cubic-bezier(.3, .1, .6, 1) forwards; animation-delay: var(--d); }
    @keyframes saison-konfetti {
        0%   { opacity: 0; transform: translate(0, 0) rotate(0deg); }
        8%, 85% { opacity: 1; }
        100% { opacity: 0; transform: translate(var(--x), calc(100vh + 48px)) rotate(var(--rot)); }
    }
    .saison-effekt-schnee i { animation: saison-schnee var(--t) linear forwards; animation-delay: var(--d); }
    @keyframes saison-schnee {
        0%   { opacity: 0; transform: translate(0, 0); }
        10%  { opacity: .95; }
        50%  { transform: translate(calc(var(--x) * -.6), 52vh); }
        88%  { opacity: .95; }
        100% { opacity: 0; transform: translate(var(--x), calc(100vh + 48px)); }
    }
}
