/*
 * Fairception · Stil „Glas“
 *
 * Inhalt liegt auf ruhigen Flächen über einem Lichtgrund; was schwebt, ist
 * aus Glas. Drei Materialstufen:
 *   Fläche  Karten, Fahrplan, Kalender. Kein Blur.
 *   Leiste  Kopf, Tab-Leiste, Auswahl. Blur 24 px.
 *   Blatt   Panel, Dialoge, Menüs. Blur 32 px.
 * Blur nur auf schwebenden Ebenen, damit Listen und Kalender schnell bleiben.
 * Systemschrift, keine Schriftdatei. Ein Blau für Handlung und „jetzt“,
 * Orange nur für „braucht dich“. Status ist Form, nicht Farbe: voll =
 * Buchung, gestrichelt = Reservierung, schraffiert = Portal.
 *
 * Hell und dunkel: Jeder Wert, der sich ändert, ist ein Token in :root.
 * <html data-scheme="dark"> setzt nur Tokens neu (zweiter Block). /scheme.js
 * wählt vor dem ersten Bild: Automatisch folgt dem System, Hell und Dunkel
 * sind je Gerät fest wählbar. „Weniger Transparenz“ macht alles deckend.
 *
 * Aufbau: erst Grundregeln für Raster und Bauteile, dann die Glas-Schicht
 * (ab „Glas: Grund, Schrift, Material“). Deren Regeln beginnen mit :root,
 * damit sie die Grundregeln mit demselben Gewicht übersteuern wie zuvor als
 * eigenes Theme.
 */

:root {
    /* Farben */
    --ink: #1c1f26;
    --logo-mid: #0066cc;
    --logo-core: #59a8ff;
    --paper: #ffffff;
    --shelf: rgba(28, 31, 38, 0.04);
    --shelf-2: rgba(28, 31, 38, 0.08);
    --line: rgba(28, 31, 38, 0.10);
    --line-soft: rgba(28, 31, 38, 0.06);
    --line-side: rgba(28, 31, 38, 0.08);
    --pencil: #5b6270;
    --faint: #666d7b;
    --gone: rgba(28, 31, 38, 0.03);
    --past: rgba(28, 31, 38, 0.10);
    --past-fg: #3d4350;
    --link: #0066cc;
    --link-hover: #1c1f26;
    --accent: #0066cc;
    --accent-fg: #ffffff;
    --accent-hover: #0059b3;
    --accent-soft: rgba(0, 102, 204, 0.10);
    --now: #0066cc;
    --now-soft: rgba(0, 102, 204, 0.08);
    --now-text: #0066cc;
    --now-w: 2px;
    --now-bar: 0px;
    --attention: #b35600;
    --attention-fg: #ffffff;
    --attention-soft: rgba(255, 236, 214, 0.92);
    --attention-text: #8a4200;
    --attention-line: rgba(230, 150, 60, 0.45);
    --attention-edge: #b35600;
    --pick: #0066cc;
    --pick-soft: rgba(0, 102, 204, 0.12);
    --focus: #0066cc;
    --on-bg: #ffffff;
    --on-fg: #1c1f26;
    --on-edge: rgba(28, 31, 38, 0.12);
    --on-ring: inset 0 1px 0 #ffffff, 0 1px 1px rgba(28, 39, 64, 0.08), 0 4px 14px rgba(28, 39, 64, 0.12);
    --res: #0066cc;
    --hatch: repeating-linear-gradient(135deg, rgba(28, 31, 38, 0.20) 0 1px, rgba(255, 255, 255, 0.65) 1px 6px);
    --hatch-edge: rgba(28, 31, 38, 0.16);
    --backdrop: rgba(28, 31, 38, 0.18);
    /* Schrift */
    --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;  /* Zeiten, Daten, Beträge: Ziffern gleich breit */
    --code: ui-monospace, Menlo, Consolas, monospace;  /* Tastenkürzel, Code */
    --heavy: 700;
    --bold: 600;
    --field-w: 400;
    --label-w: 600;
    --label-ls: 0.01em;
    --fs-1: 34px;
    --fs-2: 22px;
    --fs-3: 17px;
    --fs-4: 15px;
    --fs-5: 13px;
    --fs-6: 12px;
    --fs-in: 16px;
    --h1: clamp(32px, 3vw, 44px);
    --h1-lh: 1.08;
    --day-title: clamp(36px, 3.4vw, 48px);
    --display-lh: 1.05;
    --figure: 32px;
    /* Kanten und Ecken */
    --edge: 1px solid rgba(28, 31, 38, 0.10);
    --frame: 1px solid rgba(28, 31, 38, 0.08);
    --box: 1px solid rgba(28, 31, 38, 0.10);
    --thin: 1px solid rgba(28, 31, 38, 0.12);
    --divider: 1px solid rgba(28, 31, 38, 0.08);
    --rule: 1px solid rgba(28, 31, 38, 0.07);
    --mark-edge: 1.5px solid rgba(28, 31, 38, 0.30);
    --res-edge: 1.5px dashed #0066cc;
    --dash: 1.5px dashed rgba(28, 31, 38, 0.18);
    --gap-line: 1px solid rgba(28, 31, 38, 0.18);
    --bw: 1px;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 22px;
    --field-box: 1px solid rgba(28, 31, 38, 0.10);
    --field-line: 1px solid rgba(28, 31, 38, 0.10);
    --field-pad: 12px;
    --field-bg: rgba(255, 255, 255, 0.8);
    --pop: 0 24px 64px rgba(28, 39, 64, 0.22), 0 2px 6px rgba(28, 39, 64, 0.08);
    --pop-sm: 0 12px 32px rgba(28, 39, 64, 0.14), 0 1px 2px rgba(28, 39, 64, 0.06);
    /* Material */
    --glass-plane: rgba(255, 255, 255, 0.64);
    --glass-bar: rgba(255, 255, 255, 0.58);
    --glass-sheet: rgba(255, 255, 255, 0.74);
    --glass-edge: rgba(255, 255, 255, 0.85);
    --glass-light: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --glass-blur: blur(24px) saturate(180%);
    --glass-blur-deep: blur(32px) saturate(180%);
    --ink-2: #3d4350;
    --solid: #ffffff;
    --solid-base: #f2f4f8;
    --wall-base: #eef2f8;
    --track: rgba(28, 31, 38, 0.05);
    --track-hover: rgba(28, 31, 38, 0.09);
    --hover: rgba(255, 255, 255, 0.58);
    --raised: rgba(255, 255, 255, 0.74);
    --raised-hover: rgba(255, 255, 255, 0.92);
    --edge-bar: rgba(255, 255, 255, 0.75);
    --edge-sheet: rgba(255, 255, 255, 0.9);
    --edge-raised: rgba(255, 255, 255, 0.95);
    --plane-shadow: 0 8px 28px rgba(28, 39, 64, 0.07);
    --raised-shadow: 0 2px 8px rgba(28, 39, 64, 0.08);
    --label-bg: #fafbfd;
    --sheet-head: rgba(255, 255, 255, 0.55);
    --sheet-foot: rgba(255, 255, 255, 0.7);
    --sheet-card: rgba(255, 255, 255, 0.55);
    --info-soft: rgba(225, 238, 252, 0.9);
    --info-line: rgba(0, 102, 204, 0.32);
    --btn-light: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    --accent-shadow: 0 6px 16px rgba(0, 50, 120, 0.18);
    --bar-shadow: 0 3px 10px rgba(0, 60, 140, 0.18);
    --hi-ring: 0 0 0 1px rgba(0, 102, 204, 0.25);
    --wall: radial-gradient(900px 600px at 6% -4%, #cfe2ff 0%, rgba(207, 226, 255, 0) 70%),
        radial-gradient(820px 560px at 96% 2%, #e6defc 0%, rgba(230, 222, 252, 0) 70%),
        radial-gradient(900px 640px at 76% 102%, #d3f1e6 0%, rgba(211, 241, 230, 0) 70%),
        radial-gradient(720px 520px at -2% 94%, #ffe6d6 0%, rgba(255, 230, 214, 0) 70%),
        #eef2f8;
    --pad: 32px;
}

/* ---------- Dunkel: gleiche Ebenen, Rauchglas über dunklem Grund ---------- */

:root[data-scheme='dark'] {
    --logo-mid: #2f7fe0;
    --logo-core: #9fd0ff;
    color-scheme: dark;
    --ink: #eef1f6;
    --ink-2: #c9cfda;
    --paper: #161a21;
    --shelf: rgba(255, 255, 255, 0.05);
    --shelf-2: rgba(255, 255, 255, 0.10);
    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.07);
    --line-side: rgba(255, 255, 255, 0.09);
    --pencil: #a3abba;
    --faint: #8b93a3;
    --gone: rgba(255, 255, 255, 0.02);
    --past: rgba(255, 255, 255, 0.10);
    --past-fg: #c3c9d4;
    /* Blau geteilt: als Fläche kräftig (Weiß 4,5:1), als Text und „jetzt“ hell (7:1). */
    --link: #5cabff;
    --link-hover: #eef1f6;
    --accent: #1a73e8;
    --accent-fg: #ffffff;
    --accent-hover: #2b7ff0;
    --accent-soft: rgba(92, 171, 255, 0.14);
    --now: #5cabff;
    --now-soft: rgba(92, 171, 255, 0.10);
    --now-text: #5cabff;
    --attention: #b8590a;
    --attention-fg: #ffffff;
    --attention-soft: rgba(255, 159, 67, 0.14);
    --attention-text: #ffb36b;
    --attention-line: rgba(255, 159, 67, 0.38);
    --attention-edge: #ffb36b;
    --pick: #5cabff;
    --pick-soft: rgba(92, 171, 255, 0.16);
    --focus: #5cabff;
    --on-bg: rgba(255, 255, 255, 0.16);
    --on-fg: #ffffff;
    --on-edge: rgba(255, 255, 255, 0.16);
    --on-ring: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.35);
    --res: #5cabff;
    --hatch: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 1px, rgba(255, 255, 255, 0.04) 1px 6px);
    --hatch-edge: rgba(255, 255, 255, 0.18);
    --backdrop: rgba(0, 0, 0, 0.45);
    --edge: 1px solid rgba(255, 255, 255, 0.12);
    --frame: 1px solid rgba(255, 255, 255, 0.09);
    --box: 1px solid rgba(255, 255, 255, 0.12);
    --thin: 1px solid rgba(255, 255, 255, 0.14);
    --divider: 1px solid rgba(255, 255, 255, 0.09);
    --rule: 1px solid rgba(255, 255, 255, 0.08);
    --mark-edge: 1.5px solid rgba(255, 255, 255, 0.40);
    --res-edge: 1.5px dashed #5cabff;
    --dash: 1.5px dashed rgba(255, 255, 255, 0.22);
    --gap-line: 1px solid rgba(255, 255, 255, 0.22);
    --field-box: 1px solid rgba(255, 255, 255, 0.14);
    --field-line: 1px solid rgba(255, 255, 255, 0.14);
    --field-bg: rgba(255, 255, 255, 0.06);
    --pop: 0 24px 64px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
    --pop-sm: 0 12px 32px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --glass-plane: rgba(30, 34, 43, 0.66);
    --glass-bar: rgba(36, 40, 50, 0.6);
    --glass-sheet: rgba(38, 42, 53, 0.8);
    --glass-edge: rgba(255, 255, 255, 0.10);
    --glass-light: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --glass-blur: blur(24px) saturate(160%);
    --glass-blur-deep: blur(32px) saturate(160%);
    --solid: #1c2029;
    --solid-base: #0e1117;
    --wall-base: #0e1117;
    --track: rgba(255, 255, 255, 0.07);
    --track-hover: rgba(255, 255, 255, 0.11);
    --hover: rgba(255, 255, 255, 0.08);
    --raised: rgba(255, 255, 255, 0.08);
    --raised-hover: rgba(255, 255, 255, 0.14);
    --edge-bar: rgba(255, 255, 255, 0.12);
    --edge-sheet: rgba(255, 255, 255, 0.14);
    --edge-raised: rgba(255, 255, 255, 0.12);
    --plane-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    --raised-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --label-bg: #181c24;
    --sheet-head: rgba(255, 255, 255, 0.04);
    --sheet-foot: rgba(38, 42, 53, 0.85);
    --sheet-card: rgba(255, 255, 255, 0.04);
    --info-soft: rgba(92, 171, 255, 0.12);
    --info-line: rgba(92, 171, 255, 0.35);
    --btn-light: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    --accent-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    --bar-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    --hi-ring: 0 0 0 1px rgba(92, 171, 255, 0.35);
    --wall: radial-gradient(900px 600px at 6% -4%, #1a3360 0%, rgba(26, 51, 96, 0) 70%),
        radial-gradient(820px 560px at 96% 2%, #2c2358 0%, rgba(44, 35, 88, 0) 70%),
        radial-gradient(900px 640px at 76% 102%, #0f3b33 0%, rgba(15, 59, 51, 0) 70%),
        radial-gradient(720px 520px at -2% 94%, #3a2414 0%, rgba(58, 36, 20, 0) 70%),
        #0e1117;
}

/* ---------- Grundlagen ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-4) / 1.45 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
/* Grundregeln ohne Gewicht, damit jede Klasse sie übersteuert. */
:where(a) { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(a:hover) { color: var(--link-hover); }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden], .drawer [data-panel-hide] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: var(--heavy); line-height: 1.05; letter-spacing: -0.01em; }
h1, .h1 { font-size: var(--h1); line-height: var(--h1-lh); letter-spacing: -0.02em; margin: 4px 0 0; }
h2 { font-size: var(--fs-2); margin: 0 0 12px; }
h3 { font-size: var(--fs-3); margin: 0 0 8px; }
p { margin: 6px 0 12px; }
small { font-size: var(--fs-5); }
small, .muted, .mu { color: var(--pencil); }
.sm { font-size: var(--fs-5); }
.xs { font-size: var(--fs-6); }
b, strong { font-weight: var(--bold); }
.m { font-family: var(--mono); }
code, pre, kbd { font-family: var(--code); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--shelf); padding: 14px; border-radius: var(--radius); font-size: var(--fs-5); }
code { font-size: var(--fs-5); overflow-wrap: anywhere; }
kbd, .kb { display: inline-block; font: 500 var(--fs-6) / 1 var(--code); border: 1px solid currentColor; padding: 2px 4px; border-radius: var(--radius-xs); opacity: 0.65; }
.ey, .eyebrow, .timeline-label, th { font: var(--label-w) var(--fs-6) / 1.35 var(--mono); letter-spacing: var(--label-ls); text-transform: uppercase; color: var(--pencil); }
.tag { display: inline-block; padding: 1px 6px; background: var(--attention-soft); color: var(--attention-text); border-radius: var(--radius-xs); font: 600 var(--fs-6) / 1.35 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.tag.ink { background: var(--ink); color: var(--paper); }
.hl { background: var(--attention-soft); color: var(--attention-text); border-radius: var(--radius-xs); padding: 0 4px; font-family: var(--mono); font-weight: 600; }
.nowrap { white-space: nowrap; }
.block { display: block; }
.no-margin { margin: 0; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: var(--paper); padding: 10px 14px; border: var(--box); }

/* ---------- Rahmen: Kopfleiste, Inhalt, Handy-Navigation ---------- */

.fb-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: stretch; background: var(--paper); border-bottom: var(--frame); }
.fb-brand { display: flex; align-items: center; padding: 0 24px; min-height: 54px; font-weight: var(--heavy); font-size: 24px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); border-right: var(--frame); white-space: nowrap; }
.fb-brand:hover { color: var(--ink); }
.fb-logo { display: block; flex: none; width: auto; height: 22px; color: inherit; }
.fb-logo-mark { display: none; flex: none; width: auto; height: 24px; color: inherit; }
/* Zwischen Tablet und breitem Desktop reicht der Platz nicht für Wortmarke und volle Navigation: dort nur die Marke. */
@media (min-width: 801px) and (max-width: 1279px) {
    .fb-brand .fb-logo { display: none; }
    .fb-brand .fb-logo-mark { display: block; }
}
.fb-nav { display: flex; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.fb-nav a { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 18px; font-weight: 600; text-decoration: none; color: var(--ink); border-right: var(--rule); white-space: nowrap; }
.fb-nav a:hover { background: var(--shelf); color: var(--ink); }
.fb-nav a.on { background: var(--on-bg); color: var(--on-fg); }
.bd { font: 600 var(--fs-6) / 1 var(--mono); padding: 3px 5px; background: var(--shelf-2); color: var(--ink); border-radius: var(--radius-xs); }
.fb-nav a.on .bd { background: var(--paper); }
.bd.w { background: var(--attention); color: var(--attention-fg); }
.fb-tools { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; }
.fb-search { display: flex; align-items: center; gap: 10px; min-height: 42px; min-width: 230px; padding: 0 12px; border: var(--thin); border-radius: var(--radius); background: var(--paper); color: var(--pencil); text-align: left; }
.fb-search span { flex: 1; }
.fb-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.fb-icon:hover, .fb-icon.on { background: var(--shelf); color: var(--ink); }
.tenant-menu { position: relative; border: 0; padding: 0; }
.tenant-menu > summary { list-style: none; display: flex; cursor: pointer; }
.tenant-menu > summary::-webkit-details-marker { display: none; }
.tenant-menu > div { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 230px; display: grid; gap: 10px; padding: 16px; background: var(--paper); border: var(--box); border-radius: var(--radius-lg); box-shadow: var(--pop-sm); }
.tenant-menu > div a { font-weight: 600; }
.scheme-pick { padding: 10px 0; border-top: var(--rule); border-bottom: var(--rule); }
.av { width: 40px; height: 40px; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--paper); font: 600 var(--fs-6) / 1 var(--mono); letter-spacing: 0.04em; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
#main { display: block; max-width: 1680px; margin: 0 auto; padding: 0 var(--pad) 56px; min-height: calc(100dvh - 56px); }
#main > .notice:first-child { margin-top: 20px; }
.bleed { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); }
.mobile-nav { display: none; }

/* ---------- Seitenkopf, Abschnitte, Raster ---------- */

.top, .page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 28px 0 18px; margin: 0 0 24px; border-bottom: var(--frame); }
.page-heading p { margin: 10px 0 0; color: var(--pencil); }
.sec { margin-top: 44px; }
.sec:first-child { margin-top: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-bottom: 8px; border-bottom: var(--edge); }
.sec-head h2 { margin: 0; }
.sec-head a { font-weight: var(--bold); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.f1 { flex: 1; min-width: 0; }
.ml { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.section-space { margin-top: 24px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 36px; align-items: start; }
.work-col { display: grid; align-content: start; gap: 18px; min-width: 0; }
.sticky-card { position: sticky; top: 76px; }
.row > b, .un > b { overflow-wrap: anywhere; }

/* Abschnitte statt Karten: eine schwere Linie oben. */
.card { min-width: 0; padding: 14px 0 18px; border-top: var(--edge); background: transparent; }
.card-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; margin: 0 0 10px; }
.card-header h2 { margin: 0; }
.card.hi { border: var(--box); border-radius: var(--radius); padding: 16px 18px; }
.card.hi > .ey:first-child { display: inline-block; padding: 1px 6px; background: var(--attention-soft); color: var(--attention-text); font-weight: 600; border-radius: var(--radius-xs); }
.card.hi h2 { font-size: 30px; margin: 8px 0 12px; }
.subtle { background: var(--shelf); padding: 10px 12px; border-radius: var(--radius); }

/* ---------- Buttons und Links ---------- */

:where(.btn, button[type='submit'], form button:not([type])) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: var(--bw) solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); font: var(--bold) var(--fs-4) / 1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
:where(.btn, button[type='submit'], form button:not([type])):hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn-secondary, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: var(--box); border-radius: var(--radius); font: var(--bold) var(--fs-4) / 1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn-secondary, .btn-secondary:hover { background: var(--paper); color: var(--ink); }
.btn-secondary:hover { background: var(--shelf); }
.btn-danger, button.danger, .btn-danger:hover { background: var(--attention); color: var(--attention-fg); border-color: var(--attention-edge); }
.btn.g { background: none; border-color: transparent; color: var(--ink); padding: 0 4px; }
button:disabled, .btn[aria-disabled='true'] { background: var(--line); color: var(--pencil); border-color: var(--line); cursor: not-allowed; }
.quiet, .link-button { display: inline; min-height: 0; padding: 4px 0; border: 0; background: none; color: var(--link); font: var(--bold) var(--fs-4) / 1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiet:hover, .link-button:hover { background: none; color: var(--link-hover); }
.link-button { font-weight: 400; color: var(--pencil); }
.close-x { width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; border-radius: var(--radius); }
.close-x:hover { background: var(--shelf); }

/* ---------- Formulare: Kassenbuchzeilen ---------- */

form { margin: 0; }
label, .field { display: block; margin: 0 0 16px; font-size: var(--fs-5); font-weight: 600; color: var(--ink); }
label small { display: block; margin-top: 4px; font-weight: 400; }
:where(input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']), select) { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px var(--field-pad); border: var(--field-box); border-bottom: var(--field-line); border-radius: var(--radius); background: var(--field-bg); color: var(--ink); font: var(--field-w) var(--fs-in) / 1.3 var(--sans); }
:where(select) { padding-right: 24px; }
:where(textarea) { display: block; width: 100%; min-height: 96px; margin-top: 6px; padding: 10px 12px; border: var(--box); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 400 var(--fs-4) / 1.45 var(--sans); resize: vertical; }
:where(input, select, textarea)::placeholder { color: var(--faint); }
input[type='file'] { display: block; margin-top: 8px; font-size: var(--fs-5); }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--accent); }
.checkbox, label.checkbox { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; font-size: var(--fs-4); font-weight: 400; }
.checkbox input { margin-top: 1px; }
.field-error { display: block; margin-top: 4px; font-weight: 600; }
.field-error::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--attention); }
details { border-top: var(--rule); padding: 12px 0; }
summary { cursor: pointer; font-weight: var(--bold); min-height: 28px; }
details[open] > summary { margin-bottom: 12px; }
progress { width: 100%; accent-color: var(--accent); }
.form-wrap { max-width: 760px; }
.form-wrap label.checkbox { display: flex; }
.form-wrap input[type='checkbox'], .form-wrap input[type='radio'] { width: 20px; }
form.row { margin: 0; }
form.row :where(input:not([type='checkbox']):not([type='radio']):not([type='hidden']), select) { width: auto; min-width: 0; margin: 0; }
form.row.ml { margin-left: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: var(--thin); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 600 var(--fs-5) / 1.1 var(--sans); text-decoration: none; cursor: pointer; }
.chip:hover { background: var(--shelf); color: var(--ink); }
.chip.on { background: var(--on-bg); color: var(--on-fg); border-color: var(--on-edge); }
.chip-select { width: auto !important; min-height: 44px !important; margin: 0 !important; padding: 0 30px 0 12px !important; border: var(--box) !important; border-radius: var(--radius) !important; font-size: var(--fs-4) !important; font-weight: var(--bold) !important; }

.seg, .seg-choice { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: var(--box); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.seg a, .seg button, .seg > span { display: flex; align-items: center; min-height: 40px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: var(--bold) var(--fs-4) / 1 var(--sans); text-decoration: none; }
.seg a + a, .seg button + button { border-left: var(--rule); }
.seg .on, .seg a[aria-current] { background: var(--on-bg); color: var(--on-fg); box-shadow: var(--on-ring); }
.seg-choice { margin-top: 14px; }
.seg-choice label { display: flex; margin: 0; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font: var(--bold) var(--fs-4) / 1 var(--sans); cursor: pointer; }
.seg-choice label + label span { border-left: var(--rule); }
.seg-choice input:checked + span { background: var(--on-bg); color: var(--on-fg); box-shadow: var(--on-ring); }
.seg-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ---------- Status, Hinweise, Listen, Tabellen ---------- */

.pl, .badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 7px; border: var(--thin); border-radius: var(--radius-xs); background: var(--paper); color: var(--ink); font: 500 var(--fs-6) / 1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.pl::before { content: ''; width: 8px; height: 8px; flex: none; border: 1px solid var(--ink); background: var(--paper); }
.pl.ok::before { background: var(--accent); }
.pl.in { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pl.in::before { border-color: var(--paper); background: var(--paper); }
.pl.wa, .pl.bad, .badge-warning, .badge-danger { background: var(--attention-soft); border-color: var(--attention-line); color: var(--attention-text); }
.pl.wa::before, .pl.bad::before { background: var(--attention-text); border-color: var(--attention-text); }
.pl.bad { font-weight: 600; }
.pl.ne { color: var(--pencil); border-color: var(--line); }
.pl.ne::before { border-color: var(--faint); }
.pl.uk { border-style: dashed; }

.notice { margin: 0 0 16px; padding: 12px 16px; border: var(--box); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-4); }
.notice p:last-child { margin-bottom: 0; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice-warning { box-shadow: inset 0 6px 0 var(--attention); padding-top: 18px; }
.notice-error { background: var(--attention-soft); color: var(--attention-text); }
.notice-success { background: var(--ink); color: var(--paper); }
.notice-success a { color: var(--paper); }

.empty { padding: 12px 0; color: var(--pencil); }
.empty strong { display: block; color: var(--ink); }
.empty-state { display: grid; justify-items: start; gap: 6px; padding: 20px; border: var(--dash); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.card.empty-state { border: var(--dash); padding: 20px; }
.empty-state > b { font-size: var(--fs-3); }
.empty-state > span { color: var(--pencil); }
.empty-state .row { margin-top: 6px; }
.collapsed { display: flex; align-items: center; gap: 10px; }
.collapsed-groups { margin: 14px 0 0; color: var(--pencil); font-size: var(--fs-5); }

.list-row, .un { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 11px 0; border-bottom: var(--rule); }
.list-row:last-child, .un:last-child { border-bottom: 0; }
.list-row small, .list-row strong { display: block; }
.list-plain { margin: 0; padding: 0; list-style: none; }
.list-plain li { padding: 10px 0; border-bottom: var(--rule); }
.task-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 14px; padding: 14px 0; border-bottom: var(--rule); }
.task-row:last-child { border-bottom: 0; }
.task-row strong, .task-row small { display: block; }
.dot { width: 10px; height: 10px; flex: none; border: var(--thin); }
.dot.busy { background: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-4); text-align: left; }
th { padding: 10px 14px 8px 0; border-bottom: var(--edge); text-align: left; white-space: nowrap; }
td { padding: 12px 14px 12px 0; border-bottom: var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: var(--bold); }
.money { text-align: right; white-space: nowrap; font-family: var(--mono); }
th.money { font-family: var(--mono); }
.amount { font-family: var(--mono); font-weight: 600; }
.total { font: 500 var(--fs-1) / 1 var(--mono); letter-spacing: -0.02em; margin: 10px 0; }
.metric { display: inline-block; font: 500 var(--fs-2) / 1.1 var(--mono); letter-spacing: -0.02em; }
.metrics { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border-top: var(--edge); }
.metrics > * { min-width: 0; padding: 14px 18px; border-left: var(--divider); }
.metrics > *:first-child { border-left: 0; padding-left: 0; }
.metrics .card { border-top: 0; }
.metrics small { display: block; }
.metrics .metric { display: block; }
.metric-card { color: var(--ink); text-decoration: none; }
.metric-card:hover { background: var(--shelf); color: var(--ink); }
.metric-card.overdue .metric { background: var(--attention-soft); color: var(--attention-text); padding: 0 6px; border-radius: var(--radius-xs); }
.metric-card.unknown { border-left-style: dashed; }

.src { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: var(--thin); border-radius: var(--radius); color: var(--ink); font: 500 var(--fs-6) / 1.25 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
.src:hover { background: var(--shelf); color: var(--ink); }
.src i { width: 10px; height: 10px; flex: none; background: var(--accent); }
.src b { font-weight: 600; }
.src.warn i { background: var(--attention); }
.src.bad { background: var(--attention-soft); color: var(--attention-text); }
.src.bad i { background: var(--attention-text); }
.src.off i { background: none; border: 1px solid var(--faint); }

.tabs { display: flex; overflow-x: auto; margin: 0 0 18px; border-bottom: var(--frame); }
.tabs > a { padding: 12px 16px; border-right: var(--rule); color: var(--pencil); font-weight: var(--bold); text-decoration: none; white-space: nowrap; }
.tabs > a:hover { color: var(--ink); background: var(--shelf); }
.tabs > a[aria-current='page'], .tabs > a.active { background: var(--on-bg); color: var(--on-fg); }

/* ---------- Panel, Dialog, Suche ---------- */

dialog { max-height: 92dvh; padding: 0; border: var(--box); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: var(--pop); }
dialog::backdrop { background: var(--backdrop); }
.drawer { inset: 0 0 0 auto; margin: 0; width: min(640px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-left: var(--frame); border-radius: 0; box-shadow: none; }
.drawer > header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 8px 0 24px; background: var(--paper); border-bottom: var(--frame); }
.drawer > header b { font: var(--label-w) var(--fs-6) / 1 var(--mono); letter-spacing: var(--label-ls); text-transform: uppercase; }
.drawer > [data-panel-body] { padding: 20px 24px; }
.drawer h1 { font-size: var(--fs-1); }
.drawer .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer .page-heading, .drawer .grid.grid-2:has(> section) { display: grid; grid-template-columns: 1fr; }
.drawer .card { padding: 12px 0 14px; }
.drawer .card.hi { padding: 14px 16px; }
#panel.as-dialog { inset: 0; margin: auto; width: min(620px, calc(100% - 24px)); height: auto; max-height: min(90dvh, 900px); border: var(--box); border-radius: var(--radius-lg); box-shadow: var(--pop); }
.palette { width: min(600px, calc(100% - 24px)); margin: 12vh auto auto; padding: 18px; }
.palette input { width: 100%; }
.palette-results { max-height: 50vh; overflow: auto; margin: 10px 0; }
.palette-results a { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: var(--rule); color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.palette-results a small { margin-left: auto; }
.palette-results a.active { background: var(--on-bg); color: var(--on-fg); }
.palette-results a.active small { color: var(--on-fg); }
@media (prefers-reduced-motion: no-preference) {
    dialog[open] { animation: arrive 0.12s ease-out; }
    @keyframes arrive { from { opacity: 0.4; transform: translateX(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- Heute ---------- */

.desktop-day { display: block; }
.mobile-day { display: none; }
.day-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; padding-top: 32px; padding-bottom: 26px; border-bottom: var(--frame); }
.day-title { font-size: var(--day-title); line-height: var(--display-lh); letter-spacing: -0.025em; margin: 8px 0 0; }
.day-line { margin: 14px 0 0; font-size: var(--fs-3); font-weight: 600; }
.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; font-size: var(--fs-5); }
.day-nav a { font-weight: var(--bold); }
.day-stats { display: flex; flex-wrap: wrap; margin: 0; }
.day-stats > div { padding: 0 26px; border-left: var(--divider); }
.day-stats dd { margin: 4px 0 0; font: 500 var(--figure) / 1 var(--mono); }
.day-stats .hot { background: var(--attention-soft); }
.day-stats .hot dt { color: var(--attention-text); }
.day-stats .hot dd { color: var(--attention-text); }
.unit-now { flex: 0 1 540px; padding-left: 28px; border-left: var(--frame); }
.unit-now b { display: block; margin-top: 6px; font-size: clamp(32px, 3.4vw, 48px); font-weight: var(--heavy); line-height: 1; }
.unit-now span { display: block; margin-top: 8px; font-size: var(--fs-4); }
.day-grid { display: flex; flex-wrap: wrap; align-items: stretch; padding: 0; }
.day-main { flex: 999 1 600px; min-width: 0; padding: 28px var(--pad) 44px; }
.day-side { flex: 1 1 360px; min-width: 0; padding: 28px var(--pad) 44px; background: var(--shelf); border-left: var(--frame); }
.day-side .sec-head + * { border-top: 0; }

.fp-now { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.fp-now span { background: var(--now-soft); color: var(--now-text); border-radius: var(--radius-xs); padding: 2px 8px; font: 600 var(--fs-6) / 1.35 var(--mono); letter-spacing: var(--label-ls); }
.fp-now::after { content: ''; flex: 1; height: var(--now-w); background: var(--now); }
.fp-day { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 24px; padding: 6px 0; border-bottom: var(--divider); font-weight: var(--bold); }
.fp-day small { font: var(--label-w) var(--fs-6) / 1.3 var(--mono); letter-spacing: var(--label-ls); text-transform: uppercase; }
.fp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 18px 0; border-bottom: var(--rule); }
.fp-time { width: 96px; flex: none; font: 500 32px / 1 var(--mono); letter-spacing: -0.03em; }
.fp-what { flex: 1 1 280px; min-width: 0; }
.fp-what > b { font-size: var(--fs-3); font-weight: var(--heavy); margin-right: 10px; }
.fp-what > small { display: block; margin-top: 3px; font-size: var(--fs-4); }
.fp-act { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-row.done .fp-time, .fp-row.later .fp-time { color: var(--pencil); }
.fp-empty { padding: 18px 0; border-bottom: var(--rule); color: var(--pencil); }
.fp-empty b { display: block; color: var(--ink); font-size: var(--fs-3); }

.units-now { display: flex; flex-wrap: wrap; }
.units-now > div { flex: 1 1 220px; padding: 16px 20px 18px 0; margin-right: 20px; border-right: var(--rule); }
.units-now > div:last-child { border-right: 0; margin-right: 0; }
.units-now b { display: block; margin-top: 4px; font-size: var(--fs-3); font-weight: var(--heavy); }

.ol { margin: 0; padding: 0; list-style: none; counter-reset: ol; }
.ol > li { counter-increment: ol; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 12px; padding: 16px 0; border-bottom: 1px solid var(--line-side); }
.ol > li::before { content: counter(ol, decimal-leading-zero); font: 500 var(--fs-5) / 1.6 var(--mono); }
.ol > li > div { min-width: 0; }
.ol b { display: block; font-size: 17px; }
.ol a { display: inline-block; margin-top: 8px; font-weight: var(--bold); }
.money-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-side); }
.money-row > span:first-child b { display: block; }
.money-row > b { font-family: var(--mono); }
.money-row > div { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.nd { margin: 0; }
.nd > a, .nd > div { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-side); color: var(--ink); text-decoration: none; }
.nd > a:hover { background: var(--paper); }
.nd dt { width: 78px; flex: none; font: 500 var(--fs-5) / 1.5 var(--mono); }
.nd dd { margin: 0; min-width: 0; }
.nd dd span { display: block; }
.nd .q dt, .nd .q dd { color: var(--pencil); }
.gaps { margin: 0; }
.gaps > a, .gaps > div { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-side); color: var(--ink); text-decoration: none; }
.gaps > a:hover { background: var(--paper); }
.gaps dt { width: 112px; flex: none; font: 500 var(--fs-5) / 1.5 var(--mono); }
.gaps dd { margin: 0; min-width: 0; }
.gaps small { display: block; }

.month-band { padding-top: 22px; padding-bottom: 24px; border-bottom: var(--frame); }
.month-band .sec-head { border-bottom: 0; padding-bottom: 12px; }
.band .cal-heading, .band .cal-unit { grid-template-columns: minmax(0, 1fr); }
.band { min-width: 900px; border-top: var(--divider); }
.band .cal-unit { border-bottom: var(--divider); }
.band .cal-date { padding: 4px 0; }
.band .cal-date b { font-size: var(--fs-5); }
.band .cal-track { min-height: calc(var(--lanes) * 52px + 40px); }

/* ---------- Belegung: Zeitstrahl und Wochenraster ---------- */

.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-nav form { margin: 0; }
.cal-nav .btn-secondary { min-width: 44px; padding: 0 12px; }
.cal-range { min-width: 160px; text-align: center; font: 500 var(--fs-4) / 1 var(--mono); }
.cal-alert { display: grid; gap: 8px; margin: 0 0 18px; padding: 18px 16px 12px; border: var(--box); border-radius: var(--radius); box-shadow: inset 0 6px 0 var(--attention); }
.cal-alert > b { font-size: var(--fs-3); }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 12px 0; color: var(--pencil); font-size: var(--fs-5); }
.cal-legend .ml { margin-left: auto; }
.sw { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; border: var(--thin); border-radius: var(--radius-xs); }
.sw.booking { background: var(--accent); border-color: var(--accent); }
.sw.reservation { border: var(--res-edge); }
.sw.external { background: var(--hatch); border-color: var(--hatch-edge); }
.sw.block { background: repeating-linear-gradient(45deg, var(--faint) 0 1px, var(--paper) 1px 5px); }
.sw.conflict { background: var(--attention); border-color: var(--attention); }
.sw.gap { height: 9px; border: 0; border-top: var(--gap-line); }
.cal-card { padding: 0; border: 0; }
.cal-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; border-top: var(--edge); border-bottom: var(--edge); border-radius: var(--radius-lg); }
.cal-chart { min-width: max(980px, 100%); }
.cal-heading, .cal-unit { display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.cal-heading { border-bottom: var(--divider); }
.cal-heading > .ey, .cal-unit-label { position: sticky; left: 0; z-index: 5; display: grid; align-content: center; gap: 2px; padding: 10px 14px; background: var(--paper); border-right: var(--frame); }
.cal-unit-label b { font-size: var(--fs-3); font-weight: var(--heavy); }
.cal-unit-label small { font: var(--fs-6) / 1.3 var(--mono); color: var(--pencil); }
.cal-days { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); }
.cal-date { display: grid; justify-items: center; padding: 8px 0 6px; border-left: 1px solid var(--line-soft); font-family: var(--mono); line-height: 1.15; }
.cal-date small { font-size: var(--fs-6); color: var(--pencil); }
.cal-date b { font-size: 20px; font-weight: 500; }
.cal-date.past b, .cal-date.past small { color: var(--faint); }
.cal-date.we, .cal-night.we { background: var(--shelf); }
.cal-date.current { background: var(--now-soft); box-shadow: inset 0 var(--now-bar) 0 var(--now); }
.cal-date.current small { color: var(--now-text); }
.cal-date.current b { color: var(--now-text); }
.cal-date.current b { font-weight: 700; }
.cal-unit { border-bottom: var(--divider); }
.cal-unit:last-child { border-bottom: 0; }
.cal-track { position: relative; min-height: calc(var(--lanes) * 52px + 34px); }
.cal-prices { position: absolute; inset: 0; }
.cal-night { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; border-left: 1px solid var(--line-soft); color: var(--pencil); font: var(--fs-6) / 1 var(--mono); text-decoration: none; user-select: none; touch-action: pan-x pan-y; }
.cal-night.past:not(.chosen) { background: var(--gone); }
.cal-night:not(.occupied):hover { background: var(--paper); box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.cal-night.chosen { background: var(--pick-soft); box-shadow: inset 0 0 0 2px var(--pick); color: var(--ink); }
.cal-bar { position: absolute; z-index: 2; top: calc(10px + var(--lane) * 52px); left: calc(var(--left) / var(--days) * 100%); width: calc(var(--width) / var(--days) * 100% - 4px); margin-left: 2px; height: 44px; display: flex; flex-direction: column; justify-content: center; padding: 0 10px; overflow: hidden; background: var(--accent); color: var(--accent-fg); border-radius: var(--radius-sm); line-height: 1.15; text-decoration: none; }
.cal-bar:hover { background: var(--accent-hover); color: var(--accent-fg); }
.cal-bar b, .cal-bar small { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-bar b { font-size: var(--fs-5); }
.cal-bar small { margin-top: 2px; color: inherit; font: var(--fs-6) / 1.2 var(--mono); opacity: 0.85; }
.cal-bar.booking.past, .cal-bar.booking.past:hover { background: var(--past); color: var(--past-fg); }
.cal-bar.external { background: var(--hatch); color: var(--ink); border: 1px solid var(--hatch-edge); }
.cal-bar.external:hover { background: var(--hatch); color: var(--ink); }
.cal-bar.external b, .cal-bar.external small { align-self: flex-start; padding: 0 3px; background: var(--paper); border-radius: var(--radius-xs); opacity: 1; }
.cal-bar.reservation, .cal-bar.reservation:hover { background: var(--paper); color: var(--res); border: var(--res-edge); }
.cal-bar.block, .cal-bar.block:hover { background: repeating-linear-gradient(45deg, var(--shelf-2) 0 6px, var(--paper) 6px 12px); color: var(--ink); border: 1px solid var(--faint); }
.cal-bar.conflict { box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px var(--attention); }
.cal-bar.narrow { align-items: center; padding: 0 2px; text-align: center; }
.cal-gap { position: absolute; z-index: 1; top: 16px; left: calc(var(--left) / var(--days) * 100% + 4px); width: calc(var(--width) / var(--days) * 100% - 8px); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; padding-top: 4px; overflow: hidden; border-top: var(--gap-line); color: var(--ink); font: 500 var(--fs-6) / 1.25 var(--mono); white-space: nowrap; pointer-events: none; }
.cal-gap b { font-weight: 600; }
.cal-gap small { font-size: var(--fs-6); color: var(--pencil); }
.cal-gap.short { border-top-color: var(--attention); }
.cal-gap.short b { background: var(--attention-soft); color: var(--attention-text); padding: 0 3px; border-radius: var(--radius-xs); }
.cal-gap.compact { flex-direction: column; align-items: center; gap: 0; }
.cal-overlap { position: absolute; z-index: 1; top: 4px; bottom: 4px; left: calc(var(--left) / var(--days) * 100%); width: calc(var(--width) / var(--days) * 100%); background: repeating-linear-gradient(135deg, var(--attention) 0 3px, transparent 3px 9px); pointer-events: none; }
.cal-now { position: absolute; z-index: 4; top: 0; bottom: 0; left: calc(var(--at) / var(--days) * 100%); width: 2px; margin-left: -1px; background: var(--now); pointer-events: none; }
.selection { position: sticky; bottom: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 16px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--ink); color: var(--paper); }
.selection b { font-size: var(--fs-3); font-weight: var(--heavy); }
.selection .mu, .selection small { color: #d4d4d0; }
.selection [data-book] { background: var(--pick); border-color: var(--pick); color: var(--ink); }
.selection .btn-secondary { background: transparent; border-color: var(--paper); color: var(--paper); }
.selection .btn-secondary:hover { background: #2b2b2b; }
.timeline-label { display: block; }

/* Eine Unterkunft: Zeilen sind Wochen. */
.cal-weeks { min-width: max(760px, 100%); }
.cal-weeks .cal-heading, .cal-weeks .cal-unit { grid-template-columns: 92px minmax(0, 1fr); }
.cal-weeks .cal-date { padding: 8px 10px; justify-items: start; }
.cal-weeks .cal-date b { font-size: var(--fs-4); }
.cal-weeks .cal-track { min-height: calc(var(--lanes) * 52px + 62px); }
.cal-weeks .cal-bar { top: calc(36px + var(--lane) * 52px); }
.cal-weeks .cal-gap { top: 42px; }
.cal-weeks .cal-night { flex-direction: column; align-items: stretch; justify-content: space-between; padding: 7px 9px; }
.cal-weeks .cal-unit-label { align-content: start; padding-top: 10px; }
.cal-dnum { font: 500 18px / 1 var(--mono); color: var(--ink); }
.cal-dnum.first { font-weight: 700; }
.cal-night.past .cal-dnum, .cal-night.out .cal-dnum { color: var(--faint); }
.cal-price { align-self: flex-end; font: var(--fs-6) / 1 var(--mono); color: var(--pencil); }
.cal-night.today { box-shadow: inset 0 4px 0 var(--now); }
.month-stats { display: flex; flex-wrap: wrap; gap: 12px 0; margin: 0 0 18px; }
.month-stats > div { flex: 1 1 150px; padding: 0 20px; border-left: var(--divider); }
.month-stats > div:first-child { border-left: 0; padding-left: 0; }
.month-stats dd { margin: 2px 0 0; font: 500 30px / 1.1 var(--mono); }

/* ---------- Buchen ---------- */

.booking-panel .summary { margin: 12px 0 18px; font: 500 var(--fs-4) / 1.4 var(--mono); }
.check { display: grid; gap: 6px; padding: 12px 14px; border: var(--box); border-radius: var(--radius); font-size: var(--fs-4); }
.check + .check { margin-top: 8px; }
.check > b:first-child { font-size: var(--fs-3); }
.check small { color: var(--ink); font: var(--fs-6) / 1.45 var(--mono); }
.check.ok > b:first-child::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; background: var(--accent); border-radius: var(--radius-xs); }
.check.wa { box-shadow: inset 0 6px 0 var(--attention); padding-top: 18px; }
.check.bad > b:first-child { margin: -12px -14px 2px; padding: 12px 14px; background: var(--attention-soft); color: var(--attention-text); border-radius: var(--radius) var(--radius) 0 0; }
.check .who a { color: inherit; font-weight: var(--bold); }
.check .why { font-family: var(--sans); font-size: var(--fs-5); }
.check .why .quiet { font-size: var(--fs-5); }
.alts { display: grid; margin: 8px 0 4px; counter-reset: alt; }
.alts > .ey { margin-bottom: 6px; color: var(--ink); }
.alt { counter-increment: alt; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; margin-top: -2px; padding: 12px 14px; border: var(--box); background: var(--paper); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.alt::before { content: counter(alt, upper-alpha); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border: var(--box); border-radius: var(--radius-xs); font: 600 var(--fs-5) / 1 var(--mono); }
.alt b { font-size: 17px; font-weight: var(--heavy); }
.alt small { grid-column: 2; color: var(--pencil); font: var(--fs-5) / 1.35 var(--mono); }
.alt i { grid-column: 3; grid-row: 1 / span 2; font: 500 var(--fs-3) / 1 var(--mono); font-style: normal; }
.alt:hover, .alt:focus-visible { background: var(--on-bg); color: var(--on-fg); border-color: var(--on-edge); }
.alt:hover small, .alt:focus-visible small { color: var(--on-fg); }
.alt:hover::before, .alt:focus-visible::before { border-color: var(--on-fg); }
.stay-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) minmax(0, 0.7fr); gap: 12px 18px; }
.stay-fields.one { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.7fr); }
.stay-fields label { margin: 0; }
.unit-fixed { display: block; margin: 0 0 12px; font: var(--label-w) var(--fs-6) / 1.3 var(--mono); letter-spacing: var(--label-ls); text-transform: uppercase; color: var(--pencil); }
.none-free { display: block; margin-top: 8px; font-weight: 600; }
.pick-results:has(> *) { max-height: 220px; overflow: auto; margin-top: 4px; border: var(--box); border-radius: var(--radius); }
.pick-row { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: var(--rule); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; }
.pick-row:hover, .pick-row:focus { background: var(--on-bg); color: var(--on-fg); }
.impact { display: grid; gap: 0; }
.impact > .ey { padding-bottom: 6px; color: var(--ink); }
.im { display: grid; grid-template-columns: 14px 120px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-bottom: var(--rule); font-size: var(--fs-4); }
.im::before { content: ''; width: 12px; height: 12px; margin-top: 4px; border: var(--mark-edge); border-radius: var(--radius-xs); background: var(--paper); }
.im.in::before { background: var(--accent); border-color: var(--accent); }
.im.wa::before, .im.bad::before { background: var(--attention); }
details.more > summary { font-size: var(--fs-4); }
.form-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 12px 0; background: var(--paper); border-top: var(--frame); }
.drawer .form-foot { margin: 8px -24px -20px; padding: 14px 24px max(14px, env(safe-area-inset-bottom)); }
.form-foot .metric { display: block; font-size: var(--fs-2); }
.form-foot small { display: block; color: var(--pencil); font: var(--fs-6) / 1.3 var(--mono); }
.form-foot button[type='submit'], .form-foot [data-save], .form-foot [data-pay-button] { min-height: 52px; padding: 0 22px; font-size: 17px; }
.save-reason { display: block; color: var(--ink); font-size: var(--fs-5); font-weight: 600; }
.save-reason:not(:empty)::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--attention); }

/* ---------- Aufenthalt: Strecke, nächster Schritt, Geld ---------- */

.life { display: flex; overflow-x: auto; padding: 18px 0 16px; }
.life a { position: relative; flex: 1; min-width: 104px; padding: 26px 10px 0 0; color: var(--ink); text-decoration: none; }
.life a::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line); }
.life a.complete::before { background: var(--accent); }
.life a:last-child::before { right: auto; width: 18px; }
.life i { position: absolute; left: 0; top: 0; width: 18px; height: 18px; overflow: hidden; border: var(--mark-edge); background: var(--paper); color: transparent; text-indent: 40px; }
.life .complete i { background: var(--accent); border-color: var(--accent); }
.life .current i { background: var(--attention-soft); }
.life .skipped i { border-style: dashed; border-color: var(--faint); }
.life span { display: block; font-weight: 600; }
.life small { display: block; margin-top: 2px; color: var(--pencil); font: var(--fs-6) / 1.3 var(--mono); }
.life .current span { font-weight: var(--heavy); }
.life .skipped span { color: var(--faint); }
.life-now { display: none; }
.life-bar { display: block; height: 8px; margin-top: 6px; border: var(--thin); border-radius: var(--radius-xs); overflow: hidden; background: var(--paper); }
.life-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.ho-cards { display: flex; flex-wrap: wrap; }
.card.ho { display: grid; gap: 6px; align-content: start; }
.card.ho .btn, .card.ho .btn-secondary { justify-self: start; margin-top: 6px; }

/* ---------- Zahlung, Übergabe, Reinigung ---------- */

.pay-dialog .amount-big { display: block; margin: 18px 0 0; color: var(--pencil); font: var(--label-w) var(--fs-6) / 1.3 var(--mono); letter-spacing: var(--label-ls); text-transform: uppercase; }
.amount-big .field { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; padding: 0 var(--field-pad); border: var(--field-box); border-bottom: var(--field-line); border-radius: var(--radius); background: var(--field-bg); }
.amount-big input { width: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font: 500 48px / 1.15 var(--mono); letter-spacing: -0.02em; }
.amount-big i { color: var(--ink); font: 500 var(--fs-2) / 1 var(--mono); font-style: normal; }
.pay-live { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 10px 12px; background: var(--shelf); border-radius: var(--radius); font-size: var(--fs-4); }
.pay-live .metric { font-size: var(--fs-3); }

.tiles { display: grid; gap: 0; }
label.tile { display: flex; align-items: center; gap: 14px; min-height: 64px; margin: -2px 0 0; padding: 12px 14px; border: var(--box); background: var(--paper); font-size: var(--fs-4); font-weight: 400; cursor: pointer; }
.tiles label.tile:first-child { margin-top: 0; }
.tile input { appearance: none; -webkit-appearance: none; width: 28px !important; height: 28px; flex: none; margin: 0; border: var(--mark-edge); border-radius: var(--radius-xs); background: var(--paper); cursor: pointer; }
.tile input:checked { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M4 12.5 9.5 18 20 6'/%3E%3C/svg%3E") center / 18px no-repeat; }
.tile input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile span { display: grid; gap: 1px; }
.tile b { font-size: 17px; }
.tile small { color: var(--pencil); font: var(--fs-6) / 1.35 var(--mono); }
.tile:has(input:checked) { background: var(--shelf); }
.tile:has(input:checked) b { color: var(--pencil); text-decoration: line-through; }
.keys-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: var(--rule); }
.keys-row b { font-size: 17px; }
.keys-row small { display: block; color: var(--pencil); font: var(--fs-6) / 1.3 var(--mono); }
.stepper { display: flex; align-items: stretch; max-width: 240px; }
.stepper button { width: 48px; min-height: 48px; flex: none; border: var(--box); background: var(--paper); color: var(--ink); font: var(--bold) 22px / 1 var(--sans); }
.stepper button:hover { background: var(--shelf); }
.stepper input { width: 64px; margin: 0; padding: 0; border: var(--box); border-left: 0; border-right: 0; border-radius: 0; text-align: center; font: 600 var(--fs-3) / 1 var(--mono); }
.stepper.big button { width: 56px; min-height: 56px; }
.stepper.big input { width: 72px; font-size: 26px; }
.clean-progress { display: grid; gap: 6px; }
.clean-progress b { font: 500 var(--fs-4) / 1.2 var(--mono); }
.clean-progress .life-bar { margin: 0; }
.clean-task .flow-foot { position: static; border-top: 0; background: transparent; }
.flow .photos { display: grid; gap: 8px; margin-top: 24px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.photo-grid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: var(--thin); border-radius: var(--radius-xs); }

.clean-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: var(--frame); border-bottom: var(--frame); }
.clean-day { min-height: 130px; padding: 8px; border-left: var(--rule); }
.clean-day:first-child { border-left: 0; }
.clean-day.current { background: var(--shelf); box-shadow: inset 0 4px 0 var(--now); }
.clean-day > b { font: var(--label-w) var(--fs-6) / 1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.clean-ticket { display: grid; gap: 3px; margin: 8px 0 0; padding: 8px; border: var(--box); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: var(--fs-5); overflow-wrap: anywhere; text-decoration: none; }
.clean-ticket:hover { background: var(--shelf); color: var(--ink); }
.clean-ticket.suggested { border-style: dashed; }
.clean-ticket small { font: var(--fs-6) / 1.3 var(--mono); }
.clean-ticket span { font-weight: var(--bold); }

/* ---------- Übrige Bereiche ---------- */

.av + b, .row .av { flex: none; }
.template-paper { white-space: pre-wrap; padding: 18px; border: var(--box); border-radius: var(--radius); background: var(--paper); }
.template-paper mark { background: var(--attention-soft); color: var(--attention-text); }
.wizard-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 16px 0; border: var(--box); border-radius: var(--radius); overflow: hidden; width: fit-content; max-width: 100%; }
.wizard-steps > * { padding: 8px 12px; color: var(--pencil); font-size: var(--fs-5); border-left: var(--rule); }
.wizard-steps > *:first-child { border-left: 0; }
.wizard-steps .on { background: var(--on-bg); color: var(--on-fg); font-weight: var(--bold); }
.year-band { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.year-band span { padding: 6px 0; background: var(--shelf); text-align: center; border-radius: var(--radius-xs); font: var(--fs-6) / 1.2 var(--mono); }
.year-band .season { background: var(--accent); color: var(--accent-fg); }
.setup-list { display: grid; gap: 0; }
.setup-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: var(--rule); color: var(--ink); text-decoration: none; }
.setup-list a:hover { background: var(--shelf); }
.setup-list i { display: grid; place-items: center; width: 20px; height: 20px; border: var(--mark-edge); border-radius: var(--radius-xs); font-style: normal; font-size: var(--fs-6); }
.setup-list i.done { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.guest-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.origin-map { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.origin-map > b { padding: 10px 12px; border: var(--box); border-radius: var(--radius); }
.money-link { gap: 8px; color: var(--ink); text-decoration: none; }
.ev { position: relative; display: block; color: var(--ink); text-decoration: none; }
.tl { display: grid; gap: 0; }
.tl > .ev { padding: 10px 0; border-bottom: var(--rule); }
.tl > .ev .t { display: block; font: var(--fs-6) / 1.3 var(--mono); color: var(--pencil); }
main nav[aria-label='Pagination Navigation'] svg, nav[role='navigation'] svg { width: 18px; height: 18px; }
.pagination { margin-top: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 28px; font-weight: var(--heavy); text-decoration: none; }
.brand-mark { display: none; }
.brand .fb-logo { height: 34px; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--shelf); }
.login-box { width: 100%; max-width: 460px; padding: 32px; border: var(--box); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--pop); }
.login-box .brand { margin-bottom: 28px; }
.login-box h1 { margin: 6px 0 12px; font-size: 48px; }
.login-box .btn, .login-box button[type='submit'] { width: 100%; min-height: 52px; }

/* ---------- Handy ---------- */

.md-date { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.md-date h1 { font-size: 52px; }
.md-date nav { display: flex; }
.md-date nav a { display: grid; place-items: center; width: 44px; height: 44px; border: var(--box); margin-left: -2px; font-weight: var(--bold); text-decoration: none; }
.md-status { display: block; padding: 14px 16px; background: var(--ink); color: var(--paper); text-decoration: none; border-radius: var(--radius-lg); }
.md-status:hover { color: var(--paper); }
.md-status .ey { color: #bdbdb8; }
.md-status b { display: block; margin-top: 2px; font-size: 26px; font-weight: var(--heavy); line-height: 1.1; }
.md-status small { display: block; margin-top: 4px; color: #d4d4d0; font-family: var(--mono); font-size: var(--fs-6); }
.md-quiet { padding: 16px 0 14px; border-bottom: var(--frame); }
.md-quiet b { display: block; font-size: 24px; font-weight: var(--heavy); }
.md-quiet span { color: var(--pencil); }
.md-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 18px; padding-bottom: 6px; border-bottom: var(--edge); }
.md-head b { font-size: 18px; font-weight: var(--heavy); }
.md-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: var(--rule); color: var(--ink); text-decoration: none; border-radius: var(--radius-xs); }
.md-row:hover { color: var(--ink); background: var(--shelf); }
.md-row > .m { width: 64px; flex: none; font-size: var(--fs-6); line-height: 1.35; }
.md-row > span:not(.m) { flex: 1; min-width: 0; }
.md-row small { display: block; }
.md-row > b { white-space: nowrap; }
.md-row .btn, .md-row .btn-secondary { min-height: 44px; padding: 0 12px; }
.md-open { margin: 16px 0 0; padding: 12px; border: var(--box); border-radius: var(--radius-lg); }
.md-open b { display: block; margin-top: 6px; }
.md-open small { display: block; color: var(--pencil); }
.md-open .btn { width: 100%; margin-top: 10px; }
.mini-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.mini-month > i { font: 500 var(--fs-6) / 1 var(--mono); font-style: normal; text-align: center; color: var(--pencil); padding-bottom: 2px; }
.mini-month > span { display: grid; place-items: center; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-xs); font: 500 var(--fs-6) / 1 var(--mono); }
.mini-month > span.own { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.mini-month > span.past { background: var(--past); border-color: var(--past); color: var(--past-fg); }
.mini-month > span.ext { background: var(--hatch); border-color: var(--hatch-edge); }
.mini-month > span.ext em { background: var(--paper); padding: 0 2px; border-radius: var(--radius-xs); }
.mini-month > span.res { border: var(--res-edge); color: var(--res); }
.mini-month > span.blk { background: var(--shelf-2); }
.mini-month > span.gone { background: var(--gone); color: var(--faint); border-color: var(--gone); }
.mini-month > span.short { background: var(--attention); border-color: var(--attention); color: var(--attention-fg); }
.mini-month > span.out { visibility: hidden; }
.mini-month > span.today { box-shadow: inset 0 0 0 3px var(--now); font-weight: 700; }
.mini-month em { font-style: normal; }

@media (max-width: 1100px) {
    :root { --pad: 24px; }
    .work-grid { grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); gap: 24px; }
    .fb-search { min-width: 0; }
    .fb-search span, .fb-search kbd { display: none; }
    .fb-nav kbd { display: none; }
}

@media (max-width: 800px) {
    :root { --pad: 16px; }
    .fb-nav, .fb-tools [data-palette='new'], .fb-tools .fb-icon[href='/settings'] { display: none; }
    .fb-brand { flex: 1; border-right: 0; padding: 0 16px; min-height: 52px; font-size: 22px; }
    .fb-tools { padding: 4px 8px; gap: 4px; }
    .fb-search { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border: 0; color: var(--ink); }
    #main { padding: 0 var(--pad) calc(92px + env(safe-area-inset-bottom)); min-height: 0; }
    .mobile-nav { position: fixed; inset: auto 0 0; z-index: 20; display: flex; align-items: stretch; background: var(--paper); border-top: var(--frame); padding-bottom: env(safe-area-inset-bottom); }
    .mobile-nav a { flex: 1; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; color: var(--ink); font-size: var(--fs-6); font-weight: 600; text-decoration: none; }
    .mobile-nav a[aria-current] { background: var(--on-bg); color: var(--on-fg); }
    .nav-add { width: 60px; flex: none; border: 0; border-left: var(--frame); border-right: var(--frame); background: var(--pick); color: var(--ink); font: var(--bold) 30px / 1 var(--sans); }
    .desktop-day { display: none; }
    .mobile-day { display: block; }
    .top, .page-heading { padding: 18px 0 14px; margin-bottom: 18px; }
    h1, .h1 { font-size: 44px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .drawer .grid-2, .workspace-form .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-grid { grid-template-columns: 1fr; }
    .work-grid > aside.sticky-card { order: -1; position: static; }
    .metrics { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
    .metrics > * { border-left: 0; padding-left: 0; border-top: var(--rule); }
    .stay-fields, .stay-fields.one { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stay-fields:not(.one) label:first-child { grid-column: 1 / -1; }
    .im { grid-template-columns: 14px minmax(0, 1fr); gap: 2px 10px; }
    .im span { grid-column: 2; }
    .alt { grid-template-columns: 34px minmax(0, 1fr); }
    .alt i { grid-column: 2; grid-row: auto; font-size: var(--fs-4); }
    .drawer { width: 100%; border-left: 0; }
    .drawer > [data-panel-body] { padding: 16px; }
    .drawer .form-foot { margin: 8px -16px -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
    .drawer h1 { font-size: 36px; }
    #panel.as-dialog { inset: auto 0 0; width: 100%; max-height: 92dvh; margin: 0; border: 0; border-top: var(--frame); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: none; }
    .flow-foot { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); margin: 0 calc(-1 * var(--pad)); padding: 10px var(--pad); background: var(--paper); border-top: var(--frame); }
    .drawer .flow-foot { bottom: 0; margin: 8px -16px -16px; }
    .flow-foot button, .clean-task [data-finish] { flex: 1; min-height: 56px; }
    .clean-page { display: flex; flex-direction: column; }
    .clean-tasks { order: -1; margin-bottom: 16px; }
    .clean-task .flow-foot { margin: 0 -2px; padding: 10px 0; }
    .clean-week { grid-template-columns: repeat(7, minmax(110px, 1fr)); overflow-x: auto; }
    .clean-day { min-height: 80px; }
    .life { display: none; }
    .life-now { display: grid; gap: 4px; color: var(--ink); text-decoration: none; }
    .life-now b { font-size: 17px; }
    .sticky-card { position: static; }
    .cal-heading, .cal-unit { grid-template-columns: 112px minmax(0, 1fr); }
    .cal-weeks .cal-heading, .cal-weeks .cal-unit { grid-template-columns: 64px minmax(0, 1fr); }
    .cal-heading > .ey, .cal-unit-label { padding: 8px 10px; }
    .cal-legend .ml { margin-left: 0; }
    .selection { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .selection > .f1 { grid-column: 1 / -1; }
    .selection .btn, .selection .btn-secondary { padding: 0 6px; font-size: var(--fs-5); }
    .form-wrap { max-width: 100%; }
    .guest-tags { display: none; }
    .tenant-menu > div { right: -8px; }
    .month-stats > div { padding: 0 12px; }
    .month-stats dd { font-size: 22px; }
    .amount-big input { font-size: 40px; }
}
/* ---------- Glas: Grund, Schrift, Material ---------- */

:root body { background: var(--wall-base); }
:root body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--wall); }
:root h1, :root .h1, :root .day-title { letter-spacing: -0.025em; }
:root .ic { stroke-linecap: round; stroke-linejoin: round; }
:root :is(.ey, .eyebrow, .timeline-label, th, .fp-day small, .drawer > header b, .unit-fixed, .clean-day > b, .pay-dialog .amount-big) { text-transform: none; }
:root :is(.pl, .badge, .src, .tag, .hl) { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
:root :is(.pl, .badge, .src, .tag) { border-radius: 999px; padding-left: 9px; padding-right: 9px; }
:root .pl::before, :root .dot, :root .src i,
:root .field-error::before, :root .save-reason:not(:empty)::before { border-radius: 50%; }
:root :where(input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']), select, textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
:root :where(input[type='date']) { padding-left: 10px; padding-right: 6px; }

/* Material ohne eigenes Gewicht (:where), damit Hinweise und Status es übersteuern. */
/* Fläche */
:root :where(.card, .cal-scroll, .day-main, .day-side, .unit-now, .day-stats > div, .month-band, .md-quiet, .notice, .template-paper, .clean-week) {
    background: var(--glass-plane);
    border: 1px solid var(--glass-edge);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-light), var(--plane-shadow);
}
/* Leiste */
:root :where(.mobile-nav, .selection, .flow-foot),
:root .fb-top::before {
    background: var(--glass-bar);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--edge-bar);
    box-shadow: var(--glass-light), var(--pop-sm);
}
/* Blatt */
:root :where(dialog, .drawer, .tenant-menu > div) {
    background: var(--glass-sheet);
    -webkit-backdrop-filter: var(--glass-blur-deep);
    backdrop-filter: var(--glass-blur-deep);
    border: 1px solid var(--edge-sheet);
    box-shadow: var(--glass-light), var(--pop);
}

/* ---------- Kopfleiste ---------- */

/* Das Kopf-Glas liegt auf ::before: Ein Element mit backdrop-filter wird zur Backdrop-Root, dann könnte das Kontomenü darin die Seite nicht mehr weichzeichnen. */
:root .fb-top { background: transparent; border: 0; box-shadow: none; }
:root .fb-top::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
:root .fb-top { top: 12px; width: calc(100% - 2 * var(--pad)); max-width: calc(1680px - 2 * var(--pad)); margin: 12px auto 0; padding: 6px; border-radius: 30px; align-items: center; }
:root .fb-brand { min-height: 44px; padding: 0 14px 0 16px; border-right: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
:root .fb-nav { flex: 0 1 auto; margin: 0 auto; padding: 4px; gap: 2px; border-radius: 999px; background: var(--track); }
:root .fb-nav a { min-height: 40px; padding: 0 16px; border-right: 0; border-radius: 999px; font-weight: 500; color: var(--ink-2); }
:root .fb-nav a:hover { background: var(--hover); color: var(--ink); }
:root .fb-nav a.on { font-weight: 600; box-shadow: var(--on-ring); }
:root .fb-nav a.on .bd { background: var(--shelf-2); }
:root .fb-nav kbd { display: none; }
:root .bd { border-radius: 999px; padding: 3px 7px; font-family: var(--sans); }
:root .fb-tools { padding: 0 0 0 8px; gap: 8px; }
:root .fb-search { min-height: 44px; border: 0; border-radius: 999px; background: var(--track); }
:root .fb-icon { border-radius: 50%; }
:root .av { width: 44px; height: 44px; border-radius: 50%; background: var(--raised); border: 1px solid var(--edge-raised); color: var(--link); font-family: var(--sans); font-weight: 700; box-shadow: var(--glass-light); }
:root .tenant-menu > div { background: var(--glass-sheet); -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep); border: 1px solid var(--edge-sheet); border-radius: var(--radius-lg); box-shadow: var(--glass-light), var(--pop); }
:root .tabs { width: fit-content; max-width: 100%; gap: 2px; padding: 3px; border-bottom: 0; border-radius: 999px; background: var(--track); }
:root .tabs > a { padding: 9px 16px; border-right: 0; border-radius: 999px; }
:root .tabs > a[aria-current='page'], :root .tabs > a.active { box-shadow: var(--on-ring); }
:root .top, :root .page-heading { border-bottom: 0; }
:root .scheme-pick { display: grid; gap: 6px; }
:root .scheme-pick > div { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--track); }
:root .scheme-pick button { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 var(--fs-5) / 1 var(--sans); cursor: pointer; box-shadow: none; }
:root .scheme-pick button:hover { background: var(--hover); color: var(--ink); }
:root .scheme-pick button[aria-pressed='true'] { background: var(--on-bg); color: var(--on-fg); box-shadow: var(--on-ring); }
:root .scheme-pick button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root .scheme-pick small { color: var(--pencil); font-size: var(--fs-6); }

/* ---------- Knöpfe und Auswahl: Kapseln ---------- */

:root :is(.btn, button[type='submit'], form button:not([type]):not(.pick-row), .btn-secondary, .btn-danger, .chip, .close-x) { border-radius: 999px; }
:root .chip-select { border-radius: 999px !important; }
:root .btn:not(.btn-secondary):not(.btn-danger):not(.g) { box-shadow: var(--btn-light), var(--accent-shadow); }
:root .btn-secondary { background: var(--raised); border-color: var(--edge-raised); color: var(--ink); box-shadow: var(--glass-light), var(--raised-shadow); }
:root .btn-secondary:hover { background: var(--raised-hover); color: var(--ink); }
:root .chip { border: 0; background: var(--track); }
:root .chip:hover { background: var(--track-hover); }
:root .chip.on { box-shadow: var(--on-ring); }
:root :is(.seg, .seg-choice) { gap: 2px; padding: 3px; border: 0; border-radius: 999px; background: var(--track); }
:root :is(.seg a, .seg button, .seg > span, .seg-choice span) { min-height: 38px; border-radius: 999px; }
:root :is(.seg a + a, .seg button + button, .seg-choice label + label span) { border-left: 0; }
:root .wizard-steps .on { background: var(--accent-soft); color: var(--link); }
:root .palette-results a.active, :root .pick-row:hover, :root .pick-row:focus { background: var(--accent-soft); color: var(--ink); }
:root .palette-results a.active small { color: var(--pencil); }

/* ---------- Hinweise ---------- */

:root .notice { border-radius: 18px; }
:root .notice-warning, :root .cal-alert, :root .check.wa { padding-top: 12px; background: var(--attention-soft); border-color: var(--attention-line); box-shadow: none; }
:root .cal-alert { padding: 14px 18px; border-radius: var(--radius-lg); }
:root .notice-error { background: var(--attention-soft); border-color: var(--attention-line); }
:root .notice-success { background: var(--info-soft); color: var(--ink); border-color: var(--info-line); }
:root .notice-success a { color: var(--link); }
:root .check.bad, :root .src.bad { border-color: var(--attention-line); }
:root .card.hi { box-shadow: var(--glass-light), var(--hi-ring), var(--plane-shadow); }
:root .card.hi > .ey:first-child { border-radius: 999px; padding: 2px 9px; }
:root .card.hi h2 { font-size: 24px; }
:root .card { padding: 18px 20px; }
:root .metrics { border-top: 0; gap: 10px; }
:root .metrics > * { border-left: 0; }
:root .metrics > *:first-child { padding-left: 18px; }

/* ---------- Heute ---------- */

:root .day-hero { border-bottom: 0; padding-top: 36px; }
:root .day-line { font-weight: 400; color: var(--ink-2); }
:root .day-stats { gap: 10px; }
:root .day-stats > div { padding: 14px 20px; border: 1px solid var(--glass-edge); border-radius: 20px; }
:root .day-stats dd { font-weight: 600; }
:root .day-stats .hot { background: var(--attention-soft); border-color: var(--attention-line); }
:root .unit-now { padding: 16px 20px; }
:root .unit-now b { font-size: 26px; font-weight: 700; line-height: 1.15; }
:root .month-band.bleed { margin: 0 0 20px; padding: 18px 22px 20px; }
:root .day-grid.bleed { gap: 20px; margin: 0; padding: 0 0 44px; }
:root .day-main, :root .day-side { padding: 22px 24px 28px; }
:root .fp-now span { background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 3px 10px; font-family: var(--sans); }
:root .fp-now::after { opacity: 0.45; border-radius: 2px; }
:root .fp-day { padding: 8px 12px; border-bottom: 0; border-radius: 12px; background: var(--shelf); }
:root .fp-time { width: 80px; font-size: 18px; font-weight: 600; letter-spacing: 0; }
:root .nd > a:hover, :root .gaps > a:hover { background: var(--hover); }

/* ---------- Belegung ---------- */

:root .cal-scroll { border-width: 1px; }
:root .cal-heading > .ey, :root .cal-unit-label { background: var(--label-bg); }
:root .cal-date b { font-size: 15px; font-weight: 500; }
:root .cal-date.current { background: transparent; box-shadow: none; }
:root .cal-date.current b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); }
:root .cal-night.today .cal-dnum { align-self: flex-start; display: grid; place-items: center; min-width: 30px; height: 30px; margin: -5px 0 0 -6px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
:root .cal-night.today { background: var(--now-soft); box-shadow: none; }
:root .cal-now { z-index: 1; opacity: 0.55; }
:root .cal-bar.booking:not(.past) { box-shadow: var(--btn-light), var(--bar-shadow); }
:root .cal-bar.reservation { background: var(--raised); }
:root .cal-gap.short b { background: var(--attention); color: var(--attention-fg); border-radius: 999px; padding: 1px 8px; }
:root .selection { bottom: 16px; padding: 10px 10px 10px 24px; border-radius: 999px; color: var(--ink); }
:root .selection .mu, :root .selection small { color: var(--pencil); }
:root .selection [data-book] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
:root .selection .btn-secondary { background: var(--raised); border-color: var(--edge-raised); color: var(--ink); }
:root .selection .btn-secondary:hover { background: var(--raised-hover); }
:root .month-stats dd { font-size: 28px; font-weight: 600; }
:root .mini-month > span { height: 36px; border-radius: 10px; }
:root .mini-month > span.today { position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }

/* ---------- Panel, Dialoge ---------- */

:root dialog { border-radius: 26px; }
:root dialog::backdrop { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
:root .drawer { inset: 12px 12px 12px auto; width: min(640px, calc(100% - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); border-radius: 30px; }
:root .drawer > header { background: var(--sheet-head); border-bottom: var(--rule); }
:root .drawer .form-foot, :root .form-foot { background: var(--sheet-foot); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-top: var(--rule); }
:root .drawer .card { background: var(--sheet-card); box-shadow: none; }
:root #panel.as-dialog { border-radius: 26px; }
:root .alt, :root label.tile { margin-top: 8px; border-radius: 16px; background: var(--raised); border-color: var(--edge-raised); box-shadow: var(--glass-light), var(--raised-shadow); }
:root .alt::before { border-radius: 50%; border: 0; background: var(--shelf-2); }
:root .alt:hover, :root .alt:focus-visible { background: var(--raised-hover); color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:root .alt:hover small, :root .alt:focus-visible small { color: var(--pencil); }
:root .alt:hover::before, :root .alt:focus-visible::before { background: var(--accent); color: var(--accent-fg); }
:root .tile input { border-radius: 8px; }
:root .im.wa::before, :root .im.bad::before { border-color: var(--attention); }
:root .life i { border-radius: 50%; }
:root .life .current i { border: 2px solid var(--attention); }
:root .stepper button { background: var(--raised); }
:root .stepper button:first-child { border-radius: 999px 0 0 999px; }
:root .stepper button:last-child { border-radius: 0 999px 999px 0; }
:root .amount-big input { font-size: 32px; font-weight: 600; }
:root .pay-live { border-radius: var(--radius); }
/* Dialog wächst mit dem Inhalt statt bis zur Maximalhöhe; scrollt erst darüber. */
:root #panel.as-dialog { height: fit-content; }

/* ---------- Einstellungen ---------- */

:root .settings { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 28px; align-items: start; }
:root .settings-nav { position: sticky; top: 96px; display: grid; gap: 2px; }
:root .settings-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
:root .settings-nav a:hover { background: var(--hover); color: var(--ink); }
:root .settings-nav a[aria-current] { background: var(--on-bg); color: var(--ink); font-weight: 600; box-shadow: var(--on-ring); }
:root .settings-nav a > span { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--track); color: var(--pencil); font-size: var(--fs-6); font-weight: 600; text-align: center; }
:root .settings-nav a > i { color: var(--pencil); font-style: normal; }
:root .settings-nav .ey { margin: 16px 14px 4px; }
:root .settings-main { display: grid; gap: 24px; min-width: 0; }
:root .settings-section { padding: 22px 24px 18px; }
:root .section-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 6px; }
:root .section-head > div { flex: 1 1 320px; min-width: 0; }
:root .section-head h2 { margin: 0; }
:root .section-head p { margin: 4px 0 0; max-width: 62ch; }
:root .setup-card .chips { align-items: center; margin: 12px 0 0; }
:root .setup-card progress { height: 6px; margin-top: 10px; }
:root .set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
:root .set-row:last-child { border-bottom: 0; }
:root .set-row > .f1 > b { display: block; font-size: var(--fs-4); font-weight: 600; }
:root .set-row > .f1 > small { display: block; margin-top: 2px; color: var(--pencil); }
:root .set-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
:root .set-price { display: grid; justify-items: end; text-align: right; }
:root .set-price b { font-size: var(--fs-4); font-weight: 600; font-variant-numeric: tabular-nums; }
:root .set-price small { color: var(--pencil); font-size: var(--fs-6); }
:root .set-row > .btn-secondary { min-height: 38px; padding: 0 14px; }
:root .year-seg { margin: 14px 0 4px; }
:root .year-seg a { position: relative; padding: 0 14px; font-variant-numeric: tabular-nums; }
:root .year-seg a > i { position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
:root .season-unit { padding: 18px 0 4px; border-top: 1px solid var(--line-soft); }
:root .year-seg + .season-unit { margin-top: 12px; }
:root .season-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
:root .season-head h3 { margin: 0; font-size: var(--fs-3); }
:root .season-head .quiet { margin-left: auto; }
:root .season-chart { margin: 12px 0 6px; }
:root .season-axis { position: relative; height: 16px; color: var(--pencil); font: 500 12px / 1 var(--sans); }
:root .season-axis span { position: absolute; left: var(--l); padding-left: 4px; }
:root .season-track { position: relative; height: 46px; border-radius: 12px; background: var(--track); overflow: hidden; }
:root .season-tick { position: absolute; top: 0; bottom: 0; left: var(--l); width: 1px; background: var(--line-soft); }
:root .season-today { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--l); width: 2px; margin-left: -1px; background: var(--now); opacity: 0.7; }
:root .season-bar { position: absolute; z-index: 1; top: 5px; bottom: 5px; left: var(--l); width: var(--w); min-width: 6px; container-type: inline-size; border-radius: 9px; background: var(--accent); color: var(--accent-fg); box-shadow: var(--btn-light); white-space: nowrap; text-decoration: none; font-size: 12px; line-height: 1.15; }
:root .season-bar:hover { background: var(--accent-hover); color: var(--accent-fg); }
/* Balken tragen die Nummer ihrer Zeile darunter; Name und Preis nur, wenn sie lesbar hineinpassen. */
:root .season-in { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 1px 7px; height: 100%; padding: 0 8px 0 5px; overflow: hidden; border-radius: inherit; }
:root .season-in > i { grid-row: 1 / span 2; align-self: center; }
:root .season-in > :is(b, small) { grid-column: 2; overflow: hidden; text-overflow: ellipsis; }
:root .season-in > small { opacity: 0.85; font-variant-numeric: tabular-nums; }
:root :is(.season-in > i, .season-no) { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font: 700 12px / 1 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; }
:root .season-in > i { background: color-mix(in srgb, var(--accent-fg) 24%, transparent); }
:root .season-no { flex: none; align-self: flex-start; margin-top: 2px; background: var(--accent); color: var(--accent-fg); }
@container (max-width: 92px) {
    :root .season-in { grid-template-columns: auto; justify-content: center; padding: 0; }
    :root .season-in > :is(b, small) { display: none; }
}
/* Kürzer als die Nummer: Die Plakette sitzt mittig auf dem Balken und darf über ihn hinausragen. */
@container (max-width: 17px) {
    :root .season-in { display: block; position: relative; overflow: visible; }
    :root .season-in > i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--accent); box-shadow: 0 0 0 2px var(--track); }
}
:root .season-bar.cut-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
:root .season-bar.cut-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }
:root .season-none, :root .season-more { margin: 10px 0 12px; }
:root .season-more a { color: var(--link); }
:root :is(.season-span, .form-hint) { margin: -6px 0 0; color: var(--pencil); font-size: var(--fs-5); }
:root .season-span.bad { color: var(--attention-text); }
:root .settings-form .grid-2:not(:has(small)) { align-items: end; }
:root .settings-form details.card > summary { margin: 0; }
:root .settings-form details[open].card > summary { margin-bottom: 14px; }
:root .form-foot .foot-note { max-width: 300px; font: var(--fs-5) / 1.35 var(--sans); color: var(--pencil); }
:root .form-foot .link-button.arch { min-height: 0; padding: 4px 0; font-size: var(--fs-4); font-weight: 600; color: var(--link); background: none; border: 0; box-shadow: none; }
:root .archived-units { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
:root .archived-units > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--pencil); font-weight: 600; cursor: pointer; }
:root .archived-units > summary span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--track); color: var(--ink); font-size: 12px; }
:root .archived-units > p { margin: 4px 0 6px; }
:root .archived-units .set-row > form { margin: 0; }
:root .form-foot .link-button.del { min-height: 0; padding: 4px 0; font-size: var(--fs-4); font-weight: 600; color: var(--attention-text); background: none; border: 0; box-shadow: none; }

/* ---------- Rückmeldung nach dem Speichern ---------- */

/* Schwebt unten statt oben im Inhalt: nach dem Neuladen steht die Seite oft weit unten, die Meldung soll trotzdem zu sehen sein. */
:root .toast { position: fixed; z-index: 40; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(560px, calc(100% - 32px)); padding: 12px 10px 12px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); box-shadow: var(--pop); font-size: var(--fs-4); line-height: 1.35; transform: translateX(-50%); animation: toast-in 0.25s ease-out, toast-out 0.3s ease-in 8s forwards; }
/* Zeigen läuft immer durch; nur das Ausblenden wartet, solange Zeiger oder Fokus auf der Meldung liegen. */
:root .toast:is(:hover, :focus-within) { animation-play-state: running, paused; }
:root .toast > button { flex: none; min-height: 32px; width: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; box-shadow: none; font-size: 20px; line-height: 1; opacity: 0.75; }
:root .toast > button:hover { background: color-mix(in srgb, var(--paper) 14%, transparent); opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    :root .toast { animation: toast-out 0.01s linear 8s forwards; }
    :root .toast:is(:hover, :focus-within) { animation-play-state: paused; }
}

/* ---------- Rhythmus: Abstände und Kanten ---------- */

/* Der Abstand unter der Kopfleiste gehört zu #main, nicht zu einzelnen Kopfzeilen: Seiten ohne Kopfzeile kleben sonst unter dem Glas. */
:root { --top-gap: 28px; scroll-padding-top: 96px; }
:root #main { padding-top: var(--top-gap); }
:root #main > .notice:first-child { margin-top: 0; }
:root :is(.top, .page-heading) { padding-top: 0; }
:root .notice + :is(.top, .page-heading) { margin-top: 8px; }
:root .page-heading > :first-child, :root .top > :first-child { margin-right: auto; }
:root #main > a.quiet:first-child { display: inline-block; margin-bottom: 14px; }
:root .day-hero { padding-top: 8px; }
:root .md-date { padding-top: 0; }
:root :is(#main, [data-panel-content]) > h1 + :not(.summary, p:not([class])) { margin-top: 18px; }
/* Gestapelte Glasflächen im Blockfluss brauchen Luft; Grid- und Flex-Eltern regeln das über gap. */
:root :is(#main, [data-panel-content], [data-tab-page]) > :is(.card, .grid, .work-grid, .metrics, .notice, .table-wrap) + :is(.card, .grid, .work-grid, .table-wrap) { margin-top: 24px; }
/* Knopf direkt unter Wertzeilen (Geld zum Aufenthalt) braucht Abstand zur letzten Linie. */
:root .card > :is(.un, .list-row) + :is(.btn, .btn-secondary) { margin-top: 14px; }
:root .card > .card + .card { margin-top: 12px; }
:root .card > :first-child { margin-top: 0; }
:root .card > :last-child { margin-bottom: 0; }
:root td details { padding: 0; border-top: 0; }
:root .chips details { padding: 0; border-top: 0; }
:root .tl > .ev:last-child { border-bottom: 0; padding-bottom: 0; }
:root .row > :is(b, h2, h3).f1 { flex: 1 0 auto; max-width: 100%; }
:root form.row > input[type='search'] { flex: 1 1 240px; min-width: 0; }
:root .day-grid { align-items: flex-start; }
:root .fb-nav a.on .bd.w { background: var(--attention); color: var(--attention-fg); }
:root .metrics > *, :root .metrics > *:first-child { padding: 16px 18px; }
:root .metric-card.overdue .metric { width: fit-content; padding: 0 8px; border-radius: 8px; }
:root .life-bar { height: 8px; border: 0; border-radius: 999px; background: var(--track-hover); }
:root .life-bar i { border-radius: inherit; }
:root .wizard-steps { gap: 2px; padding: 3px; border: 0; border-radius: 999px; background: var(--track); overflow: visible; }
:root .wizard-steps > * { padding: 7px 14px; border-left: 0; border-radius: 999px; }
:root .wizard-steps .on { box-shadow: var(--on-ring); }
@media (min-width: 801px) {
    /* Im Panel ist die Buchungsmaske schmaler: Unterkunft eigene Zeile, Daten und Gäste darunter. */
    :root .drawer .stay-fields:not(.one) { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.7fr); }
    :root .drawer .stay-fields:not(.one) > label:first-child { grid-column: 1 / -1; }
}
/* Fußleiste auf ganzen Seiten: schwebende Glasleiste mit Innenabstand statt bündigem Balken. Im Panel bleibt sie bündig. */
:root #main .form-foot {
    bottom: 12px;
    margin: 20px 0 0;
    padding: 10px 10px 10px 22px;
    background: var(--glass-bar);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--edge-bar);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-light), var(--pop-sm);
}
:root #main .form-foot > :last-child { margin-left: auto; }
:root #main .clean-task .form-foot {
    position: static;
    margin: 4px 0 0;
    padding: 12px 0 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    border-top: var(--rule);
    border-radius: 0;
    box-shadow: none;
}

/* ---------- Handy ---------- */

:root .md-date h1 { font-size: 34px; }
:root .md-date nav { gap: 8px; }
:root .md-date nav a { margin-left: 0; border-radius: 50%; border-color: var(--edge-raised); background: var(--raised); box-shadow: var(--glass-light), var(--raised-shadow); }
:root .md-status { padding: 16px 18px; background: var(--info-soft); color: var(--ink); border: 1px solid var(--info-line); border-radius: var(--radius-lg); }
:root .md-status:hover { color: var(--ink); }
:root .md-status .ey { color: var(--link); }
:root .md-status small { color: var(--pencil); font-family: var(--sans); }
:root .md-status b { font-size: 20px; font-weight: 700; line-height: 1.2; }
:root .md-quiet { margin-top: 12px; padding: 16px 18px; }
:root .md-quiet b { font-size: 17px; font-weight: 600; }
:root .md-head b { font-size: 17px; }
/* Kopf und Zeilen sind Geschwister: Läufe aus .md-head + .md-row werden zu einer Fläche. */
:root .md-head { margin-top: 14px; padding: 14px 16px 8px; background: var(--glass-plane); border: 1px solid var(--glass-edge); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--glass-light); }
:root .md-row { padding: 12px 16px; background: var(--glass-plane); border: 1px solid var(--glass-edge); border-width: 0 1px; border-radius: 0; box-shadow: inset 0 -1px 0 var(--line-soft); }
:root .md-row:hover { background: var(--raised-hover); }
:root :not(.md-row, .md-head) + .md-row { margin-top: 12px; border-top-width: 1px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
:root .md-row:not(:has(+ .md-row)) { border-bottom-width: 1px; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); box-shadow: var(--plane-shadow); }
:root .md-head + .mini-month { margin-top: 0; padding: 10px 12px 6px; background: var(--glass-plane); border: 1px solid var(--glass-edge); border-width: 0 1px; }
:root .mini-month + .quiet { display: flex; align-items: center; min-height: 44px; padding: 0 16px 6px; background: var(--glass-plane); border: 1px solid var(--glass-edge); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--plane-shadow); text-decoration: none; }
:root .md-open { background: var(--attention-soft); border-color: var(--attention-line); }

@media (max-width: 800px) {
    :root .fb-top { top: 8px; width: calc(100% - 16px); margin-top: 8px; padding: 4px; border-radius: 26px; }
    :root .fb-brand { flex: 1; border-right: 0; min-height: 44px; font-size: 18px; }
    :root .fb-search { width: 44px; padding: 0; background: transparent; }
    :root h1, :root .h1 { font-size: 34px; }
    :root .drawer h1 { font-size: 28px; }
    :root .mobile-nav { inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; }
    :root .mobile-nav a { min-height: 52px; border-radius: 999px; font-weight: 600; color: var(--ink-2); }
    :root .mobile-nav a[aria-current] { color: var(--link); box-shadow: var(--on-ring); }
    :root .nav-add { width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-fg); box-shadow: var(--btn-light), var(--accent-shadow); }
    :root #main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
    :root .flow-foot { bottom: calc(84px + env(safe-area-inset-bottom)); margin: 0; border-radius: var(--radius-lg); }
    :root .drawer { inset: 8px; width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 26px; }
    :root #panel.as-dialog { inset: auto 8px 8px; width: calc(100% - 16px); border: 1px solid var(--edge-sheet); border-radius: 26px; box-shadow: var(--glass-light), var(--pop); }
    :root .selection { border-radius: var(--radius-lg); padding: 12px; }
    :root .day-main, :root .day-side { padding: 18px 16px 22px; }
    :root .amount-big input { font-size: 28px; }
    /* Kapsel-Auswahl bleibt einzeilig und füllt die Breite, statt umzubrechen. */
    :root .seg-choice { display: flex; flex-wrap: nowrap; }
    :root .seg-choice label { flex: 1 1 auto; }
    :root .seg-choice span { flex: 1; justify-content: center; padding: 0 6px; font-size: var(--fs-5); white-space: nowrap; }
    :root { --top-gap: 18px; scroll-padding-top: 76px; }
    :root #main .form-foot { bottom: calc(84px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 16px; }
    :root #main .flow-foot { padding: 8px; }
    :root :is(.tabs, .wizard-steps) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    :root :is(.tabs, .wizard-steps)::-webkit-scrollbar { display: none; }
    :root .tabs > a { padding: 8px 13px; }
    :root .wizard-steps > * { flex: none; white-space: nowrap; }
    :root .selection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root .selection [data-book] { grid-column: 1 / -1; }
    :root .selection :is(.btn, .btn-secondary) { padding: 0 12px; font-size: var(--fs-4); }
    :root .clean-tasks { margin-bottom: 28px; }
    :root .fp-row { gap: 8px 14px; }
    :root .fp-time { width: 54px; font-size: 16px; }
    /* Listen: Name bekommt die erste Zeile, Status, Beträge und Knopf rücken darunter unter den Namen ein. */
    :root .list-row > .f1 { flex: 1 1 100%; }
    :root .list-row:has(> .av:first-child) { padding-left: 56px; }
    :root .list-row > .av:first-child { margin-left: -56px; }
    :root .list-row > :is(.btn, .btn-secondary, a.quiet):last-child { margin-left: auto; }
    /* Zeile mit Knopf am Ende: Betrag neben den Namen, Status und Knopf in eine volle zweite Zeile (::after erzwingt den Umbruch). */
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child) { row-gap: 0; padding-left: 0; }
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child) > .av { margin-left: 0; }
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child) > .f1 { flex: 1 1 0; }
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child) > b { order: 1; }
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child)::after { content: ''; order: 2; flex: 0 0 100%; }
    :root .list-row:has(> .av:first-child):has(> :is(.btn, .btn-secondary):last-child) > :not(.av, .f1, b) { order: 3; margin-top: 8px; }
    /* Suchzeile: Feld volle Breite, darunter Suchen und Anlegen nebeneinander. */
    :root .row > form.row.f1:has(> input[type='search']) { display: contents; }
    :root .row:has(> form.row.f1) > form > input[type='search'] { flex: 1 1 100%; }
    :root .row:has(> form.row.f1) > form > button, :root .row:has(> form.row.f1) > .btn { flex: 1 1 0; }
    :root form.row[data-auto-filter] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    :root form.row[data-auto-filter] > * { width: 100%; }
    :root form.row[data-auto-filter] > input[type='search'] { grid-column: 1 / -1; }
    /* Einstellungen: Bereiche als seitlich scrollende Kapselleiste, Zeilen zweizeilig. */
    :root .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    :root .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 3px; border-radius: 999px; background: var(--track); }
    :root .settings-nav::-webkit-scrollbar { display: none; }
    :root .settings-nav a { flex: none; min-height: 38px; padding: 0 13px; }
    :root .settings-nav .ey { display: none; }
    :root .settings-main { gap: 16px; }
    :root .settings-section { padding: 18px 16px 12px; }
    :root .set-row > .f1 { flex: 1 1 100%; }
    :root .set-row > .av + .f1 { flex: 1 1 0; }
    :root .set-row > .set-price { justify-items: start; text-align: left; }
    :root .set-row > .btn-secondary { margin-left: auto; }
    :root .season-head .quiet { margin-left: 0; flex-basis: 100%; }
    :root .season-axis span:nth-child(even) { visibility: hidden; }
    :root .set-row > .season-no + .f1 { flex: 1 1 calc(100% - 46px); }
    :root .set-row > .season-no ~ .set-price { margin-left: 36px; }
    /* Im Blatt schließt das X oben; ohne Abbrechen passt Speichern in die Fußleiste. */
    :root #panel .settings-form .form-foot [data-dismiss] { display: none; }
    :root .form-foot:has(.foot-note) { flex-wrap: wrap; row-gap: 8px; }
    :root .form-foot .foot-note { flex-basis: 100%; max-width: none; }
    /* Über der Navigationsleiste, nicht dahinter. */
    :root .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* Systemeinstellung „Weniger Transparenz“: kein Lichtgrund, schwebende Ebenen deckend und ohne Blur. */
@media (prefers-reduced-transparency: reduce) {
    :root body::before { display: none; }
    :root body { background: var(--solid-base); }
    :root :is(.mobile-nav, .selection, .flow-foot, dialog, .drawer, .tenant-menu > div, .drawer > header, .form-foot, .drawer .form-foot),
    :root .fb-top::before {
        background: var(--solid);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media print {
    .fb-top, .mobile-nav, .actions, .selection { display: none; }
    #main { padding: 0; }
    .card { break-inside: avoid; }
}
