:root {
  --ink: #1d2126;
  --ink-2: #454b53;
  --ink-3: #626973;
  --paper: #ffffff;
  --concrete: #f2f3f0;
  --concrete-2: #e7e9e4;
  --line: #d6d9d3;
  --line-strong: #b9bdb6;
  --signal: #0b5cad;
  --signal-soft: #e3edf8;
  --rot: #cf3a2c;
  --rot-soft: #fbe9e6;
  --gelb: #e2a20f;
  --gelb-ink: #7a5300;
  --gelb-soft: #fdf3dc;
  --gruen: #2e8b4d;
  --gruen-soft: #e4f3e8;
  --cat-kindergarten: #6a4bc4;
  --cat-kita: #b8327a;
  --cat-spielgruppe: #9a5626;
  --cat-tagesstruktur: #0d7777;
  --cat-primarschule: #1d2126;
  --cat-weitere: #66707c;
  --radius: 8px;
  --panel-w: 560px;
  /* Abstaende: seitlicher Rand im Panel, Luft zwischen Gruppen, Luft innerhalb einer Gruppe */
  --gutter: 28px;
  --gap-group: 28px;
  --gap-in: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--concrete);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: var(--signal); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.app { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); height: 100vh; height: 100dvh; }

/* ---------- Karte ---------- */
.map-wrap { position: relative; min-width: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: #f4f5f2; }
.leaflet-container { font-family: var(--font); }
.base-muted .leaflet-tile-pane .leaflet-tile { opacity: 0.42 !important; }
.base-muted.has-route .leaflet-tile-pane .leaflet-tile { opacity: 0.28 !important; }
.leaflet-control-attribution { font-size: 11px; background: rgb(255 255 255 / 0.85) !important; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 4px 12px rgb(0 0 0 / 0.08) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; width: 34px !important; height: 34px !important; display: grid !important; place-items: center; }
.leaflet-control-zoom a svg { display: block; }

.map-tools {
  position: absolute; top: auto; bottom: 28px; left: 20px; right: 20px; z-index: 500;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; justify-content: flex-start; pointer-events: none;
}
.tool-bar {
  display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 3px; pointer-events: auto;
  background: var(--paper); border-radius: 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 6px 18px rgb(0 0 0 / 0.08);
}
.tool {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; padding: 6px 11px; border-radius: 7px;
  font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.tool:hover { background: var(--concrete); color: var(--ink); }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Ebenen-Schalter tragen das Zeichen ihrer Ebene; ausgeblendet steht es blass */
.sw { flex: none; display: inline-block; transition: opacity 160ms var(--ease); }
.tool[aria-pressed="false"] .sw { opacity: 0.45; }
.sw-place { width: 13px; height: 13px; border-radius: 50%; background: var(--cat-kindergarten); box-shadow: 0 0 0 1.5px #fff; }
.sw-hazard { display: block; }
.sw-work { width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 2px; background: repeating-linear-gradient(135deg, var(--ink) 0 2px, #fff 2px 4.5px); box-shadow: 0 0 0 1px #fff; }
.sw-route { width: 16px; height: 4px; border-radius: 2px; background: var(--signal); box-shadow: 0 0 0 1.5px #fff; }

/* Ampel-Zeichen: Farbe plus Form */
.lamp { display: inline-block; width: 12px; height: 12px; flex: none; }
.lamp-gruen { background: var(--gruen); border-radius: 50%; }
.lamp-gelb { background: var(--gelb); clip-path: polygon(50% 4%, 100% 96%, 0 96%); width: 14px; height: 13px; }
.lamp-rot { background: var(--rot); border-radius: 2px; width: 11px; height: 11px; }
.lamp-none { background: transparent; border: 1.5px dashed var(--line-strong); border-radius: 50%; }
.lamp.lg { width: 16px; height: 16px; }
.lamp-gelb.lg { width: 18px; height: 17px; }
.lamp-rot.lg { width: 15px; height: 15px; }

/* Marker */
.mk { background: none; border: 0; }
.home-mk svg { filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.25)) drop-shadow(0 3px 6px rgb(0 0 0 / 0.18)); }
/* Kategorien: eigene Farbe je Ortsart, weder Ampel noch Signalblau; weisse Schrift mindestens 5:1 */
.cat-kindergarten { --cat: var(--cat-kindergarten); }
.cat-kita { --cat: var(--cat-kita); }
.cat-spielgruppe { --cat: var(--cat-spielgruppe); }
.cat-tagesstruktur { --cat: var(--cat-tagesstruktur); }
.cat-primarschule { --cat: var(--cat-primarschule); }
.cat-weitere { --cat: var(--cat-weitere); }
/* Ort: Kreis in der Kategoriefarbe mit weisser Outline und Initialen, Ampelzeichen des Wegs als Plakette oben rechts */
.place-wrap { position: absolute; left: 0; top: 0; --dx: 0px; --dy: 0px; }
.place-mk {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cat, var(--ink-3)); color: #fff;
  font: 700 11.5px/1 var(--font-cond); letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px 1px rgb(0 0 0 / 0.3);
  /* Versatz aus dem Entflechten ohne Uebergang */
  translate: var(--dx) var(--dy);
  transform: translate(-50%, -50%);
  transition: box-shadow 160ms var(--ease), opacity 160ms var(--ease);
  cursor: pointer;
}
.place-mk.ini-long { font-size: 10px; letter-spacing: 0; }
.place-mk .amp-b { position: absolute; top: -6px; right: -7px; line-height: 0; pointer-events: none; }
.place-mk .amp-b svg { display: block; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.25)); }
.place-mk .nm {
  display: none; position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 5px 7px; border-radius: 5px; background: var(--paper); color: var(--ink);
  font: 600 12.5px/1 var(--font-cond); letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.16), 0 3px 8px rgb(0 0 0 / 0.14);
}
.place-mk.is-current .nm, .place-mk.is-hover .nm, .place-mk.is-selected .nm { display: block; }
.place-mk.is-hover, .place-mk.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--signal), 0 3px 10px 2px rgb(11 92 173 / 0.32); z-index: 2; }
.place-mk.is-dim { opacity: 0.35; }
/* Verschobener Punkt: Fuehrungslinie zur echten Stelle, bei gewaehltem Weg blass */
.has-route .leaflet-stems-pane { opacity: 0.3; }

.x-mk { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
.x-mk svg { display: block; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.3)); }
.x-mk.is-hover svg { filter: drop-shadow(0 0 0 2px #fff) drop-shadow(0 0 6px rgb(11 92 173 / 0.9)); }
.hs-mk { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
.hs-mk svg { display: block; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.2)); }
/* Baustelle: schwarz-weisse Bake statt Ampelform */
.bk-mk {
  position: absolute; left: 0; top: 0; width: 15px; height: 15px; transform: translate(-50%, -50%);
  border: 1.5px solid var(--ink); border-radius: 3px;
  background: repeating-linear-gradient(135deg, var(--ink) 0 2.5px, #fff 2.5px 5.5px);
  box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgb(0 0 0 / 0.3);
}

.leaflet-tooltip.tip {
  font: 500 13.5px/1.4 var(--font); color: var(--ink); background: var(--paper); padding: 8px 11px; border: 0; border-radius: 7px;
  white-space: normal; width: max-content; max-width: min(320px, 70vw); text-wrap: pretty;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.14), 0 6px 16px rgb(0 0 0 / 0.12);
}
.leaflet-tooltip.tip::before { display: none; }
.tip b { font-weight: 600; display: block; }
/* Sheet: Angaben zum angeklickten Ort, links ueber der Karte */
.sheet {
  position: absolute; left: 14px; top: var(--sheet-top, 64px); z-index: 600; width: 400px;
  max-height: calc(100% - var(--sheet-top, 20px) - var(--sheet-bottom, 100px)); display: flex; flex-direction: column;
  background: var(--paper); border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 6px 18px rgb(0 0 0 / 0.08);
}
.sh-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 28px; }
.sh-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; column-gap: 14px; }
.sh-head > .psym { margin-top: 1px; }
.sh-head h2 { margin: 0; font-size: 23px; line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.sh-cat { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-3); }
.sh-addr { margin: 1px 0 0; font-size: 14.5px; color: var(--ink-2); }
.sh-head .icon-btn { margin: -6px -10px 0 0; }
.sh-weg { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--concrete-2); }
.sh-v { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: start; }
.sh-v > .lamp { margin-top: 5px; justify-self: center; }
.sh-vt { margin: 0; font-size: 16px; color: var(--ink-2); }
.sh-vt b { color: var(--ink); font-weight: 600; }
.sh-fig { margin: 3px 0 0; font-size: 14.5px; color: var(--ink-3); }
.sh-btn {
  display: block; width: 100%; height: 46px; margin-top: 18px; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--ink); color: #fff; font: 600 16px/1 var(--font); cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.sh-btn:hover { background: #33383f; border-color: #33383f; }
.sh-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.sh-btn[aria-pressed="true"]:hover { background: var(--concrete); border-color: var(--line-strong); }
.sh-about { margin-top: 24px; }
.sh-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--concrete-2); }
.sh-tabs [role="tab"] {
  display: inline-flex; align-items: baseline; gap: 7px;
  border: 0; background: none; padding: 9px 0 12px; cursor: pointer; font: inherit; font-weight: 600; font-size: 15.5px;
  color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.sh-tabs [role="tab"]:hover { color: var(--ink); }
.sh-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.sh-tabs .n { font-family: var(--font-cond); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.sh-pane { padding-top: 20px; }
.sh-pane > * + * { margin-top: 18px; }
.sh-pane .sources ul { gap: 10px; font-size: 15px; }
.sh-about .kv { grid-template-columns: 100px minmax(0, 1fr); row-gap: 10px; column-gap: 16px; font-size: 15px; line-height: 1.5; }
.sh-about .kv dt { font-size: 14px; padding-top: 1px; }
.sh-about dd, .sh-about li, .sh-about .note { overflow-wrap: anywhere; }
.sh-about .facts { font-size: 15px; color: var(--ink-2); }
.sh-about .note { font-size: 14.5px; }

.tip .tip-k { display: block; margin: 1px 0 3px; font: 600 11px/1.3 var(--font-cond); letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }
.tip .muted { color: var(--ink-2); }

/* ---------- Panel ---------- */
.panel {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--paper); border-left: 1px solid var(--line);
}
.panel-head { padding: 26px var(--gutter) 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.head-row { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.icon-btn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -8px 0 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.icon-btn:hover { background: var(--concrete); color: var(--ink); }
.icon-btn[aria-expanded="true"] { background: var(--ink); color: #fff; }
.settings {
  position: absolute; top: 38px; right: -8px; z-index: 20; width: min(340px, calc(100vw - 32px));
  background: var(--paper); border-radius: 10px; padding: 18px 20px 20px;
  box-shadow: 0 0 0 1px rgb(29 33 38 / 0.08), 0 1px 2px rgb(0 0 0 / 0.12), 0 8px 24px rgb(0 0 0 / 0.12);
}
.settings h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.check b { display: block; font-weight: 600; }
.check .hint { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.where h1 { font-size: 25px; line-height: 1.15; font-weight: 700; margin: 0; letter-spacing: -0.012em; }
.beta {
  display: inline-block; vertical-align: 0.28em; margin-left: 4px; padding: 2px 7px 3px;
  font-family: var(--font-cond); font-size: 13px; line-height: 1; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--signal); background: var(--signal-soft); border-radius: 5px;
}
.where .sub { margin: 6px 0 0; color: var(--ink-3); font-size: 15px; }

.next-deadline {
  display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; padding: 14px 16px; line-height: 1.45;
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--concrete); transition: background-color 160ms var(--ease);
}
.next-deadline:hover { background: var(--concrete-2); }
.next-deadline .lamp { margin-top: 5px; }
.next-deadline .nd-when { font-weight: 700; }
.next-deadline .nd-what { color: var(--ink); }
.next-deadline > span:last-child { color: var(--ink-2); }

.tabs { display: flex; gap: 30px; margin-top: 20px; }
.tabs [role="tab"] {
  border: 0; background: none; padding: 10px 0 13px; cursor: pointer; font-weight: 600; font-size: 16px;
  color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.view { flex: 1; overflow-y: auto; min-height: 0; scrollbar-gutter: stable; }

.controls { padding: 20px var(--gutter) 10px; display: grid; gap: 16px; position: sticky; top: 0; background: var(--paper); z-index: 2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 6px 13px 6px 11px; font-size: 14px; line-height: 1.3; font-weight: 500; cursor: pointer; color: var(--ink-2);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-family: var(--font-cond); font-weight: 600; opacity: 0.7; }
/* Kategorie-Chip traegt das Kartensymbol seiner Orte */
.chip-cat { padding: 4px 12px 4px 4px; gap: 8px; }
.cat-sym {
  flex: none; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%;
  background: var(--cat); color: #fff; font: 700 10.5px/1 var(--font-cond); letter-spacing: 0.02em;
  box-shadow: 0 0 0 1.5px #fff;
}
.cat-sym.ini-long { font-size: 9px; letter-spacing: 0; }
.chip-cat[aria-pressed="false"] .cat-sym { opacity: 0.5; }
.psym {
  position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--cat, var(--ink-3)); color: #fff; font: 700 12px/1 var(--font-cond); letter-spacing: 0.02em;
}
.psym.ini-long { font-size: 10px; letter-spacing: 0; }
.psym .amp-b { position: absolute; top: -5px; right: -6px; line-height: 0; }
.psym .amp-b svg { display: block; }
.control-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--concrete); border-radius: 9px; padding: 3px; }
.seg button {
  border: 0; background: none; padding: 6px 13px; border-radius: 7px; cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.14); }

.scale-note { margin: 6px var(--gutter) 6px; font-size: 14px; line-height: 1.5; color: var(--ink-3); max-width: 60ch; }

.rows { list-style: none; margin: 0; padding: 4px 0 36px; }
.row {
  display: grid; grid-template-columns: 30px 1fr auto; column-gap: 14px; row-gap: 4px; align-items: baseline;
  padding: 18px var(--gutter) 18px calc(var(--gutter) - 4px); cursor: pointer; border-top: 1px solid var(--concrete-2);
  transition: background-color 140ms var(--ease);
}
.row:first-child { border-top: 0; }
.row:hover, .row.is-hover { background: var(--concrete); }
.row:focus-visible { outline-offset: -2px; border-radius: 0; }
.row .psym { align-self: center; justify-self: start; }
.row-name { font-weight: 600; font-size: 16.5px; line-height: 1.3; min-width: 0; }
.row-name .cat { font-weight: 500; color: var(--ink-3); font-size: 14.5px; margin-left: 8px; white-space: nowrap; }
.row-name .tag { font: 600 11.5px/1 var(--font-cond); letter-spacing: 0.02em; color: var(--ink); background: var(--concrete-2); padding: 3px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.row-dist { font-weight: 600; font-size: 16px; text-align: right; white-space: nowrap; }
.row-dist .min { color: var(--ink-3); font-weight: 500; }
.row-band { grid-column: 2 / 4; margin-top: 10px; }
.row-meta { grid-column: 2 / 4; margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.row-meta .x-rot { color: var(--rot); font-weight: 600; }
.row-meta .x-gelb { color: var(--gelb-ink); font-weight: 600; }

/* Wegband */
.band { display: block; overflow: visible; }
.band .axis { stroke: var(--line); stroke-width: 1; }
.band .track { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.band .track.is-squeezed { stroke-dasharray: 5 4; stroke-linecap: butt; }
.band .tick-lbl { font: 500 10.5px var(--font-cond); fill: var(--ink-3); }
.band .x { cursor: pointer; }
.band .x.is-hover { filter: drop-shadow(0 0 3px rgb(11 92 173 / 0.9)); }
.band-lg .track { stroke-width: 4; }

/* Detail */
.detail-view { padding: 0 0 48px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 20px var(--gutter) 0; padding: 7px 13px 7px 9px;
  border: 0; background: var(--concrete); border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 14.5px; color: var(--ink-2);
}
.back:hover { background: var(--concrete-2); color: var(--ink); }
.back svg { width: 16px; height: 16px; }
.d-head { padding: 22px var(--gutter) 0; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
.d-head > .psym { grid-row: 1 / span 3; margin-top: 2px; }
.d-head > :not(.psym) { grid-column: 2; }
.d-head h2 { margin: 0; font-size: 25px; line-height: 1.18; font-weight: 700; letter-spacing: -0.012em; text-wrap: balance; }
.d-head .d-cat { color: var(--ink-3); margin: 6px 0 0; }
.d-head .d-addr { margin: 1px 0 0; color: var(--ink-2); }

.verdict { margin: 24px var(--gutter) 0; border-radius: var(--radius); padding: 18px 20px; }
.verdict.v-rot { background: var(--rot-soft); }
.verdict.v-gelb { background: var(--gelb-soft); }
.verdict.v-gruen { background: var(--gruen-soft); }
.verdict-top { display: flex; align-items: center; gap: 12px; }
.verdict-top strong { font-size: 18px; line-height: 1.3; }
.verdict ul { margin: 10px 0 0; padding-left: 28px; color: var(--ink-2); }
.verdict li { margin: 4px 0; }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 20px var(--gutter) 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fig { background: var(--paper); padding: 13px 14px 12px; }
.fig .v { font-weight: 700; font-size: 21px; line-height: 1.1; display: flex; align-items: center; gap: 7px; }
.fig .l { margin-top: 3px; font-size: 13.5px; color: var(--ink-3); }

.route-switch { margin: 22px var(--gutter) 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.route-switch p { margin: 0; font-size: 14.5px; color: var(--ink-3); }
.d-band { margin: 16px var(--gutter) 0; }

.d-section { margin: 36px var(--gutter) 0; }
.d-section h3 { font-size: 18px; line-height: 1.25; margin: 0 0 12px; font-weight: 700; }
.d-section .hint { font-size: 14.5px; color: var(--ink-3); margin: -4px 0 12px; }

.xlist { list-style: none; margin: 0; padding: 0; }
.xitem { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--concrete-2); }
.xitem:first-child { border-top: 0; }
.xitem.is-hover { background: linear-gradient(90deg, var(--signal-soft), transparent 80%); }
.xitem .xn svg { display: block; }
.xitem .xt { font-weight: 600; font-size: 16px; }
.xitem .xt .at { font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.xitem .xf { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.xitem .xw { margin: 8px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); }
.xitem .xw li + li { margin-top: 3px; }
.xitem .xs { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); margin-top: 8px; }
.src-kind { font: 600 11.5px/1 var(--font-cond); letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; background: var(--concrete-2); color: var(--ink-2); margin-right: 6px; vertical-align: 1px; }
.src-kind.amtlich { background: var(--signal-soft); color: var(--signal); }

.facts { margin: 0; padding-left: 20px; }
.facts li { margin: 0; padding-left: 2px; }
.facts li + li { margin-top: 8px; }
.facts li::marker { color: var(--line-strong); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.sources h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.sources ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: 14px; }
.sources a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note { font-size: 14.5px; line-height: 1.55; background: var(--concrete); border-radius: var(--radius); padding: 14px 16px; margin: 0; color: var(--ink-2); }

/* Zeitplan und Regeln */
.doc { padding: 26px var(--gutter) 48px; }
.doc h2 { font-size: 20px; line-height: 1.25; margin: 40px 0 12px; font-weight: 700; letter-spacing: -0.005em; }
.doc h2:first-child { margin-top: 0; }
.doc .lead { color: var(--ink-2); margin: 0 0 18px; max-width: 62ch; }

.tl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tl th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 14px; padding: 0 10px 10px 0; border-bottom: 1px solid var(--line); }
.tl td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--concrete-2); vertical-align: top; }
.tl td:first-child { white-space: nowrap; font-weight: 600; width: 90px; }
.tl .age { color: var(--ink-3); font-size: 14px; display: block; margin-top: 2px; }
.tl tr.is-now td { background: var(--signal-soft); }
.tl tr.is-now td:first-child { padding-left: 10px; color: var(--signal); }

.dl { list-style: none; margin: 0; padding: 0; }
.dl li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--concrete-2); }
.dl li:first-child { border-top: 0; padding-top: 4px; }
.dl .lamp { margin-top: 6px; justify-self: center; }
.dl .when { font-weight: 700; font-size: 16px; }
.dl .what { color: var(--ink-2); margin-top: 2px; }
.dl .src { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Regeln: Suche und Facetten kleben oben, darunter Gruppen zum Aufklappen */
.rfilter { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 20px var(--gutter) 14px; display: grid; gap: 14px; border-bottom: 1px solid var(--concrete-2); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 8px;
  font: 400 16px/1 var(--font); color: var(--ink); background: var(--paper);
  transition: border-color 160ms var(--ease);
}
.search input::placeholder { color: var(--ink-3); }
.search input:hover { border-color: var(--line-strong); }
.search input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); border-radius: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.facets { display: flex; flex-wrap: wrap; gap: 8px; }
.facet {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 7px 9px 7px 13px;
  font-size: 14.5px; line-height: 1.2; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.facet:hover { border-color: var(--line-strong); color: var(--ink); }
.facet .sel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet .chev-d { width: 15px; height: 15px; flex: none; opacity: 0.7; transition: transform 200ms var(--ease); }
.facet[aria-expanded="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.facet[aria-expanded="true"] .chev-d { transform: rotate(180deg); }
.facet.has-sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.facet.has-sel:hover { color: #fff; }
.facet.has-sel[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.facet-panel { display: flex; flex-wrap: wrap; gap: 8px; background: var(--concrete); border-radius: var(--radius); padding: 12px; }
.facet-panel .chip { font-size: 14px; }
.chip[disabled] { opacity: 0.45; cursor: default; }
.chip[disabled]:hover { border-color: var(--line); color: var(--ink-2); }
.r-count { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--ink-3); }
.r-count b { color: var(--ink); font-weight: 600; }
.linkbtn { border: 0; background: none; padding: 0; font-size: 14px; font-weight: 500; color: var(--signal); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { text-decoration-thickness: 2px; }
mark { background: var(--signal-soft); color: inherit; border-radius: 2px; padding: 0 1px; box-shadow: 0 1px 0 var(--signal); }
.r-doc { padding-top: 22px; }
.r-doc > h2 { margin: 36px 0 6px; }
.empty { padding: 18px 0 6px; color: var(--ink-2); }
.empty p { margin: 0 0 6px; }

.stage { border-top: 1px solid var(--line); }
.r-doc > h2 + .stage { border-top-color: var(--line-strong); }
.stage > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; }
.stage > summary::-webkit-details-marker { display: none; }
.stage > summary:hover h3 { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.stage .g-t { display: grid; gap: 3px; min-width: 0; }
.stage .g-t h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.stage .g-t .age { color: var(--ink-3); font-size: 14px; }
.stage .g-m { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink-3); font-size: 14px; }
.stage .g-n { white-space: nowrap; }
.stage .chev { width: 16px; height: 16px; transition: transform 200ms var(--ease); flex: none; color: var(--ink-3); }
.stage[open] > summary .chev { transform: rotate(90deg); }
.stage[open] > summary { padding-bottom: 6px; }
.stage[open] { padding-bottom: 14px; }
.rule { padding: 16px 0; border-top: 1px solid var(--concrete-2); }
.rule:first-of-type { border-top: 0; }
.rule h3 { font-size: 16px; line-height: 1.35; margin: 0; font-weight: 600; }
.rule p { margin: 6px 0 0; color: var(--ink-2); max-width: 64ch; }
.rule .quelle { font-size: 14px; margin-top: 8px; }
.rule .status-offen { font: 600 11px/1 var(--font-cond); letter-spacing: 0.03em; text-transform: uppercase; background: var(--concrete-2); color: var(--ink-2); padding: 2px 5px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }

.open-q { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); max-width: 64ch; }
.open-q li { margin: 0; }
.open-q li + li { margin-top: 8px; }
.foot { font-size: 13.5px; color: var(--ink-3); margin-top: 36px; }

.noscript { padding: 24px; }

/* Schmal: Karte oben, Panel darunter */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46vh minmax(0, 1fr); }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .map-tools { left: 10px; right: 10px; gap: 6px; }
  .sheet { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; max-height: calc(100% - var(--sheet-top, 64px) - 10px); }
  .sh-scroll { padding: 16px 18px 20px; }
  .sh-head h2 { font-size: 20px; }
  .sh-weg { margin-top: 16px; padding-top: 14px; }
  .sh-btn { height: 42px; margin-top: 14px; }
  .tool-bar { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tool-bar::-webkit-scrollbar { display: none; }
  .tool .long { display: none; }
  .figures { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .row { padding-left: 14px; padding-right: 18px; }
  .tool { padding: 6px 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}

/* ---------- Public version: address, status, intro, child, footer ---------- */
.where .h-home { display: none; }
.has-home .where .h-home { display: inline; }
.has-home .where .h-none { display: none; }
.addr-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px;
  background: var(--paper); border-radius: 10px; max-height: 60vh; overflow-y: auto;
  box-shadow: 0 0 0 1px rgb(29 33 38 / 0.08), 0 1px 2px rgb(0 0 0 / 0.12), 0 8px 24px rgb(0 0 0 / 0.12);
}
.addr-list li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; padding: 10px 12px; border-radius: 7px; cursor: pointer; }
.addr-list li b { font-weight: 600; }
.addr-list li span { color: var(--ink-3); font-size: 14.5px; }
.addr-list li[aria-selected="true"], .addr-list li:hover { background: var(--concrete); }
.addr-list li.none { cursor: default; color: var(--ink-2); }
.addr-list li.none:hover { background: none; }
.status { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.status.is-busy::before {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--ink); animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.rows .intro { padding: 26px var(--gutter) 10px; color: var(--ink-2); max-width: 64ch; }
.rows .intro h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; color: var(--ink); }
.rows .intro p { margin: 0 0 14px; }
.child-form { display: grid; gap: 10px; margin: 0 0 24px; padding: 16px 18px; background: var(--concrete); border-radius: var(--radius); }
.child-form label b { display: block; font-weight: 600; }
.child-form .hint { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-3); }
.child-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.child-row input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: 400 16px/1 var(--font); color: var(--ink); background: var(--paper); }
.child-row input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.btn {
  height: 42px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #fff;
  font-weight: 600; cursor: pointer; transition: background-color 160ms var(--ease);
}
.btn:hover { background: #33383f; }
.panel-foot { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px var(--gutter) 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.panel-foot .foot-note { flex-basis: 100%; margin: 0; color: var(--ink-3); }
.panel-foot a { color: var(--ink-3); }
.panel-foot a:hover { color: var(--ink); }
.row-name .tag { margin-left: 8px; }
.settings .hint { margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }
body:not(.has-home) .controls, body:not(.has-home) .map-tools [aria-label="Ebenen ein- und ausblenden"] { display: none; }

/* Helle Kartenwerkstatt: schwebende Arbeitsflächen, fluide Schrift und ein
   bewegliches Panel statt zwei verkleinerter Desktop-Spalten auf dem Handy. */
:root {
  --concrete: #f3f5f7;
  --concrete-2: #e9edf1;
  --line: #dce2e7;
  --line-strong: #bdc7d0;
  --radius: 14px;
  --gutter: clamp(20px, 2.1vw, 32px);
  --panel-w: clamp(470px, 39vw, 600px);
  --shadow-float: 0 3px 8px rgb(28 42 56 / .05), 0 16px 44px rgb(28 42 56 / .12);
  --shadow-control: 0 2px 4px rgb(28 42 56 / .04), 0 6px 20px rgb(28 42 56 / .10);
  --mobile-panel-height: 52dvh;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
body { font-size: clamp(15px, .25vw + 13.5px, 16px); background: #edf1f4; }
.app { gap: 0; }
.panel { margin: 16px 16px 16px 0; border: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-float); position: relative; z-index: 600; }
.panel-head { padding: clamp(22px, 2vw, 30px) var(--gutter) 14px; border-bottom-color: var(--concrete-2); }
.panel-grip { display: none; }
.where h1 { font-size: clamp(24px, 1.1vw + 12px, 30px); line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.where .sub { font-size: clamp(14px, .4vw + 10px, 15px); margin-top: 9px; }
.where { min-width: 0; }
.icon-btn { width: 40px; height: 40px; margin: -3px -5px 0 0; border-radius: 12px; background: var(--concrete); }
.next-deadline { border-radius: 12px; font-size: 14px; margin-top: 14px; padding: 12px 14px; }
.tabs { gap: 4px; padding: 4px; margin-top: 18px; border-radius: 12px; background: var(--concrete); }
.tabs [role="tab"] { flex: 1; padding: 9px 8px; margin: 0; border: 0; border-radius: 9px; font-size: 15px; transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease); }
.tabs [role="tab"][aria-selected="true"] { background: var(--paper); box-shadow: 0 2px 6px rgb(28 42 56 / .09); }
.view { scrollbar-width: thin; }
.tool-bar { border-radius: 14px; padding: 4px; gap: 3px; box-shadow: var(--shadow-control); }
.tool { min-height: 34px; border-radius: 10px; }
.map-tools { gap: 10px; }
.leaflet-control-zoom { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-control) !important; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; }
.sheet { border-radius: 20px; box-shadow: var(--shadow-float); }
.settings { border-radius: 16px; box-shadow: var(--shadow-float); }
.controls { padding-top: 20px; gap: 14px; }
.chip { min-height: 36px; transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease); }
.chip-cat { background: var(--concrete); border-color: transparent; padding: 5px 11px 5px 5px; }
.chip-cat[aria-pressed="true"] { background: var(--paper); border-color: var(--line-strong); color: var(--ink); box-shadow: 0 2px 4px rgb(28 42 56 / .06); }
.chip-cat[aria-pressed="false"] { color: var(--ink-3); }
.seg { border-radius: 11px; }
.seg button { border-radius: 8px; }
.scale-note { font-size: 14px; line-height: 1.45; margin-top: 10px; margin-bottom: 12px; }
.rows { padding-top: 2px; }
.row { padding-top: 20px; padding-bottom: 20px; column-gap: 14px; border-color: var(--concrete-2); }
.row-name { font-size: clamp(16px, .3vw + 13px, 18px); font-weight: 600; }
.row-name .cat { display: block; margin: 4px 0 0; font-size: 14px; white-space: normal; }
.row-name .tag { display: inline-block; margin: 4px 0 0; }
.row-dist { align-self: start; font-size: 17px; }
.row-dist .min { display: block; margin-top: 2px; font-size: 14px; }
.row-band { margin-top: 6px; }
.row-meta { font-size: 14px; }
.back { min-height: 38px; border-radius: 10px; }
.d-head h2 { font-size: clamp(24px, 1vw + 14px, 30px); letter-spacing: -.025em; }
.sh-head h2 { font-size: clamp(22px, .8vw + 13px, 28px); letter-spacing: -.02em; }
.verdict { border-radius: 14px; padding: 18px 20px; }
.figures { border-radius: 14px; }
.fig .v { font-size: clamp(21px, .6vw + 16px, 26px); }
.sh-btn { border-radius: 12px; }
.doc h2 { font-size: clamp(22px, .7vw + 15px, 27px); letter-spacing: -.02em; }
.search, .facet, .facet-panel { border-radius: 11px; }
.mobile-place-about { margin: 30px var(--gutter) 0; padding-top: 24px; border-top: 1px solid var(--line); }
.mobile-place-about h3 { margin: 0 0 14px; font-size: 20px; }
.route-switch .seg { display: flex; flex-wrap: wrap; }
.route-switch .seg button { flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  .view:not([hidden]), .sh-scroll { animation: surface-arrive 320ms var(--ease); }
  .row .psym { transition: scale 200ms var(--ease); }
  .row:hover .psym, .row.is-hover .psym { scale: 1.08; }
  @keyframes surface-arrive { from { transform: translateY(7px); } to { transform: translateY(0); } }
}
@media (max-width: 1100px) and (min-width: 901px) {
  :root { --panel-w: 480px; --gutter: 22px; }
  .map-tools { left: 12px; right: 12px; }
  .sheet { width: calc(100% - 76px); max-height: 45%; }
  .tool { padding: 6px 8px; }
  .tool .long { display: none; }
}
@media (max-width: 900px) {
  :root { --gutter: clamp(18px, 5vw, 28px); }
  html, body { overflow: hidden; overscroll-behavior: none; }
  .app { display: block; height: 100dvh; }
  .map-wrap { position: absolute; inset: 0; }
  .panel { position: absolute; inset: auto 0 0; height: var(--mobile-panel-height); margin: 0; border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -4px 16px rgb(28 42 56 / .07), 0 -18px 48px rgb(28 42 56 / .13); z-index: 700; padding-bottom: env(safe-area-inset-bottom); }
  .panel-grip { display: grid; place-items: center; flex: none; width: 100%; height: 27px; padding: 0; border: 0; background: var(--paper); cursor: ns-resize; touch-action: none; }
  .panel-grip span { width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); }
  .panel-grip:hover span, .panel-grip:focus-visible span { background: var(--ink-3); }
  .panel-grip:focus-visible { outline-offset: -4px; }
  .panel.is-dragging { user-select: none; }
  .panel-head { padding: 0 var(--gutter) 12px; flex: none; }
  .where h1 { font-size: clamp(21px, 4.7vw, 28px); line-height: 1.15; }
  .where .sub { margin-top: 5px; font-size: 14px; }
  .tabs { margin-top: 12px; }
  .tabs [role="tab"] { min-height: 40px; padding: 8px; }
  .next-deadline { margin-top: 10px; padding: 10px 12px; font-size: 14px; }
  .view { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: auto; }
  .controls { position: static; padding-top: 16px; gap: 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 7px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip-cat { flex: none; min-height: 38px; }
  .control-row { gap: 8px; }
  .seg button { min-height: 36px; padding: 6px 10px; }
  .map-tools { top: auto; bottom: calc(var(--mobile-panel-height) + 32px); left: 12px; right: 12px; gap: 8px; justify-content: flex-start; }
  .tool-bar { max-width: 100%; border-radius: 13px; }
  .tool { padding: 7px 10px; font-size: 14px; }
  .leaflet-top.leaflet-right { top: max(2px, env(safe-area-inset-top)); }
  .leaflet-bottom.leaflet-right { bottom: calc(var(--mobile-panel-height) + 5px); }
  .leaflet-control-attribution { max-width: 85vw; font-size: 9px; border-radius: 5px; padding: 2px 5px; }
  .sheet { display: none !important; }
  .row { padding: 18px var(--gutter); column-gap: 12px; }
  .row-name { font-size: 17px; }
  .row-dist { font-size: 16px; }
  .d-head { padding-top: 20px; }
  .d-head h2 { font-size: clamp(24px, 6vw, 30px); }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .rfilter { padding-top: 16px; }
  .facet, .fopt { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Auf dem Handy bekommt der erste Ort Platz, bevor das Panel aufgezogen wird. */
.nd-mobile, .mobile-way-options { display: none; }
@media (max-width: 900px) {
  .panel-grip { height: 20px; }
  .panel-head { padding-bottom: 9px; }
  .where h1 { font-size: clamp(20px, 4.5vw, 26px); line-height: 1.12; }
  .where .sub { font-size: 13px; line-height: 1.3; margin-top: 4px; }
  .icon-btn { width: 36px; height: 36px; }
  .next-deadline { margin-top: 6px; padding: 7px 10px; gap: 8px; font-size: 13px; line-height: 1.2; align-items: center; }
  .next-deadline .lamp { margin-top: 0; }
  .next-deadline > span:last-child { min-width: 0; width: 100%; }
  .nd-desktop { display: none; }
  .nd-mobile { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
  .nd-mobile strong { overflow: hidden; text-overflow: ellipsis; }
  .nd-mobile svg { margin-left: auto; flex: none; }
  .tabs { margin-top: 8px; padding: 3px; }
  .tabs [role="tab"] { min-height: 34px; padding: 6px 8px; font-size: 14px; }
  .controls { padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .chips { padding-top: 0; padding-bottom: 2px; }
  .chip-cat { min-height: 34px; padding-top: 3px; padding-bottom: 3px; }
  .control-row { display: none; }
  .mobile-way-options { display: flex; gap: 7px; align-items: center; }
  .mobile-way-options select { font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 6px 23px 6px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); min-height: 34px; min-width: 0; }
  .mobile-info { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--concrete); color: var(--ink-3); cursor: pointer; }
  .mobile-info[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
  .scale-note { display: none; margin-top: 4px; margin-bottom: 10px; font-size: 13px; }
  .scale-note.is-open { display: block; }
  .row { padding-top: 14px; padding-bottom: 14px; }
}

/* Address and child's birth month side by side in the head. */
.panel-head .head-row { align-items: center; }
.profile-fields { display: grid; grid-template-columns: minmax(0, 1fr) 152px; gap: 12px; margin-top: 16px; }
.field-l { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.addr, .birth-field { position: relative; min-width: 0; }
.addr .search { border-radius: 9px; }
.addr .search input { height: 44px; font-size: 16px; }
.birth-fields { display: flex; gap: 4px; }
.birth-fields select {
  appearance: none; min-width: 0; width: 50%; height: 44px; padding: 8px 20px 8px 8px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%234c555f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 6px center / 8px 5px no-repeat;
}
.birth-fields select:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.kt-pick { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kt-pick select {
  appearance: none; min-width: 0; flex: 1; max-width: 260px; height: 40px; padding: 8px 26px 8px 10px; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%234c555f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 8px 5px no-repeat;
}
.kt-pick select:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.panel-foot { flex: none; }
@media (max-width: 900px) {
  .profile-fields { grid-template-columns: minmax(0, 1fr) 160px; gap: 8px; margin-top: 8px; }
  .birth-fields select { padding-left: 7px; padding-right: 17px; background-position: right 5px center; }
  .field-l { font-size: 12px; margin-bottom: 4px; }
  .panel-foot { gap: 2px 14px; padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); font-size: 12.5px; line-height: 1.35; }
}

/* Layers that only exist where research found hazard spots */
body:not(.has-hotspots) .tool-hs { display: none; }

/* ---------- Text pages: Hinweise, Datenschutz ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 40px 28px 64px; background: var(--paper); min-height: 100%; }
.page .back-link { display: inline-block; margin-bottom: 28px; font-weight: 500; }
.page h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.012em; }
.page h2 { font-size: 20px; line-height: 1.25; margin: 40px 0 10px; }
.page p, .page li { max-width: 66ch; color: var(--ink-2); }
.page ul { padding-left: 20px; }
.page li + li { margin-top: 6px; }
.page .lead { font-size: 17px; color: var(--ink-2); margin: 0 0 8px; }
.page .stand { margin-top: 48px; font-size: 14px; color: var(--ink-3); }
.page table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 8px 0; }
.page th, .page td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-top: 1px solid var(--concrete-2); }
.page th { font-weight: 600; color: var(--ink); white-space: nowrap; }
body.page-body { background: var(--concrete); }
.dl .what .exact { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }
.dl .what-t { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; max-width: 60ch; }
