:root {
  --bg: #07090c; --flaeche: #0e1318; --flaeche2: #141b22; --linie: #1f2a33; --text: #d7e3ea; --leise: #7f93a1;
  --cyan: #22d3ee; --rot: #f43f5e; --orange: #fb923c; --gelb: #facc15; --gruen: #34d399; --lila: #c084fc; --blau: #60a5fa;
  --mono: ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { display: flex; flex-direction: column; overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
a { color: var(--cyan); }

#kopf { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: linear-gradient(#0c1116, #090c10); border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.marke { font-family: var(--mono); letter-spacing: .12em; font-size: 13px; color: var(--leise); display: flex; align-items: center; gap: 8px; }
.marke b { color: var(--cyan); text-shadow: 0 0 10px rgba(34, 211, 238, .45); }
.marke .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.live { font-family: var(--mono); font-size: 12px; color: var(--rot); display: flex; align-items: center; gap: 6px; }
.live #uhr { color: var(--text); }
.livepunkt { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); animation: puls 1.4s infinite; }
@keyframes puls { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(244, 63, 94, .6); } 50% { opacity: .5; box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); } }
.zaehler { font-family: var(--mono); font-size: 12px; color: var(--leise); display: flex; gap: 14px; flex-wrap: wrap; }
.zaehler b { color: var(--text); font-weight: 600; }
.fenster { display: flex; border: 1px solid var(--linie); border-radius: 6px; overflow: hidden; margin-left: auto; }
.fenster button { background: transparent; border: 0; padding: 4px 10px; cursor: pointer; color: var(--leise); font-size: 12px; }
.fenster button.an { background: var(--cyan); color: #04131a; font-weight: 600; }
#suche { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: 5px 10px; width: 190px; }
#sprache, .knopf { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 12px; }
.knopf:hover { border-color: var(--cyan); }

main { flex: 1; display: flex; min-height: 0; }
#kartenbereich { flex: 1; position: relative; min-width: 0; }
#karte { position: absolute; inset: 0; background: #07090c; }
/* Quellen-Nennung (OSM/OpenFreeMap): hell auf dunkel, auch aufgeklappt lesbar */
.maplibregl-ctrl.maplibregl-ctrl-attrib, .maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact, .maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact-show { background: rgba(14, 19, 24, .95) !important; color: #c9d6de !important; font-size: 11px; border: 1px solid var(--linie); }
.maplibregl-ctrl-attrib *, .maplibregl-ctrl-attrib a { color: #c9d6de !important; }
.maplibregl-ctrl-attrib a:hover { color: var(--cyan) !important; }
.maplibregl-ctrl-attrib-button { background-color: #c9d6de !important; border-radius: 50%; }
#seite { width: 380px; border-left: 1px solid var(--linie); display: flex; flex-direction: column; background: var(--flaeche); min-height: 0; }
.reiter { display: flex; border-bottom: 1px solid var(--linie); }
.reiter button { flex: 1; background: transparent; border: 0; padding: 9px; cursor: pointer; color: var(--leise); font-size: 13px; border-bottom: 2px solid transparent; }
.reiter button.an { color: var(--cyan); border-bottom-color: var(--cyan); }
.liste { overflow-y: auto; flex: 1; }
.eintrag { padding: 9px 12px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.eintrag:hover { background: var(--flaeche2); }
.eintrag.frisch { animation: frisch 3s ease-out; }
@keyframes frisch { from { background: rgba(34, 211, 238, .22); } to { background: transparent; } }
.meta { font-family: var(--mono); font-size: 11px; color: var(--leise); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.titel { margin-top: 2px; }
.chip { font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); white-space: nowrap; }
.chip.cyan { border-color: rgba(34, 211, 238, .5); color: var(--cyan); }
.chip.rot { border-color: rgba(244, 63, 94, .55); color: var(--rot); }
.chip.orange { border-color: rgba(251, 146, 60, .55); color: var(--orange); }
.chip.gelb { border-color: rgba(250, 204, 21, .5); color: var(--gelb); }
.chip.lila { border-color: rgba(192, 132, 252, .5); color: var(--lila); }
.chip.gruen { border-color: rgba(52, 211, 153, .5); color: var(--gruen); }
.leer { padding: 16px; color: var(--leise); }

.ebenen { position: absolute; top: 10px; left: 10px; background: rgba(9, 12, 16, .88); border: 1px solid var(--linie); border-radius: 8px; font-size: 12px; max-width: 300px; z-index: 3; }
.ebenenkopf { width: 100%; display: flex; justify-content: space-between; gap: 12px; background: transparent; border: 0; padding: 7px 10px; cursor: pointer; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.ebenenkopf:hover { color: var(--text); }
.ebenen .pfeil { transition: transform .2s; }
.ebenen.zu .pfeil { transform: rotate(-90deg); }
.ebenen.zu #ebenenInhalt { display: none; }
#ebenenInhalt { display: flex; flex-direction: column; gap: 4px; padding: 0 10px 9px; }
.ebenen .legendtext { color: var(--leise); font-size: 11px; border-top: 1px solid var(--linie); margin-top: 5px; padding-top: 6px; line-height: 1.5; }
.ebenen label { display: flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.ebenen .farbe { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ebenen .anzahl { color: var(--leise); font-family: var(--mono); font-size: 11px; margin-left: auto; padding-left: 8px; }
.zoom { position: absolute; bottom: 14px; left: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.seiteknopf { position: absolute; top: 10px; right: 10px; z-index: 4; width: 30px; height: 30px; background: rgba(9, 12, 16, .9); border: 1px solid var(--linie); border-radius: 6px; cursor: pointer; }
.seiteknopf:hover, .zoom button:hover { border-color: var(--cyan); }
main.seite-zu #seite { display: none; }
.zoom button { width: 30px; height: 30px; background: rgba(9, 12, 16, .9); border: 1px solid var(--linie); border-radius: 6px; cursor: pointer; }
.tip { position: absolute; pointer-events: none; background: rgba(9, 12, 16, .95); border: 1px solid var(--linie); border-radius: 6px; padding: 6px 9px; font-size: 12px; max-width: 320px; z-index: 5; }

.popup { position: absolute; width: 380px; max-height: 70%; overflow-y: auto; background: rgba(12, 17, 22, .97); border: 1px solid rgba(34, 211, 238, .45); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(34, 211, 238, .12); z-index: 6; }
.popkopf { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: rgba(12, 17, 22, .98); }
.popkopf h3 { margin: 0; font-size: 14.5px; flex: 1; }
.popkopf button { background: transparent; border: 1px solid var(--linie); border-radius: 5px; cursor: pointer; padding: 1px 7px; }
.popinhalt { padding: 10px 12px; }
.zeile { margin: 6px 0; }
.hinweis { font-size: 11.5px; color: var(--leise); margin: 6px 0; }
.meldung { padding: 7px 0; border-top: 1px dashed var(--linie); }
.meldung .ue { color: var(--cyan); margin-top: 2px; }
.aktionen { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.aktionen button { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 12px; }
.aktionen button:hover { border-color: var(--cyan); }
.balken { height: 6px; border-radius: 3px; background: var(--flaeche2); overflow: hidden; margin-top: 3px; }
.balken > div { height: 100%; background: var(--cyan); }

#ticker { display: flex; align-items: center; border-top: 1px solid var(--linie); background: #080b0e; height: 30px; overflow: hidden; font-size: 12.5px; }
.tickerlabel { font-family: var(--mono); color: #04131a; background: var(--cyan); padding: 0 10px; height: 100%; display: flex; align-items: center; font-weight: 700; letter-spacing: .1em; }
.tickerbahn { flex: 1; overflow: hidden; white-space: nowrap; }
#tickerinhalt { display: inline-block; white-space: nowrap; animation: lauf 160s linear infinite; }
#tickerinhalt:hover { animation-play-state: paused; }
#tickerinhalt span { margin-right: 36px; cursor: pointer; }
#tickerinhalt span b { color: var(--cyan); font-weight: 500; font-family: var(--mono); font-size: 11px; margin-right: 6px; }
@keyframes lauf { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.dossier { position: fixed; inset: 0; background: rgba(4, 6, 8, .94); z-index: 20; overflow-y: auto; }
.dossierkasten { max-width: 1200px; margin: 30px auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; }
.dossierkasten .popkopf { border-radius: 12px 12px 0 0; }
.dossierspalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dossierspalten > div { padding: 14px 18px; }
.dossierspalten > div + div { border-left: 1px solid var(--linie); }
.dossier h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
table.quellen { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.quellen td, table.quellen th { padding: 5px 8px; border-bottom: 1px solid var(--linie); text-align: left; }
.info p { margin: 8px 0; }

@media (max-width: 900px) {
  #seite { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 88vw); z-index: 8; box-shadow: -10px 0 30px rgba(0, 0, 0, .5); }
  main { position: relative; }
  .seiteknopf { right: 10px; }
  #suche { width: 140px; }
  .dossierspalten { grid-template-columns: 1fr; }
  .dossierspalten > div + div { border-left: 0; border-top: 1px solid var(--linie); }
  .popup { width: calc(100% - 20px); left: 10px !important; }
}

.recht { display: flex; gap: 10px; font-size: 11px; padding: 0 12px; flex-shrink: 0; align-items: center; background: var(--bg); }
.recht a { color: var(--leise); text-decoration: none; }
.recht a:hover { color: var(--cyan); }

/* Handy: Kopf in zwei kompakten Zeilen, Karte so groß wie möglich, Popup als Blatt von unten */
@media (max-width: 700px) {
  #kopf { gap: 6px 8px; padding: 6px 10px; }
  .zaehler, .live #uhr { display: none; }
  .marke { font-size: 12px; letter-spacing: .08em; }
  #quellenKnopf, #infoKnopf { order: 1; padding: 4px 8px; }
  #quellenKnopf { margin-left: auto; }
  .fenster, #suche, #sprache { order: 2; }
  .fenster { margin-left: 0; }
  .fenster button { padding: 5px 7px; }
  #suche { flex: 1; min-width: 0; width: auto; font-size: 16px; padding: 4px 8px; }
  .ebenen { max-width: calc(100% - 64px); font-size: 13px; }
  .ebenen label { padding: 3px 0; }
  .zoom { top: 58px; right: 10px; left: auto; bottom: auto; }
  .zoom #zplus, .zoom #zminus { display: none; }
  .zoom button, .seiteknopf { width: 38px; height: 38px; }
  .popup { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-height: 62vh; border-radius: 14px 14px 0 0; border-width: 1px 0 0; }
  #seite { width: 100vw; }
  .dossierkasten { margin: 0; border-radius: 0; min-height: 100%; }
  .dossierspalten > div { padding: 12px 14px; }
  .recht { gap: 8px; padding: 0 8px; }
  table.quellen { font-size: 11.5px; }
}

.messbeleg { margin: 8px 0; padding: 7px 9px; border: 1px solid rgba(253, 224, 71, .45); border-radius: 8px; background: rgba(253, 224, 71, .06); }
.messkopf { font-family: var(--mono); font-size: 11.5px; color: #fde047; letter-spacing: .05em; margin-bottom: 2px; }
.seitenlink { align-self: center; font-size: 12px; margin-left: 4px; }

.vorschlag { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--linie); display: flex; flex-direction: column; gap: 8px; }
.vfeld { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--leise); flex: 1; }
.vfeld input, .vfeld textarea { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 6px; padding: 7px 9px; color: var(--text); font-size: 14px; resize: vertical; }
.vfeld input:focus, .vfeld textarea:focus { outline: none; border-color: var(--cyan); }
.vzeile { display: flex; gap: 10px; flex-wrap: wrap; }
.vorschlag .knopf { align-self: flex-start; padding: 7px 14px; font-size: 13px; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wetterzahl { font-size: 30px; font-weight: 600; margin: 4px 0; }
