/* ==========================================================
   Fahndungsübersicht Deutschland — Design „amtlich-modern"
   Dunkles Slate-Theme, ein Blau-Akzent, Gold nur für
   Belohnungen. Keine Effekt-Spielereien.
   ========================================================== */

:root {
  /* Farbwelt exakt aus dem Logo: tiefes Marineblau, zwei Blautöne
     (Fadenkreuz außen gedeckt, innen leuchtend), Weiß mit Blaustich */
  --bg:          #0b1524;   /* Seite = Logo-Grund */
  --surface:     #16233a;   /* Karten, Panels */
  --surface-2:   #1e2e4a;   /* Hover / erhabene Flächen */
  --border:      #2c3d57;
  --border-soft: #22314b;
  --text:        #f4f7fb;
  --text-dim:    #8fa3c0;
  --accent:      #3f8af5;   /* Leucht-Blau (Ring innen) — Interaktion */
  --pursuit:     #2d5fb8;   /* gedecktes Blau (Ring außen) — Sekundär/Lage */
  --accent-soft: rgba(63, 138, 245, 0.14);
  --gold:        #eab308;   /* NUR Belohnung */
  --gold-deep:   #a16207;
  --gold-soft:   rgba(234, 179, 8, 0.12);
  --danger:      #f87171;   /* Delikt-Kennzeichnung */
  /* Look "Fahndungsakte": scharfe Kanten, technische Details, Mono-Ziffern */
  --radius:      4px;
  --radius-lg:   6px;
  --shadow:      0 1px 2px rgba(2, 6, 23, 0.5), 0 8px 24px rgba(2, 6, 23, 0.35);
  --ring:        0 0 0 3px rgba(59, 130, 246, 0.28);
  --tr:          0.18s ease;
  --font-mono:   ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  /* Kennfarben der Fahndungsarten — auch als Kartenleiste genutzt */
  --art-vermisst:     #7dd3fc;
  --art-straftaeter:  #fca5a5;
  --art-unbek-tote:   #c4b5fd;
  --art-zeugenaufruf: #86efac;
  --art-sachfahndung: #fcd34d;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing-Skala (4er-Raster) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px;

  /* Typo-Skala */
  --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-base: 13.5px;
  --fs-md: 15.5px; --fs-lg: 17px;   --fs-xl: 22px;

  /* Karten-/Score-Farben — EINE Quelle für Kreisflächen, Legende und
     Noten-Feld; JS liest sie per getComputedStyle */
  --map-score-1: #256abf;
  --map-score-2: #3987e5;
  --map-score-3: #6da7ec;
  --map-score-4: #9ec5f4;
  --map-score-5: #cde2fb;
  /* Punkte auf den hellen Basiskarten: Navy mit weißem Ring */
  --map-marker:  #142136;
  --map-stroke:  #ffffff;
}

/* Display-Typo wie der Logo-Schriftzug: fette kondensierte Kursive,
   nach vorn geneigt — Bewegung, Verfolgung. Nur für Titel/Reiter,
   der Fließtext bleibt aufrecht. */
.display {
  font-style: italic;
  font-weight: 850;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Speed-Lines — die drei Bewegungsstriche vom F des Logos,
   als Ornament vor Abschnitts-Überschriften */
.speed-lines::before {
  content: "";
  display: inline-block;
  vertical-align: 0.05em;
  margin-right: 10px;
  width: 22px;
  height: 13px;
  background:
    linear-gradient(90deg, var(--accent), transparent 92%) 0 0 / 100% 3px,
    linear-gradient(90deg, var(--accent), transparent 92%) 0 5px / 72% 3px,
    linear-gradient(90deg, var(--accent), transparent 92%) 0 10px / 46% 3px;
  background-repeat: no-repeat;
}

/* Die Zielmarke — der Fadenkreuz-Ring aus dem Logo als Markenelement */
.zielmarke {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(45, 95, 184, 0.5);
  pointer-events: none;
}
.zielmarke::before {
  content: "";
  position: absolute;
  inset: -9px;
  background:
    linear-gradient(var(--accent), var(--accent)) 50% 0    / 3px 20px,
    linear-gradient(var(--accent), var(--accent)) 50% 100% / 3px 20px,
    linear-gradient(var(--accent), var(--accent)) 0    50% / 20px 3px,
    linear-gradient(var(--accent), var(--accent)) 100% 50% / 20px 3px;
  background-repeat: no-repeat;
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .zielmarke { animation: zielmarke-dreh 90s linear infinite; }
  @keyframes zielmarke-dreh { to { transform: rotate(360deg); } }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden-Attribut muss auch gegen explizite display-Werte gewinnen */
[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Technisches Raster über der ganzen Seite — bewusst kaum sichtbar,
   gibt dem dunklen Grund Struktur statt SaaS-Glätte */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 40% at 50% -5%, rgba(59, 130, 246, 0.09), transparent 65%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.033) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.033) 0 1px, transparent 1px 64px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Kein Site-Header, kein Inline-Logo — die Marke lebt im Hero-Titel,
   das Logo im Favicon. */

/* ─── Layout ─── */
main { max-width: 1280px; margin: 0 auto; padding: 0 24px 48px; }

.hero { position: relative; padding: 40px 0 8px; }
.hero-inhalt { position: relative; z-index: 1; max-width: 720px; }

/* ─── Deutschland als Vollflächen-Hintergrund ───
   Die vereinfachten Kreisgrenzen füllen den ganzen Viewport (rechtslastig),
   sehr zurückhaltend — Raumwirkung statt Deko-Element. Bundesländer mit
   aktiven Fahndungen pulsieren dezent. */
.hero-karte {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
  /* läuft nach links und unten weich in den Seitengrund aus */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 4%, #000 45%),
    linear-gradient(180deg, #000 55%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 4%, #000 45%),
    linear-gradient(180deg, #000 55%, transparent 96%);
  mask-composite: intersect;
  filter: drop-shadow(0 0 40px rgba(63, 138, 245, 0.14));
}
.hero-karte.sichtbar { opacity: 0.55; }
.hero-karte svg { width: 100%; height: 100%; }

.hero-bl {
  fill: rgba(30, 41, 59, 0.85);
  stroke: var(--border);
  stroke-width: 0.7;
}
.hero-bl-aktiv {
  fill: rgba(59, 130, 246, 0.28);
  stroke: rgba(59, 130, 246, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bl-aktiv {
    animation: bl-puls 5s ease-in-out infinite;
    animation-delay: var(--puls-delay, 0s);
  }
  @keyframes bl-puls {
    0%, 100% { fill-opacity: 0.35; }
    50%      { fill-opacity: var(--puls-staerke, 0.7); }
  }
}

@media (max-width: 900px) {
  /* Als Vollflächen-Hintergrund auch mobil ok — nur noch dezenter */
  .hero-karte.sichtbar { opacity: 0.3; }
}

/* ─── Tabs (die drei Use Cases) ─── */
.tabs {
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-5) 0 var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  font-style: italic;              /* Logo-Kursive */
  font-size: 15px;
  font-weight: 800;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--tr), background var(--tr), border-color var(--tr);
}
.tab-link:hover { color: var(--text); background: rgba(63, 138, 245, 0.07); text-decoration: none; }
.tab-link.active { color: var(--text); border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, rgba(63, 138, 245, 0.12)); }
.tab-link.active svg { color: var(--accent); }

/* Gefährdungslage: eigenes Werkzeug, eigener (gedeckter) Blauton */
.tab-lage.active { border-bottom-color: var(--pursuit); background: linear-gradient(180deg, transparent, rgba(45, 95, 184, 0.16)); }
.tab-lage.active svg { color: var(--pursuit); }

/* Kicker als technisches Mono-Tag — Aktenzeichen-Ästhetik */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.hero-kicker::before { content: "///"; color: var(--text-dim); letter-spacing: 0; }

.hero-title {
  margin-top: 10px;
  padding-right: 0.08em; /* Kursive läuft sonst aus dem Textkasten */
  font-style: italic;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 850;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.95;
  /* leichter Verlauf ins Dunkle — Titel wirkt gestanzt statt gedruckt */
  background: linear-gradient(180deg, #ffffff 55%, #8fa3c0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Zielmarke hinter dem Titel — Zitat des Logo-Rings */
.hero .zielmarke {
  top: -8px;
  left: 150px;
  width: 300px;
  height: 300px;
  z-index: 0;
}

/* Balken + Doppellinie — Zitat alter TV-Vorspann-Typografie, kräftiger */
.hero-title::after {
  content: "";
  display: block;
  width: 140px;
  margin-top: 18px;
  border-top: 6px solid var(--accent);
  border-bottom: 1px solid var(--border);
  padding-top: 4px;
}

.hero-sub { margin-top: 16px; color: var(--text-dim); font-size: 15px; max-width: 54ch; }

/* ─── Stats: Datenleiste statt Kacheln — ein durchgehender Streifen mit
   Trennstrichen, Ziffern in Mono wie auf einem Lagedisplay ─── */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  margin: 30px 0 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.35);
}

.stat-card {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 20px;
  border-right: 1px solid var(--border-soft);
}
.stat-card:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.stat-gold .stat-num { color: var(--gold); }

/* ─── Controls: EINE zusammenhängende Toolbar-Fläche ─── */
.controls {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 12px 14px;
  background: rgba(22, 35, 58, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(11, 21, 36, 0.45);
}

.filter-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

/* Klappbare Detailfilter + Sortierung */
.filter-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--border-soft);
}
.filter-detail[hidden] { display: none; }

.filter-toggle { margin-left: auto; }
.filter-toggle-zahl {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.filter-toggle-zahl[hidden] { display: none; }
.filter-toggle-pfeil { transition: transform 0.15s ease; }
.filter-toggle[aria-expanded="true"] .filter-toggle-pfeil { transform: rotate(180deg);
}

/* Fahndungsart als Segment-Chips — die prominenteste Unterscheidung.
   "Alle" steht fest, die Arten laufen darunter durch. */
.art-leiste {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.art-chips-fix {
  display: flex;
  flex: none;
  padding-right: var(--sp-2);
  border-right: 1px solid var(--border);
}

.art-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.art-chips::-webkit-scrollbar { display: none; }

.art-chips.hat-ueberlauf:not(.am-ende) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.art-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  font-size: 12.5px;
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color var(--tr), background var(--tr), border-color var(--tr), transform var(--tr);
}
.art-chip:hover { color: var(--text); background: var(--surface-2); }
.art-chip:active { transform: scale(0.97); }
.art-chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.art-chip-zahl {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.18);
  font-variant-numeric: tabular-nums;
}
.art-chip.active .art-chip-zahl { background: rgba(255, 255, 255, 0.22); }

/* Zeitraum: gruppiertes Element mit eingelassenem Mono-Label —
   bricht als Ganzes um, kein verwaistes "Von"/"Bis" mehr */
.zeitraum-gruppe {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.5);
  transition: border-color var(--tr);
}
.zeitraum-gruppe:focus-within,
.zeitraum-gruppe.aktiv { border-color: var(--accent); }

.zeitraum-label {
  position: absolute;
  top: -7px;
  left: 10px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border-radius: 3px;
}

.zeitraum-strich { color: var(--text-dim); }

input[type="date"] {
  height: 34px;
  width: 128px;
  padding: 0 4px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: transparent;
  border: none;
  color-scheme: dark;
}
input[type="date"]:focus { outline: none; }

/* Sortierung ist nur in der Listen-Ansicht sinnvoll */
body[data-aktive-route="karte"] .sort-wrap { display: none; }

/* Der Fahndungs-Zähler über der Karte betrifft nur die Fahndungsansicht */
body[data-aktive-route="lage"] .map-bar { display: none; }

/* Gefährdungslage: die Karte ist die Bühne — deutlich größer */
body[data-aktive-route="lage"] #map { height: min(78vh, 860px); }

/* Gefährdungslage: gedeckter Blauton als Werkzeug-Charakter */
body[data-aktive-route="lage"] .risiko-btn {
  background: var(--pursuit);
  border-color: var(--pursuit);
}
body[data-aktive-route="lage"] .risiko-btn-sekundaer {
  background: rgba(22, 35, 58, 0.7);
  border-color: var(--border);
}

.search-wrap { position: relative; flex: 1 1 220px; min-width: 180px; max-width: 340px; }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

input[type="search"], input[type="text"], select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}

input[type="search"], .search-wrap input[type="text"] { padding-left: 38px; }
input[type="search"]::placeholder, input[type="text"]::placeholder { color: var(--text-dim); }
input[type="search"]:focus, input[type="text"]:focus, select:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: var(--surface);
  outline: none;
}

/* Alle Filter-Selects nur so breit wie nötig, damit die Leiste einzeilig
   bleibt und erst bei echtem Platzmangel umbricht. */
.controls select { width: auto; min-width: 140px; max-width: 220px; }
#source-filter { min-width: 150px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}

.chip:hover { background: var(--surface-2); border-color: var(--text-dim); }
.chip:active { transform: scale(0.97); }

.chip[aria-pressed="true"] {
  color: #0f172a;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

/* Abräumen ist keine Filteroption — deshalb Warnfarbe statt Gold, sonst
   verschwimmt er mit dem Belohnungs-Toggle direkt daneben */
.chip-reset {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
}
.chip-reset:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--danger);
}

.reset-zahl {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(248, 113, 113, 0.18);
}

/* Segmented Control mit gleitendem Daumen — der Ansichtswechsel ist eine
   sichtbare Bewegung, kein Umspringen */
.view-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

.view-toggle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  background: var(--accent);
  transition: transform 0.22s cubic-bezier(0.3, 0.9, 0.4, 1);
}
.view-toggle[data-aktiv="karte"]::before { transform: translateX(100%); }

.view-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-dim);
  background: transparent;
  border: none;
  transition: color var(--tr);
}

.view-btn.active { color: #fff; }

.sort-wrap { display: inline-flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12.5px; color: var(--text-dim); }
#sort-select { width: auto; }

/* ─── Cards ─── */
.grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

/* Karten als "Akten": scharfe Kanten, farbige Kennleiste der Fahndungsart
   oben, Fotos leicht entsättigt (Hover holt die Farbe zurück) */
.card {
  --art: var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  color: inherit;
  padding: 0;
  cursor: pointer;
  transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr);
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 2;
  background: var(--art);
}

.card-art-vermisst     { --art: var(--art-vermisst); }
.card-art-straftaeter  { --art: var(--art-straftaeter); }
.card-art-unbek_tote   { --art: var(--art-unbek-tote); }
.card-art-zeugenaufruf { --art: var(--art-zeugenaufruf); }
.card-art-sachfahndung { --art: var(--art-sachfahndung); }

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card.has-reward { border-color: rgba(234, 179, 8, 0.4); }
.card.has-reward:hover { border-color: var(--gold); }

.card-img {
  filter: saturate(0.55) contrast(1.04);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.card:hover .card-img { transform: scale(1.03); filter: saturate(1); }

/* Hochformat statt 4:3 — Personenfotos sind fast immer hochkant,
   dadurch wird in der Übersicht deutlich weniger weggeschnitten. */
/* overflow:hidden setzt die automatische Mindesthöhe auf 0 — sonst drückt
   ein hohes Foto das Seitenverhältnis in schmalen Spalten auf */
.card-img-wrap { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #16203a; }

.card-img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }

.card-img-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #3d4d6b;
}

/* ─── Platzhalter-Set (Einträge ohne Bildmaterial) ───
   Motiv je Fahndungsart in der Kennfarbe (--art), auf konzentrischen
   Ziel-Ringen — wirkt gestaltet statt kaputt. */
.platzhalter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 44%,
      color-mix(in srgb, var(--art, #3d4d6b) 10%, transparent), transparent 62%),
    #131c33;
  color: color-mix(in srgb, var(--art, #64748b) 72%, #64748b);
}

.platzhalter-ring {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--art, #64748b) 34%, transparent);
  box-shadow:
    0 0 0 18px color-mix(in srgb, var(--art, #64748b) 9%, transparent),
    0 0 0 19px color-mix(in srgb, var(--art, #64748b) 16%, transparent);
}

.platzhalter-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.badge {
  position: absolute;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}

.badge-source { top: 12px; left: 10px; color: var(--text); background: rgba(15, 23, 42, 0.82); border: 1px solid var(--border); }
.badge-reward { top: 12px; right: 10px; color: #1c1400; background: var(--gold); }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; flex: 1; }

.card-name {
  font-size: 15.5px;
  font-weight: 750;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.card-name.no-name {
  color: var(--text-dim);
  font-weight: 500;
  font-stretch: normal;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.meta-tag {
  padding: 2.5px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--surface-2);
  border-radius: 3px;
}

.meta-tag.delikt { color: var(--danger); background: rgba(248, 113, 113, 0.1); }

/* Fahndungsart: eigene, ruhige Kennfarben — bewusst nicht Gold,
   das bleibt den Belohnungen vorbehalten. */
.meta-tag.art { font-weight: 600; }
.meta-tag.art-vermisst     { color: #7dd3fc; background: rgba(125, 211, 252, 0.12); }
.meta-tag.art-straftaeter  { color: #fca5a5; background: rgba(252, 165, 165, 0.12); }
.meta-tag.art-unbek_tote   { color: #c4b5fd; background: rgba(196, 181, 253, 0.12); }
.meta-tag.art-zeugenaufruf { color: #86efac; background: rgba(134, 239, 172, 0.12); }
.meta-tag.art-sachfahndung { color: #fcd34d; background: rgba(252, 211, 77, 0.10); }

.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.card-arrow { color: var(--accent); display: inline-flex; }

/* Gleiche Mindesthöhe für Liste und Karte — der Ansichtswechsel erzeugt
   keinen Layout-Sprung; die einblendende Section faded weich ein */
#content, #map-wrap { min-height: min(70vh, 640px); }

@media (prefers-reduced-motion: no-preference) {
  #content:not([hidden]), #map-wrap:not([hidden]) {
    animation: view-fade 0.2s ease;
  }
  @keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ─── Empty / Loading ─── */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 16px; color: var(--text-dim); }

.loading { display: grid; place-items: center; padding: 64px 0; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Pagination ─── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.pg-btn {
  min-width: 38px;
  padding: 9px 11px;
  font-size: 13.5px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--tr), background var(--tr);
}

.pg-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-2); }
.pg-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.pg-btn:disabled { opacity: 0.4; cursor: default; }
.pg-info { font-size: 12.5px; color: var(--text-dim); padding: 0 6px; }

/* ─── Gefährdungscheck ───
   Eigene Datenquelle (amtliche Kriminalstatistik), deshalb visuell als
   eigener Block abgesetzt — nicht mit den Fahndungsdaten verwechseln. */
.risiko-panel {
  margin: 20px 0 4px;
  padding: 20px 22px 22px;
  background: linear-gradient(180deg, rgba(39, 52, 73, 0.4), rgba(30, 41, 59, 0.9));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.risiko-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 650;
}
.risiko-intro { margin-top: 5px; font-size: 13.5px; color: var(--text-dim); }

.risiko-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.risiko-form .search-wrap { flex: 1 1 240px; max-width: 320px; }

.risiko-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-size: 12.5px;
  font-weight: 750;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  transition: filter var(--tr), transform var(--tr), box-shadow var(--tr);
}
.risiko-btn:hover { filter: brightness(1.12); box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35); }
.risiko-btn:active { transform: scale(0.97); }

/* Sekundäraktion neben dem prominenten Standort-Button */
.risiko-btn-sekundaer {
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--border);
}
.risiko-btn-sekundaer:hover { box-shadow: none; filter: none; background: var(--surface-2); border-color: var(--text-dim); }

.risiko-oder { font-size: var(--fs-sm); color: var(--text-dim); }

.risiko-datenschutz { margin-top: 8px; font-size: 12px; color: var(--text-dim); }

.risiko-fehler {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 13px;
  font-size: 13.5px;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
}

.risiko-karte {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.risiko-kopfzeile {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.risiko-kreis { font-size: 18px; font-weight: 650; }
.risiko-ort { margin-top: 3px; font-size: 12.5px; color: var(--text-dim); }

/* Der Farbwert kommt aus derselben Skala wie die Kreisflächen der Karte:
   dieselbe Zahl trägt überall dieselbe Farbe. Die Note steht zusätzlich
   als Buchstabe und Zahl da — Farbe allein trägt keine Aussage. */
.risiko-note {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--note-farbe) 20%, transparent);
  border: 1px solid var(--note-farbe);
  border-radius: var(--radius);
  white-space: nowrap;
}
.risiko-note-buchstabe { font-size: 26px; font-weight: 700; color: var(--note-farbe); }
.risiko-note-wert { font-size: 17px; font-weight: 650; }
.risiko-note-max { font-size: 12.5px; font-weight: 500; color: var(--text-dim); }

.risiko-label { margin-top: 12px; font-size: 14.5px; }
.risiko-gesamt { margin-top: 6px; font-size: 13px; color: var(--text-dim); }

.risiko-abschnitt { margin-top: 20px; font-size: 14px; font-weight: 650; }
.risiko-abschnitt-sub { margin-top: 2px; font-size: 12px; color: var(--text-dim); }

.risiko-balken { list-style: none; margin-top: 10px; display: grid; gap: 9px; }
.risiko-balken li {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) 3fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.balken-name { color: var(--text); }
.balken-spur { height: 10px; background: var(--surface-2); border-radius: 5px; }
.balken-fuellung {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
}
.balken-wert { font-variant-numeric: tabular-nums; color: var(--text-dim); }

.risiko-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.risiko-chip {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 11px;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip-rang { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.risiko-unauffaellig { margin-top: 12px; font-size: 13px; color: var(--text-dim); }

.risiko-tabelle-wrap, .risiko-hinweise { margin-top: 18px; }
.risiko-tabelle-wrap > summary, .risiko-hinweise > summary {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
}
.tabelle-scroll { overflow-x: auto; margin-top: 10px; }
.risiko-tabelle { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.risiko-tabelle th, .risiko-tabelle td {
  padding: 7px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
.risiko-tabelle thead th { color: var(--text-dim); font-weight: 600; }
.risiko-tabelle tbody th { text-align: left; font-weight: 500; font-variant-numeric: normal; }

.risiko-methodik, .risiko-quelle {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  max-width: 68ch;
}
.risiko-hinweise ul { margin: 10px 0 0 18px; font-size: 12.5px; color: var(--text-dim); }
.risiko-hinweise li { margin-bottom: 6px; max-width: 68ch; }

.risiko-kontext {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.risiko-kontext svg { flex: none; margin-top: 2px; }

@media (max-width: 640px) {
  .risiko-kopfzeile { flex-direction: column; }
  .risiko-balken li { grid-template-columns: 1fr auto; }
  .risiko-balken .balken-spur { grid-column: 1 / -1; }
}

/* ─── Karte ─── */
#map-wrap { position: relative; margin-top: 8px; }

/* Helle Karte im dunklen UI: kräftiger Navy-Rahmen macht sie zum
   "Lagetisch" statt zum Fremdkörper */
#map {
  height: min(70vh, 640px);
  border: 3px solid var(--border);
  outline: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

#map-loading { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); border-radius: var(--radius); }

.maplibregl-popup-content {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.maplibregl-popup-tip { border-top-color: var(--surface) !important; }
.maplibregl-popup-close-button { color: var(--text-dim); font-size: 16px; }

.map-popup-title { font-weight: 650; font-size: 14.5px; }
.map-popup-meta { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }
.map-popup-reward { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--gold); }

.map-popup-btn {
  margin-top: 10px;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
}
.map-popup-btn:hover { filter: brightness(1.1); }

/* Leiste über der Karte: Ebenenwahl + Zähler */
.map-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.map-zaehler { font-size: 12.5px; color: var(--text-dim); }

/* Standort aus dem Gefährdungscheck */
.standort-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
  cursor: pointer;
}

/* Legende der Kreis-Einfärbung. Die Skala ist sequenziell (ein Farbton,
   dunkel = niedrig, hell = hoch) und identisch mit dem Noten-Feld im
   Gefährdungscheck. */
/* Bewertungs-Legende (Noten A–E) als Overlay unten links AUF der Karte */
.karten-legende {
  position: absolute;
  left: 17px;
  bottom: 40px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  background: rgba(22, 35, 58, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 290px;
}
.legende-titel { font-weight: 650; color: var(--text); font-size: 12px; }

.legende-noten { list-style: none; display: grid; gap: 4px; }
.legende-noten li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.3;
}
.legende-noten b {
  font-family: var(--font-mono);
  color: var(--text);
  width: 12px;
}
.legende-noten i { width: 16px; height: 11px; border-radius: 2px; flex: none; }
.legende-stufe-1 { background: var(--map-score-1); }
.legende-stufe-2 { background: var(--map-score-2); }
.legende-stufe-3 { background: var(--map-score-3); }
.legende-stufe-4 { background: var(--map-score-4); }
.legende-stufe-5 { background: var(--map-score-5); }
.legende-quelle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .karten-legende { display: none; }
}

/* Vollständige Auswertung: Overlay-Panel über der rechten Kartenhälfte,
   auf Mobile als Bottom-Sheet */
.risiko-detail {
  position: absolute;
  top: 15px;
  right: 15px;
  bottom: 40px;
  z-index: 6;
  width: min(440px, 92%);
  overflow-y: auto;
  padding: 0 18px 18px;
  background: rgba(22, 35, 58, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(11, 21, 36, 0.6);
}

.risiko-detail-kopf {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -18px;
  padding: 12px 18px;
  background: rgba(22, 35, 58, 0.97);
  border-bottom: 1px solid var(--border-soft);
}
.risiko-detail-titel {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.risiko-detail .risiko-karte { border-top: none; padding-top: 4px; }

@media (max-width: 640px) {
  .risiko-detail {
    top: auto;
    left: 8px; right: 8px; bottom: 8px;
    width: auto;
    max-height: 62%;
  }
}

/* Kompakt-Popup der Gefährdungslage */
.pp-kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pp-note {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 9px;
  font-size: 17px;
  font-weight: 750;
  color: var(--note-farbe);
  background: color-mix(in srgb, var(--note-farbe) 18%, transparent);
  border: 1px solid var(--note-farbe);
  border-radius: var(--radius);
  white-space: nowrap;
}
.pp-note small { font-size: 10.5px; font-weight: 500; color: var(--text-dim); }
.pp-label { margin-top: 7px; font-size: 12.5px; }

.pp-balken { list-style: none; display: grid; gap: 5px; margin-top: 9px; }
.pp-balken li {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 76px auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.pp-balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-balken-spur { height: 7px; background: var(--surface-2); border-radius: 4px; }
.pp-balken-spur span { display: block; height: 100%; background: var(--pursuit); border-radius: 4px; }
.pp-balken-wert { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.pp-aktionen { display: grid; gap: 6px; margin-top: 10px; }
.pp-aktionen .map-popup-btn { margin-top: 0; }
.pp-fahndungen-btn { background: var(--pursuit); }

/* Listen-Popup für deckungsgleiche Punkte (mehrere Fälle am selben Ort) */
.pp-liste {
  list-style: none;
  display: grid;
  gap: 5px;
  margin-top: 9px;
  max-height: 260px;
  overflow-y: auto;
}
.pp-liste-btn {
  width: 100%;
  margin-top: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}
.pp-liste-btn:hover { background: var(--pursuit); color: #fff; }
.pp-liste-btn small { font-size: 10.5px; color: var(--text-dim); }
.pp-liste-btn:hover small { color: rgba(255, 255, 255, 0.75); }

/* Karten-Marker — auf den hellen Basiskarten: Navy mit weißem Ring */
.f-cluster-marker {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 650 13px var(--font-mono);
  color: #fff;
  background: var(--map-marker);
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(11, 21, 36, 0.4);
  cursor: pointer;
}
.f-cluster-marker:hover { background: var(--pursuit); }

.bl-marker {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 600 13px var(--font-mono);
  color: var(--map-marker);
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed rgba(20, 33, 54, 0.65);
  cursor: pointer;
}

/* Foto-Karten-Marker: ab hohem Zoom statt der Kreispunkte. Bild links,
   Kurzinfo + Kategorie-Tags rechts. Sitzt mit der Spitze auf dem Tatort. */
.f-foto-marker {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 210px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  background: var(--map-marker);
  border: 1.5px solid #fff;
  box-shadow: 0 3px 12px rgba(11, 21, 36, 0.45);
  color: #fff;
  text-align: left;
  cursor: pointer;
  margin-bottom: 7px;   /* Abstand der "Spitze" zum Punkt */
}
.f-foto-marker:hover { background: var(--pursuit); }
.f-foto-marker.hat-belohnung { border-color: var(--gold); }

.f-foto-bild {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
  background: #24344f;
}
.f-foto-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-foto-bild.kein-bild {
  background:
    #24344f
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8bad6' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 26px no-repeat;
}

.f-foto-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-foto-titel {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-foto-info {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-foto-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 1px; }
.f-foto-tag {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}
.f-foto-marker.hat-belohnung .f-foto-tag { background: var(--gold-soft); }

/* (Standort-Vorschlag-Banner entfernt — der Standort-Button im Formular
   ist jetzt die eine, prominente Komfort-Aktion) */

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(680px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.6);
}

.modal-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.modal-heading { font-size: 14px; font-weight: 600; color: var(--text-dim); }

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.modal-close:hover { color: var(--text); border-color: var(--accent); }

/* Detailansicht zeigt das VOLLSTÄNDIGE Foto (contain statt cover) —
   in der Fahndung ist jedes Bilddetail relevant, nichts darf abgeschnitten
   werden. Der dunkle Rahmen füllt das abweichende Seitenverhältnis. */
.modal-img {
  width: 100%;
  max-height: min(60vh, 460px);
  object-fit: contain;
  display: block;
  background: #0b1220;
}

.modal-img-placeholder {
  height: 220px;
  background: #16203a;
  color: #3d4d6b;
}

.modal-content { padding: 20px; }

.modal-source {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.modal-name { margin-top: 10px; font-size: 22px; font-weight: 700; }
.modal-name.no-name { color: var(--text-dim); font-weight: 500; font-style: italic; font-size: 18px; }

.reward-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--gold-soft);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius);
}

.reward-box svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.reward-amount { font-size: 20px; font-weight: 700; color: var(--gold); }
.reward-label { font-size: 12.5px; color: var(--text-dim); }
.reward-text { margin-top: 6px; font-size: 13px; color: var(--text); }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.info-field {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.info-field.full { grid-column: 1 / -1; }
.info-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.info-value { margin-top: 2px; font-size: 14px; }
.info-value.delikt { color: var(--danger); }

.desc-box {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  white-space: pre-line;
}

.contact-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
}

.contact-title { font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.contact-hint { font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; }
.contact-row { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 13.5px; }
.contact-row svg { color: var(--accent); flex-shrink: 0; }

.modal-meta { margin-top: 16px; font-size: 11.5px; color: var(--text-dim); }

/* ─── Footer ─── */
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-dim);
}

.site-footer p + p { margin-top: 8px; }
.site-footer strong { color: var(--text); }
.footer-rechts a { color: var(--text-dim); text-decoration: underline; }
.footer-rechts a:hover { color: var(--accent); }

/* Rechtsseiten (impressum.html, datenschutz.html): eigenständige Dokumente */
.rechtsseite { background: var(--bg); }
.rechtstext {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-8);
  color: var(--text);
  font: var(--fs-md)/1.6 var(--font);
}
.rechtstext h1 { font-size: var(--fs-xl); margin: var(--sp-4) 0 var(--sp-5); }
.rechtstext h2 { font-size: var(--fs-lg); margin: var(--sp-6) 0 var(--sp-2); }
.rechtstext p { margin: 0 0 var(--sp-3); color: var(--text-dim); }
.rechtstext a { color: var(--accent); }
.rechts-platzhalter { color: var(--danger); font-style: italic; }
.rechts-zurueck { display: inline-block; margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.rechts-stand, .rechts-fuss { font-size: var(--fs-sm); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  main { padding: 0 16px 40px; }
  .hero { padding-top: 24px; }
  .controls { position: static; }
  .search-wrap { flex-basis: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 10px; }
}

/* ─── Hinweis-Formular (Detail-Dialog) ─── */
.hinweis-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 16px;
  font: 600 14px var(--font);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
}
.hinweis-btn:hover { filter: brightness(1.1); }
.hinweis-btn:disabled { opacity: 0.6; cursor: wait; }

.hinweis-form, .hinweis-erfolg {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hinweis-titel { font-size: 15px; margin-bottom: 8px; }
.hinweis-dringend {
  display: flex; align-items: center; gap: 6px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 8px;
}
.hinweis-erklaerung, .hinweis-recht {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.hinweis-label {
  display: block;
  font: 600 13px var(--font);
  margin-bottom: 4px;
}
.hinweis-sub { font-weight: 400; color: var(--text-dim); }
.hinweis-form textarea,
.hinweis-form input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 4px;
  font: 14px var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
}
.hinweis-zaehler {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
  margin-bottom: 10px;
}
.hinweis-fehler { color: var(--danger); font-size: 13px; margin-top: 8px; }
.hinweis-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 8px 0;
}

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.hp-feld {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==============================================================
   Merkliste & Nutzerkonten
   ============================================================== */

/* Tab-Badge: Anzahl gemerkter Fälle */
.tab-zahl {
  min-width: 18px;
  padding: 1px 5px;
  font: 700 11px var(--font-mono);
  text-align: center;
  color: var(--bg);
  background: var(--accent);
  border-radius: 9px;
}

/* Stern-Knopf im Steckbrief-Modal */
.modal-kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.merk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font: 600 var(--fs-sm) var(--font);
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--tr), border-color var(--tr);
}
.merk-btn:hover { color: var(--text); border-color: var(--text-dim); }
.merk-btn.aktiv { color: var(--gold); border-color: var(--gold-deep); background: var(--gold-soft); }
.merk-btn:disabled { opacity: 0.6; cursor: wait; }
.merk-stern { font-size: 15px; line-height: 1; }
.merk-hinweis { font-size: var(--fs-sm); color: var(--text-dim); text-decoration: none; }
.merk-hinweis:hover { color: var(--accent); }

/* Konto-Formular (Login/Registrieren) */
.konto-wrap {
  max-width: 440px;
  margin: var(--sp-7) auto;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.konto-titel {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}
.konto-intro { font-size: var(--fs-base); color: var(--text-dim); margin-bottom: var(--sp-4); }
.konto-toggle {
  display: flex;
  gap: var(--sp-1);
  padding: 3px;
  margin-bottom: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.konto-tab {
  flex: 1;
  padding: 7px 0;
  font: 600 var(--fs-base) var(--font);
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--tr), background var(--tr);
}
.konto-tab:hover { color: var(--text); }
.konto-tab.active { color: var(--text); background: var(--surface-2); }
.konto-form input[type="email"],
.konto-form input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: var(--sp-3);
  font: 14px var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.konto-meldung { color: var(--art-zeugenaufruf); font-size: 13px; margin-top: 8px; }

/* Merkliste: Kopf + Einträge */
#merkliste { max-width: 860px; margin: 0 auto; padding: 0 var(--sp-4) var(--sp-8); }
.merkliste-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-3);
}
.merkliste-kopf .konto-titel { margin-bottom: 0; }
.merkliste-zahl {
  font: 700 13px var(--font-mono);
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 10px;
}
.merkliste-konto { display: flex; align-items: center; gap: var(--sp-3); }
.merkliste-email { font-size: var(--fs-sm); color: var(--text-dim); }
.merkliste-tipp, .merkliste-leer-tipp { font-size: var(--fs-base); color: var(--text-dim); margin-bottom: var(--sp-4); }
.merkliste-tipp a, .merkliste-leer-tipp a { color: var(--accent); }

.merkliste-liste { display: flex; flex-direction: column; gap: var(--sp-4); }
.merk-eintrag {
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.merk-eintrag-kopf {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.merk-foto {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.merk-foto-platzhalter {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-dim);
}
.merk-eintrag-info { flex: 1; min-width: 0; }
.merk-name {
  font: 700 var(--fs-md) var(--font);
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: var(--sp-2);
  cursor: pointer;
  text-align: left;
}
.merk-name:hover { color: var(--accent); text-decoration: underline; }
.merk-datum { font-size: var(--fs-xs); color: var(--text-dim); margin-top: var(--sp-2); }
.merk-inaktiv { color: var(--danger); border-color: var(--danger); }
.merk-entfernen { flex-shrink: 0; }

.merk-notiz-label { margin-top: var(--sp-2); }
.merk-notiz {
  width: 100%;
  padding: 8px 10px;
  font: 14px var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
}
.merk-notiz-fuss {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  min-height: 28px;
}
.merk-notiz-status { font-size: var(--fs-sm); color: var(--text-dim); }
.merk-notiz-speichern { width: auto; padding: 6px 14px; margin: 0; }

@media (max-width: 560px) {
  .merk-eintrag-kopf { flex-wrap: wrap; }
}

/* Konto-Knopf oben rechts im Hero */
.konto-knopf {
  position: absolute;
  top: var(--sp-5);
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font: 600 var(--fs-sm) var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--tr), border-color var(--tr);
}
.konto-knopf:hover { background: var(--surface-2); border-color: var(--accent); }
.konto-knopf.angemeldet { border-color: var(--pursuit); color: var(--text); }
.konto-knopf.angemeldet svg { color: var(--accent); }
.konto-knopf.gesperrt {
  color: var(--text-dim);
  border-style: dashed;
  opacity: .65;
  cursor: not-allowed;
}
.konto-knopf.gesperrt:hover { background: var(--surface); border-color: var(--border); }

/* Popup "bald freigeschaltet" */
.konto-hinweis {
  margin: auto;              /* der globale Reset nimmt <dialog> sonst die Zentrierung */
  max-width: 380px;
  padding: var(--sp-5);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font: var(--fs-sm) var(--font);
}
.konto-hinweis::backdrop { background: rgba(0, 0, 0, .55); }
.konto-hinweis-titel { margin: 0 0 var(--sp-3); font-size: var(--fs-md); font-weight: 600; }
.konto-hinweis p { margin: 0 0 var(--sp-4); color: var(--text-dim); line-height: 1.5; }
.konto-hinweis-ok {
  padding: 8px 14px;
  font: 600 var(--fs-sm) var(--font);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
}
.konto-gesperrt-hinweis { color: var(--text-dim); }
.konto-zurueck { display: inline-block; margin-top: var(--sp-3); color: var(--accent); }
.konto-knopf-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .konto-knopf { top: var(--sp-3); padding: 7px 10px; }
  .konto-knopf-text { max-width: 110px; }
}

.merk-fehler { font-size: var(--fs-sm); color: var(--danger); align-self: center; }

/* ==============================================================
   Hinweis-Vorbereitung, Bürgerhinweise, Merklisten-Hinweisstatus
   ============================================================== */

/* Aufruf zum Hinweisgeben im Steckbrief */
.hinweis-cta { margin-top: var(--sp-4); }
.hinweis-cta-sub { font-size: var(--fs-sm); color: var(--text-dim); margin-top: var(--sp-2); }

/* Öffentliche Bürgerhinweise unter den Angaben */
.buergerhinweise {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.bh-titel { display: flex; align-items: center; gap: 6px; font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.bh-zahl {
  font: 700 12px var(--font-mono); color: var(--accent);
  background: var(--accent-soft); padding: 1px 7px; border-radius: 9px;
}
.bh-disclaimer {
  display: flex; gap: 6px; align-items: flex-start;
  font-size: var(--fs-xs); color: var(--text-dim);
  background: var(--gold-soft); border: 1px solid var(--gold-deep);
  border-radius: var(--radius); padding: 8px 10px; margin-bottom: var(--sp-3);
}
.bh-liste { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.bh-eintrag { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.bh-text { font-size: var(--fs-base); white-space: pre-wrap; }
.bh-fuss { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: 6px; font-size: var(--fs-xs); color: var(--text-dim); }
.bh-karte-badge { color: var(--accent); }
.bh-karte { height: 220px; margin-top: var(--sp-3); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* Merklisten-Eintrag: Hinweis-Status + Vorbereiten-Knopf */
.merk-hinweis-zeile {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.merk-vorbereiten { text-decoration: none; }
.merk-hinweis-chip {
  font-size: var(--fs-xs); padding: 3px 9px; border-radius: 10px;
  border: 1px solid var(--border);
}
.merk-hinweis-chip.pruefung { color: var(--art-sachfahndung); border-color: var(--gold-deep); background: var(--gold-soft); }
.merk-hinweis-chip.veroeffentlicht { color: var(--art-zeugenaufruf); border-color: var(--art-zeugenaufruf); }
.merk-hinweis-chip.abgelehnt { color: var(--danger); border-color: var(--danger); }

/* Vorbereitungs-Ansicht */
#vorbereiten { max-width: 960px; margin: 0 auto; padding: 0 var(--sp-4) var(--sp-8); }
.vorb-kopf { margin: var(--sp-5) 0 var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
.vorb-kopf .chip { align-self: flex-start; text-decoration: none; }
.vorb-hilfe { font-size: var(--fs-base); color: var(--text-dim); margin-bottom: var(--sp-3); }
.vorb-werkzeuge {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.werkzeug {
  padding: 7px 12px; font: 600 var(--fs-sm) var(--font);
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: border-color var(--tr);
}
.werkzeug:hover { border-color: var(--text-dim); }
.werkzeug[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.vorb-radius { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-dim); margin-left: auto; }
.vorb-radius input[type="range"] { accent-color: var(--accent); }
.vorb-map { height: min(56vh, 520px); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-bottom: var(--sp-3); }
.vorb-status { min-height: 20px; font-size: var(--fs-sm); color: var(--text-dim); margin: var(--sp-2) 0; }
.vorb-tatort {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--danger);
}

/* ==============================================================
   Mobile (≤760px): App-Bar + Hamburger-Menü statt Hero/Tabs,
   Filter als Bottom-Sheet, Vollbild-Dialoge, Touch-Ziele ≥44px.
   Der Desktop bleibt unverändert — alles Mobile steht hier gebündelt.
   ============================================================== */

.app-bar, .filter-sheet-kopf, .filter-backdrop { display: none; }

/* Menü-Drawer (natives <dialog>, menue.js). Geöffnet wird er nur über die
   mobile App-Bar; von rechts, weil dort der Daumen und der Knopf sind. */
.menue {
  inset: 0 0 0 auto;
  width: min(330px, 88vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 48px rgba(2, 6, 23, 0.6);
}
.menue[open] {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: menue-rein 0.24s cubic-bezier(0.3, 0.9, 0.4, 1);
}
@keyframes menue-rein { from { transform: translateX(100%); } }
.menue::backdrop { background: rgba(2, 6, 23, 0.66); backdrop-filter: blur(2px); }

.menue-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(6px + env(safe-area-inset-top)) 10px 6px 18px;
  min-height: calc(56px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border-soft);
}
.menue-marke, .app-bar-marke {
  font-style: italic;
  font-weight: 850;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 20px;
  color: var(--text);
  white-space: nowrap;
}
.menue-schliessen, .app-bar-menue {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.menue-nav { display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; }
.menue-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 12px;
  color: var(--text);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
}
.menue-link:hover { text-decoration: none; background: var(--surface); }
.menue-link svg { flex: none; color: var(--text-dim); }
.menue-link > span:first-of-type {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}
.menue-link small { font-size: 12.5px; font-weight: 400; color: var(--text-dim); }
.menue-link .tab-zahl { margin-left: auto; }
.menue-link.active { background: var(--accent-soft); border-left-color: var(--accent); }
.menue-link.active svg { color: var(--accent); }
.menue-link-lage.active { background: rgba(45, 95, 184, 0.18); border-left-color: var(--pursuit); }
.menue-link-lage.active svg { color: var(--pursuit); }

.menue-konto { padding: 4px 20px 16px; }
.menue-konto-knopf {
  position: static;
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.menue-konto-knopf .konto-knopf-text { max-width: 240px; }

.menue-fuss {
  margin-top: auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  font-size: 12.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
}
.menue-notruf { display: flex; align-items: center; gap: 8px; color: var(--text); }
.menue-notruf svg { color: var(--danger); }
.menue-rechts { display: flex; gap: 18px; margin-top: 6px; }
.menue-rechts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--text-dim);
}
.menue-inoffiziell { margin-top: 4px; }

body.menue-offen, body.sheet-offen { overflow: hidden; }

/* Touch-Geräte: kein Hover-Lift — der bliebe nach dem Tippen "kleben" */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: var(--border-soft); }
  .card.has-reward:hover { border-color: rgba(234, 179, 8, 0.4); }
  .card:hover .card-img { transform: none; filter: saturate(0.55) contrast(1.04); }
}

@media (max-width: 760px) {
  .nur-desktop { display: none; }

  /* ─── App-Bar ─── */
  .app-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    background: rgba(11, 21, 36, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
  }
  .app-bar-marke:hover { text-decoration: none; }
  .app-bar-bereich {
    flex: 1;
    min-width: 0;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hero und Tabs übernimmt die App-Bar bzw. das Menü */
  .hero, .tabs { display: none; }

  main {
    padding: 0 max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
  }

  /* ─── Stats: wischbarer Streifen statt halber Bildschirm ─── */
  .stat-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin: 12px -16px 4px;
    border-left: none;
    border-right: none;
  }
  .stat-row::-webkit-scrollbar { display: none; }
  .stat-card { flex: 0 0 auto; padding: 10px 16px; scroll-snap-align: start; }
  .stat-num { font-size: 19px; }
  .stat-label { font-size: 9.5px; letter-spacing: 0.1em; white-space: nowrap; }

  /* ─── Eingaben: 16px verhindert das Auto-Zoomen von iOS Safari ─── */
  input[type="search"], input[type="text"], input[type="email"],
  input[type="password"], input[type="date"], select, textarea {
    font-size: 16px !important;
  }
  input[type="search"], input[type="text"], select { height: 44px; }

  /* ─── Filterleiste ───
     Nicht sticky: sie ist mobil drei Zeilen hoch. Ohne backdrop-filter,
     denn der machte .controls zum Bezugsrahmen des fixierten Sheets. */
  .controls {
    position: static;
    margin: 10px 0 12px;
    padding: 10px;
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .filter-zeile { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
  .filter-zeile .search-wrap { grid-column: 1 / -1; order: -1; max-width: none; min-width: 0; }
  .filter-toggle { margin-left: 0; justify-content: center; height: 44px; }
  .chip-reset { grid-column: 1 / -1; justify-content: center; }
  .view-btn { height: 42px; padding: 0 14px; }

  /* ─── Filter & Sortierung als Bottom-Sheet ─── */
  .filter-detail:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 91;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 84dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0 16px calc(20px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -16px 48px rgba(2, 6, 23, 0.6);
    animation: sheet-rein 0.24s cubic-bezier(0.3, 0.9, 0.4, 1);
  }
  @keyframes sheet-rein { from { transform: translateY(100%); } }
  .filter-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(2, 6, 23, 0.62);
  }
  .filter-sheet-kopf {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -16px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
  }
  .filter-sheet-titel { font-size: 15px; font-weight: 700; }
  .filter-sheet-fertig {
    height: 40px;
    padding: 0 18px;
    font: 650 14px var(--font);
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
  }
  .controls select, #source-filter, #sort-select { width: 100%; min-width: 0; max-width: none; }
  .zeitraum-gruppe { width: 100%; height: 48px; }
  .zeitraum-gruppe input[type="date"] { flex: 1; width: auto; min-width: 0; }
  #btn-reward { justify-content: center; height: 44px; }
  .sort-wrap { display: grid; gap: 6px; }

  /* ─── Fahndungskarten: zweispaltig, kompakt ─── */
  .grid-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { gap: 6px; padding: 10px 10px 8px; }
  .card-name { font-size: 13px; }
  .card-desc { display: none; }
  .card-meta { gap: 4px; }
  .meta-tag { font-size: 9.5px; padding: 2px 6px; }
  .card-footer { padding-top: 8px; font-size: 10px; }
  .badge { top: 8px; padding: 3px 6px; font-size: 9.5px; }
  .badge-source { left: 6px; }
  .badge-reward { right: 6px; }
  .platzhalter { gap: 10px; }
  .platzhalter-ring {
    width: 64px;
    height: 64px;
    box-shadow:
      0 0 0 10px color-mix(in srgb, var(--art, #64748b) 9%, transparent),
      0 0 0 11px color-mix(in srgb, var(--art, #64748b) 16%, transparent);
  }
  .platzhalter-ring svg { width: 34px; height: 34px; }

  .pg-btn { min-width: 44px; min-height: 44px; }

  /* ─── Karten: Höhe am dynamischen Viewport ─── */
  #content, #map-wrap { min-height: 50dvh; }
  #map { height: 66dvh; min-height: 340px; border-width: 2px; }
  body[data-aktive-route="lage"] #map { height: 72dvh; }
  .map-bar { flex-wrap: nowrap; }
  .map-zaehler { flex: 1 1 0; min-width: 0; font-size: 12px; }
  .map-note { align-items: flex-start; }
  .map-note svg { flex: none; margin-top: 3px; }

  /* ─── Gefährdungslage ─── */
  .risiko-panel { margin-top: 12px; padding: 16px; }
  .risiko-titel { align-items: flex-start; font-size: 16px; }
  .risiko-titel svg { flex: none; margin-top: 3px; }
  .risiko-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .risiko-form .search-wrap { max-width: none; }
  .risiko-btn { justify-content: center; height: 46px; }
  .risiko-oder { text-align: center; }

  /* ─── Detail-Dialog vollflächig ─── */
  .modal-overlay { padding: 0; place-items: stretch; }
  .modal {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-top { padding: calc(6px + env(safe-area-inset-top)) 10px 6px 16px; }
  .modal-close { width: 44px; height: 44px; }
  .modal-content { padding: 16px; }
  .modal-img { max-height: 55dvh; }
  .modal-name { font-size: 20px; }
  .modal-kopfzeile { flex-wrap: wrap; }
  .merk-btn, .hinweis-btn { min-height: 44px; }
  .contact-row { padding: 6px 0; overflow-wrap: anywhere; }

  .konto-hinweis { max-width: calc(100% - 32px); }

  /* Merkliste/Vorbereiten: main polstert bereits */
  #merkliste, #vorbereiten { padding-left: 0; padding-right: 0; }
  .konto-wrap { margin: var(--sp-5) auto; padding: var(--sp-5); }
  .konto-tab { min-height: 44px; }
  .werkzeug { min-height: 44px; }
  .vorb-radius { width: 100%; margin-left: 0; }
  .vorb-radius input[type="range"] { flex: 1; }
  .vorb-map { height: 60dvh; }

  .site-footer { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
}
