/* StormAlert Polska 6 — interfejs aplikacji */
:root {
  color-scheme: dark;
  --bg: #0a141d;
  --surface: #0f1d29;
  --surface-2: #142635;
  --surface-3: #1a3043;
  --glass: rgba(12, 24, 35, .9);
  --line: rgba(150, 190, 220, .13);
  --line-2: rgba(150, 190, 220, .22);
  --text: #e9f2f7;
  --text-2: #c3d3de;
  --muted: #8aa1b1;
  --faint: #647d8e;
  --accent: #3fb6ff;
  --accent-ink: #04121d;
  --accent-soft: rgba(63, 182, 255, .14);
  --teal: #2fe0c0;
  --danger: #ff5a6a;
  --danger-2: #d93b4d;
  --warn: #ffb547;
  --ok: #3ddc97;
  --lvl1: #f5d443;
  --lvl2: #ff9636;
  --lvl3: #ff4b55;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .28);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --top-h: 60px;
  --bar-h: 50px;
  --side-w: 390px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fine { color: var(--muted); font-size: 12px; margin: 8px 0 0; line-height: 1.5; }

/* ---------- Przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 11px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #6cc7ff; }
.btn-danger { background: linear-gradient(180deg, #ff6576, var(--danger-2)); color: #fff; box-shadow: 0 6px 18px rgba(255, 70, 90, .25); }
.btn-danger:hover { filter: brightness(1.07); }
.btn .btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.busy .btn-spinner { display: inline-block; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text-2); }
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.icon-btn-lg { width: 42px; height: 42px; border-radius: 12px; }
[data-locate].busy .i { animation: pulse 1s ease-in-out infinite; color: var(--accent); }

/* ---------- Układ ---------- */
.app { display: grid; grid-template-rows: var(--top-h) var(--bar-h) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.topbar { display: grid; grid-template-columns: auto minmax(0, 560px) 1fr; align-items: center; gap: 16px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 1100; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand img { border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Wyszukiwarka */
.search { position: relative; height: 40px; }
.search input { width: 100%; height: 100%; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 70px 0 40px; outline: none; font-size: 14.5px; transition: border-color .15s, background .15s; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: var(--accent); background: #10202d; }
.search input::placeholder { color: var(--faint); }
.search-ic { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search-kbd { position: absolute; right: 10px; top: 9px; font: 600 11px var(--font); color: var(--faint); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.search input:focus ~ .search-kbd, #searchClear:not([hidden]) ~ .search-kbd { display: none; }
#searchClear { position: absolute; right: 4px; top: 3px; border: 0; background: transparent; }
.search-spinner { position: absolute; right: 42px; top: 12px; width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; opacity: 0; animation: spin .8s linear infinite; }
.search.busy .search-spinner { opacity: 1; }
.search-results { position: absolute; top: 46px; left: 0; right: 0; max-height: min(420px, 70vh); overflow: auto; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); }
.search-results button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; }
.search-results button .i { color: var(--muted); }
.search-results button span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-results button small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results button em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }
.search-results button:hover, .search-results button.active { background: var(--accent-soft); }
.search-results button.active .i { color: var(--accent); }
.search-empty { padding: 14px; color: var(--muted); text-align: center; }

/* Pasek warstw */
.layerbar { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1050; min-width: 0; }
.layerbar-scroll { flex: 1; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 6px 0; }
.layerbar-scroll::-webkit-scrollbar { display: none; }
.layerbar-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 6px; flex: none; }
.layerbar-label { color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-right: 2px; flex: none; }
.chips { display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; transition: background .15s, color .15s, border-color .15s; }
.chip .i { width: 16px; height: 16px; color: var(--muted); }
.chip:hover { background: rgba(255,255,255,.05); color: var(--text); }
.chip.active { background: var(--accent-soft); border-color: rgba(63,182,255,.5); color: #d9f0ff; }
.chip.active .i { color: var(--accent); }
.chip-radar.active { background: rgba(47, 224, 192, .13); border-color: rgba(47, 224, 192, .5); color: #d5fff6; }
.chip-radar.active .i { color: var(--teal); }
.chip .chev { width: 14px; height: 14px; }
.model-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; flex: none; }
.model-select select, .popover select { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 8px; }
.menu { position: fixed; z-index: 1200; width: 240px; max-height: 60vh; overflow: auto; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--text-2); }
.menu-item .i { color: var(--muted); width: 16px; height: 16px; }
.menu-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.menu-item.active { background: var(--accent-soft); color: #d9f0ff; }
.menu-item.active .i { color: var(--accent); }

.workspace { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 0; }

/* ---------- Panel boczny ---------- */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; z-index: 1000; }
.sheet-handle { display: none; }
.sidebar-scroll { overflow-y: auto; padding: 16px 16px 24px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.place { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.place-text { flex: 1; min-width: 0; }
.place h1 { margin: 0; font-size: 21px; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.place p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card-title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.card-title small { margin-left: auto; color: var(--faint); font-weight: 600; letter-spacing: 0; text-transform: none; }
.card-title .count:not(:empty) { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.section-title .i { width: 16px; height: 16px; color: var(--warn); }

.current { background: linear-gradient(160deg, #173049 0%, #122536 60%, #10202e 100%); }
.now { display: flex; align-items: center; gap: 10px; }
.now-icon { flex: none; }
.now-main { min-width: 0; }
.now-temp { font-size: 52px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.now-desc { font-size: 16px; font-weight: 600; margin-top: 4px; }
.now-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.035); min-width: 0; }
.stat > .i { color: var(--accent); width: 17px; height: 17px; }
.stat div { display: flex; flex-direction: column; min-width: 0; }
.stat small { color: var(--muted); font-size: 11.5px; }
.stat b { font-size: 14px; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.stat em { font-style: normal; color: var(--faint); font-size: 11px; }
.wind-arrow { width: 13px; height: 13px; color: var(--teal); }

.warnings:empty, .risks:empty { display: none; }
.warnings, .risks { margin-bottom: 12px; }
.warn-none { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px; background: rgba(61, 220, 151, .08); border: 1px solid rgba(61, 220, 151, .22); color: #bdf3da; font-size: 13px; }
.warn-none .i { color: var(--ok); }
.warn { border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 8px; overflow: hidden; border-left: 4px solid var(--lvl1); }
.warn.lvl-2 { border-left-color: var(--lvl2); }
.warn.lvl-3 { border-left-color: var(--lvl3); }
.warn summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.warn summary::-webkit-details-marker { display: none; }
.warn summary div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.warn summary small { color: var(--muted); font-size: 12px; }
.warn .chev { color: var(--muted); transition: transform .2s; }
.warn[open] .chev { transform: rotate(180deg); }
.warn p { margin: 0 12px 10px; color: var(--text-2); font-size: 13px; }
.warn-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-weight: 800; color: #1a1400; background: var(--lvl1); flex: none; }
.lvl-2 .warn-badge { background: var(--lvl2); }
.lvl-3 .warn-badge { background: var(--lvl3); color: #fff; }
.risk { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 6px; }
.risk div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.risk small { color: var(--muted); font-size: 12px; }
.risk-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(245, 212, 67, .14); color: var(--lvl1); flex: none; }
.risk.lvl-2 .risk-ic { background: rgba(255, 150, 54, .15); color: var(--lvl2); }
.risk.lvl-3 .risk-ic { background: rgba(255, 75, 85, .16); color: var(--lvl3); }
.risk-lvl { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }

.hours { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.hour { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; text-align: center; }
.hour.now { background: var(--accent-soft); }
.hour small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.hour.now small { color: var(--accent); }
.hour b { font-size: 15px; }
.hour .pp { display: flex; align-items: center; gap: 1px; color: var(--faint); font-size: 11px; }
.hour .pp .i { width: 11px; height: 11px; }
.hour .pp.hi { color: #7cc9ff; }
.hour .mm { color: #7cc9ff; font-size: 10.5px; min-height: 15px; }
.hour .wd { color: var(--faint); font-size: 10.5px; }

.days { display: flex; flex-direction: column; }
.day { display: grid; grid-template-columns: 62px 34px 44px 1fr; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day-name { display: flex; flex-direction: column; }
.day-name small { color: var(--faint); font-size: 11px; }
.day-pp { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--faint); }
.day-pp .i { width: 12px; height: 12px; }
.day-pp.hi { color: #7cc9ff; }
.day-range { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; font-weight: 600; }
.day-range span:first-child { color: var(--muted); text-align: right; }
.day-range .bar { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); }
.day-range .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }

.reports-list { display: flex; flex-direction: column; gap: 6px; }
.report-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.02); text-align: left; width: 100%; }
.report-item:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
.report-item div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.report-item small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 90, 106, .14); color: #ff8a96; flex: none; }
.rep-ic .i { width: 17px; height: 17px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge.ok { background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .35); color: #9ff0c9; }
.badge.warn { background: rgba(255, 181, 71, .12); border-color: rgba(255, 181, 71, .35); color: #ffd699; }
.empty-state { text-align: center; color: var(--muted); padding: 10px; }
.empty-state .i { width: 28px; height: 28px; color: var(--warn); }
.sidebar-foot { color: var(--faint); font-size: 11.5px; padding: 4px 2px; }
.sidebar-foot p { margin: 0 0 6px; }
.sidebar-foot a { color: var(--muted); }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk-current { height: 190px; }
.sk-row { height: 120px; }
.sk-line { height: 34px; margin-bottom: 8px; }

/* Ikony pogody */
.wx { flex: none; overflow: visible; }
.wx-sun circle { fill: #ffc93c; }
.wx-rays line { stroke: #ffc93c; stroke-width: 3; stroke-linecap: round; }
.wx-moon { fill: #dfe7f5; }
.wx-cloud { fill: #e8eef4; }
.wx-cloud-back { fill: #9fb2c2; }
.wx-cloud-dark { fill: #aebdca; }
.wx-drop { stroke: #52b9ff; stroke-width: 3.2; stroke-linecap: round; }
.wx-drop-light { stroke-width: 2.4; }
.wx-flake line { stroke: #cfeaff; stroke-width: 2; stroke-linecap: round; }
.wx-bolt { fill: #ffd23f; stroke: #ffd23f; stroke-width: 1; stroke-linejoin: round; }
.wx-fog line { stroke: #c7d3dd; stroke-width: 3.2; stroke-linecap: round; }

/* ---------- Scena mapy ---------- */
.stage { position: relative; min-width: 0; min-height: 0; background: #0d1a24; }
.map-wrap, .windy-wrap { position: absolute; inset: 0; }
.map { position: absolute; inset: 0; background: #0e1a24; }
html[data-basemap="light"] .map { background: #dfe6ea; }
.radar-frame { transition: opacity .28s linear; }
.leaflet-container { font: 13px var(--font); }
.leaflet-control-attribution { background: rgba(10, 20, 29, .72) !important; color: var(--muted) !important; font-size: 10.5px !important; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
html[data-basemap="light"] .leaflet-control-attribution { background: rgba(255,255,255,.8) !important; color: #334 !important; }
html[data-basemap="light"] .leaflet-control-attribution a { color: #124 !important; }

.map-tools { position: absolute; top: 12px; right: 12px; z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.tool-group { display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; backdrop-filter: blur(10px); }
.tool { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); }
.tool + .tool { border-top: 1px solid var(--line); }
.tool:hover { background: rgba(255,255,255,.07); color: var(--text); }
.tool[aria-expanded="true"] { color: var(--accent); }
.popover { position: absolute; top: 0; right: 50px; width: 270px; padding: 12px 14px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
.popover h3 { margin: 10px 0 8px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.popover h3:first-child { margin-top: 2px; }
.popover .row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.popover .row > span { display: flex; justify-content: space-between; }
.popover select { width: 100%; }
.seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; background: rgba(0,0,0,.25); border-radius: 10px; padding: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface-3); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.switch { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c9d6df; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }

.map-chip { position: absolute; top: 96px; left: 12px; z-index: 850; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); font-size: 12px; color: #ffe38a; box-shadow: var(--shadow-sm); }
.map-chip .i { width: 14px; height: 14px; }

.legend { position: absolute; left: 12px; top: 12px; z-index: 850; width: 230px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.legend-head { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.legend-head span:last-child { color: var(--teal); }
.legend-bar { height: 8px; border-radius: 4px; }
.legend-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.legend-source { font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.legend-source a { color: var(--muted); }

.timeline { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 860; width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.tl-buttons { display: flex; align-items: center; gap: 4px; }
.tl-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-2); }
.tl-btn:hover { background: rgba(255,255,255,.09); color: var(--text); }
.tl-play { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.tl-play:hover { background: #6cc7ff; color: var(--accent-ink); }
.tl-play .i { width: 20px; height: 20px; }
.tl-track { flex: 1; min-width: 0; position: relative; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.tl-time b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tl-time small { color: var(--muted); font-size: 12px; }
.tl-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tl-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tl-live.on { border-color: rgba(61,220,151,.45); color: #a9f2cf; }
.tl-live.on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(61,220,151,.2); animation: pulse 2s infinite; }
.tl-live.stale { border-color: rgba(255,181,71,.45); color: #ffd699; }
.tl-live.stale i { background: var(--warn); }
.timeline-slider, #tlSlider { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; cursor: pointer; --pct: 100%; }
.timeline-slider::-webkit-slider-runnable-track, #tlSlider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--pct), rgba(255,255,255,.12) var(--pct)); }
.timeline-slider::-moz-range-track, #tlSlider::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); }
.timeline-slider::-moz-range-progress, #tlSlider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.timeline-slider::-webkit-slider-thumb, #tlSlider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.timeline-slider::-moz-range-thumb, #tlSlider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.tl-ticks { position: relative; height: 14px; margin: 0 9px; }
.tl-ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-ticks span::before { content: ""; position: absolute; left: 50%; top: -5px; width: 1px; height: 4px; background: var(--line-2); }
.tl-message { position: absolute; inset: -4px 0; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 8px; color: var(--warn); font-size: 13px; text-align: center; }

/* Znaczniki */
.pin-wrap { background: none; border: 0; }
.pin { width: 34px; height: 42px; display: grid; place-items: start center; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.pin .i { width: 34px; height: 38px; fill: var(--accent); stroke: #fff; stroke-width: 1.4; }
.rmark-wrap { background: none; border: 0; }
.rmark { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ff5a6a; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.rmark .i { width: 17px; height: 17px; }
.rmark.sev-1 { background: #f2a93b; }
.rmark.sev-3 { background: #d6203a; }
.rmark.verified::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(61,220,151,.9); }
.rmark.model { border-radius: 9px; background: #7b61ff; }
.rmark i { position: absolute; right: -6px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: #111; font: 700 11px/18px var(--font); font-style: normal; text-align: center; }

.leaflet-popup.sa-popup .leaflet-popup-content-wrapper { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
.leaflet-popup.sa-popup .leaflet-popup-tip { background: var(--surface-2); }
.leaflet-popup.sa-popup .leaflet-popup-content { margin: 12px 14px; font: 13.5px/1.45 var(--font); }
.leaflet-popup.sa-popup a.leaflet-popup-close-button { color: var(--muted); top: 6px; right: 6px; }
.rpop-head { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
.rpop-head div { display: flex; flex-direction: column; }
.rpop-head small { color: var(--muted); font-size: 12px; }
.rpop p { margin: 8px 0 0; color: var(--text-2); }
.rpop-img img { display: block; width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-top: 10px; }
.rpop-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.rpop-confirm { margin-top: 10px; width: 100%; }
.sa-tip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font: 600 12.5px var(--font); box-shadow: var(--shadow-sm); }
.sa-tip::before { border-top-color: var(--surface-2) !important; }

/* ---------- Tryb prognozy godzinowej ---------- */
.windy-wrap { display: flex; flex-direction: column; background: var(--surface); }
.forecast-bar { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.forecast-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.forecast-info small { color: var(--muted); font-size: 12px; }
.forecast-hint { margin-left: auto; color: var(--faint); font-size: 12px; }
#windyOpen { margin-left: auto; }
.forecast-hint + #windyOpen { margin-left: 0; }
.windy-frame-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #111d26; }

.forecast-map { position: absolute; inset: 0; z-index: 1; background: #111d26; }
.forecast-map[hidden] { display: none !important; }
.forecast-map .leaflet-control-attribution { background: rgba(8,20,29,.74) !important; color: #8aa1b1 !important; font-size: 10px !important; }
.forecast-map .leaflet-control-attribution a { color: #c3d3de !important; }
.forecast-raster { transition: opacity .18s linear !important; will-change: opacity; }

/* Oryginalne mapy Windy. W embedzie dolny pasek jest wypchnięty poza viewport;
   w trybie Map Forecast API ukrywa go windy-map.html. Widoczny jest wyłącznie panel StormAlert. */
.windy-special-frame {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 100%; height: calc(100% + 96px); border: 0; background: #1a2530;
}
.windy-special-frame.is-api { height: 100%; }
.windy-special-frame[hidden] { display: none !important; }

.forecast-particles {
  position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%;
  pointer-events: none; opacity: .94; mix-blend-mode: screen;
}
.forecast-particles[hidden] { display: none !important; }

/* Legenda StormAlert jest dolnym paskiem bloku osi czasu (jeden wspólny panel).
   Natywny panel Windy pozostaje ukryty. Progi mają równą szerokość, podpisy leżą
   dokładnie pod swoim kolorem, a znacznik pokazuje wartość w centrum mapy. */
.forecast-legend {
  --c: #3fb6ff;
  flex: 1 0 100%; order: 10; display: flex; align-items: center; gap: 12px;
  margin: 2px -2px -2px; padding: 9px 2px 0;
  border-top: 1px solid rgba(150,190,220,.12);
  pointer-events: none; min-width: 0;
}
.forecast-legend[hidden] { display: none !important; }
.fl-head { flex: none; display: flex; align-items: center; gap: 8px; width: 150px; min-width: 0; }
.fl-icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.fl-icon .i { width: 15px; height: 15px; }
.fl-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.fl-title b { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-title small { font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-title small #forecastLegendUnit { color: var(--muted); font-weight: 700; }
.fl-title small #forecastLegendUnit:not([hidden]) + span::before { content: " · "; }
.fl-body { flex: 1; min-width: 0; padding: 0 2px; }
.fl-value {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(150,190,220,.18);
  color: var(--text); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fl-value::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
.fl-value[hidden] { display: none; }
.fl-scale { position: relative; }
.forecast-legend-bar {
  height: 9px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 1px 0 rgba(0,0,0,.25);
}
.fl-marker {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--c);
  border: 2.5px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.55);
  transition: left .25s ease, background-color .25s ease;
}
.fl-marker[hidden] { display: none; }
.forecast-legend-labels { position: relative; height: 13px; margin: 4px 0 0; color: #a8bac6; font-size: 9.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.forecast-legend-labels span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; line-height: 1; }
.forecast-legend-labels span.first { transform: none; }
.forecast-legend-labels span.last { transform: translateX(-100%); }

/* Pasek czasu: każda pozycja suwaka = dokładnie jedna godzina. */
.forecast-timeline {
  flex-wrap: wrap; row-gap: 8px;
  z-index: 875; bottom: 12px; width: min(820px, calc(100% - 28px)); min-height: 74px;
  padding: 10px 12px; gap: 12px; border-radius: 16px;
  background: rgba(8,20,29,.96); border: 1px solid rgba(150,190,220,.20);
  box-shadow: 0 10px 28px rgba(0,0,0,.34); backdrop-filter: blur(14px);
}
.forecast-timeline .tl-buttons { gap: 5px; }
.forecast-timeline .tl-btn { width: 36px; height: 36px; border-radius: 10px; transition: background .12s ease, transform .08s ease, border-color .12s ease; }
.forecast-timeline .tl-btn:active { transform: scale(.95); }
.forecast-timeline .tl-play { width: 44px; height: 44px; }
.forecast-timeline.playing .tl-play { box-shadow: 0 0 0 4px rgba(63,182,255,.13), 0 0 18px rgba(63,182,255,.22); }
.forecast-timeline .tl-track { min-width: 190px; }
.forecast-timeline .tl-head { margin: 0 0 1px; }
.forecast-timeline .tl-time { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.forecast-timeline .tl-time b { font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.forecast-timeline .tl-time small { font-size: 11px; white-space: nowrap; color: var(--muted); }
.forecast-timeline .tl-live { flex: none; }
.forecast-timeline .timeline-slider { height: 23px; touch-action: pan-x; }
.forecast-timeline .tl-ticks { height: 13px; margin: -1px 9px 0; overflow: visible; }
.forecast-timeline .tl-ticks span { font-size: 9px; white-space: nowrap; }
.forecast-timeline .tl-ticks span.now { color: #9ff0c9; font-weight: 800; }
.forecast-timeline.is-loading::after {
  content: "Aktualizacja mapy…"; position: absolute; right: 14px; top: -20px;
  padding: 2px 8px; border-radius: 999px; background: rgba(8,20,29,.9);
  color: var(--muted); font-size: 10px; letter-spacing: .02em;
}

.windy-loading { position: absolute; inset: 0; z-index: 890; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(10,20,29,.82); color: var(--text-2); text-align: center; padding: 20px; }
.windy-loading .when-slow { display: none; max-width: 420px; }
.windy-loading[data-state="slow"] .when-slow { display: block; }
.windy-loading[data-state="slow"] .when-loading { display: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
body[data-mode="forecast"] .hide-in-forecast { display: none; }

/* ---------- Okno zgłoszenia ---------- */
.modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(3, 9, 14, .66); backdrop-filter: blur(4px); }
.dialog { width: min(620px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .18s ease-out; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.dialog-head small { color: var(--muted); font-size: 12px; font-weight: 600; }
.dialog-head h2 { margin: 2px 0 0; font-size: 19px; letter-spacing: -.01em; }
.dialog-body { padding: 14px 18px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.report-loc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(63,182,255,.25); }
.report-loc > .i { color: var(--accent); }
.report-loc div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.report-loc small { color: var(--muted); font-size: 12px; }
fieldset { border: 0; padding: 0; margin: 14px 0 0; }
legend, .field > span:not(.file-btn) { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.events { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.event-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 66px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
.event-choice .i { width: 22px; height: 22px; color: var(--muted); }
.event-choice:hover { border-color: var(--line-2); color: var(--text); }
.event-choice.active { border-color: rgba(255,90,106,.6); background: rgba(255,90,106,.12); color: #fff; }
.event-choice.active .i { color: #ff8a96; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.field { display: block; margin-top: 12px; }
.form-grid .field { margin-top: 0; }
.field select, .field textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 9px 11px; outline: none; }
.field select { height: 42px; }
.field textarea { resize: vertical; min-height: 78px; }
.field select:focus, .field textarea:focus { border-color: var(--accent); }
.file-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--text-2); font-weight: 600; cursor: pointer; }
.file-btn:hover { border-color: var(--accent); color: var(--accent); }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-preview { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.file-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.file-preview span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-message { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: rgba(255,90,106,.12); border: 1px solid rgba(255,90,106,.35); color: #ffc2c8; }
.form-message.success { background: rgba(61,220,151,.1); border-color: rgba(61,220,151,.35); color: #b5f3d6; }
.form-message.warn { background: rgba(255,181,71,.1); border-color: rgba(255,181,71,.35); color: #ffdca3; }
body.modal-open { overflow: hidden; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 4000; max-width: min(460px, calc(100% - 32px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 12px; background: #1c3246; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { background: #45202a; border-color: rgba(255,90,106,.45); }
.toast[data-kind="ok"] { background: #173a2e; border-color: rgba(61,220,151,.4); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 5000; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Responsywność ---------- */
@media (max-width: 1180px) {
  :root { --side-w: 340px; }
  .brand-text small { display: none; }
}
@media (max-width: 900px) {
  :root { --top-h: 56px; --bar-h: 48px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 0 10px; }
  .brand-text { display: none; }
  .hide-sm { display: none !important; }
  .search-kbd { display: none; }
  .search input { padding-right: 40px; }
  .layerbar { padding: 0 8px; gap: 8px; }
  .layerbar-label { display: none; }
  .model-select span { display: none; }
  .workspace { display: block; position: relative; }
  .stage { position: absolute; left: 0; right: 0; top: 0; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(72px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.3); }
  .sidebar.expanded { position: fixed; left: 0; right: 0; bottom: 0; height: calc(100dvh - var(--top-h) - var(--bar-h) - 6px); border-radius: 18px 18px 0 0; z-index: 1500; animation: sheetUp .22s ease-out; }
  .sheet-handle { display: flex; flex-direction: column; align-items: stretch; width: 100%; height: 72px; padding: 6px 14px 8px; border: 0; background: transparent; text-align: left; flex: none; touch-action: none; }
  .grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin-bottom: 6px; }
  .sheet-peek { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .sheet-icon { width: 36px; height: 36px; flex: none; }
  .sheet-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .sheet-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .sheet-text small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet-temp { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
  .sidebar:not(.expanded) .sidebar-scroll { display: none; }
  .sidebar-scroll { padding-top: 4px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .legend { left: 8px; top: 8px; width: 196px; padding: 8px 10px; }
  .legend-head { font-size: 10.5px; gap: 6px; }
  .legend-head span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .legend-source { display: none; }
  .map-tools { top: 8px; right: 8px; }
  .timeline { left: 8px; right: 8px; width: auto; transform: none; bottom: 26px; padding: 8px 10px; gap: 8px; border-radius: 14px; }
  .forecast-timeline { bottom: 8px; width: calc(100% - 12px); padding: 8px 9px; gap: 7px; border-radius: 14px; }
.tl-btn { width: 34px; height: 34px; }
  .tl-play { width: 40px; height: 40px; }
  .popover { right: 48px; width: min(270px, calc(100vw - 72px)); }
  .map-chip { top: 84px; left: 8px; }
  .forecast-hint { display: none; }
}
@media (max-width: 560px) {
  .hide-xs { display: none !important; }
  .top-actions .btn { width: 40px; padding: 0; }
  .brand img { width: 30px; height: 30px; }
  .events { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .tl-btn:not(.tl-play) { display: none; }
  .legend { width: 186px; }
  .legend-labels span:nth-child(2), .legend-labels span:nth-child(3) { display: none; }
  .dialog { max-height: calc(100dvh - 16px); }
  .modal { padding: 8px; align-items: end; }
  .stats { grid-template-columns: 1fr 1fr; }
  .now-temp { font-size: 46px; }
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } }
.warn-none.warn-unknown { background: rgba(255,181,71,.07); border-color: rgba(255,181,71,.25); color: #f3dcb0; }
.warn-none.warn-unknown .i { color: var(--warn); }
.warn-none a { color: inherit; }

.src-credit { color: var(--faint); font-size: 11px; text-transform: lowercase; }


@media (max-width: 700px) {
  .forecast-legend { gap: 8px; padding-top: 7px; }
  .fl-head { width: auto; }
  .fl-title { display: none; }
  .fl-icon { width: 22px; height: 22px; border-radius: 7px; }
  .fl-icon .i { width: 13px; height: 13px; }
  .fl-value { height: 22px; font-size: 10.5px; padding: 0 8px; }
  .forecast-legend-bar { height: 8px; }
  .fl-marker { width: 12px; height: 12px; border-width: 2px; }
  .forecast-legend-labels { font-size: 8.5px; height: 12px; }
  .forecast-timeline { bottom: 6px; width: calc(100% - 12px); padding: 8px 9px; gap: 7px; border-radius: 14px; min-height: 68px; }
  .forecast-timeline .tl-btn { width: 34px; height: 34px; }
  .forecast-timeline .tl-play { width: 42px; height: 42px; }
  .forecast-timeline .tl-time small { max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
  .forecast-timeline .tl-ticks span { font-size: 8px; }
}

/* Kontrolki zoomu mapy prognozy w stylistyce StormAlert. */
.forecast-map .leaflet-control-zoom {
  border: 1px solid rgba(150,190,220,.22) !important;
  border-radius: 12px !important; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.28) !important;
}
.forecast-map .leaflet-control-zoom a {
  width: 38px !important; height: 38px !important; line-height: 36px !important;
  background: rgba(8,20,29,.92) !important; color: #d8e8f2 !important;
  border: 0 !important; border-bottom: 1px solid rgba(150,190,220,.15) !important;
}
.forecast-map .leaflet-control-zoom a:last-child { border-bottom: 0 !important; }
.forecast-map .leaflet-control-zoom a:hover { background: rgba(24,48,66,.96) !important; color: #fff !important; }
.forecast-ticks .hour-mark {
  position: absolute; top: -3px; width: 1px; height: 4px;
  background: rgba(170,198,216,.28); transform: translateX(-50%); pointer-events: none;
}

/* Warstwy Open-Meteo Maps: płynne przejście między godzinami. */
.om-layer { transition: opacity .25s linear; will-change: opacity; }

.tl-btn:disabled, .timeline-slider:disabled { opacity: .45; cursor: default; }

/* Tryb Windy Map Forecast API: pasek Windy jest ukryty w samej stronie mapy, więc bez przycinania. */
.windy-special-frame.is-api { height: 100%; }

/* Widżet Windy: skala co godzinę, godziny dostępne w Windy wyróżnione. */
.forecast-ticks .hour-mark.avail { top: -5px; height: 7px; width: 2px; background: rgba(63,182,255,.85); }
.forecast-timeline .tl-ticks span.avail { color: #9fd8ff; font-weight: 800; }

/* 6.7.3 — widżet Windy bez klucza API: widoczny oryginalny, godzinowy pasek Windy. */
.windy-special-frame.is-native { height: 100%; }
.windy-mode-note {
  position: absolute; z-index: 880; top: 10px; left: 50%; transform: translateX(-50%);
  width: min(620px, calc(100% - 24px)); display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px 9px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.4;
  color: var(--text); background: rgba(8,20,29,.94); border: 1px solid rgba(150,190,220,.22);
  box-shadow: 0 8px 22px rgba(0,0,0,.32);
}
.windy-mode-note span { flex: 1; min-width: 0; }
.windy-mode-note button { flex: none; width: 24px; height: 24px; border: 0; border-radius: 6px; background: rgba(255,255,255,.08); color: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.windy-mode-note[hidden] { display: none; }

/* 7.0.1 — wyładowania MTG-LI: poświata, żeby plamki kilku km były widoczne także przy małym zoomie. */
.lightning-frame img { filter: drop-shadow(0 0 1px #fff6a8) drop-shadow(0 0 3px #ffb400) drop-shadow(0 0 6px #ff5a00); }

/* 7.1.0 — mapy Windy na pełnym ekranie, z oryginalnym paskiem czasu i legendą Windy.
   Wskaźnik ładowania to mała pigułka u góry — mapa Windy jest widoczna od razu. */
.windy-special-frame, .windy-special-frame.is-native { height: 100%; background: #404040; }
.windy-loading {
  inset: auto; top: 12px; left: 50%; transform: translateX(-50%);
  flex-direction: row; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: rgba(8,20,29,.9); border: 1px solid rgba(150,190,220,.22);
  box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: none; font-size: 13px;
  width: max-content; max-width: calc(100% - 24px);
}
.windy-loading p { margin: 0; }
.windy-loading .spinner { width: 16px; height: 16px; border-width: 2px; }
.windy-loading[data-state="slow"] { pointer-events: auto; border-radius: 14px; }
.windy-loading[hidden] { display: none !important; }
