/* ============================================================
   geocrime – modernes Design-System
   Markenfarben: Türkis #3c929f (Radar), Rot #dc3545 (Treffer)
   ============================================================ */

:root {
    --color-primary: #3c929f;
    --color-primary-dark: #2f7580;
    --color-primary-soft: rgba(60, 146, 159, 0.12);
    --color-accent: #dc3545;
    --color-accent-dark: #b92d3c;
    --color-bg: #f2f7f8;
    --color-surface: #ffffff;
    --color-text: #22333b;
    --color-text-muted: #6b7f88;
    --color-border: #d7e4e8;
    /* Ableitungen (helles Theme): Felder, Glas, Navbar, Soft-Texte */
    --color-field: #fbfdfe;
    --color-surface-soft: #f7fbfc;
    --color-text-soft: #33464f;
    --color-glass: rgba(255, 255, 255, 0.92);
    --color-glass-strong: rgba(255, 255, 255, 0.97);
    --color-navbar: rgba(255, 255, 255, 0.9);
    --color-icons-bar: rgba(255, 255, 255, 0.55);
    --color-toast: rgba(255, 255, 255, 0.86);
    --color-tip-bg: rgba(255, 255, 255, 0.97);
    --color-tip-text: #1c2b33;
    --color-tip-muted: #5c6f7a;
    --color-live-bg: rgba(15, 18, 22, 0.66);
    --color-live-border: transparent;
    --color-map-hover: brightness(0.93);
    --color-map-hover-kreis: brightness(0.9);
    --color-map-hover-gemeinde: brightness(0.92);
    --radius: 14px;
    --radius-pill: 999px;
    --shadow: 0 6px 20px rgba(34, 51, 59, 0.08);
    --shadow-sm: 0 2px 8px rgba(34, 51, 59, 0.06);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
    overflow-x: hidden;
    touch-action: manipulation;
    overscroll-behavior-y: none;
}

/* Karten-Seite (index.php): kein Scrollen/Pannen – die Karte füllt den Viewport */
html.map-no-scroll,
html.map-no-scroll body {
    overflow: hidden;
    height: 100%;
}

a {
    color: var(--color-primary-dark);
}

/* ---------- Navigation ---------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid var(--color-border);
}
/* Blur-Effekt über ein Pseudo-Element: backdrop-filter auf der Navbar selbst
   würde einen Containing Block erzeugen und position:fixed-Nachfahren
   (Mobile-Overlay) an der Navbar statt am Viewport verankern. */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--color-navbar);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Logo + Beta-Hinweis linksbündig untereinander */
    gap: 1px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    height: 64px;
    width: auto;
    display: block;
}

/* Beta-Versionshinweis klein UNTER dem Logo (linksbündig) */
.brand-version {
    display: block;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    white-space: nowrap;
    padding-left: 2px;
}

/* Burger-Button (nur Mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle:hover {
    background: var(--color-primary-soft);
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Menü-Links (Desktop: horizontal rechts) */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-link svg {
    flex-shrink: 0;
}
.nav-link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
}
.nav-link.active {
    background: var(--color-primary);
    color: #ffffff;
}

/* Sprach-Umschalter (DE/EN) */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    margin-left: 0.5rem;
    padding: 3px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    flex-shrink: 0;
}
.lang-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}
.lang-btn:hover {
    color: var(--color-primary-dark);
}
.lang-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* Sprach-Umschalter in der Icon-Leiste unten (nur Mobile sichtbar) */
.lang-switch-bar {
    display: none;
}
.footer-icons .lang-switch {
    margin-left: 0;
    border-radius: 999px;
    padding: 2px;
    align-self: center;
}
.footer-icons .lang-btn {
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    font-size: 0.74rem;
    line-height: 1.2;
}

/* CTA-Button: Straftat melden */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.1s ease;
}
.btn-cta:hover {
    background: #b92d3c;
    color: #fff;
}
.btn-cta:active {
    transform: scale(0.97);
}
.btn-cta svg {
    flex-shrink: 0;
}

/* CTA-Link innerhalb von Inhaltsseiten (z. B. Projekt → Unterstützen) */
.cta-support {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.6rem 1.15rem;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.1s ease;
}
.cta-support:hover {
    background: var(--color-primary-dark);
    color: #fff !important;
}
.cta-support:active {
    transform: scale(0.98);
}

/* Hervorgehobener Hinweis auf Inhaltsseiten (z. B. Spender-Pin auf Unterstützen) */
.spender-box {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-field);
}
.spender-box h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}
.spender-box p {
    margin: 0;
}

/* Install-Button (PWA) – liegt UNTER dem Header (zwischen Header und Karte/Inhalt),
   damit er mobil nicht im Header abgeschnitten wird */
#installButton {
    display: none;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}
#installButton.is-visible {
    display: flex;
}
#installButton:hover {
    background: var(--color-primary-dark);
}
#installButton:active {
    transform: scale(0.995);
}
/* Karten-Seite: Höhe um die Button-Höhe verringern, damit die Karte
   vollständig sichtbar bleibt (kein Abschneiden unten) */
#installButton.is-visible + .map-page {
    height: calc(100dvh - 5rem - 2.8rem);
    height: calc(100vh - 5rem - 2.8rem);
}

@media (max-width: 767px) {
    .navbar-inner {
        padding: 0.3rem 0.75rem;
    }
    /* Burger-Menü ist aus dem Header entfernt – Menü = Bottom-Sheet unten */
    .nav-toggle {
        display: none;
    }
    /* Sprach-Umschalter wandert auf Mobile in die Icon-Leiste unten */
    .navbar-inner > .lang-switch {
        display: none;
    }
    /* Nav-Links auf Mobile ausblenden (das Bottom-Sheet übernimmt) */
    .nav-links {
        display: none;
    }
    .btn-cta {
        margin-left: auto;
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
    }
    .logo {
        height: 48px;
    }
    /* Icon-Leiste unten (Mobile):
       Standard: alle Icons kompakt in einer Zeile sichtbar (immer da).
       main.js klappt die Leiste per .collapsed ein (nur Toggle) und
       öffnet damit das Bottom-Sheet-Menü. */
    .footer-icons .icon-btn {
        width: 36px;
        height: 36px;
    }
    .footer-icons .icon-btn svg {
        width: 19px;
        height: 19px;
    }
    .footer-icons .lang-switch-bar {
        display: inline-flex;
    }
    .footer-icons .lang-btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.72rem;
    }
    .icon-btn-more {
        display: none;
    }
    .footer-icons.collapsed .icon-btn:not(.icon-btn-more),
    .footer-icons.collapsed .lang-switch-bar {
        display: none;
    }
    .footer-icons.collapsed .icon-btn-more {
        display: inline-flex;
    }
    /* Karte + Standort-Titel: etwas mehr Reserve + unterer Abstand,
       damit der Titel nie unter der Icon-Leiste unten landet */
    .map-container {
        --map-reserve: 13.5rem;
    }
    .map-stage {
        padding-bottom: 2.75rem;
    }
}

/* ---------- Inhaltsseiten (Projekt, Unterstützen, Datenschutz) ---------- */

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.page {
    padding: 1.5rem 1rem 3rem;
}

.content-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem;
}

.content-card h1 {
    margin-top: 0;
    font-size: 1.6rem;
}
.content-card h2 {
    font-size: 1.2rem;
    margin-top: 1.6rem;
}
.content-card h3 {
    font-size: 1.05rem;
    margin-top: 1.2rem;
}
.content-card p,
.content-card li {
    color: var(--color-text-soft);
}

/* ---------- Karten-Seite ---------- */

.map-page {
    /* Karten-Bereich = Viewport abzüglich Navbar: Karte füllt den Platz maximal */
    height: calc(100dvh - 5rem);
    height: calc(100vh - 5rem);
    padding: 0.75rem 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* kein Scroll/Pan der Karten-Seite (mobil wie desktop) */
    overflow: hidden;
    overscroll-behavior: none;
}

#mapView,
#stateView,
#kreisView {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-height: 0;
}
#mapView[hidden],
#stateView[hidden],
#kreisView[hidden] {
    display: none !important;
}

/* Kopfzeile über der Karte: alles in einer Zeile */
.map-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    width: 100%;
    max-width: 900px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}
/* Live-Badge in der Kopfzeile: linker Block neben dem Zurück-Button,
   Dropdown rechts – Badge und Dropdown auf gleicher Höhe */
.map-header .live-badge {
    margin-right: 0.5rem;
}
.map-header .btn-back {
    flex-shrink: 0;
    white-space: nowrap;
    /* Bei Ebenen mit Zurück-Button: Button links neben dem Badge halten,
       das Dropdown ans rechte Ende schieben */
    margin-right: auto;
}
.map-header .select {
    flex: 0 1 auto;
    min-width: 170px;
    max-width: 300px;
}
@media (max-width: 767px) {
    /* Auf Mobil: mehr Platz für Dropdown + Live-Badge in der Kopfzeile */
    .map-header .select {
        min-width: 0;
        flex-basis: 140px;
    }
    .map-header .live-badge {
        margin-right: 0.35rem;
    }
    .map-header .btn-back {
        /* margin-right:auto bleibt (schiebt das Dropdown nach rechts) */
        margin-right: auto;
    }
}

/* Bühne unter dem Kopf: Karte + Standort-Titel als Gruppe, vertikal mittig */
.map-stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

/* Karte nutzt den verfügbaren Platz optimal aus und bleibt immer vollständig
   sichtbar: Breite UND Höhe begrenzen die Größe (--map-ratio = Breite/Höhe der
   aktuellen Karte, wird per JS gesetzt). dvh berücksichtigt die mobile
   Browser-Leiste (Fallback: vh). Horizontal + vertikal mittig. */
.map-container {
    /* Reserve: Navbar (5rem) + Kopfzeile (~3rem) + Titel (~2rem) + Luft */
    --map-reserve: 13rem;
    width: min(100%, calc((100dvh - var(--map-reserve)) * var(--map-ratio, 1)), 900px);
    width: min(100%, calc((100vh - var(--map-reserve)) * var(--map-ratio, 1)), 900px);
}
.map-container svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Standort-Titel unterhalb der Karte (mittig, dezent) */
.map-title {
    margin: 0;
    padding: 0 0.25rem;
    max-width: 100%;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
    /* Umbruch erlaubt: Die Startseiten-Überschrift trägt das Hauptkeyword
       („Kriminalitätskarte Deutschland“) und darf nicht abgeschnitten werden. */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
}
@media (max-width: 767px) {
    .map-title {
        font-size: 0.95rem;
    }
}

/* ---------- Kartenflächen ---------- */

/* Kartenflächen: Grenzen immer gleich dünn (in Bildschirm-Pixeln),
   unabhängig von der Zoom-Ebene (viewBox) */
.state-path,
.kreis-path,
.gemeinde-path {
    vector-effect: non-scaling-stroke;
}
.state-path {
    cursor: pointer;
    stroke: #ffffff;
    stroke-width: 1.1;
    transition: filter 0.15s ease;
}
.state-path:hover,
.state-path:focus {
    filter: brightness(0.93);
    outline: none;
}
.kreis-path {
    cursor: pointer;
    stroke: #ffffff;
    stroke-width: 1;
    transition: filter 0.15s ease;
}
.kreis-path:hover,
.kreis-path:focus {
    filter: brightness(0.9);
    outline: none;
}

/* Gemeinde-/Bezirks-Flächen auf der Landkreis-Karte (Grenzen + Tooltip) */
.gemeinde-path {
    stroke: #ffffff;
    stroke-width: 0.4;
    transition: filter 0.15s ease;
}
.gemeinde-path:hover {
    filter: brightness(0.92);
    cursor: default;
}

/* ---------- Formulare ---------- */

.contact-form {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 560px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.field > span {
    font-weight: 600;
    font-size: 0.9rem;
}
.field input,
.field textarea {
    font: inherit;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-field);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.btn-primary {
    align-self: flex-start;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
}
/* Honeypot – für Menschen unsichtbar */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
/* Zwei/mehrspaltige Feldgruppen */
.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}
/* Select im Formular */
.field select {
    font: inherit;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-field);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}
/* Checkbox-Zeile (Einwilligungen) */
.field-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--color-text-soft);
    cursor: pointer;
}
.field-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}
/* Hinweis-Box (anonym/Gegenprüfung) */
.notice {
    background: #e8f4f7;
    border: 1px solid #c5e3ea;
    color: #2a5b66;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
}
.form-status {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    margin: 0 0 1rem;
}
.form-status-ok {
    background: #e3f2ec;
    color: #1f6b4c;
    border: 1px solid #b9e0cf;
}
.form-status-error {
    background: #fdecee;
    color: #a93b45;
    border: 1px solid #f5c6cb;
}
/* Bankverbindung (Unterstützen) */
.bank-card {
    margin-top: 1.2rem;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    max-width: 520px;
}
.bank-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem 1.2rem;
    align-items: baseline;
}
.h2-inline {
    margin: 0 0 0.85rem;
    font-size: 1.2rem;
}
.bank-card dt {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.bank-card dd {
    margin: 0;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.95rem;
    word-break: break-all;
}

.ms-auto {
    margin-left: auto;
}

.select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.5rem 2.2rem 0.5rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface)
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236b7f88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 0.85rem center;
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.select:hover {
    border-color: var(--color-primary);
}
.select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* ---------- Zurück-Button ---------- */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-back:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
}

/* ---------- Blinkender Standort-Marker (nach Dropdown-Auswahl) ---------- */

.stadt-marker {
    pointer-events: none; /* Hover/Tooltips der Gemeinde-Flächen gehen durch */
}
.stadt-marker .marker-dot {
    fill: var(--color-accent);
    stroke: #ffffff;
    stroke-width: 1.5;
}
.stadt-marker .marker-pulse {
    fill: rgba(220, 53, 69, 0.35);
    transform-box: fill-box;
    transform-origin: center;
    animation: markerPulse 1.4s ease-out infinite;
}

/* ---------- Vorfall-Marker (verifizierte Vorfälle, Pin) ---------- */

.vorfall-marker {
    pointer-events: none; /* Klicks gehen weiter an die Karte */
}
.vorfall-pin {
    fill: var(--color-accent);
    stroke: #ffffff;
    stroke-width: 1.5;
}
/* Vom öffentlichen Formular gemeldete Vorfälle (herkunft='user') heben sich
   mit einem ORANGEN Pin von den normalen (Pipeline-)Pins ab. */
.vorfall-pin-user {
    fill: #ff8c1a;
}
/* Radar-Effekt (auf ALLEN Karten-Ebenen, nur in der Live-Ansicht): Pins sind
   UNSICHTBAR und erscheinen rot, solange Strahl + Schweif sie überstreichen
   (.radar-lit setzt main.js). Sobald kein Live-Modus mehr aktiv ist
   (Filter/anderes Jahr) oder Bewegung reduziert wird, entfernt main.js die
   Klasse body.radar-live → Pins sind wieder normal sichtbar. */
body.radar-live .vorfall-marker {
    opacity: 0;
    transition: opacity 0.15s ease;
}
body.radar-live .vorfall-marker.radar-lit {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(220, 53, 69, 0.85));
}
@keyframes markerPulse {
    0% {
        transform: scale(0.4);
        opacity: 1;
    }
    70% {
        transform: scale(2.6);
        opacity: 0;
    }
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

/* ---------- Newsletter (Startseite) ---------- */

.newsletter-box {
    width: 100%;
    max-width: 420px;
    margin: 1.5rem auto 0;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.4rem;
}
.newsletter-box h2 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
}
.newsletter-box p {
    margin: 0 0 0.8rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
#newsletterForm {
    display: flex;
    gap: 0.5rem;
}
#newsletterForm input {
    flex: 1;
    min-width: 0;
    font: inherit;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
#newsletterForm input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.newsletter-status {
    font-size: 0.88rem;
    margin-top: 0.6rem;
}
.newsletter-status.ok {
    color: #1f6b4c;
}
.newsletter-status.err {
    color: #a93b45;
}

/* ---------- Quellenangabe (unten rechts) ---------- */

.map-source {
    position: fixed;
    right: 8px;
    bottom: 4px;
    margin: 0;
    max-width: 260px;
    font-size: 9px;
    line-height: 1.3;
    text-align: right;
    color: #8ba0a8;
    z-index: 800;
}
.map-source a {
    color: #8ba0a8;
}

/* ---------- Einstiegstext auf der Startseite (SEO) ----------
   Klein, aber sichtbar (kein Hidden-Text): sitzt über der Quellenangabe
   unten rechts und beeinflusst das Karten-Layout nicht (fixed). */
.map-intro {
    position: fixed;
    right: 8px;
    bottom: 32px;
    margin: 0;
    max-width: min(340px, 52vw);
    font-size: 10px;
    line-height: 1.35;
    text-align: right;
    color: #8ba0a8;
    z-index: 800;
}
@media (max-width: 767px) {
    .map-intro {
        max-width: 62vw;
        bottom: 30px;
        font-size: 9.5px;
    }
}
[data-theme="dark"] .map-intro {
    color: #7d9199;
}

/* ---------- Icon-Leiste (Kontakt, Impressum, Datenschutz, Einstellungen) ---------- */

.footer-icons {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    max-width: calc(100vw - 28px);
    gap: 6px;
    padding: 8px;
    background: var(--color-icons-bar);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--color-text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.icon-btn:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
}
.icon-btn:active {
    transform: scale(0.94);
}
.icon-btn svg {
    display: block;
}
/* Menü-Button der Icon-Leiste (nur Mobile) */
.icon-btn-more {
    display: none;
}

/* ---------- Cookie-/Consent-Panel (eigene Lösung) ---------- */

.consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 34, 41, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.consent-panel {
    position: fixed;
    z-index: 2001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 460px);
    max-height: 88dvh;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(20, 34, 41, 0.25);
    padding: 1.6rem 1.6rem 1.4rem;
}
.consent-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
}
.consent-close:hover {
    color: var(--color-text);
}
.consent-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}
.consent-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}
.consent-intro {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}
.consent-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
}
.consent-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-soft);
    cursor: pointer;
}
.consent-option strong {
    display: block;
    font-size: 0.95rem;
}
.consent-option span span {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}
.consent-required {
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
}
.consent-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}
.consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}
.consent-actions button {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.consent-actions .consent-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.consent-actions .consent-primary:hover {
    background: var(--color-primary-dark);
}
.consent-actions .consent-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.consent-legal {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.consent-legal a {
    color: var(--color-primary-dark);
}
body.consent-open {
    overflow: hidden;
}

/* ---------- Notfall-Hinweis (Polizei 110) vor dem Melde-Formular ---------- */

.notfall-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2002;
    background: rgba(20, 34, 41, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.notfall-panel {
    position: fixed;
    z-index: 2003;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 460px);
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(20, 34, 41, 0.25);
    padding: 1.6rem;
}
.notfall-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}
.notfall-panel p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0 0 0.6rem;
}
.notfall-panel p strong {
    color: var(--color-text);
}
.notfall-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.2rem;
}
.notfall-actions button {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.notfall-actions .consent-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.notfall-actions .consent-primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.notfall-actions .consent-primary:hover {
    background: #b92d3c;
}

/* ---------- Newsletter-Panel (öffnet über das Icon unten rechts) ---------- */

.newsletter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 34, 41, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.newsletter-panel {
    position: fixed;
    z-index: 2001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 400px);
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(20, 34, 41, 0.25);
    padding: 1.6rem 1.6rem 1.4rem;
}
.newsletter-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}
.newsletter-panel form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.newsletter-panel form input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
}
.newsletter-panel form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.newsletter-panel .newsletter-status {
    margin: 0.8rem 0 0;
}

/* ---------- Bottom-Sheet-Menü (Mobile, öffnet über das ⋮-Icon) ---------- */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(20, 34, 41, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.sheet-backdrop.sheet-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
.sheet-panel {
    position: fixed;
    inset: 0; /* ganzer Viewport */
    z-index: 2101;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--color-glass-strong);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    padding: 4.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s;
}
.sheet-panel.sheet-open {
    visibility: visible;
    transform: translateY(0);
}
.sheet-close {
    position: absolute;
    top: 1.1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    border: none;
    border-radius: 50%;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.sheet-close:hover {
    background: var(--color-primary);
    color: #fff;
}
.sheet-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.sheet-body {
    width: 100%;
    max-width: 480px;
    margin: auto 0; /* Gruppe (Liste + Sprachumschalter) vertikal mittig */
}
.sheet-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.sheet-item:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
}
.sheet-item.active {
    background: var(--color-primary);
    color: #ffffff;
}
.sheet-item svg {
    flex-shrink: 0;
}
.sheet-item-label {
    flex: 1;
}
.sheet-cta {
    background: var(--color-accent);
    color: #fff;
}
.sheet-cta:hover {
    background: #b92d3c;
    color: #fff;
}
.sheet-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.6rem 0;
}
.sheet-lang {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-border);
}

/* ---------- Radar (SVG-Overlay in der Deutschland-Karte) ----------
   Deckt die GANZE Karten-Fläche ab (Deutschland, Bundesland, Landkreis);
   Ringe + Strahl sind durch den SVG-Clip nur INNERHALB der jeweiligen
   Fläche sichtbar. Nur in der Live-Ansicht aktiv (main.js setzt body.radar-live). */
#mapView .map-container,
#stateView .map-container,
#kreisView .map-container {
    position: relative;
}
#mapView .map-container svg,
#stateView .map-container svg,
#kreisView .map-container svg {
    position: relative;
    z-index: 1;
}
.radar-svg {
    pointer-events: none; /* Karte bleibt klickbar */
}
/* Der Sweep wird NICHT über CSS gedreht: main.js setzt je Frame das
   SVG-Attribut transform="rotate(w cx cy)" – der Drehpunkt liegt damit in
   jedem Browser exakt auf der Nabe in der Kartenmitte (kein
   transform-box/transform-origin nötig, nichts „wandert“ kreislich). */
/* Nutzer, die Bewegung reduzieren wollen: main.js baut dann kein Radar-
   Overlay (kein body.radar-live) → Pins bleiben normal sichtbar. */

/* ---------- Live-Ansicht-Badge (auf ALLEN Karten, oben links in der
   Kopfzeile – auf gleicher Höhe wie das Bundesland-/Landkreis-Dropdown)
   Kennzeichnet die Karten-Ansicht als Live (Standard-Zeitraum „Heute“,
   automatische Aktualisierung alle 60 s). Liegt in der Kopfzeile (.map-header)
   links neben dem Zurück-Button bzw. Dropdown und stört weder Klicks noch
   Radar (pointer-events: none). Beim Hovern erscheint ein Tooltip:
   Live-Daten vom heutigen Datum + nächster AJAX-Durchlauf.
   main.js blendet das Badge aus, sobald im Filter eine andere Auswahl
   getroffen wird (Klasse .live-badge-aus). */
.live-badge {
    position: relative; /* Anker für den Tooltip */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 0.3rem 0.6rem 0.32rem 0.55rem;
    border-radius: 10px;
    background: var(--color-live-bg);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none; /* Kopfzeile bleibt bedienbar */
    user-select: none;
}
.live-badge.live-badge-aus {
    display: none !important;
}
/* Zeile 1: pulsierender Punkt + „LIVE“ (weiß) */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}
/* Zeile 2 (neue Zeile, innerhalb des Badges): „aktuell in … sek.“ – so klein,
   dass das Badge nicht breiter als die LIVE-Zeile wird (width:100% koppelt die
   Zeile an die Pill-Breite, Überlauf wird abgeschnitten). */
.live-count {
    display: block;
    width: 100%;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.48rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-count svg {
    /* nicht mehr verwendet (Text statt Icon) – Regel bleibt als Schutz */
    display: none !important;
}
.live-count [data-live-count] {
    font-variant-numeric: tabular-nums;
}
.live-badge .live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.65);
    animation: live-pulse 1.8s ease-out infinite;
}
.live-badge .live-text {
    white-space: nowrap;
}
/* Tooltip (Hover): Live-Daten vom heutigen Tag + nächster AJAX-Durchlauf.
   Wird per JS über die Mausposition ein-/ausgeblendet (.live-hover),
   damit das Badge selbst klickdurchlässig bleibt (pointer-events: none). */
.live-tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 12;
    min-width: 190px;
    max-width: 260px;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: var(--color-tip-bg);
    color: var(--color-tip-text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.45;
    text-transform: none;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-3px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none; /* Tooltip stört keine Karten-Interaktion */
    user-select: none;
}
.live-badge.live-hover .live-tip {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.live-tip-datum {
    display: block;
}
.live-tip-naechste {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--color-tip-muted);
}
@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(255, 59, 48, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .live-badge .live-dot {
        animation: none;
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6);
    }
    .live-tip {
        transition: none;
    }
}

/* ---------- Rechte Schubladen: Tages-Icon (oben) + Filter-Icon (darunter) ---------- */
.filter-toggle {
    position: fixed;
    right: 10px;
    top: calc(50% - 6px); /* Filter leicht nach oben gerückt */
    transform: translateY(-50%);
    z-index: 1500;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-glass);
    color: var(--color-text-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: color 0.2s ease, box-shadow 0.2s ease;
}
.filter-toggle:hover {
    color: var(--color-primary-dark);
}
.filter-toggle.active {
    color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18);
}
.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
/* Tages-Schublade: Icon ÜBER dem Filter, Badge in Türkis */
.day-toggle {
    top: calc(50% - 58px);
}
.day-toggle.active {
    color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(60, 146, 159, 0.22);
}
.day-badge {
    background: var(--color-primary);
}
.day-panel {
    display: flex;
    flex-direction: column;
}
.day-panel .filter-head {
    flex-shrink: 0;
}
.tag-liste {
    flex: 1;
    overflow-y: auto;
    margin: 0 -0.3rem;
    padding: 0 0.3rem 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tag-leer {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 1rem 0.2rem;
    text-align: center;
}
.tag-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    font: inherit;
    color: inherit;
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: 12px;
    padding: 0.7rem 0.8rem 0.65rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.tag-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}
.tag-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}
.tag-item:active {
    transform: scale(0.995);
}
.tag-item .tag-item-kopf {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}
.tag-item .tag-item-kat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}
.tag-item .tag-item-datum {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.tag-item .tag-item-titel {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.3rem;
}
.tag-item .tag-item-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}
/* Redaktioneller Prüfstatus auf der Karte (Card): eigene Zeile GANZ UNTEN,
   durch feine Trennlinie abgesetzt – „Prüfung ausstehend" bzw. „Geprüfte
   Meldung" (grün); gesetzt über das Dashboard-Icon „Geprüft" */
.tag-item .tag-item-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tag-item .tag-item-status svg {
    flex-shrink: 0;
}
.tag-item .tag-item-status.ist-offen {
    color: #b06a00; /* warmes Orange: Prüfung ausstehend */
}
.tag-item .tag-item-status.ist-geprueft {
    color: #1e7e34; /* Grün: Geprüfte Meldung */
}
/* Vorsicht-Hinweis bei noch nicht geprüften Meldungen (kleine Schrift) */
.tag-item .tag-item-hinweis {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1.3;
    color: #a16207;
}

/* ---------- Vorfall-Details (Modal aus der Tages-Schublade) ---------- */
.detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2400;
    background: rgba(20, 34, 41, 0.5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.detail-backdrop.open {
    opacity: 1;
    visibility: visible;
}
.detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.97);
    z-index: 2401;
    width: min(560px, calc(100vw - 2rem));
    max-height: min(84vh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(20, 34, 41, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.detail-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.detail-modal[hidden] {
    display: none;
}
.detail-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1.1rem 0.6rem;
    flex-shrink: 0;
}
.detail-kopf strong {
    font-size: 1.05rem;
}
.detail-inhalt {
    overflow-y: auto;
    padding: 0.2rem 1.1rem 1.2rem;
}
.detail-titel {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0.1rem 0 0.85rem;
}
/* Badge-Zeile: Kategorie-Chip + Prüfstatus nebeneinander (modern) */
.detail-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.detail-chip-kat {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    background: var(--color-accent);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
}
.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
}
.detail-status.ist-offen {
    color: #8a5400;
    background: #fdf3d7;
    border: 1px solid #f0d9a0;
}
.detail-status.ist-geprueft {
    color: #14532d;
    background: #e5f6e9;
    border: 1px solid #b7dfc2;
}
/* Vorsicht-Hinweis im Modal bei noch nicht geprüften Meldungen (kleine Schrift) */
.detail-hinweis {
    margin: -0.3rem 0 0.9rem;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.45;
    color: #8a5400;
}
.detail-reihe {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    margin: 0.4rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.detail-reihe .detail-label {
    flex: 0 0 105px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.detail-reihe .detail-wert {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.detail-quellen {
    list-style: none;
    margin: 0.3rem 0 0;
    padding: 0;
}
.detail-quellen li {
    margin: 0.25rem 0;
}
.detail-quellen a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary-dark);
    text-decoration: underline;
    word-break: break-all;
}
.detail-quellen a:hover {
    color: var(--color-accent);
}
.detail-quellen .quelle-nummer {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--color-text-muted);
}
.detail-karte-zeile {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-border);
}
.detail-karte-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: var(--color-primary-soft);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.detail-karte-link:hover {
    background: var(--color-primary);
    color: #fff;
}
@media (prefers-reduced-motion: reduce) {
    .detail-modal,
    .detail-backdrop {
        transition: none;
    }
}
@media (max-width: 480px) {
    .detail-reihe {
        flex-direction: column;
        gap: 0.05rem;
        margin: 0.55rem 0;
    }
    .detail-reihe .detail-label {
        flex-basis: auto;
    }
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1499;
    background: rgba(20, 34, 41, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.filter-backdrop.open {
    opacity: 1;
    visibility: visible;
}
.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1501;
    width: min(340px, 92vw);
    background: var(--color-surface);
    box-shadow: -12px 0 40px rgba(20, 34, 41, 0.18);
    padding: 1rem 1.1rem 1.4rem;
    overflow-y: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
}
.filter-panel.open {
    transform: none;
    visibility: visible;
}
.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}
.filter-head strong {
    font-size: 1.05rem;
    flex: 1;
    min-width: 0;
    margin-right: 0.6rem;
    line-height: 1.35;
}
.filter-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
}
.filter-group {
    border: none;
    margin: 0 0 1.1rem;
    padding: 0;
}
.filter-group legend {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}
.filter-radio {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    cursor: pointer;
}
.filter-radio input {
    margin-top: 0.25rem;
    accent-color: var(--color-primary);
}
.filter-kats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.1rem 0.6rem;
}
.filter-kat {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.86rem;
    cursor: pointer;
    padding: 0.18rem 0;
}
.filter-kat input {
    accent-color: var(--color-primary);
    flex-shrink: 0;
}
.filter-reset {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.filter-reset:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
@media (max-width: 767px) {
    /* Auf Mobil: beide Schubladen-Icons höher setzen (Refresh unten rechts) */
    .filter-toggle {
        top: calc(46% - 6px);
    }
    .day-toggle {
        top: calc(46% - 58px);
    }
}

/* ---------- Toast-Benachrichtigungen (neue Vorfälle, oben rechts) ---------- */
.toast-container {
    position: fixed;
    top: 5.2rem; /* unterhalb der Navbar */
    right: 12px;
    z-index: 1800;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: min(340px, calc(100vw - 24px));
    pointer-events: none; /* Lücken lassen Klicks zur Karte durch */
}
.toast {
    width: 100%;
    background: var(--color-toast); /* leicht transparent */
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(20, 34, 41, 0.18);
    padding: 0.6rem 0.8rem 0.65rem;
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    pointer-events: auto;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.toast.show {
    transform: none;
    opacity: 1;
}
.toast.hide {
    transform: translateX(calc(100% + 24px));
    opacity: 0;
}
.toast-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.toast-kopf strong {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}
.toast-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0 0.15rem;
}
.toast-titel {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}
.toast-meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}
.toast-datum {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.1rem;
}
@media (max-width: 767px) {
    .toast-container {
        top: 4.6rem;
        right: 10px;
        width: min(320px, calc(100vw - 20px));
    }
}
/* Bewegung reduzieren: Toasts ohne Seitwärts-Slide */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease;
    }
    .toast.hide {
        transform: none;
        opacity: 0;
    }
}

/* ============================================================
   DARKMODE (data-theme="dark" auf <html>)
   theme_boot_html() setzt das Attribut VOR dem CSS-Rendering,
   der Toggle (.theme-toggle) wechselt es zur Laufzeit.
   ============================================================ */

:root[data-theme="dark"] {
    color-scheme: dark;
    --color-primary: #4baab8;
    --color-primary-dark: #6cc3d0;
    --color-primary-soft: rgba(75, 170, 184, 0.18);
    --color-accent: #ef4a5a;
    --color-accent-dark: #ff6473;
    --color-bg: #0d1519;
    --color-surface: #152229;
    --color-surface-soft: #1b2a33;
    --color-text: #dde8ec;
    --color-text-soft: #c3d2d8;
    --color-text-muted: #8ba1ab;
    --color-border: #2b3e48;
    --color-field: #1b2a33;
    --color-glass: rgba(21, 34, 41, 0.92);
    --color-glass-strong: rgba(23, 37, 45, 0.97);
    --color-navbar: rgba(13, 21, 25, 0.9);
    --color-icons-bar: rgba(18, 30, 36, 0.6);
    --color-toast: rgba(23, 37, 45, 0.9);
    --color-tip-bg: rgba(30, 47, 57, 0.97);
    --color-tip-text: #e3edf1;
    --color-tip-muted: #9db2bc;
    --color-live-bg: rgba(8, 12, 15, 0.82);
    --color-live-border: rgba(255, 255, 255, 0.22);
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    /* Kartenflächen: Türkis-Töne auf dunklem Grund aufhellen, damit auch
       die dunkleren Töne der Palette klar erkennbar bleiben */
    --color-map-hover: brightness(1.28) saturate(0.95);
    --color-map-hover-kreis: brightness(1.25) saturate(0.95);
    --color-map-hover-gemeinde: brightness(1.24) saturate(0.95);
}

[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
}
[data-theme="dark"] a {
    color: var(--color-primary-dark);
}
/* Weiße Schrift auf farbigen Buttons/Links darf die dunkle a-Farbe nicht
   überschreiben: „Vorfall melden" (btn-cta), aktive Nav-/Sprach-/Sheet-Einträge
   und der Karten-Link im Hover behalten im Dunkelmodus weiß. */
[data-theme="dark"] .btn-cta,
[data-theme="dark"] .btn-cta:hover,
[data-theme="dark"] .btn-cta:active,
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .lang-btn.active,
[data-theme="dark"] .sheet-item.active,
[data-theme="dark"] .sheet-cta,
[data-theme="dark"] .sheet-cta:hover,
[data-theme="dark"] .detail-karte-link:hover {
    color: #fff;
}

/* Kartenflächen im Darkmode: Die Türkis-Töne (30-70 % Helligkeit) bleiben
   unverändert – sie heben sich auf dunklem Grund gut ab. Nur die weißen
   Grenzen werden dunkler (nicht blenden), und der Hover hellt die Fläche
   statt sie abzudunkeln (im Hell-Modus wird abgedunkelt). */
[data-theme="dark"] .state-path {
    stroke: rgba(8, 14, 18, 0.95);
}
[data-theme="dark"] .kreis-path {
    stroke: rgba(8, 14, 18, 0.9);
}
[data-theme="dark"] .gemeinde-path {
    stroke: rgba(8, 14, 18, 0.7);
}
[data-theme="dark"] .state-path:hover,
[data-theme="dark"] .state-path:focus {
    filter: brightness(1.12);
}
[data-theme="dark"] .kreis-path:hover,
[data-theme="dark"] .kreis-path:focus {
    filter: brightness(1.1);
}
[data-theme="dark"] .gemeinde-path:hover {
    filter: brightness(1.1);
}

/* Karten-Quellenangabe + Live-Badge-Rand im Darkmode etwas aufhellen */
[data-theme="dark"] .map-source,
[data-theme="dark"] .map-source a {
    color: #7d96a1;
}
[data-theme="dark"] .live-badge {
    background: var(--color-live-bg);
    border: 1px solid var(--color-live-border);
}

/* Prüfstatus-Farben (Cards) im Darkmode heller/lesbar */
[data-theme="dark"] .tag-item .tag-item-status.ist-offen {
    color: #f5b95c;
}
[data-theme="dark"] .tag-item .tag-item-status.ist-geprueft {
    color: #55d489;
}
[data-theme="dark"] .tag-item .tag-item-hinweis {
    color: #f0b95e;
}
[data-theme="dark"] .detail-status.ist-offen {
    color: #f7cf8a;
    background: rgba(160, 100, 10, 0.22);
    border: 1px solid rgba(210, 150, 40, 0.45);
}
[data-theme="dark"] .detail-status.ist-geprueft {
    color: #8ce8b0;
    background: rgba(30, 130, 70, 0.22);
    border: 1px solid rgba(60, 180, 110, 0.4);
}
[data-theme="dark"] .detail-hinweis {
    color: #f0b95e;
}
[data-theme="dark"] .newsletter-status.ok {
    color: #55d489;
}
[data-theme="dark"] .newsletter-status.err {
    color: #ff8b96;
}

/* Hinweis-Box (anonym/Gegenprüfung) + Formular-Status im Darkmode */
[data-theme="dark"] .notice {
    background: rgba(60, 146, 159, 0.14);
    border: 1px solid rgba(60, 146, 159, 0.4);
    color: #9fd6de;
}
[data-theme="dark"] .form-status-ok {
    background: rgba(30, 130, 70, 0.2);
    color: #8ce8b0;
    border: 1px solid rgba(60, 180, 110, 0.4);
}
[data-theme="dark"] .form-status-error {
    background: rgba(220, 53, 69, 0.16);
    color: #ff8b96;
    border: 1px solid rgba(220, 53, 69, 0.45);
}

/* Live-Badge liegt jetzt in der Kopfzeile (.map-header) – als flex-Item
   links, Tooltip weiterhin absolut zum Badge */
[data-theme="dark"] .live-tip {
    background: var(--color-tip-bg);
    color: var(--color-tip-text);
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .live-tip-naechste {
    color: var(--color-tip-muted);
}

/* Select-Pfeil-Icon: im Darkmode hellere Strichfarbe */
[data-theme="dark"] .select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238ba1ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Theme-Umschalter (Hell/Dunkel) – Button neben dem Sprachumschalter.
   Beide Icons (Mond + Sonne) sind im Markup; je nach Theme wird das Icon
   des ZIEL-Zustands gezeigt (Sonne im Dunkelmodus = „Hell aktivieren"). */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}
.theme-toggle svg {
    display: block;
}
[data-theme="light"] .theme-icon-sonne,
:root:not([data-theme="dark"]) .theme-icon-sonne {
    display: none;
}
[data-theme="dark"] .theme-icon-mond {
    display: none;
}
/* Desktop: Toggle in der Navbar neben DE/EN; Mobile: Toggle in der
   Icon-Leiste unten neben dem Sprachumschalter (wie .lang-switch-Bar) */
.navbar-inner > .theme-toggle {
    margin-left: 0.35rem;
}
.footer-icons .theme-toggle {
    display: none;
}
.footer-icons .theme-toggle svg {
    width: 18px;
    height: 18px;
}
/* Bottom-Sheet (Mobile-Menü): Sprachumschalter + Theme-Toggle nebeneinander */
.sheet-lang .theme-toggle {
    width: 30px;
    height: 30px;
}
@media (max-width: 767px) {
    /* Mobile: Sprachumschalter + Theme-Toggle wandern in die Icon-Leiste */
    .navbar-inner > .theme-toggle {
        display: none;
    }
    .footer-icons .theme-toggle {
        display: inline-flex;
        width: 36px;
        height: 36px;
    }
    .footer-icons.collapsed .theme-toggle {
        display: none;
    }
}

/* Teilen-Button: gleiche Optik wie der Hell/Dunkel-Umschalter (nutzt dessen
   Klasse .theme-toggle), sitzt rechts daneben – Desktop in der Navbar,
   mobil in der Icon-Leiste, im Bottom-Sheet neben DE/EN + Theme. */
.navbar-inner > .share-toggle {
    margin-left: 0.35rem;
}
.footer-icons .share-toggle {
    display: none;
}
.footer-icons .share-toggle svg {
    width: 18px;
    height: 18px;
}
.sheet-lang .share-toggle {
    width: 30px;
    height: 30px;
}
@media (max-width: 767px) {
    .navbar-inner > .share-toggle {
        display: none;
    }
    .footer-icons .share-toggle {
        display: inline-flex;
        width: 36px;
        height: 36px;
    }
    .footer-icons.collapsed .share-toggle {
        display: none;
    }
}

/* Kurzer Hinweis nach dem Teilen/Kopieren (z. B. „Link kopiert …“) */
.share-hinweis {
    position: fixed;
    top: 5.2rem;
    left: 50%;
    z-index: 2600;
    max-width: min(420px, calc(100vw - 24px));
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    background: var(--color-toast);
    color: var(--color-text);
    font-size: 0.85rem;
    line-height: 1.35;
    box-shadow: 0 8px 24px rgba(20, 34, 41, 0.18);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}
.share-hinweis.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Übergang beim Theme-Wechsel (sanft, ohne Kartenflächen-Flackern) */
[data-theme="dark"] body,
body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---------- Einstiegstext mobil: „Mehr lesen" + Overlay von unten ----------
   Desktop: unverändert (kleiner Text unten rechts, .map-intro).
   Mobil:   .map-intro wandert per JS in das Overlay (body.intro-bereit),
            auf der Karte bleibt nur der Titel + der „Mehr lesen"-Button.
   Ohne JavaScript passiert nichts: Der Text bleibt wie bisher sichtbar. */

.intro-toggle {
    display: none;
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
}
.intro-overlay[hidden] {
    display: none;
}
.intro-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 22, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.intro-overlay-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80dvh;
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
    color: var(--color-text);
    border-top: 1px solid var(--color-border);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -14px 44px rgba(10, 20, 25, 0.34);
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.intro-overlay.is-open .intro-overlay-backdrop {
    opacity: 1;
}
.intro-overlay.is-open .intro-overlay-panel {
    transform: translateY(0);
}
.intro-overlay-grip {
    display: block;
    width: 44px;
    height: 4px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    background: var(--color-border);
}
.intro-overlay-close {
    position: absolute;
    top: 1.05rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
}
.intro-overlay-close:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}
.intro-overlay-titel {
    margin: 0 2.6rem 0.7rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}
/* Der eingeschobene .map-intro-Absatz wird hier wie normaler Fließtext gezeigt
   (die feste Positionierung/kleine Schrift gilt nur auf der Karte). */
.intro-overlay-text p,
.intro-overlay-text .map-intro {
    position: static;
    right: auto;
    bottom: auto;
    max-width: none;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
    color: var(--color-text-soft);
    z-index: auto;
}
[data-theme="dark"] .intro-overlay-text .map-intro {
    color: var(--color-text-soft);
}
.intro-overlay-ok {
    display: block;
    width: 100%;
    margin-top: 1.35rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.intro-overlay-ok:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

@media (max-width: 767px) {
    /* „Mehr lesen" sitzt unter dem Karten-Titel (im .map-stage) */
    .intro-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.42rem 0.85rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-pill);
        background: var(--color-surface);
        color: var(--color-text-muted);
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease, border-color 0.2s ease;
    }
    .intro-toggle:hover,
    .intro-toggle:focus-visible {
        color: var(--color-primary-dark);
        border-color: var(--color-primary);
    }
    /* Erst wenn main.js den Text ins Overlay verschoben hat, verschwindet er
       von der Karte (sonst würde ohne JS der Text fehlen). Nur AUF der Karte –
       im Overlay selbst (außerhalb von .map-page) bleibt er sichtbar. */
    body.intro-bereit .map-page .map-intro {
        display: none;
    }
}

/* Reduzierte Bewegung: Overlay ohne Animation */
@media (prefers-reduced-motion: reduce) {
    .intro-overlay-backdrop,
    .intro-overlay-panel {
        transition: none;
    }
}
