/* 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(300px, 360px);
  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); overflow-x: auto; scrollbar-width: none; }
.maptabs button { flex: none; }
.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, #shipsFrame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#windyFrame, #shipsFrame, #blitzFrame { top: 41px; height: calc(100% - 41px); }
#btMode button { font-size: 0.8rem; padding: 3px 9px; white-space: nowrap; }
#shipMode button { font-size: 0.8rem; padding: 3px 9px; white-space: nowrap; }
.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 { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 6px; padding: 2px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lb-cur { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 0.84rem var(--f-body); color: var(--ink); }
.lb-chev { flex: none; margin-left: auto; fill: var(--ink-2); transform: rotate(180deg); transition: transform 0.15s; }
.lb-head:hover .lb-chev, .lb-head:focus-visible .lb-chev { fill: var(--accent); }
.layerbox.closed { width: auto; max-width: calc(100% - 70px); padding: 5px 10px; overflow: hidden; }
.layerbox.closed .lb-head { margin: 0; min-height: 26px; }
.layerbox.closed .lb-cur { display: block; }
.layerbox.closed .lb-chev { transform: none; }
.layerbox.closed .lb-body { display: none; }
.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; overflow-y: auto; overscroll-behavior: contain;
  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 ---------- */
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; }
.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-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; }

/* 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; }
.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; }
  .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); }
  .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; }

/* Flugzeuge */
.air-ic { overflow: visible; }
.air-wrap { position: relative; width: 100%; height: 100%; }
.air-ic svg { display: block; overflow: visible; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 1px rgba(0, 0, 0, 1)); transition: transform 0.4s linear; }
.air-lbl { position: absolute; left: calc(100% + 3px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  font: 700 11px/1 var(--f-cond); letter-spacing: 0.02em; color: #fff; padding: 2px 4px; border-radius: 3px; background: rgba(10, 17, 20, 0.78); }
.presets button:last-child:nth-child(odd) { grid-column: span 2; }

.shipbar { gap: 8px; overflow-x: auto; scrollbar-width: none; }
.shipbar .hint { white-space: nowrap; }
.shipbar .hint:last-child { margin-left: auto; }
.sl-sub + .sl-sub { margin-top: 2px; }
.btnrow.tight { margin: 0; flex-wrap: nowrap; gap: 4px; }
.btnrow.tight .btn { white-space: nowrap; }
.gauge-chart { width: 280px; max-width: 100%; display: block; margin: 4px 0; border-radius: 4px; background: #fff; }

/* Starke Veränderungen: Wert und Pfeil farbig, je nach Stufe gelb, orange, rot */
.delta { display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 3px; font: 700 0.72rem var(--f-body); white-space: nowrap; color: var(--muted); }
.delta[data-level="1"] { color: #0a1114; background: var(--warn); }
.delta[data-level="2"] { color: #0a1114; background: var(--serious); }
.delta[data-level="3"] { color: #fff; background: var(--crit); }
.kpi[data-level="3"] .k-value, .stat[data-level="3"] .s-value, td.hot2 b, td.hot2 { color: var(--serious); }
.kpi[data-level="4"] .k-value, .stat[data-level="4"] .s-value, td.hot3 b, td.hot3 { color: #ff6b6b; }
td.hot1 { color: var(--warn); font-weight: 700; }
td.hot2, td.hot3 { font-weight: 700; }
.dotlbl span.hot1 { color: #0a1114; background: var(--warn); text-shadow: none; padding: 1px 3px; border-radius: 3px; }
.dotlbl span.hot2 { color: #0a1114; background: var(--serious); text-shadow: none; padding: 1px 3px; border-radius: 3px; }
.dotlbl span.hot3 { color: #fff; background: var(--crit); text-shadow: none; padding: 1px 3px; border-radius: 3px; }
.pre-note { margin: 6px 0 0; font-size: 0.74rem; color: var(--muted); }
.pre-note.custom { color: var(--warn); }

/* Schiffe */
.ship-ic svg { display: block; overflow: visible; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 1)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8)); }
.ship-ic .air-lbl { font-size: 11px; }
.ship-sw { box-shadow: 0 0 0 1.5px #fff; }
.lgd-note { margin-top: 4px; font-size: 11px; color: var(--muted, #9aa9ae); }

/* Orte als Stecknadel mit Namensschild; der Bezugsort größer und in Akzentfarbe */
.pin { position: relative; width: 100%; height: 100%; cursor: pointer; }
.pin svg { display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }
.pin-lbl { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 3px); white-space: nowrap;
  font: 700 12px/1 var(--f-cond); letter-spacing: 0.03em; color: #0a1114; background: #f3f6f7; padding: 3px 6px; border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.pin.ref .pin-lbl { background: var(--accent); font-size: 13px; }

/* Schiffe-Reiter: Karte links, Liste rechts (schmal: Liste unten) */
.shipwrap { position: absolute; top: 41px; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
#shipMap { min-height: 0; background: var(--bg); }
.shiplist { overflow-y: auto; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); font-size: 0.85rem; }
.sl-head { position: sticky; top: 0; z-index: 1; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sl-title { font: 600 0.95rem var(--f-cond); margin-bottom: 6px; }
.sl-types { display: flex; flex-wrap: wrap; gap: 4px; }
.sl-type { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; font: inherit; font-size: 0.75rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.sl-type:hover { border-color: var(--accent); }
.sl-type[aria-pressed="false"] { opacity: 0.45; text-decoration: line-through; }
.sl-type b { font-weight: 600; color: var(--ink-2); }
.sl-sub { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.sl-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 8px; width: 100%; padding: 6px 10px; font: inherit; text-align: left; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.sl-row:hover, .sl-row:focus-visible { background: rgba(108, 207, 220, 0.08); }
.sl-row .sw { grid-row: span 2; margin-top: 3px; }
.sl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-meta { font-size: 0.78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-empty { padding: 12px 10px; color: var(--muted); }
@media (max-width: 760px) {
  .shipwrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 40%; }
  .shiplist { border-left: 0; border-top: 1px solid var(--line); }
}

/* Farbverlauf der MTG-Blitzflächen (Blitze je 5 min und 2-km-Pixel), wie die EUMETSAT-Legende */
.lgd-ramp { height: 8px; border-radius: 2px; margin: 3px 0 2px; }
.li-ramp { background: linear-gradient(90deg, #fffbc4, #fdd27c 30%, #f99a3f 50%, #e8452a 70%, #b0001f 85%, #7a0026); }
.lgd-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-2); }

/* Blitze-Reiter: Auswertung rechts neben der Karte */
#btMap { min-height: 0; background: var(--bg); }
.btpanel { padding: 10px 12px; }
.btpanel > * + * { margin-top: 12px; }
.bt-status { padding: 8px 10px; border-left: 4px solid var(--good); border-radius: 4px; background: var(--surface-2, var(--bg)); }
.bt-status[data-level="4"] { border-left-color: var(--crit); background: color-mix(in srgb, var(--crit) 18%, var(--surface)); }
.bt-status[data-level="2"] { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.bt-head { font: 600 1.05rem var(--f-cond); margin-bottom: 2px; }
.bt-tab { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.bt-tab th, .bt-tab td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); text-align: right; }
.bt-tab th[scope="row"], .bt-tab thead th:first-child { text-align: left; font-weight: 500; color: var(--ink-2); }
.bt-tab thead th { font-weight: 500; color: var(--muted); font-size: 0.75rem; }
.bt-tab td { font-variant-numeric: tabular-nums; font-weight: 600; }
.bt-sec h4 { margin: 0 0 4px; font: 600 0.85rem var(--f-cond); color: var(--ink-2); }
.bt-sec p { margin: 2px 0; }
.bt-trend[data-k="closer"] b { color: var(--serious); }
.bt-trend[data-k="away"] b { color: var(--good); }
.bt-chart { position: relative; height: 110px; }
.btpanel .small { font-size: 0.72rem; margin-top: 2px; }
.bt-note { font-size: 0.72rem; color: var(--muted); }

/* Deckkraft-Regler im Ansicht-Kasten */
.op-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin: 6px 0 4px; font-size: 0.75rem; color: var(--ink-2); }
.op-row input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.op-row output { grid-row: 1; grid-column: 2; font-variant-numeric: tabular-nums; color: var(--muted); }

.lgd-warn { padding: 4px 6px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); font-size: 11px; line-height: 1.3; }

/* NINA: Texte mit Zeilenumbrüchen */
.warn .pre { white-space: pre-line; }
/* Soziale Medien: nachrangig, eingeklappt */
.panel.social > summary { cursor: pointer; font: 600 1rem var(--f-cond); color: var(--ink-2); list-style: revert; }
.panel.social > summary small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.panel.social .note { font-size: 0.78rem; color: var(--muted); margin: 6px 0 8px; }
.post { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 0.85rem; }
.post-head { font-size: 0.78rem; }
.post-name { font-weight: 600; color: var(--ink); }
.post-text { margin: 4px 0; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post-ext { margin: 2px 0; font-size: 0.78rem; overflow-wrap: anywhere; }
.post-foot { font-size: 0.75rem; }

/* ---------- Seiten im Hauptbereich (frühere Seitenleisten-Bereiche) ---------- */
.mapview.page { background: var(--bg); padding: 12px; }
/* Bereiche als Karten in Spalten: gleicht unterschiedlich hohe Bereiche aus, auf dem Handy eine Spalte */
.pagegrid { columns: 400px; column-gap: 12px; }
.pagegrid > .panel {
  break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 12px; min-width: 0;
  padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.pagegrid > .panel > h2 { padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.mapview.page > .note { margin: 0 2px 10px; }
.kpi[role="button"] { cursor: pointer; }
.kpi[role="button"]:hover, .kpi[role="button"]:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

/* ---------- Seitenleiste: nur Kurzinfos ---------- */
.side .panel { padding: 12px var(--gutter) 14px; }
.side .panel h2 { font-size: 1.05rem; }
.side .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brief-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 6px 8px; border-left: 3px solid var(--line); background: var(--surface); border-radius: 4px; font-size: 0.85rem; }
.brief-row .b-txt { min-width: 0; overflow-wrap: anywhere; }
.brief-row .b-time, .brief-row .muted { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.brief-row[data-level="4"] { border-left-color: var(--crit); }
.brief-row[data-level="3"] { border-left-color: var(--serious); }
.brief-row[data-level="2"] { border-left-color: var(--warn); }
#briefMore { margin-top: 8px; }

/* ---------- Meer gemessen ---------- */
.seaobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sea-st { padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sea-st[data-level="4"] { border-left-color: var(--crit); }
.sea-st[data-level="3"] { border-left-color: var(--serious); }
.sea-st[data-level="2"] { border-left-color: var(--warn); }
.sea-head { display: flex; flex-direction: column; }
.sea-name { font: 600 0.95rem var(--f-cond); }
.sea-head .muted { font-size: 0.72rem; }
.sea-val b { font: 600 1.3rem var(--f-cond); }
.sea-st .small { font-size: 0.75rem; }
@media (max-width: 980px) {
  .mapview.page { height: auto; min-height: 40vh; }
}

/* Social Media als eigener Reiter: Beiträge als Raster */
#tab-social .panel { border-bottom: 0; }
.postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; align-items: start; }
#socialQueries { font-size: 0.75rem; }

/* Verkehrskarte im Reiter Straßen & Hilfe */
.ic-mini { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; }
.ic-mini svg { width: 11px; height: 11px; fill: #0a1114; }
.item.clickable { cursor: pointer; }
.item.clickable:hover, .item.clickable:focus-visible { background: rgba(108, 207, 220, 0.08); }
.pop img { width: 280px; max-width: 100%; }

/* ---------- Fachkarten in den Reitern ---------- */
.tabmap { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.tabmap[hidden] { display: none; }
.tm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tm-title { font: 600 1.05rem var(--f-cond); letter-spacing: 0.02em; }
.tm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; font-size: 0.75rem; color: var(--ink-2); }
.tm-legend .muted { font-size: 0.72rem; }
.tm-hint { font-size: 0.75rem; color: var(--muted); }
.tm-touch { display: none; font-size: 0.72rem; color: var(--muted); }
@media (hover: none) { .tm-touch { display: inline; } }
.tm-map { height: clamp(280px, 46vh, 560px); background: var(--bg); }
.pin-lbl small { display: block; font: 600 10px/1.1 var(--f-body); letter-spacing: 0; margin-top: 1px; color: #29373c; }
.wind-ic .wa { position: relative; width: 100%; height: 100%; }
.wind-ic svg { display: block; overflow: visible; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9)); }
.wa-lbl { position: absolute; left: calc(100% + 1px); top: 50%; transform: translateY(-50%); font: 700 11px/1 var(--f-cond); color: #fff; background: rgba(10, 17, 20, 0.8); padding: 2px 4px; border-radius: 3px; white-space: nowrap; }
.camtile.flash { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline-color 0.3s; }
.mapview.page .camwall { padding: 0; }
@media (max-width: 620px) {
  .mapview.page { padding: 8px; }
  .pagegrid > .panel { padding: 12px 12px 14px; }
  .tm-map { height: 50vh; min-height: 260px; }
  .tm-bar { padding: 6px 10px; }
}

/* ---------- Seitenleiste: Kennzahlen als kompakte Zeilen, Quellen eingeklappt ---------- */
.side #briefList.stack { gap: 5px; }
.side .statgrid { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.side .stat {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "sub value" "spark spark";
  column-gap: 10px; row-gap: 1px; padding: 6px 10px 7px; border-left-width: 3px;
}
.side .stat .k-label { grid-area: label; }
.side .stat .s-value { grid-area: value; align-self: center; text-align: right; white-space: nowrap; font-size: 1.25rem; }
.side .stat .k-sub { grid-area: sub; font-size: 0.72rem; }
.side .stat .spark { grid-area: spark; margin-top: 3px; max-height: 18px; }
.side-src > summary { cursor: pointer; font: 600 1.05rem var(--f-cond); list-style: revert; }
.side-src > summary small { font: 500 0.75rem var(--f-body); color: var(--good); margin-left: 6px; }
.side-src > summary small.bad { color: var(--crit); }
.side-src[open] > summary { margin-bottom: 8px; }

/* ---------- Seitenleiste: Übersicht passend zum Reiter ---------- */
.side-ctx h3 { margin: 12px 0 5px; font: 600 0.82rem var(--f-cond); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.side-ctx h3:first-child { margin-top: 0; }
.ctx { display: flex; flex-direction: column; gap: 3px; }
.ctx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 8px; border-left: 3px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 0.84rem; }
.ctx-row .c-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ctx-row .c-v { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.ctx-row[data-level="4"] { border-left-color: var(--crit); }
.ctx-row[data-level="3"] { border-left-color: var(--serious); }
.ctx-row[data-level="2"] { border-left-color: var(--warn); }
.ctx-row[role="button"] { cursor: pointer; }
.ctx-row[role="button"]:hover, .ctx-row[role="button"]:focus-visible { background: rgba(108, 207, 220, 0.1); }
.side-ctx .small { font-size: 0.72rem; margin: 4px 0 0; }
#airMap { min-height: 0; background: var(--bg); }

/* ---------- Kurzlage als Leiste unter den Kacheln ---------- */
.briefbar { display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter) 8px; }
.bb-title { flex: none; font: 600 0.85rem var(--f-cond); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.bb-title small { font: 500 0.75rem var(--f-body); text-transform: none; letter-spacing: 0; color: var(--muted); }
.bb-list { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bb-list::-webkit-scrollbar { display: none; }
.briefbar .brief-row { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; font-size: 0.8rem; white-space: nowrap; }
.briefbar .brief-row .b-txt { overflow-wrap: normal; }
.briefbar .empty { margin: 0; font-size: 0.8rem; }
#briefMore { flex: none; margin: 0; }
@media (max-width: 620px) {
  .briefbar { flex-wrap: wrap; gap: 6px 8px; }
  .bb-list { order: 3; flex-basis: 100%; }
}

.hdr-actions { display: flex; align-items: center; gap: 8px; }
.refreshbtn { display: inline-flex; align-items: center; gap: 6px; }
.rf-ic { flex: none; fill: currentColor; }
.refreshbtn[aria-busy="true"] .rf-ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tbl-wrap th { white-space: nowrap; }
/* Reiterleiste: Verlauf am Rand zeigt, dass es seitlich weitergeht */
.maptabs.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.maptabs.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
.maptabs.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

/* Handy: Kopfbereich kompakter, damit die Reiter früher beginnen */
@media (max-width: 620px) {
  .brand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
  .brand .meta { display: contents; }
  .brand h1 { grid-column: 1; grid-row: 1; }
  .brand #clock { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; font-size: 0.78rem; color: var(--ink-2); text-align: right; }
  .brand .meta > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #regionSel { grid-column: 1; grid-row: 2; width: 100%; min-width: 0; }
  #placeSel { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; }
  #langSeg { grid-column: 1; grid-row: 3; justify-self: start; }
  .hdr-actions { grid-column: 2; grid-row: 3; justify-self: end; }
  .rf-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .refreshbtn { padding-left: 10px; padding-right: 10px; }
  .rf-ic { width: 16px; height: 16px; }
  /* Reiterleiste bleibt beim Scrollen oben */
  .maptabs { position: sticky; top: 0; z-index: 1200; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .kpis { gap: 6px; }
  .kpi { padding: 6px 9px 7px; min-height: 0; }
  .kpi .k-spark { display: none; }
  .kpi .k-value { font-size: 1.2rem; }
  .kpi .k-sub { font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand .meta { gap: 6px; }
}

/* ---------- Push-Hinweise ---------- */
.pushbtn { display: inline-flex; align-items: center; gap: 6px; }
.pb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pushbtn[data-on="true"] .pb-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
.pushdlg { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.pushdlg::backdrop { background: rgba(0, 0, 0, 0.6); }
.pd-body { padding: 14px 18px 18px; overflow-y: auto; }
.pd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pd-head h2 { margin: 0; font: 600 1.2rem var(--f-cond); }
.pd-body h3 { margin: 14px 0 6px; font: 600 0.9rem var(--f-cond); letter-spacing: 0.03em; color: var(--ink-2); }
.pd-links { margin: 4px 0; font-size: 0.85rem; }
.pd-topic { display: flex; gap: 6px; }
.pd-topic input { flex: 1; min-width: 0; font: 500 0.85rem var(--f-mono, monospace); padding: 6px 8px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.linkbtn { padding: 0; font: inherit; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.pd-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 4px 0 10px; }
.pd-set { margin: 8px 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.pd-set legend { padding: 0 4px; font-size: 0.8rem; color: var(--ink-2); }
.pd-chk { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 8px; padding: 4px 0; font-size: 0.88rem; }
.pd-chk input { margin-top: 3px; }
.pd-x { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pd-chk select { padding: 2px 6px; font-size: 0.85rem; }
.pd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.pd-status { font-size: 0.8rem; color: var(--muted); }
.pd-status.bad { color: var(--crit); }
@media (max-width: 620px) { .pd-body { padding: 12px 12px 14px; } }

/* ---------- Live-Reiter: Karte mit Detailkarte, zuschaltbare Ebenen ---------- */
.mapcell { position: relative; min-height: 0; }
.mapcell > #airMap, .mapcell > #shipMap { position: absolute; inset: 0; }
.tgl { display: flex; gap: 4px; flex: none; }
.tgl label { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; font-size: 0.78rem; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.tgl label:has(input:checked) { border-color: var(--accent); color: var(--ink); }
.tgl input { margin: 0; accent-color: var(--accent); }
.detailcard { position: absolute; left: 10px; bottom: 10px; z-index: 1000; width: min(340px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto;
  background: color-mix(in srgb, var(--surface) 97%, transparent); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55); }
.detailcard[hidden] { display: none; }
.dc-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.dc-credit { padding: 3px 12px 0; font-size: 0.66rem; color: var(--muted); }
.dc-body { padding: 10px 12px 12px; }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dc-title { font: 600 1.2rem/1.1 var(--f-cond); }
.dc-sub { margin-top: 2px; font-size: 0.78rem; color: var(--ink-2); }
.dc-route { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; font: 600 1.15rem var(--f-cond); }
.dc-route small { display: block; font: 400 0.7rem var(--f-body); color: var(--muted); }
.dc-arrow { color: var(--accent); }
.dc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; margin: 8px 0 0; font-size: 0.82rem; }
.dc-grid dt { font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.dc-grid dd { margin: 1px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.dc-grid small { font-weight: 400; color: var(--muted); }
.dc-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 0.8rem; }
.sl-row.sel { background: rgba(108, 207, 220, 0.12); box-shadow: inset 3px 0 0 var(--accent); }
.alt-legend { margin-top: 6px; font-size: 0.72rem; }
@media (max-width: 760px) {
  .detailcard { left: 6px; right: 6px; bottom: 6px; width: auto; max-height: 75%; }
  .dc-photo img { aspect-ratio: 3 / 1; }
  #tab-air .shipwrap, #tab-ships .shipwrap { grid-template-rows: minmax(0, 1fr) 34%; }
}

/* Versorgung: Störungen, Netzlast, Störungsnummern, weitere Gefahren */
.sup-item { display: grid; gap: 2px; padding: 8px 10px 9px; margin-bottom: 6px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.sup-item:hover, .sup-item:focus-visible { border-color: var(--accent); border-left-color: var(--c, var(--accent)); outline: none; }
.sup-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.sup-head b { font: 600 1rem var(--f-cond); }
.sup-ic { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 4px; color: #0a1114; }
.sup-ic svg { width: 12px; height: 12px; fill: currentColor; }
.sup-ic .q-dot { width: 7px; height: 7px; border-radius: 50%; background: #0a1114; }
.sup-d { margin-left: auto; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.sup-place { font-size: 0.9rem; overflow-wrap: anywhere; }
.sup-info { margin: 2px 0 0; color: var(--ink-2); }
.sup-pop .sup-head { margin-bottom: 4px; }
.sup-pop .sup-place, .sup-pop .warn-time { margin-top: 2px; }
.ic-mini.round { border-radius: 50%; }
.grid-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.grid-now b { font: 700 2rem/1 var(--f-cond); }
.grid-now .pill[data-level="0"] { background: var(--surface-2); color: var(--ink-2); }
.util { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.util-n { min-width: 0; }
.util-n a { font-weight: 600; }
.util-tel { flex: none; font: 700 1.1rem var(--f-cond); white-space: nowrap; text-decoration: none; color: var(--ink); padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.util-tel:hover { border-color: var(--accent); }
#p-outages .post { margin-bottom: 6px; }
