/* ==========================================================================
   Tischlerei Zechner – Stylesheet
   Light ist Standard; Dark per Systemeinstellung oder gespeicherter Wahl
   (data-theme am <html>, gesetzt von js/theme.js vor dem ersten Paint).
   ========================================================================== */

/* ----- Schriften (selbst gehostet, SIL Open Font License, siehe fonts/OFL-*.txt) ----- */
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

/* ----- Design-Tokens: Light ----- */
:root {
    --bg: #FBF9F5;
    --surface: #F4EEE5;
    --surface-2: #EAE0D2;
    --card: #FFFFFF;
    --text: #241A21;
    --muted: #5E524B;
    --line: #E0D5C6;
    --line-strong: #8C7D70;
    --brand-soft: #EFE8F3;
    --brand-text: #20122D;
    --accent: #9A4F1E;
    --accent-hover: #7E3F15;
    --accent-ink: #FFFFFF;
    --header: #20122D;
    --header-ink: #F7F2F9;
    --header-muted: #CDBFD8;
    --focus: #2457C5;
    --error: #B42318;
    --error-bg: #FDEDEB;
    --success: #25633A;
    --success-bg: #E7F3EA;
    --scrim: rgba(20, 12, 24, .55);
    --shadow: 0 1px 2px rgba(36, 26, 33, .06), 0 12px 32px -14px rgba(36, 26, 33, .22);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --font-head: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
    --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
    --maxw: 1240px;
    --measure: 68ch;
    --header-h: 76px;
    --gutter: clamp(1.25rem, .6rem + 2.6vw, 3rem);
    --section: clamp(4rem, 2.8rem + 5vw, 8rem);
    --fs-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
    --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 5rem);
    --fs-h2: clamp(2rem, 1.5rem + 2vw, 3.25rem);
    --fs-h3: clamp(1.2rem, 1.1rem + .4vw, 1.45rem);

    color-scheme: light;
}

/* ----- Design-Tokens: Dark (warmes Nussbaum-Dunkel) ----- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1A1512; --surface: #231D19; --surface-2: #302822; --card: #28211C;
        --text: #F3ECE3; --muted: #C5B8A9; --line: #3F352E; --line-strong: #97887A;
        --brand-soft: #2E2336; --brand-text: #DCCBEC;
        --accent: #E3A66C; --accent-hover: #F0BF8F; --accent-ink: #1A1512;
        --header: #17101C; --header-ink: #F3ECE3; --header-muted: #C3B4CF;
        --focus: #8AB4F8; --error: #F4A096; --error-bg: #3B201C; --success: #94D4A4; --success-bg: #1C3324;
        --scrim: rgba(8, 5, 10, .66);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #1A1512; --surface: #231D19; --surface-2: #302822; --card: #28211C;
    --text: #F3ECE3; --muted: #C5B8A9; --line: #3F352E; --line-strong: #97887A;
    --brand-soft: #2E2336; --brand-text: #DCCBEC;
    --accent: #E3A66C; --accent-hover: #F0BF8F; --accent-ink: #1A1512;
    --header: #17101C; --header-ink: #F3ECE3; --header-muted: #C3B4CF;
    --focus: #8AB4F8; --error: #F4A096; --error-bg: #3B201C; --success: #94D4A4; --success-bg: #1C3324;
    --scrim: rgba(8, 5, 10, .66);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ----- Basis ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 4px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
img, svg { display: block; }
svg { flex: none; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, input, textarea { font: inherit; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--section); }
.sec-flush-top { padding-top: 0; }
.band { background: var(--surface); }
.sh { display: flex; flex-direction: column; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.eb { display: flex; align-items: center; gap: .75rem; font-size: .875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eb::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.h2 { font-size: var(--fs-h2); }
.muted { color: var(--muted); }
.measure { max-width: var(--measure); }
.lead-text { font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3rem); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--card); color: var(--text); padding: .75rem 1rem; border-radius: var(--radius-sm); }
.skip:focus { top: 1rem; }

/* ----- Buttons ----- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 52px; padding: .8rem 1.5rem; border-radius: 999px;
    font: 600 1.0625rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
    border: 2px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-ghost-light { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-sm { min-height: 48px; padding: .6rem 1.25rem; }
.btn-lg { min-height: 56px; font-size: 1.125rem; }
.icon-btn {
    width: 48px; height: 48px; padding: 0; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid rgba(255, 255, 255, .28); color: var(--header-ink); cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; min-height: 44px; }
.linkbtn-inline { min-height: 0; color: var(--accent); }

/* ----- Kopfzeile & Navigation ----- */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--header); color: var(--header-ink); padding-top: env(safe-area-inset-top, 0px); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.hdr-actions { display: flex; align-items: center; gap: .5rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--header-ink); text-decoration: none; min-height: 48px; }
.brand:hover { color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: .16em; }
.brand-sub { font-size: .72rem; font-weight: 600; letter-spacing: .38em; margin-top: .3rem; color: var(--header-muted); }
.nav-desktop { display: none; align-items: center; gap: .25rem; }
.navlink { color: var(--header-ink); text-decoration: none; padding: .5rem .85rem; border-radius: 8px; font-weight: 600; font-size: 1.0625rem; min-height: 44px; display: inline-flex; align-items: center; }
.navlink:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.hide-sm { display: none; }
.back-hdr { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); color: var(--header-ink); text-decoration: none; font-weight: 600; }
.back-hdr:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--header); border-top: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 24px 40px -12px rgba(0, 0, 0, .45); padding: .5rem var(--gutter) 1.5rem; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.menu-nav { display: flex; flex-direction: column; }
.menu a.ml { display: flex; align-items: center; justify-content: space-between; min-height: 60px; font: 600 1.375rem/1.2 var(--font-head); color: var(--header-ink); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.25rem; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme-effective="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme-effective="dark"] .theme-toggle .ic-moon { display: none; }

/* ----- Hero ----- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(560px, 42vw + 300px, 920px); color: #fff; overflow: hidden; isolation: isolate; view-timeline: --hero block; }
.hero-bg { position: absolute; left: 0; right: 0; top: -14%; bottom: -14%; z-index: -2; width: 100%; height: 128%; object-fit: cover; background-color: #4A3527; will-change: transform; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(20, 11, 24, .86) 0%, rgba(20, 11, 24, .45) 55%, rgba(20, 11, 24, .3) 100%); }
.hero-in { display: flex; flex-direction: column; gap: clamp(1.1rem, .8rem + 1vw, 1.6rem); padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
.hero h1 { font-size: var(--fs-h1); max-width: 14ch; color: #fff; }
.hero .lead { font-size: clamp(1.125rem, 1rem + .55vw, 1.4rem); max-width: 40ch; color: rgba(255, 255, 255, .92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hero-parallax { from { transform: translateY(0); } to { transform: translateY(24%); } }
@keyframes hero-fade { to { opacity: 0; transform: translateY(-40px); } }
@media (prefers-reduced-motion: no-preference) {
    .hero-in { animation: rise .9s ease-out both; }
    @supports (animation-timeline: view()) {
        .hero-bg { animation: hero-parallax linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
        .hero-in { animation: rise .9s ease-out both, hero-fade linear both; animation-timeline: auto, --hero; animation-range: normal, exit 0% exit 80%; }
    }
}

/* ----- Über uns ----- */
.two { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .98rem; }
.tcard { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(2.25rem, 1.5rem + 4vw, 4rem) 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; color: var(--brand-text); }
.tg1 { font: 700 clamp(1rem, .9rem + .5vw, 1.35rem)/1 var(--font-body); letter-spacing: .42em; padding-left: .42em; }
.tg2 { font: 700 clamp(3rem, 2rem + 4.5vw, 5.75rem)/.95 var(--font-head); letter-spacing: .03em; }
.tg3 { width: min(70%, 320px); height: 2px; background: currentColor; margin: .75rem 0 .5rem; }
.tg4 { font: italic 500 clamp(1.35rem, 1.05rem + 1.2vw, 2.1rem)/1.2 var(--font-head); }

/* ----- Leistungs-Karten ----- */
.grid-cards { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: .75rem; list-style: none; }
.card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 80px; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-2px); }
.card h3 { font-size: var(--fs-h3); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.card.alt .ic { background: var(--brand-soft); color: var(--brand-text); }
.grid-cards > li.more-item { display: contents; }
.card.more { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); text-decoration: none; color: var(--text); }
.card.more:hover { color: var(--text); }
.card.more .ic { background: transparent; border: 1.5px solid var(--line-strong); color: var(--text); }
.more-text { display: flex; flex-direction: column; gap: .2rem; }
.more-title { font: 600 var(--fs-h3)/1.1 var(--font-head); }
.more-sub { font-size: .98rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg); background: var(--header); color: var(--header-ink); }
.cta-text { display: flex; flex-direction: column; gap: .35rem; max-width: 34rem; }
.cta-title { font: 600 clamp(1.4rem, 1.2rem + .9vw, 2rem)/1.15 var(--font-head); }
.cta-sub { color: var(--header-muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ----- Galerie (Startseite) ----- */
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.js .gal.collapsed .tile:nth-child(n+5) { display: none; }
.tile { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #8A6A50; }
.tile img, .jt img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img, .jt:hover img { transform: scale(1.04); }
.gal-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); }
.gal-more svg { transition: transform .25s; }
.gal-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ----- Bildergalerie (Unterseite, Justified-Layout) ----- */
.page-intro { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.page-intro .back { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; min-height: 44px; align-self: flex-start; }
.page-intro h1 { font-size: var(--fs-h2); }
.jg-sec { padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.jg { --row: clamp(120px, 80px + 14vw, 300px); display: flex; flex-wrap: wrap; gap: clamp(4px, .2rem + .3vw, 10px); }
.jg::after { content: ""; flex-grow: 999; }
.jt { position: relative; display: block; border-radius: 8px; overflow: hidden; cursor: zoom-in; min-width: 0; background: #8A6A50; }
.jg-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }

/* ----- Kontakt ----- */
.ccard, .fcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ccard { margin-top: .5rem; padding: .5rem clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.crow { display: flex; gap: 1rem; align-items: center; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.crow:last-child { border-bottom: 0; }
.crow > div { min-width: 0; }
.ci { width: 44px; height: 44px; border-radius: 999px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.clabel { font-size: .9rem; color: var(--muted); line-height: 1.3; }
.cval { display: block; font-weight: 600; font-size: 1.125rem; line-height: 1.35; overflow-wrap: anywhere; }
.fcard { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.fhead { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.5rem; }
.fhead h3 { font-size: clamp(1.5rem, 1.3rem + .8vw, 2rem); }
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label { font-weight: 600; font-size: 1.0625rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.input { width: 100%; min-height: 54px; padding: .8rem 1rem; font-size: 1.0625rem; color: var(--text); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 168px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus); }
.input.invalid { border-color: var(--error); border-width: 2px; background: var(--error-bg); }
.input-short { max-width: 10rem; }
.err { display: flex; gap: .45rem; align-items: flex-start; color: var(--error); font-weight: 600; font-size: .98rem; line-height: 1.4; }
.err svg { margin-top: .1rem; }
.alert { display: flex; gap: .85rem; align-items: flex-start; border-radius: 12px; padding: 1rem 1.15rem; border: 2px solid; }
.alert-body { display: flex; flex-direction: column; gap: .4rem; }
.alert-title { font-weight: 700; font-size: 1.125rem; }
.alert ul { padding-left: 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.alert-error { background: var(--error-bg); border-color: var(--error); color: var(--text); }
.alert-error .aic { color: var(--error); }
.alert-error a { color: var(--error); font-weight: 600; }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--text); }
.alert-success .aic { color: var(--success); }
.form-note { font-size: .98rem; }
.form-submit { align-self: stretch; }
.form-honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ----- Karte (Zwei-Klick-Lösung) ----- */
.map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: clamp(420px, 300px + 18vw, 560px); border: 1px solid var(--line); background: #ECE6DA; }
.map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.map-pin { position: absolute; left: 50%; top: 25%; transform: translate(-50%, -100%); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.consent { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); width: min(460px, calc(100% - 2rem)); background: var(--card); color: var(--text); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 1rem; }
.consent-head { display: flex; gap: .75rem; align-items: center; }
.consent-title { font: 600 1.25rem/1.2 var(--font-head); }
.consent-text { font-size: 1rem; }
.consent .btn { align-self: flex-start; }
.osm { position: absolute; right: .5rem; bottom: .5rem; background: rgba(255, 255, 255, .9); color: #3A3330; font-size: .8125rem; padding: .2rem .55rem; border-radius: 6px; }
.osm a { color: #6B3410; }

/* ----- Fußzeile & mobile Aktionsleiste ----- */
.ftr { background: var(--header); color: var(--header-ink); padding-block: clamp(3rem, 2rem + 4vw, 5rem) 1.25rem; }
.ftr-slim { padding-top: clamp(2.5rem, 2rem + 3vw, 4rem); }
.ftr a { color: var(--header-ink); }
.ftr a:hover { color: #fff; }
.fcols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.fcol { display: flex; flex-direction: column; gap: .35rem; }
.fcol-brand { gap: 1rem; }
.fcol-title { font-weight: 700; margin-bottom: .35rem; }
.fmuted { color: var(--header-muted); }
.flogo { width: 150px; height: auto; }
.fbottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--header-muted); font-size: .98rem; }
.ftr-slim .fbottom { margin-top: 0; padding-top: 0; border-top: 0; }
.flinks { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.flinks .linkbtn, .flinks a { color: var(--header-ink); }
.flinks a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.mbar { position: sticky; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .65rem var(--gutter) calc(.65rem + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .25); }
.mbar .btn { min-height: 50px; padding-inline: .75rem; }

/* ----- Lightbox ----- */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); background: rgba(14, 9, 16, .95); color: #fff; }
.lb[open] { display: flex; flex-direction: column; }
.lb::backdrop { background: transparent; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem var(--gutter); }
.lb-count { font-weight: 600; }
.lb-close { border-color: rgba(255, 255, 255, .35); color: #fff; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter) 1.5rem; }
.lb-img { max-width: min(1100px, 100%); max-height: 100%; width: auto; height: auto; border-radius: 8px; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(20, 12, 24, .6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.lb-nav:hover { background: rgba(20, 12, 24, .85); }
.lb-prev { left: calc(var(--gutter) + .75rem); }
.lb-next { right: calc(var(--gutter) + .75rem); }

/* ----- Dialoge (Impressum, Datenschutz) ----- */
.dlg { width: min(780px, calc(100% - 3rem)); max-height: min(86vh, 880px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .55); overflow: hidden; }
.dlg[open], .dlg:target { display: flex; flex-direction: column; }
.dlg::backdrop { background: var(--scrim); }
/* Ohne JavaScript per Anker (#impressum) erreichbar */
.dlg:target:not([open]) { position: fixed; inset: 0; margin: auto; z-index: 120; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.25rem, 4vw, 2rem); border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem); line-height: 1.15; }
.dlg-x { width: 48px; height: 48px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1.5px solid var(--line-strong); color: var(--text); cursor: pointer; padding: 0; text-decoration: none; }
.dlg-x:hover { background: var(--surface); color: var(--text); }
.dlg-body { overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.25rem, 4vw, 2rem); display: flex; flex-direction: column; gap: 1rem; font-size: 1.0625rem; flex: 1; }
.dlg-body h3 { margin: 1rem 0 0; font-size: 1.25rem; line-height: 1.25; }
.dlg-body h3:first-child { margin-top: 0; }
.dlg-body p { max-width: var(--measure); }
.dlg-body ul { padding-left: 1.25rem; }
.dlg-foot { display: flex; justify-content: flex-end; padding: 1rem clamp(1.25rem, 4vw, 2rem) calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.dlg-close { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .8rem 1.75rem; border-radius: 999px; font: 600 1.0625rem/1.2 var(--font-body); cursor: pointer; background: transparent; color: var(--text); border: 2px solid var(--line-strong); text-decoration: none; }
.dlg-close:hover { border-color: var(--text); color: var(--text); }
.imp-firm { font: 600 1.35rem/1.3 var(--font-head); }
.imp-block { display: flex; flex-direction: column; gap: .2rem; }
.imp-grid { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.25rem; align-items: baseline; }
.imp-grid a { overflow-wrap: anywhere; }
body.dlg-open { overflow: hidden; }

/* ----- Breakpoints ----- */
@media (max-width: 479.98px) {
    .back-hdr { width: 48px; padding: 0; justify-content: center; }
    .back-hdr .back-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 639.98px) {
    .dlg { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; border: 0; }
    .dlg-head { padding-top: calc(1rem + env(safe-area-inset-top, 0px)); }
    .dlg-close { width: 100%; }
    .lb-prev { left: .5rem; }
    .lb-next { right: .5rem; }
}
@media (min-width: 560px) {
    .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fgrid .full { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
    .hide-sm { display: inline-flex; }
    .mbar { display: none; }
    .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
    .js .gal.collapsed .tile:nth-child(n+5) { display: block; }
    .js .gal.collapsed .tile:nth-child(n+7) { display: none; }
}
@media (min-width: 760px) {
    .fcols { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 900px) {
    .two { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
    .two.contact { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
}
@media (min-width: 1000px) {
    .nav-desktop { display: flex; }
    .nav-mobile-only { display: none; }
    .menu { display: none !important; }
    .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
    .card { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding: 1.6rem; min-height: 190px; }
    .card h3, .card .more-text { margin-top: auto; }
}
@media (min-width: 1100px) {
    .gal { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
    .js .gal.collapsed .tile:nth-child(n+7) { display: block; }
    .js .gal.collapsed .tile:nth-child(n+9) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .hdr, .mbar, .map, .gal-actions, .hero-bg, .hero-scrim { display: none !important; }
    .hero { min-height: 0; color: var(--text); }
    .hero h1, .hero .lead { color: var(--text); }
}
