/* =========================================================================
   Dunkles Design, angelehnt an kleinestoeberkiste.de (seit 2026-10-03 fuer
   alle; body traegt immer .theme-dark).
   Stoeberkiste: Anthrazit #262626, Orange #f07c00, Poppins/Literata.
   Terminliste: dieselbe Basis, Akzent Blau; die bunten Karten bleiben.
   ========================================================================= */

body.theme-dark {
  --tk-bg:        #262626;
  --tk-line:      #404040;
  --tk-text:      #f4f4f4;
  --tk-mid:       #a8a8a8;
  /* Variante D (User 2026-10-10): Leiste fast schwarz, ein warmer Akzent fuer Aktives,
     Datumsleisten grau; Farbe tragen Kacheln und Karte */
  --tk-accent:    #141414;
  --tk-accent-hell: #ff6b6b;
  --tk-leiste:    #3a3a3a;
  --desktop-nav-h: 56px;
  --nav-height:   56px;
  --mobile-header-h: 84px;
  background: var(--tk-bg);
}
html:has(body.theme-dark) { background: #262626; }

/* ── Kopf: zentriertes Logo wie bei der Stoeberkiste ─────────────────── */
.theme-dark header { background: var(--tk-bg); padding: 1rem 0; }
.theme-dark .logo-row { justify-content: center; padding: 0 1.5rem; }
.theme-dark .logo-text {
  font-size: 2.35rem; letter-spacing: 0.08em; line-height: 1.08;
  /* Staffelung (0.6em, 1.2em) nach rechts optisch ausgleichen */
  margin-right: 1.2em;
}
/* Bis nach dem ersten Bild keine Transitions (base.html entfernt .laedt):
   sonst gleiten die gestaffelten Logo-Zeilen beim Laden sichtbar an ihren Platz */
body.laedt .logo-line { transition: none !important; }

/* ── Menueleiste: wie die Stoeberkiste (dort Orange, hier Blau) ──────── */
/* :not(.mobile-menu): das Hamburger-Menue ist auch ein <nav>; ohne die
   Ausnahme bekam es Hoehe und Farbe der Leiste und zeigte mobil nur "Typen" */
.theme-dark nav:not(.mobile-menu) {
  /* Kantenglaettung wie auf der Stoeberkiste (antialiased wirkt am Mac zu duenn) */
  -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
  background-color: var(--tk-accent); border-bottom: none;
  height: var(--desktop-nav-h); padding: 0; display: flex; justify-content: center; align-items: center;
}
.theme-dark nav ul.navbar {
  height: 100%; max-width: 900px; margin: 0 auto; padding: 0 1rem;
  gap: 0.75rem 1.1rem; justify-content: center; flex-wrap: wrap;
}
.theme-dark nav ul.navbar > li { display: flex; align-items: center; height: 100%; }
.theme-dark nav ul.navbar li a,
.theme-dark .dropdown > button.dropdown-toggle {
  color: #fff; font-family: 'Poppins', sans-serif; font-weight: 500; font-style: normal;
  letter-spacing: 0.5px; text-transform: uppercase; padding: 0; transition: none;
}
.theme-dark nav ul.navbar > li > a,
.theme-dark nav ul.navbar > li > button.dropdown-toggle { font-size: 1rem; }
.theme-dark nav ul.navbar li a:hover,
.theme-dark .dropdown > button.dropdown-toggle:hover,
.theme-dark .navbar > li.nav-link > a:hover { color: #ddd; }
.theme-dark nav ul.navbar li.calendar-icon { margin-left: 0.4rem; }
.theme-dark .icon-button { color: #fff; padding: 0.4rem; }
.theme-dark .icon-button svg { transition: color 0.2s, transform 0.2s; }
/* Hover nur mit Maus (wie Stoeberkiste): auf dem iPhone loest ein :hover sonst
   beim ersten Tippen nur den Hover-Zustand aus, erst der zweite Tipp klickt */
@media (hover: hover) {
  .theme-dark .icon-button:hover { color: #ddd; }
  .theme-dark .icon-button:hover svg { transform: scale(1.1); }
}
.theme-dark .icon-button, .theme-dark .hamburger { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.theme-dark .icon-button:focus, .theme-dark .hamburger:focus { outline: none; }

.theme-dark .dropdown-content {
  top: 100%; left: 0; margin-top: 0;
  background-color: var(--tk-accent); min-width: 180px; max-height: 80vh;
  border: none; border-radius: 0 0 4px 4px; padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.3) transparent;
}
.theme-dark .dropdown-content li { border-bottom: none; display: block; width: 100%; height: auto; }
.theme-dark nav ul.navbar li .dropdown-content li a {
  display: block; width: 100%; box-sizing: border-box; padding: 0.45rem 1rem;
  color: #fff; text-transform: none; letter-spacing: normal; font-size: 0.9rem; font-weight: 400;
}
/* Hover auf fast schwarzem Grund (Variante D): leicht aufgehellt, Text im Akzent */
.theme-dark .dropdown-content li:hover { background-color: rgba(255,255,255,0.08); }
.theme-dark .dropdown-content li:hover a,
.theme-dark nav ul.navbar li .dropdown-content li a:hover { color: var(--tk-accent-hell); background: transparent; }
.theme-dark .dropdown-content li a:focus-visible { outline: 2px solid var(--tk-bg); outline-offset: -2px; border-radius: 3px; }

@media (max-width: 768px) {
  .theme-dark header { padding: 0; }
  .theme-dark .logo-row { justify-content: flex-start; padding: 0 1.2rem; }
  .theme-dark .logo-text { font-size: 0.95rem; margin-right: 0; }
  .theme-dark nav:not(.mobile-menu) { background: transparent !important; height: var(--mobile-header-h); }
  .theme-dark nav ul.navbar { max-width: none; justify-content: flex-end; gap: 1.2rem; padding: 0 1.1rem; flex-wrap: nowrap; }
  .theme-dark .icon-button svg { width: 28px; height: 28px; stroke: #fff; }
  .theme-dark .hamburger .bar { width: 28px; }
  .theme-dark .hamburger .bar:nth-child(1) { transform: translateY(-8px); }
  .theme-dark .hamburger .bar:nth-child(3) { transform: translateY(8px); }
  .theme-dark .hamburger.open .bar:nth-child(1) { transform: rotate(45deg); }
  .theme-dark .hamburger.open .bar:nth-child(3) { transform: rotate(-45deg); }
  .theme-dark .mobile-menu-inner { background: var(--tk-bg); }
  .theme-dark .acc { border-bottom-color: var(--tk-line); }
  .theme-dark .acc-trigger { background: var(--tk-bg); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 500; letter-spacing: 0.5px; }
  .theme-dark .acc-trigger:active { background: #333; }
  .theme-dark .acc-panel { background: #2d2d2d; }
  .theme-dark .acc-panel a,
  .theme-dark .mobile-menu-link { color: #eaeaea; font-family: 'Poppins', sans-serif; }
  .theme-dark .mobile-menu-link { background: var(--tk-bg); border-bottom: 2px solid var(--tk-line); }
  .theme-dark .mobile-menu-link:last-child { border-bottom: none; }
  /* wie die Akkordeon-Kopfzeilen darueber (sonst klebte "Ausstellungen" am Rand) */
  .theme-dark .mobile-menu-link { padding: 1.25rem 1.5rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.5px; border-top: none; }
}

/* ── Seitenkopf, Datumsleisten, Raster ───────────────────────────────── */
.theme-dark .page-header { border-bottom: none; }
.theme-dark h1 { color: var(--tk-text); }
.theme-dark .page-label,
.theme-dark .page-subtitle,
.theme-dark .venue-address,
.theme-dark .no-events,
.theme-dark .pagination-current { color: var(--tk-mid); }
/* Trefferzahl mittig zwischen Filtern und erster Rubrik (oben bringt der
   Filterblock schon eigenen Abstand mit, daher oben weniger als unten) */
.theme-dark .result-count { background: transparent; color: var(--tk-mid); padding: 0 1.5rem; margin: 0 0 var(--trefferzahl-unten, 2rem);
  font-family: 'Poppins', sans-serif; font-weight: 500; letter-spacing: 0.5px; }
@media (min-width: 769px) { .theme-dark .result-count { margin-top: 1rem; } }
@media (max-width: 768px) { .theme-dark .result-count { padding: 0 0.8rem; } }  /* buendig mit den Filtern */
.theme-dark .venue-link a { color: var(--tk-accent-hell); }
/* Datumsleiste: Grau, Datum in Literata statt Versalien */
.theme-dark .date-separator { background: var(--tk-leiste); }
/* frueher fest blau (style.css): Uhrzeit auf den Kacheln, Tageskopf der Woche */
.theme-dark .event-time-badge { background: var(--tk-accent); }
.theme-dark .week-day-header { background: var(--tk-leiste); }
.theme-dark .day-section h2 {
  background: var(--tk-leiste);
  /* wie die Datumsleisten der anderen Seiten */
  font-family: 'Literata', Georgia, serif; font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 1.05rem;
}
.theme-dark .event-date-badge { background: var(--tk-accent); }  /* Uhrzeit in der Woche, wie auf den Kacheln */
.theme-dark .mobile-menu { border-bottom-color: var(--tk-line); }
.theme-dark .date-separator-text {
  font-family: 'Literata', Georgia, serif; font-weight: 700;
  text-transform: none; letter-spacing: 0; font-size: 1.05rem;
}

/* ── Woche, Suche, Seitenwechsel, Fuss ───────────────────────────────── */
.theme-dark .day-section { border-bottom: none; }
.theme-dark .search-page-form { border-color: var(--tk-accent); }
.theme-dark .search-page-form button { background: var(--tk-accent); }
/* Seitenwechsel wie auf der Stoeberkiste: durchgehender Balken in der Akzentfarbe */
.theme-dark .pagination {
  background: transparent; border-top: none; padding: 0; gap: 2px;
  margin: 2rem 0 1.5rem; justify-content: stretch;
}
.theme-dark .pagination-current,
.theme-dark .pagination-link.disabled { display: none; }
.theme-dark .pagination-link {
  flex: 1; text-align: center; padding: 0.6rem 0.8em; border-radius: 0;
  background: var(--tk-accent); color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;  /* wie die Menueleiste (User 2026-10-10) */
}
.theme-dark .pagination-link:hover { background: var(--tk-accent); color: #ddd; }
.theme-dark footer {
  background: var(--tk-bg); color: #999; text-align: center; padding: 0.5rem 1rem 1.5rem;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 500;
}

/* ── Zugschnur: kurzer, unauffaelliger Faden von der oberen Kante ───────
   Absichtlich leicht zu uebersehen (Easter Egg), nur am Desktop. Lage und
   Winkel setzt zugschnur.js (Faden vom Rollo-Rand zum Knoten). */
.zugschnur { position: fixed; top: 0; left: 0; width: 0; height: 0; z-index: 2000; pointer-events: none; }
.zugschnur-seil {
  position: absolute; left: 0; top: 0; width: 1px; height: 30px; margin-left: -0.5px;
  background: rgba(225, 225, 225, 0.4); transform-origin: 50% 0;
}
.zugschnur-knoten {
  position: absolute; left: 0; top: 0; width: 3px; height: 4px; margin: -1px 0 0 -1.5px;
  border-radius: 1.5px; background: rgba(225, 225, 225, 0.5);
}
.zugschnur-griff {
  position: absolute; left: 0; top: 0; width: 24px; height: 34px; margin: -24px 0 0 -12px;
  pointer-events: auto; touch-action: none; cursor: grab;
}
.zugschnur.zieht .zugschnur-griff { cursor: grabbing; }
.zugschnur-griff:focus-visible { outline: 1px solid rgba(255,255,255,0.5); outline-offset: 2px; }
/* Bis das Skript die Lage gesetzt hat, unsichtbar */
.zugschnur:not(.bereit) { visibility: hidden; }
/* Nur Desktop: auf Touch-Geraeten und schmalen Bildschirmen gibt es keine Schnur */
@media (max-width: 768px), (hover: none), (pointer: coarse) {
  .zugschnur, .rollo { display: none !important; }
}

/* Rollo: die Stoeberkiste wird von oben heruntergezogen. Der Inhalt steht
   fest, das Rollo gibt ihn mit seiner Unterkante frei. */
.rollo {
  --rollo: 0px;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--rollo); max-height: 100dvh;
  z-index: 2100; pointer-events: none; overflow: hidden;
  visibility: hidden;
}
.rollo.sichtbar { visibility: visible; }
/* Hoehe setzt das Skript Bild fuer Bild; nur das Herunterrollen am Ende ist eine Transition */
.rollo.voll { transition: height 0.42s cubic-bezier(0.55, 0, 0.75, 0.4); }
/* Ganz unten deckt das Rollo die Seite ab: Scrollen geht an die Vorschau, Klicks nicht darunter */
.rollo.bedienbar { pointer-events: auto; }
.rollo-stoff {
  position: absolute; top: 0; left: 0; right: 0; height: 100dvh;
  background: #262626; display: flex; flex-direction: column;
}
.rollo-kopf { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1rem 0; }
.rollo-mumin { height: 130px; width: auto; }
/* Masse wie der Stoeberkisten-Kopf (dort gerendert gemessen): Wortmarke
   120 px hoch, 2.5rem unter den Mumin geschoben, i-Punkt 118.2 px vom
   rechten Rand und 67.4 px von oben (.title-link::after) */
.rollo-wortmarke { position: relative; display: block; margin-left: -2.5rem; line-height: 0; }
.rollo-schriftzug { height: 120px; width: auto; }
.rollo-i-punkt { position: absolute; right: 118.2px; top: 67.4px; width: 12.3px; height: 12.3px; }
.rollo-leiste-nav {
  height: 56px; background: #f07c00; flex: none;
  display: flex; justify-content: center; align-items: center; gap: 0.75rem;
  -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
}
.rollo-leiste-nav span {
  color: #fff; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 1rem;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.rollo-lupe { color: #fff; margin-left: 6px; flex: none; }
.rollo-kante {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background: #1a1a1a; box-shadow: 0 6px 18px rgba(0,0,0,0.55);
}
@media (max-width: 768px) {
  .rollo-kopf { justify-content: flex-start; padding: 0 1.2rem; height: 92px; }
  .rollo-mumin { height: 72px; }
  .rollo-wortmarke { display: none; }
  .rollo-leiste-nav { display: none; }
}

/* Echte Startseite der Stoeberkiste, von zugschnur.js nach dem Laden im
   Hintergrund eingesetzt; bis sie da ist, steht der nachgebaute Kopf darunter */
.rollo-seite {
  position: absolute; top: 0; left: 0; width: 100%; height: 100dvh;
  border: 0; pointer-events: none; opacity: 0; background: #262626;
}
.rollo.seite-da .rollo-seite { opacity: 1; }


/* ── Suche (2026-10-07): Lupe in der Leiste, aufklappende Suchzeile, Filter ── */
.theme-dark nav ul.navbar li.search-icon { margin-left: auto; display: flex; align-items: center; }
.theme-dark nav ul.navbar li.search-icon + li.calendar-icon { margin-left: 0; }
.theme-dark .icon-button.active { color: #ddd; }
/* Unter der Menueleiste auf dem Seitengrund, wie die Stoeberkiste (User 2026-10-07:
   "nicht innerhalb der menueleiste ausklappen, sondern darunter") */
.search-bar {
  background: var(--tk-bg);
  max-height: 0; overflow: hidden; visibility: hidden;
  transition: max-height 0.2s ease, visibility 0s linear 0.2s;
}
.search-bar.is-open { max-height: 7rem; visibility: visible; transition: max-height 0.2s ease; }
.search-bar-form {
  display: flex; max-width: 640px; margin: 0 auto; padding: 1rem 1rem; gap: 0;
}
.search-bar-form input {
  flex: 1; min-width: 0; border: 0; border-radius: 2px 0 0 2px; padding: 0.6rem 0.8rem;
  font: 1rem 'Literata', Georgia, serif; color: #1a1a1a; background: #fff;
}
.search-bar-form input:focus { outline: 2px solid var(--tk-accent); outline-offset: -2px; }
.search-bar-form button {
  border: 0; border-radius: 0 2px 2px 0; padding: 0 0.85rem; cursor: pointer;
  background: var(--tk-accent); color: #fff; display: flex; align-items: center;
}
.search-bar-form button svg { width: 20px; height: 20px; }
/* Desktop: nur die SVG-Lupe; mobil die CSS-Lupe, die zum X morpht */
#search-toggle .icon-morph { display: none; }
#search-toggle .icon-search { display: flex; }

@media (max-width: 768px) {
  .theme-dark nav ul.navbar li.search-icon { margin-left: 0; }

  /* Icons wie auf der Stoeberkiste: 48 px breite Knoepfe, 32 px Zeichen, 2 px Strich */
  .theme-dark nav ul.navbar { gap: 0.15rem; padding: 0 0.6rem; }
  .theme-dark nav ul.navbar .icon-button,
  .theme-dark nav ul.navbar .hamburger {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0;
  }
  /* 1.5 im 24er-Raster = 2 px bei 32 px, so dick wie Lupe und Hamburger */
  .theme-dark .icon-button svg { width: 32px; height: 32px; stroke-width: 1.5; }
  .theme-dark .icon-button:hover svg { transform: none; }
  .theme-dark .hamburger::after { content: ""; position: absolute; inset: -12px; }  /* groessere Tippflaeche wie Stoeberkiste */
  .theme-dark .hamburger .bar {
    position: absolute; left: 6px; right: 6px; width: auto; height: 2px; background: #fff; border-radius: 2px;
    transform-origin: 50% 50%; transition: transform .25s ease, opacity .25s ease, top .25s ease;
  }
  .theme-dark .hamburger .bar:nth-child(1) { top: calc(50% - 12px); transform: none; }
  .theme-dark .hamburger .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
  .theme-dark .hamburger .bar:nth-child(3) { top: calc(50% + 12px); transform: none; }
  .theme-dark .hamburger.open .bar:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
  .theme-dark .hamburger.open .bar:nth-child(2) { opacity: 0; }
  .theme-dark .hamburger.open .bar:nth-child(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }

  /* Lupe aus CSS: Kreis + Griff; aktiv werden daraus die zwei Balken eines X */
  #search-toggle .icon-search { display: none; }
  #search-toggle .icon-morph { display: block; position: relative; width: 32px; height: 32px; }
  #search-toggle .morph-circle {
    /* content-box wie auf der Stoeberkiste: 22 px innen + 2 px Rand = 26 px,
       erst so sitzt der Griff am Kreis */
    position: absolute; top: 0; left: 0; width: 22px; height: 22px; box-sizing: content-box;
    border: 2px solid #fff; border-radius: 50%; transform-origin: center center;
    transition: transform .25s ease, opacity .25s ease;
  }
  #search-toggle .morph-handle {
    position: absolute; bottom: 2px; right: 2px; width: 10px; height: 2px; background: #fff; border-radius: 2px;
    transform: rotate(45deg); transform-origin: center center;
    transition: transform .25s ease, width .25s ease, bottom .25s ease, right .25s ease;
  }
  #search-toggle .morph-handle::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; border-radius: 2px;
    transform: rotate(0deg); transform-origin: center center; transition: transform .25s ease;
  }
  #search-toggle.active .morph-circle { opacity: 0; transform: scale(0); }
  #search-toggle.active .morph-handle { width: 34px; bottom: 50%; right: 50%; transform: translate(50%, 50%) rotate(45deg); }
  #search-toggle.active .morph-handle::after { transform: rotate(90deg); }

  /* Suchfeld in der Kopfzeile, auf Hoehe der Icons. Blendet an Ort und Stelle
     ein wie auf der Stoeberkiste (dort ueberschreibt #search-flyout.search-flyout
     das Hereinfahren mit einem Opacity-Fade). Das Hereinfahren liess den
     Platzhalter ueber das morphende Kreuz gleiten (User 2026-10-09: "ruckelt"). */
  .search-bar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--mobile-header-h); max-height: none;
    z-index: 1000; background: var(--tk-bg); overflow: visible;
    transform: translateZ(0); backface-visibility: hidden; will-change: opacity;
    opacity: 0; visibility: hidden;
    transition: opacity 200ms ease-out, visibility 0s linear 200ms;
  }
  .search-bar.is-open { max-height: none; opacity: 1; visibility: visible; transition: opacity 200ms ease-out, visibility 0s linear 0s; }
  /* Blinkender Ersatz-Cursor wie Stoeberkiste, bis getippt wird */
  .search-bar.fake-caret input { caret-color: transparent; }
  .search-bar.fake-caret::after {
    content: ""; position: absolute; left: 56px; top: 50%; width: 2px; height: 1.35em; background: #fff;
    border-radius: 1px; transform: translateY(-50%); animation: ktCaretBlink 1s step-end infinite; pointer-events: none; z-index: 1;
  }
  .search-bar.fake-caret.typing input { caret-color: #fff; }
  .search-bar.fake-caret.typing::after { display: none; }
  @keyframes ktCaretBlink { 50% { opacity: 0; } }
  /* rechts frei fuer X, Kalender und Hamburger */
  .search-bar-form { height: 100%; max-width: none; margin: 0; padding: 0 176px 0 56px; align-items: center; }
  .search-bar-form input {
    height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff;
    font: 500 1.15rem 'Poppins', sans-serif; caret-color: #fff;
  }
  .search-bar-form input::placeholder { color: rgba(255,255,255,.35); }
  .search-bar-form input:focus { outline: none; }
  .search-bar-form input::-webkit-search-cancel-button { display: none; }
  .search-bar-form button { display: none; }
  body.search-open .logo-row { opacity: 0; visibility: hidden; transition: opacity .2s ease; }
}

/* Suchseite wie die Stoeberkiste (2026-10-07): eigenes Suchfeld, darunter je
   Kategorie ein Dropdown in der Sprache der Menueleiste (blau statt orange) */
.search-filters { max-width: 900px; margin: 1.5rem auto 1rem; padding: 0 1.5rem; box-sizing: border-box; }
.search-filter-form { display: flex; flex-direction: column; gap: 0.8rem; }
.search-filter-searchbar { display: flex; align-items: stretch; background: #fff; border-radius: 6px; overflow: hidden; }
.search-filter-searchbar input {
  flex: 1; min-width: 0; background: transparent; border: none; color: #000; outline: none;
  font: 1rem 'Poppins', sans-serif; padding: 0.7rem 1rem; caret-color: #000;
}
.search-filter-searchbar input::placeholder { color: #888; }
.search-filter-searchbar input::-webkit-search-cancel-button { display: none; }
.search-submit-btn {
  flex-shrink: 0; background: var(--tk-accent); border: none; padding: 0 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.2s;
}
.search-submit-btn svg { width: 22px; height: 22px; }
.search-submit-btn:hover { background: #000; }

.search-filter-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; }
.search-filter-tab { position: relative; }
.filter-tab-toggle {
  display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0; background: none; border: none;
  color: #fff; font: 500 0.95rem 'Poppins', sans-serif; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: color 0.15s;
}
.filter-tab-toggle:hover { color: #ddd; }
.filter-tab-toggle .chevron { transition: transform 0.2s; }
.search-filter-tab.open .filter-tab-toggle,
.filter-tab-toggle.has-selection { color: var(--tk-accent-hell); }
.search-filter-tab.open .filter-tab-toggle .chevron { transform: rotate(180deg); }
.filter-tab-toggle .filter-count {
  background: var(--tk-accent-hell); color: #141414; font-size: 0.66rem; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; box-sizing: border-box;
}
.filter-tab-toggle .filter-count[hidden] { display: none; }
.filter-tab-dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px; max-width: calc(100vw - 16px);
  background: var(--tk-accent); border-radius: 0 0 4px 4px; padding: 0.5rem 0; z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.search-filter-tab.open .filter-tab-dropdown { display: block; }
.filter-tab-dropdown-scroll { max-height: 300px; overflow-y: auto; }
.filter-tab-dropdown label {
  display: block; padding: 0.45rem 1rem; color: #fff; font: 0.875rem 'Poppins', sans-serif; cursor: pointer;
  transition: background-color 0.15s; white-space: nowrap;
}
.filter-tab-dropdown label:hover { background-color: rgba(255, 255, 255, 0.08); color: var(--tk-accent-hell); }
.filter-tab-dropdown input[type="radio"],
.filter-tab-dropdown input[type="checkbox"] { display: none; }
.filter-zeitraum { display: flex; align-items: center; gap: 0.4rem; padding: 0.1rem 1rem 0.5rem; color: #fff; font: 0.8rem 'Poppins', sans-serif; }
.filter-zeitraum input {
  flex: 1; min-width: 0; border: 0; border-radius: 3px; padding: 0.3rem 0.4rem; font: 0.8rem 'Poppins', sans-serif;
  color: #1a1a1a; background: #fff; color-scheme: light;
}
.filter-tab-dropdown label:has(input:checked) { background-color: transparent; color: var(--tk-accent-hell); font-weight: 600; }
.filter-tab-dropdown label:has(input:checked):hover { background-color: rgba(255, 255, 255, 0.08); }

@media (max-width: 768px) {
  /* Wie Stoeberkiste: auf der Suchseite traegt die Seite das Suchfeld, die Lupe oben entfaellt */
  body.suche-seite nav ul.navbar li.search-icon { display: none !important; }
  .search-filters { margin: 0 0 0.5rem; padding: 0; }
  .search-filter-form { gap: 0; }
  .search-filter-searchbar {
    background: var(--tk-bg); border-radius: 0; height: var(--mobile-header-h); position: relative; margin: 0.5rem 0;
  }
  .search-filter-searchbar input {
    color: #fff; font-size: 1.1rem; padding: 0 60px 0 0.8rem; caret-color: #fff; width: 100%; height: 100%; box-sizing: border-box;
  }
  .search-filter-searchbar input::placeholder { color: rgba(255, 255, 255, 0.6); }
  .search-submit-btn {
    background: transparent !important; position: absolute; right: 0; top: 0; width: 48px; height: 100%; padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .search-submit-btn svg { width: 32px; height: 32px; }
  .search-filter-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; padding: 0 0.8rem 0.5rem; }
  /* 44 px Tippflaeche (Daumenregel), Zeilenabstand dafuer enger */
  .search-filter-tab .filter-tab-toggle { min-width: 0; width: 100%; justify-content: space-between; min-height: 44px; -webkit-tap-highlight-color: transparent; }
  /* Toggle und Panel als direkte Grid-Items; drei Tabs = zwei Reihen, Panel in Reihe 3 */
  .search-filter-tab { display: contents; }
  .filter-tab-dropdown {
    position: static; grid-column: 1 / -1; grid-row: 3; width: auto; min-width: 0; max-width: none;
    margin: 0.4rem 0 0; padding: 0.15rem 0 0.35rem; background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0; box-shadow: none;
  }
  .filter-tab-dropdown label { padding: 0.65rem 0; font-size: 1rem; font-weight: 500; line-height: 1.25; white-space: normal; }
  .filter-tab-dropdown label:hover { background: none; }
  .filter-tab-dropdown label:has(input:checked),
  .filter-tab-dropdown label:has(input:checked):hover { background: none; color: var(--tk-accent-hell); font-weight: 600; }
  .filter-tab-dropdown-scroll { max-height: 60vh; }
  /* vier Tabs = zwei Reihen, das Panel bleibt in Reihe 3 */
  .filter-zeitraum { padding: 0.2rem 0 0.6rem; font-size: 0.95rem; }
  .filter-zeitraum input { font-size: 0.95rem; padding: 0.45rem 0.5rem; }
}

/* ── /suche am Desktop wie die Suchleiste der Startseite (2026-10-09) ─────
   User: "nicht zentriert, bitte angleichen ... eckig ist gut". Suchfeld,
   Filter und Trefferzahl stehen in derselben 640er-Spalte wie .search-bar-form,
   Feld und Knopf eckig wie dort. */
@media (min-width: 769px) {
  .theme-dark .search-filters { max-width: 640px; margin: 0 auto 0.5rem; padding: 1rem 1rem 0; }
  .theme-dark .search-filter-searchbar { border-radius: 2px; }
  .theme-dark .search-filter-searchbar input { font: 1rem 'Literata', Georgia, serif; padding: 0.6rem 0.8rem; color: #1a1a1a; }
  .theme-dark .search-filter-searchbar input:focus { outline: 2px solid var(--tk-accent); outline-offset: -2px; }
  .theme-dark .search-filter-searchbar .search-submit-btn { padding: 0 0.85rem; border-radius: 0; }
  .theme-dark .search-filter-searchbar .search-submit-btn svg { width: 20px; height: 20px; }
  .theme-dark .result-count { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; padding: 0 1rem; box-sizing: border-box; text-align: left; }  /* buendig mit Suchfeld und Filtern (User 2026-10-10) */
}

/* ── Karte (2026-10-10): Berlin-Umriss in der Leiste, Datei per Maske in der Textfarbe ── */
.theme-dark nav ul.navbar li.karte-icon { display: flex; align-items: center; margin-left: 0.4rem; }
.karte-symbol {
  display: block; width: 24px; height: 20px; background: currentColor;
  -webkit-mask: url("img/karte-icon.svg") center / contain no-repeat;
  mask: url("img/karte-icon.svg") center / contain no-repeat;
  transition: transform 0.2s;
}
@media (hover: hover) {
  .theme-dark .icon-button:hover .karte-symbol { transform: scale(1.1); }
}

/* Offene Suchleiste mittig zwischen Menueleiste und Ueberschrift (User 2026-10-10):
   die Ueberschrift verliert solange ihren oberen Abstand (2rem), oben und unten je 1rem */
@media (min-width: 769px) {
  .theme-dark main .page-header { transition: padding-top 0.2s ease; }
  body.search-open main .page-header { padding-top: 0; margin-top: -0.35rem; }  /* Leerraum ueber den Versalien ausgleichen */
}

/* ── Kachelfarben (User 2026-10-10, Variante 1 "Bedeutung") ─────────────
   Der Grund der Kachel ist ein heller Ton ihrer Gruppenfarbe aus der Karte
   (Lesung & Vortrag, Politik & Aktion, Film, Musik & Buehne, Sonstiges);
   die Typ-Etiketten tragen die kraeftige Gruppenfarbe der Karte (User 2026-10-10;
   auf Gelb und Gruen dunkle Schrift wegen Kontrast). Ausstellungen gehoeren zu keiner
   Gruppe und wechseln durch gedeckte Pastelle. */
.theme-dark .event-card[data-type] { background: #e6e5e2; }  /* Sonstiges und unbekannte Typen */
.theme-dark .event-card[data-type="lesung"],
.theme-dark .event-card[data-type="diskussion"] { background: #dcd7f6; }
.theme-dark .event-card[data-type="politik"] { background: #f8d3d2; }
.theme-dark .event-card[data-type="film"] { background: #c8ede0; }
.theme-dark .event-card[data-type="konzert"],
.theme-dark .event-card[data-type="theater"],
.theme-dark .event-card[data-type="party"] { background: #fbe8bd; }
.theme-dark .event-type-badge,
.theme-dark .event-type-badge[data-type] { background: #6b6964; color: #fff; }  /* Sonstiges */
.theme-dark .event-type-badge[data-type="lesung"],
.theme-dark .event-type-badge[data-type="diskussion"] { background: #6250d6; color: #fff; }
.theme-dark .event-type-badge[data-type="politik"] { background: #e34948; color: #fff; }
.theme-dark .event-type-badge[data-type="film"] { background: #1baf7a; color: #141414; }
.theme-dark .event-type-badge[data-type="konzert"],
.theme-dark .event-type-badge[data-type="theater"],
.theme-dark .event-type-badge[data-type="party"] { background: #eda100; color: #141414; }
.theme-dark .exhibition-card:nth-child(6n+1) { background: #efe4c9; }
.theme-dark .exhibition-card:nth-child(6n+2) { background: #d6e4ea; }
.theme-dark .exhibition-card:nth-child(6n+3) { background: #dde8d4; }
.theme-dark .exhibition-card:nth-child(6n+4) { background: #f1dbd5; }
.theme-dark .exhibition-card:nth-child(6n+5) { background: #e3dcec; }
.theme-dark .exhibition-card:nth-child(6n+6) { background: #f3e1cc; }
