/* ==========================================================================
   Hausarztpraxis Funda Leis – Frontend
   Aufbau: 1 Grundlagen · 2 Bausteine · 3 Kopf/Fuß · 4 Seiten · 5 Bewegung · 6 Anzeige-Optionen
   Schriften und Symbole liegen lokal, es werden keine Dateien von Dritten geladen.
   ========================================================================== */

@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
    --brand: #c41e3a;
    --brand-dark: #8b1428;
    --brand-soft: color-mix(in srgb, var(--brand) 8%, #fff);
    --brand-line: color-mix(in srgb, var(--brand) 28%, #fff);

    --ink: #14212b;
    --ink-2: #3f4d59;
    --ink-3: #5d6a75;
    --paper: #f6f3ee;
    --paper-2: #ece7df;
    --surface: #ffffff;
    --line: #ddd6cb;
    --line-soft: #ebe6de;
    --night: #101c25;

    --ok: #17734a;
    --ok-soft: #e6f3ec;
    --warn: #8a5200;
    --warn-soft: #fdf1dc;
    --info: #1c5a80;
    --info-soft: #e6f0f6;
    --danger: #a81a2f;
    --danger-soft: #fbe9ec;

    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-1: 0 1px 2px rgba(20, 33, 43, .05), 0 4px 14px rgba(20, 33, 43, .05);
    --shadow-2: 0 2px 6px rgba(20, 33, 43, .06), 0 18px 44px rgba(20, 33, 43, .10);

    --wrap: 1200px;
    --gutter: clamp(1.1rem, 4vw, 2.5rem);
    --ease: cubic-bezier(.22, .61, .36, 1);
    --header-h: 76px;

    font-size: 106.25%;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    overflow-x: clip;
    font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html:has(dialog[open]) { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3.1rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }

a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand); }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 6px;
    box-shadow: 0 0 0 6px #fff;
}
main:focus { outline: none; box-shadow: none; }

::selection { background: var(--brand); color: #fff; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; left: 1rem; top: -5rem; z-index: 1000;
    padding: .8rem 1.2rem; border-radius: 10px;
    background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
    transition: top .15s;
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-3); }
.ic { width: 1.25em; height: 1.25em; flex: none; }

.lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink-2); }

.eyebrow {
    margin: 0 0 .7rem; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand-dark); display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: #fff; }

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

/* Schaltflächen */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line);
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 48px; padding: .7rem 1.25rem;
    border: 1.5px solid var(--btn-bd); border-radius: 999px;
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--brand { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: var(--brand); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 26%, transparent); }
.btn--brand:hover { --btn-bg: var(--brand-dark); --btn-bd: var(--brand-dark); }
.btn--ink { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn--line { --btn-bg: transparent; --btn-bd: var(--ink); }
.btn--line:hover { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--glass { --btn-bg: rgba(255, 255, 255, .14); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); }
.btn--glass:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.08rem; }
.btn--sm { min-height: 44px; padding: .5rem 1rem; font-size: .95rem; }
.btn--block { width: 100%; }
.btn .ic { width: 1.15em; height: 1.15em; }

.icon-btn {
    display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
    border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink);
    transition: background-color .2s, border-color .2s, color .2s;
}
.icon-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.icon-btn--light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
.icon-btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }

.link-arrow {
    display: inline-flex; align-items: center; gap: .45rem; padding: 0; border: 0; background: none;
    font-weight: 650; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.link-arrow .ic { width: 1.1em; height: 1.1em; color: var(--brand); transition: transform .25s var(--ease); }
a:hover > .link-arrow .ic, .link-arrow:hover .ic { transform: translateX(4px); }
a.link-arrow, button.link-arrow { min-height: 44px; }
a.link-arrow:hover, button.link-arrow:hover { color: var(--brand-dark); }
.link-arrow--back:hover .ic { transform: translateX(-4px); }

/* Kennzeichen */
.tag {
    display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .22rem .65rem;
    border-radius: 999px; background: var(--paper-2); color: var(--ink-2);
    font-size: .82rem; font-weight: 650; line-height: 1.4; white-space: nowrap;
}
.tag .ic { width: 1em; height: 1em; }
.tag--brand { background: var(--brand-soft); color: var(--brand-dark); }
.tag--closed { background: var(--danger-soft); color: var(--danger); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; font-size: .92rem; color: var(--ink-3); }

/* Status geöffnet / geschlossen */
.status { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-weight: 650; font-size: .95rem; color: var(--ink); text-decoration: none; }
.status-dot { position: relative; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ink-3); flex: none; }
.status--open .status-dot, .is-open .status-dot { background: var(--ok); }
.status--closed .status-dot, .is-closed .status-dot, .tag--closed .status-dot { background: var(--danger); }
.status--pill { padding: .4rem .9rem; border-radius: 999px; background: var(--paper); font-size: .9rem; }
.status--open.status--pill { background: var(--ok-soft); color: var(--ok); }
.status--closed.status--pill { background: var(--danger-soft); color: var(--danger); }

/* Karten und Flächen */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card--pad { padding: clamp(1.25rem, 3vw, 2rem); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: 1.4rem; }
.card-head h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.card-head p { margin: .2rem 0 0; }
.card-title { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; margin-bottom: 1rem; letter-spacing: -.01em; }
.card-note { display: flex; align-items: center; gap: .5rem; margin: 1.4rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: .95rem; }
.card--brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.card--brand p { margin: 0; opacity: .92; }
.card--emergency { background: var(--paper); box-shadow: none; }
.card--emergency .card-title .ic { color: var(--danger); }

.callout {
    display: flex; gap: .9rem; margin: 1.2rem 0 0; padding: 1rem 1.2rem;
    border-left: 4px solid var(--warn); border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--warn-soft); color: var(--ink);
}
.callout--info { border-color: var(--info); background: var(--info-soft); margin-top: 2rem; padding: 1.3rem 1.5rem; }
.callout--info > .ic { color: var(--info); width: 1.6rem; height: 1.6rem; margin-top: .1rem; }
.callout h2 { font-size: 1.1rem; margin-bottom: .35rem; letter-spacing: -.01em; }
.callout p:last-child { margin: 0; }

.empty { max-width: 34rem; margin: 2rem auto; padding: 3rem 1.5rem; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); color: var(--ink-2); }
.empty .ic { width: 2.4rem; height: 2.4rem; color: var(--ink-3); margin-bottom: 1rem; }
.empty h2 { font-size: 1.4rem; margin-bottom: .5rem; color: var(--ink); }
.empty p { margin: 0; }

.plain-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line-soft); }
.plain-list li:first-child { border-top: 0; padding-top: 0; }
.plain-list--stack li { flex-direction: column; gap: .1rem; }

.legend, .legend-list { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 1rem 0 0; font-size: .85rem; color: var(--ink-2); align-items: center; }
.legend-list li, .legend { display: flex; align-items: center; gap: .4rem; }
.legend-dot { width: .8rem; height: .8rem; border-radius: 4px; background: var(--ok-soft); border: 1.5px solid var(--ok); flex: none; }
.legend-dot--closed { background: var(--paper-2); border-color: var(--line); }
.legend-dot--holiday { background: var(--info-soft); border-color: var(--info); }
.legend-dot--absence { background: var(--danger-soft); border-color: var(--danger); }

/* Umschalter (Jahr, Schriftgröße) */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--paper-2); }
.seg > * {
    min-height: 40px; padding: .35rem .95rem; border: 0; border-radius: 999px; background: none;
    display: inline-flex; align-items: center; font-weight: 650; font-size: .92rem; color: var(--ink-2); text-decoration: none;
}
.seg > [aria-pressed="true"], .seg > [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Formular-Kleinteile */
.check, .switch { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; font-size: .95rem; }
.check input, .switch input { width: 1.25rem; height: 1.25rem; accent-color: var(--brand); flex: none; }

/* Markdown-Inhalte */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 1em; }
.md ul, .md ol { margin: 0 0 1em; padding-left: 1.3em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li { margin: .25em 0; }
.md li::marker { color: var(--brand); }
.md h4, .md h5, .md h6 { margin: 1.4em 0 .5em; font-size: 1.15rem; }
.md h5 { font-size: 1.05rem; } .md h6 { font-size: 1rem; }
.md blockquote, .md .md-quote { margin: 0 0 1em; padding: .8rem 1.1rem; border-left: 4px solid var(--brand-line); background: var(--paper); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.md code { padding: .1em .35em; border-radius: 5px; background: var(--paper-2); font-size: .92em; }
.md mark { background: #ffe9a8; color: inherit; padding: 0 .2em; border-radius: 3px; }
.md a { font-weight: 600; overflow-wrap: anywhere; }
.md--inline { display: inline; }
.md--inline br { display: none; }

/* Hinweisfenster (natives <dialog>: Fokus bleibt im Fenster, Esc schließt) */
.dialog {
    width: min(36rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); max-height: min(46rem, calc(100dvh - 2rem));
    padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-2); overflow: hidden;
}
.dialog[open] { display: flex; flex-direction: column; }
dialog:not([open]) { display: none; }
.dialog-head, .dialog-foot, .dialog-side { flex: none; }
.dialog-body { flex: 0 1 auto; min-height: 0; }
.dialog--wide { width: min(46rem, calc(100vw - 2rem)); }
.dialog::backdrop, .lightbox::backdrop, .mobile-menu::backdrop { background: rgba(16, 28, 37, .62); }
.dialog-head { display: flex; align-items: flex-start; gap: 1rem; padding: 1.4rem 1.5rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.dialog-head > div { flex: 1; min-width: 0; }
.dialog-head h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); overflow-wrap: break-word; hyphens: auto; }
.dialog-kicker { margin: 0 0 .25rem; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dialog--info { --d-fg: var(--info); }
.dialog--urgent { --d-fg: var(--danger); }
.dialog--warning { --d-fg: #b26a00; }
.dialog--success { --d-fg: var(--ok); }

/* Mitteilungen der Praxis: zweigeteiltes Fenster – dunkle Seite mit Absender und Kernangabe, helle Seite mit dem Text */
.dialog--notice { width: min(50rem, calc(100vw - 2rem)); border-radius: 16px; box-shadow: 0 40px 100px rgba(16, 28, 37, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.dialog--notice[open] { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); }
.dialog-side { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 1.4rem; padding: 1.4rem 1.4rem 1.3rem 1.5rem; background: var(--night); color: #fff; }
/* Dringlichkeit: Farbfläche am Kopf der dunklen Seite statt schmaler Randlinie */
.dialog--notice { --d-on: #f0a92b; }
.dialog--info { --d-on: #7cc0e8; }
.dialog--success { --d-on: #5ad19a; }
.dialog--urgent { --d-on: #ff8a9b; }
.dialog-side::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--d-on); }
.dialog-from { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: .85rem; font-weight: 650; line-height: 1.25; letter-spacing: -.005em; }
.dialog-from .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.dialog-from .brand-mark .ic { width: 18px; height: 18px; }
.dialog-feature { display: flex; flex-direction: column; margin: auto 0; }
.dialog-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .5rem; border-radius: 50%; background: var(--d-on); }
.dialog-feature-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9eabb6; }
.dialog-feature-big { margin-top: .5rem; font-size: clamp(2.1rem, 1.5rem + 2vw, 2.9rem); font-weight: 650; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dialog-feature-sub { margin-top: .35rem; font-size: .95rem; color: #c9d2d9; }
.dialog-feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--d-on); color: var(--night); margin-bottom: .9rem; }
.dialog-feature-icon .ic { width: 1.5rem; height: 1.5rem; stroke-width: 2; }
.dialog-feature-word { font-size: 1.6rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; }
.dialog-side-foot { position: relative; z-index: 1; display: flex; flex-direction: column; margin: 0; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .16); }
.dialog-side-foot span { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9eabb6; }
.dialog-side-foot a { font-size: 1.12rem; font-weight: 650; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.dialog-side-foot a:hover { text-decoration: underline; }
.dialog-side-line { display: none; position: absolute; left: 0; right: 0; bottom: 5.6rem; width: 100%; height: 60px; z-index: -1; opacity: .16; }
.dialog-side-line path { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.dialog-side :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--night); }

/* Wichtig für Safari/iOS: kein "flex: 1" (Basis 0) in Spalten ohne feste Höhe – sonst fällt der Bereich auf Höhe 0 zusammen */
.dialog-main { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; max-height: calc(100vh - 2rem); max-height: min(46rem, calc(100dvh - 2rem)); }
.dialog-close { position: absolute; right: .8rem; top: .8rem; z-index: 2; width: 40px; height: 40px; border-color: transparent; }
.dialog-close .ic { width: 1.15rem; height: 1.15rem; }
.dialog--notice .dialog-head { display: block; padding: 1.5rem 3.8rem 0 1.6rem; border: 0; }
.dialog--notice .dialog-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: .74rem; color: var(--ink-2); letter-spacing: .12em; }
.dialog-kicker-label + [data-announce-counter]:not(:empty)::before { content: "· "; }
.dialog-mark { width: .55rem; height: .55rem; border-radius: 50%; background: var(--d-fg, var(--info)); flex: none; }
.dialog--notice .dialog-head h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.65rem); line-height: 1.15; letter-spacing: -.02em; }
.dialog--notice .dialog-body { flex: 1 1 auto; min-height: 0; padding: .9rem 1.6rem 1.3rem; font-size: 1rem; line-height: 1.55; }
.dialog--notice .dialog-lead { font-size: 1rem; }
.dialog--notice .callout { border-left-width: 3px; border-radius: 0 12px 12px 0; background: var(--paper); border-color: var(--d-fg); }
.dialog--notice .dialog-foot { padding: .8rem 1.6rem; background: var(--paper); border-top: 1px solid var(--line-soft); }
.dialog--notice .dialog-foot .btn { min-height: 42px; padding: .5rem 1.05rem; font-size: .95rem; box-shadow: none; }
.dialog--notice .dialog-foot .check { font-size: .9rem; }
.dialog--notice .dialog-em { margin-top: 1rem !important; font-size: .9rem; }
.dialog--notice .subs { margin-top: 1.1rem; }
.dialog--notice .subs-title { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem; }
.dialog--notice .sub { padding: .7rem .9rem; border-radius: 10px; background: none; border-color: var(--line); }
.dialog--notice .sub-name { font-size: 1rem; }
.dialog--notice .sub-doc, .dialog--notice .sub-addr { font-size: .9rem; }
.dialog--notice .sub .btn { min-height: 40px; padding: .4rem .9rem; font-size: .92rem; }
.dialog--notice .sub .btn { background: var(--surface); border-color: var(--line); font-variant-numeric: tabular-nums; }
.dialog--notice .sub .btn:hover { background: var(--ink); border-color: var(--ink); }
.dialog--notice .dialog-valid { margin-top: 1.4rem !important; }

html.motion .dialog--notice[open] .dialog-feature, html.motion .dialog--notice[open] .dialog-head, html.motion .dialog--notice[open] .dialog-body { animation: fenster-inhalt .6s var(--ease) both; }
html.motion .dialog--notice[open] .dialog-head { animation-delay: .08s; }
html.motion .dialog--notice[open] .dialog-body { animation-delay: .16s; }
@keyframes fenster-inhalt { from { opacity: 0; transform: translateY(10px); } }
.dialog-em { margin: 1.4rem 0 0 !important; font-size: .95rem; color: var(--ink-2); }
.dialog-body { padding: 1.4rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; font-size: 1.05rem; }
.dialog-lead { font-size: 1.12rem; }
.dialog-figure { width: 100%; max-height: 20rem; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.3rem; }
.dialog-valid { display: flex; align-items: center; gap: .45rem; margin-top: 1.2rem !important; font-size: .92rem; color: var(--ink-3); }
.dialog-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line-soft); background: var(--paper); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-left: auto; }

/* Ersatz für Browser ohne <dialog>-Unterstützung (ältere iPhones/iPads) */
.dialog-fallback { position: fixed; z-index: 1000; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0 !important; }
.dialog-fallback-shade { position: fixed; inset: 0; z-index: 999; background: rgba(16, 28, 37, .62); }
.mobile-menu.dialog-fallback, .lightbox.dialog-fallback { left: 0; top: 0; transform: none; }

/* Vertretungspraxen */
.subs { margin-top: 1.5rem; }
.subs-title { font-size: 1.05rem; margin-bottom: .8rem; letter-spacing: -.01em; }
.sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.5rem; padding: 1rem 1.15rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.sub + .sub { margin-top: .6rem; }
.sub-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 14rem; }
.sub-name { font-size: 1.05rem; }
.sub-doc, .sub-addr { color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.sub-body .tag { align-self: flex-start; margin-top: .4rem; }

/* Wochenübersicht der Sprechzeiten */
.week thead th { padding: 0 0 .7rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.week tbody tr { border-top: 1px solid var(--line-soft); }
.week tbody th, .week tbody td { padding: .85rem .8rem .85rem 0; vertical-align: middle; }
.week tbody th { white-space: nowrap; font-weight: 600; width: 1%; padding-right: 1.4rem; }
.week-day { margin-right: .5rem; }
.week-text { white-space: nowrap; width: 1%; padding-right: 1.6rem !important; font-variant-numeric: tabular-nums; }
.week-text > span { display: block; }
.week-note { display: block; color: var(--ink-3); white-space: normal; }
.week .is-today th, .week .is-today .week-text { color: var(--brand-dark); font-weight: 700; }
.week .is-closed th, .week .is-closed td { color: var(--ink-3); }
.week-track { padding-right: 0 !important; min-width: 9rem; }
.week-rail { position: relative; display: block; height: 14px; border-radius: 999px; background: var(--paper-2); }
.week-bar { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--ink); transform-origin: left center; }
.week .is-today .week-bar { background: var(--brand); }
.week-now { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--ok); box-shadow: 0 0 0 3px var(--surface); }
.week-axis { position: relative; display: block; height: 1.2em; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.week-axis span { position: absolute; left: var(--p); transform: translateX(-50%); }
.week-axis span:first-child { transform: none; }
.week-axis span:last-child { transform: translateX(-100%); }
.week--compact .week-track, .week--compact .week-axis-head { display: none; }

/* ---------- 3 Kopf und Fuß ---------- */

/* Hinweisleiste über dem Kopf: ein Hinweis pro Zeile, bei mehreren wird geblättert */
.notices { background: var(--night); color: #fff; }
.notices-inner { display: flex; align-items: center; gap: .6rem; padding-block: .55rem; }
.notices-list { flex: 1; min-width: 0; display: grid; gap: .45rem; }
.notice { --n: #9fd0ee; display: flex; align-items: center; gap: .9rem; min-width: 0; }
.notice--urgent { --n: #ffb3bf; }
.notice--warning { --n: #ffd58a; }
.notice--success { --n: #9be3bf; }
.notice-chip {
    display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .28rem .7rem .28rem .5rem; border-radius: 999px;
    background: var(--n); color: var(--night); font-size: .8rem; font-weight: 750; letter-spacing: .02em; white-space: nowrap;
}
.notice-chip .ic { width: 1.1em; height: 1.1em; }
.notice-text { flex: 1; min-width: 0; margin: 0; font-size: .98rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; }
.notice-text a { color: #fff; }
.notice-text strong { font-weight: 700; }
.notice-link {
    display: inline-flex; align-items: center; gap: .35rem; flex: none; min-height: 36px; padding: .2rem .85rem; border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .45); background: none; color: #fff; font-weight: 650; font-size: .9rem; text-decoration: none; white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s;
}
.notice-link:hover { background: #fff; border-color: #fff; color: var(--night); }
.notice-link .ic { width: 1em; height: 1em; }
.notice-close, .notices-step { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: none; color: #fff; }
.notice-close:hover, .notices-step:hover { background: rgba(255, 255, 255, .16); }
.notice-close .ic, .notices-step .ic { width: 1.15rem; height: 1.15rem; }
.notices-pager { display: flex; align-items: center; gap: .1rem; flex: none; padding-left: .6rem; border-left: 1px solid rgba(255, 255, 255, .22); }
.notices-pager[hidden] { display: none; }
.notices-count { min-width: 2.6rem; text-align: center; font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; color: #c9d2d9; }
.notices :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--night); }
.notices.is-paged .notice:not(.is-current) { display: none; }
.notice.is-hidden, .notices.is-empty { display: none; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--brand); transform: scaleX(var(--progress, 0)); transform-origin: left; }

.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.site-header.is-stuck { border-color: var(--line-soft); box-shadow: 0 6px 24px rgba(20, 33, 43, .06); }
.site-header > .wrap { max-width: calc(1400px + 2 * var(--gutter)); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .8rem; margin: 0; color: var(--ink); text-decoration: none; min-width: 0; flex-shrink: 0; max-width: 100%; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--brand); color: #fff; flex: none; }
.brand-mark .ic { width: 26px; height: 26px; stroke-width: 2; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .8rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: .15rem; }
.main-nav a {
    position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .7rem;
    border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .97rem; text-decoration: none; white-space: nowrap;
    transition: color .2s, background-color .2s;
}
.main-nav a::after {
    content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .3rem; height: 2px; border-radius: 2px;
    background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--ink); }

.header-tools { display: flex; align-items: center; gap: .6rem; }
.header-tools .status { padding: .45rem .8rem; border-radius: 999px; background: var(--paper); font-size: .88rem; min-height: 40px; }
.header-tools .status:hover { background: var(--paper-2); color: var(--ink); }
.header-call { min-height: 46px; padding-inline: 1.1rem; }
.nav-toggle { display: none; }

.display-menu { position: relative; }
.display-panel {
    position: absolute; right: 0; top: calc(100% + .7rem); z-index: 20; width: 19rem; max-width: calc(100vw - 2rem);
    padding: 1.2rem; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-2);
}
.display-title { margin: 0 0 .9rem; font-weight: 700; font-size: 1.05rem; }
.display-group { margin: 0 0 .6rem; padding: 0; border: 0; }
.display-group legend { padding: 0; margin-bottom: .4rem; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.display-group .seg { display: flex; }
.display-group .seg > * { flex: 1; justify-content: center; padding-inline: .4rem; }

/* Mobiles Menü */
.mobile-menu { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--ink); }
.mobile-menu[open] { display: flex; flex-direction: column; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem var(--gutter); border-bottom: 1px solid var(--line-soft); }
.mobile-menu nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .5rem var(--gutter); }
.mobile-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 60px; border-bottom: 1px solid var(--line-soft); font-size: 1.3rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.mobile-nav a .ic { color: var(--ink-3); }
.mobile-nav a[aria-current="page"] { color: var(--brand-dark); }
.mobile-nav a[aria-current="page"] .ic { color: var(--brand); }
.mobile-menu-foot { padding: 1rem var(--gutter) 1.4rem; display: grid; gap: .9rem; background: var(--paper); }

/* Fußbereich */
.site-footer { background: var(--night); color: #dfe5ea; padding: clamp(3rem, 7vw, 5.5rem) 0 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--night); }
.footer-call { padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid rgba(255, 255, 255, .14); }
.footer-phone { display: inline-block; font-size: clamp(2.4rem, 1rem + 7vw, 5.5rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.05; }
.footer-phone:hover { text-decoration: none !important; color: #fff; opacity: .86; }
.footer-call-note { margin: 1rem 0 0; color: #b6c1ca; max-width: 34rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.3fr .9fr 1.1fr; gap: 2.5rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-title { margin-bottom: 1rem; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9eabb6; }
.footer-address { margin-bottom: 1rem; line-height: 1.7; }
.footer-list li { margin-bottom: .45rem; }
.footer-list span { display: block; font-size: .85rem; color: #9eabb6; }
.footer-list--em a { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; }
.footer-hours th, .footer-hours td { padding: .28rem 0; font-weight: 400; vertical-align: top; font-variant-numeric: tabular-nums; }
.footer-hours th { padding-right: 1rem; color: #b6c1ca; white-space: nowrap; }
.footer-hours .is-today th, .footer-hours .is-today td { color: #fff; font-weight: 700; }
.footer-nav li { margin-bottom: .1rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .92rem; color: #b6c1ca; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.footer-bottom a { display: inline-flex; min-height: 32px; align-items: center; }

/* Schnellzugriff (nur Handy) */
.quickbar { display: none; }

/* ---------- 4 Seiten ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--paper); }
.section--first { padding-top: clamp(2rem, 4vw, 3rem); }
.section--flush { padding-bottom: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head h2 { max-width: 22ch; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split-aside .lead { margin: 1.2rem 0 1.8rem; }

/* Startseite – Einstieg */
.hero { padding: clamp(.5rem, 1.2vw, 1rem) clamp(.5rem, 1.2vw, 1rem) 0; }
.hero-stage {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
    min-height: clamp(32rem, 82vh, 50rem); border-radius: var(--radius-xl); background: var(--night); color: #fff;
}
.hero-media, .hero-shade { position: absolute; inset: 0; z-index: -1; }
.hero-media { transform: translate3d(0, calc(var(--scroll, 0) * 60px), 0) scale(1.08); will-change: transform; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(var(--hero-blur, 0)); transition: opacity 1.8s ease; }
.hero-img.is-active { opacity: 1; }
.hero-shade {
    background:
        linear-gradient(to top, rgba(16, 28, 37, .78) 0%, rgba(16, 28, 37, .25) 55%, rgba(16, 28, 37, .1) 100%),
        linear-gradient(to right, rgba(16, 28, 37, .55), rgba(16, 28, 37, 0) 70%),
        rgba(16, 28, 37, calc(var(--hero-overlay, .7) * .75));
}
.hero-line { position: absolute; left: 0; right: 0; bottom: clamp(4.6rem, 8vw, 6.6rem); width: 100%; height: 64px; z-index: -1; pointer-events: none; color: #fff; opacity: .5; }
.hero-line path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-content { padding-block: clamp(3rem, 8vw, 6rem) clamp(9.5rem, 16vw, 12.5rem); }
.hero-title { font-size: clamp(2.7rem, 1rem + 7.2vw, 6.9rem); font-weight: 650; letter-spacing: -.04em; line-height: 1; max-width: 13ch; text-shadow: 0 2px 30px rgba(16, 28, 37, .35); }
.hero-sub { margin: 1.3rem 0 0; font-size: clamp(1.15rem, .9rem + 1vw, 1.5rem); color: #fff; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero-stage :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px rgba(16, 28, 37, .8); }
.hero-pause { position: absolute; right: 1.2rem; top: 1.2rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(16, 28, 37, .4); color: #fff; }
.hero-pause:hover { background: #fff; color: var(--ink); }

.facts { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(-6rem, -8vw, -4.5rem); }
.fact { display: flex; flex-direction: column; padding: 1.5rem 1.6rem 1.2rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2); }
.fact-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fact-main { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .15rem; font-size: clamp(1.3rem, 1rem + 1vw, 1.65rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.fact-main a { color: inherit; text-decoration: none; }
.fact-note { margin: 0 0 1rem; color: var(--ink-2); }
.fact-link { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-weight: 650; color: var(--ink); text-decoration: none; }
.fact-link .ic { color: var(--brand); transition: transform .25s var(--ease); }
.fact-link:hover .ic { transform: translateX(4px); }
.fact.is-open .fact-main { color: var(--ok); }
.fact.is-closed .fact-main { color: var(--danger); }

/* Aktuelles auf der Startseite */
.lead-news { display: grid; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); color: var(--ink); text-decoration: none; transition: box-shadow .3s, transform .3s var(--ease); }
.lead-news.has-image { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.lead-news:hover { color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.lead-news-media { overflow: hidden; min-height: 16rem; background: var(--paper-2); }
.lead-news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.lead-news:hover .lead-news-media img { transform: scale(1.03); }
.lead-news-body { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; padding: clamp(1.5rem, 4vw, 3rem); }
.lead-news-title { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.lead-news-text { color: var(--ink-2); font-size: 1.08rem; max-width: 60ch; }

.closures-mini { margin-bottom: 1.8rem; padding: 1.2rem 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.closures-mini h3 { font-size: 1rem; margin-bottom: .7rem; }
.closures-mini li { display: flex; gap: .6rem; padding: .35rem 0; }
.closures-mini .ic { color: var(--brand); margin-top: .15rem; }

/* Leistungen */
.service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.2rem; }
.service-cards > li { display: flex; }
.service-card { display: flex; flex-direction: column; gap: 1rem; width: 100%; padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); }
.service-card:hover { color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-3px); }
.service-card-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); font-size: 1.35rem; flex: none; transition: background-color .3s, color .3s; }
.service-card:hover .service-card-icon { background: var(--brand); color: #fff; }
.service-card { position: relative; overflow: hidden; }
.service-card::after { content: counter(karte, decimal-leading-zero); counter-increment: karte; position: absolute; right: 1.3rem; top: .7rem; font-size: 4.2rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--paper-2); transition: color .3s; }
.service-cards { counter-reset: karte; }
.service-card:hover::after { color: var(--brand-line); }
.service-card-title { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.service-card-list { display: grid; gap: .45rem; color: var(--ink-2); }
.service-card-list span { display: flex; gap: .55rem; }
.service-card-list .ic { color: var(--ok); margin-top: .2rem; width: 1.05em; height: 1.05em; }
.service-card-text { color: var(--ink-2); }
.service-card .link-arrow { margin-top: auto; padding-top: .6rem; }

.services-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.toc-title { margin-bottom: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc a { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 48px; padding: .5rem .9rem; border-left: 3px solid var(--line); color: var(--ink-2); font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
.toc a:hover, .toc a.is-active { border-color: var(--brand); color: var(--ink); background: var(--paper); }
.toc-count { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.service-group { padding-bottom: clamp(2rem, 5vw, 3.5rem); margin-bottom: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line-soft); }
.service-group-head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.service-group-head h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); }
.service-group-head p { margin: .5rem 0 0; color: var(--ink-2); max-width: 60ch; }
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; }
.service-list li { display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--paper); }
.service-list .ic { color: var(--ok); margin-top: .15rem; }
.service-list h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.service-list p { margin: .25rem 0 0; font-size: .95rem; color: var(--ink-2); }

/* Über uns */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-media { position: relative; padding-bottom: 3.5rem; }
.about-media > img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: var(--radius-xl); }
.about-portrait { position: absolute; right: clamp(-1.5rem, -2vw, -.5rem); bottom: 0; margin: 0; width: min(46%, 13rem); padding: .5rem .5rem .8rem; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-2); }
.about-portrait img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: top; border-radius: 16px; }
.about-portrait figcaption { padding: .7rem .4rem 0; font-size: .85rem; color: var(--ink-2); line-height: 1.35; }
.about-portrait strong { display: block; color: var(--ink); font-size: 1rem; }
.about-text h2 { margin-bottom: 1.4rem; }
.about-text p { color: var(--ink-2); max-width: 62ch; }
.about-text .lead { color: var(--ink); }

/* Bilder */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(9rem, 17vw, 15rem); gap: .8rem; }
.mosaic > li:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic--1 > li:first-child { grid-column: 1 / -1; }
.mosaic--2 > li, .mosaic--3 > li:not(:first-child) { grid-column: span 2; }
.mosaic--3 > li:not(:first-child) { grid-row: span 1; }
.mosaic--2 > li { grid-row: span 2; }
.mosaic--4 > li:last-child { grid-column: span 2; }
.mosaic-item, .gallery-item { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-lg); background: var(--paper-2); color: #fff; }
.mosaic-item img, .gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.mosaic-item:hover img, .gallery-item:hover img { transform: scale(1.04); }
.mosaic-cap, .gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.1rem .9rem; background: linear-gradient(to top, rgba(16, 28, 37, .82), rgba(16, 28, 37, 0)); color: #fff; font-weight: 600; font-size: .98rem; line-height: 1.3; }
.gallery-cap { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }

.gallery-hint { display: flex; align-items: center; gap: .5rem; color: var(--ink-2); margin-bottom: 1.4rem; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(11rem, 20vw, 17rem); gap: .9rem; }
.gallery-cell { grid-column: span 2; }
.gallery-cell:nth-child(5n + 1), .gallery-cell:nth-child(5n + 2) { grid-column: span 3; grid-row: span 1; }
.gallery-cell:nth-child(5n + 1):nth-child(1) { grid-row: span 1; }

.lightbox { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--night); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem .8rem 1.4rem; }
.lightbox-count { margin: 0; font-variant-numeric: tabular-nums; color: #c9d2d9; }
.lightbox-figure { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; padding: 0 4.5rem 1.2rem; }
.lightbox-figure img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-figure figcaption { padding-top: .9rem; text-align: center; }
.lightbox-figure figcaption strong { display: block; font-size: 1.1rem; }
.lightbox-figure figcaption span { color: #c9d2d9; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox-prev { left: .8rem; } .lightbox-next { right: .8rem; }
.lightbox :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--night); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.team-grid--page { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); row-gap: 3rem; }
.person { display: flex; flex-direction: column; align-items: flex-start; }
.person-photo { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-lg); background: var(--paper-2); margin-bottom: 1rem; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .9s var(--ease); }
.person:hover .person-photo img { transform: scale(1.03); }
.person-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); }
.person-placeholder .ic { width: 4rem; height: 4rem; stroke-width: 1.2; }
.person-name { font-size: 1.25rem; letter-spacing: -.015em; }
.person-role { margin: .2rem 0 .5rem; color: var(--ink-2); }
.person-more { margin-top: .4rem; white-space: normal; text-align: left; }
.person-detail { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; align-items: start; }
.person-detail img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius); }
.person-detail:not(:has(img)) { grid-template-columns: 1fr; }

/* Abschluss-Aufruf */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding: clamp(1.8rem, 5vw, 3.2rem); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); }
.cta h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.2rem); }
.cta p { margin: .6rem 0 0; color: var(--ink-2); font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Kopf der Unterseiten */
.page-head { position: relative; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2.2rem, 5vw, 3.5rem); background: var(--paper); overflow: hidden; }
.page-title { font-size: clamp(2.4rem, 1.2rem + 5vw, 4.6rem); letter-spacing: -.035em; line-height: 1.02; max-width: 16ch; }
.page-lead { margin: 1.2rem 0 0; max-width: 52ch; font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--ink-2); }
.page-head-line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; color: var(--brand); pointer-events: none; }
.page-head-line path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; opacity: .55; }

/* Sprechzeiten-Seite */
.hours-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.5rem; align-items: start; }
.hours-main, .hours-side { display: grid; gap: 1.5rem; min-width: 0; }
.side-phone { display: block; margin: .2rem 0 .4rem; font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.side-phone:hover { color: #fff; text-decoration: underline; }
.card--brand :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--brand-dark); }

.absence { padding: clamp(1.3rem, 3vw, 2rem); border-radius: var(--radius-lg); border: 1.5px solid; }
.absence--now { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.absence--now h2 { margin: .8rem 0 1.2rem; font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); }
.absence--soon { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); padding: 0; }
.absence--soon summary { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.absence--soon summary::-webkit-details-marker { display: none; }
.absence-summary-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--warn); flex: none; }
.absence-summary-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.absence-summary-text strong { font-size: 1.12rem; }
.absence-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.absence-chevron { display: grid; transition: transform .3s var(--ease); }
details[open] > summary .absence-chevron { transform: rotate(180deg); }
.absence-details { padding: 0 1.3rem 1.3rem; }
.absence-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; margin: 0; }
.absence-facts > div { padding: .8rem 1rem; border-radius: var(--radius); background: var(--surface); }
.absence-facts dt { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.absence-facts dd { margin: .15rem 0 0; font-weight: 600; }

.timeline-item { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 1.1rem; padding: 1.2rem 0; border-top: 1px solid var(--line-soft); }
.timeline-item:first-child { border-top: 0; padding-top: 0; }
.timeline-date { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start; padding: .55rem .3rem; border-radius: var(--radius); background: var(--paper); line-height: 1.1; }
.timeline-day { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timeline-month { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.timeline-item--now .timeline-date { background: var(--danger); color: #fff; }
.timeline-item--now .timeline-month { color: #fff; }
.timeline-item--soon .timeline-date { background: var(--warn-soft); color: var(--warn); }
.timeline-item--soon .timeline-month { color: var(--warn); }
.timeline-body h3 { font-size: 1.15rem; }
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: .3rem 0 0; color: var(--ink-2); }
.timeline-note { margin: .6rem 0 0; color: var(--ink-2); font-size: .97rem; }
.timeline-subs { margin-top: .7rem; }
.timeline-subs summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; font-weight: 650; color: var(--brand-dark); list-style: none; }
.timeline-subs summary::-webkit-details-marker { display: none; }
.timeline-subs summary .ic { transition: transform .3s var(--ease); }
.timeline-subs[open] summary .ic { transform: rotate(180deg); }
.timeline-subs .subs { margin-top: .3rem; }
.timeline-subs .subs-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.progress { height: 8px; margin-top: .8rem; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--danger); }

.yearbar { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line-soft); }
.yearbar-title { margin-bottom: .7rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.yearbar ol { display: flex; gap: .35rem; }
.yearbar li { flex: 1; min-width: 0; padding: .5rem 0; border-radius: 9px; border: 1.5px solid transparent; background: var(--paper); text-align: center; font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.yearbar li.has-closure { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.cal th { padding-bottom: .5rem; text-align: center; font-size: .8rem; color: var(--ink-3); }
.cal abbr { text-decoration: none; }
.cal td { padding: 2px; text-align: center; }
.cal td > span[aria-hidden] { display: grid; place-items: center; aspect-ratio: 1; border-radius: 9px; border: 1.5px solid transparent; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-open > span[aria-hidden] { background: var(--ok-soft); color: var(--ok); }
.cal-closed > span[aria-hidden] { background: var(--paper); color: var(--ink-3); }
.cal-holiday > span[aria-hidden] { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.cal-absence > span[aria-hidden] { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.cal .is-today > span[aria-hidden] { outline: 2.5px solid var(--ink); outline-offset: 1px; font-weight: 800; }

.emergency { display: grid; gap: .6rem; }
.emergency a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.emergency a:hover { border-color: var(--danger); }
.emergency strong { font-size: 1.4rem; letter-spacing: -.01em; color: var(--danger); white-space: nowrap; }
.emergency span { font-size: .9rem; color: var(--ink-2); text-align: right; }

/* Aktuelles */
.news-group + .news-group { margin-top: clamp(2.5rem, 6vw, 4rem); }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1.5rem; padding-bottom: .9rem; margin-bottom: 1.4rem; border-bottom: 2px solid var(--ink); }
.group-head h2 { font-size: 1.5rem; }
.standing { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.standing li + li { border-top: 1px solid var(--line-soft); }
.standing-item { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.4rem; color: var(--ink); text-decoration: none; transition: background-color .2s; }
.standing-item:hover { background: var(--paper); color: var(--ink); }
.standing-item > .ic { color: var(--brand); }
.standing-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.standing-title { font-weight: 650; font-size: 1.12rem; }
.standing-text { color: var(--ink-2); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.2rem; }
.news-grid > li { display: flex; }
.news-card { display: flex; flex-direction: column; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); }
.news-card:hover { color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.news-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news-card:hover .news-card-media img { transform: scale(1.03); }
.news-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1.4rem; flex: 1; }
.news-card-title { font-size: 1.25rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.news-card-text { color: var(--ink-2); }
.news-card .link-arrow { margin-top: auto; padding-top: .4rem; }
.news-grid--lead > li:first-child:not(:only-child) { grid-column: 1 / -1; }
.news-grid--lead > li:first-child:not(:only-child) .news-card.has-image { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.news-grid--lead > li:first-child:not(:only-child) .news-card-media { aspect-ratio: auto; min-height: 15rem; }
.news-grid--lead > li:first-child:not(:only-child) .news-card-body { padding: clamp(1.5rem, 4vw, 2.5rem); justify-content: center; }
.news-grid--lead > li:first-child:not(:only-child) .news-card-title { font-size: clamp(1.4rem, 1rem + 1.4vw, 1.9rem); }
.news-grid--lead > li:first-child:not(:only-child) .news-card .link-arrow { margin-top: 0; }

.article { max-width: 44rem; }
.article h2 { margin: .8rem 0 1.5rem; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.article-figure { width: 100%; border-radius: var(--radius-lg); margin-bottom: 1.8rem; }
.article .md { font-size: 1.1rem; }

/* Kontakt */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.contact-list { margin: 0; }
.contact-list > div { padding: 1.1rem 0; border-top: 1px solid var(--line-soft); }
.contact-list > div:first-child { border-top: 0; padding-top: 0; }
.contact-list dt { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.contact-list dt .ic { color: var(--brand); }
.contact-list dd { margin: .35rem 0 0; font-size: 1.15rem; line-height: 1.5; overflow-wrap: anywhere; }
.contact-list a { color: var(--ink); }
.contact-big { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 650; letter-spacing: -.025em; text-decoration: none; color: var(--ink); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.map { position: relative; min-height: 26rem; border-radius: var(--radius-xl); overflow: hidden; background: var(--paper); border: 1px solid var(--line-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 2rem; text-align: center;
    background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 44px 44px; }
.map-consent > .ic { width: 2.6rem; height: 2.6rem; color: var(--brand); }
.map-consent h2 { font-size: 1.5rem; }
.map-consent p { max-width: 30rem; margin: .5rem 0 1.2rem; color: var(--ink-2); font-size: .97rem; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.way { padding: 1.6rem; border-radius: var(--radius-lg); background: var(--paper); }
.way-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--surface); color: var(--brand); margin-bottom: 1.1rem; }
.way-icon .ic { width: 1.6rem; height: 1.6rem; }
.way h3 { margin-bottom: .4rem; }
.way p { margin: 0; color: var(--ink-2); }

/* Fließtext (Impressum, Datenschutz) */
.prose { max-width: 44rem; font-size: 1.05rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 .7em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 .5em; }
.prose ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin: .25em 0; }
.prose a { overflow-wrap: anywhere; }

/* Fehler- und Wartungsseiten */
.error-page { text-align: center; }
.error-page .lead { max-width: 32rem; margin: 1rem auto 2rem; }
.error-page .cta-actions { justify-content: center; }
.error-code { margin: 0; font-size: clamp(5rem, 22vw, 11rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--paper-2); }
.error-page h1, .standalone h1 { font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.8rem); }
.standalone { background: var(--paper); min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 2rem var(--gutter); }
.standalone-main { width: 100%; max-width: 38rem; text-align: center; }
.standalone-main--wide { max-width: 52rem; text-align: left; }
.standalone-main .brand { margin-bottom: 2.5rem; }
.standalone-main .lead { margin: 1rem 0 0; }
.standalone-main .cta-actions { justify-content: center; margin-top: 2rem; }
.standalone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.standalone-note { margin: 1.5rem 0 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Anpassung an kleinere Bildschirme ---------- */

@media (max-width: 1540px) {
    .header-call span { display: none; }
    .header-call { width: 46px; padding: 0; }
}
@media (max-width: 1320px) {
    .site-header .brand-sub { display: none; }
    .header-inner { gap: 1rem; }
    .main-nav a { padding-inline: .55rem; }
    .main-nav a::after { left: .55rem; right: .55rem; }
}
@media (max-width: 1180px) {
    .main-nav { display: none; }
    .nav-toggle { display: inline-grid; }
    .header-tools { margin-left: auto; }
    .brand { flex-shrink: 1; }
    .site-header .brand-sub { display: block; }
}

@media (max-width: 960px) {
    .split, .about, .contact, .hours-layout, .services-layout { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
    .toc { position: static; }
    .toc ul { display: flex; flex-wrap: wrap; gap: .5rem; }
    .toc a { border: 1.5px solid var(--line); border-radius: 999px; min-height: 44px; }
    .toc a:hover, .toc a.is-active { border-color: var(--ink); }
    .about-media { max-width: 30rem; }
    .about-portrait { right: 0; }
    .hours-side { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
    .ways { grid-template-columns: 1fr; }
    .gallery-cell, .gallery-cell:nth-child(n) { grid-column: span 3; }
}

@media (max-width: 760px) {
    :root { --header-h: 66px; }
    body { padding-bottom: 68px; }
    .header-tools .status-label, .header-call, .brand-sub { display: none; }
    .header-tools .status { padding: 0; width: 40px; justify-content: center; background: none; }
    .header-inner { gap: .8rem; }

    .quickbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: repeat(3, 1fr);
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .quickbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 62px; color: var(--ink); font-size: .8rem; font-weight: 650; text-decoration: none; }
    .quickbar a:first-child { color: var(--brand-dark); }
    .quickbar a[aria-current="page"] { background: var(--paper); }
    .quickbar .ic { width: 1.4rem; height: 1.4rem; }

    .notice { flex-wrap: wrap; gap: .35rem .6rem; }
    .notice-chip { order: 1; }
    .notice-close { order: 2; margin-left: auto; }
    .notice-text { order: 3; flex: 1 1 100%; -webkit-line-clamp: 2; line-clamp: 2; font-size: .95rem; }
    .notice-link { order: 4; }
    .notices-inner { align-items: flex-end; }
    .notices-pager { border-left: 0; padding-left: 0; }

    .facts { grid-template-columns: 1fr; margin-top: -4rem; }
    .hero-content { padding-bottom: 7.5rem; }
    .hero-stage { min-height: 34rem; }
    .hero-line { display: none; }
    .hero-actions .btn { flex: 1 1 100%; }
    .lead-news.has-image, .news-grid--lead > li:first-child:not(:only-child) .news-card.has-image { grid-template-columns: 1fr; }
    .lead-news-media { min-height: 0; aspect-ratio: 16 / 9; }
    .news-grid--lead > li:first-child:not(:only-child) .news-card-media { min-height: 0; aspect-ratio: 16 / 9; }

    .week thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .week tbody tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 0; }
    .week tbody th, .week tbody td { padding: 0 !important; width: auto; }
    .week-text { text-align: right; }
    .week-track { grid-column: 1 / -1; padding-top: .4rem !important; }
    .week .is-closed .week-track { display: none; }

    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 9rem; }
    .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 9.5rem; gap: .6rem; }
    .gallery-cell, .gallery-cell:nth-child(n) { grid-column: span 1; }
    .gallery-cell:nth-child(3n + 1) { grid-column: span 2; grid-row: span 2; }
    .lightbox-figure { padding: 0 .8rem 5rem; }
    .lightbox-nav { top: auto; bottom: 1rem; transform: none; }
    .lightbox-prev { left: calc(50% - 60px); } .lightbox-next { right: calc(50% - 60px); }

    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 88vh; max-height: 88dvh; }
    .dialog-head { padding: 1.1rem 1.1rem 1rem; gap: .8rem; }
    .dialog--notice { width: 100vw; border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; }
    .dialog--notice[open] { display: flex; flex-direction: column; }
    .dialog-side { flex: none; flex-direction: row; align-items: center; gap: 1rem; padding: .8rem 4rem .8rem 1.3rem; }
    .dialog-side .dialog-from, .dialog-side-foot, .dialog-side-line { display: none; }
    .dialog-feature { margin: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .7rem; }
    .dialog-feature-label { flex: 1 1 100%; }
    .dialog-feature-big { margin-top: .1rem; font-size: 1.8rem; }
    .dialog-feature-sub { margin-top: 0; }
    .dialog-feature-icon { width: 36px; height: 36px; margin: 0; align-self: center; }
    .dialog-feature-word + .dialog-feature-sub { display: none; }
    .dialog-feature-icon .ic { width: 1.3rem; height: 1.3rem; }
    .dialog-feature-word { font-size: 1.25rem; align-self: center; }
    .dialog-main { flex: 1 1 auto; max-height: none; position: static; }
    .dialog-close { top: .85rem; right: .9rem; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
    .dialog--notice .dialog-head { padding: 1.1rem 1.3rem 0; }
    .dialog--notice .dialog-body { padding: .7rem 1.3rem 1.1rem; }
    .dialog--notice .dialog-foot { padding: .9rem 1.3rem calc(.9rem + env(safe-area-inset-bottom)); }
    .dialog-body { padding: 1.2rem 1.1rem; }
    .dialog-foot { flex-direction: column; align-items: stretch; padding: .9rem 1.1rem calc(.9rem + env(safe-area-inset-bottom)); }
    .dialog-actions { margin-left: 0; }
    .dialog-actions .btn { flex: 1; }
    .person-detail { grid-template-columns: 1fr; }
    .person-detail img { max-width: 11rem; }
    .absence--soon summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem .9rem; }
    .absence--soon summary .tag { grid-column: 2; justify-self: start; }
    .absence-chevron { grid-column: 3; grid-row: 1; }
    .standing-item { flex-wrap: wrap; }
    .standing-item .link-arrow { margin-left: calc(1.25em + 1.1rem); }
    .cta-actions .btn { flex: 1 1 100%; }
    .yearbar ol { flex-wrap: wrap; }
    .yearbar li { flex: 1 0 14%; }
}

@media (max-width: 420px) {
    .brand-name { font-size: .95rem; }
    .team-grid { gap: .9rem; }
    .person-name { font-size: 1.1rem; }
}

/* ---------- Handy: kompakte Hinweisleiste, Fenster als Karte, dichtere Kacheln ---------- */
@media (max-width: 760px) {
    .notices-inner { align-items: center; gap: .2rem; padding-block: .35rem; }
    .notice { position: relative; flex-wrap: nowrap; gap: .6rem; }
    .notice-chip { order: 0; width: 30px; height: 30px; padding: 0; justify-content: center; }
    .notice-chip span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .notice-chip .ic { width: 1.05rem; height: 1.05rem; }
    .notice-text { order: 0; flex: 1 1 auto; -webkit-line-clamp: 1; line-clamp: 1; font-size: .93rem; }
    .notice-link { order: 0; width: 34px; min-height: 34px; padding: 0; gap: 0; justify-content: center; border: 0; font-size: 0; }
    .notice-link .ic { width: 1.15rem; height: 1.15rem; }
    .notice-link::after { content: ""; position: absolute; inset: -.35rem 0; }
    .notice-close { display: none; }
    .notices-pager { padding-left: .2rem; border-left: 1px solid rgba(255, 255, 255, .22); }
    .notices-pager [data-notices-prev] { display: none; }
    .notices-count { min-width: 2.1rem; font-size: .8rem; }
    .notices-step { width: 34px; height: 34px; }

    .brand-name { white-space: normal; font-size: .98rem; line-height: 1.15; }
    .site-header .brand-sub { display: none; }
    .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
    .header-tools { gap: .45rem; }
    .header-tools .status { display: none; }

    .hero { padding: .5rem .5rem 0; }
    .hero-stage { min-height: 30rem; border-radius: 22px; }
    .hero-content { padding-block: 2.5rem 6.5rem; }
    .hero-actions { gap: .6rem; margin-top: 1.6rem; }
    .hero-actions .btn { min-height: 52px; }
    .hero-pause { right: .8rem; top: .8rem; width: 40px; height: 40px; }

    .facts { gap: .55rem; margin-top: -3.6rem; }
    .fact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .8rem; align-items: center; padding: .95rem 1rem .95rem 1.15rem; border-radius: 18px; }
    .fact-label, .fact-main, .fact-note { grid-column: 1; }
    .fact-label { font-size: .72rem; }
    .fact-main { margin: .15rem 0 0; font-size: 1.22rem; }
    .fact-note { margin: .1rem 0 0; font-size: .92rem; }
    .fact-link { grid-column: 2; grid-row: 1 / span 3; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0; justify-content: center; border: 1.5px solid var(--line); border-radius: 50%; font-size: 0; }
    .fact-link .ic { width: 1.2rem; height: 1.2rem; }

    .section { padding-block: 2.8rem; }
    .section--first { padding-top: 1.6rem; }
    .section-head { margin-bottom: 1.4rem; gap: .5rem 1rem; }
    .page-head { padding-block: 2rem 2.2rem; }
    .card--pad { padding: 1.1rem; }
    .lead { font-size: 1.08rem; }
    .service-card { padding: 1.2rem; }
    .service-card::after { font-size: 3rem; top: .6rem; right: 1rem; }
    .lead-news-body { padding: 1.2rem; gap: .7rem; }
    .cta { padding: 1.4rem; border-radius: 20px; }
    .footer-phone { font-size: 2.3rem; }

    /* Fenster: schwebende Karte statt randloser Fläche */
    .dialog, .dialog--notice { width: calc(100vw - 1.2rem); max-width: none; margin: auto; border-radius: 18px; max-height: 86vh; max-height: 86dvh; }
    .dialog-side { padding: .85rem 3.6rem .85rem 1.1rem; }
    .dialog-feature-label { font-size: .68rem; }
    .dialog-feature-big { font-size: 1.6rem; }
    .dialog-feature-sub { font-size: .92rem; }
    .dialog-feature-icon { width: 32px; height: 32px; }
    .dialog-feature-icon .ic { width: 1.15rem; height: 1.15rem; }
    .dialog-feature-word { font-size: 1.15rem; }
    .dialog-close { top: .7rem; right: .7rem; width: 38px; height: 38px; }
    .dialog--notice .dialog-head { padding: 1rem 1.1rem 0; }
    .dialog--notice .dialog-kicker { margin-bottom: .3rem; }
    .dialog--notice .dialog-kicker .dialog-mark, .dialog--notice .dialog-kicker-label { display: none; }
    .dialog--notice .dialog-kicker:has([data-announce-counter]:empty) { display: none; }
    .dialog--notice .dialog-head h2 { font-size: 1.3rem; }
    .dialog--notice .dialog-body { padding: .6rem 1.1rem 1rem; font-size: 1rem; }
    .dialog--notice .dialog-foot { padding: .75rem 1.1rem .9rem; gap: .6rem; }
    .dialog--notice .dialog-foot .check { min-height: 36px; }
    .dialog-actions { gap: .5rem; }
    .dialog--notice .sub { padding: .7rem .8rem; gap: .6rem; }
    .dialog--notice .sub .btn { width: 100%; }
}

/* ---------- 5 Bewegung ----------
   Ruhig und kurz. Alles hier gilt nur mit der Klasse "motion" am <html>-Element;
   sie fehlt ohne JavaScript, bei "Bewegung reduzieren" im System und wenn
   Besucher die Animationen in der Anzeige-Auswahl ausschalten. */

@media (prefers-reduced-motion: no-preference) {
    html.motion { scroll-behavior: smooth; }
    @view-transition { navigation: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
}

html.motion [data-reveal],
html.motion [data-reveal-group] > * {
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s ease, transform .8s var(--ease);
    transition-delay: var(--d, 0s);
}
html.motion [data-reveal].is-in,
html.motion [data-reveal-group].is-in > * { opacity: 1; transform: none; }
html.motion [data-reveal-group].is-in > :nth-child(2) { transition-delay: .07s; }
html.motion [data-reveal-group].is-in > :nth-child(3) { transition-delay: .14s; }
html.motion [data-reveal-group].is-in > :nth-child(4) { transition-delay: .21s; }
html.motion [data-reveal-group].is-in > :nth-child(5) { transition-delay: .28s; }
html.motion [data-reveal-group].is-in > :nth-child(n + 6) { transition-delay: .32s; }
/* nach dem Einblenden wieder normale (schnelle) Übergänge für Hover */
html.motion .is-done[data-reveal], html.motion .is-done[data-reveal-group] > * { transition-delay: 0s; }

html.motion [data-split] .w { display: inline-block; opacity: 0; transform: translateY(.35em); transition: opacity .7s ease, transform .9s var(--ease); transition-delay: calc(var(--i) * 60ms + .05s); }
html.motion [data-split].is-in .w { opacity: 1; transform: none; }

html.motion .hero-img.is-active { animation: ruhezoom 16s ease-out both; }
@keyframes ruhezoom { from { transform: scale(1.07); } to { transform: scale(1); } }

/* Bilder öffnen sich sanft von unten */
html.motion [data-reveal-group].mosaic > li, html.motion [data-reveal-group].gallery > li, html.motion .about-media[data-reveal] > img {
    clip-path: inset(12% 0 0 0 round var(--radius-lg)); transition: opacity .8s ease, transform 1s var(--ease), clip-path 1.1s var(--ease);
}
html.motion [data-reveal-group].mosaic.is-in > li, html.motion [data-reveal-group].gallery.is-in > li, html.motion .about-media[data-reveal].is-in > img { clip-path: inset(0 round var(--radius-lg)); }
html.motion .about-portrait { opacity: 0; transform: translateY(18px); transition: opacity .8s ease .35s, transform 1s var(--ease) .35s; }
html.motion .is-in > .about-portrait { opacity: 1; transform: none; }

html.motion [data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease) .2s; }
html.motion .is-in [data-draw], html.motion [data-draw].is-in { stroke-dashoffset: 0; }

html.motion [data-week] .week-bar { transform: scaleX(0); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 70ms + .15s); }
html.motion [data-week].is-in .week-bar { transform: none; }
html.motion [data-week] .week-now { opacity: 0; transition: opacity .5s ease 1s; }
html.motion [data-week].is-in .week-now { opacity: 1; }

html.motion .status--open .status-dot::after, html.motion .is-open .status-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
    animation: ruhepuls 2.8s ease-out infinite;
}
@keyframes ruhepuls { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

html.motion .dialog[open], html.motion .lightbox[open] { animation: fenster-auf .28s var(--ease); }
html.motion .dialog[open]::backdrop, html.motion .lightbox[open]::backdrop { animation: blende-auf .28s ease; }
html.motion .mobile-menu[open] { animation: blende-auf .2s ease; }
html.motion .display-panel:not([hidden]) { animation: fenster-auf .2s var(--ease); }
@keyframes fenster-auf { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes blende-auf { from { opacity: 0; } }

html.motion .notice { transition: opacity .25s ease; }
html.motion .notice.is-leaving { opacity: 0; }
html.motion .notices.is-paged .notice.is-current { animation: hinweis-ein .35s var(--ease); }
@keyframes hinweis-ein { from { opacity: 0; transform: translateY(6px); } }

html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important;
}
html:not(.motion) .hero-img { transition: none; }

/* ---------- 6 Anzeige-Optionen ---------- */

/* Mit vergrößerter Schrift früher auf das kompakte Menü wechseln */
@media (max-width: 1700px) {
    html[data-schrift] .main-nav { display: none; }
    html[data-schrift] .nav-toggle { display: inline-grid; }
    html[data-schrift] .header-tools { margin-left: auto; }
    html[data-schrift] .brand { flex-shrink: 1; }
}

html[data-schrift="gross"] { font-size: 121%; }
html[data-schrift="groesser"] { font-size: 137%; }

html[data-kontrast="hoch"] {
    --ink: #000; --ink-2: #1a1a1a; --ink-3: #2b2b2b;
    --paper: #fff; --paper-2: #eee; --line: #000; --line-soft: #5a5a5a;
    --brand: #a0001c; --brand-dark: #6e0013; --brand-soft: #fff; --brand-line: #a0001c;
    --ok: #004d2c; --danger: #8a0018; --warn: #5c3600; --info: #003a5c;
    --shadow-1: none; --shadow-2: 0 0 0 2px #000;
}
html[data-kontrast="hoch"] a { text-decoration: underline; }
html[data-kontrast="hoch"] .site-header { background: #fff; border-bottom-color: #000; }
html[data-kontrast="hoch"] .hero-shade { background: rgba(0, 0, 0, .78); }
html[data-kontrast="hoch"] .card, html[data-kontrast="hoch"] .fact, html[data-kontrast="hoch"] .way, html[data-kontrast="hoch"] .lead-news { border: 2px solid #000; }
html[data-kontrast="hoch"] .site-footer { background: #000; color: #fff; }
html[data-kontrast="hoch"] .footer-title, html[data-kontrast="hoch"] .footer-list span, html[data-kontrast="hoch"] .footer-hours th,
html[data-kontrast="hoch"] .footer-bottom, html[data-kontrast="hoch"] .footer-call-note { color: #fff; }

@media (forced-colors: active) {
    .week-bar { background: CanvasText; forced-color-adjust: none; }
    .status-dot { border: 2px solid CanvasText; }
}

@media print {
    .site-header, .quickbar, .notice-close, .hero-pause, .display-menu, .skip-link, dialog { display: none !important; }
    body { padding: 0; font-size: 11pt; }
    .site-footer { background: none; color: #000; }
    .site-footer a { color: #000; }
    html.motion [data-reveal], html.motion [data-reveal-group] > *, html.motion [data-split] .w { opacity: 1 !important; transform: none !important; }
}
