/* Layout: Kopfzeile mit Lage-Kacheln, darunter Karte links (fix) und Datenspalte rechts (scrollt).
   Bewusst nur dunkel: Nachtbetrieb, Karte und Radar lesen sich auf dunklem Grund am besten. */
:root {
  color-scheme: dark;
  --bg: #0a1114;
  --surface: #10191d;
  --surface-2: #152126;
  --line: #22323a;
  --line-soft: #1a272d;
  --ink: #e5eef0;
  --ink-2: #adbcc1;
  --muted: #74878d;
  --accent: #6ccfdc;

  --crit: #d03b3b;
  --serious: #ec835a;
  --warn: #fab219;
  --good: #0ca30c;

  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;

  --f-body: "Barlow", system-ui, "Segoe UI", sans-serif;
  --f-cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: 16px;
  --radius: 6px;
  --top-h: 150px; /* wird per JS auf die echte Kopfzeilenhöhe gesetzt */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-size: 0.86em; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.top {
  padding: 10px var(--gutter) 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 {
  margin: 0;
  font: 600 1.45rem/1.1 var(--f-cond);
  letter-spacing: 0.01em;
  text-wrap: balance;
}
h1 span { color: var(--muted); font-weight: 500; margin-left: 6px; }
.meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; color: var(--ink-2); }
#clock { white-space: nowrap; }

.btn, .iconbtn, select, .seg button {
  font: 500 0.88rem var(--f-body);
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
}
.btn:hover, .iconbtn:hover, .seg button:hover { border-color: var(--accent); }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.kpi {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
  padding: 7px 10px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
}
.k-label { font: 600 0.72rem var(--f-body); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.k-value { font: 600 1.45rem/1.1 var(--f-cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-sub { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi[data-level="4"] { border-left-color: var(--crit); background: color-mix(in srgb, var(--crit) 16%, var(--surface-2)); }
.kpi[data-level="3"] { border-left-color: var(--serious); background: color-mix(in srgb, var(--serious) 12%, var(--surface-2)); }
.kpi[data-level="2"] { border-left-color: var(--warn); }
.kpi[data-level="1"] { border-left-color: var(--good); }

/* ---------- Hauptbereich ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  height: calc(100dvh - var(--top-h));
  min-height: 0;
}
.mapcol { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.maptabs { display: flex; gap: 2px; padding: 6px var(--gutter) 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.maptabs button {
  font: 600 0.92rem var(--f-cond); letter-spacing: 0.03em;
  color: var(--ink-2); background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 6px 12px 7px; cursor: pointer;
}
.maptabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.mapview { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: #0b1316; }
/* nur die ganzflächigen Karten (Windy, Blitzortung), nicht die Webcam-Player */
#windyFrame, #blitzFrame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#windyFrame { top: 41px; height: calc(100% - 41px); }
.framebar { display: flex; align-items: center; gap: 10px; padding: 6px var(--gutter); height: 41px; background: var(--surface); border-bottom: 1px solid var(--line); }
.framebar label { font-size: 0.85rem; color: var(--muted); }
.hint { font-size: 0.8rem; color: var(--muted); }

/* Ebenen-Box: Schnellansichten oben, Einzel-Ebenen aufklappbar */
.layerbox {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  width: 250px; max-height: calc(100% - 150px); overflow: auto;
  padding: 8px 10px 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.86rem;
}
.lb-head { margin-bottom: 6px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.presets button {
  font: 600 0.82rem var(--f-body); color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 6px 6px; cursor: pointer; text-align: center;
}
.presets button:hover { border-color: var(--accent); color: var(--ink); }
.presets button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.alllayers { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.alllayers summary { cursor: pointer; font-size: 0.8rem; color: var(--ink-2); padding: 2px 0; }
.layer-groups { padding: 0 0 6px; }
.lg-title { margin: 8px 0 3px; font: 600 0.7rem var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.layer-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.layer-row input { accent-color: var(--accent); margin: 0; }
.layer-row .state { margin-left: auto; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.basemaps { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.basemaps button { font: 500 0.8rem var(--f-body); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; cursor: pointer; }
.basemaps button[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* Webcam-Karte auf der Lagekarte */
.camcard {
  position: absolute; top: 10px; left: 54px; z-index: 1000; width: 250px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.cc-head { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 6px; }
.cc-name { flex: 1; min-width: 0; font: 600 0.86rem var(--f-cond); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-btn { display: inline-grid; place-items: center; width: 24px; height: 22px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.cc-btn svg { fill: var(--ink-2); }
.cc-btn:hover { border-color: var(--line); }
.cc-img { display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: zoom-in; }
.cc-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cc-foot { padding: 3px 8px 5px; font-size: 0.72rem; color: var(--muted); }
.camshow { position: absolute; top: 10px; left: 54px; z-index: 1000; }

/* Webcam-Wand */
.mapview.scroll { overflow-y: auto; }
.pad { padding: 12px var(--gutter) 0; margin: 0; }
.camwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 12px var(--gutter) 24px; }
.camtile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.camtile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.camtile .ct-body { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px 8px; }
.camtile .ct-name { font: 600 0.95rem var(--f-cond); }
.camtile .ct-sub { font-size: 0.78rem; color: var(--muted); }
.camtile .ct-right { text-align: right; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* Zeitleiste */
.timeline {
  position: absolute; left: 10px; bottom: 22px; z-index: 1000;
  display: flex; flex-direction: column; gap: 6px;
  width: min(520px, calc(100% - 20px));
  padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tl-row { display: flex; align-items: center; gap: 8px; }
.tl-row input[type="range"] { flex: 1; min-width: 60px; accent-color: var(--accent); }
.tl-label { font: 600 0.72rem var(--f-body); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.tl-time { min-width: 9.5em; text-align: right; color: var(--ink); }
.iconbtn { display: inline-grid; place-items: center; width: 30px; height: 28px; padding: 0; }
.iconbtn svg { fill: var(--ink); }
.iconbtn .i-play { display: none; }
.iconbtn[data-paused="true"] .i-play { display: inline; }
.iconbtn[data-paused="true"] .i-pause { display: none; }

.tl-slider { position: relative; flex: 1; min-width: 80px; padding-bottom: 16px; }
.tl-slider input { width: 100%; margin: 0; accent-color: var(--accent); position: relative; z-index: 2; }
.tl-scale { position: absolute; left: 8px; right: 8px; top: 7px; height: 26px; pointer-events: none; }
.tl-band { position: absolute; top: 0; height: 6px; border-radius: 3px; }
.tl-band.radar { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.tl-band.fc { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.10) 0 4px, transparent 4px 8px); }
.tl-mark { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.tl-mark i { width: 1px; height: 8px; background: var(--muted); }
.tl-mark b { margin-top: 6px; font: 500 0.66rem var(--f-body); color: var(--muted); white-space: nowrap; }
.tl-mark.now i { width: 2px; background: var(--ink); }
.tl-mark.now b { color: var(--ink); font-weight: 700; }
.tl-mark:first-child b { transform: translateX(30%); }
.tl-info { justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; }
.tl-kind { font-size: 0.78rem; color: var(--ink-2); }
.btn.small { font-size: 0.8rem; padding: 3px 8px; }
#tlLive[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
#langSeg button { font: 600 0.75rem var(--f-body); padding: 4px 7px; letter-spacing: 0.04em; }

/* Sparklines & Kennzahlen */
.spark { display: block; width: 100%; height: auto; overflow: visible; }
.k-spark .spark { margin-top: 3px; }
.k-spark:empty { display: none; }
.statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { min-width: 0; padding: 9px 11px 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 2px; }
.stat[data-level="4"] { border-left-color: var(--crit); }
.stat[data-level="3"] { border-left-color: var(--serious); }
.stat[data-level="2"] { border-left-color: var(--warn); }
.stat .spark { margin-top: 5px; }
.s-value { font: 600 1.55rem/1.1 var(--f-cond); }
.s-value small { font: 500 0.85rem var(--f-body); color: var(--ink-2); }
.sparkcell { width: 96px; vertical-align: middle; }
td.strong { font-weight: 700; color: var(--ink); }
.card.sel { border-color: var(--accent); }
.metar { padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.86rem; }
.metar p { margin: 3px 0 0; }
.muted { color: var(--muted); }
.metar .mono { font-size: 0.74rem; word-break: break-word; }

/* Legende */
.legend {
  position: absolute; right: 10px; bottom: 22px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 270px; padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.78rem; color: var(--ink-2);
}
.legend:empty { display: none; }
.lgd-title { font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.sw.round { border-radius: 50%; }
.ramp { height: 8px; border-radius: 4px; margin: 3px 0 2px; }
.ramp-labels { display: flex; justify-content: space-between; }

/* ---------- Datenspalte ---------- */
.sidetabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 6px var(--gutter) 0; background: var(--surface); border-bottom: 1px solid var(--line);
}
.sidetabs button {
  flex: none; font: 600 0.9rem var(--f-cond); letter-spacing: 0.03em; color: var(--ink-2);
  background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 6px 10px 7px; cursor: pointer;
}
.sidetabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
details.more-block { margin-top: 12px; }
details.more-block > summary { cursor: pointer; font: 600 0.95rem var(--f-cond); color: var(--ink-2); padding: 4px 0; }
details.more-block > .stack { margin-top: 8px; }
details.warn-more > summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-2); padding: 4px 0; }
details.warn-more > .stack { margin-top: 8px; }
.warn ul { margin: 2px 0 0; padding-left: 18px; font-size: 0.9rem; }
.warn li { margin: 1px 0; }
.side { min-height: 0; overflow-y: auto; background: var(--bg); scroll-behavior: smooth; }
.jump {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; overflow-x: auto;
  padding: 8px var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.jump a { flex: none; font: 600 0.8rem var(--f-body); color: var(--ink-2); text-decoration: none; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line); }
.jump a:hover { color: var(--ink); border-color: var(--accent); }
.panel { padding: 14px var(--gutter) 18px; border-bottom: 1px solid var(--line); scroll-margin-top: 44px; }
.panel h2 { margin: 0 0 10px; font: 600 1.2rem/1.2 var(--f-cond); letter-spacing: 0.02em; }
.panel h3 { margin: 16px 0 8px; font: 600 0.98rem var(--f-cond); letter-spacing: 0.03em; color: var(--ink-2); }
.panel small { font: 500 0.75rem var(--f-body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.note { margin: -2px 0 10px; color: var(--ink-2); font-size: 0.86rem; max-width: 62ch; }
.empty { margin: 0; color: var(--muted); font-size: 0.88rem; }
.err { margin: 0; color: var(--serious); font-size: 0.86rem; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* Warnungen */
.warn {
  display: grid; gap: 3px;
  padding: 9px 11px 10px;
  border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.warn[data-level="4"] { border-left-color: var(--crit); background: color-mix(in srgb, var(--crit) 12%, var(--surface)); }
.warn[data-level="3"] { border-left-color: var(--serious); }
.warn[data-level="2"] { border-left-color: var(--warn); }
.warn-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font: 700 0.7rem var(--f-body); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 999px; color: #0a1114; background: var(--muted);
}
.pill[data-level="4"] { background: var(--crit); color: #fff; }
.pill[data-level="3"] { background: var(--serious); }
.pill[data-level="2"] { background: var(--warn); }
.pill[data-level="1"] { background: var(--good); color: #fff; }
.pill.ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.warn-title { font: 600 1.05rem var(--f-cond); }
.warn-zone { font-size: 0.8rem; color: var(--muted); }
.warn-time { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-2); }
.warn-desc { margin: 2px 0 0; font-size: 0.9rem; }
.warn-es { margin: 0; font-size: 0.78rem; color: var(--muted); }
details.more summary { cursor: pointer; color: var(--muted); font-size: 0.8rem; }
details.more p { margin: 4px 0 0; font-size: 0.82rem; color: var(--ink-2); }

/* Karten-Kacheln */
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.card { min-width: 0; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card .c-name { font: 600 0.78rem var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card .c-big { font: 600 1.5rem/1.15 var(--f-cond); }
.card .c-wx { font-size: 0.85rem; color: var(--ink-2); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 6px 0 0; font-size: 0.8rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* Tabellen */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 600 0.7rem var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
td.num, th.num { text-align: right; }
td .sub { display: block; font-size: 0.75rem; color: var(--muted); }
tr.hl td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lvl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--good); vertical-align: 1px; }
.lvl-dot[data-level="1"] { background: var(--warn); }
.lvl-dot[data-level="2"] { background: var(--serious); }
.lvl-dot[data-level="3"] { background: var(--crit); }
.lvl-dot[data-level="-1"] { background: var(--muted); }
.bar { position: relative; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--good); }
.bar i[data-level="1"] { background: var(--warn); }
.bar i[data-level="2"] { background: var(--serious); }
.bar i[data-level="3"] { background: var(--crit); }

/* Ortswahl */
.seg { display: inline-flex; gap: 0; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); position: relative; }

/* Diagramme */
figure.chart { margin: 12px 0 0; }
figure.chart figcaption { font-size: 0.82rem; color: var(--ink-2); margin-bottom: 4px; }
.chart-box { position: relative; height: 190px; }
.chart-box.small { height: 130px; }

/* Verkehr, Hilfe */
.list { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.item:last-child { border-bottom: 0; }
.item .ic { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.item .ic svg { width: 15px; height: 15px; fill: var(--ink-2); }
.item .t { font-weight: 600; }
.item .s { font-size: 0.8rem; color: var(--muted); }
.item .r { text-align: right; font-size: 0.8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.item[data-cat="weather"] .ic, .item[data-cat="closure"] .ic { border-color: var(--serious); }
.item[data-cat="weather"] .ic svg, .item[data-cat="closure"] .ic svg { fill: var(--serious); }
.item[data-cat="accident"] .ic { border-color: var(--warn); }
.item[data-cat="accident"] .ic svg { fill: var(--warn); }
.toggle-works { margin-top: 8px; }
.sos { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--radius); background: color-mix(in srgb, var(--crit) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--crit) 45%, var(--line)); font-size: 0.88rem; }
.sos-num { font: 700 2rem/1 var(--f-cond); color: #fff; user-select: all; }

/* Webcams */
.camgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cam { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cam img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.cam span { display: block; padding: 5px 8px; font-size: 0.82rem; }

/* Vorsorge */
.prep-group { margin-bottom: 10px; }
.prep-group h3 { margin-top: 6px; }
.prep { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 0.9rem; cursor: pointer; }
.prep input { margin-top: 3px; accent-color: var(--good); flex: none; }
.prep input:checked + span { color: var(--muted); text-decoration: line-through; }

/* Links, Quellen */
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 0.88rem; }
.links .lg { grid-column: 1 / -1; margin-top: 6px; font: 600 0.7rem var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sources { display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; }
.src { display: flex; gap: 8px; align-items: baseline; }
.src .d { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; transform: translateY(-1px); }
.src[data-ok="true"] .d { background: var(--good); }
.src[data-ok="false"] .d { background: var(--serious); }
.src .n { color: var(--ink-2); }
.src .w { margin-left: auto; color: var(--muted); font-family: var(--f-mono); font-size: 0.75rem; text-align: right; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btnrow button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------- Leaflet-Anpassungen ---------- */
.leaflet-container { font: 13px/1.4 var(--f-body); background: #0b1316; }
.leaflet-pane.leaflet-sat-pane { mix-blend-mode: screen; }
.leaflet-popup-content-wrapper, .leaflet-tooltip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-tooltip-top::before { border-top-color: var(--line); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--line); }
.leaflet-tooltip-left::before { border-left-color: var(--line); }
.leaflet-tooltip-right::before { border-right-color: var(--line); }
.leaflet-control-attribution { background: rgba(10, 17, 20, 0.75) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--surface-2); color: var(--ink); }
.pop h4 { margin: 0 0 4px; font: 600 1rem var(--f-cond); }
.pop p { margin: 2px 0; }
.pop .muted { color: var(--muted); font-size: 0.8rem; }
.pop img { width: 260px; max-width: 100%; border-radius: 4px; display: block; margin: 4px 0; }
.wind-ic svg { overflow: visible; filter: drop-shadow(0 0 1.5px rgba(0,0,0,0.9)); }
.mk { display: grid; place-items: center; border-radius: 6px; border: 1.5px solid var(--bg); box-shadow: 0 0 0 1px rgba(255,255,255,0.25); font: 700 10px/1 var(--f-body); color: #0a1114; }
.mk svg { width: 13px; height: 13px; fill: currentColor; }
.dotlbl { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.dotlbl i { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 1.5px solid #0a1114; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.dotlbl span { font: 600 12px/1 var(--f-cond); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 0 1px #000; }
.dotlbl.sq { flex-direction: row-reverse; justify-content: flex-start; }
.dotlbl.sq i { border-radius: 3px; }
.val-label { font: 600 11px/1 var(--f-cond); color: var(--ink); text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; }
.strike-new { animation: flash 1.2s ease-out 1; }
@keyframes flash { from { stroke-width: 8; } to { stroke-width: 1.5; } }

/* ---------- Schmal ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .layout { display: block; height: auto; }
  .mapcol { border-right: 0; }
  .mapview { height: 68vh; flex: none; }
  .side { overflow: visible; }
  .jump { top: 0; }
  .layerbox { width: 230px; }
  .layerbox:not([open]) { width: auto; }
}
@media (max-width: 760px) {
  .legend { display: none; }
  .layerbox { max-height: calc(100% - 150px); width: 200px; }
  .camcard { width: 170px; }
  .cc-foot { display: none; }
}
@media (max-width: 620px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 span { display: block; margin: 2px 0 0; font-size: 1rem; }
  .cards3 { grid-template-columns: minmax(0, 1fr); }
  .camgrid, .links { grid-template-columns: minmax(0, 1fr); }
  .timeline { bottom: 16px; }
  .legend { display: none; }
  .tl-time { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .side { scroll-behavior: auto; }
  .strike-new { animation: none; }
}

/* Radar-Legende und Zeitleisten-Bänder (Ergänzung) */
.tl-band.compo { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.dbz { display: grid; grid-template-columns: repeat(11, 1fr); height: 9px; border-radius: 3px; overflow: hidden; margin: 4px 0 2px; }
.dbz span { display: block; }
.lgd-note { margin-top: 2px; font-size: 0.72rem; color: var(--muted); }

/* Live-Webcams (Player des Betreibers) */
.cc-live { aspect-ratio: 16 / 9; background: #000; }
.cc-live iframe, .ct-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.ct-frame { aspect-ratio: 16 / 9; background: #000; }
.cc-foot a, .ct-sub a { color: var(--accent); }
.live-pill { background: var(--crit); color: #fff; padding: 1px 6px; font-size: 0.62rem; vertical-align: 2px; }
@media (min-width: 1200px) { .camtile.live { grid-column: span 2; } }
.placesel { font-weight: 600; padding: 5px 8px; min-width: 9.5em; }
.lgd-img { display: block; max-width: 100%; margin-top: 3px; }
