/* =========================================================================
   Kino-Weltkarte — CI Kino Montréal (FLINTA-tauglich, WCAG-AA)
   Flach, kantig, ohne Schatten. Beige-Rosé Grund, Pink/Lila/Orange-Akzente.
   Headings: Sansita (lokal). Body: System-Sans.

   Kontraste (gegen Beige #f1e0d8 bzw. weiss, verifiziert):
     Text Aubergine #2e1a33 / Beige      = 12.5:1  (AA-PASS)
     Muted #6b4a5e / Beige               =  5.9:1  (AA-PASS)
     Lila-dunkel #59226c / Beige         =  8.8:1  (AA-PASS, Links/Akzent-Text)
     Pink #d8318a (nur Fill/UI ≥3:1, weiss drauf 4.4:1 als fette UI)
     Orange #e77e36 (nur Fill mit AUBERGINE-Text — weiss faellt durch)
     Status: Gruen #1f7a43, Rot #e43832, Amber #d99a2b auf Beige = klar sichtbar
   ========================================================================= */

:root {
  /* Kino-Montréal-Grundfarben */
  --beige:          #f1e0d8;   /* Seiten-Hintergrund (Beige-Rosé) */
  --beige-soft:     #f7ece6;   /* leicht aufgehellt, fuer Landmassen/Felder */
  --beige-line:     #d9c2b6;   /* dezente Linien auf Beige */

  /* Akzentpalette */
  --pink:           #d8318a;
  --pink-text:      #a01a5c;   /* AA-Pink fuer Text: 5.6:1 auf Beige */
  --lila:           #9e3fe0;
  --lila-dark:      #59226c;   /* dunkles Lila — AA-tauglicher Akzent-/Linktext */
  --orange:         #e77e36;
  --orange-hover:   #d96d24;
  --lavender:       #ddccf0;   /* Lavendel-Header (harmoniert mit Beige) */

  /* Primär-/Sekundär-Rollen auf die neue Palette gemappt
     (damit der vorhandene var(--primary)-Code weiterlaeuft) */
  --primary:        var(--pink);  /* ruhiger, AA-tauglicher Akzent */
  --primary-hover:  var(--lila-dark);       /* Hover-Akzent = Pink */
  --primary-light:  #f0d9e7;           /* zartes Pink-Beige (Hover-Flaechen) */
  --primary-dark:   #2e1a33;           /* Aubergine */
  --secondary:      var(--lila-dark);       /* aktive Zustaende, Fills */

  --base:           #fffaf7;   /* fast-weiss mit Beige-Hauch (Panel/Felder) */
  --off-white:      #f3e6df;
  --line:           var(--beige-line);
  --radius:         10px;  /* Controls: Buttons, Inputs, Tabs */
  --radius-lg:      14px;  /* Container: Karte, Cards, Tooltip */
  --text:           #2e1a33;   /* dunkles Aubergine — NICHT reines Schwarz */
  --text-muted:     #6b4a5e;   /* Aubergine-Grau, AA-tauglich (5.9:1) */

  /* Status — semantisch unterscheidbar, harmonisch auf Beige */
  --st-active: #1f7a43;        /* sattes Grün */
  --st-soon:   var(--pink);    /* Festival in naechster Zeit (Pink, Badges/AA) */
  --mk-active: #6fb389;        /* Karten-Marker Grün, pastelliger */
  --mk-soon:   #e58ab4;        /* Karten-Marker soon — sanftes Pink */
  --mk-ended:  #c2dccf;        /* nicht mehr aktiv — helles, entsättigtes Mint */
  --st-live:   var(--pink);    /* laeuft gerade (Stern + Badges, Pink) */
  --st-ended:  #b5740c;        /* warmes Amber/Ocker (AA: 3:1 auf Beige + weisser Rand) */
  --st-past:   #6fb389;        /* vergangenes Festival im Kalender — saftiges Salbei (= mk-active) */

  /* Karten-Toene */
  --land-fill: var(--beige-soft);
  --land-stroke: var(--beige);
  --ocean: #ecd8cd;            /* etwas tiefer als Land, gleicher Farbraum */

  --header-h: 132px;

  --font-head: "Sansita", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--beige);
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}

a { color: currentColor; text-decoration: none; }
a:not(.btn):hover { color: var(--lila-dark); text-decoration: underline; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 3px solid var(--lila-dark);
  outline-offset: 2px;
}

/* ===================== HEADER ===================== */
.site-header {
  border-bottom: 2px solid var(--orange);
  background: var(--lavender);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 14px 24px 6px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-star {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  background: var(--orange);
  border: 0; padding: 0; margin: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; transition: background .12s ease;
}
.brand-star img { width: 40px; height: 40px; display: block; grid-area: 1 / 1; pointer-events: none; }
/* Easter-Egg: Stern gedrückt halten -> Kino-Hambourg-Logo, gelber Kasten bleibt */
.brand-star .bs-logo { display: none; width: 44px; height: 44px; }
.brand-star.is-pressed .bs-star { display: none; }
.brand-star.is-pressed .bs-logo { display: block; }
.brand-kicker {
  margin: 0; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pink-text); font-weight: 700;
}
.brand-title { font-size: 30px; color: var(--text); }

.view-tabs { display: flex; gap: 0; border: 2px solid var(--orange); border-radius: var(--radius); overflow: hidden; }
.tab {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--base); color: var(--pink-text);
  border: 0; padding: 10px 22px;
  border-right: 2px solid var(--orange);
}
.tab:last-child { border-right: 0; }
.tab.is-active { background: var(--lila-dark); color: #fff; border-color: var(--lila-dark); }
.tab:hover:not(.is-active) { background: #f8e3d2; color: var(--orange-hover); }

.claim {
  max-width: 1320px; margin: 0 auto; padding: 0 24px 12px;
  font-family: var(--font-head); font-style: italic; font-weight: 700;
  color: var(--lila-dark); font-size: 18px;
}

/* ===================== VIEW BASICS ===================== */
.view[hidden] { display: none; }

/* ===================== WELTKARTE ===================== */
.view-map { position: relative; }
.map-stage { max-width: 1320px; margin: 0 auto; padding: 18px 24px 28px; }

.map-toolbar {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-wrap { position: relative; flex: 1 1 280px; max-width: 380px; }
#cell-search {
  width: 100%; font: inherit; padding: 9px 14px;
  border: 2px solid var(--line); background: var(--base); color: var(--text);
  border-radius: var(--radius);
}
#cell-search:focus { border-color: var(--primary); outline: none; }
.search-results {
  position: absolute; z-index: 30; top: calc(100% + 2px); left: 0; right: 0;
  margin: 0; padding: 0; list-style: none;
  background: #fff; border: 2px solid var(--primary);
  max-height: 320px; overflow-y: auto;
  border-radius: var(--radius);
}
.search-results li {
  padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
.search-results li:last-child { border-bottom: 0; }
.search-results li:hover, .search-results li[aria-selected="true"] {
  background: var(--primary-light);
}
.search-results .res-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.search-results .res-city { color: var(--text-muted); font-size: 14px; }

/* Zoom-Knöpfe (Outline) */
.zoom-controls { display: flex; gap: 8px; margin-left: auto; }
.zoom-controls button {
  font: inherit; cursor: pointer; min-width: 40px; height: 40px;
  padding: 0 12px; background: var(--base); color: var(--text-muted);
  border: 2px solid var(--line); font-size: 18px; line-height: 1;
  border-radius: var(--radius);
}
.zoom-controls button:hover { background: var(--beige-soft); color: var(--text); border-color: var(--beige-line); }
#zoom-reset { font-size: 14px; }

/* Karte */
.map-container {
  position: relative; width: 100%;
  background: var(--ocean);
  border: 2px solid var(--line);
  overflow: hidden;
  border-radius: var(--radius-lg);
}
/* Box-Hoehe folgt dem Karten-Seitenverhaeltnis (geoNaturalEarth1 ~ 1.92:1) ->
   keine leeren Beige-Baender ueber/unter den Kontinenten (v.a. auf schmalen Screens).
   Die Karte bleibt gleich gross, nur der leere Rahmen drumherum verschwindet. */
#map { display: block; width: 100%; height: auto; aspect-ratio: 1.92 / 1; min-height: 0; cursor: grab; }
#map:active { cursor: grabbing; }
#map .land { fill: var(--land-fill); stroke: var(--land-stroke); stroke-width: .5px; }
#map .sphere { fill: var(--ocean); }
#map .graticule { fill: none; stroke: #fff; stroke-width: .4px; opacity: .55; }

.marker { cursor: pointer; transition: filter .12s; }
.marker circle { stroke: #fff; stroke-width: 1.6px; }
.marker.is-active  circle { fill: var(--mk-active); }
.marker.is-soon    circle { fill: var(--mk-soon); }
/* nicht mehr aktive Zellen: helles, entsättigtes Mint (ruhend) */
.marker.is-ended   circle { fill: var(--mk-ended); stroke-width: 1.2px; }
.marker.is-live    circle { fill: var(--st-live); }
.marker .star-bg { fill: var(--st-live); stroke: var(--pink-text); stroke-width: 1.8px; }
.marker .star-img { pointer-events: none; }
.marker:hover circle { stroke-width: 2.6px; }
.marker.is-selected circle { stroke: var(--primary-dark); stroke-width: 3px; }
/* Event-Eigenmarker (Festival ohne Zelle): rot, zusaetzlicher Aubergine-Ring */
.marker.is-event .core { stroke: var(--primary-dark); stroke-width: 2px; }
/* soon-Zellen (z.B. Kino Datsche) wie die anderen Festival-Punkte: dunkler Rand statt weiß */
.marker.is-soon .core { stroke: var(--primary-dark); stroke-width: 2px; }
.marker.is-soon .pulse { fill: var(--mk-soon); opacity: .35; }
.marker.is-live .pulse { fill: var(--st-live); opacity: .4; }

@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .5; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
.marker .pulse { transform-box: fill-box; transform-origin: center;
  animation: pulse-ring 2.4s ease-out infinite; }

.map-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-muted); font-family: var(--font-head); font-size: 20px;
  background: var(--ocean);
}
.map-loading[hidden] { display: none; }

/* Tooltip — kompakte Vorschau-Karte (Desktop-Hover/Focus) */
.tooltip {
  position: absolute; z-index: 25; pointer-events: none;
  background: var(--primary-dark); color: #fff;
  padding: 9px 12px; font-size: 13px; line-height: 1.45; max-width: 280px;
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
}
.tooltip[hidden] { display: none; }
.tooltip strong { display: block; font-family: var(--font-head); font-size: 14.5px; }
.tooltip span { display: block; color: #e9d3df; }
/* feine Trennlinie zwischen Kopf und Zusatzblock */
.tooltip .tt-sep {
  display: block; height: 1px; margin: 7px 0;
  background: rgba(255, 255, 255, .18);
}
.tooltip .tt-fest { color: #fff; }
.tooltip .tt-fest b { color: #f3b27e; font-weight: 700; }   /* helles Orange, AA auf dunkel */
.tooltip .tt-date { color: #e9d3df; font-size: 12px; }
.tooltip .tt-desc { color: #ecdfe6; margin-top: 4px; font-style: italic; }
.tooltip .tt-meta { color: #cdbcc6; font-size: 12px; margin-top: 4px; }

/* Legende */
.legend {
  display: flex; flex-wrap: wrap; gap: 18px 26px;
  list-style: none; margin: 16px 0 0; padding: 0;
  font-size: 14.5px; color: var(--text-muted);
}
.legend li { display: flex; align-items: center; gap: 8px; }
/* Legende-Punkte tragen denselben weissen Ring wie die Karten-Marker
   (SVG-Marker: stroke #fff). Auf Beige wird der weisse Ring durch eine
   feine aeussere Hairline (box-shadow) abgesetzt, damit er sichtbar bleibt. */
.dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--beige-line);
  background-clip: padding-box;
}
.dot-active { background: var(--mk-active); }
.dot-soon   { background: var(--mk-soon); }
.dot-ended  { background: var(--mk-ended); }
.dot-live   { background: var(--st-live); display: grid; place-items: center;
  border-radius: 50%; width: 16px; height: 16px; }
.dot-live img { width: 12px; height: 12px; }

/* ===================== INFO-PANEL ===================== */
.panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(420px, 92vw); background: var(--base);
  border-left: 3px solid var(--pink);
  transform: translateX(105%); transition: transform .28s ease;
  z-index: 120; overflow-y: auto;
}
.panel.is-open { transform: translateX(0); }
.panel-scrim {
  position: fixed; inset: 0; background: rgba(46,26,51,.45);
  z-index: 110;
}
.panel-scrim[hidden] { display: none; }
/* Drag-Griff nur im Mobile-Bottom-Sheet sichtbar (siehe Media Query) */
.panel-handle { display: none; }
.panel-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; font-size: 26px; line-height: 1;
  background: var(--base); border: 2px solid var(--primary); color: var(--primary);
  cursor: pointer;
}
.panel-close:hover { background: var(--primary); color: #fff; }
.panel-body { padding: 0 0 32px; }

.panel-photo {
  width: 100%; aspect-ratio: 16/10; object-fit: contain; background: var(--beige-soft); display: block;
  background: var(--off-white); border-bottom: 2px solid var(--line);
}
.panel-photo-ph {
  width: 100%; aspect-ratio: 16/10; display: grid; place-items: center;
  border-bottom: 2px solid var(--line);
  background:
    repeating-linear-gradient(135deg, var(--lila) 0 22px, var(--pink) 22px 44px);
  position: relative; overflow: hidden;
}
.panel-photo-ph img { width: 78px; height: 78px; opacity: .95; }
.panel-photo-ph::after {
  content: attr(data-label); position: absolute; bottom: 10px; left: 12px;
  color: #fff; font-family: var(--font-head); font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; opacity: .8;
}
.panel-pad { padding: 18px 22px 0; }

.panel-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 999px; color: #fff; margin-bottom: 10px;
}
.panel-badge .b-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.badge-active { background: var(--st-active); }
.badge-soon   { background: var(--st-soon); }
/* Orange-Badge: Aubergine-Text (weiss faellt durch WCAG) */
.badge-live   { background: var(--st-live); color: #fff; }
.badge-live .b-dot { background: #fff; }
.badge-ended  { background: var(--mk-ended); color: var(--text); }
.badge-ended .b-dot { background: var(--text); }

.panel-name { font-size: 27px; margin-bottom: 4px; }
.panel-loc { color: var(--text-muted); font-size: 15.5px; margin: 0 0 16px; }
.panel-date { color: var(--pink-text); font-weight: 700; font-size: 15px; margin: 4px 0 0; }
.panel-desc { margin: 0 0 18px; }
.panel-desc.is-empty { color: var(--text-muted); font-style: italic; }

.panel-meta { list-style: none; margin: 0 0 18px; padding: 0; font-size: 14.5px; color: var(--text-muted); }
.panel-meta li { padding: 3px 0; }
.panel-meta b { color: var(--text); font-weight: 600; }

/* Festival-Block im Panel */
.fest-block {
  border: 2px solid var(--secondary); margin: 0 22px 18px; padding: 14px 16px;
  border-radius: var(--radius);
}
.fest-block.is-live { border-color: var(--st-live); background: #fbe7f1; }
.fest-kicker {
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--secondary);
  margin: 0 0 4px;
}
.fest-block.is-live .fest-kicker { color: var(--st-live); }
.fest-title { font-size: 18px; margin: 0 0 2px; }
.fest-date { color: var(--text-muted); font-size: 14.5px; margin: 0 0 12px; }

.contact-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px; }
.btn {
  font: inherit; font-size: 14.5px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 7px; padding: 9px 16px;
  border: 2px solid var(--primary); background: var(--base); color: var(--primary);
  border-radius: var(--radius);
}
.btn { font-weight: 600; }
.btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-fill { background: var(--lila-dark); border-color: var(--lila-dark); color: #fff; }
.btn-fill:hover { background: var(--pink); border-color: var(--pink-text); color: #fff; }
/* Orange-Fill braucht AUBERGINE-Text (weiss faellt durch WCAG) */
.btn-live { background: var(--orange); border-color: var(--orange); color: var(--primary-dark); }
.btn-live:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--primary-dark); }
.fest-block .contact-links { padding: 0; }
.panel-actions { padding: 8px 22px 0; }
.btn-block { width: 100%; justify-content: center; }

/* Quelle / Provenienz — dezent, aber lesbar */
.prov {
  font-size: 12px; line-height: 1.4; color: var(--text-muted);
  opacity: .85; margin: 10px 0 0;
}
.prov a { text-decoration: underline; color: var(--text-muted); }
.prov a:hover { color: var(--primary); }
.prov-cell { padding: 0 22px; margin-top: 16px; }
.fest-block .prov { margin-top: 12px; }
.event-card .prov { margin-top: 4px; }

/* ===================== KALENDER ===================== */
.cal-inner { max-width: 920px; margin: 0 auto; padding: 28px 24px 48px; }
.cal-head h2 { font-size: 34px; color: var(--text); }
.cal-sub { color: var(--text-muted); margin: 6px 0 0; }

.cal-filters {
  display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0 28px;
  border-top: 2px solid var(--line); border-bottom: 2px solid var(--line);
  padding: 18px 0;
}
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-muted); }
.field span { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.field select, .field input {
  font: inherit; font-size: 15px; color: var(--text);
  padding: 8px 12px; border: 2px solid var(--line); background: #fff; min-width: 160px;
  border-radius: var(--radius);
}
.field select:focus, .field input:focus { border-color: var(--primary); outline: none; }
.field-search { flex: 1 1 220px; }
.field-search input { width: 100%; min-width: 0; }

.cal-section-title {
  font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin: 0 0 14px; font-family: var(--font-body); font-weight: 700;
}
.event-list { list-style: none; margin: 0; padding: 0; }
.event-card {
  border: 2px solid var(--line); border-left-width: 6px;
  padding: 14px 18px; margin-bottom: 12px;
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center;
  border-radius: var(--radius-lg);
}
.event-card.is-live  { border-left-color: var(--st-live); }
.event-card.is-soon  { border-left-color: var(--st-soon); }
.event-card.is-future{ border-left-color: var(--st-active); }
.event-card.is-past  { border-left-color: var(--st-past); }
.ev-date {
  text-align: center; font-family: var(--font-head); line-height: 1.05;
}
.ev-date .ev-day { font-size: 24px; font-weight: 700; }
.ev-date .ev-mon { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.ev-date .ev-year { font-size: 12px; color: var(--text-muted); }
.ev-main { min-width: 0; }
.ev-title { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.ev-flag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; margin-left: 8px; vertical-align: middle; color: #fff;
}
.flag-live { background: var(--st-live); color: #fff; }
.flag-soon { background: var(--st-soon); }
/* "BALD"-Badge pulsiert langsam + dezent — gleicher Rhythmus wie die
   soon/now-Marker auf der Karte (dort: expandierender Ring via @keyframes
   pulse-ring). Hier als Badge-tauglicher, schichtfreier Box-Shadow-Ring +
   sanftes Opacity-Atmen umgesetzt (kein transform:scale -> kein Layout-Shift). */
@keyframes pulse-badge {
  0%   { box-shadow: 0 0 0 0 rgba(216, 49, 138, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(216, 49, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 49, 138, 0); }
}
.ev-flag.flag-soon {
  animation: pulse-badge 2.8s ease-out infinite;
  will-change: box-shadow;
}

/* =========================================================================
   LÄUFT-Stern (final): weisser Kino-Stern links im Badge mit eigenem,
   expandierendem Ring (wie die "läuft gerade"-Marker auf der Karte) — und der
   Stern selbst pulsiert sanft mit. NUR fuer flag-live (LÄUFT), nicht flag-soon.
   Fester Stern (13px) -> nur transform/box-shadow -> kein Layout-Shift.
   ========================================================================= */
.ev-flag.flag-live {
  display: inline-flex; align-items: center; gap: 5px;
}
.ev-flag.flag-live::before {
  content: ""; flex: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: url("../assets/brand/KinoStern_White_transparent.png") center / contain no-repeat;
  transform-origin: center;
  animation: star-live 2.4s ease-out infinite;
  will-change: transform, box-shadow;
}
@keyframes star-live {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); transform: scale(.9); }
  50%  { transform: scale(1.12); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); transform: scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); transform: scale(.9); }
}

.ev-loc { color: var(--text-muted); font-size: 14.5px; margin-top: 2px; }
.ev-range { color: var(--text-muted); font-size: 13.5px; }
.ev-actions { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.ev-actions .btn { font-size: 13px; padding: 7px 12px; white-space: nowrap; justify-content: center; }

.cal-archive { margin-top: 28px; }
.cal-archive summary {
  cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 17px;
  padding: 12px 16px; border: 2px solid var(--line); color: var(--primary);
  list-style: none;
}
.cal-archive summary::-webkit-details-marker { display: none; }
.cal-archive summary::before { content: "▸ "; }
.cal-archive[open] summary::before { content: "▾ "; }
.cal-archive summary:hover { background: var(--off-white); }
.cal-archive #cal-archive { margin-top: 16px; }

.empty-note { color: var(--text-muted); font-style: italic; padding: 14px 0; }

/* ===================== FOOTER ===================== */
.site-footer {
  border-top: 2px solid var(--orange); margin-top: 24px;
  padding: 22px 24px; text-align: center; font-size: 14px; color: var(--text-muted);
}
.site-footer p { max-width: 760px; margin: 4px auto; }
.panel-suggest { display: block; margin: 16px 24px 24px; font-size: 13.5px; font-weight: 600;
  color: var(--pink-text); text-decoration: none; }
.panel-suggest:hover { color: var(--lila-dark); text-decoration: underline; }
.footer-note { font-size: 12.5px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .brand-title { font-size: 22px; }
  /* Karte folgt dem Seitenverhältnis (Basisregel) — kein leerer Beige-Rand im
     Ruhezustand. (Früher 96dvh, damit die Karte hinter dem Bottom-Sheet durch-
     scheint; eine breite Weltkarte füllt eine hohe Hochkant-Box aber nur mit
     leeren Rändern — daher hier bewusst kompakt.) */
  #map { aspect-ratio: 1.85 / 1; }
  .event-card { grid-template-columns: 64px 1fr; }
  .ev-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .map-toolbar { gap: 12px; }

  /* Header kompakter halten -> mehr sichtbare Karte ueber dem Sheet */
  .header-inner { padding: 10px 16px 4px; }
  .claim {
    padding: 0 16px 8px; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand-kicker { font-size: 11px; }

  /* Info-Panel als Bottom-Sheet (Muster Google-Maps-POI):
     slidet von UNTEN, kompakt, Karte bleibt oben sichtbar. */
  .panel {
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%; height: auto;
    max-height: 58vh;            /* Fallback für ältere Browser */
    max-height: 58dvh;           /* iOS/Safari: dyn. Viewport-Höhe OHNE Adressleiste; bewusst kompakt, damit die Karte oben sichtbar bleibt */
    padding-bottom: env(safe-area-inset-bottom);
    border-left: 0;
    border-top: 3px solid var(--pink);
    border-radius: 18px 18px 0 0;
    /* SICHTBAR durchscheinend: deutlich transparente Deckkraft, damit die KARTE
       (die jetzt hinter dem Sheet weiterläuft) klar durchscheint.
       Browser-robust — hängt NICHT von backdrop-filter ab (iOS-Safari ignoriert
       den hier oft). backdrop-filter bleibt nur als BONUS für Chrome drin. */
    background: rgba(255, 249, 245, 0.58);
    /* Nur dezenter Bonus-Blur (Chrome) — bewusst SCHWACH, damit die Karte/Marker
       durch das Sheet erkennbar bleiben statt weichgezeichnet zu verschwinden.
       Auf iOS-Safari (ignoriert) sieht man die Karte über die reine Deckkraft. */
    -webkit-backdrop-filter: saturate(115%) blur(3px);
    backdrop-filter: saturate(115%) blur(3px);
    /* Slide-in von unten via translate-PROPERTY (nicht transform!). */
    transform: none;
    translate: 0 102%;
    transition: translate .28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-top: 20px;            /* sauberer Streifen fuer den Drag-Griff */
  }
  .panel.is-open { transform: none; translate: 0 0; }

  /* Abdunklung auf Mobile fast weg — Karte bleibt hell sichtbar (Overlay statt neue Seite) */
  .panel-scrim { background: rgba(46, 26, 51, .06); }

  /* Lese-Unterlage OHNE backdrop-filter: hinter den eigentlichen Textbereichen
     ein etwas deckenderer Beige-Streifen + feiner weißer Text-Halo. So scheint
     die Karte im Sheet durch, der Text bleibt aber überall klar lesbar (WCAG-AA),
     auch über bunten Marker-Bereichen der Karte. */
  .panel-pad,
  .panel .fest-block,
  .panel .contact-links,
  .panel .prov-cell {
    background: rgba(255, 250, 247, 0.46);
  }
  .panel-pad { border-radius: 10px; }
  .panel .panel-name,
  .panel .panel-loc,
  .panel .panel-desc,
  .panel .panel-meta,
  .panel .fest-title,
  .panel .fest-date,
  .panel .fest-kicker {
    text-shadow: 0 1px 2px rgba(255, 250, 247, 0.9);
  }

  /* Drag-Griff: kleine zentrierte Leiste oben, auf dem Sheet-Hintergrund
     (nicht auf dem Bild) — gut sichtbar in Akzentfarbe. */
  .panel-handle {
    display: block;
    position: sticky; top: 0; z-index: 3;
    width: 44px; height: 5px; margin: 8px auto 10px;
    border-radius: 999px;
    background: var(--pink);
  }

  /* Close-Button: groesseres Tap-Target (>=44px), gut erreichbar oben rechts */
  .panel-close {
    top: 10px; right: 10px;
    width: 44px; height: 44px; font-size: 28px;
    z-index: 4;
  }

  /* Echtes Foto flach halten; den (meist leeren) Farb-Platzhalter ganz weglassen —
     kein dominanter Block, das Sheet startet direkt mit Status/Titel → wirkt wie
     ein Overlay über der Karte, nicht wie eine neue Seite. */
  .panel-photo { aspect-ratio: 16/7; max-height: 140px; }
  .panel-photo-ph { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marker .pulse { animation: none; }
  .ev-flag.flag-soon, .ev-flag.flag-live { animation: none; box-shadow: none; }
  /* LÄUFT-Stern bleibt statisch sichtbar, aber ohne Bewegung/Glühen */
  .ev-flag.flag-live::before {
    animation: none; box-shadow: none; opacity: 1; transform: none; filter: none;
  }
  .panel { transition: none; }
}

/* ===== Sprach-Umschalter (i18n) ===== */
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; gap: 2px; background: var(--base); border: 1px solid var(--line);
  border-radius: 8px; padding: 2px; }
.lang-btn { border: none; background: transparent; cursor: pointer; font-size: 1.05rem; line-height: 1;
  padding: 4px 7px; border-radius: 6px; opacity: .5; filter: grayscale(.5); transition: opacity .15s, filter .15s; }
.lang-btn:hover { opacity: .85; filter: grayscale(.1); }
.lang-btn.is-active { opacity: 1; filter: none; background: var(--primary-light); }
@media (max-width: 720px) {
  .header-right { gap: 8px; }
  .lang-btn { font-size: .95rem; padding: 3px 5px; }
}
