/* =========================================================================
   Kino-Weltkarte — Shell (globale Navigation + Cookie-Consent)
   Wird von js/shell.js in <header id="site-nav"> gerendert.
   Nutzt die Brand-Variablen aus css/style.css (:root).

   Zwei Stimmungen, EINE Sprache:
   - hell (Default): translucenter Lavendel-Blur — wie der bisherige index-Header
   - dunkel (body[data-theme="dark"], Zeitreise): Aubergine-Glas, helle Typo

   Kontraste (WCAG-AA, verifiziert):
   HELL gegen Lavendel-Glas ≈ #ede2f6 (Blur über Beige ist nie dunkler):
     Text Aubergine #2e1a33 / #ede2f6      = 12.8:1 (AA-PASS, Titel)
     Muted #6b4a5e / #ede2f6               =  6.1:1 (AA-PASS, inaktive Links)
     Lila-dunkel #59226c / #ede2f6         =  9.0:1 (AA-PASS, aktiver Link/Umschalter)
     Weiss / Zeitreise-Gradient #a01a5c→#59226c = 7.5–11.2:1 (AA-PASS)
   DUNKEL gegen Aubergine-Glas ≈ #1d1024:
     Ink-dim #c9a8bd / #1d1024             =  8.6:1 (AA-PASS, inaktive Links)
     Weiss #ffffff / #1d1024               = 17.6:1 (AA-PASS, Titel/aktiv)
     Gold #e8b34b / #1d1024                = 10.1:1 (AA-PASS, Akzente)
   Consent-Banner: weiss auf Lila-dunkel #59226c = 9.6:1 (AA-PASS, Buttons)
   ========================================================================= */

/* CLS-Fix (SEO-Audit): Die Nav wird per JS in #site-nav gerendert — ohne
   reservierte Höhe schiebt sie nach dem Laden die ganze Seite nach unten. */
#site-nav { min-height: 74px; }

/* ===================== LEISTE ===================== */
.shell {
  /* Variante A „Schwebende Pille" (Maximes Wahl 11.06.): Die Navigation
     löst sich vom Seitenrand und schwebt als voll abgerundete Glas-Pille
     über dem Inhalt. Kontrast Text Aubergine auf Fast-Weiß: >12:1 (AA). */
  position: sticky; top: 10px; z-index: 60;
  margin: 10px auto 0;
  max-width: min(1352px, calc(100% - 24px));
  border-radius: 999px;
  background: rgba(255, 250, 247, .85);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid rgba(46, 26, 51, .08);
  box-shadow: 0 1px 2px rgba(46, 26, 51, .06), 0 12px 32px rgba(46, 26, 51, .12);
}
.shell-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 8px 14px 8px 22px;   /* Pille: links etwas mehr Luft zur Rundung */
  display: flex; align-items: center; gap: 18px;
}

/* Brand: Stern (Easter-Egg: halten → Logo) + Titel (Link zur Startseite) */
.shell-brand { display: flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; }
.shell-star {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%,
    rgba(216, 49, 138, .20), rgba(158, 63, 224, .12) 58%, transparent 74%);
  border: 0; border-radius: 50%; padding: 0; margin: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.shell-star img {
  width: 34px; height: 34px; display: block; grid-area: 1 / 1; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(216, 49, 138, .35));
}
.shell-star .bs-logo { display: none; width: 40px; height: 40px; }
.shell-star.is-pressed .bs-star { display: none; }
.shell-star.is-pressed .bs-logo { display: block; }
.shell-title {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  font-size: 21px; line-height: 1.1; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shell-title a { color: var(--text); text-decoration: none; }
.shell-title a:hover { color: var(--lila-dark); text-decoration: none; }

/* Hauptnavigation: Underline-Links (wie die bisherigen index-Tabs) */
.shell-nav { display: flex; align-items: center; gap: 2px; }
.shell-link {
  font-size: 15px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; padding: 9px 13px 13px;
  position: relative; border-radius: 8px; white-space: nowrap;
}
.shell-link::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 5px;
  height: 3px; border-radius: 2px; background: transparent;
}
.shell-link.is-active { color: var(--lila-dark); }
.shell-link.is-active::after { background: linear-gradient(90deg, var(--pink), var(--lila)); }
.shell-link:hover:not(.is-active) { color: var(--text); background: rgba(89, 34, 108, .07); text-decoration: none; }

/* Zeitreise: glühende Gradient-Pille (Tor zur dunklen Story-Seite) */
.shell-history {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 8px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #a01a5c, #59226c);
  box-shadow: 0 0 14px rgba(216, 49, 138, .38);
  transition: box-shadow .18s ease, transform .18s ease;
}
.shell-history:hover {
  color: #fff; text-decoration: none;
  box-shadow: 0 0 22px rgba(158, 63, 224, .6);
  transform: translateY(-1px);
}
.shell-history.is-active { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(216, 49, 138, .55); }
.shell-history .th-spark { font-size: 13px; line-height: 1; }

/* Caret der Dropdown-Buttons */
.shell-caret { font-size: 9px; line-height: 1; }

/* „Mehr“-Dropdown */
.shell-more { position: relative; margin-left: 6px; }
.shell-more-btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--text-muted);
  border: 0; border-radius: 8px; padding: 9px 12px;
}
.shell-more-btn:hover, .shell-more-btn[aria-expanded="true"] { color: var(--text); background: rgba(89, 34, 108, .07); }
.shell-more-btn.has-current { color: var(--lila-dark); }
/* Sichtbarkeit via .is-open am Wrapper (nicht [hidden] — zelle.html erzwingt
   [hidden]{display:none !important}; im Mobile-Sheet ist die Liste immer offen) */
.shell-more-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 80;
  margin: 0; padding: 6px; list-style: none; min-width: 196px;
  background: var(--base); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(46, 26, 51, .18);
}
.shell-more.is-open .shell-more-menu { display: block; }
.shell-more-menu a {
  display: block; font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text); border-radius: 8px; padding: 8px 11px;
}
.shell-more-menu a:hover { background: var(--primary-light); color: var(--lila-dark); text-decoration: none; }
.shell-more-menu a.is-active { color: var(--lila-dark); background: var(--primary-light); }
.shell-more-sep { height: 1px; margin: 5px 8px; background: var(--line); }

/* Sprach-Dropdown („DE ▾“ — Mechanik in shell.js, setLang aus i18n.js) */
.shell-lang { position: relative; flex: none; }
.shell-lang-btn {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .55); color: var(--lila-dark);
  border: 1px solid rgba(89, 34, 108, .25); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.shell-lang-btn:hover, .shell-lang-btn[aria-expanded="true"] { background: #fff; border-color: var(--lila-dark); }
.shell-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 80;
  margin: 0; padding: 6px; list-style: none; min-width: 172px;
  background: var(--base); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(46, 26, 51, .18);
}
.shell-lang-menu[hidden] { display: none; }
.shell-lang-menu .lang-btn {
  width: 100%; display: flex; align-items: center; gap: 9px;
  font: inherit; font-size: 14px; font-weight: 600; text-align: left;
  background: transparent; color: var(--text);
  border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.shell-lang-menu .lang-btn:hover { background: var(--primary-light); }
.shell-lang-menu .lm-flag { font-size: 15px; line-height: 1; }
.shell-lang-menu .lm-code {
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: var(--text-muted); min-width: 21px;
}
.shell-lang-menu .lang-btn.is-active { color: var(--lila-dark); background: var(--primary-light); }
.shell-lang-menu .lang-btn.is-active::after {
  content: "✓"; margin-left: auto; font-weight: 700; color: var(--pink-text);
}

/* Burger — erst auf schmalen Screens sichtbar */
.shell-burger {
  display: none; flex: none; cursor: pointer;
  width: 42px; height: 42px; padding: 0;
  background: rgba(255, 255, 255, .55); color: var(--lila-dark);
  border: 1px solid rgba(89, 34, 108, .25); border-radius: 10px;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.shell-burger .sb-bar {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .18s ease, opacity .18s ease;
}
.shell.is-open .shell-burger .sb-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.shell.is-open .shell-burger .sb-bar:nth-child(2) { opacity: 0; }
.shell.is-open .shell-burger .sb-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===================== DUNKLE VARIANTE (Zeitreise) ===================== */
body[data-theme="dark"] .shell {
  background: rgba(29, 16, 36, .82);                /* Aubergine-Glas-Pille */
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .45);
}
body[data-theme="dark"] .shell-title a { color: #f5e9ee; }
body[data-theme="dark"] .shell-title a:hover { color: #fff; }
body[data-theme="dark"] .shell-link { color: #c9a8bd; }
body[data-theme="dark"] .shell-link.is-active { color: #fff; }
body[data-theme="dark"] .shell-link:hover:not(.is-active) { color: #fff; background: rgba(255, 255, 255, .08); }
body[data-theme="dark"] .shell-more-btn { color: #c9a8bd; }
body[data-theme="dark"] .shell-more-btn:hover,
body[data-theme="dark"] .shell-more-btn[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .08); }
body[data-theme="dark"] .shell-more-btn.has-current { color: #fff; }
body[data-theme="dark"] .shell-lang-btn {
  background: rgba(255, 255, 255, .08); color: #f5e9ee;
  border-color: rgba(255, 255, 255, .25);
}
body[data-theme="dark"] .shell-lang-btn:hover,
body[data-theme="dark"] .shell-lang-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); border-color: #fff; }
body[data-theme="dark"] .shell-burger {
  background: rgba(255, 255, 255, .08); color: #f5e9ee;
  border-color: rgba(255, 255, 255, .25);
}
body[data-theme="dark"] .shell :focus-visible { outline-color: #e8b34b; }
/* Dropdown-Flyouts bleiben hell (eigene Fläche, AA-geprüft) — bewusst. */

/* ===================== MOBILE (≤880px): Overlay-Sheet ===================== */
@media (max-width: 880px) {
  .shell { top: 8px; margin: 8px auto 0; max-width: calc(100% - 16px); }
  .shell-inner { padding: 7px 12px 7px 16px; gap: 10px; }
  .shell-burger { display: flex; }
  .shell-title { font-size: 17px; }
  .shell-star { width: 40px; height: 40px; }
  .shell-star img { width: 30px; height: 30px; }

  /* Navigation als Sheet unter der Leiste (Glas wie die Leiste selbst) */
  .shell-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 14px 16px;
    background: rgba(237, 226, 246, .96);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(89, 34, 108, .16);
    box-shadow: 0 22px 40px rgba(46, 26, 51, .22);
  }
  .shell.is-open .shell-nav { display: flex; }
  .shell-link { font-size: 16px; padding: 11px 12px; }
  .shell-link::after { left: 12px; right: auto; width: 26px; bottom: 4px; }
  .shell-history { margin: 8px 0 4px; justify-content: center; padding: 11px 16px; }

  /* „Mehr“ im Sheet: Liste direkt ausgeklappt, Button entfällt */
  .shell-more { margin: 4px 0 0; }
  .shell-more-btn { display: none; }
  .shell-more-menu {
    display: block; position: static; min-width: 0;
    background: transparent; border: 0; box-shadow: none;
    border-top: 1px solid rgba(89, 34, 108, .16); border-radius: 0;
    padding: 8px 0 0; margin-top: 4px;
  }
  .shell-more-menu a { font-size: 15px; padding: 10px 12px; color: var(--text-muted); }
  .shell-more-menu a.is-active { color: var(--lila-dark); }
  .shell-more-sep { display: none; }

  body[data-theme="dark"] .shell-nav {
    background: rgba(29, 16, 36, .96);
    border-bottom-color: rgba(255, 255, 255, .14);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .5);
  }
  body[data-theme="dark"] .shell-more-menu { border-top-color: rgba(255, 255, 255, .14); background: transparent; }
  body[data-theme="dark"] .shell-more-menu a { color: #c9a8bd; }
  body[data-theme="dark"] .shell-more-menu a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
  body[data-theme="dark"] .shell-more-menu a.is-active { color: #fff; background: rgba(255, 255, 255, .08); }
}

/* ===================== COOKIE-CONSENT ===================== */
/* Echte Wahl, keine Dark Patterns: beide Buttons identisch in Größe, Farbe
   und Gewicht. Erscheint unten rechts (Mobile: volle Breite). */
.consent {
  position: fixed; right: 16px; bottom: 16px; z-index: 1200;
  max-width: 360px; margin: 0;
  background: var(--base); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 10px 32px rgba(46, 26, 51, .2);
  padding: 16px 16px 14px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .28s ease, transform .28s ease;
}
.consent.is-visible { opacity: 1; transform: translateY(0); }
.consent[hidden] { display: none; }
.consent-title {
  margin: 0 0 6px; font-family: var(--font-head); font-weight: 700;
  font-size: 1.02rem; color: var(--primary-dark);
}
.consent-text { margin: 0 0 12px; font-size: .84rem; line-height: 1.5; color: var(--text-muted); }
.consent-text a { color: var(--pink-text); font-weight: 600; text-decoration: underline; }
.consent-text a:hover { color: var(--lila-dark); }
.consent-actions { display: flex; gap: 8px; }
/* Beide Buttons weiterhin identisch (echte Wahl) — modern gefuellt,
   ohne 2px-Rahmen, mit weichem Schatten und Mindest-Touch-Target */
.consent-btn {
  flex: 1 1 0; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
  min-height: 40px;
  background: var(--lila-dark); color: #fff; border: 0;
  padding: 9px 12px; border-radius: var(--radius); white-space: nowrap;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(46, 26, 51, .05), 0 2px 8px rgba(46, 26, 51, .04));
  transition: background .15s ease;
}
.consent-btn:hover { background: var(--primary-dark); }
.consent-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
@media (max-width: 520px) {
  .consent { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .consent-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { transition: none; transform: none; }
  .shell-history, .shell-burger .sb-bar { transition: none; }
}

/* ============================================================
   Kompakte Subpage-Heros (ds-hero auf Impressum/Datenschutz/
   Kontakt/Philosophie): Seit die globale Shell Orientierung und
   Navigation übernimmt, braucht der Hero keinen halben Viewport
   mehr — schmales, ruhiges Band. Überschreibt die Inline-Styles
   der Seiten (shell.css lädt nach ihnen … nein: zentral via
   höherer Spezifität auf .ds-page).
   ============================================================ */
.ds-page .ds-hero { padding: 16px 24px 52px; }
.ds-page .ds-hero-head { margin-top: 8px; gap: 16px; }
.ds-page .ds-hero-star { width: 48px; height: 48px; border-radius: 12px; }
.ds-page .ds-hero-star img { width: 28px; height: 28px; }
.ds-page .ds-kicker { margin: 0 0 4px; font-size: .72rem; }
.ds-page .ds-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.ds-page .ds-lead { margin-top: 8px; font-size: .96rem; max-width: 60ch; }
.ds-page .ds-vcard { margin-top: -36px; }
@media (max-width: 720px) {
  .ds-page .ds-hero { padding: 12px 18px 48px; }
  .ds-page .ds-hero h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
}

/* ============================================================
   Subpage-Köpfe zur Pillen-Navigation (11.06., Maximes Wunsch):
   Der dunkle Hero-„Balken" entfällt — Unterseiten beginnen mit
   einem ruhigen Editorial-Kopf direkt auf dem Seiten-Beige.
   (.ds-page-Spezifität überschreibt die Inline-Styles der Seiten.
   /geschichte ist nicht betroffen — eigene dunkle Bühne, zr-*.)
   Kontraste: H1 Aubergine #2e1a33 auf Beige = 12.5:1 (AA),
   Kicker #a01a5c auf Beige = 5.6:1 (AA).
   ============================================================ */
.ds-page .ds-hero {
  background: none; border-bottom: 0; color: var(--text);
  padding: 26px 24px 18px;
}
.ds-page .ds-hero .sky { display: none; }
.ds-page .ds-kicker { color: var(--pink-text); }
.ds-page .ds-hero h1 { color: var(--primary-dark); }
.ds-page .ds-lead { color: var(--text-muted); }
.ds-page .ds-hero-star {
  background: linear-gradient(135deg, var(--pink) 0%, var(--lila) 100%);
  border: 0; box-shadow: 0 8px 20px rgba(158, 63, 224, .25);
}
.ds-page .ds-vcard { margin-top: 6px; }
.ds-page .ds-vcard-inner { box-shadow: var(--shadow-md, 0 8px 24px rgba(46,26,51,.09)); }
