:root {
  --paper: #f6f4ef;
  --paper-2: #ebe8e0;
  --card: #fffefb;
  --ink: #151a2e;
  --ink-soft: #4e5670;
  --line: #d9d5ca;
  --brand: #0d1a7a;          /* Marineblau aus dem Logo (#010287), leicht entsättigt */
  --brand-ink: #f6f4ef;
  --link: #1a2f95;
  --accent: #0072ad;         /* Himmelblau aus dem Logo (#0093dc), für Text abgedunkelt */
  --accent-soft: #6cc6f2;    /* Akzent auf dunklen Flächen */
  --sky: #0093dc;            /* Original-Himmelblau für Linien und Deko */
  --btn-bg: #0072ad;
  --btn-hover: #005a8a;
  --btn-ink: #ffffff;
  --footer-bg: #0a1150;
  --footer-ink: #d3d7ea;
  --footer-muted: #9aa1c4;
  --footer-link: #8fd3f7;
  --shadow: rgba(10, 17, 60, .12);
  --overlay: 6, 12, 60;
  --draft-bg: #fff3cd;
  --draft-line: #e8d38a;
  color-scheme: light;
  --radius: 6px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1022;
    --paper-2: #131936;
    --card: #151b3a;
    --ink: #e9ebf5;
    --ink-soft: #aab1cc;
    --line: #273056;
    --brand: #141d5c;
    --brand-ink: #e9ebf5;
    --link: #8fcdf3;
    --accent: #5cbdf0;
    --accent-soft: #8fd3f7;
    --sky: #2aa7e8;
    --btn-bg: #5cbdf0;
    --btn-hover: #8fd3f7;
    --btn-ink: #07102e;
    --footer-bg: #070a18;
    --footer-ink: #c9cee3;
    --footer-muted: #8b92b3;
    --footer-link: #8fd3f7;
    --shadow: rgba(0, 0, 0, .45);
    --overlay: 4, 7, 30;
    --draft-bg: #3a3212;
    --draft-line: #6b5a1c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1022;
  --paper-2: #131936;
  --card: #151b3a;
  --ink: #e9ebf5;
  --ink-soft: #aab1cc;
  --line: #273056;
  --brand: #141d5c;
  --brand-ink: #e9ebf5;
  --link: #8fcdf3;
  --accent: #5cbdf0;
  --accent-soft: #8fd3f7;
  --sky: #2aa7e8;
  --btn-bg: #5cbdf0;
  --btn-hover: #8fd3f7;
  --btn-ink: #07102e;
  --footer-bg: #070a18;
  --footer-ink: #c9cee3;
  --footer-muted: #8b92b3;
  --footer-link: #8fd3f7;
  --shadow: rgba(0, 0, 0, .45);
  --overlay: 4, 7, 30;
  --draft-bg: #3a3212;
  --draft-line: #6b5a1c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-soft); }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .8em; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Kopfzeile */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 76px; }
.brand { margin-right: auto; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand strong { display: block; font-family: var(--serif); font-size: 1.25rem; line-height: 1.1; }
.brand img { height: 52px; width: auto; flex: none; }
.brand small { display: block; font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }
.brand:hover { color: var(--ink); }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav { order: 2; margin-right: 4px; }
.theme-toggle { order: 3; }
.nav-toggle { order: 4; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; border-radius: var(--radius); }
.main-nav > ul > li > a:hover, .main-nav > ul > li.active > a { color: var(--link); background: var(--paper-2); }
.main-nav > ul > li.active > a { box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.main-nav .sub {
  list-style: none; margin: 0; padding: 8px; min-width: 250px;
  position: absolute; top: 100%; left: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 30px var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s ease;
}
.main-nav .sub a { padding: 8px 12px; font-weight: 400; }
.main-nav .sub a:hover, .main-nav .sub .active a { background: var(--paper); color: var(--link); }
.main-nav li.has-sub:hover > .sub, .main-nav li.has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub-toggle { display: none; }

/* Hell/Dunkel-Schalter */
.theme-toggle {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--ink);
  transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--paper-2); border-color: var(--ink-soft); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .2s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

  .main-nav {
    display: none; position: fixed; inset: 77px 0 0; overflow-y: auto;
    background: var(--paper); padding: 12px 16px 40px;
  }
  .main-nav.open { display: block; }
  body.nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; }
  .main-nav > ul > li > a { padding: 14px 4px; font-size: 1.1rem; }
  .main-nav > ul > li.active > a { box-shadow: none; background: none; color: var(--accent); }
  .sub-toggle {
    display: block; width: 48px; background: none; border: 0; cursor: pointer; position: relative;
  }
  .sub-toggle::after { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: .2s; }
  .sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .main-nav .sub {
    grid-column: 1 / -1; position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; padding: 0 0 10px 12px; display: none;
  }
  .main-nav li.sub-open > .sub { display: block; }
  .main-nav li.has-sub:hover > .sub { display: none; }
  .main-nav li.has-sub.sub-open:hover > .sub { display: block; }
}

/* ---------- Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--btn-bg); color: var(--btn-ink); border: 2px solid var(--btn-bg); transition: .15s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: #151a2e; border-color: #fff; }

/* ---------- Startseite */
.hero { position: relative; min-height: clamp(420px, 68vh, 640px); display: flex; align-items: flex-end; color: #fff; background: var(--brand); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Abdunkelung: von unten nach oben auslaufend, Stärke und Höhe in den Einstellungen */
.hero { --ov-strength: .7; --ov-height: 70%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg,
      rgba(var(--overlay), var(--ov-strength)) 0%,
      rgba(var(--overlay), calc(var(--ov-strength) * .6)) calc(var(--ov-height) * .5),
      rgba(var(--overlay), 0) var(--ov-height)),
    linear-gradient(90deg, rgba(var(--overlay), calc(var(--ov-strength) * .45)) 0%, rgba(var(--overlay), 0) 65%);
}
.hero.no-overlay::after { display: none; }
.hero-inner { text-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 18px rgba(0, 0, 0, .35); }
.hero-actions { text-shadow: none; }
.hero-inner { position: relative; z-index: 1; padding: 80px 0 56px; }
.hero .eyebrow { color: #fff; opacity: .92; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 14ch; margin-bottom: .3em; }
.hero-text { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 52ch; opacity: .95; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.visit-strip { background: var(--brand); color: var(--brand-ink); }
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.visit-grid > div { padding: 22px 24px 22px 0; }
.visit-grid > div + div { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .18); }
.visit-grid .label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-soft); margin-bottom: 2px; }
.visit-grid strong { font-weight: 500; }
@media (max-width: 760px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-grid > div, .visit-grid > div + div { padding: 14px 0; border-left: 0; }
  .visit-grid > div + div { border-top: 1px solid rgba(255, 255, 255, .18); }
}

.section { padding: 64px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }

.home-news { padding-bottom: 24px; }
.feature-head { padding-top: 8px; }
.feature-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: .1em 0 .35em; }
.feature-title a { color: var(--ink); text-decoration: none; }
.feature-title a:hover { color: var(--link); text-decoration: underline; }
.feature .article-figure { margin-top: 28px; }
.feature .article-content { padding-top: 32px; }
.feature-foot { padding-top: 4px; font-size: .92rem; }
.feature-foot a { font-weight: 600; text-decoration: none; }
.feature-foot a::before { content: "🔗 "; }
.older-news { padding-top: 40px; border-top: 1px solid var(--line); }
.lead-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; margin-bottom: 48px; }
.lead-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.lead-body time, .card time { font-size: .85rem; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.lead-body h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .3em 0 .5em; }
.lead-body h3 a, .card h3 a { color: var(--ink); text-decoration: none; }
.lead-body h3 a:hover, .card h3 a:hover { color: var(--link); text-decoration: underline; }
.lead-body p { font-size: 1.08rem; color: var(--ink-soft); }
.more { font-weight: 600; text-decoration: none; }
.lead-card:not(:has(.lead-img)) { grid-template-columns: 1fr; max-width: 760px; }
@media (max-width: 760px) { .lead-card { grid-template-columns: 1fr; gap: 20px; } }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow); }
.card-img img, .card-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; background: var(--paper-2); }
.card-placeholder img { width: auto; height: 64px; opacity: .3; aspect-ratio: auto; object-fit: contain; }
.card-body { padding: 18px 20px 22px; }
.card h3 { font-size: 1.22rem; margin: .35em 0 .45em; }
.card p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

.welcome { background: var(--paper-2); padding: 72px 0; border-top: 1px solid var(--line); }
.welcome-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.welcome h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
@media (max-width: 760px) { .welcome-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Inhaltsseiten */
.page-head { padding: 56px 0 32px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--paper-2), var(--paper)); }
.page-head h1 { margin-bottom: .25em; }
.draft-note { display: inline-block; background: var(--draft-bg); border: 1px solid var(--draft-line); padding: 4px 12px; border-radius: 999px; font-size: .88rem; margin-top: 8px; }

.page-layout { padding: 48px 0 80px; }
.page-layout.with-aside { display: grid; grid-template-columns: 250px 1fr; gap: 56px; align-items: start; }
.page-main { max-width: 760px; min-width: 0; }
.subnav { position: sticky; top: 100px; }
.subnav h2 { font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.subnav h2 a { color: var(--ink-soft); text-decoration: none; }
.subnav ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.subnav a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink); text-decoration: none; }
.subnav a:hover { color: var(--link); }
.subnav .active a { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
  .page-layout.with-aside { grid-template-columns: 1fr; gap: 24px; }
  .subnav { position: static; order: 2; border-top: 1px solid var(--line); padding-top: 24px; }
}
.page-figure { margin: 0 0 32px; }
.article-figure { width: min(1000px, 100% - 32px); margin: 40px auto 0; }
.page-figure img, .article-figure img { width: 100%; border-radius: var(--radius); max-height: 560px; object-fit: cover; }
.article .prose { padding-bottom: 32px; padding-top: 32px; }

.tile-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tile-list a { display: flex; justify-content: space-between; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.tile-list a:hover { border-color: var(--link); color: var(--link); }

/* Fliesstext aus dem Editor */
.prose { font-size: 1.06rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li[data-list="bullet"] { list-style-type: disc; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.15rem; color: var(--ink-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .98rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--paper-2); }
.prose iframe, .prose .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); margin: 1.5em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose a[href$=".pdf"]::before { content: "PDF"; font-size: .7em; font-weight: 700; background: var(--btn-bg); color: var(--btn-ink); padding: 1px 5px; border-radius: 3px; margin-right: 6px; vertical-align: 2px; }

/* ---------- Bildergalerie (Diashow + Lightbox) */
.gallery { width: min(1000px, 100% - 32px); margin: 0 auto 48px; }
.page-main .gallery { width: 100%; margin: 8px 0 40px; }
.slides { position: relative; aspect-ratio: 3 / 2; background: var(--footer-bg); border-radius: var(--radius); overflow: hidden; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s .8s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.slide-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.slide-open img { width: 100%; height: 100%; object-fit: contain; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 20px 44px; color: #fff; font-size: .95rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65)); pointer-events: none;
}
.ss-nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .2s, background .2s;
}
.ss-nav::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border: solid #151a2e; border-width: 0 2.5px 2.5px 0; }
.ss-prev { left: 14px; } .ss-prev::after { transform: translateX(2px) rotate(135deg); }
.ss-next { right: 14px; } .ss-next::after { transform: translateX(-2px) rotate(-45deg); }
.slides:hover .ss-nav, .ss-nav:focus-visible { opacity: 1; }
.ss-nav:hover { background: #fff; }
@media (hover: none) { .ss-nav { opacity: 1; width: 40px; height: 40px; } }
.ss-bar { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 999px; padding: 4px 12px 4px 4px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.ss-play { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); cursor: pointer; position: relative; }
.ss-play::before, .ss-play::after { content: ""; position: absolute; top: 9px; width: 3px; height: 10px; background: #fff; }
.ss-play::before { left: 10px; } .ss-play::after { left: 15px; }
.ss-play.is-paused::after { display: none; }
.ss-play.is-paused::before { left: 11px; top: 8px; width: 0; height: 0; background: none; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #fff; }
.ss-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); }
.ss-progress span { display: block; height: 100%; width: 0; background: var(--accent-soft); }
.ss-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ss-thumbs button { flex: 0 0 86px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--paper-2); opacity: .6; transition: opacity .2s, border-color .2s; }
.ss-thumbs button:hover { opacity: 1; }
.ss-thumbs button.is-active { opacity: 1; border-color: var(--accent); }
.ss-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  .gallery { width: 100%; }
  .slides { border-radius: 0; aspect-ratio: 4 / 3; }
  .ss-thumbs { padding-inline: 16px; }
}

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(5, 8, 32, .96); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(5, 8, 32, .96); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .2s ease; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 72px 24px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: calc(100vw - 144px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { max-width: 70ch; text-align: center; color: #d3d7ea; font-size: .95rem; }
.lb-count { position: absolute; top: 18px; left: 22px; font-size: .9rem; color: #9aa1c4; font-variant-numeric: tabular-nums; }
.lb-close, .lb-nav { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); cursor: pointer; transition: background .2s; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 10px; right: 12px; }
.lb-close::before, .lb-close::after { content: ""; position: absolute; left: 14px; top: 23px; width: 20px; height: 2px; background: #fff; transform: rotate(45deg); }
.lb-close::after { transform: rotate(-45deg); }
.lb-nav { top: 50%; translate: 0 -50%; }
.lb-nav::after { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; }
.lb-prev { left: 12px; } .lb-prev::after { transform: translateX(3px) rotate(135deg); }
.lb-next { right: 12px; } .lb-next::after { transform: translateX(-3px) rotate(-45deg); }
@media (max-width: 600px) {
  .lightbox figure { padding: 60px 0 16px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 150px); border-radius: 0; }
  .lightbox figcaption { padding: 0 16px; }
  .lb-nav { top: auto; bottom: 16px; translate: none; }
}
body:has(.lightbox[open]) { overflow: hidden; }

/* ---------- Videos und 3D-Modelle */
.media-extras { display: grid; gap: 32px; margin: 8px 0 40px; }
.media-extras figure { margin: 0; }
.media-extras figcaption { margin-top: 10px; font-size: .95rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: 2px; }
.media-extras figcaption strong { color: var(--ink); font-family: var(--serif); font-size: 1.1rem; }
.video-item iframe, .video-item .embed-consent { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); margin: 0; }
.video-item .embed-consent iframe { width: 100%; height: 100%; }
.model-viewer {
  display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: var(--radius);
  background: radial-gradient(circle at 50% 35%, var(--card), var(--paper-2)); border: 1px solid var(--line);
  --poster-color: transparent;
}
.ar-button {
  position: absolute; right: 12px; bottom: 12px; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer; background: var(--btn-bg); color: var(--btn-ink);
  box-shadow: 0 4px 14px var(--shadow);
}
.model-progress { display: none; }
.model-stage { position: relative; }
.model-stage model-viewer { cursor: zoom-in; }
.model-stage model-viewer:active { cursor: grabbing; }
.model-expand {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink); box-shadow: 0 2px 8px var(--shadow);
  transition: background .15s, transform .15s;
}
.model-expand:hover { background: var(--card); transform: scale(1.06); }
.model-expand svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.model-lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: radial-gradient(circle at 50% 40%, #2a3050, #070a18 75%); color: #fff; overflow: hidden;
}
.model-lightbox[open] { display: flex; flex-direction: column; animation: lb-in .2s ease; }
.model-lightbox::backdrop { background: #070a18; }
.ml-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px 0 22px; }
.ml-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.ml-close { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); cursor: pointer; }
.ml-close:hover { background: rgba(255, 255, 255, .22); }
.ml-close::before, .ml-close::after { content: ""; position: absolute; left: 14px; top: 23px; width: 20px; height: 2px; background: #fff; transform: rotate(45deg); }
.ml-close::after { transform: rotate(-45deg); }
.ml-body { flex: 1; min-height: 0; position: relative; }
.ml-body model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.ml-hint { margin: 0; padding: 8px 16px 14px; text-align: center; font-size: .85rem; color: #aab1cc; }
.model-quicklook { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.model-quicklook img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.ar-badge {
  position: absolute; right: 12px; bottom: 12px; font-weight: 600; font-size: .88rem; padding: 8px 14px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 4px 14px var(--shadow);
}
.ar-badge[hidden] { display: none; }
.model-hint { font-size: .88rem; }

/* ---------- Kontaktformular */
.contact-wrap { padding: 40px 0 72px; }
.contact-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 18px; margin-bottom: 24px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: var(--radius); }
.contact-context .label { flex-basis: 100%; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.contact-context a:first-of-type { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.contact-context-remove { margin-left: auto; font-size: .85rem; color: var(--ink-soft); }
.contact-form { display: grid; gap: 18px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row.two { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.form-field small { font-weight: 400; color: var(--ink-soft); }
.form-field input, .form-field textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; width: 100%;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
.req { color: var(--accent); font-style: normal; }
.form-note { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.contact-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.form-errors { background: var(--draft-bg); border: 1px solid var(--draft-line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.form-errors ul { margin: 6px 0 0; padding-left: 1.2em; }
.contact-done { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: var(--radius); padding: 22px 24px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.contact-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  margin: 8px 0 48px; padding: 20px 22px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-cta strong { display: block; font-family: var(--serif); font-size: 1.12rem; }
.contact-cta span { color: var(--ink-soft); font-size: .95rem; }
.contact-cta .btn { flex: none; }

/* ---------- Cookie-Einwilligung */
.consent-banner {
  position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px;
  max-width: 1040px; margin: 0 auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--sky);
  border-radius: 10px; box-shadow: 0 16px 48px var(--shadow), 0 2px 8px var(--shadow);
  animation: consent-in .25s ease;
}
@keyframes consent-in { from { transform: translateY(16px); opacity: 0; } }
.consent-banner[hidden] { display: none; }
.consent-banner-inner { display: flex; gap: 24px; align-items: center; padding: 20px 24px; }
.consent-banner h2 { font-size: 1.15rem; margin: 0 0 .3em; }
.consent-banner p { margin: 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex: none; }
.consent-banner .consent-actions { flex-direction: column; align-items: stretch; min-width: 210px; }
/* «Nur notwendige» und «Alle akzeptieren» bewusst gleichwertig gestaltet */
.consent-btn {
  font: inherit; font-weight: 600; font-size: .95rem; padding: 11px 20px; border-radius: 999px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink); border: 2px solid var(--btn-bg); transition: background .15s, border-color .15s;
}
.consent-btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.consent-link { font: inherit; font-size: .9rem; background: none; border: 0; padding: 4px; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
body.has-consent-banner { padding-bottom: 180px; }
@media (max-width: 760px) {
  .consent-banner { left: 8px; right: 8px; bottom: 8px; max-height: calc(100vh - 16px); overflow-y: auto; }
  .consent-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .consent-banner .consent-actions { min-width: 0; }
  body.has-consent-banner { padding-bottom: 340px; }
}

.consent-dialog {
  width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}
.consent-dialog::backdrop { background: rgba(5, 8, 32, .55); }
.consent-dialog form { padding: 22px 24px 20px; }
.consent-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.consent-dialog h2 { font-size: 1.4rem; margin: 0; }
.consent-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; position: relative; flex: none; }
.consent-close::before, .consent-close::after { content: ""; position: absolute; left: 11px; top: 18px; width: 14px; height: 2px; background: var(--ink); transform: rotate(45deg); }
.consent-close::after { transform: rotate(-45deg); }
.consent-intro { font-size: .92rem; color: var(--ink-soft); }
.consent-cat { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0 0 10px; }
.consent-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.consent-cat h3 { margin: 0; font-size: 1.08rem; }
.consent-cat p { margin: 6px 0 4px; font-size: .9rem; color: var(--ink-soft); }
.consent-cat details { font-size: .85rem; color: var(--ink-soft); }
.consent-cat summary { cursor: pointer; color: var(--link); }
.consent-cat ul { margin: 6px 0 0; padding-left: 1.2em; }
.consent-switch { position: relative; display: inline-flex; cursor: pointer; }
.consent-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.consent-switch-track { width: 44px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .15s; }
.consent-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.consent-switch input:checked + .consent-switch-track { background: var(--btn-bg); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(20px); }
.consent-switch input:disabled + .consent-switch-track { opacity: .55; cursor: not-allowed; }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent-dialog-actions { justify-content: flex-end; margin-top: 16px; }
@media (max-width: 560px) { .consent-dialog-actions .consent-btn { flex: 1 1 100%; } }

/* Platzhalter für eingebettete Videos */
.embed-consent { position: relative; margin: 1.5em 0; }
.embed-consent iframe { display: block; }
.embed-consent:not(.is-allowed) iframe { visibility: hidden; }
.embed-consent-note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center; background: var(--paper-2); border: 1px dashed var(--line); border-radius: var(--radius);
}
.embed-consent-note p { margin: 0; font-size: .95rem; max-width: 46ch; }
.embed-consent.is-allowed .embed-consent-note { display: none; }
.prose .embed-consent iframe { margin: 0; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { font-weight: 600; text-decoration: none; }

/* ---------- Fusszeile */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); border-top: 4px solid var(--sky); padding: 56px 0 24px; font-size: .96rem; }
.site-footer h2 { font-size: 1.1rem; color: #fff; margin-bottom: .8em; }
.site-footer a { color: var(--footer-link); }
.site-footer .muted { color: var(--footer-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .88rem; color: var(--footer-muted); }
.footer-bottom a { color: var(--footer-muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .site-header, .site-footer, .subnav, .hero-actions { display: none; }
  body { background: #fff; }
}
