:root { --purple:#76db9f; }
#map { background:#293947; touch-action:none; }
#map > svg { display:block; width:100%; height:100%; touch-action:none; user-select:none; cursor:grab; }
#map > svg.panning, #map > svg.panning path { cursor:grabbing; }
.warning-areas path { fill-opacity:var(--fill-opacity,.65); fill-rule:evenodd; stroke:#071c30; stroke-width:1.2px; vector-effect:non-scaling-stroke; cursor:pointer; outline:none; }
.warning-areas .l1 { fill:var(--yellow); }
.warning-areas .l2 { fill:var(--orange); }
.warning-areas .l3 { fill:var(--red); }
.warning-areas .l4 { fill:var(--purple); }
.warning-areas path:focus-visible { outline:none; stroke:#fff; stroke-width:3px; }
#map .maplibregl-canvas:focus-visible { outline-offset:-2px; }
#map .maplibregl-ctrl-bottom-right { bottom:37px; }
#map .maplibregl-ctrl-bottom-right:has(.maplibregl-compact-show) { z-index:6; }
#map .maplibregl-ctrl-attrib.maplibregl-compact-show {
  width:24px;
  min-height:24px;
  padding:0;
  background:transparent;
}
#map .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {
  left:auto;
  right:0;
  background-color:#eef6fa;
}
#map .maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
  position:absolute;
  right:0;
  bottom:calc(100% + 10px);
  box-sizing:border-box;
  width:min(440px,calc(100vw - 24px));
  max-height:40dvh;
  overflow:auto;
  overflow-wrap:anywhere;
  padding:10px 12px;
  border:1px solid #416788;
  border-radius:9px;
  background:#102a40;
  color:#e7f2fa;
  font-size:12px;
  line-height:1.55;
  text-align:left;
  box-shadow:0 6px 24px #071523ad;
}
#map .maplibregl-ctrl-attrib-inner a { color:#9bd9f8; text-decoration:underline; }
#map[data-basemap=street] ~ .bottom-meta .map-credits { display:none; }
.map-brand { position:absolute; z-index:2; bottom:44px; left:18px; width:clamp(130px,16vw,228px); height:auto; pointer-events:none; }
.status-pill.stale { background:#7d401e; color:#fff1d5; }
.last-update { display:block; margin-top:8px; }
.snapshot-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.snapshot-actions button { padding:5px 9px; background:#153958; color:var(--text); border:1px solid #42789a; border-radius:5px; }
#snapshot-feedback, #warning-credits { margin:4px 0 6px; color:#d1e7f9; font-size:12px; }
#warning-credits a { color:#9bd9f8; }
.sidebar details > summary {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  cursor:pointer; list-style:none; font-size:11px; font-weight:900;
  letter-spacing:1.1px; text-transform:uppercase;
}
.sidebar details > summary::-webkit-details-marker { display:none; }
.sidebar details > summary::after {
  content:""; width:7px; height:7px; border-right:2px solid var(--cyan);
  border-bottom:2px solid var(--cyan); transform:rotate(45deg); margin-right:3px;
}
.sidebar details[open] > summary::after { transform:rotate(225deg); }
.filter-actions { display:flex; justify-content:flex-end; margin-top:5px; }
.radar-options { display:grid; grid-template-columns:repeat(2, max-content); gap:3px 12px; }
.radar-options .satellite-option { grid-column:2; }
.satellite-badge { position:absolute; z-index:3; top:8px; right:8px; display:grid; gap:3px; padding:6px 9px; border:1px solid var(--border); border-radius:7px; background:#0a2943ed; color:var(--text); font-size:11px; pointer-events:none; }
.satellite-badge:has(~ .radar-strip:not([hidden])) { top:calc(var(--radar-strip-height) + 8px); }
.satellite-badge time { color:var(--muted); }
.satellite-panel label { display:block; margin:9px 0 5px; }
.satellite-panel select { width:100%; min-width:0; max-width:none; }
.satellite-panel .satellite-storm-option { display:flex; align-items:center; gap:6px; min-height:32px; }
.satellite-panel input { accent-color:var(--cyan); }
.satellite-playback { display:flex; align-items:center; gap:8px; margin-top:9px; }
.satellite-playback button { border:1px solid var(--border); border-radius:6px; background:#173953; color:var(--text); padding:7px 8px; white-space:nowrap; }
.satellite-playback input { flex:1; min-width:0; }
.map-wrap { --radar-strip-height:22px; }
.radar-strip { position:absolute; inset:0 0 auto; height:var(--radar-strip-height); background:#123049; }
.radar-strip:not([hidden]) + #map { top:var(--radar-strip-height); }
.radar-strip .radar-scale { position:absolute; inset:0; align-items:center; padding:0 10px; }
.radar-strip span, .radar-strip time {
  color:#edf7ff; background:#0b2238; border-radius:9px; font-size:10px;
  font-weight:750; line-height:17px; padding:0 7px; white-space:nowrap;
}
.radar-strip time { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
.lightning-key { display:grid; gap:5px; list-style:none; padding:0; margin:12px 0 0; }
.lightning-key li { display:flex; gap:9px; align-items:center; font-size:12px; color:#d5e7f5; }
.lightning-key i { width:10px; height:10px; border-radius:50%; border:1px solid #142337; }
.winter-key i { border-radius:2px; }
.winter-rain { background:#17b04c; }
.winter-snow { background:#11c4ef; }
.winter-mix { background:repeating-linear-gradient(135deg,#ffdafa 0 1px,#f477cc 1px 3px); }
.winter-pellets { background:#f477cc; }
.winter-freezing { background:#fed088; }
@media(max-width:1100px) {
  .legend { bottom:104px; }
  .zoom-controls { bottom:154px; }
}
@media(max-width:760px) {
  .sidebar:not(.open) { visibility:hidden; }
  .map-brand { left:9px; bottom:40px; width:127px; }
  .legend { bottom:88px; }
  .zoom-controls { bottom:128px; }
  .header {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    height:auto;
    padding:7px 9px;
    gap:4px 8px;
  }
  .header-center { display:flex; justify-self:end; }
  .header-actions { grid-row:2; grid-column:1; min-width:0; }
  .header-radar { grid-row:2; grid-column:2; gap:4px; }
  .header-radar label, .header-radar button { min-height:40px; }
  .header-radar .radar-options label { min-height:23px; }
  #country { width:min(112px,28vw); min-width:0; }
  .status-pill { padding:4px 7px; font-size:8px; }
  .snapshot-actions { gap:4px; font-size:11px; }
}
@media(max-width:440px) {
  .header-radar { grid-column:1 / -1; grid-row:3; justify-content:flex-end; }
  .header-radar label, .header-radar button { min-height:34px; }
}
