/* ==========================================================================
   seidel-family.de – Gestaltung
   Farben: Tiefsee, Ozean, Lagune + Sonnenaufgang-Orange (siehe docs/design.md)
   ========================================================================== */

/* ---------- Farben & Grundwerte ---------- */
:root {
    --tiefsee: #0B2545;
    --ozean: #134074;
    --lagune: #2E86C1;
    --sonne: #EE8130;
    --sonne-text: #C2570C;   /* dunkleres Orange für Schrift auf Hell (Kontrast) */
    --gold: #FFD27A;
    --wolke: #F4F7FB;

    --bg: var(--wolke);
    --flaeche: #ffffff;
    --flaeche-2: #EAF0F7;
    --text: #13223B;
    --text-2: #50607A;
    --linie: #DAE3EE;
    --link: #1C6AA3;
    --zahl: var(--ozean);
    --hinweis: #A4520F;
    --abzeichen-bg: rgba(242, 140, 56, .14);
    --abzeichen-text: #A4520F;

    --kopf-h: 64px;
    --seitenbreite: 1520px;  /* Kopfleiste, Kapitel */
    --radius: 18px;
    --schatten: 0 1px 2px rgb(11 37 69 / .05), 0 6px 22px rgb(11 37 69 / .07);
    --schatten-gross: 0 2px 6px rgb(11 37 69 / .08), 0 24px 60px rgb(11 37 69 / .18);

    --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-titel: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;

    color-scheme: light;
}

/* Dunkel: automatisch nach Gerät – außer „Hell“ wurde gewählt */
@media (prefers-color-scheme: dark) {
    :root:not([data-farbschema="hell"]) {
        --bg: #061426;
        --flaeche: #0C1F3A;
        --flaeche-2: #122B4E;
        --text: #E7EEF8;
        --text-2: #A3B4CC;
        --linie: #1C3659;
        --link: #6DB8EE;
        --zahl: var(--gold);
        --hinweis: #FFC070;
        --sonne-text: #FFB066;
        --abzeichen-bg: rgba(255, 210, 122, .14);
        --abzeichen-text: var(--gold);
        --schatten: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
        --schatten-gross: 0 2px 6px rgb(0 0 0 / .35), 0 24px 60px rgb(0 0 0 / .5);
        color-scheme: dark;
    }
}
:root[data-farbschema="dunkel"] {
    --bg: #061426;
    --flaeche: #0C1F3A;
    --flaeche-2: #122B4E;
    --text: #E7EEF8;
    --text-2: #A3B4CC;
    --linie: #1C3659;
    --link: #6DB8EE;
    --zahl: var(--gold);
    --hinweis: #FFC070;
    --sonne-text: #FFB066;
    --abzeichen-bg: rgba(255, 210, 122, .14);
    --abzeichen-text: var(--gold);
    --schatten: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --schatten-gross: 0 2px 6px rgb(0 0 0 / .35), 0 24px 60px rgb(0 0 0 / .5);
    color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--kopf-h) + 24px);
    scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    padding-top: var(--kopf-h);
    font-family: var(--schrift);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body.startseite { padding-top: 0; }

h1, h2, h3, h4, h5 { font-family: var(--schrift-titel); line-height: 1.2; letter-spacing: -0.01em; }
a { color: var(--link); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
main { display: block; outline: none; }
::selection { background: rgba(242, 140, 56, .3); }

:focus-visible { outline: 2px solid var(--sonne); outline-offset: 2px; border-radius: 6px; }

.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }

.sprung {
    position: absolute; left: -9999px; top: 8px; z-index: 200;
    background: var(--sonne); color: #2b1300; padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.sprung:focus { left: 16px; }

.abzeichen {
    display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: 2px 8px; border-radius: 99px; background: var(--abzeichen-bg); color: var(--abzeichen-text);
    vertical-align: middle; white-space: nowrap;
}

/* Seitenübergänge zwischen Unterseiten */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.kopf { view-transition-name: kopf; }

/* ==========================================================================
   Kopfleiste
   ========================================================================== */
.kopf {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    height: var(--kopf-h);
    color: #fff;
    background: rgba(11, 37, 69, .9);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.kopf.ist-gescrollt { box-shadow: 0 6px 24px rgb(0 0 0 / .18); }

/* Über dem Startbild: durchsichtig, bis gescrollt wird oder ein Menü offen ist */
.kopf-ueber-bild .kopf:not(.ist-gescrollt) {
    background: linear-gradient(to bottom, rgba(4, 14, 30, .55), rgba(4, 14, 30, 0));
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.kopf-ueber-bild.mega-offen .kopf:not(.ist-gescrollt) { background: rgba(11, 37, 69, .92); }

.kopf-innen {
    height: 100%;
    max-width: var(--seitenbreite); margin: 0 auto; padding: 0 20px 0 28px;
    display: flex; align-items: center; gap: 16px;
}

.marke {
    display: inline-flex; align-items: center; gap: 11px;
    color: #fff; text-decoration: none; font-weight: 650; font-size: 22px; letter-spacing: -0.015em;
    white-space: nowrap;
}
.marke .tld { color: #F5913F; }
.logo-zeichen { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .25)); }

.hauptmenue { flex: 1; display: flex; justify-content: center; height: 100%; }
.hm-liste { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; height: 100%; }
.hm-punkt { height: 100%; display: flex; align-items: center; }
.hm-knopf {
    position: relative;
    display: inline-flex; align-items: center; gap: 5px;
    height: 46px; padding: 0 17px; border: 0; border-radius: 12px;
    background: transparent; color: rgba(255, 255, 255, .94);
    font-size: 17.5px; font-weight: 580; cursor: pointer;
    transition: background-color .2s, color .2s;
}
.hm-knopf:hover, .hm-punkt.offen .hm-knopf { background: rgba(255, 255, 255, .1); color: #fff; }
.hm-knopf::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: -8px; height: 2px; border-radius: 2px;
    background: var(--sonne); transform: scaleX(0); transition: transform .25s ease;
}
.hm-punkt.ist-aktuell .hm-knopf::after, .hm-punkt.offen .hm-knopf::after { transform: scaleX(1); }
.hm-pfeil { width: 18px; height: 18px; opacity: .7; transition: transform .25s ease; }
.hm-punkt.offen .hm-pfeil { transform: rotate(180deg); }

.kopf-aktionen { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hauptmenue + .kopf-aktionen { margin-left: 0; }
.knopf-icon {
    display: inline-grid; place-items: center;
    width: 48px; height: 48px; border: 0; border-radius: 12px;
    background: transparent; color: inherit; cursor: pointer;
    transition: background-color .2s;
}
.knopf-icon:hover { background: rgba(255, 255, 255, .12); }
.knopf-icon.ist-bald { opacity: .45; cursor: default; }
.knopf-icon.ist-bald:hover { background: transparent; }
.knopf-icon .icon { width: 27px; height: 27px; }

/* ---------- Mega-Menü ---------- */
.mega {
    position: absolute; top: calc(var(--kopf-h) - 2px); left: 50%;
    transform: translate(-50%, -8px);
    max-width: calc(100vw - 32px);
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 20px;
    box-shadow: var(--schatten-gross);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
    z-index: 2;
}
.hm-punkt.offen .mega {
    opacity: 1; visibility: visible; transform: translate(-50%, 6px);
    transition: opacity .2s ease, transform .25s ease, visibility 0s;
}
.mega-innen {
    display: grid; grid-auto-flow: column; grid-auto-columns: 272px;
    padding: 12px;
}
.mega-spalte { padding: 4px; min-height: 260px; }
.mega-spalte + .mega-spalte { border-left: 1px solid var(--linie); padding-left: 10px; margin-left: 6px; }
.mega-kopf {
    display: flex; align-items: center; gap: 6px;
    margin: 4px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-2); text-decoration: none;
}
.mega-kopf .icon { width: 14px; height: 14px; transition: transform .2s; }
.mega-kopf:hover { color: var(--link); }
.mega-kopf:hover .icon { transform: translateX(3px); }

.mega-liste { list-style: none; margin: 0; padding: 0; display: none; }
.mega-liste.ist-aktiv { display: block; animation: einblenden .25s ease both; }
@keyframes einblenden { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.mega-eintrag {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 12px;
    color: var(--text); text-decoration: none;
    transition: background-color .15s;
}
.mega-eintrag:hover, .mega-eintrag.ist-gewaehlt { background: var(--flaeche-2); }
.me-icon {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: var(--flaeche-2); color: var(--lagune);
    transition: background-color .15s, color .15s;
}
.mega-eintrag:hover .me-icon, .mega-eintrag.ist-gewaehlt .me-icon { background: var(--lagune); color: #fff; }
.me-text { min-width: 0; display: flex; flex-direction: column; }
.me-titel { font-weight: 600; font-size: 15px; line-height: 1.3; }
.me-unter {
    font-size: 12.5px; line-height: 1.35; color: var(--text-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.me-pfeil { color: var(--text-2); display: grid; }
.me-pfeil .icon { width: 16px; height: 16px; transition: transform .2s; }
.mega-eintrag.ist-gewaehlt .me-pfeil { color: var(--sonne); }
.mega-eintrag.ist-gewaehlt .me-pfeil .icon { transform: translateX(2px); }
.mega-eintrag.ist-bald { opacity: .55; grid-template-columns: 36px 1fr auto; cursor: default; }

.mega-vorschau {
    position: relative; overflow: hidden;
    width: 280px; margin-left: 10px; padding: 22px;
    border-radius: 14px; color: #fff;
    background:
        radial-gradient(120% 80% at 85% 0%, rgba(242, 140, 56, .55), transparent 55%),
        linear-gradient(160deg, var(--ozean), var(--tiefsee));
    display: flex; flex-direction: column; gap: 8px;
}
.mv-bild {
    display: none; height: 150px; margin: -8px -8px 8px; border-radius: 10px;
    background: #fff center / cover no-repeat;
}
.mega-vorschau.hat-bild .mv-bild { display: block; }
.mv-ueber { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.mv-titel { margin: 0; font-family: var(--schrift-titel); font-size: 21px; font-weight: 650; line-height: 1.25; }
.mv-text { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .82); }
.mv-info:empty { display: none; }
.mv-info {
    margin: auto 0 0; align-self: flex-start;
    padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
    background: var(--sonne); color: #2b1300;
}
.mega-vorschau.wechsel > * { animation: einblenden .25s ease both; }

.mega-hintergrund {
    position: fixed; inset: var(--kopf-h) 0 0 0; z-index: 45;
    background: rgba(3, 12, 26, .35);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mega-offen .mega-hintergrund { opacity: 1; pointer-events: auto; }

@media (max-width: 1180px) { .mega-vorschau { display: none; } }
@media (max-width: 900px) {
    .hauptmenue { display: none; }
    .kopf-aktionen { margin-left: auto; }
}

/* ---------- Gesamtmenü (Schublade) ---------- */
.schublade {
    position: fixed; inset: 0 0 0 auto;
    width: min(400px, 100vw); height: 100dvh; max-height: none; max-width: none;
    margin: 0; padding: 0; border: 0;
    color: var(--text); background: var(--flaeche);
    box-shadow: var(--schatten-gross);
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), display .35s allow-discrete, overlay .35s allow-discrete;
}
.schublade[open] { display: flex; transform: none; }
@starting-style { .schublade[open] { transform: translateX(100%); } }
.schublade::backdrop {
    background: rgba(3, 12, 26, 0);
    transition: background-color .35s, display .35s allow-discrete, overlay .35s allow-discrete;
}
.schublade[open]::backdrop { background: rgba(3, 12, 26, .5); }
@starting-style { .schublade[open]::backdrop { background: rgba(3, 12, 26, 0); } }

.sl-kopf {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--kopf-h); padding: 0 10px 0 22px; flex: none;
    background: var(--tiefsee); color: #fff;
}
.sl-titel { font-weight: 650; font-size: 17px; }
.sl-nav { flex: 1; overflow-y: auto; padding: 10px 0 20px; overscroll-behavior: contain; }
.sl-nav hr { border: 0; border-top: 1px solid var(--linie); margin: 12px 22px; }
.sl-liste { list-style: none; margin: 0; padding: 0; }
.sl-liste .sl-liste { padding-left: 14px; margin-left: 22px; border-left: 2px solid var(--linie); }
.sl-link {
    display: block; padding: 10px 22px; color: var(--text); text-decoration: none;
    font-size: 17px; font-weight: 550;
}
.sl-liste .sl-liste .sl-link { padding: 8px 12px; font-size: 15.5px; font-weight: 500; }
.sl-link:hover { color: var(--link); }
.sl-link[aria-current="page"] { color: var(--link); box-shadow: inset 3px 0 0 var(--sonne); }
.sl-link.ist-bald { color: var(--text-2); cursor: default; }
.sl-service .sl-link { font-size: 15.5px; font-weight: 500; }
.schublade details > summary { display: flex; align-items: center; list-style: none; cursor: pointer; }
.schublade details > summary::-webkit-details-marker { display: none; }
.schublade summary .sl-link { flex: 1; }
.sl-pfeil {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: 10px;
    border-radius: 10px; color: var(--text-2);
}
.sl-pfeil:hover { background: var(--flaeche-2); }
.sl-pfeil .icon { transition: transform .25s; }
.schublade details[open] > summary .sl-pfeil .icon { transform: rotate(180deg); }
.sl-fuss {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie);
    font-size: 14px; color: var(--text-2);
}
.schema-wahl { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--flaeche-2); }
.schema-wahl button {
    display: inline-flex; align-items: center; gap: 5px;
    border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; cursor: pointer;
    font-size: 13px; color: var(--text-2);
}
.schema-wahl button .icon { width: 16px; height: 16px; }
.schema-wahl button[aria-checked="true"] { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); }

/* ---------- Suche ---------- */
.suchfenster {
    width: min(680px, calc(100vw - 24px)); max-height: min(640px, 80dvh);
    margin: 10vh auto auto; padding: 0;
    border: 1px solid var(--linie); border-radius: 20px;
    color: var(--text); background: var(--flaeche); box-shadow: var(--schatten-gross);
    flex-direction: column; overflow: hidden;
    opacity: 0; transform: translateY(-10px) scale(.98);
    transition: opacity .2s, transform .2s, display .2s allow-discrete, overlay .2s allow-discrete;
}
.suchfenster[open] { display: flex; opacity: 1; transform: none; }
@starting-style { .suchfenster[open] { opacity: 0; transform: translateY(-10px) scale(.98); } }
.suchfenster::backdrop { background: rgba(3, 12, 26, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.such-form { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--linie); }
.such-form .icon { color: var(--text-2); width: 22px; height: 22px; }
.such-form input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
    font: inherit; font-size: 18px; padding: 6px 0;
}
.such-form input::-webkit-search-cancel-button { display: none; }
kbd {
    font: 600 11.5px var(--schrift); color: var(--text-2);
    padding: 3px 7px; border: 1px solid var(--linie); border-bottom-width: 2px; border-radius: 6px;
}
.such-treffer { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.such-treffer:empty { display: none; }
.such-treffer a {
    display: block; padding: 10px 14px; border-radius: 12px; color: var(--text); text-decoration: none;
}
.such-treffer a:hover, .such-treffer [aria-selected="true"] a { background: var(--flaeche-2); }
.such-treffer [aria-selected="true"] a { box-shadow: inset 3px 0 0 var(--sonne); }
.st-bereich { display: block; font-size: 12px; color: var(--text-2); }
.st-titel { display: block; font-weight: 600; }
.st-text { display: block; font-size: 13.5px; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.such-treffer mark { background: rgba(242, 140, 56, .28); color: inherit; border-radius: 3px; padding: 0 1px; }
.such-hinweis { margin: 0; padding: 12px 18px 16px; font-size: 13.5px; color: var(--text-2); }

/* ==========================================================================
   Startseite
   ========================================================================== */
/* Startbild füllt den ganzen Bildschirm – die Kacheln kommen erst beim Scrollen */
.held {
    position: relative; overflow: hidden;
    height: 100svh; min-height: 480px;
    background: #2a2440;
    isolation: isolate;
}
.held-bild {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 47%;
    z-index: -2;
}
.held-glanz {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(38% 30% at 50% 47%, rgba(255, 196, 120, .38), rgba(255, 160, 80, 0) 70%);
    mix-blend-mode: screen;
}
/* Nur ein schmaler, weicher Übergang ganz unten */
.held::after {
    content: ""; position: absolute; inset: auto 0 -2px 0; height: 12%; z-index: -1;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 55%, transparent) 65%, var(--bg));
}
@media (prefers-reduced-motion: no-preference) {
    .held-bild { animation: heranfahren 18s cubic-bezier(.2, .6, .2, 1) both; }
    .held-glanz { animation: atmen 7s ease-in-out infinite alternate; }
    .held-weiter { animation: wippen 2.4s ease-in-out infinite; }
}
@keyframes heranfahren { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes atmen { from { opacity: .55; } to { opacity: 1; } }
@keyframes wippen { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

.held-ort {
    position: absolute; left: 24px; bottom: 30px; margin: 0;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: rgba(255, 255, 255, .5); text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.held-ort .icon { width: 14px; height: 14px; opacity: .8; }
.held-weiter {
    position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.held-weiter:hover { background: rgba(255, 255, 255, .24); }

/* Begrüßung über dem Startbild: blendet langsam ein und nach einigen Sekunden wieder aus */
.held-gruss {
    position: absolute; left: 0; right: 0; top: 27%; margin: 0; padding: 0 20px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-align: center; color: #fff; pointer-events: none;
    text-shadow: 0 2px 24px rgba(10, 20, 45, .55), 0 1px 3px rgba(10, 20, 45, .4);
    opacity: 0;
}
.hg-klein { font-family: var(--schrift); font-size: clamp(15px, 1.8vw, 21px); font-weight: 500; letter-spacing: .22em; text-transform: uppercase; opacity: .92; }
.hg-gross { font-family: var(--schrift-titel); font-size: clamp(40px, 7.2vw, 92px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.hg-gross .tld { color: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
    .held-gruss { animation: gruessen 9s cubic-bezier(.4, 0, .2, 1) .7s both; }
}
@media (prefers-reduced-motion: reduce) {
    .held-gruss { opacity: 1; }
}
.gruss-gesehen .held-gruss { animation: none; opacity: 0; }
@keyframes gruessen {
    0%   { opacity: 0; transform: translateY(16px); filter: blur(8px); }
    16%  { opacity: 1; transform: none; filter: blur(0); }
    70%  { opacity: 1; transform: none; filter: blur(0); }
    100% { opacity: 0; transform: translateY(-10px); filter: blur(5px); }
}

/* „Auf einen Blick“ – auf sanftem Himmel-/Meer-Verlauf statt reinem Weiß */
.blick {
    position: relative; padding: 56px 20px 96px;
    background:
        radial-gradient(50% 60% at 94% 6%, color-mix(in srgb, var(--sonne) 14%, transparent), transparent 70%),
        radial-gradient(60% 70% at 2% 100%, color-mix(in srgb, var(--lagune) 18%, transparent), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--lagune) 10%, var(--bg)) 100%);
}
.blick-innen { max-width: 1160px; margin: 0 auto; }

.abschnitt-ueber {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 18px; font-family: var(--schrift); font-size: 13.5px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
}
.abschnitt-ueber::before { content: ""; width: 24px; height: 3px; border-radius: 3px; background: var(--sonne); }
.inhalt-breit .abschnitt-ueber { margin-top: 56px; }

.bento { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); gap: 18px; }
.kachel {
    position: relative; display: flex; flex-direction: column; gap: 5px;
    padding: 22px 24px; border-radius: 20px;
    background: var(--flaeche); color: var(--text);
    border: 1px solid var(--linie); box-shadow: var(--schatten);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
a.kachel:hover { transform: translateY(-3px); box-shadow: var(--schatten-gross); border-color: var(--lagune); }
.kachel-ueber {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px;
    font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
}
.kachel-ueber .icon { width: 18px; height: 18px; color: var(--lagune); }
.kachel strong { font-size: 19px; font-family: var(--schrift-titel); line-height: 1.3; }
.kachel-fein { font-size: 15px; color: var(--text-2); }

.kachel-thb { padding: 0; overflow: hidden; }
.kachel-thb-bild { width: 100%; height: 150px; object-fit: cover; object-position: center 32%; display: block; }
.kachel-thb-text { display: flex; flex-direction: column; gap: 5px; padding: 18px 24px 22px; flex: 1; }
.kachel-thb h3 { margin: 0; font-size: 24px; font-weight: 650; }
.kachel-thb p { margin: 0; font-size: 15.5px; color: var(--text-2); }
.kachel-los { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 600; font-size: 15.5px; }
.kachel-los .icon, .kk-fuss .icon { width: 17px; height: 17px; transition: transform .2s; }
a.kachel:hover .kachel-los .icon { transform: translateX(4px); }

.gross-zahl {
    display: flex; align-items: baseline; gap: 7px;
    font-family: var(--schrift-titel); font-size: 48px; font-weight: 700; line-height: 1;
    color: var(--zahl); letter-spacing: -0.03em; margin: 4px 0 8px;
}
.gross-zahl small { font-size: 17px; font-weight: 550; color: var(--text-2); letter-spacing: 0; }

/* Ferien-Kachel: nur ein warmer Rand oben statt voller Farbfläche */
.kachel-warm { border-top: 4px solid var(--sonne); }
.kachel-warm .kachel-ueber .icon { color: var(--sonne-text); }

.balken { display: block; height: 6px; border-radius: 6px; background: var(--flaeche-2); overflow: hidden; margin: 8px 0 2px; color: var(--sonne); }
.balken > span { display: block; height: 100%; width: var(--anteil); border-radius: inherit; background: currentColor; }

@media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kachel-thb { grid-column: 1 / -1; flex-direction: row; }
    .kachel-thb-bild { width: 42%; height: auto; min-height: 180px; }
}
@media (max-width: 560px) {
    .blick { padding: 40px 16px 72px; }
    .bento { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .kachel-thb { flex-direction: column; }
    .kachel-thb-bild { width: 100%; height: 140px; min-height: 0; }
    .held-ort { bottom: 22px; left: 16px; right: 16px; font-size: 12px; }
    .held-weiter { display: none; }
    .held-gruss { top: 24%; }
}

/* Sanftes Auftauchen beim Scrollen (nur wo der Browser es kann) */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .enthuellen {
            animation: auftauchen linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 35%;
        }
    }
}
@keyframes auftauchen { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Unterseiten
   ========================================================================== */
.seitenkopf {
    position: relative; overflow: hidden;
    color: #fff; text-align: center;
    padding: 30px 20px 70px;
    background:
        radial-gradient(60% 120% at 88% -10%, rgba(242, 140, 56, .5), transparent 60%),
        radial-gradient(40% 80% at 8% 120%, rgba(46, 134, 193, .45), transparent 60%),
        linear-gradient(135deg, var(--tiefsee) 0%, var(--ozean) 100%);
}
.seitenkopf::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
    background: var(--bg);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 30c120-14 240-22 360-14s240 30 360 26 240-28 360-30 240 14 360 18v18H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 30c120-14 240-22 360-14s240 30 360 26 240-28 360-30 240 14 360 18v18H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.seitenkopf-innen { position: relative; max-width: 860px; margin: 0 auto; }
.seitenkopf h1 { margin: 4px 0 8px; font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.025em; }
.seitenkopf-ueber { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.seitenkopf-lead { margin: 0 auto; max-width: 62ch; font-size: 17.5px; color: rgba(255, 255, 255, .85); }

.brotkrumen ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 13.5px; }
.brotkrumen li { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, .7); }
.brotkrumen li + li::before { content: "›"; opacity: .6; margin-right: 2px; }
.brotkrumen a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.brotkrumen a:hover { color: #fff; text-decoration: underline; }
.brotkrumen [aria-current] { color: #fff; font-weight: 600; }

.inhalt-schmal { max-width: 780px; margin: 0 auto; padding: 8px 20px 88px; }
.inhalt-breit { max-width: 1180px; margin: 0 auto; padding: 8px 20px 88px; }

/* Knöpfe */
.knopf {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 99px; border: 1px solid var(--linie);
    background: var(--flaeche); color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer;
    transition: transform .15s, box-shadow .2s, border-color .2s;
}
.knopf:hover { border-color: var(--lagune); box-shadow: var(--schatten); }
.knopf:active { transform: scale(.98); }
.knopf-primaer { background: var(--sonne); border-color: transparent; color: #2b1300; }
.knopf-primaer:hover { border-color: transparent; filter: brightness(1.05); }
.knopf-reihe { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Termine (kompakt: eine Liste, Zeilen statt Einzelkarten) ---------- */
.jahreswahl { display: flex; justify-content: center; gap: 10px; margin: 0 0 22px; }
.jahreswahl a {
    min-width: 88px; text-align: center; padding: 8px 16px; border-radius: 99px;
    border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
    font-weight: 650; font-variant-numeric: tabular-nums; text-decoration: none;
    transition: border-color .2s, transform .15s;
}
.jahreswahl a:hover { border-color: var(--lagune); transform: translateY(-1px); }
.jahreswahl a.ist-gewaehlt { background: var(--ozean); border-color: var(--ozean); color: #fff; }
:root[data-farbschema="dunkel"] .jahreswahl a.ist-gewaehlt { background: var(--lagune); border-color: var(--lagune); }
@media (prefers-color-scheme: dark) { :root:not([data-farbschema="hell"]) .jahreswahl a.ist-gewaehlt { background: var(--lagune); border-color: var(--lagune); } }
.jahr-extra { text-align: center; margin: -10px 0 18px; color: var(--text-2); }

.termin-liste {
    list-style: none; margin: 0; padding: 0;
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; overflow: hidden;
}
.termin {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
    padding: 8px 14px; border-bottom: 1px solid var(--linie);
    transition: background-color .2s;
}
.termin:last-child { border-bottom: 0; }
.termin:hover { background: color-mix(in srgb, var(--flaeche-2) 50%, var(--flaeche)); }
.t-datum {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 11px; background: var(--flaeche-2); line-height: 1.05;
}
.t-tag { font-family: var(--schrift-titel); font-size: 18px; font-weight: 700; color: var(--zahl); }
.t-monat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.t-text { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; line-height: 1.4; }
.t-name { font-size: 16.5px; font-weight: 650; color: var(--text); }
.t-name small { font-weight: 400; font-size: 13px; color: var(--text-2); }
.t-wochentag { font-size: 15.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.t-hinweis { font-size: 14px; font-weight: 550; color: var(--hinweis); }
.t-abstand {
    /* „in n Tagen“ */
    font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--text-2);
    padding: 3px 10px; border-radius: 99px; background: var(--flaeche-2);
}
.termin .balken { max-width: 320px; }

/* Feiertage: Name links, Wochentag/Datum rechts in derselben Zeile */
@media (min-width: 640px) {
    .feiertag-liste .t-text { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; }
    .feiertag-liste .t-wochentag { text-align: right; }
    .feiertag-liste .t-hinweis { grid-column: 1 / -1; }
}

/* Vergangene Termine: zart hellblau hinterlegt, nur leicht zurückgenommen – bleiben gut lesbar */
.termin.ist-vorbei { background: color-mix(in srgb, var(--lagune) 8%, var(--flaeche)); }
.termin.ist-vorbei > * { opacity: .78; }
.termin.ist-vorbei .t-datum { background: color-mix(in srgb, var(--lagune) 14%, var(--flaeche)); }
/* Nächster Termin: zart gelb-orange hinterlegt, Datum und „in n Tagen“ in kräftigem Blau */
.termin.ist-naechster { background: color-mix(in srgb, var(--gold) 46%, var(--flaeche)); box-shadow: inset 5px 0 0 var(--sonne), 0 0 0 1px color-mix(in srgb, var(--sonne) 45%, transparent), var(--schatten); }
.termin.ist-naechster .t-datum { background: var(--ozean); }
.termin.ist-naechster .t-tag, .termin.ist-naechster .t-monat { color: #fff; }
.termin.ist-naechster .t-abstand { background: var(--ozean); color: #fff; }
.termin.ist-klammer .t-name { font-weight: 550; }
.termin.ist-wochenende .t-datum, .markiert {
    background: repeating-linear-gradient(135deg, var(--flaeche-2) 0 6px, transparent 6px 11px), var(--flaeche);
    box-shadow: inset 0 0 0 1px var(--linie);
}
.markiert { padding: 0 6px; border-radius: 6px; }

@media (max-width: 560px) {
    .termin { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
    .t-datum { width: 42px; height: 42px; }
    .t-abstand { grid-column: 2; justify-self: start; margin-top: -2px; }
    .jahreswahl { gap: 8px; }
    .jahreswahl a { min-width: 0; flex: 1; padding: 8px; }
}

.fussnote { margin-top: 20px; font-size: 14px; color: var(--text-2); }
.hinweis-box {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 20px 22px; border-radius: 18px; background: var(--flaeche-2);
}
.hinweis-box .icon { color: var(--lagune); width: 24px; height: 24px; margin-top: 2px; }
.hinweis-box p { margin: 0; }
a.extern::after { content: "↗"; font-size: .8em; margin-left: 2px; text-decoration: none; display: inline-block; }

/* ---------- Übersichtskarten ---------- */
.karten-raster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ueber-karte {
    position: relative; height: 100%;
    display: flex; flex-direction: column; gap: 8px;
    padding: 24px; border-radius: 22px;
    background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); box-shadow: var(--schatten);
    text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.ueber-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-gross); border-color: var(--lagune); }
.ueber-karte.ist-bald { opacity: .62; box-shadow: none; }
.uk-icon {
    display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; margin-bottom: 6px;
    color: #fff; background: linear-gradient(135deg, var(--lagune), var(--ozean));
}
.uk-icon .icon { width: 26px; height: 26px; }
.ist-bald .uk-icon { background: var(--flaeche-2); color: var(--text-2); }
.uk-titel { font-family: var(--schrift-titel); font-size: 21px; font-weight: 650; }
.uk-text { color: var(--text-2); }
.uk-info { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: var(--abzeichen-bg); color: var(--abzeichen-text); }
.uk-unter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.uk-unter span { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--flaeche-2); color: var(--text-2); }
.uk-los { position: absolute; top: 26px; right: 24px; color: var(--lagune); transition: transform .2s; }
a.ueber-karte:hover .uk-los { transform: translateX(4px); }

/* ---------- Taucherhandbuch: Übersicht ---------- */
.thb-einstieg { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 44px; align-items: center; }
.thb-einstieg img { width: 100%; border-radius: 18px; box-shadow: var(--schatten-gross); background: #fff; }
.lead { font-size: 19px; line-height: 1.6; margin: 0 0 22px; }
.kennzahlen { list-style: none; margin: 0 0 26px; padding: 0; display: flex; gap: 32px; color: var(--text-2); }
.kennzahlen strong { display: block; font-family: var(--schrift-titel); font-size: 34px; line-height: 1.1; color: var(--zahl); }
@media (max-width: 760px) { .thb-einstieg { grid-template-columns: 1fr; gap: 24px; } .thb-einstieg img { max-width: 320px; } }

.kapitel-raster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.kapitel-karte {
    position: relative; overflow: hidden; height: 100%;
    display: flex; flex-direction: column; gap: 4px;
    padding: 22px 22px 20px; border-radius: 20px;
    background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); box-shadow: var(--schatten);
    text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.kapitel-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-gross); border-color: var(--lagune); }
.kk-nr {
    font-family: var(--schrift-titel); font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--sonne), var(--lagune)); -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 8px;
}
.kk-titel { font-family: var(--schrift-titel); font-size: 19px; font-weight: 650; }
.kk-text { font-size: 14.5px; color: var(--text-2); flex: 1; }
.kk-fuss { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--link); }
.kapitel-karte:hover .kk-fuss .icon { transform: translateX(4px); }

.gliederung { display: grid; gap: 10px; }
.gl-kapitel { border-radius: 16px; background: var(--flaeche); border: 1px solid var(--linie); }
.gl-kapitel summary {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none;
    font-weight: 650; font-size: 17px;
}
.gl-kapitel summary::-webkit-details-marker { display: none; }
.gl-nr { display: inline-grid; place-items: center; min-width: 36px; height: 28px; border-radius: 8px; background: var(--flaeche-2); color: var(--zahl); font-size: 14px; }
.gl-pfeil { margin-left: auto; color: var(--text-2); transition: transform .25s; }
.gl-kapitel[open] .gl-pfeil { transform: rotate(180deg); }
.gl-kapitel ul { list-style: none; margin: 0; padding: 0 18px 16px 66px; columns: 2 300px; column-gap: 32px; }
.gl-kapitel li { break-inside: avoid; padding: 3px 0; }
.gl-kapitel a { color: var(--text); text-decoration: none; }
.gl-kapitel a:hover { color: var(--link); text-decoration: underline; }
.gl-ebene-1 { font-weight: 650; }
.gl-ebene-3 { padding-left: 16px !important; font-size: 14.5px; }
.gl-ebene-3 a { color: var(--text-2); }

/* ---------- Taucherhandbuch: Kapitel ---------- */
:root { --rand-b: 330px; --rand-abstand: 64px; }
.kapitelseite .seitenkopf { text-align: left; padding-bottom: 76px; }
.kapitelseite .seitenkopf-innen { max-width: calc(var(--seitenbreite) - 56px); padding-left: calc(var(--rand-b) + var(--rand-abstand)); }
.kapitelseite .brotkrumen ol { justify-content: flex-start; }
.kapitelseite .seitenkopf-lead { margin: 0; max-width: 70ch; font-size: 16.5px; }

.lesefortschritt {
    position: fixed; top: var(--kopf-h); left: 0; right: 0; height: 3px; z-index: 49;
    transform-origin: 0 50%; transform: scaleX(var(--fortschritt, 0));
    background: linear-gradient(90deg, var(--sonne), var(--gold));
}

.kapitel-layout {
    max-width: var(--seitenbreite); margin: 0 auto; padding: 8px 28px 88px;
    display: grid; grid-template-columns: var(--rand-b) minmax(0, 1fr); gap: var(--rand-abstand); align-items: start;
}
.kapitel-rand {
    position: sticky; top: calc(var(--kopf-h) + 20px); max-height: calc(100vh - var(--kopf-h) - 40px);
    overflow-y: auto; scrollbar-width: thin; padding-right: 6px;
}
.kr-kapitelwahl, .kr-toc-box { border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); }
.kr-kapitelwahl { margin-bottom: 24px; }
.kr-kapitelwahl summary, .kr-toc-box summary {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none;
    font-weight: 600; font-size: 16px;
}
.kr-kapitelwahl summary::-webkit-details-marker, .kr-toc-box summary::-webkit-details-marker { display: none; }
.kr-kapitelwahl summary .icon, .kr-toc-box summary .icon { width: 19px; height: 19px; color: var(--lagune); }
.kr-pfeil { margin-left: auto; transition: transform .25s; }
details[open] > summary .kr-pfeil { transform: rotate(180deg); }
.kr-kapitelwahl ol { list-style: none; margin: 0; padding: 4px 8px 10px; }
.kr-kapitelwahl a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 15.5px; }
.kr-kapitelwahl a span { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 22px; }
.kr-kapitelwahl a span .icon { width: 17px; height: 17px; }
.kr-kapitelwahl a:hover { background: var(--flaeche-2); }
.kr-kapitelwahl a[aria-current] { background: var(--flaeche-2); font-weight: 650; }

.kr-toc { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--linie); }
.kr-toc a {
    display: block; margin-left: -2px; padding: 6px 0 6px 16px; border-left: 3px solid transparent;
    color: var(--text-2); text-decoration: none; font-size: 15.5px; line-height: 1.4;
    transition: color .15s, border-color .15s, background-color .15s;
}
.kr-toc .toc-ebene-2 a { color: var(--text); font-weight: 550; }
.kr-toc .toc-ebene-2:not(:first-child) a { margin-top: 6px; }
.kr-toc .toc-ebene-3 a { padding-left: 30px; font-size: 15px; }
.kr-toc a:hover { color: var(--link); }
.kr-toc a.ist-aktiv {
    color: var(--link); border-left-color: var(--sonne); font-weight: 650;
    background: linear-gradient(90deg, color-mix(in srgb, var(--sonne) 10%, transparent), transparent 80%);
}

/* Blätterleiste « ‹ n/m › » */
.kr-blaettern {
    display: flex; align-items: center; gap: 6px; padding: 8px;
    border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie);
}
.krb-knopf {
    display: grid; place-items: center; width: 40px; height: 38px; flex: none;
    border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche);
    color: var(--link); cursor: pointer; text-decoration: none;
    transition: background-color .15s, border-color .15s, transform .15s;
}
.krb-knopf:hover { background: var(--flaeche-2); border-color: var(--lagune); }
.krb-knopf:active { transform: scale(.95); }
.krb-knopf[aria-disabled] { color: var(--linie); cursor: default; pointer-events: none; }
.krb-knopf .icon { width: 19px; height: 19px; }
.krb-mitte { flex: 1; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Am PC: Inhaltsverzeichnis als feste Liste ohne Rahmen */
@media (min-width: 1101px) {
    .kr-toc-box { background: none; border: 0; }
    .kr-toc-box summary {
        padding: 0 0 10px; cursor: default; pointer-events: none;
        font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2);
    }
    .kr-toc-box summary .icon { display: none; }
    /* Blätterleiste bleibt unten im Rand sichtbar, auch wenn das Verzeichnis lang ist */
    .kr-blaettern { position: sticky; bottom: 0; margin-top: 20px; box-shadow: 0 -10px 18px var(--bg); }
}
@media (max-width: 1300px) and (min-width: 1101px) { :root { --rand-b: 290px; --rand-abstand: 44px; } }

/* Tablet und Handy: Kapitelwahl und Inhaltsverzeichnis als Aufklapp-Kästen über dem Text */
@media (max-width: 1100px) {
    .kapitelseite .seitenkopf-innen { padding-left: 0; }
    .kapitel-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 4px 20px 72px; }
    .kapitel-rand { position: static; max-height: none; overflow: visible; padding: 0; }
    .kr-innen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; }
    .kr-kapitelwahl { margin: 0; }
    .kr-toc-box .kr-toc { margin: 0 12px 12px 16px; max-height: 60vh; overflow-y: auto; }
    .thb-inhalt { margin: 0 auto; }
    /* Blätterleiste als schwebende Leiste unten am Bildschirm */
    .kr-blaettern {
        position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
        bottom: calc(12px + env(safe-area-inset-bottom)); width: min(340px, calc(100% - 24px));
        padding: 6px; box-shadow: var(--schatten-gross);
        background: color-mix(in srgb, var(--flaeche) 92%, transparent);
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    }
    .kapitelseite .fuss { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Fließtext (Handbuch, Impressum …) */
.prosa { font-size: 17px; line-height: 1.72; }
.prosa h2 { font-size: clamp(24px, 3vw, 30px); margin: 2.2em 0 .6em; font-weight: 700; letter-spacing: -0.02em; }
.prosa h3 { font-size: 22px; margin: 1.8em 0 .5em; font-weight: 650; }
.prosa h4 { font-size: 18.5px; margin: 1.6em 0 .4em; font-weight: 650; }
.prosa h5, .prosa h6 { font-size: 17px; margin: 1.6em 0 .4em; font-weight: 650; color: var(--sonne-text); }
.prosa > :first-child, .thb-inhalt > div:first-child > :first-child { margin-top: 0; }
.prosa p { margin: 0 0 1em; }
.prosa a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prosa a:hover { text-decoration-thickness: 2px; }
.prosa ul, .prosa ol { padding-left: 1.3em; margin: 0 0 1em; }
.prosa li { margin: .3em 0; }
.prosa li::marker { color: var(--lagune); }
.prosa u { text-decoration-color: var(--sonne); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prosa strong { font-weight: 650; }
.prosa sub, .prosa sup { font-size: .72em; }
.prosa blockquote {
    margin: 1.4em 0; padding: 16px 22px; border-radius: 0 16px 16px 0;
    border-left: 4px solid var(--sonne); background: var(--flaeche-2);
}
.prosa blockquote > :last-child { margin-bottom: 0; }
.prosa hr { border: 0; border-top: 1px solid var(--linie); margin: 2em 0; }
.anker { display: block; }

/* Handbuch: größere Grundschrift, klare Überschriften-Stufen */
.thb-inhalt { max-width: 48em; font-size: 17.5px; line-height: 1.75; }
.thb-inhalt h3 {
    font-size: clamp(26px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.02em;
    margin: 2.4em 0 .7em; padding-bottom: .35em; border-bottom: 2px solid var(--linie);
}
.thb-inhalt h4 { font-size: clamp(21px, 2vw, 24.5px); font-weight: 650; margin: 1.9em 0 .55em; }
.thb-inhalt h5 { font-size: 20px; font-weight: 650; margin: 1.7em 0 .45em; color: var(--sonne-text); }
.thb-inhalt h6 { font-size: 18.5px; font-weight: 650; margin: 1.5em 0 .4em; color: var(--text-2); }

/* Tabellen: mit Rahmen und Gitterlinien */
.tabelle { overflow-x: auto; margin: 1.3em 0 1.6em; padding: 2px; -webkit-overflow-scrolling: touch; }
table.daten {
    border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 1.45;
    border: 1.5px solid color-mix(in srgb, var(--lagune) 45%, var(--linie)); border-radius: 12px; overflow: hidden;
    background: var(--flaeche); font-variant-numeric: tabular-nums;
}
table.daten td, table.daten th {
    padding: 9px 16px; vertical-align: top;
    border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie);
}
table.daten tr > :last-child { border-right: 0; }
table.daten tbody tr:last-child > * { border-bottom: 0; }
table.daten td p { margin: 0; }
table.daten thead .tabkopf {
    background: var(--ozean); color: #fff; font-weight: 600;
    border-right-color: rgba(255, 255, 255, .16); border-bottom: 0;
}
table.daten tbody .tabkopf { background: var(--flaeche-2); font-weight: 650; color: var(--text); }
table.daten .summe { background: var(--flaeche-2); font-weight: 650; }
table.daten .rechts { text-align: right; }
table.daten tbody tr:nth-child(even) td:not(.tabkopf):not(.summe) { background: color-mix(in srgb, var(--flaeche-2) 40%, var(--flaeche)); }
table.daten tbody tr:hover td:not(.tabkopf):not(.summe) { background: color-mix(in srgb, var(--lagune) 9%, var(--flaeche)); }
table.layout { border-collapse: collapse; }
table.layout td { padding: 4px 18px 4px 0; vertical-align: top; }
table.layout td p { margin: 0 0 .4em; }

.prosa img.formel {
    display: block; margin: 12px 0 14px; padding: 8px 14px;
    background: #fff; border: 1px solid var(--linie); border-radius: 12px;
}
.prosa img.abbildung {
    display: block; margin: 1.4em auto; border-radius: 14px; background: #fff; box-shadow: var(--schatten);
}
.prosa img.abbildung.breit { width: 100%; max-width: min(100%, var(--max)); }
.prosa img.abbildung.begrenzt { max-width: min(100%, var(--max)); }

/* Zwischenüberschriften aus dem alten Handbuch („Antwort:“, „Rechnung:“ …) */
.thb-inhalt .textHeadLeft { margin: 1.4em 0 .3em; font-weight: 700; color: var(--text); }
.thb-inhalt .ergaenzung { margin-top: 2em; }
.thb-inhalt .ergaenzung h5 { font-size: 21px; }
.bild-fehlt {
    display: inline-block; margin: 1em 0; padding: 14px 18px; border: 2px dashed var(--linie);
    border-radius: 12px; color: var(--text-2); font-size: 14px;
}

.blaettern { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.blaettern a {
    display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; border-radius: 18px;
    background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.blaettern a:hover { border-color: var(--lagune); box-shadow: var(--schatten); transform: translateY(-2px); }
.blaettern span { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.blaettern span .icon { width: 15px; height: 15px; }
.blaettern strong { font-size: 17px; }
.bl-nachher { text-align: right; align-items: flex-end; }
@media (max-width: 560px) {
    .blaettern { grid-template-columns: 1fr; }
    .thb-inhalt { font-size: 16.5px; }
    table.daten { font-size: 15px; }
    table.daten td, table.daten th { padding: 8px 12px; }
}

/* ---------- Kontakt / Impressum ---------- */
.kontakt-karte { padding: 8px 24px; border-radius: 20px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten); margin-bottom: 1.6em; }
.kk-zeile { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0 !important; line-height: 1.5; }
.kk-zeile .icon { color: var(--lagune); width: 22px; height: 22px; margin-top: 1px; }
.platzhalter { color: var(--text-2); font-style: italic; }
/* Anbieterangaben im Impressum: dezent am Ende */
.anbieter { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--linie); font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.anbieter p { margin: 0 0 .6em; }
.anbieter-titel { font-weight: 650; }

/* ---------- 404 ---------- */
.leer-seite { text-align: center; }
.gross-404 {
    margin: 0 0 18px; font-family: var(--schrift-titel); font-size: clamp(96px, 18vw, 170px); font-weight: 800; line-height: 1; letter-spacing: -0.05em;
    background: linear-gradient(180deg, var(--sonne), var(--lagune) 70%); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ==========================================================================
   Fuß
   ========================================================================== */
/* Eigenes, ruhiges Band ganz unten – klar vom Inhalt getrennt */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); color: var(--text-2); padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); font-size: 13.5px; }
.fuss-innen { max-width: var(--seitenbreite); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.fuss a { color: var(--text-2); text-decoration: none; }
.fuss a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.nach-oben { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--linie); }
.nach-oben:hover { border-color: var(--lagune); }
.nach-oben .icon { width: 16px; height: 16px; }
@media (max-width: 560px) { .fuss-innen { justify-content: center; text-align: center; } .fuss-links { margin-left: 0; justify-content: center; } .nach-oben { display: none; } }

/* Weniger Bewegung, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Druck: nur Inhalt */
@media print {
    .kopf, .fuss, .kapitel-rand, .blaettern, .lesefortschritt, .held-weiter { display: none !important; }
    body { padding-top: 0; background: #fff; color: #000; }
    .seitenkopf { background: none; color: #000; padding: 0 0 12px; }
    .seitenkopf::after { display: none; }
    .seitenkopf-lead { color: #333; }
    .kapitel-layout { display: block; }
}

/* ---------- Statistik (nur für den Betreiber) ---------- */
.st-anmelden, .st-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; }
.st-anmelden { max-width: 420px; margin: 0 auto 22px; }
.st-anmelden input, .st-wahl select {
    font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linie);
    background: var(--flaeche); color: var(--text); min-width: 0;
}
.st-anmelden input { flex: 1; }
.st-anmelden label, .st-wahl label { font-weight: 650; }
.st-fehler { flex-basis: 100%; margin: 0; color: var(--hinweis); font-weight: 600; }
.st-stand { font-size: 14px; color: var(--text-2); }
.st-tabelle { width: 100%; }
table.daten.st-tabelle tbody tr.stat-bereich td { font-weight: 650; background: var(--flaeche-2); }
.st-tabelle .stat-sonstige td:first-child { color: var(--text-2); font-style: italic; }
.st-null { color: var(--text-2); opacity: .6; }

/* Feiertage / Schulferien: Kopfband immer gleich hoch, damit beim Wechseln nichts springt */
.seitenkopf-termine .seitenkopf-lead { max-width: 56ch; min-height: calc(2 * 1.6em); }
@media (max-width: 560px) { .seitenkopf-termine .seitenkopf-lead { font-size: 16px; min-height: calc(3 * 1.6em); } }
