[data-theme="dark"] {
  --bg-top: #0b0f16;
  --bg-bottom: #121826;
  --ink: #e6e9ef;
  --muted: #a5aebb;
  --title: #e3c88b;
  --accent: #b58a46;
  --accent-strong: #8c6a37;
  --warn: #f59e0b;
  --danger: #ef4444;
  --card: #151c27;
  --border: #273043;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  --header-bg: rgba(12, 16, 24, 0.95);
  --header-border: rgba(60, 70, 90, 0.6);
  --link: #c9a05e;
  --link-hover: #e3bc80;
  /* Semantische Tokens (waren bisher nur im Light-Theme definiert -> im Dark-Mode ungueltig). */
  --surface: #151c27;
  --text: #e6e9ef;
  --text-muted: #a5aebb;
  --red: #ef4444;
  --success: #22c55e;
  --surface2: #1b2434;
  --accent-tint: rgba(181, 138, 70, 0.12);
  --warn-tint: rgba(245, 158, 11, 0.10);
}

/* Fallback-Definitionen, damit --surface/--text/--red auch ausserhalb der Theme-Bloecke
   niemals leer sind (Defense-in-Depth gegen fehlende Token). */
:root {
  --surface: #151c27;
  --text: #e6e9ef;
  --text-muted: #a5aebb;
  --red: #ef4444;
  --success: #22c55e;
  --surface2: #1b2434;
  --accent-tint: rgba(181, 138, 70, 0.12);
  --warn-tint: rgba(245, 158, 11, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-family: "Almendra Sans", "Segoe UI", sans-serif;
    line-height: 1.5;
    background: radial-gradient(circle at 20% -10%, rgba(179, 140, 70, 0.15), transparent 45%),
                radial-gradient(circle at 90% 0%, rgba(84, 105, 138, 0.18), transparent 48%),
                linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  }

h1, h2, h3, h4, h5 {
    color: var(--title);
}

.brand {
    color: var(--title);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  /* Leaflet vergibt seinen Panes/Controls bis 1000. Der Header muss darueber
     liegen, aber unter den Modals (1200/1300), sonst deckt er sie zu. */
  z-index: 1100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(6px);
}

.nav-wrap {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.18rem;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.94rem;
}

/* ── Hamburger button (mobile only) ──────────────────────── */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--title);
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
}


@media (max-width: 760px) {
  .nav-hamburger { display: block; }
  .nav-right { gap: 6px; }
  /* Theme-Toggle bleibt auch mobil sichtbar (Nutzer sollen Dark/Light umschalten koennen). */
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 14px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a,
  .main-nav .nav-submit-event,
  .main-nav .nav-dropdown {
    width: 100%;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav .nav-dropdown:last-child,
  .main-nav a:last-child { border-bottom: none; }
  .main-nav .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    border-radius: 6px;
    margin-top: 4px;
  }
}

.main-content {
  padding-top: 8px;
  padding-bottom: 40px;
}

.nav-submit-event {
  color: var(--accent) !important;
  font-weight: 600;
  border: 1px solid rgba(181, 138, 70, 0.45);
  border-radius: 5px;
  padding: 2px 9px;
}

.nav-submit-event:hover {
  background: rgba(181, 138, 70, 0.12);
}

/* ── Event-Einreichen Hub ──────────────────────────────── */
.submit-hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.submit-hub--three {
  grid-template-columns: repeat(3, 1fr);
}
.submit-hub--four {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) {
  .submit-hub--four {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .submit-hub,
  .submit-hub--three,
  .submit-hub--four {
    grid-template-columns: 1fr;
  }
}
.submit-hub-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.75rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s, transform .1s;
}
.submit-hub-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.submit-hub-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.submit-hub-card h2 {
  margin: 0;
  font-size: 1.15rem;
}
.submit-hub-card p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-muted);
  flex: 1;
}
.submit-hub-benefits {
  list-style: none;
  padding: 0;
  margin: .25rem 0;
  font-size: .88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}
.submit-hub-btn {
  margin-top: .5rem;
  align-self: flex-start;
  pointer-events: none;
}
.submit-hub-card--storyteller {
  border-color: rgba(181, 138, 70, 0.35);
}
.submit-hub-card--storyteller:hover {
  border-color: var(--accent);
  background: rgba(181, 138, 70, 0.06);
}
.submit-hub-card--community {
  border-color: rgba(100, 160, 100, 0.3);
}
.submit-hub-card--community:hover {
  border-color: #6ab06a;
  background: rgba(100, 160, 100, 0.06);
}
.submit-hub-card--con {
  border-color: rgba(139, 92, 246, 0.35);
}
.submit-hub-card--con:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.07);
}

/* ── Con / Festival (Mutter-Events) ──────────────────────────── */
.badge-con {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.45);
}
.event-card-con {
  border-left: 3px solid rgba(139, 92, 246, 0.5);
}
.con-schedule-day {
  margin-top: 1.25rem;
}
.con-schedule-day > h3 {
  margin: 0 0 .5rem;
  font-size: 1.02rem;
  color: var(--title, #e3c88b);
  border-bottom: 1px solid var(--border);
  padding-bottom: .25rem;
}
.con-round {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: .5rem;
  background: var(--card);
}
.con-round-meta {
  font-size: .9rem;
  color: var(--muted);
}

/* ── Nav Bell ────────────────────────────────────────────── */
.nav-bell-toggle {
  position: relative;
  background: transparent;
  /* Neutraler Rahmen im Ruhezustand — Dringlichkeit signalisiert nur das rote Badge. */
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.nav-bell-toggle:hover,
.nav-bell-toggle[aria-expanded="true"] {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.nav-bell-icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

.nav-notif-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 6px;
  flex-shrink: 0;
}

/* ── Nav Dropdown ─────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: transparent;
  border: 1px solid rgba(181, 138, 70, 0.4);
  border-radius: 8px;
  color: var(--link);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
  background: rgba(181, 138, 70, 0.12);
  color: #e3bc80;
  border-color: rgba(181, 138, 70, 0.7);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 100;
}

.nav-dropdown-menu.is-open {
  display: block;
}

.nav-dropdown-menu li a,
.nav-dropdown-logout {
  display: block;
  width: 100%;
  padding: 8px 14px;
  color: var(--ink);
  font-size: 0.93rem;
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-dropdown-menu li a:hover,
.nav-dropdown-logout:hover {
  background: rgba(181, 138, 70, 0.1);
  color: #e3bc80;
  text-decoration: none;
}

.nav-dropdown-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.nav-dropdown-logout {
  color: #fca5a5;
}

.nav-dropdown-logout:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
}

/* ── Hero ──────────────────────────────────────────────── */
.hero-section {
  text-align: center;
  padding: 32px 16px 24px;
  margin-bottom: 24px;
}
.hero-headline {
  margin: 0 0 6px;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--title);
}
.hero-sub {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--muted);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ── Search Card ──────────────────────────────────────── */
.search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.search-card-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
}
.map-wrap {
  margin-top: 14px;
}
.map-toggle-bar {
  display: none;
}
.map-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.88rem;
  padding: 8px 16px;
  cursor: pointer;
  width: 100%;
}
.map-toggle-btn:hover {
  background: rgba(181, 138, 70, 0.1);
}

.hero {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f2a20, #132238);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.hero h1 {
  margin-top: 0;
}

.hero-lean {
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(74, 87, 110, 0.6);
}

.hero-lean-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-lean h1 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.hero-lean p {
  margin: 3px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.panel h1,
.panel h2,
.panel h3 {
  margin-top: 0;
}

.panel-secondary {
  background: rgba(21, 28, 39, 0.6);
  border-color: rgba(39, 48, 67, 0.6);
  box-shadow: none;
}

.panel-slim {
  padding: 10px 12px;
  border-radius: 10px;
}

.api-docs-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.api-docs-nav__col strong {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted, #8892a4);
  margin-bottom: 6px;
}

.api-docs-nav__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.api-docs-nav__col ul a {
  font-size: .85rem;
  font-family: monospace;
}

.report-panel h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.max-w {
  max-width: 720px;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

/* Dunkle Defaults (Dark ist das Standard-Theme); Light-Werte im Light-Block. */
.flash-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

.flash-success {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="light"] .flash-error {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fecaca;
}

[data-theme="light"] .flash-success {
  background: #dcfce7;
  color: #14532d;
  border-color: #bbf7d0;
}

.flash-link {
  display: inline-block;
  margin-left: .6em;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  white-space: nowrap;
}
.flash-link:hover {
  opacity: .75;
}

.flash-info {
  background: #1e3a5f;
  color: #bfdbfe;
  border-color: #3b82f6;
}
[data-theme="light"] .flash-info {
  background: #dbeafe;
  color: #1e3a5f;
  border-color: #93c5fd;
}

.form-grid,
.filter-grid {
  display: grid;
  gap: 10px;
}

.filter-collapsed {
  display: none;
  margin-top: 10px;
}

.filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-head h1,
.filter-head h2 {
  margin: 0;
}

.filter-toggle-btn.slim {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
  background: var(--card);
  color: var(--accent);
  border-color: rgba(181, 138, 70, 0.6);
}

.filter-toggle-btn.slim:hover {
  background: rgba(181, 138, 70, 0.18);
  color: var(--title);
  border-color: rgba(181, 138, 70, 0.9);
}

.filter-toggle-btn.slim.is-open {
  transform: rotate(180deg);
}

.form-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle),
.filter-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  font-size: 0.94rem;
}

.form-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) input,
.form-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) select,
.form-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) textarea,
.filter-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) input,
.filter-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) select,
.filter-grid label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) textarea {
  flex: 0 0 100%;
  margin-top: 2px;
}

.required-marker {
  color: var(--danger);
  font-size: 0.85em;
  line-height: 1;
}

.form-grid-slim {
  gap: 6px;
}

.form-grid-slim label:not(.checkbox, .switch, .checkbox-modern, .chip-toggle) {
  font-size: 0.88rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.85);
}

input[type="date"],
input[type="time"] {
  color-scheme: dark;
}
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"] {
  color-scheme: light;
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}

textarea {
  resize: vertical;
}

button,
.btn {
  border: 1px solid var(--accent-strong);
  border-radius: 8px;
  background: var(--accent);
  color: #1b1308;
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-block;
}

button:hover,
.btn:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.btn-slim {
  padding: 5px 9px;
  font-size: 0.86rem;
}

.btn-ghost {
  background: var(--card);
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--border);
  color: var(--title);
  border-color: var(--accent);
}

.btn-danger-ghost {
  background: var(--card);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.45);
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.65);
}

/* Muss NACH .btn stehen: gleiche Spezifitaet, sonst gewinnt der volle
   Gold-Hintergrund von .btn und der Outline-Button ist keiner mehr. */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(181, 138, 70, 0.7);
}

.btn-outline:hover {
  background: var(--accent);
  color: #1b1308;
  border-color: var(--accent);
}

.inline-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.storyteller-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin: 2px 0;
  font-size: 0.92rem;
}

.storyteller-line .inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.storyteller-line .follow-star-btn,
.storyteller-line > a[aria-label="Einloggen zum Folgen"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  margin: 0;
  line-height: 1;
  transform: none;
  vertical-align: middle;
}

.event-rating {
  color: var(--muted);
  font-size: 0.88rem;
}

.follow-star-btn {
  border: 0;
  background: transparent;
  color: #b45309;
  padding: 0 2px;
  font-size: 1.05rem;
  line-height: 1;
}

.follow-star-btn:hover {
  background: transparent;
  color: #92400e;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  line-height: 1.35;
}

.form-grid label.checkbox,
.filter-grid label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}

.inline-check {
  margin-right: 6px;
}

/* ── Switch (iOS-Style Pill-Slider) ──────────────────── */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.94rem;
  line-height: 1.35;
  user-select: none;
}
.switch input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 40px;
  height: 22px;
  background: rgba(148, 163, 184, 0.3);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  margin: 0;
  transition: background 0.2s, border-color 0.2s;
}
.switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.switch input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}
.switch input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.switch input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.switch:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Modern Square Checkbox (mit Häkchen) ────────────── */
.checkbox-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.94rem;
  line-height: 1.35;
}
.checkbox-modern input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  transition: background 0.15s, border-color 0.15s;
}
.checkbox-modern input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-modern input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-modern input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Chip-Toggle (generalisierte Pill-Chips) ─────────── */
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  background: var(--card);
  cursor: pointer;
  font-size: 0.88rem;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip-toggle:hover {
  border-color: var(--accent);
}
.chip-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-toggle:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ── Segmented Control (Radio-Tabs) ──────────────────── */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  font-size: 0.88rem;
}
.segmented label {
  padding: 6px 16px;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.segmented label:last-child {
  border-right: 0;
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented label:has(input:checked) {
  background: var(--accent);
  color: #fff;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 8px 6px;
  vertical-align: top;
}

.data-table tr.status-confirmed td {
  background: rgba(34, 197, 94, 0.18);
  color: #d1fae5;
}

.data-table tr.status-pending td {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.data-table tr.status-attended td {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.data-table tr.status-muted td {
  background: rgba(71, 85, 105, 0.15);
  color: var(--muted);
}
.data-table tr.row-pending-highlight td {
  border-top: 2px solid #f59e0b;
  border-bottom: 2px solid #f59e0b;
}
.data-table tr.row-pending-highlight td:first-child {
  border-left: 4px solid #f59e0b;
}
.data-table tr.row-pending-highlight td:last-child {
  border-right: 2px solid #f59e0b;
}

.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: lowercase;
}

.status-badge.status-confirmed {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.status-badge.status-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.status-badge.status-attended {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.event-card h3 {
  margin: 0 0 6px;
}

.event-card-lean {
  padding: 9px 10px;
  border-radius: 8px;
}

.event-card-lean h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

/* Event card with image */
.event-card-has-image {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.event-card-img-wrap {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 110px;
  /* no overflow:hidden here — parent .event-card-has-image handles clipping */
}

.event-card-img {
  /* fills the wrap via absolute so the flex-stretch height resolves correctly */
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.event-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Flag / report button on event images */
.img-flag-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 3px 6px;
  font-size: .75rem;
  line-height: 1;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  z-index: 3;
  white-space: nowrap;
  pointer-events: auto;
}

.event-card-img-wrap:hover .img-flag-btn,
.event-detail-img-wrap:hover .img-flag-btn {
  opacity: 1;
}

.img-flag-btn:hover {
  background: rgba(180,30,30,.8);
  opacity: 1;
}

.img-flag-btn--lightbox {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 7px 14px;
  font-size: .9rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  cursor: pointer;
  opacity: .85;
  transition: opacity .15s, background .15s;
  z-index: 9002;
}

.img-flag-btn--lightbox:hover {
  background: rgba(180,30,30,.85);
  opacity: 1;
}

.event-card-has-image .event-card-body {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
}

/* Event detail image */
.event-detail-img-wrap {
  margin-bottom: 1rem;
}

.event-detail-thumb {
  max-height: 220px;
  max-width: 100%;
  border-radius: .5rem;
  display: block;
  object-fit: cover;
}

/* Lightbox */
.event-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-img-lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: .5rem;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.event-img-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  z-index: 9001;
  opacity: .8;
}

.event-img-lightbox-close:hover { opacity: 1; }

.event-meta {
  margin: 2px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.event-datetime {
  font-weight: 700;
  color: var(--ink);
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(226, 232, 240, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.badge-wa {
  background: rgba(37, 211, 102, 0.18);
  color: #6ee7a0;
  border-color: rgba(37, 211, 102, 0.35);
}

.badge-muted {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}

.badge-beginner {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.35);
}

.badge-fee {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.38);
}

.badge-free-ok {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.35);
}

.badge-free-low {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge-free-none {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
}

.badge-waitlist {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
}

.badge-waitlist-hint {
  background: rgba(180, 120, 30, 0.18);
  color: #e0a040;
  border-color: rgba(180, 120, 30, 0.38);
}

.badge-series {
  background: rgba(140, 106, 55, 0.25);
  color: #d4a76a;
  border-color: rgba(140, 106, 55, 0.45);
}

.badge-alt-event {
  background: rgba(56, 130, 230, 0.18);
  color: #7db8f7;
  border-color: rgba(56, 130, 230, 0.38);
}

.series-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0 .25rem;
  padding: .45rem .75rem;
  background: var(--card, #1e2a38);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: .5rem;
  font-size: .85rem;
}

.alt-event-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  background: rgba(56, 130, 230, 0.1);
  border: 1px solid rgba(56, 130, 230, 0.35);
  border-radius: .5rem;
  font-size: .92rem;
}
.alt-event-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
[data-theme="light"] .alt-event-banner {
  background: rgba(56, 130, 230, 0.06);
  border-color: rgba(56, 130, 230, 0.22);
}
.series-nav-title {
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}
.series-nav-recurrence {
  font-weight: 400;
  font-size: .85em;
  color: var(--muted);
}
.series-nav-arrows {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.series-nav-link {
  color: var(--accent, #8c6a37);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.series-nav-link:hover { text-decoration: underline; }
.series-nav-disabled {
  color: var(--text-muted, #94a3b8);
  font-size: .85rem;
  white-space: nowrap;
}

.badge-new {
  background: rgba(14, 165, 233, 0.18);
  color: #bae6fd;
  border-color: rgba(14, 165, 233, 0.35);
}

.badge-status {
  background: rgba(94, 106, 123, 0.25);
  color: #e2e8f0;
  border-color: rgba(94, 106, 123, 0.4);
}

.badge-private {
  background: rgba(124, 58, 237, 0.2);
  color: #e9d5ff;
  border-color: rgba(124, 58, 237, 0.4);
}

.badge-traveller {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.4);
}

.badge-beginner::before,
.badge-private::before,
.badge-traveller::before,
.badge-waitlist::before {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.8rem;
  opacity: 0.85;
}

.badge-beginner::before {
  content: "\2726";
}

.badge-private::before {
  content: "\25C6";
}

.badge-traveller::before {
  content: "\27A4";
}

.badge-waitlist::before {
  content: "\231B";
}

.badge-community {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.4);
}

.badge-community::before {
  content: "\2605";
  display: inline-block;
  margin-right: 4px;
  font-size: 0.8rem;
  opacity: 0.85;
}

.contributor-star {
  display: inline-block;
  background: linear-gradient(120deg, #c026d3, #7c3aed, #2563eb, #0891b2, #059669, #d97706, #c026d3);
  background-size: 300% 300%;
  animation: contributor-shimmer 5s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.9em;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
}

@keyframes contributor-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.greenlist-badge {
  display: inline-block;
  color: #f59e0b;
  font-size: 0.8em;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
  margin-left: 1px;
}

.badge-contributor,
[data-theme="light"] .badge-contributor {
  background: linear-gradient(120deg, #c026d3, #7c3aed, #2563eb, #0891b2, #059669, #d97706, #c026d3) !important;
  background-size: 300% 300% !important;
  animation: contributor-shimmer 5s linear infinite !important;
  color: #fff !important;
  border: 1px solid rgba(192, 38, 211, 0.6) !important;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.6), 0 0 24px rgba(37, 99, 235, 0.35), 0 0 40px rgba(192, 38, 211, 0.2) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  letter-spacing: 0.03em;
}

.badge-contributor::before {
  content: "\2736";
  display: inline-block;
  margin-right: 4px;
  font-size: 0.75rem;
}

.event-card-community {
  border-left: 3px solid rgba(20, 184, 166, 0.5);
}

/* Community event map marker */
.map-external-icon-wrap {
  background: transparent !important;
  border: none !important;
}

.map-external-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.85);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.map-search-icon-wrap {
  background: transparent !important;
  border: none !important;
}

.map-search-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366f1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-search-badge {
  display: inline-block;
  background: #6366f1;
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}

.map-partner-icon-wrap {
  background: transparent !important;
  border: none !important;
}

.map-partner-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #8b5cf6;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transform: rotate(45deg);
}

.map-legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  vertical-align: middle;
  margin-right: 4px;
}

.map-con-icon-wrap {
  background: transparent !important;
  border: none !important;
}
.map-con-icon {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: rgba(139, 92, 246, 0.92);
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.map-con-icon > * {
  transform: rotate(45deg);
}

/* Popup badge for community events */
.popup-community-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(20, 184, 166, 0.25);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.5);
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Duplicate modal ─────────────────────────────────────── */
.dup-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dup-modal-backdrop[hidden] {
  display: none;
}

.dup-modal {
  background: var(--surface);
  border: 1px solid rgba(181,138,70,0.4);
  border-radius: 8px;
  padding: 28px 24px;
  max-width: 520px;
  width: 100%;
}

.dup-modal h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--accent);
}

.dup-list {
  margin: 10px 0 14px 0;
  padding-left: 18px;
}

.dup-list li {
  margin-bottom: 6px;
  font-size: 0.93rem;
}

.dup-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Info-box slim (inline hints) ────────────────────────── */
.info-box-slim {
  background: rgba(181,138,70,0.07);
  border: 1px solid rgba(181,138,70,0.25);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.93rem;
}

/* Contact list in detail view */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.contact-list li {
  padding: 4px 0;
}

.event-cta {
  margin-top: 6px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.stats-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.stats-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--title);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(181, 138, 70, 0.12);
  border: 1px solid rgba(181, 138, 70, 0.3);
  font-size: 0.86rem;
  color: #c9a05e;
}
.participant-chip:hover {
  background: rgba(181, 138, 70, 0.2);
  text-decoration: none;
}
.participant-plus {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(181, 138, 70, 0.25);
  border: 1px solid rgba(181, 138, 70, 0.45);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: inherit;
}
[data-theme="light"] .participant-plus {
  background: rgba(140, 106, 55, 0.14);
  border-color: rgba(140, 106, 55, 0.3);
}

.script-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

.script-green {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.script-orange {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.script-red {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.script-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.86rem;
}

.script-option.script-green {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.35);
}

.script-option.script-orange {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.35);
}

.script-option.script-red {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
}

/* ── Difficulty Badges ─────────────────────────────────── */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.difficulty-1  { background: #86efac; color: #14532d; }
.difficulty-2  { background: #4ade80; color: #14532d; }
.difficulty-3  { background: #a3e635; color: #365314; }
.difficulty-4  { background: #facc15; color: #78350f; }
.difficulty-5  { background: #fb923c; color: #7c2d12; }
.difficulty-6  { background: #f97316; color: #7c2d12; }
.difficulty-7  { background: #ea580c; color: #fff; }
.difficulty-8  { background: #ef4444; color: #fff; }
.difficulty-9  { background: #dc2626; color: #fff; }
.difficulty-10 { background: #b91c1c; color: #fff; }

/* ── Difficulty Slider (Formular) ──────────────────────── */
.difficulty-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 12px;
}

.difficulty-track-wrap {
  position: relative;
}

.difficulty-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--thumb-color, #fb923c) 0%,
    var(--thumb-color, #fb923c) var(--fill-pct, 0%),
    rgba(148,163,184,0.3) var(--fill-pct, 0%)
  );
  outline: none;
  cursor: pointer;
}
.difficulty-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb-color, #fb923c);
  border: 3px solid var(--card, #1e293b);
  box-shadow: 0 0 0 2px var(--thumb-color, #fb923c);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.difficulty-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb-color, #fb923c);
  border: 3px solid var(--card, #1e293b);
  box-shadow: 0 0 0 2px var(--thumb-color, #fb923c);
  cursor: pointer;
}
.difficulty-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(251,146,60,0.4); }

.difficulty-labels-row {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}
.difficulty-tick {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  cursor: default;
  user-select: none;
  transition: color 0.15s, font-weight 0.15s;
}
.difficulty-tick.active {
  color: var(--text, #f1f5f9);
  font-weight: 700;
}

.difficulty-label-current {
  min-height: 26px;
  display: flex;
  align-items: center;
}

/* ── Difficulty Doppel-Slider (Filter) ─────────────────── */
.filter-difficulty-range { display: flex; flex-direction: column; gap: 6px; }
.diff-range-wrap { display: flex; flex-direction: column; gap: 4px; }
.diff-range-track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}
.diff-range-fill {
  position: absolute;
  height: 6px;
  background: linear-gradient(to right, #86efac, #fb923c, #b91c1c);
  border-radius: 3px;
  pointer-events: none;
}
.diff-range-thumb {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
}
.diff-range-thumb::-webkit-slider-thumb { pointer-events: all; }
.diff-range-thumb::-moz-range-thumb     { pointer-events: all; }
/* Hintergrund-Track für Doppel-Slider */
.diff-range-track::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 6px;
  background: rgba(148,163,184,0.25);
  border-radius: 3px;
}
.diff-range-labels {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Script-Pill Toggle (Formular) ─────────────────────── */
.script-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}
.script-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(148,163,184,0.4);
  background: var(--card-hover, rgba(255,255,255,0.05));
  cursor: pointer;
  font-size: 0.88rem;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.script-pill-toggle:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.script-pill-toggle.checked {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.script-pill-link {
  font-size: 0.78rem;
  opacity: 0.6;
  text-decoration: none;
}
.script-pill-link:hover { opacity: 1; }

/* ── Custom Script Add-Form ────────────────────────────── */
.script-standard-group { margin: 8px 0; }

details.script-custom-group {
  margin: 8px 0;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.script-custom-summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 12px;
  font-size: .88rem;
  color: var(--text-muted, #94a3b8);
  user-select: none;
}
.script-custom-summary::-webkit-details-marker { display: none; }
details.script-custom-group[open] .script-custom-summary { border-bottom: 1px solid rgba(148,163,184,0.2); }

.script-custom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.script-custom-col {
  padding: 8px 10px;
  border-right: 1px solid rgba(148,163,184,0.15);
}
.script-custom-col:last-child { border-right: none; }

.script-custom-col-header {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
}

.script-custom-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
}
.script-custom-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.script-custom-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.new-custom-script-wrap {
  margin-top: 10px;
  border: 1px dashed rgba(148,163,184,0.3);
  border-radius: 8px;
  padding: 6px 12px;
}
.new-custom-script-wrap summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  padding: 4px 0;
  list-style: none;
}
.new-custom-script-wrap summary::-webkit-details-marker { display: none; }
.new-custom-script-wrap[open] summary { color: var(--text, #f1f5f9); }
.new-custom-script-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* ── Calendar chip difficulty colors ───────────────────── */
.chip-diff-1,.chip-diff-2,.chip-diff-3 { border-left-color: #4ade80 !important; }
.chip-diff-4,.chip-diff-5,.chip-diff-6 { border-left-color: #fb923c !important; }
.chip-diff-7,.chip-diff-8,.chip-diff-9,.chip-diff-10 { border-left-color: #ef4444 !important; }

#map {
  width: 100%;
  height: 520px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.map-fallback {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  background: var(--card);
}

.map-fallback iframe {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 8px;
}

.map-fallback p {
  margin: 8px 4px 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.map-aggregate-icon-wrap {
  background: transparent;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
}

.map-aggregate-icon {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
  background: #0f766e;
  border: 2px solid #0b4f49;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekday {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.calendar-day {
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-day.is-empty {
  background: #0f1520;
  border-style: dashed;
}

.calendar-day-number {
  font-weight: 700;
  font-size: 0.9rem;
}

/* Der aktuelle Tag muss auf einen Blick auffindbar sein. */
.calendar-day.is-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day-number {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.calendar-today-flag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

/* "+3 weitere": deckelt die Zeilenhoehe, statt einen vollen Tag die ganze
   Kalenderwoche aufziehen zu lassen. */
.calendar-more > summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 2px 0;
}
.calendar-more > summary:hover {
  color: var(--title);
}
.calendar-more[open] > summary {
  margin-bottom: 6px;
}
.calendar-more .calendar-event-chip + .calendar-event-chip {
  margin-top: 6px;
}

.calendar-event-chip {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  padding: 5px 6px;
  font-size: 0.84rem;
}

.calendar-event-chip span:last-child {
  color: #4f646f;
  font-size: 0.8rem;
}

.calendar-event-chip.chip-green {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
}

.calendar-event-chip.chip-orange {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
}

.calendar-event-chip.chip-red {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
}

.calendar-event-chip.chip-community {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.35);
  color: #5eead4;
}

.calendar-event-chip.chip-completed {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.calendar-event-chip.chip-completed span:last-child {
  color: #94a3b8;
}

.inline-rating-form {
  border: 1px solid #e1e8ed;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  display: grid;
  gap: 8px;
}
.batch-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--panel, #fff);
  border: 1px solid #e1e8ed;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}
.batch-bar[hidden] { display: none; }
.status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.status-label {
  font-weight: 600;
  color: var(--muted);
}
.rating-fields {
  display: grid;
  gap: 8px;
}
.star-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.star-label {
  min-width: 150px;
  font-weight: 600;
}
.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 3px;
}
.star-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.star-rating label {
  font-size: 1.25rem;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.15s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #f59e0b;
}

.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.danger-btn {
  background: var(--danger);
  border-color: #7f1d1d;
  color: #fff5f5;
}

.danger-btn:hover {
  background: #dc2626;
  border-color: #991b1b;
  color: #fff5f5;
}

.btn-success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}
.btn-success:hover {
  background: rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.6);
}

.btn-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.btn-warn:hover {
  background: rgba(245, 158, 11, 0.28);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.6);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 30px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 23, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}

.modal-card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  padding: 16px;
}

.modal-card h2 {
  margin: 0 0 8px;
}

.modal-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1201;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.9rem;
}

.admin-heatmap {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbfd;
}

.hint {
  margin: 8px 4px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.info-box h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.info-list {
  margin: 0 0 6px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-steps {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}

.info-highlight {
  margin: 6px 0 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  display: inline-block;
}
.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.suggestion-chip {
  background: rgba(181, 138, 70, 0.1);
  border: 1px solid rgba(181, 138, 70, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.86rem;
  color: #c9a05e;
  cursor: pointer;
}
.suggestion-chip:hover {
  background: rgba(181, 138, 70, 0.2);
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Nickname form ────────────────────────────────────── */
.nickname-form { display: inline-flex; align-items: center; gap: .25rem; }
.nickname-toggle:hover { opacity: 1 !important; }

/* ── Community logo theme switching ──────────────────── */
.community-logo-dark { display: none; }
[data-theme="dark"] .community-logo-light { display: none; }
[data-theme="dark"] .community-logo-dark { display: block; }

@media (min-width: 760px) {
  .form-grid,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-lean-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.form-grid fieldset {
  grid-column: 1 / -1;
}

.form-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.form-box legend {
  font-weight: 600;
  padding: 0 6px;
}

/* ── Formular-Wizard (Anlegen von Event und Con): Fortschrittsbalken,
   Schritt-Panels und Navigation. Vorher inline in event_form.php. ── */
.wizard-progress-wrap { position: relative; margin-bottom: 28px; padding: 0 2px; }
.wizard-track { position: absolute; top: 15px; left: calc(10% + 2px); right: calc(10% + 2px); height: 2px; background: var(--border); border-radius: 2px; }
.wizard-track-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width .35s ease; }
.wizard-bar { display: flex; position: relative; z-index: 1; }
/* Button-Reset, Cursor und Fokusring fuer .wizard-step-item stehen beim
   uebrigen Wizard-Feinschliff weiter unten in dieser Datei. */
.wizard-step-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.wizard-step-item.done { cursor: pointer; }
.wizard-step-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; transition: border-color .25s, background .25s, box-shadow .25s; }
.wizard-step-item.active .wizard-step-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.wizard-step-item.done .wizard-step-dot { border-color: var(--accent); background: var(--card); }
.wizard-step-item.done:hover .wizard-step-dot { background: color-mix(in srgb, var(--card) 88%, var(--accent) 12%); }
.wizard-step-num { font-size: .75rem; font-weight: 700; color: var(--muted); line-height: 1; transition: color .25s; }
.wizard-step-item.active .wizard-step-num { color: #1b1308; }
.wizard-step-item.done .wizard-step-num { color: var(--accent); font-size: .8rem; }
.wizard-step-label { font-size: .7rem; color: var(--muted); text-align: center; white-space: nowrap; transition: color .25s, font-weight .1s; }
.wizard-step-item.active .wizard-step-label { color: var(--accent); font-weight: 600; }
.wizard-step-item.done .wizard-step-label { color: rgba(181, 138, 70, .65); }
.wizard-panel, .wizard-nav { grid-column: 1 / -1; }
.wizard-panel[hidden] { display: none; }
.wizard-nav { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 4px; padding: 16px 0 0; border-top: 1px solid var(--border); }
.wizard-nav .btn { min-width: 110px; }
.wizard-prev { margin-right: auto; }
/* Abbrechen-Link im Wizard: steht links, Zurueck/Weiter bleiben rechts zusammen. */
.wizard-cancel { margin-right: auto; }
@media (max-width: 420px) {
  .wizard-step-label { display: none; }
  .wizard-step-dot { width: 26px; height: 26px; }
  .wizard-track { top: 13px; }
}

/* Pflichtfeld-Markierung: neutraler Akzent in Markenfarbe. Rot signalisiert
   einen Fehler — bei einem noch unausgefuellten (oder korrekt vorbelegten)
   Feld liest sich das als Fehlermeldung, obwohl nichts falsch ist. Die
   Textmarkierung uebernimmt .required-marker / .form-required-star. */
input[required],
select[required],
textarea[required] {
  border-left: 3px solid rgba(181, 138, 70, 0.7) !important;
}
[data-theme="light"] input[required],
[data-theme="light"] select[required],
[data-theme="light"] textarea[required] {
  border-left: 3px solid rgba(140, 106, 55, 0.6) !important;
}

/* Rot erst, wenn der Nutzer das Feld tatsaechlich fehlerhaft ausgefuellt oder
   beim Absenden leer gelassen hat. :user-invalid greift — anders als :invalid —
   nicht schon beim Laden der Seite. */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-left-color: rgba(239, 68, 68, 0.85) !important;
  border-color: rgba(239, 68, 68, 0.85);
  background: color-mix(in srgb, #0f172a 94%, #ef4444 6%) !important;
}
[data-theme="light"] input:user-invalid,
[data-theme="light"] select:user-invalid,
[data-theme="light"] textarea:user-invalid {
  border-left-color: rgba(220, 38, 38, 0.8) !important;
  border-color: rgba(220, 38, 38, 0.6);
  background: color-mix(in srgb, #fff 94%, #ef4444 6%) !important;
}

/* ── Trust chips ──────────────────────────────────────────── */
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(21, 28, 39, 0.85);
  border: 1px solid var(--border);
  color: var(--muted);
}

.trust-icon {
  font-size: 0.72rem;
  line-height: 1;
}

/* ── Quick filter bar ─────────────────────────────────────── */
.filter-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.filter-quick label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.88rem;
  min-width: 120px;
  flex: 1;
}

.filter-quick label.checkbox {
  flex-direction: row;
  align-items: center;
  align-self: center;
  min-width: auto;
  flex: 0;
  white-space: nowrap;
}

/* ── Filter toggle chip (Anfängerfreundlich) ─────────────── */
.filter-chip-wrap {
  display: inline-flex;
  align-self: flex-end;
  margin-bottom: 1px;
}
.filter-chip-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background .15s, color .15s, border-color .15s;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--text-muted);
  background: transparent;
}
.filter-chip:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}
.filter-chip-input:checked + .filter-chip--beginner {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.55);
}
[data-theme="light"] .filter-chip {
  border-color: rgba(14, 165, 233, 0.3);
  color: #64748b;
}
[data-theme="light"] .filter-chip:hover {
  border-color: rgba(14, 165, 233, 0.55);
  color: #0369a1;
}
[data-theme="light"] .filter-chip-input:checked + .filter-chip--beginner {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.45);
}

.filter-quick .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.filter-advanced-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* View Switcher (Karte / Liste / Kalender) */
.view-switcher {
  display: flex;
  align-items: center;
  border: 1px solid rgba(181,138,70,.45);
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
  align-self: flex-end;
}

.view-btn {
  display: inline-block;
  padding: 5px 13px;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border-right: 1px solid rgba(181,138,70,.35);
  white-space: nowrap;
  transition: background .15s, color .15s;
  line-height: 1.6;
}

.view-btn:last-child {
  border-right: none;
}

.view-btn:hover {
  background: rgba(181,138,70,.15);
  color: var(--text);
}

.view-btn--active {
  background: rgba(181,138,70,.22);
  color: var(--accent);
  font-weight: 600;
}

/* ── How it works ─────────────────────────────────────────── */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.how-step {
  text-align: center;
  padding: 14px 10px;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #1b1308;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
}

.how-step h3 {
  margin: 6px 0;
  font-size: 1rem;
}

.how-step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Social proof (mini stats) ────────────────────────────── */
.social-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  text-align: center;
}

.social-proof-item {
  padding: 10px 6px;
}

.social-proof-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--title);
  line-height: 1.1;
}

.social-proof-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Split view (events page) ─────────────────────────────── */
.split-view {
  display: grid;
  gap: 16px;
}

.split-view #map {
  height: 100%;
  min-height: 400px;
}

.split-map-wrap {
  position: sticky;
  top: 60px;
}

@media (min-width: 960px) {
  .split-view {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* Bewusst KEIN eigener Scroll-Container: verschachtelte Scrollbereiche neben
     der Karte fuehren dazu, dass je nach Mausposition Liste, Seite oder Karte
     scrollt. Die Liste laeuft im Seitenfluss, die Karte bleibt sticky. */
  .split-list {
    padding-right: 6px;
  }
}

/* ── Storyteller info page ────────────────────────────────── */
.st-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.st-benefit {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.st-benefit h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.st-benefit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.st-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 600px) {
  .st-comparison {
    grid-template-columns: 1fr;
  }
}

.st-comparison-col {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.st-comparison-col h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.st-comparison-col ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}


/* ── Dashboard ──────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 4px;
  flex-wrap: wrap;
}
.dash-header h1 { margin: 0; font-size: 1.6rem; }
.dash-sub {
  margin: 2px 0 20px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Kompakte Statistik-Zeile statt grosser KPI-Kacheln. */
.dash-statline {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}
.dash-statline strong { color: var(--text); font-weight: 600; }

.dash-status-on  { color: var(--success); font-size: 0.9rem; margin: 0 0 8px; }

/* ── "Steht an": eine ruhige Aufgabenliste statt vieler CTA-Boxen ── */
.dash-tasks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--accent-strong);
  border-radius: 12px;
  overflow: hidden;
}
.dash-task a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 0.94rem;
  color: var(--text);
  text-decoration: none;
}
.dash-task + .dash-task a { border-top: 1px solid var(--border); }
.dash-task a:hover { background: var(--accent-tint); color: var(--text); text-decoration: none; }
.dash-task-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}
.dash-task-text { flex: 1; min-width: 0; }
.dash-task-hint { color: var(--muted); font-size: 0.85em; font-weight: 400; }
.dash-task-arrow { color: var(--muted); font-size: 0.9rem; }

/* ── Hero-Karte: das naechste eigene Event ── */
.dash-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.dash-hero-kicker {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-hero-date {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}
.dash-hero-title { margin: 0 0 4px; font-size: 1.35rem; }
.dash-hero-title a { color: var(--title); text-decoration: none; }
.dash-hero-title a:hover { color: var(--link-hover); }
.dash-hero-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.dash-hero-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero-empty { text-align: left; }
.dash-hero-empty p { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }

/* Sitzplatz-Anzeige fuer Storyteller-Events ("5/12 · 2 Anfragen") */
.dash-seats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.dash-seats strong { color: var(--text); font-weight: 600; }
.dash-seats-open { color: var(--accent); font-weight: 600; }

/* ── Sektions-Kopf innerhalb des Dashboards ── */
.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0 10px;
  flex-wrap: wrap;
}
.dash-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.dash-section-head a { font-size: 0.85rem; }

.dash-event-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.dash-event-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.dash-event-list li:last-child { border-bottom: none; }
.dash-event-list li > .dash-event-link { flex: 1; }
.dash-event-link {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
  padding: 9px 2px;
}
.dash-event-link:hover { color: var(--accent); text-decoration: none; }
.dash-event-manage {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.05em;
  padding: 0 4px;
}
.dash-event-manage:hover { color: var(--accent); text-decoration: none; }

/* ── Externe Anmeldung ──────────────────────────────────────
   Events, deren Anmeldung nicht ueber BOTC Map laeuft: neutraler Badge auf
   Karten/Rundenplan, Hinweisbox an der Stelle des Anmeldeformulars. */
.badge-external-reg {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent-strong);
}
.external-reg-box {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--accent-strong);
  border-left-width: 4px;
  border-radius: 10px;
}
.external-reg-title {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--title);
}
.external-reg-info > :first-child { margin-top: 0; }
.external-reg-info > :last-child { margin-bottom: 0; }
.external-reg-hint {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ST-Erfahrung als leiser Text in der Storyteller-Zeile (statt Event-Badge). */
.event-st-count {
  color: var(--muted);
  font-size: 0.85em;
  white-space: nowrap;
}
.dash-event-date  { color: var(--muted); font-size: 0.84rem; white-space: nowrap; min-width: 7.5em; }
.dash-event-name  { flex: 1; font-weight: 500; }
.dash-event-place { color: var(--muted); font-size: 0.84rem; }

/* ── "Mehr": eingeklappter Bereich fuer alles Seltene (Komplexitaet nur auf Wunsch) ── */
.dash-tools {
  margin: 20px 0 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.dash-tools > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.dash-tools > summary::-webkit-details-marker { display: none; }
.dash-tools > summary::after {
  content: "\25BE";
  margin-left: auto;
  color: var(--muted);
  transition: transform .15s ease;
}
.dash-tools[open] > summary::after { transform: rotate(180deg); }
.dash-tools > summary:hover { color: var(--text); }
.dash-tools-body { padding: 4px 16px 14px; border-top: 1px solid var(--border); }
.dash-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 24px;
  margin-top: 8px;
}
.dash-tools-grid a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.dash-tools-grid a:hover { color: var(--accent); }
.dash-tools-hint { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

/* ── Alert advanced filter toggle ───────────────────────── */
.alert-advanced {
  margin: 4px 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
}
.alert-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  list-style: none;
  user-select: none;
}
.alert-advanced-toggle::-webkit-details-marker { display: none; }
.alert-advanced-toggle::before {
  content: '›';
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.15s;
  line-height: 1;
}
.alert-advanced[open] > .alert-advanced-toggle::before {
  transform: rotate(90deg);
}
.alert-advanced > .form-group {
  padding: 0 14px;
}
.alert-advanced > .form-group:first-of-type {
  padding-top: 4px;
}
.alert-advanced > .form-group:last-of-type {
  padding-bottom: 14px;
}

/* ── Form hints ─────────────────────────────────────────── */
.form-hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Event tags ──────────────────────────────────────────── */
.tag-beginner,
.tag-community {
  display: inline-block;
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  font-weight: 500;
}
.tag-beginner {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.tag-community {
  background: rgba(20, 184, 166, 0.15);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

/* ── Focus & interaction states ──────────────────────────── */
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #1b1308;
  border-color: var(--accent-strong);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--accent-strong);
}

/* Event card hover lift */
.event-card {
  transition: transform 0.12s, box-shadow 0.12s;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ── Mobile responsive ───────────────────────────────────── */
@media (max-width: 760px) {
  .hero-section {
    padding: 20px 8px 16px;
  }
  .hero-headline {
    font-size: 1.25rem;
  }
  .hero-sub {
    font-size: 0.9rem;
  }
  .search-card {
    padding: 14px;
    margin-bottom: 20px;
  }
  .search-card-title {
    font-size: 0.95rem;
  }
  .map-toggle-bar {
    display: block;
    margin-bottom: 8px;
  }
  #map {
    height: 360px !important;
    min-height: 280px !important;
  }
  .panel {
    padding: 14px;
    margin-bottom: 18px;
  }
  .event-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  .event-card-lean {
    padding: 10px;
  }
  .event-card-lean h3 {
    font-size: 0.95rem;
  }
  .event-meta {
    font-size: 0.85rem;
  }
  .event-badges {
    gap: 5px;
  }
  .badge {
    font-size: 0.75rem;
    padding: 2px 6px;
  }
  .social-proof {
    grid-template-columns: repeat(2, 1fr);
  }
  .social-proof-value {
    font-size: 1.4rem;
  }
  .trust-chips {
    gap: 6px;
  }
  .trust-chip {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}

/* ══════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ══════════════════════════════════════════════════════════ */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0.55;
  transition: opacity 0.15s;
}
.theme-toggle:hover {
  background: transparent;
  opacity: 1;
  color: var(--accent);
}
/* Show sun in dark mode, moon in light mode */
[data-theme="dark"] .theme-icon-dark,
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-light,
[data-theme="light"] .theme-icon-dark { display: inline; }

/* ══════════════════════════════════════════════════════════
   LIGHT THEME — activated via data-theme="light"
   ══════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-top: #f5f3ef;
  --bg-bottom: #edeae4;
  --ink: #3b3229;
  --muted: #6b6054;
  --title: #4a3518;
  --accent: #8c6a37;
  --accent-strong: #6b4c1e;
  --warn: #d97706;
  --danger: #dc2626;
  --card: #ffffff;
  --border: #d6d0c4;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --surface: #ffffff;
  --text: #3b3229;
  --text-muted: #6b6054;
  --red: #dc2626;
  --success: #16a34a;
  --surface2: #f5f2ec;
  --accent-tint: rgba(140, 106, 55, 0.10);
  --warn-tint: rgba(217, 119, 6, 0.08);
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: rgba(180, 170, 150, 0.5);
  --link: #7c5521;
  --link-hover: #5a3a10;
}

[data-theme="light"],
[data-theme="light"] body {
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

/* ── Buttons ──────────────────────────────────────────── */
[data-theme="light"] button,
[data-theme="light"] .btn {
  color: #2c1a05;
  font-weight: 700;
  background: rgba(140, 106, 55, 0.1);
  border-color: rgba(140, 106, 55, 0.3);
}
[data-theme="light"] .btn-outline {
  color: #2c1a05;
  background: rgba(140, 106, 55, 0.1);
  border-color: rgba(140, 106, 55, 0.3);
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(140, 106, 55, 0.2);
  color: #2c1a05;
  border-color: rgba(140, 106, 55, 0.5);
}
[data-theme="light"] .btn-primary {
  color: #2c1a05;
}
[data-theme="light"] .btn-ghost {
  background: #f0ece6;
  color: #7c5521;
  border-color: #d6d0c4;
}
[data-theme="light"] .btn-ghost:hover {
  background: #e8e2d8;
  color: #5a3a10;
  border-color: #c4bca8;
}
[data-theme="light"] .btn-danger-ghost {
  background: #fef2f2;
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
}
[data-theme="light"] .btn-danger-ghost:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.5);
}

/* ── Nav elements ─────────────────────────────────────── */
[data-theme="light"] .nav-hamburger {
  background: transparent;
  border: none;
  color: var(--title);
}
[data-theme="light"] .nav-submit-event {
  border-color: rgba(140, 106, 55, 0.4);
}
[data-theme="light"] .nav-submit-event:hover {
  background: rgba(140, 106, 55, 0.08);
}
/* .nav-bell-toggle braucht keinen Light-Override mehr — arbeitet mit Tokens. */
[data-theme="light"] .nav-dropdown-toggle {
  border-color: rgba(140, 106, 55, 0.35);
  color: #7c5521;
}
[data-theme="light"] .nav-dropdown-toggle:hover,
[data-theme="light"] .nav-dropdown-toggle[aria-expanded="true"] {
  background: rgba(140, 106, 55, 0.08);
  color: #5a3a10;
  border-color: rgba(140, 106, 55, 0.6);
}
[data-theme="light"] .nav-dropdown-menu {
  background: #fff;
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .nav-dropdown-menu li a:hover,
[data-theme="light"] .nav-dropdown-logout:hover {
  background: rgba(140, 106, 55, 0.06);
  color: #5a3a10;
}
[data-theme="light"] .nav-dropdown-logout { color: var(--danger); }
[data-theme="light"] .nav-dropdown-logout:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.05);
}

/* ── Forms & inputs ───────────────────────────────────── */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="url"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  border-color: #c4bca8;
  background: #fff;
  color: var(--ink);
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"] {
  color-scheme: light;
}

/* ── Panels / cards ───────────────────────────────────── */
[data-theme="light"] .panel {
  background: var(--card);
  border-color: var(--border);
}
[data-theme="light"] .panel-secondary {
  background: rgba(245, 242, 237, 0.8);
  border-color: rgba(200, 190, 170, 0.5);
}
[data-theme="light"] .search-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border);
}
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #e8f5e9, #e3edf7);
  border-color: rgba(34, 150, 80, 0.2);
}
[data-theme="light"] .hero-lean {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(180, 170, 150, 0.5);
}
[data-theme="light"] .event-card {
  border-color: var(--border);
  background: #fff;
}
[data-theme="light"] .event-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* ── Trust chips ──────────────────────────────────────── */
[data-theme="light"] .trust-chip {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--border);
  color: var(--muted);
}

/* ── Data tables ──────────────────────────────────────── */
[data-theme="light"] .data-table th,
[data-theme="light"] .data-table td {
  border-bottom-color: #e0dcd4;
}
[data-theme="light"] .data-table tr.status-confirmed td {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}
[data-theme="light"] .data-table tr.status-pending td {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}
[data-theme="light"] .data-table tr.status-attended td {
  background: rgba(148, 163, 184, 0.08);
  color: #475569;
}
[data-theme="light"] .data-table tr.status-muted td {
  background: rgba(148, 163, 184, 0.06);
  color: #64748b;
}

/* ── Badges ───────────────────────────────────────────── */
[data-theme="light"] .badge {
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.2);
}
[data-theme="light"] .badge-fee {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="light"] .badge-beginner {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.25);
}
[data-theme="light"] .badge-free-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.25);
}
[data-theme="light"] .badge-free-low {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.25);
}
[data-theme="light"] .badge-free-none {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="light"] .badge-waitlist {
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.2);
}
[data-theme="light"] .badge-waitlist-hint {
  background: rgba(180, 120, 30, 0.1);
  color: #92400e;
  border-color: rgba(180, 120, 30, 0.25);
}
[data-theme="light"] .badge-series {
  background: rgba(140, 106, 55, 0.1);
  color: #92400e;
  border-color: rgba(140, 106, 55, 0.25);
}
[data-theme="light"] .badge-alt-event {
  background: rgba(56, 130, 230, 0.08);
  color: #1d4ed8;
  border-color: rgba(56, 130, 230, 0.25);
}
[data-theme="light"] .series-nav {
  background: #f8f5f0;
  border-color: rgba(140, 106, 55, 0.2);
}
[data-theme="light"] .badge-new {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.25);
}
[data-theme="light"] .badge-status {
  background: rgba(100, 116, 139, 0.1);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.25);
}
[data-theme="light"] .badge-private {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.25);
}
[data-theme="light"] .badge-traveller {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
}
[data-theme="light"] .badge-community {
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.25);
}
[data-theme="light"] .badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.3);
}
[data-theme="light"] .badge-muted {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.3);
}

/* ── Script pills ─────────────────────────────────────── */
[data-theme="light"] .script-green,
[data-theme="light"] .script-option.script-green {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.25);
}
[data-theme="light"] .script-orange,
[data-theme="light"] .script-option.script-orange {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.25);
}
[data-theme="light"] .script-red,
[data-theme="light"] .script-option.script-red {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}

/* ── Status badges ────────────────────────────────────── */
[data-theme="light"] .status-badge.status-confirmed {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}
[data-theme="light"] .status-badge.status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}
[data-theme="light"] .status-badge.status-attended {
  background: rgba(100, 116, 139, 0.1);
  color: #334155;
}
[data-theme="light"] .status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

/* ── Calendar ─────────────────────────────────────────── */
[data-theme="light"] .calendar-day {
  border-color: #e0dcd4;
  background: #fff;
}
[data-theme="light"] .calendar-day.is-empty {
  background: #faf8f5;
}
[data-theme="light"] .calendar-empty-note { color: #94a3b8; }
[data-theme="light"] .calendar-event-chip {
  border-color: #e0dcd4;
  background: #faf8f5;
}
[data-theme="light"] .calendar-event-chip span:last-child { color: #94a3b8; }
[data-theme="light"] .calendar-event-chip.chip-green {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}
[data-theme="light"] .calendar-event-chip.chip-orange {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}
[data-theme="light"] .calendar-event-chip.chip-red {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}
[data-theme="light"] .calendar-event-chip.chip-community {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.2);
  color: #0f766e;
}
[data-theme="light"] .calendar-event-chip.chip-completed {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  color: #64748b;
}
[data-theme="light"] .calendar-event-chip.chip-completed span:last-child { color: #94a3b8; }

/* ── Event tags ───────────────────────────────────────── */
[data-theme="light"] .tag-beginner {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.25);
}
[data-theme="light"] .tag-community {
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.25);
}

/* ── Community event card ─────────────────────────────── */
[data-theme="light"] .event-card-community {
  border-left-color: rgba(20, 184, 166, 0.4);
}
[data-theme="light"] .popup-community-badge {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.3);
}

/* ── Participant chips ────────────────────────────────── */
[data-theme="light"] .participant-chip {
  background: rgba(140, 106, 55, 0.08);
  border-color: rgba(140, 106, 55, 0.2);
  color: #7c5521;
}
[data-theme="light"] .participant-chip:hover {
  background: rgba(140, 106, 55, 0.14);
}

/* ── Suggestion chips ─────────────────────────────────── */
[data-theme="light"] .suggestion-chip {
  background: rgba(140, 106, 55, 0.06);
  border-color: rgba(140, 106, 55, 0.2);
  color: #7c5521;
}
[data-theme="light"] .suggestion-chip:hover {
  background: rgba(140, 106, 55, 0.12);
}

/* ── Map fallback ─────────────────────────────────────── */
[data-theme="light"] .map-fallback {
  background: #faf8f5;
}
[data-theme="light"] .map-toggle-btn:hover {
  background: rgba(140, 106, 55, 0.06);
}

/* ── Map aggregate icon ───────────────────────────────── */
[data-theme="light"] .map-aggregate-icon {
  background: #0d9488;
  border-color: #0f766e;
}

/* ── Info box ─────────────────────────────────────────── */
[data-theme="light"] .info-box-slim {
  background: rgba(140, 106, 55, 0.05);
  border-color: rgba(140, 106, 55, 0.18);
}

/* ── Storyteller page ─────────────────────────────────── */
[data-theme="light"] .st-benefit {
  background: rgba(245, 242, 237, 0.7);
  border-color: var(--border);
}
[data-theme="light"] .st-comparison-col {
  background: rgba(245, 242, 237, 0.7);
  border-color: var(--border);
}

/* ── Form box ─────────────────────────────────────────── */
[data-theme="light"] .form-box {
  border-color: rgba(180, 170, 150, 0.4);
  background: rgba(250, 248, 245, 0.8);
}

/* ── Filter toggle slim ───────────────────────────────── */
[data-theme="light"] .filter-toggle-btn.slim {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(140, 106, 55, 0.4);
}
[data-theme="light"] .filter-toggle-btn.slim:hover {
  background: rgba(140, 106, 55, 0.08);
  color: var(--accent-strong);
  border-color: rgba(140, 106, 55, 0.7);
}

/* ── Filter advanced toggle ───────────────────────────── */
[data-theme="light"] .filter-advanced-toggle:hover {
  color: #5a3a10;
}

/* ── Success / warn buttons ───────────────────────────── */
[data-theme="light"] .btn-success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.3);
}
[data-theme="light"] .btn-success:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #14532d;
  border-color: rgba(34, 197, 94, 0.5);
}
[data-theme="light"] .btn-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.3);
}
[data-theme="light"] .btn-warn:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #78350f;
  border-color: rgba(245, 158, 11, 0.5);
}

/* ── Modals ───────────────────────────────────────────── */
[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .modal-card {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .dup-modal-backdrop {
  background: rgba(0, 0, 0, 0.3);
}

/* ── Cookie banner ────────────────────────────────────── */
[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(180, 170, 150, 0.5);
}

/* ── Alert advanced ───────────────────────────────────── */
[data-theme="light"] .alert-advanced {
  border-color: var(--border);
}

/* ── Dashboard: keine Light-Overrides noetig — die .dash-*-Regeln
   arbeiten vollstaendig mit Theme-Tokens. ── */

/* ── Star ratings ─────────────────────────────────────── */
[data-theme="light"] .star-rating label { color: #d1d5db; }
[data-theme="light"] .star-rating label:hover,
[data-theme="light"] .star-rating label:hover ~ label,
[data-theme="light"] .star-rating input:checked ~ label { color: #d97706; }

/* ── Inline rating form ───────────────────────────────── */
[data-theme="light"] .inline-rating-form { border-color: #e0dcd4; }

/* ── Danger panel ─────────────────────────────────────── */
[data-theme="light"] .danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.04);
}

/* ── Follow star ──────────────────────────────────────── */
[data-theme="light"] .follow-star-btn { color: #d97706; }
[data-theme="light"] .follow-star-btn:hover { color: #b45309; }

/* ── Theme toggle icon color ─────────────────────────── */
[data-theme="light"] .theme-toggle {
  background: transparent;
  border: none;
  color: #92400e;
}
[data-theme="light"] .theme-toggle:hover {
  background: transparent;
  color: #6b4c1e;
}


/* ── Feature Requests ─────────────────────────────────────── */
.feature-request-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.feature-request-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.fr-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 52px;
}

.fr-vote-btns {
  display: flex;
  gap: .3rem;
}

.btn-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  padding: 0;
}
.btn-vote:hover {
  background: rgba(255,255,255,.06);
  color: var(--ink);
}
.btn-vote--up.btn-vote--active {
  background: rgba(34, 197, 94, .18);
  color: #86efac;
  border-color: rgba(34, 197, 94, .4);
}
.btn-vote--down.btn-vote--active {
  background: rgba(239, 68, 68, .18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .4);
}
.btn-vote--disabled {
  opacity: .35;
  cursor: default;
}

.fr-score {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.fr-score strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.fr-body { flex: 1; min-width: 0; }

.fr-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .3rem;
}

.fr-description {
  margin: .2rem 0 .4rem;
  font-size: .92rem;
  color: var(--text-muted);
}

.fr-admin-note {
  font-size: .85rem;
  color: var(--text-muted);
  margin: .25rem 0;
}

/* Status badges */
.fr-status {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.fr-status--open             { background: rgba(59,130,246,.18); color: #93c5fd; border: 1px solid rgba(59,130,246,.35); }
.fr-status--planned          { background: rgba(139,92,246,.18); color: #c4b5fd; border: 1px solid rgba(139,92,246,.35); }
.fr-status--in_progress      { background: rgba(245,158,11,.18); color: #fcd34d; border: 1px solid rgba(245,158,11,.35); }
.fr-status--in_clarification { background: rgba(20,184,166,.18); color: #5eead4; border: 1px solid rgba(20,184,166,.35); }
.fr-status--done             { background: rgba(34,197,94,.18);  color: #86efac; border: 1px solid rgba(34,197,94,.35);  }
.fr-status--rejected         { background: rgba(148,163,184,.12);color: #94a3b8; border: 1px solid rgba(148,163,184,.25);}

/* Light theme overrides */
[data-theme="light"] .feature-request-item {
  background: #fff;
  border-color: #e0dcd4;
}
[data-theme="light"] .btn-vote {
  border-color: #d1ccc0;
  color: #94a3b8;
}
[data-theme="light"] .btn-vote:hover { background: rgba(0,0,0,.04); color: #374151; }
[data-theme="light"] .fr-status--open             { background: rgba(59,130,246,.1);  color: #1d4ed8; border-color: rgba(59,130,246,.3);  }
[data-theme="light"] .fr-status--planned          { background: rgba(139,92,246,.1);  color: #6d28d9; border-color: rgba(139,92,246,.3);  }
[data-theme="light"] .fr-status--in_progress      { background: rgba(245,158,11,.12); color: #b45309; border-color: rgba(245,158,11,.3);  }
[data-theme="light"] .fr-status--in_clarification { background: rgba(20,184,166,.12); color: #0f766e; border-color: rgba(20,184,166,.3);  }
[data-theme="light"] .fr-status--done             { background: rgba(34,197,94,.12);  color: #166534; border-color: rgba(34,197,94,.3);   }
[data-theme="light"] .fr-status--rejected         { background: rgba(148,163,184,.1); color: #64748b; border-color: rgba(148,163,184,.2); }

/* ══════════════════════════════════════════════════════════
   ADMIN DASHBOARD — KPI Cards & Alert Bar
   ══════════════════════════════════════════════════════════ */
.admin-alert-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  text-decoration: none;
  cursor: default;
}

a.admin-alert-chip:hover {
  background: rgba(239, 68, 68, 0.18);
  text-decoration: none;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 14px 14px;
  text-align: center;
}

.admin-kpi-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--title);
  line-height: 1.1;
}

.admin-kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.3;
}

.col-toggle-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.col-toggle-label {
  font-size: .8rem;
  color: var(--muted);
  margin-right: 4px;
}
.col-toggle-btn {
  font-size: .75rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-bg);
  color: var(--text);
  cursor: pointer;
  opacity: 1;
  transition: opacity .15s, background .15s;
}
.col-toggle-btn:hover {
  background: var(--hover-bg, rgba(128,128,128,.15));
}
.col-toggle-btn.col-toggle-off {
  opacity: .4;
  text-decoration: line-through;
}

/* ── Feature hint overlay ──────────────────────────────── */
.feature-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.feature-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.feature-hint.is-hiding {
  opacity: 0;
  transform: translateY(10px);
}
.feature-hint-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 40px 14px 16px;
}
.feature-hint-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-hint-body {
  flex: 1;
  min-width: 0;
}
.feature-hint-title {
  display: block;
  font-size: .93rem;
  font-weight: 600;
  color: var(--title);
  margin-bottom: 4px;
}
.feature-hint-text {
  margin: 0 0 9px;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.45;
}
.feature-hint-cta {
  font-size: .82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.feature-hint-cta:hover {
  text-decoration: underline;
}
.feature-hint-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  color: var(--muted);
  padding: 4px 6px;
  line-height: 1;
  border-radius: 6px;
}
.feature-hint-close:hover {
  color: var(--ink);
  background: var(--hover);
}
.feature-hint-progress {
  height: 3px;
  background: var(--border);
}
.feature-hint-bar {
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: feature-hint-drain 30s linear forwards;
}
@keyframes feature-hint-drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Sortable table headers ────────────────────────────── */
.em-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.em-sortable:hover { color: var(--accent); }
.em-sort-icon {
  font-size: .75em;
  margin-left: .25em;
  opacity: .55;
}
.em-sortable:hover .em-sort-icon { opacity: 1; }

/* ── Creator popup modal ───────────────────────────────── */
.creator-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: creator-backdrop-in .2s ease;
}
.creator-modal-backdrop.creator-modal-out {
  animation: creator-backdrop-out .3s ease forwards;
}
@keyframes creator-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes creator-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.creator-modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 8px 40px rgba(0,0,0,.28);
  animation: creator-modal-in .25s ease;
}
@keyframes creator-modal-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.creator-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}
.creator-modal-close:hover { color: var(--ink); background: var(--hover); }
.creator-modal-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.creator-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--title);
  margin: 0 0 6px;
}
.creator-modal-sub {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}
.creator-modal-section { margin-bottom: 18px; }
.creator-modal-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 8px;
}
.creator-modal-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.creator-share-textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  resize: none;
  font-family: inherit;
}

/* ── Star display (read-only rating output) ───────────── */
.star-display {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
}
.star-d {
  font-size: 1.1rem;
  line-height: 1;
}
.star-d--full  { color: #f59e0b; }
.star-d--half  { color: #f59e0b; opacity: .5; }
.star-d--empty { color: #cbd5e1; }
.star-d-score {
  margin-left: 4px;
  font-weight: 600;
  font-size: .95rem;
}
.star-d-count {
  font-size: .8rem;
  color: var(--text-muted);
  margin-left: 3px;
}
.star-display--sm .star-d  { font-size: .85rem; }
.star-display--sm .star-d-score { font-size: .8rem; }
.star-display--lg .star-d  { font-size: 1.4rem; }
.star-display--lg .star-d-score { font-size: 1.1rem; }

/* ── Rating breakdown bars ────────────────────────────── */
.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.rating-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 32px;
  align-items: center;
  gap: 8px;
}
.rating-bar-label {
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rating-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
  transition: width .3s ease;
}
.rating-bar-value {
  font-size: .8rem;
  font-weight: 600;
  text-align: right;
}

/* ── Rating section on profiles ───────────────────────── */
.rating-section {
  background: color-mix(in srgb, var(--card) 85%, #f59e0b 15%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, #f59e0b 40%);
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
}
.rating-section-headline {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.rating-highlight-badge {
  display: inline-block;
  background: color-mix(in srgb, transparent 70%, #f59e0b 30%);
  border: 1px solid #f59e0b;
  color: #b45309;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: .78rem;
  font-weight: 600;
  margin-top: 6px;
}

/* ── Rating CTA banner on dashboard ──────────────────── */
.rating-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .75rem 1rem;
  background: color-mix(in srgb, var(--card) 80%, #f59e0b 20%);
  border: 1px solid #f59e0b;
  border-radius: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.rating-cta-text {
  flex: 1;
  font-size: .95rem;
}
.rating-cta-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* light mode adjustments */
[data-theme="light"] .star-d--empty  { color: #d1d5db; }
[data-theme="light"] .rating-highlight-badge { color: #92400e; }
[data-theme="light"] .rating-bar-track { background: #e5e7eb; }

/* ── Event description Markdown ───────────────────────── */
.event-description { line-height: 1.65; }
.event-description p { margin: 0 0 .6em; }
.event-description p:last-child { margin-bottom: 0; }
.event-description h3,
.event-description h4,
.event-description h5 { margin: .8em 0 .25em; font-size: 1rem; font-weight: 600; }
.event-description ul,
.event-description ol { margin: .4em 0 .6em 1.25rem; padding: 0; }
.event-description li { margin-bottom: .2em; }
.event-description a { color: var(--accent); text-decoration: underline; }
.event-description code { font-family: monospace; font-size: .88em; background: var(--border); padding: .1em .35em; border-radius: 3px; }

/* ── Changelog ─────────────────────────────────────────── */
.changelog-entry { margin-bottom: 2rem; }
.changelog-meta { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.changelog-version { font-weight: 700; font-size: 1rem; color: var(--title); }
.changelog-date { font-size: .85rem; color: var(--muted); }
.changelog-list { margin: 0; padding-left: 1.2rem; }
.changelog-list li { margin-bottom: .45rem; line-height: 1.5; }
.changelog-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  vertical-align: middle;
}
.tag-new      { background: rgba(34, 197, 94, .15); color: #4ade80; border: 1px solid rgba(74, 222, 128, .35); }
.tag-improved { background: rgba(99, 102, 241, .15); color: #a5b4fc; border: 1px solid rgba(165, 180, 252, .35); }
.tag-fixed    { background: rgba(239, 68, 68, .12);  color: #f87171; border: 1px solid rgba(248, 113, 113, .35); }

[data-theme="light"] .tag-new      { background: #dcfce7; color: #15803d; border-color: #86efac; }
[data-theme="light"] .tag-improved { background: #e0e7ff; color: #4338ca; border-color: #a5b4fc; }
[data-theme="light"] .tag-fixed    { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

/* ── Changelog Feature Spotlight ──────────────────────── */
.changelog-spotlight {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: color-mix(in srgb, var(--card) 82%, #25d366 18%);
  border: 1px solid rgba(37, 211, 102, .35);
  border-left: 4px solid #25d366;
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 2rem;
}
.changelog-spotlight-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.changelog-spotlight-body { flex: 1; }
.changelog-spotlight-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: #25d366;
  color: #0a3d1f;
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: .45rem;
}
.changelog-spotlight-title {
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--title);
}
.changelog-spotlight-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Kein display:flex auf dem li — sonst wird jedes Inline-Kind (<strong>, <em>)
   zu einem eigenen Flex-Item und der Satz zerfaellt in Spalten. Haekchen
   stattdessen absolut positioniert. */
.changelog-spotlight-list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: .3rem;
  color: var(--ink);
}
.changelog-spotlight-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #25d366;
  font-weight: 700;
}

[data-theme="light"] .changelog-spotlight {
  background: color-mix(in srgb, #fff 80%, #25d366 20%);
  border-color: rgba(37, 211, 102, .4);
  border-left-color: #1db954;
}
[data-theme="light"] .changelog-spotlight-badge {
  background: #1db954;
  color: #fff;
}

/* =========================================================================
   Event Recap / Session Memories
   ========================================================================= */

/* Card */
.recap-card {
  border-left: 3px solid var(--accent);
  position: relative;
}
.recap-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}
.recap-card-title { margin: 0; }
.recap-card-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.recap-card-h3 { margin: .25rem 0 .75rem; color: var(--title); }
.recap-card-content { line-height: 1.55; margin-bottom: 1rem; }
.recap-card-content p:first-child { margin-top: 0; }
.recap-card-content p:last-child  { margin-bottom: 0; }
.recap-edit-btn { white-space: nowrap; }

/* Mehrere Runden pro Recap */
.recap-round-heading {
  margin: 1.1rem 0 .4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted, #6b7280);
  border-top: 1px dashed var(--border, #e1e8ed);
  padding-top: .9rem;
}
.recap-round-section:first-of-type .recap-round-heading,
.recap-card-content + .recap-round-section .recap-round-heading { border-top-style: solid; }

/* Runden im Recap-Formular */
.recap-rounds-wrap { display: block; }
.recap-rounds-list { display: grid; gap: 12px; margin: .5rem 0; }
.recap-round-item {
  border: 1px solid var(--border, #e1e8ed);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(0, 0, 0, .015);
}
.recap-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.recap-round-badge { font-weight: 700; color: var(--muted, #6b7280); }
.recap-round-title { width: 100%; }
.recap-round-content { width: 100%; resize: vertical; }

.recap-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
}
.recap-badge-draft {
  background: color-mix(in srgb, var(--card) 80%, var(--warn) 20%);
  border-color: var(--warn);
  color: var(--warn);
}
.recap-badge-admin {
  background: color-mix(in srgb, var(--card) 80%, #6366f1 20%);
  border-color: #6366f1;
  color: #a5b4fc;
}
.recap-badge-visibility {
  background: var(--card);
  border-color: var(--border);
}

/* Highlight & quote */
.recap-highlight {
  background: color-mix(in srgb, var(--card) 85%, var(--accent) 15%);
  border-left: 3px solid var(--accent);
  padding: .55rem .85rem;
  border-radius: 0 .35rem .35rem 0;
  margin: .85rem 0;
  display: flex;
  gap: .65rem;
  align-items: center;
}
.recap-highlight-icon { font-size: 1.2rem; }
.recap-quote {
  border-left: 3px solid var(--accent-strong);
  margin: .85rem 0;
  padding: .3rem 0 .3rem 1rem;
  font-style: italic;
  color: var(--muted);
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}
.recap-quote-icon { font-size: 1rem; flex-shrink: 0; }

/* Meta row: tags + MVP + rounds */
.recap-meta-row {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin: .85rem 0;
  align-items: center;
}
.recap-tag {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .7rem;
  font-size: .8rem;
  white-space: nowrap;
}
.recap-tag-emoji { font-size: .95rem; }
.recap-mvp, .recap-rounds {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  font-size: .88rem;
  color: var(--muted);
}
.recap-mvp a { color: var(--link); font-weight: 600; }

/* Images */
.recap-images {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: .85rem 0;
}
.recap-images-grim { flex-direction: column; }
.recap-grim-heading { margin: .85rem 0 .4rem; font-size: 1rem; }
.recap-grim-heading small { color: var(--muted); font-weight: normal; }
.recap-image-wrap {
  display: inline-block;
  position: relative;
}
.recap-image-thumb-display {
  display: block;
  max-width: 160px;
  max-height: 160px;
  border-radius: .35rem;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* Spoiler cover for Grim */
.recap-grim-wrap {
  position: relative;
  display: inline-block;
  margin-right: .65rem;
  margin-bottom: .65rem;
}
.recap-grim-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 160px;
  background: linear-gradient(135deg, var(--card), var(--bg-bottom));
  border: 2px dashed var(--accent);
  border-radius: .5rem;
  color: var(--title);
  cursor: pointer;
  text-align: center;
  padding: .5rem;
  transition: transform .15s ease, box-shadow .15s ease;
  font: inherit;
}
.recap-grim-cover:hover,
.recap-grim-cover:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  outline: none;
}
.recap-grim-cover-icon { font-size: 2rem; margin-bottom: .4rem; }
.recap-grim-cover-text small { display: block; font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.recap-grim-img {
  display: block;
  max-width: 220px;
  max-height: 220px;
  border-radius: .35rem;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* Reactions */
.recap-reactions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1rem 0 .6rem;
  align-items: center;
}
.recap-reaction-btn {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .8rem;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  min-height: 36px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.recap-reaction-btn:not([disabled]):hover {
  background: color-mix(in srgb, var(--card) 85%, var(--accent) 15%);
  border-color: var(--accent);
}
.recap-reaction-btn.active {
  background: color-mix(in srgb, var(--card) 75%, var(--accent) 25%);
  border-color: var(--accent);
  color: var(--title);
}
.recap-reaction-btn:active { transform: scale(.95); }
.recap-reaction-btn[disabled] { opacity: .55; cursor: not-allowed; }
.recap-reaction-emoji { font-size: 1.05rem; line-height: 1; }
.recap-reaction-count { font-size: .85rem; font-weight: 600; }
.recap-reactions-hint { margin-left: .35rem; font-size: .82rem; }

/* Footer */
.recap-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  padding-top: .75rem;
  margin-top: .65rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.recap-byline { font-size: .82rem; color: var(--muted); }
.btn-link-subtle {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: inherit; font-size: .82rem; padding: .15rem .35rem;
}
.btn-link-subtle:hover { color: var(--danger); }

/* CTA box (no recap yet, but storyteller may create one) */
.recap-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 80%, var(--accent) 20%), var(--card));
  border-left: 3px solid var(--accent);
  flex-wrap: wrap;
}
.recap-cta-icon { font-size: 2rem; flex-shrink: 0; }
.recap-cta-body { flex: 1; min-width: 200px; }
.recap-cta-title { margin: 0 0 .25rem; color: var(--title); }
.recap-cta-text { margin: 0; font-size: .92rem; color: var(--muted); }
.recap-cta-btn { white-space: nowrap; }

/* ===== Form (storyteller side) ===== */
.recap-form-intro .recap-status {
  display: inline-block;
  padding: .35rem .75rem;
  border-radius: .5rem;
  font-size: .9rem;
  font-weight: 600;
  margin-top: .35rem;
}
.recap-status-published {
  background: color-mix(in srgb, var(--card) 75%, #16a34a 25%);
  border: 1px solid #16a34a;
  color: #4ade80;
}
.recap-status-draft {
  background: color-mix(in srgb, var(--card) 80%, var(--warn) 20%);
  border: 1px solid var(--warn);
  color: var(--warn);
}

.recap-form .form-row { display: block; margin-bottom: 1rem; }
.recap-form .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: .35rem;
  font-size: .92rem;
}
.recap-form .form-label small { color: var(--muted); font-weight: normal; }
.recap-form input[type="text"],
.recap-form input[type="number"],
.recap-form select,
.recap-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: .35rem;
  padding: .55rem .75rem;
}
.recap-form textarea { resize: vertical; min-height: 180px; line-height: 1.5; }
.recap-form input:focus,
.recap-form select:focus,
.recap-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.recap-block-header { margin-bottom: 1rem; }
.recap-block-header h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .55rem; }
.recap-block-header h2 small { color: var(--muted); font-size: .85rem; font-weight: normal; }
.recap-block-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #1b1308;
  font-weight: 700;
  font-size: .9rem;
}

.recap-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) {
  .recap-grid-2 { grid-template-columns: 1fr; }
}

.recap-textarea-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .35rem;
  flex-wrap: wrap;
  gap: .4rem;
}
.recap-tabs { display: inline-flex; gap: .25rem; }
.recap-tab {
  padding: .25rem .65rem;
  font-size: .82rem;
  border: 1px solid var(--border);
  border-radius: .3rem;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.recap-tab.active {
  background: var(--accent);
  color: #1b1308;
  border-color: var(--accent);
}
.recap-preview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .35rem;
  padding: 1rem;
  min-height: 180px;
  line-height: 1.55;
}

.recap-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .5rem;
}
.recap-tag-check {
  display: flex;
  gap: .55rem;
  align-items: center;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  background: var(--card);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s;
}
.recap-tag-check:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card) 80%, var(--accent) 20%);
}
.recap-tag-check input { margin: 0; }
.recap-tag-check .recap-tag-emoji { font-size: 1.2rem; }
.recap-tag-check .recap-tag-label { font-size: .9rem; }

.recap-script-info { display: flex; align-items: center; gap: .65rem; }

/* Upload zones */
.recap-upload-section { margin-bottom: 1.2rem; }
.recap-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .35rem;
}
.recap-upload-header small { color: var(--muted); font-weight: normal; }
.recap-upload-count {
  font-size: .82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.recap-upload-drop {
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .8rem;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  transition: border-color .15s, background .15s;
}
.recap-upload-drop.drop-hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card) 85%, var(--accent) 15%);
}
.recap-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: .55rem;
}
.recap-image-thumb {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: .35rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.recap-image-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.recap-image-delete {
  position: absolute;
  top: .25rem; right: .25rem;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recap-image-delete:hover { background: var(--danger); }
.recap-image-zoom {
  position: absolute;
  bottom: .25rem; right: .25rem;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  text-decoration: none;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recap-upload-zone {
  display: flex;
  gap: .85rem;
  align-items: center;
  border: 2px dashed var(--border);
  border-radius: .4rem;
  padding: 1rem;
  cursor: pointer;
  text-align: left;
  color: var(--muted);
  transition: border-color .15s, color .15s;
}
.recap-upload-zone:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.recap-upload-zone-icon { font-size: 1.6rem; flex-shrink: 0; }
.recap-upload-zone-text small { display: block; font-size: .78rem; opacity: .8; margin-top: .15rem; }

/* Visibility selector */
.recap-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .55rem;
}
.recap-visibility-option {
  display: block;
  padding: .8rem 1rem;
  border: 2px solid var(--border);
  border-radius: .5rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.recap-visibility-option input { position: absolute; opacity: 0; }
.recap-visibility-option.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card) 80%, var(--accent) 20%);
}
.recap-visibility-title {
  display: block;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--title);
}
.recap-visibility-desc {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Actions bar (sticky on mobile) */
.recap-block-actions {
  position: sticky;
  bottom: 0;
  background: var(--card);
  z-index: 5;
  box-shadow: 0 -4px 12px rgba(0,0,0,.15);
}
.recap-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.recap-actions-right { display: flex; gap: .5rem; flex-wrap: wrap; }
.recap-autosave-status {
  margin: .35rem 0 0;
  font-size: .8rem;
  color: var(--muted);
  min-height: 1.2em;
}

.recap-delete-form { margin-top: 1rem; }

/* Consent modal */
.recap-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.recap-consent-modal[hidden] { display: none; }
.recap-consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.recap-consent-box {
  position: relative;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: .5rem;
  max-width: 520px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.recap-consent-close {
  position: absolute;
  top: .5rem; right: .65rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.5rem; cursor: pointer;
}
.recap-consent-box h3 { margin: 0 0 .65rem; color: var(--title); }
.recap-consent-check {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
  margin: .55rem 0;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.recap-consent-check:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card) 85%, var(--accent) 15%);
}
.recap-consent-check input {
  margin-top: .25rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.recap-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  margin-top: 1rem;
}
.recap-consent-fineprint { margin: .65rem 0 0; font-size: .78rem; color: var(--muted); }

/* Toast */
.recap-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: .65rem 1rem;
  border-radius: .35rem;
  box-shadow: var(--shadow);
  z-index: 10001;
  font-size: .9rem;
  max-width: 90vw;
  animation: recapToastIn .25s ease-out;
}
.recap-toast.recap-toast-error { border-left-color: var(--danger); }
.recap-toast.fade-out { opacity: 0; transition: opacity .3s; }
@keyframes recapToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Storyteller-Profil "Letzte Erzählungen" */
.recap-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.recap-story-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, border-color .15s;
}
.recap-story-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.recap-story-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-bottom);
}
.recap-story-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.recap-story-body { padding: .75rem; }
.recap-story-title { margin: 0 0 .25rem; font-size: 1rem; color: var(--title); }
.recap-story-event { font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.recap-story-teaser { margin: 0 0 .55rem; font-size: .88rem; line-height: 1.4; color: var(--ink); }
.recap-story-foot { display: flex; gap: .45rem; align-items: center; font-size: .82rem; color: var(--muted); }
.recap-story-reactions { color: var(--ink); }

/* Mobile tweaks */
@media (max-width: 540px) {
  .recap-card-head { flex-direction: column; align-items: flex-start; }
  .recap-grim-cover, .recap-grim-img { width: 100%; max-width: 100%; height: 200px; }
  .recap-image-thumb-display { max-width: 45vw; max-height: 45vw; }
  .recap-cta { flex-direction: column; align-items: flex-start; }
  .recap-cta-btn { width: 100%; text-align: center; }
  .recap-actions-bar { flex-direction: column; align-items: stretch; }
  .recap-actions-right { width: 100%; }
  .recap-actions-right .btn { flex: 1; }
}

/* New-player promo banner (guests only, dismissible) */
.new-player-promo {
  position: relative;
  max-width: 720px;
  margin: 1.25rem auto;
  padding: 0;
}
.new-player-promo__card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  background: #14263d;
}
.new-player-promo__image-wrap {
  position: relative;
  background: #172033;
}
.new-player-promo__image {
  display: block;
  width: 100%;
  height: auto;
}
.new-player-promo .new-player-promo__close {
  position: absolute;
  z-index: 4;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(8, 13, 24, 0.85);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.new-player-promo .new-player-promo__close:hover,
.new-player-promo .new-player-promo__close:focus-visible {
  background: #b7352d;
  color: #fff;
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}
.new-player-promo__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.85rem;
  background: #111a2b;
}
.new-player-promo__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  line-height: 1.1;
  text-align: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, filter 160ms ease;
}
.new-player-promo__button:hover,
.new-player-promo__button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  color: #fff;
  text-decoration: none;
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}
.new-player-promo__button--live,
.new-player-promo__button--register {
  background: #9f2d27;
}
.new-player-promo__button--online,
.new-player-promo__button--discord {
  background: #14263d;
}
.new-player-promo__dismiss-row {
  display: flex;
  justify-content: center;
  padding: 0 0.85rem 0.75rem;
  background: #111a2b;
}
.new-player-promo .new-player-promo__dismiss {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: underline;
}
.new-player-promo .new-player-promo__dismiss:hover,
.new-player-promo .new-player-promo__dismiss:focus-visible {
  background: transparent;
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}
@media (max-width: 460px) {
  .new-player-promo__actions {
    grid-template-columns: 1fr;
  }
}

/* ── UX-/Accessibility-Verbesserungen ─────────────────────────────────── */

/* Skip-Link: erst bei Fokus sichtbar (Tastaturnutzer springen zum Inhalt). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent, #b58a46);
  color: #1a1206;
  padding: .6rem 1rem;
  border-radius: 0 0 6px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Empty-State-Overlay der Karte. */
.map-empty-state {
  margin: .75rem 0 0;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  font-size: .95rem;
}

/* ── Hero: klare Priorisierung ───────────────────────────────────────────── */
/* Die grosse Mehrheit will mitspielen, nicht eintragen — "Runde finden" wird
   deshalb zur eindeutigen Primaeraktion, "Runde eintragen" zur ruhigen Zweitwahl. */
.hero-section .hero-actions .btn-primary {
  padding: 12px 26px;
  font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(181, 138, 70, 0.28);
}
.hero-section .hero-actions .btn-outline {
  color: var(--text-muted);
  border-color: var(--border);
  font-weight: 500;
}
.hero-section .hero-actions .btn-outline:hover {
  color: var(--title);
  background: transparent;
  border-color: var(--accent);
}

/* ── Suchergebnis-Kopf (Trefferanzahl + Kontext) ─────────────────────────── */
.result-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .75rem;
  margin: 0 0 .9rem;
}
.result-summary-title {
  margin: 0;
  font-size: 1.25rem;
}
.result-summary-count {
  margin: 0;
  color: var(--text-muted);
  font-size: .92rem;
}
.event-distance {
  color: var(--text-muted);
  white-space: nowrap;
}

/* Adresspruefung: eine Formulierung und eine Optik in allen vier Formularen.
   Vorher stand im Storyteller-Formular ein gelbes "wird erneut versucht" und im
   Community-Formular ein rotes "erscheint nicht auf der Karte" — zwei
   unterschiedliche Aussagen ueber dieselbe Situation. */
.geocode-warning {
  margin-top: .6rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(245, 158, 11, .45);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: rgba(245, 158, 11, .12);
  font-size: .9rem;
}
.geocode-warning p {
  margin: .4rem 0 .7rem;
}
[data-theme="light"] .geocode-warning {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(180, 120, 30, .4);
  color: #78350f;
}

/* ── Wizard-Formulare (Event, Serie, Community-Event) ────────────────────── */
/* Beim Schrittwechsel wird auf die Fortschrittsleiste gescrollt — ohne
   scroll-margin-top verschwindet sie hinter dem Sticky-Header. */
.wizard-progress-wrap {
  scroll-margin-top: 72px;
}

/* Die Schritt-Punkte sind klickbar (zurueckspringen). Als <button> sind sie
   auch per Tastatur erreichbar und mit aria-current auffindbar. */
.wizard-step-item {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0;
}
.wizard-step-item:disabled {
  cursor: default;
}
.wizard-step-item:not(:disabled) {
  cursor: pointer;
}
.wizard-step-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Radios in Optionszeilen sitzen sonst mittig ueber statt neben dem Label. */
.rec-end-option input[type="radio"],
.rec-end-option input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
}

/* ── Admin: aufklappbare Abschnitte ──────────────────────────────────────── */
/* <details>/<summary> statt <h2 onclick>: damit sind die Abschnitte per Tastatur
   bedienbar, der Browser pflegt den aufgeklappten Zustand selbst und der
   Pfeil kann nicht mehr aus dem Tritt geraten. */
.admin-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  user-select: none;
  border-radius: 6px;
}
.admin-section > summary::-webkit-details-marker { display: none; }
.admin-section > summary::before {
  content: "\25B6";
  font-size: .75em;
  color: var(--accent);
  transition: transform .15s ease;
}
.admin-section[open] > summary::before { transform: rotate(90deg); }
.admin-section > summary h2 { margin: 0; }
.admin-section > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Breite Admin-Tabellen bekommen einen horizontalen Scroll-Fallback, statt
   die ganze Seite zu sprengen (v.a. mit eingeblendeter Aktionen-Spalte). */
.admin-section-body {
  margin-top: .75rem;
  overflow-x: auto;
}
@media (prefers-reduced-motion: reduce) {
  .admin-section > summary::before { transition: none; }
}

/* Tabellenbeschriftung: nennt Inhalt und Umfang, auch fuer Screenreader. */
.table-caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: .88rem;
  padding: 0 0 .5rem;
}

/* Sortierbare Spaltenkoepfe. */
.table-sort-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.table-sort-btn:hover { color: var(--title); }

/* Benutzerverwaltung: Suche + Pager. */
.users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin-bottom: .75rem;
}
.users-search-label input[type="search"] {
  min-width: 260px;
}
.table-pager {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  font-size: .9rem;
  color: var(--text-muted);
}

/* Aktionszelle: sichtbare Alltagsaktionen + ⋯-Menue in einer Zeile. */
.row-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions .inline-form { display: inline-flex; }
.row-actions .row-menu-body form { display: block; }
.row-actions .row-menu-body .btn-slim {
  display: block;
  width: 100%;
  text-align: left;
}

/* Overflow-Menue je Zeile: endgueltige Aktionen (Anonymisieren, Loeschen)
   liegen hier, damit sie nicht gleichwertig neben dem reversiblen "Sperren"
   stehen. */
/* Bewusst KEIN position:absolute — das Menue liegt in einem
   overflow-x:auto-Container und wuerde dort abgeschnitten. Es klappt
   stattdessen in der Zeile auf. */
.row-menu { display: inline-block; }
.row-menu > summary {
  cursor: pointer;
  list-style: none;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 1.1;
  color: var(--text-muted);
}
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.row-menu-body {
  min-width: 170px;
  margin-top: 4px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* E-Mail-Adressen sind in Listen maskiert und werden erst auf Klick gezeigt. */
.email-reveal {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dotted var(--border);
}
.email-reveal.is-revealed {
  cursor: text;
  border-bottom-color: transparent;
  user-select: text;
}
.email-reveal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Oeffentliche Vorschau von "Rent a Storyteller" (ausgeloggt). */
.rent-preview-steps {
  margin: .75rem 0 1rem;
  padding-left: 1.25rem;
  display: grid;
  gap: .45rem;
}

/* Serien-Navigation: Richtung wird benannt, das Datum steht darunter. */
.series-nav-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.series-nav-date {
  color: var(--text-muted);
  font-size: .88em;
}

.location-route-link {
  margin-left: .4rem;
  white-space: nowrap;
}

/* Tabellenueberschrift in den Statistiken (Bundeslaender vs. Ortsangaben). */
.stats-table-caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  color: var(--title);
  padding: .75rem 0 .35rem;
}

/* Legende zur Schwierigkeitsskala — ohne sie ist "1 ~ TB" nicht deutbar. */
.difficulty-legend {
  margin: 0 0 1rem;
  font-size: .9rem;
}
.difficulty-legend > summary {
  cursor: pointer;
  color: var(--text-muted);
}
.difficulty-legend > summary:hover {
  color: var(--title);
}
.difficulty-legend-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 14px;
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
}
.difficulty-legend-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Caret am "Erweiterte Suche"-Button: nur der Pfeil dreht, nicht die Schrift. */
.filter-toggle-caret {
  display: inline-block;
  transition: transform .15s ease;
}
.filter-toggle-btn.is-open .filter-toggle-caret {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .filter-toggle-caret { transition: none; }
}

/* ── Sichtbarer Fokus fuer visuell ersetzte Bedienelemente ───────────────── */
/* Die Checkbox selbst ist 0x0/opacity:0 — der Fokusring muss deshalb auf dem
   sichtbaren Label landen, sonst verlieren Tastaturnutzer die Orientierung. */
.filter-chip-input:focus-visible + .filter-chip {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.switch input[type="checkbox"]:focus-visible,
.checkbox-modern input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Badge-Varianten ohne Light-Theme-Override: die hellen Textfarben aus dem
   Dark-Theme landen sonst auf nahezu weissem Grund (Kontrast < 2:1). */
[data-theme="light"] .badge-con {
  background: rgba(139, 92, 246, 0.1);
  color: #5b21b6;
  border-color: rgba(139, 92, 246, 0.3);
}
[data-theme="light"] .badge-wa {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.3);
}

/* Hinweis, wenn ueber der Karte gescrollt wird ohne dass Zoom aktiv ist. */
.map-scroll-hint {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(9, 17, 23, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
  pointer-events: none;
}
.map-scroll-hint.is-visible {
  opacity: 1;
  visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
  .map-scroll-hint { transition: none; }
}

/* Breite Inhalte (Tabellen) auf schmalen Screens horizontal scrollbar machen. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* min-width nur INNERHALB des Scroll-Wrappers, sonst wuerde die Seite selbst
   horizontal scrollen. */
@media (max-width: 760px) {
  .table-scroll .data-table {
    min-width: 640px;
  }
}

/* Flash-Meldungen: Schliessen-Button + Layout. */
.flash {
  position: relative;
}
.flash-dismiss {
  position: absolute;
  top: .35rem;
  right: .4rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.flash-dismiss:hover { opacity: 1; }

/* Groessere Touch-Ziele fuer kleine Icon-Buttons (min. 44x44 als Hit-Area). */
.follow-star-btn,
.theme-toggle,
.msg-delete-btn {
  position: relative;
}
.follow-star-btn::after,
.theme-toggle::after,
.msg-delete-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

/* Pflichtfeld-Markierung (nicht nur ueber Farbe). */
.required-marker,
.form-required-star {
  color: var(--danger, #ef4444);
  margin-left: .15rem;
  font-weight: 700;
}
.form-required-legend {
  color: var(--text-muted);
  font-size: .85rem;
  margin: 0 0 .75rem;
}

/* ── Public Stats Page ─────────────────────────────────── */
.stats-header p {
  margin-bottom: 0;
}

.stats-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-hint {
  margin-top: 6px;
}

.stats-two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
}
.stats-two-col > .panel {
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .stats-two-col {
    grid-template-columns: 1fr;
  }
}

/* Trend-Badges (Vergleich zum Vormonat) */
.trend-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.trend-badge.trend-up {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}
.trend-badge.trend-down {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}
.trend-badge.trend-flat {
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
}
[data-theme="light"] .trend-badge.trend-up {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}
[data-theme="light"] .trend-badge.trend-down {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}
[data-theme="light"] .trend-badge.trend-flat {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

/* Balkendiagramme (Monatsverlauf, Wochentage) — reines CSS, Hoehen inline in px */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 12px 0 4px;
}
.bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bar-track {
  height: 152px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar-track--short {
  height: 132px;
}
.bar {
  position: relative;
  width: 68%;
  max-width: 38px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-bottom: none;
}
.bar-col.is-current .bar {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.bar-value {
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--muted);
}
.bar-label {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.bar-col.is-current .bar-label {
  color: var(--title);
  font-weight: 700;
}
@media (max-width: 520px) {
  .bar-chart {
    gap: 3px;
  }
  /* 12 Monats-Spalten: auf sehr schmalen Screens nur jedes 2. Label zeigen */
  .bar-chart--months .bar-col:nth-child(odd) .bar-label {
    visibility: hidden;
  }
  .bar-value {
    font-size: 0.62rem;
  }
}

/* Verteilungsbalken Scriptfarben */
.dist-bar {
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 12px;
  background: rgba(148, 163, 184, 0.12);
}
.dist-seg {
  min-width: 6px;
}
.dist-seg + .dist-seg {
  border-left: 2px solid var(--card);
}
.dist-green {
  background: #22c55e;
}
.dist-orange {
  background: #f59e0b;
}
.dist-red {
  background: #ef4444;
}
.stats-legend {
  margin-bottom: 8px;
}

/* Horizontale Balkenliste (Top-Scripts) */
.hbar-list {
  list-style: none;
  margin: 12px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hbar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 3px;
  align-items: baseline;
}
.hbar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.hbar-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hbar-track {
  grid-column: 1 / -1;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}
.hbar-fill {
  height: 100%;
  border-radius: 999px;
}
.hbar-green {
  background: rgba(34, 197, 94, 0.65);
}
.hbar-orange {
  background: rgba(245, 158, 11, 0.65);
}
.hbar-red {
  background: rgba(239, 68, 68, 0.6);
}

/* Regionen-Tabelle: Zahlen rechtsbuendig */
.stats-region-table th:not(:first-child),
.stats-region-table td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

/* All-time-Sektion */
.alltime-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 12px 0;
}
.alltime-item {
  text-align: center;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.alltime-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.alltime-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 2px;
}

[data-theme="light"] .dist-bar,
[data-theme="light"] .hbar-track {
  background: rgba(100, 116, 139, 0.14);
}
[data-theme="light"] .dist-seg + .dist-seg {
  border-left-color: #fff;
}

/* ── Admin Quick-Nav & Mini-Stats ──────────────────────── */
.admin-quicknav {
  position: sticky;
  top: 52px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  margin-bottom: 20px;
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
.admin-quicknav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid transparent;
  white-space: nowrap;
}
.admin-quicknav a:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--link-hover);
  text-decoration: none;
}
.admin-quicknav a.is-active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: var(--accent);
  color: var(--title);
}
.admin-quicknav .qn-count {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  padding: 3px 6px;
  font-weight: 700;
}
.admin-quicknav a.qn-ext {
  opacity: 0.8;
}
.admin-quicknav a.qn-push {
  margin-left: auto;
}
@media (max-width: 860px) {
  .admin-quicknav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    top: 48px;
  }
  .admin-quicknav::-webkit-scrollbar {
    display: none;
  }
  .admin-quicknav a.qn-push {
    margin-left: 0;
  }
}
/* Anker-Ziele unter den zwei Sticky-Leisten (Header + Quick-Nav) frei halten */
.admin-quicknav ~ [id] {
  scroll-margin-top: 150px;
}

.admin-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.admin-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.admin-mini-card.is-zero {
  opacity: 0.6;
  background: transparent;
}
.admin-mini-icon {
  font-size: 1.3rem;
}
.admin-mini-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--title);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.admin-mini-label {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.25;
}

.admin-kpi-trend {
  margin-top: 6px;
}

/* Admin-Heatmap: Karte entsaettigen, damit die Heat-Farben wirken */
.admin-heatmap .leaflet-tile-pane {
  filter: grayscale(0.75) contrast(0.95);
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.72rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.heatmap-legend i {
  width: 90px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fde047, #f59e0b, #ef4444, #7f1d1d);
}

/* Respektiere die System-Einstellung "reduzierte Bewegung". */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Nutzung des BOTC Vorlesers (/admin, Abschnitt a11y-usage) ─────────── */
/* Reiner Verlaufsbalken. Die Zahl steht in der Spalte davor, der Balken traegt
   ein aria-label — ohne das waere er fuer Screenreader ein leeres Feld. */
.a11y-usage-bar {
  display: inline-block;
  min-width: 2px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* ── Linksammlung (/links) ─────────────────────────────────────────────── */
.linkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Die ganze Karte ist der Link — deshalb <a> mit Block-Layout statt <div>. */
.linkcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.linkcard:hover,
.linkcard:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.linkcard-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.linkcard-name {
  color: var(--title);
  font-weight: 600;
}

.linkcard:hover .linkcard-name {
  color: var(--link-hover);
}

.linkcard-badge {
  font-size: .68em;
  padding: 1px 6px;
}

.linkcard-desc {
  color: var(--muted);
  font-size: .92rem;
}

.linkcard-host {
  margin-top: auto;
  padding-top: 4px;
  color: var(--link);
  font-size: .82rem;
  word-break: break-all;
}

/* ---------------------------------------------------------------------------
   Mehrdeutige PLZ (AT/CH): Hinweis + Umschalter unter der Suche.
   Vierstellige PLZ existieren in Oesterreich UND der Schweiz (6300 = Zug/CH,
   Wörgl/AT) — statt still zu raten, lassen wir waehlen.
   --------------------------------------------------------------------------- */
.postal-country-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.9rem;
}

.postal-country-choice__text {
  margin: 0;
  color: var(--text-muted, var(--muted));
}

.postal-country-choice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
