:root {
  --tc-blue: #0044aa;
  --transition: 800ms cubic-bezier(.2,.8,.2,1);
  --frost-alpha: 0.30;
  --frost-blur: 5.5px;
  --header-h: 182px;   /* stabiler Start-Default, wird nach Logo-Messung aktualisiert */
  --content-gap: 8px;
}

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--tc-blue);
  background:#fff; text-align: center;
}

b, strong { font-weight: 700; font-size: inherit; line-height: inherit; font-family: inherit; }
.highlighted-title { font-size: 28px; line-height: 1.3; }

/* 0: Hintergrundvideo – fix hinter allem, aber klick-/stacking-sicher */
.video-bg{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;                 /* bleibt ganz hinten */
  pointer-events: none;       /* nimmt keine Klicks weg */
  transition: opacity var(--transition);

  /* Chrome-Spezifika: niemals versehentlich neuen Stacking-Context eröffnen */
  transform: none !important;
  filter: none !important;
}

/* 1: Milchiger Schleier (baut sich normal auf) */
.video-frost{
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(255,255,255,var(--frost-alpha));
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity var(--transition), backdrop-filter var(--transition);
}

/* 2: Weiß-Überblendung unter dem Logo (für Übergang) */
.white-fade{
  position: fixed; inset: 0; background:#ffffff;
  opacity: 0; pointer-events: none; z-index: 2;
  transition: opacity var(--transition);
}
.white-fade.show{ opacity: 1; }

/* 2.5: Weiße Header-Leiste (sichtbar nach Video) */
.logo-bar{
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: #ffffff;
  z-index: 4; /* hinter Logo (5), vor Content (3) */
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
}
.at-top .logo-bar{ opacity: 1; transform: translateY(0); pointer-events: auto; }

/* 5: Logo – zuerst mittig groß, später oben kleiner */
.logo-wrap{
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: top var(--transition), transform var(--transition), width var(--transition), opacity var(--transition);
  width: min(360px, 70vw);
  opacity: 0; /* wird via JS eingeblendet */
  will-change: transform, top, width, opacity;
}
.logo-wrap.pop{
  transform: translate(-50%, -50%) scale(1.25);
  transition: transform 450ms cubic-bezier(.2,.8,.2,1), top var(--transition), width var(--transition), opacity var(--transition);
}
.logo-wrap .logo{ display: block; width: 100%; height: auto; transition: filter 300ms ease; }
.logo-wrap.pop .logo{
  filter: drop-shadow(0 0 0 rgba(255,255,255,0.95))
          drop-shadow(0 0 1.2px rgba(255,255,255,0.9))
          drop-shadow(0 0 2.4px rgba(255,255,255,0.6));
}

/* Endzustand: Logo oben */
.at-top .logo-wrap{
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: translate(-50%, 0) scale(1);
  width: min(180px, 36vw);
  opacity: 1;
}

/* 3: Content */
.wrap{
  position: relative; min-height: 10vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 16px; padding: 24px 24px 24px;
  z-index: 3; opacity: 0; transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), padding-top var(--transition);
}
.at-top .wrap{
  padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px));
}
.content-show .wrap{ opacity: 1; transform: translateY(0); }

p { font-size: 1.2em; line-height: 1.5; margin: 0; }

/* Thumbstreifen */
.thumbstrip{
  max-width: 1160px;
  margin: 12px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.thumbstrip img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
@media (max-width: 900px){ .thumbstrip{ grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px){
  .thumbstrip{ display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scroll-snap-type: x mandatory; padding: 8px 12px; }
  .thumbstrip img{ flex: 0 0 32vw; max-width: none; aspect-ratio: 4 / 3; scroll-snap-align: start; }
}

/* Sponsoren */
.partnersponsor-title {
  text-align: center;
  font-size: 2.5em;
  margin-top: 50px;
  margin-bottom: 50px;
}

.partnerlogo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 80px;
  padding: 30px 0;
}
.partnerlogo img {
  max-width: 300px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Titel-Absatz größer */
.wrap > p > b {
  font-size: 2.0em;
  line-height: 1.3;
  display: block;
  font-weight: bold;
}
@media (max-width: 992px) {
  .wrap > p > b { font-size: 1.8em; }
}
@media (max-width: 600px) {
  .wrap > p > b { font-size: 1.5em; }
}

/* Mobile-Tuning */
@media (max-width: 600px){
  :root { --header-h: 132px; }
  .wrap{ padding-left:16px; padding-right:16px; }
}
@media (max-width: 480px){
  .logo-wrap{ width: min(300px, 80vw); }
  .at-top .logo-wrap{ width: min(160px, 50vw); }
  p { font-size: 1.05em; }
}

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce){
  .video-bg{ display:none; }
  .video-frost{ display:none; }
  .white-fade{ opacity:1; display:none; }
  .logo-bar{ opacity:1; transform:none; }
  .logo-wrap{ opacity:1; top:24px; transform: translate(-50%,0) scale(1); width: min(180px,36vw); }
  .wrap{ opacity:1; transform:none; padding-top: calc(var(--header-h) + 24px); }
}

/* ===== Footer ===== */
.site-footer{
  position: relative; z-index: 3; width: 100%;
  background: var(--tc-blue); color: #fff; text-align: left; min-height: 150px; font-size: .95em;
  margin-top: 24px; box-shadow: 0 -6px 18px rgba(0,0,0,.06);
}
.site-footer .footer-inner{
  max-width: 1160px; margin: 0 auto;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom,0px));
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: start;
}
.site-footer h4{ margin: 0 0 8px; font-size: 1em; letter-spacing: .3px; text-transform: uppercase; }
.site-footer p{ margin: 0 0 8px; }
.site-footer ul{ list-style: none; margin: 0; padding: 0; }
.site-footer li + li{ margin-top: 6px; }
.site-footer a{ color:#fff; text-decoration:none; opacity:.95; }
.site-footer a:hover{ text-decoration: underline; opacity:1; }
.site-footer .footnote{ grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.25); padding-top: 10px; text-align: center; opacity: .9; margin-top: 4px; }
@media (max-width: 900px){ .site-footer .footer-inner{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .site-footer .footer-inner{ grid-template-columns: 1fr; } }
.site-footer{ display: none; }
.content-show .site-footer{ display: block; }

/* ===== Accordion ===== */
.accordion { width: min(1160px, 92vw); margin: 8px auto 0; text-align: left; }
.accordion details {
  background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.06); overflow: clip;
}
.accordion details + details { margin-top: 10px; }
.accordion summary {
  list-style: none; padding: 14px 18px; cursor: pointer; font-weight: 700; color: var(--tc-blue);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; user-select: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 250ms ease; opacity: .85;
}
.accordion details[open] summary::after { transform: rotate(225deg); }
.accordion summary:hover { background: rgba(0,0,0,.03); }
.accordion summary:focus-visible { outline: 3px solid rgba(0,68,170,.25); outline-offset: 2px; border-radius: 10px; }
.accordion .panel { padding: 2px 18px 18px; animation: fadeIn 220ms ease both; }
@keyframes fadeIn { from { opacity: 0; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
.accordion .panel p { margin: 8px 0 0; font-size: 1.05em; line-height: 1.55; }
.accordion .panel a { color: var(--tc-blue); }
:root { scroll-padding-top: calc(var(--header-h) + 16px); }

/* Größere Titel im Accordion */
.accordion summary { font-size: 1.20em; line-height: 1.3; padding: 16px 20px; }
.accordion summary::after { width: 12px; height: 12px; border-right-width: 2.5px; border-bottom-width: 2.5px; }


/* === Mobil / Touch: Intro-Video NICHT anzeigen === */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {

  /* Video + Overlays komplett deaktivieren */
  .video-bg { display: none !important; }
  .video-frost { display: none !important; }
  .white-fade { opacity: 0 !important; display: none !important; }

  /* Logo sofort oben anzeigen */
  .logo-bar {
    opacity: 1 !important;
    transform: none !important;
  }

  #logoWrap {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    transform: translate(-50%, 0) scale(1) !important;
    width: min(180px, 36vw) !important;
    opacity: 1 !important;
  }

  /* Content sofort sichtbar (keine Intro-Animation) */
  .wrap {
    opacity: 1 !important;
    transform: none !important;
    padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) !important;
  }
}

/* ===== Skip-Fall mobil/Touch erzwingen ===== */
/* Video & Overlays aus */
html.skip-intro .video-bg { display: none !important; }
html.skip-intro .video-frost { display: none !important; }
html.skip-intro .white-fade { opacity: 0 !important; display: none !important; }

/* Logo sofort oben sichtbar */
html.skip-intro .logo-bar { opacity: 1 !important; transform: none !important; }
html.skip-intro #logoWrap {
  top: calc(12px + env(safe-area-inset-top, 0px)) !important;
  transform: translate(-50%, 0) scale(1) !important;
  width: min(180px, 36vw) !important;
  opacity: 1 !important;
}

/* Content sofort sichtbar */
html.skip-intro .wrap {
  opacity: 1 !important;
  transform: none !important;
  padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) !important;
}

/* ===== Skip-Fall: sofort Endzustand, kein Video, keine Übergänge ===== */
html.skip-intro .video-bg { display: none !important; }
html.skip-intro .white-fade { opacity: 0 !important; }
html.skip-intro .logo-bar { opacity: 1 !important; transform: none !important; }
html.skip-intro #logoWrap {
  top: calc(12px + env(safe-area-inset-top, 0px)) !important;
  transform: translate(-50%, 0) scale(1) !important;
  width: min(180px, 36vw) !important;
  opacity: 1 !important;
}

/* Content-Bilder nie Vollbild-Position/Größe erben */
.wrap img{
  position: static !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
}

/* Safety: auch speziell für die Thumb-Leiste */
.thumbstrip img{
  position: static !important;
  height: auto !important;
}

html.skip-intro .wrap {
  opacity: 1 !important;
  transform: none !important;
  padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) !important;
}
html.skip-intro * { animation: none !important; transition: none !important; }

/* --- HARTE MOBILE-NOTBREMSE: Intro komplett aus, Layout in Endzustand --- */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .video-bg,
  .video-frost,
  .white-fade { display: none !important; opacity: 0 !important; }

  .logo-bar { opacity: 1 !important; transform: none !important; }
  #logoWrap {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    transform: translate(-50%, 0) scale(1) !important;
    width: min(180px, 36vw) !important;
    opacity: 1 !important;
  }

  .wrap {
    opacity: 1 !important;
    transform: none !important;
    padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) !important;
  }
}

/* Safety: Content-Bilder dürfen NIE Hero-Styles erben */
.wrap img,
.thumbstrip img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
}


/* 1) HARTE MOBILE-NOTBREMSE: Intro + obere Galerie aus */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* Intro komplett aus */
  .video-bg,
  .video-frost,
  .white-fade { display: none !important; opacity: 0 !important; }

  /* Logo sofort oben */
  .logo-bar { opacity: 1 !important; transform: none !important; }

/* Logo auf Mobil wirklich zentrieren */
#logoWrap {
    position: fixed !important;
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    left: 50% !important;               /* horizontaler Referenzpunkt */
    transform: translateX(-50%) !important;  /* exakte Zentrierung */
    width: min(200px, 48vw) !important;
    opacity: 1 !important;
    z-index: 10 !important;
}
  
  #logoWrap .logo { display: block; margin: 0 auto; height: auto; }

  /* Content sofort sichtbar & korrekt eingerückt */
  .wrap {
    opacity: 1 !important;
    transform: none !important;
    padding-top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) !important;
  }

  /* Obere Galerie (Thumb-Leiste) mobil AUSBLENDEN */
  .thumbstrip { display: none !important; }
}

/* 2) Logo-Zentrierung: Desktop bleibt wie gehabt */
@media (min-width: 901px) {
  #logoWrap {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, 0) !important;
  }
}

/* 3) Content-Bilder dürfen NIE Vollbild-/Position erben */
.wrap img,
.thumbstrip img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
}

/* 4) Kein horizontales Überlaufen (verschiebt sonst das Logo scheinbar nach rechts) */
html, body { overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }

/* === Logo auf Mobil mittig UND sicher innerhalb der weißen Logo-Bar halten === */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* Wrapper: nur horizontal zentrieren, keine feste Breite */
  #logoWrap {
    position: fixed !important;
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;          /* ← WICHTIG: keine feste/min-Breite mehr */
  }

  /* Bildgröße an die Balkenhöhe anpassen */
  #logoWrap .logo {
    display: block;
    height: calc(var(--header-h) - 24px) !important;  /* 12px Luft oben/unten */
    width: auto !important;                            /* Seitenverhältnis bleibt */
    max-width: calc(100vw - 24px) !important;          /* nicht über Bildschirmrand */
  }
}

@media (max-width:900px), (hover:none) and (pointer:coarse) {
  .video-bg,
  .video-frost,
  .white-fade { display:none !important; opacity:0 !important; }
}

/* Social-Icons NICHT skalieren */
.wrap img.social-icon {
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;   /* falls Eltern Flex-Layout hat */
  display: inline-block;       /* hübsch neben Text */
}

:root{
  --tc-blue:#0044aa;
  --tc-gap: 14px;
  --tc-radius: 14px;
  --tc-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.tc-gallery{max-width: 1160px;margin:40px auto;padding:0 16px;color:var(--tc-blue)}
.tc-gallery-title{font-size:1.6rem;margin:0 0 12px;font-weight:700}
.tc-gallery-stage{
  position:relative; display:grid; place-items:center;
  aspect-ratio:16/9; background:#f6f8fb; border-radius:var(--tc-radius);
  box-shadow:var(--tc-shadow); overflow:hidden;
}
.tc-gal-figure{margin:0;width:100%;height:100%;display:grid;place-items:center}
.tc-gal-image{
  max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain;
  user-select:none; -webkit-user-drag:none; transition:transform .25s ease;
}
.tc-gal-caption{position:absolute;left:0;right:0;bottom:0;
  font-size:.95rem;line-height:1.3;background:linear-gradient(180deg,transparent,rgba(0,0,0,.55));
  color:#fff;padding:18px 16px; text-shadow:0 1px 2px rgba(0,0,0,.4)
}
.tc-gal-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px;height:44px;border-radius:999px;border:0;background:#fff;
  box-shadow:var(--tc-shadow); font-size:28px; line-height:1; cursor:pointer;
}
.tc-gal-btn:hover{filter:brightness(0.98)}
.tc-gal-btn:active{transform:translateY(-50%) scale(.98)}
.tc-gal-btn.prev{left:10px} .tc-gal-btn.next{right:10px}

.tc-thumbs{display:flex; gap:var(--tc-gap); flex-wrap:wrap; margin:14px 0 0}
.tc-thumb{
  border:2px solid transparent;border-radius:10px; padding:0; background:transparent; cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.08); overflow:hidden;
}
.tc-thumb img{display:block;width:96px;height:64px;object-fit:cover}
.tc-thumb[aria-selected="true"]{border-color:var(--tc-blue)}
.tc-thumb:focus-visible{outline:2px solid var(--tc-blue); outline-offset:2px}

@media (hover:hover){
  .tc-thumb:hover img{transform:scale(1.03); transition:transform .18s ease}
}

@media (max-width:680px){
  .tc-gallery-title{font-size:1.25rem}
  .tc-gal-btn{width:40px;height:40px;font-size:24px}
  .tc-thumb img{width:78px;height:52px}
}

/* reduzierte Bewegungen respektieren */
@media (prefers-reduced-motion: reduce){
  .tc-gal-image{transition:none}
}

:root{--tc-blue:#0044aa;--tc-gap:14px;--tc-radius:14px;--tc-shadow:0 6px 16px rgba(0,0,0,.12)}
.tc-gallery{max-width:1160px;margin:40px auto;padding:0 16px;color:var(--tc-blue)}
.tc-gallery-stage{position:relative;display:grid;place-items:center;aspect-ratio:16/9;background:#f6f8fb;border-radius:var(--tc-radius);box-shadow:var(--tc-shadow);overflow:hidden}
.tc-gal-figure{margin:0;width:100%;height:100%;display:grid;place-items:center}
.tc-gal-image{max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;transition:transform .25s ease}
.tc-gal-caption{position:absolute;left:0;right:0;bottom:0;font-size:.95rem;line-height:1.3;background:linear-gradient(180deg,transparent,rgba(0,0,0,.55));color:#fff;padding:18px 16px}
.tc-gal-btn{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:999px;border:0;background:#fff;box-shadow:var(--tc-shadow);font-size:28px;cursor:pointer}
.tc-gal-btn.prev{left:10px}.tc-gal-btn.next{right:10px}
.tc-thumbs{display:flex;gap:var(--tc-gap);flex-wrap:wrap;margin-top:14px}
.tc-thumb{border:2px solid transparent;border-radius:10px;box-shadow:0 2px 8px rgba(0,0,0,.08);background:transparent;overflow:hidden;cursor:pointer}
.tc-thumb img{display:block;width:96px;height:64px;object-fit:cover}
.tc-thumb[aria-selected="true"]{border-color:var(--tc-blue)}
@media (max-width:680px){.tc-thumb img{width:78px;height:52px}}
.tc-gal-btn{ z-index: 2; }      /* Buttons über dem Bild */
.tc-gal-figure{ z-index: 1; }   /* (optional) Bild-Ebene darunter */


/* --- Gallery Overrides gegen globale img-Regeln --- */
.tc-gallery .tc-thumbs { 
  display:flex !important; 
  flex-wrap:wrap; 
  gap:14px;
  margin-top:14px;
}

.tc-gallery .tc-thumb{
  padding:0; 
  margin:0;
  border:2px solid transparent; 
  border-radius:10px; 
  background:transparent; 
  overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}

/* Thumbnails wirklich klein halten – überstimmt img{width:100%} */
.tc-gallery .tc-thumbs .tc-thumb img{
  width:96px !important;
  height:64px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover;
  display:block;
}

@media (max-width:680px){
/* ---------- Mobile-Optimierung der Galerie ---------- */
@media (max-width: 680px) {

  /* Stage und Layout leicht anpassen */
  .tc-gallery-stage {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }

  /* Pfeile etwas kleiner */
  .tc-gal-btn {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  /* ----- Mobile-optimierte, wischbare Thumbnails ----- */
  .tc-thumbs {
    display: flex;
    flex-wrap: nowrap;             /* keine Umbrüche */
    overflow-x: auto;              /* horizontales Scrollen aktivieren */
    scroll-snap-type: x mandatory; /* Snap-Effekt beim Wischen */
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch; /* sanftes Wischen auf iOS */
  }

  .tc-thumbs::-webkit-scrollbar {
    display: none; /* Scrollbalken ausblenden */
  }

  .tc-thumb {
    flex: 0 0 auto;                /* fixe Breite */
    scroll-snap-align: start;      /* Snap an jedem Thumbnail */
  }

  .tc-thumb img {
    width: 74px !important;
    height: 50px !important;
    border-radius: 6px;
    object-fit: cover;
  }

  /* Bildunterschrift kleiner und gut lesbar */
  .tc-gal-caption {
    font-size: 0.8rem;
    padding: 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
  }
}

/* ===== Logo-Größen & Headerhöhe anpassen ===== */
:root{
  --logo-final-h: 84px;   /* Zielgröße wie auf Impressum/Datenschutz (anpassen) */
  --header-h:     120px;  /* Höhe der weißen Leiste hinter dem Logo */
}

/* Logo initial groß, mittig über dem Video */
.logo-wrap{
  position: fixed;
  inset: 0;                          /* oben/rechts/unten/links = 0 */
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 5;                        /* über Frost/Video */
}
.logo{
  max-height: 180px;                 /* Startgröße im Intro (anpassen) */
  width: auto;
  transition: max-height .35s ease, transform .45s ease, top .45s ease, left .45s ease;
}

/* Weiße Leiste hinter dem Logo (zunächst unsichtbar) */
.logo-bar{
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 4;
}

/* ===== Zustand NACH dem Video: kleiner & oben zentriert ===== */
body.intro-done .logo{
  max-height: var(--logo-final-h);   /* Zielgröße */
}

body.intro-done .logo-wrap{
  position: fixed;                   /* bleibt oben fixiert */
  top: calc(env(safe-area-inset-top, 0px) + 0px);
  left: 50%;
  transform: translateX(-50%);       /* horizontal zentrieren */
  height: var(--header-h);
  align-items: center;
}

body.intro-done .logo-bar{
  opacity: 1;                        /* Leiste einblenden */
}

/* Optional: auf kleinen Screens Logo etwas kleiner */
@media (max-width: 680px){
  :root{ --logo-final-h: 72px; --header-h: 100px; }
  .logo{ max-height: 150px; }
}

/* === Finale Logo-Größe/Position NACH dem Intro erzwingen === */
body.intro-done .logo {
  max-height: 84px !important;  /* Zielhöhe anpassen */
  width: auto !important;
}

body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 0px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 120px !important;     /* Header-Höhe nach Wunsch */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

body.intro-done .logo-bar {
  opacity: 1 !important;
}

/* Erzwinge die kleine Logovariante nach dem Intro */
body.intro-done .logo {
  max-height: 84px !important;  /* Wunschgröße anpassen */
  width: auto !important;
  height: auto !important;
  display: block;
}

/* zentriert oben halten */
body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 120px !important;     /* Höhe der weißen Leiste anpassen */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

body.intro-done .logo-bar { opacity: 1 !important; }

/* Finale, proportionale Logogröße nach dem Intro erzwingen */
body.intro-done .logo {
  max-height: 84px !important;  /* Zielhöhe anpassen */
  height: auto !important;
  width: auto !important;        /* überstimmt img{width:100%} */
  max-width: none !important;    /* falls irgendwo max-width:100% gesetzt ist */
  object-fit: contain;           /* schadet nicht, falls Breite begrenzt wird */
  display: block;
}

/* Zentriert oben halten */
body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 120px !important;      /* Höhe der weißen Leiste */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

body.intro-done .logo-bar { opacity: 1 !important; }

/* ===== Finale, proportionale Logo-Größe NACH dem Intro erzwingen ===== */
body.intro-done .logo-wrap img.logo {
  /* Proportionen sichern */
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;

  /* Zielgröße (nur Höhe begrenzen) */
  max-height: 84px !important;     /* <- ggf. anpassen */
  max-width: none !important;

  /* Sonstiges, falls global überschrieben wird */
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Logo oben fix zentriert halten */
body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 120px !important;        /* Höhe der weißen Leiste */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

body.intro-done .logo-bar { opacity: 1 !important; }

/* ===== Finale Logo-Höhe & zentrierte Position, wenn Logo oben stehen soll ===== */
/* Gilt sowohl für den vorhandenen Zustand .at-top als auch für .intro-done */
.at-top .logo-wrap img.logo,
body.intro-done .logo-wrap img.logo {
  /* Proportionen bewahren */
  width: auto !important;
  height: auto !important;
  max-width: none !important;

  /* Zielgröße NUR über die Höhe begrenzen */
  max-height: 84px !important;   /* ← bei Bedarf anpassen */

  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Logo oben zentriert „parken“ und eine definierte Header-Höhe setzen */
.at-top .logo-wrap,
body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: var(--header-h, 120px) !important;
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

/* Weiße Leiste sichtbar lassen */
.at-top .logo-bar,
body.intro-done .logo-bar {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Falls deine Seitenleistenhöhe variabel ist, hier für den "oben"-Zustand definieren */
.at-top,
body.intro-done {
  --header-h: 120px;  /* bei Bedarf angleichen (Datenschutz/Impressum-Maß) */
}

/* --- Logo oben klein & proportional halten, auch wenn frühere Regeln skalieren --- */
.at-top .logo-wrap img.logo,
body.intro-done .logo-wrap img.logo {
  /* Proportionen */
  width: auto !important;
  height: auto !important;
  max-height: 84px !important;   /* Zielgröße anpassen */
  max-width: none !important;
  object-fit: contain !important;

  /* Skalen/Animationen neutralisieren */
  transform: none !important;         /* falls irgendwo scale() aktiv war */
}

/* Container oben zentriert, ohne zusätzliche Skalierung/Versatz */
.at-top .logo-wrap,
body.intro-done .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;  /* nur horizontal zentrieren */
  height: 120px !important;                /* ggf. wie auf Impressum/Datenschutz anpassen */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

/* Leiste sichtbar */
.at-top .logo-bar,
body.intro-done .logo-bar {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Falls du irgendwo height:100% fürs Logo gesetzt hattest: ausdrücklich ausschalten */
.at-top .logo,
body.intro-done .logo {
  height: auto !important;   /* überschreibt evtl. height:100% */
  width: auto !important;    /* überschreibt evtl. width:100% */
}
}

/* Proportional kleine Logo-Endgröße im "oben"-Zustand */
.at-top .logo-wrap img.logo {
  width: auto !important;
  height: auto !important;
  max-height: 84px !important;   /* Zielhöhe anpassen */
  max-width: none !important;
  object-fit: contain !important;
  transform: none !important;     /* neutralisiert evtl. scale() */
}

/* Zentriert oben parken */
.at-top .logo-wrap {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 120px !important;       /* Leistenhöhe nach Wunsch */
  display: grid !important;
  place-items: center !important;
  z-index: 5 !important;
}

/* Leiste sichtbar */
.at-top .logo-bar { opacity: 1 !important; transform: translateY(0) !important; }

/* ===== Höhe des weißen Balkens oben reduzieren ===== */
/* Zielhöhe global für den "Logo-oben"-Zustand */
.at-top, body.intro-done {
  --header-h: 90px; /* <— Wunschhöhe hier einstellen (z. B. 90) */
}

/* Balken nutzt bereits var(--header-h); sorge dafür, dass auch das Logo-Wrapper
   exakt diese Höhe hat (wir ersetzen frühere Fixwerte wie 120px). */
.at-top .logo-wrap,
body.intro-done .logo-wrap {
  height: var(--header-h) !important;
}

/* Kleines, proportionales Logo (falls noch nicht gesetzt) */
.at-top .logo-wrap img.logo,
body.intro-done .logo-wrap img.logo {
  max-height: 72px !important;   /* <— Logo-Höhe passend zum Balken; gern anpassen */
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Optional: mobil noch etwas kompakter */
@media (max-width: 680px){
  .at-top, body.intro-done { --header-h: 82px; }
  .at-top .logo-wrap img.logo,
  body.intro-done .logo-wrap img.logo { max-height: 64px !important; }
}

.content-narrow{
  max-width:800px !important;
  margin:0 auto !important;
  padding:0 1rem;
  box-sizing:border-box;
}

body .content-narrow,
main .content-narrow,
section .content-narrow{
  width:100% !important;
  max-width:800px !important;
  margin:0 auto !important;
  padding:0 1rem;
  box-sizing:border-box;
}