/* Meteo Wrocław — żywy, ale czytelny wygląd: kolor każdej sekcji, barwne niebo i ikony; jasny i ciemny motyw. */

:root {
    --bg: #e9eef3;
    --bg-grad: radial-gradient(1200px 520px at 15% -120px, rgba(64, 140, 220, .18), transparent 70%),
               radial-gradient(900px 480px at 95% -80px, rgba(240, 160, 60, .12), transparent 70%);
    --card: #ffffff;
    --card-2: #f4f7fa;
    --line: rgba(20, 40, 64, .09);
    --line-2: rgba(20, 40, 64, .16);
    --ink: #15202b;
    --ink-2: #44515f;
    --ink-3: #66727f;
    --accent: #2b78d4;
    --accent-soft: rgba(43, 120, 212, .1);
    --shadow: 0 1px 2px rgba(16, 32, 52, .05), 0 12px 32px -18px rgba(16, 32, 52, .3);
    --night: rgba(40, 70, 140, .06);
    --grid: rgba(20, 40, 64, .07);

    /* kolory sekcji */
    --c-imgw: #2b78d4;
    --c-icm: #15946b;
    --c-ecmwf: #7552d1;
    --c-as: #e07b14;
    --c-syn: #0e8a9b;
    --c-sunday: #d64545;

    --t-cold: #3c7ed8;
    --t-cool: #1ea4c4;
    --t-mild: #2fab70;
    --t-warm: #ec9415;
    --t-hot: #e0503a;

    --rain: #2f8ee8;
    --rain-soft: rgba(47, 142, 232, .15);
    --r1: #8ccaf6;
    --r2: #3796ea;
    --r3: #2459c8;
    --r4: #7b3fd0;
    --snow: #9cd0f4;
    --wind: #149a95;
    --gust: rgba(117, 82, 209, .16);
    --band: rgba(117, 82, 209, .17);
    --temp-line: #e06a3a;
    --feel-line: #8a96a3;

    --ic-sun: #f29a12;
    --ic-sun-fill: #ffcf3f;
    --ic-moon: #c9a03a;
    --ic-moon-fill: #f8e6a0;
    --ic-cloud: #8aa0b6;
    --ic-cloud-fill: #ffffff;
    --ic-cloud-back: #d7e2ec;
    --ic-rain: #2f8ee8;
    --ic-snow: #5fb0ea;
    --ic-bolt: #ffb703;
    --ic-bolt-line: #e07800;

    --warn-1: #e5b52a;
    --warn-2: #ec7f22;
    --warn-3: #d63c32;

    --radius: 18px;
    --radius-sm: 12px;
    --gutter: 16px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b1016;
        --bg-grad: radial-gradient(1200px 520px at 15% -120px, rgba(64, 140, 220, .16), transparent 70%),
                   radial-gradient(900px 480px at 95% -80px, rgba(160, 110, 240, .1), transparent 70%);
        --card: #131b23;
        --card-2: #18222c;
        --line: rgba(200, 220, 244, .08);
        --line-2: rgba(200, 220, 244, .15);
        --ink: #e8eef4;
        --ink-2: #b2bec9;
        --ink-3: #8b98a5;
        --accent: #62a8f2;
        --accent-soft: rgba(98, 168, 242, .14);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .75);
        --night: rgba(120, 150, 230, .06);
        --grid: rgba(200, 220, 244, .06);
        --c-imgw: #5ea4f2;
        --c-icm: #3ccb9c;
        --c-ecmwf: #a487f2;
        --c-as: #f5a043;
        --c-syn: #3fc0d0;
        --c-sunday: #f37878;
        --t-cold: #6ea4f2;
        --t-cool: #4cc6e0;
        --t-mild: #56cc8e;
        --t-warm: #f6b444;
        --t-hot: #f47a5c;
        --rain: #4ea8f4;
        --rain-soft: rgba(78, 168, 244, .2);
        --r1: #77bdf2;
        --r2: #4ea8f4;
        --r3: #6f8cff;
        --r4: #b67cf6;
        --snow: #b7defa;
        --wind: #36c4bd;
        --gust: rgba(164, 135, 242, .2);
        --band: rgba(164, 135, 242, .22);
        --temp-line: #f08a5d;
        --feel-line: #7f8d9b;
        --ic-sun: #ffa928;
        --ic-sun-fill: #ffd34f;
        --ic-moon: #e3c568;
        --ic-moon-fill: #f6e6a6;
        --ic-cloud: #b4c5d6;
        --ic-cloud-fill: #e6edf4;
        --ic-cloud-back: #7f92a6;
        --ic-rain: #5ab3f7;
        --ic-snow: #b7defa;
        --ic-bolt: #ffc233;
        --ic-bolt-line: #f09000;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1016;
    --bg-grad: radial-gradient(1200px 520px at 15% -120px, rgba(64, 140, 220, .16), transparent 70%),
               radial-gradient(900px 480px at 95% -80px, rgba(160, 110, 240, .1), transparent 70%);
    --card: #131b23;
    --card-2: #18222c;
    --line: rgba(200, 220, 244, .08);
    --line-2: rgba(200, 220, 244, .15);
    --ink: #e8eef4;
    --ink-2: #b2bec9;
    --ink-3: #8b98a5;
    --accent: #62a8f2;
    --accent-soft: rgba(98, 168, 242, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .75);
    --night: rgba(120, 150, 230, .06);
    --grid: rgba(200, 220, 244, .06);
    --c-imgw: #5ea4f2;
    --c-icm: #3ccb9c;
    --c-ecmwf: #a487f2;
    --c-as: #f5a043;
    --c-syn: #3fc0d0;
    --c-sunday: #f37878;
    --t-cold: #6ea4f2;
    --t-cool: #4cc6e0;
    --t-mild: #56cc8e;
    --t-warm: #f6b444;
    --t-hot: #f47a5c;
    --rain: #4ea8f4;
    --rain-soft: rgba(78, 168, 244, .2);
    --r1: #77bdf2;
    --r2: #4ea8f4;
    --r3: #6f8cff;
    --r4: #b67cf6;
    --snow: #b7defa;
    --wind: #36c4bd;
    --gust: rgba(164, 135, 242, .2);
    --band: rgba(164, 135, 242, .22);
    --temp-line: #f08a5d;
    --feel-line: #7f8d9b;
    --ic-sun: #ffa928;
    --ic-sun-fill: #ffd34f;
    --ic-moon: #e3c568;
    --ic-moon-fill: #f6e6a6;
    --ic-cloud: #b4c5d6;
    --ic-cloud-fill: #e6edf4;
    --ic-cloud-back: #7f92a6;
    --ic-rain: #5ab3f7;
    --ic-snow: #b7defa;
    --ic-bolt: #ffc233;
    --ic-bolt-line: #f09000;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 118px; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-grad), var(--bg);
    background-color: var(--bg);
    color: var(--ink);
    font: 15px/1.5 var(--font);
    font-feature-settings: "tnum" 1;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- pasek górny */

.top {
    position: sticky;
    top: 0;
    z-index: 30;
    padding-top: env(safe-area-inset-top);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(18px);
    backdrop-filter: saturate(1.4) blur(18px);
    border-bottom: 1px solid var(--line);
}

.appbar, .sections {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.appbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; display: block; }
.brand h1 { margin: 0; font: 650 17px/1.15 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.brand h1 .ver {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font: 600 10.5px/1.6 var(--font);
    letter-spacing: .02em;
    vertical-align: 2px;
}
.brand .sub { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--card);
    color: var(--ink-2);
    cursor: pointer;
    transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--card-2); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sections {
    display: flex;
    gap: 6px;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sections::-webkit-scrollbar { display: none; }
.sections a {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background .25s, color .25s, border-color .25s;
}
.sections a::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sec);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec) 20%, transparent);
    transition: transform .25s;
}
.sections a:hover { text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--sec) 9%, transparent); }
.sections a.on {
    color: color-mix(in srgb, var(--sec) 80%, var(--ink));
    background: color-mix(in srgb, var(--sec) 14%, var(--card));
    border-color: color-mix(in srgb, var(--sec) 32%, transparent);
}
.sections a.on::before { transform: scale(1.25); }

/* kolor każdej sekcji: w nawigacji i na kartach */
[data-sec="now"] { --sec: var(--t-warm); }
[data-sec="imgw"] { --sec: var(--c-imgw); }
[data-sec="icm"] { --sec: var(--c-icm); }
[data-sec="ecmwf"] { --sec: var(--c-ecmwf); }
[data-sec="as"] { --sec: var(--c-as); }
[data-sec="syn"] { --sec: var(--c-syn); }

/* ------------------------------------------------------------- układ */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
    display: grid;
    gap: 18px;
}

.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    min-width: 0;
}
.card[data-sec] { overflow: hidden; }
.card[data-sec]::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sec), color-mix(in srgb, var(--sec) 35%, transparent) 65%, transparent);
}
.sec-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.sec-ico {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: var(--sec);
    background: linear-gradient(145deg, color-mix(in srgb, var(--sec) 24%, var(--card)), color-mix(in srgb, var(--sec) 8%, var(--card)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sec) 24%, transparent);
}
.sec-ico svg { width: 22px; height: 22px; }
.card[data-sec] .eyebrow { color: var(--sec); }
.card[data-sec] .seg button[aria-selected="true"] { background: var(--sec); color: #fff; box-shadow: 0 4px 12px -6px var(--sec); }

.card-h {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 14px;
}
.card-h h2 { margin: 0; font: 650 19px/1.2 var(--font-display); letter-spacing: -.012em; }
.eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.src { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; }
.src b { color: var(--ink-2); font-weight: 600; }
.stale-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(216, 180, 58, .18);
    color: #9a7a12;
    font-size: 11px;
    font-weight: 650;
}
:root[data-theme="dark"] .stale-badge { color: #e2c45e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stale-badge { color: #e2c45e; } }

.seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 11px;
    background: var(--card-2);
    border: 1px solid var(--line);
}
.seg button {
    border: 0;
    background: transparent;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: background .25s, color .25s, box-shadow .25s;
}
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.empty, .err {
    padding: 22px 8px;
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
}
.err { color: var(--warn-3); }
.skeleton {
    border-radius: 12px;
    min-height: 120px;
    background: linear-gradient(90deg, var(--card-2) 0, var(--line) 50%, var(--card-2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    opacity: .7;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------------- ostrzeżenia */

.warnings { display: grid; gap: 10px; }
.warn {
    --lvl: var(--warn-1);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
    padding: 14px 16px 14px 18px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--lvl) 11%, var(--card));
    border: 1px solid color-mix(in srgb, var(--lvl) 40%, transparent);
    overflow: hidden;
}
.warn::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--lvl); }
.warn.l2 { --lvl: var(--warn-2); }
.warn.l3 { --lvl: var(--warn-3); }
.warn-ico {
    grid-row: span 3;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--lvl) 22%, transparent);
    color: color-mix(in srgb, var(--lvl) 70%, var(--ink));
    font-weight: 750;
    font-size: 15px;
}
.warn h3 { margin: 0; font-size: 15.5px; font-weight: 650; }
.warn .when { color: var(--ink-2); font-size: 13px; }
.warn p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.warn .meta { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

.region-warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 13.5px;
}
.region-warn .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--warn-1); }
.region-warn .dot.l2 { background: var(--warn-2); }
.region-warn .dot.l3 { background: var(--warn-3); }
.region-warn b { color: var(--ink); font-weight: 600; }
.ok-line { color: var(--ink-3); font-size: 13px; display: flex; gap: 8px; align-items: center; padding: 0 4px; }
.ok-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t-mild); }

/* ------------------------------------------------------------- teraz */

/* Tło karty zależy od pogody i pory dnia; na nim biały tekst i półprzezroczyste kafelki. */
.hero {
    --sky: linear-gradient(160deg, #1e5aa6 0%, #2f7cc6 55%, #4f98d6 100%);
    --ink: #ffffff;
    --ink-2: rgba(255, 255, 255, .9);
    --ink-3: rgba(255, 255, 255, .76);
    --line: rgba(255, 255, 255, .2);
    --tile: rgba(6, 22, 44, .2);
    --ic-sun: #ffb000;
    --ic-sun-fill: #ffd84a;
    --ic-moon: #f0d27a;
    --ic-moon-fill: #fff3c4;
    --ic-cloud: #ffffff;
    --ic-cloud-fill: rgba(255, 255, 255, .96);
    --ic-cloud-back: rgba(255, 255, 255, .55);
    --ic-rain: #8fd0ff;
    --ic-snow: #ffffff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--sky);
    color: var(--ink);
    border: 0;
    padding: 22px;
    box-shadow: 0 20px 44px -24px rgba(16, 48, 100, .65);
}
.hero.sky-cloudy { --sky: linear-gradient(160deg, #4a6178 0%, #627b92 55%, #7d93a8 100%); }
.hero.sky-rain { --sky: linear-gradient(160deg, #233c59 0%, #375575 55%, #527294 100%); }
.hero.sky-storm { --sky: linear-gradient(160deg, #241e3e 0%, #3d305f 55%, #5b4468 100%); }
.hero.sky-snow { --sky: linear-gradient(160deg, #4b6b90 0%, #6889ad 55%, #87a3c2 100%); }
.hero.sky-fog { --sky: linear-gradient(160deg, #56626e 0%, #6f7c88 55%, #8a95a0 100%); }
.hero.is-night { --sky: linear-gradient(160deg, #0b1330 0%, #18264f 55%, #2b3f73 100%); }
.hero.is-night.sky-cloudy { --sky: linear-gradient(160deg, #151d2b 0%, #243145 55%, #37475d 100%); }
.hero.is-night.sky-rain { --sky: linear-gradient(160deg, #0f1a2d 0%, #1c2e48 55%, #2d4464 100%); }
.hero.is-night.sky-storm { --sky: linear-gradient(160deg, #120f24 0%, #241c3f 55%, #3a2c52 100%); }
.hero.is-night.sky-snow { --sky: linear-gradient(160deg, #1b2941 0%, #2a3d5b 55%, #3f5777 100%); }
.hero.is-night.sky-fog { --sky: linear-gradient(160deg, #19202a 0%, #29313b 55%, #3b4551 100%); }
.hero > * { position: relative; z-index: 1; }

/* wędrujące światło */
.hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 75%;
    aspect-ratio: 1;
    right: -18%;
    top: -55%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0));
    animation: mw-sky 18s ease-in-out infinite alternate;
    pointer-events: none;
}
.hero.is-night::after { background: radial-gradient(closest-side, rgba(170, 190, 255, .2), rgba(170, 190, 255, 0)); }
/* deszcz, śnieg i gwiazdy w tle */
.hero.sky-rain::before, .hero.sky-storm::before, .hero.sky-snow::before, .hero.is-night.sky-clear::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero.sky-rain::before, .hero.sky-storm::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg stroke='white' stroke-opacity='.2' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M10 4l-3 10M40 18l-3 10M25 36l-3 10M52 44l-3 10M4 47l-2 7'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 60px;
    animation: mw-rain .8s linear infinite;
}
.hero.sky-snow::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='white' fill-opacity='.35'%3E%3Ccircle cx='10' cy='8' r='1.6'/%3E%3Ccircle cx='46' cy='22' r='1.2'/%3E%3Ccircle cx='28' cy='44' r='1.8'/%3E%3Ccircle cx='66' cy='58' r='1.3'/%3E%3Ccircle cx='8' cy='66' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    animation: mw-snowbg 6s linear infinite;
}
.hero.is-night.sky-clear::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='110'%3E%3Cg fill='white'%3E%3Ccircle cx='12' cy='14' r='1' fill-opacity='.7'/%3E%3Ccircle cx='70' cy='8' r='.8' fill-opacity='.5'/%3E%3Ccircle cx='118' cy='30' r='1.2' fill-opacity='.8'/%3E%3Ccircle cx='40' cy='52' r='.7' fill-opacity='.45'/%3E%3Ccircle cx='96' cy='76' r='1' fill-opacity='.6'/%3E%3Ccircle cx='20' cy='92' r='.8' fill-opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 140px 110px;
    animation: mw-twinkle 3.5s ease-in-out infinite alternate;
}

.hero-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}
.now-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.now-main .wx { width: 92px; height: 92px; flex: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); }
.now-temp {
    font: 250 78px/0.9 var(--font-display);
    letter-spacing: -.045em;
    white-space: nowrap;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .15);
}
.now-temp sup { font-size: .42em; font-weight: 300; vertical-align: .95em; letter-spacing: 0; margin-left: 2px; color: var(--ink-2); }
.now-desc { margin-top: 10px; font-size: 18px; font-weight: 650; }
.now-feel { color: var(--ink-2); font-size: 14px; }

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.metric, .nc, .strip {
    background: var(--tile);
    border: 1px solid rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.metric {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    min-width: 0;
}
.metric .k { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .02em; }
.metric .k svg { width: 13px; height: 13px; flex: none; }
.metric .v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; font-size: 19px; font-weight: 600; white-space: nowrap; }
.metric .v small { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.metric .arrow { width: 15px; height: 15px; color: #ffd84a; align-self: center; flex: none; }

.nowcast {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}
.nc {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    min-width: 0;
}
.nc .badge {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
    color: #bfe4ff;
}
.nc .badge svg { width: 20px; height: 20px; }
.nc.storm .badge { color: #ffd84a; }
.nc.temp .badge { color: #ffb38a; }
.nc.alert { border-color: #ffc46b; box-shadow: inset 0 0 0 1px #ffc46b; }
.nc.alert .badge { background: #ffc46b; color: #4a2a00; animation: mw-beat 2.4s ease-in-out infinite; }
.nc .k { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 650; }
.nc .v { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; }
.nc .v small { display: block; color: var(--ink-2); font-weight: 500; font-size: 12.5px; }

.strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(54px, 1fr);
    gap: 2px;
    margin-top: 16px;
    padding: 10px 4px 8px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.strip::-webkit-scrollbar { display: none; }
.strip > div { display: grid; justify-items: center; gap: 3px; scroll-snap-align: start; padding: 4px 2px; border-radius: 10px; transition: background .2s; }
.strip > div:hover { background: rgba(255, 255, 255, .12); }
.strip .h { color: var(--ink-3); font-size: 12px; font-weight: 650; }
.strip .wx { width: 32px; height: 32px; }
.strip .t { font-size: 15.5px; font-weight: 700; color: #fff !important; }
.strip .p { color: #a9dcff; font-size: 11.5px; font-weight: 700; min-height: 16px; }

.hero-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 14px;
    color: var(--ink-2);
    font-size: 13px;
}
.hero-foot span { display: inline-flex; align-items: center; gap: 6px; }
.hero-foot svg { width: 16px; height: 16px; color: #ffd84a; }
.station { margin-top: 8px; color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------- IMGW tydzień */

.wk-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
@media (max-width: 520px) { .chip { font-size: 12.5px; padding: 5px 10px 5px 8px; } .wk-sum { gap: 6px; } }
.chip {
    --chip: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chip) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--chip) 28%, transparent);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 550;
}
.chip b { color: color-mix(in srgb, var(--chip) 78%, var(--ink)); font-weight: 750; }
.chip svg { width: 16px; height: 16px; color: var(--chip); flex: none; }
.chip.warm { --chip: var(--t-warm); }
.chip.cold { --chip: var(--t-cold); }
.chip.rain { --chip: var(--rain); }
.chip.wind { --chip: var(--wind); }
.chip.storm { --chip: var(--c-ecmwf); }
.chip.dry { --chip: var(--ic-sun); }

.week { display: grid; gap: 6px; }
.day {
    --tint: #8aa0b6;
    position: relative;
    display: grid;
    grid-template-columns: 66px 46px minmax(0, 1fr) auto;
    grid-template-areas: "name icon range range" "name icon desc wind";
    align-items: center;
    gap: 2px 10px;
    padding: 9px 12px 9px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 17%, var(--card)) 0%, var(--card) 60%);
    border: 1px solid color-mix(in srgb, var(--tint) 24%, var(--line));
    transition: transform .3s cubic-bezier(.2, .75, .25, 1), box-shadow .3s;
}
.day.k-sun { --tint: var(--ic-sun); }
.day.k-rain { --tint: var(--rain); }
.day.k-storm { --tint: var(--c-ecmwf); }
.day.k-snow { --tint: #7fbfee; }
.day.k-fog { --tint: #95a2ae; }
.day:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--tint) 80%, #000); }
.day.today { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-imgw) 65%, transparent), 0 10px 26px -18px var(--c-imgw); }
.day .name { grid-area: name; line-height: 1.2; }
.day .name b { display: block; font-size: 15.5px; font-weight: 750; }
.day.sat .name b { color: var(--c-imgw); }
.day.sun .name b { color: var(--c-sunday); }
.day .name span { color: var(--ink-3); font-size: 12px; font-weight: 550; }
.day .icons { grid-area: icon; display: flex; align-items: center; justify-content: center; }
.day .icons .wx { width: 44px; height: 44px; }
.day .icons .wx.n { display: none; }
.day .desc { grid-area: desc; color: var(--ink-2); font-size: 12px; line-height: 1.25; font-weight: 550; }
.day .range { grid-area: range; display: grid; grid-template-columns: 32px 1fr 34px; align-items: center; gap: 8px; }
.day .lo { text-align: right; font-size: 15px; font-weight: 650; }
.day .hi { font-size: 17px; font-weight: 800; }
.bar { position: relative; height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.bar i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--a);
    right: calc(100% - var(--b));
    border-radius: 8px;
    background: linear-gradient(90deg, var(--c1), var(--c2));
    box-shadow: 0 3px 10px -3px var(--c2);
    min-width: 8px;
    transform-origin: left center;
}
.day .wind { grid-area: wind; display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.day .wind svg { width: 15px; height: 15px; flex: none; color: var(--wind); }

@media (min-width: 900px) {
    .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
    .day {
        grid-template-columns: 1fr;
        grid-template-areas: "name" "icon" "desc" "range" "wind";
        justify-items: center;
        text-align: center;
        gap: 8px;
        padding: 16px 6px 13px;
        background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 22%, var(--card)) 0%, var(--card) 62%);
    }
    .day:hover { transform: translateY(-5px); }
    .day .icons { gap: 2px; min-height: 58px; }
    .day .icons .wx { width: 56px; height: 56px; }
    .day .icons .wx.n { display: block; width: 28px; height: 28px; opacity: .9; }
    .day .desc { min-height: 2.6em; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
    .day .range { grid-template-columns: 1fr; grid-template-rows: auto 110px auto; justify-items: center; gap: 6px; width: 100%; }
    .day .hi { order: -1; font-size: 20px; }
    .day .lo { order: 1; text-align: center; }
    .bar { width: 10px; height: 100%; }
    .bar i { left: 0; right: 0; top: calc(100% - var(--b)); bottom: var(--a); min-height: 10px; min-width: 0; background: linear-gradient(0deg, var(--c1), var(--c2)); transform-origin: center bottom; }
    .day .wind { justify-content: center; }
}

.legend-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    color: var(--ink-3);
    font-size: 12px;
}

/* ------------------------------------------------------------- wykresy */

.chart { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--ink-3); font-size: 10.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .day-label { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.chart .p-title { fill: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .daysep { stroke: var(--line-2); stroke-width: 1; }
.chart .night { fill: var(--night); }
.chart .nowline { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 3; }
.chart .l-temp { fill: none; stroke: var(--temp-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .a-temp { opacity: .16; }
.chart .l-feel { fill: none; stroke: var(--feel-line); stroke-width: 1.3; stroke-dasharray: 3 3; }
.chart .l-med { fill: none; stroke: var(--c-ecmwf); stroke-width: 1.6; stroke-dasharray: 1 3.5; stroke-linecap: round; }
.chart .a-band { fill: var(--band); }
.chart .b-rain, .chart .b-r2 { fill: var(--r2); }
.chart .b-r1 { fill: var(--r1); }
.chart .b-r3 { fill: var(--r3); }
.chart .b-r4 { fill: var(--r4); }
.chart .b-snow { fill: var(--snow); }
.chart .a-gust { fill: var(--gust); }
.chart .l-gust { fill: none; stroke: var(--wind); stroke-width: 1; opacity: .55; }
.chart .l-wind { fill: none; stroke: var(--wind); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .zero { stroke: var(--t-cold); stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.chart .dot { stroke: var(--card); stroke-width: 1.5; }
.chart .dot.temp { fill: var(--temp-line); }
.chart .dot.wind { fill: var(--wind); }
.chart .dot.med { fill: var(--c-ecmwf); }

.tip {
    position: absolute;
    top: 0;
    z-index: 5;
    pointer-events: none;
    min-width: 150px;
    padding: 9px 11px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    border: 1px solid var(--line-2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0;
    transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip b { display: block; margin-bottom: 3px; font-size: 12.5px; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tip .row span:last-child { color: var(--ink); font-weight: 600; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

.keys { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--ink-3); font-size: 12px; }
.keys span { display: inline-flex; align-items: center; gap: 6px; }
.keys i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; }
.keys i.box { height: 9px; border: 0; border-radius: 2px; width: 12px; }
.keys i.grad-t { height: 4px; width: 20px; border: 0; border-radius: 2px; background: linear-gradient(90deg, var(--t-cold), var(--t-cool), var(--t-mild), var(--t-warm), var(--t-hot)); }
.keys i.grad-r { height: 9px; width: 20px; border: 0; border-radius: 2px; background: linear-gradient(90deg, var(--r1), var(--r2), var(--r3), var(--r4)); }
.summary { margin: 2px 0 12px; color: var(--ink-2); font-size: 14px; }
.summary b { color: var(--ink); font-weight: 620; }

/* ------------------------------------------------------------- ICM */

.icm-wrap { display: grid; gap: 16px; align-items: start; }
.paper {
    position: relative;
    margin: 0;
    border-radius: var(--radius-sm);
    background: #fffbf0;
    border: 1px solid var(--line);
    overflow: hidden;
    max-width: 640px;
    width: 100%;
    justify-self: center;
}
.paper button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.meteogram {
    position: relative;
    aspect-ratio: 630 / 660; /* meteogram 630×780 bez górnego banera (120 px) */
    overflow: hidden;
}
.meteogram img {
    position: absolute;
    left: 0;
    top: -18.182%;
    width: 100%;
    height: auto;
}
:root[data-theme="dark"] .paper img { filter: brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paper img { filter: brightness(.92); } }
.icm-hint { display: none; margin: 8px 0 0; text-align: center; color: var(--ink-3); font-size: 12px; }
.icm-side { color: var(--ink-2); font-size: 13.5px; }
.icm-side h3 { margin: 0 0 6px; font-size: 14px; font-weight: 650; color: var(--ink); }
.icm-side p { margin: 0 0 10px; }
.icm-side details { margin-top: 6px; }
.icm-side summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.icm-legend { margin-top: 10px; border-radius: 10px; background: #fff; padding: 8px; border: 1px solid var(--line); text-align: center; }
.icm-legend img { max-width: 100%; height: auto; }
.facts { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.facts li span:first-child { color: var(--ink-3); }

@media (min-width: 900px) {
    .icm-wrap { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); }
    .paper { justify-self: start; }
}

/* ------------------------------------------------------------- ECMWF dni */

.days10 {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84px, 1fr);
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}
.d10 {
    --tint: #8aa0b6;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 3px;
    padding: 11px 4px 10px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 20%, var(--card)) 0%, var(--card) 70%);
    border: 1px solid color-mix(in srgb, var(--tint) 24%, var(--line));
    scroll-snap-align: start;
    text-align: center;
    transition: transform .3s cubic-bezier(.2, .75, .25, 1), box-shadow .3s;
}
.d10:hover { transform: translateY(-3px); box-shadow: 0 12px 22px -16px color-mix(in srgb, var(--tint) 80%, #000); }
.d10.k-sun { --tint: var(--ic-sun); }
.d10.k-rain { --tint: var(--rain); }
.d10.k-storm { --tint: var(--c-ecmwf); }
.d10.k-snow { --tint: #7fbfee; }
.d10.k-fog { --tint: #95a2ae; }
.d10.sat .dn { color: var(--c-imgw); }
.d10.sun .dn { color: var(--c-sunday); }
.d10 .dn { font-size: 13.5px; font-weight: 750; }
.d10 .dd { color: var(--ink-3); font-size: 11.5px; margin-top: -3px; }
.d10 .wx { width: 36px; height: 36px; margin: 2px 0; }
.d10 .tt { font-size: 14.5px; }
.d10 .tt b { font-weight: 800; }
.d10 .tt span { color: var(--ink-2); }
.d10 .rng { color: var(--ink-3); font-size: 10.5px; }
.d10 .pp { width: 100%; padding: 0 6px; margin-top: 3px; }
.d10 .pp .pbar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.d10 .pp .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--r1), var(--r2) 60%, var(--r3)); border-radius: 4px; transform-origin: left center; }
.d10 .pp small { display: block; color: var(--rain); font-size: 11px; font-weight: 700; margin-top: 3px; }
.d10 .gg { color: var(--ink-3); font-size: 11px; }
.d10.today { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-ecmwf) 60%, transparent); }

/* ------------------------------------------------------------- AntiStorm */

.as-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.as-card { min-width: 0; }
.as-card h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.as-card h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--rain); }
.as-card.storm h3::before { background: var(--ic-bolt); }
.as-stat { margin: 0 0 10px; color: var(--ink-2); font-size: 13.5px; min-height: 20px; }
.as-stat b { color: var(--ink); }
.asmap {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #d9dfd6;
    border: 1px solid var(--line);
    isolation: isolate;
}
.asmap .stack { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.asmap .stack img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.asmap .base { filter: saturate(.45) contrast(.94) brightness(1.03); }
:root[data-theme="dark"] .asmap { background: #1a2026; }
:root[data-theme="dark"] .asmap .base { filter: invert(1) hue-rotate(180deg) saturate(.3) brightness(.78) contrast(.92); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .asmap { background: #1a2026; }
    :root:not([data-theme="light"]) .asmap .base { filter: invert(1) hue-rotate(180deg) saturate(.3) brightness(.78) contrast(.92); }
}
.asmap .pin { position: absolute; width: 0; height: 0; z-index: 2; }
.asmap .pin::before {
    content: "";
    position: absolute;
    left: -6px;
    top: -6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #1d2d3a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .55);
}
.asmap .pin span {
    position: absolute;
    left: 10px;
    top: -10px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(20, 30, 40, .78);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.asmap .stamp {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(20, 30, 40, .72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}
.as-legend { display: grid; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.as-legend .grad { height: 7px; border-radius: 4px; }
.as-legend .ends { display: flex; justify-content: space-between; margin-top: 2px; }
.as-legend .chips { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.as-legend .chips span { display: inline-flex; align-items: center; gap: 5px; }
.as-legend .chips i { width: 14px; height: 9px; border-radius: 2px; display: inline-block; }
.as-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }

/* ------------------------------------------------------------- teksty synoptyków */

.texts { display: grid; gap: 14px; }
@media (min-width: 900px) { .texts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.tblock { padding: 14px 16px; border-radius: var(--radius-sm); background: linear-gradient(180deg, color-mix(in srgb, var(--sec, var(--accent)) 7%, var(--card)), var(--card-2)); border: 1px solid var(--line); }
.tblock h3 { margin: 0 0 2px; font-size: 14.5px; font-weight: 650; }
.tblock .by { color: var(--ink-3); font-size: 12px; margin-bottom: 10px; }
.tblock h4 { margin: 12px 0 3px; font-size: 12.5px; font-weight: 700; color: var(--sec, var(--accent)); text-transform: none; }
.tblock h4:first-of-type { margin-top: 0; }
.tblock p { margin: 0; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.tblock .tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--line); color: var(--ink-3); font-size: 10.5px; font-weight: 650; vertical-align: 1px; }

/* ------------------------------------------------------------- stopka */

footer.foot {
    max-width: 1200px;
    margin: 0 auto;
    padding: 26px max(var(--gutter), env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    color: var(--ink-3);
    font-size: 12.5px;
}
.foot .src-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .foot .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot h3 { margin: 0 0 2px; font-size: 12.5px; color: var(--ink-2); font-weight: 650; }
.foot p { margin: 0; }
.foot .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------- powiększenie */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8, 12, 16, .88);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(56px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
    display: grid;
    place-items: start center;
}
.lightbox img { max-width: none; width: min(900px, 160vw); height: auto; border-radius: 10px; background: #fff; }
.lightbox .close {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* ------------------------------------------------------------- ikony pogody */

.wx { display: block; overflow: visible; }
.wx .sun { fill: none; stroke: var(--ic-sun); stroke-width: 1.8; stroke-linecap: round; }
.wx .sun-c { fill: var(--ic-sun-fill); stroke: var(--ic-sun); stroke-width: 1.4; }
.wx .moon { fill: var(--ic-moon-fill); stroke: var(--ic-moon); stroke-width: 1.4; stroke-linejoin: round; }
.wx .cloud { fill: var(--ic-cloud-fill); stroke: var(--ic-cloud); stroke-width: 1.5; stroke-linejoin: round; }
.wx .cloud.back { fill: var(--ic-cloud-back); stroke-width: 1.3; }
.wx .drop { stroke: var(--ic-rain); stroke-width: 1.9; stroke-linecap: round; fill: none; }
.wx .dot { fill: var(--ic-rain); }
.wx .flake { stroke: var(--ic-snow); stroke-width: 1.4; stroke-linecap: round; fill: none; }
.wx .hail { fill: color-mix(in srgb, var(--ic-snow) 30%, transparent); stroke: var(--ic-snow); stroke-width: 1.3; }
.wx .bolt { fill: var(--ic-bolt); stroke: var(--ic-bolt-line); stroke-width: .7; stroke-linejoin: round; }
.wx .fog { stroke: var(--ic-cloud); stroke-width: 1.7; stroke-linecap: round; opacity: .85; }
.wx .ice { stroke: var(--ic-snow); stroke-width: 1.6; stroke-linecap: round; }

/* ------------------------------------------------------------- szersze ekrany */

@media (min-width: 600px) {
    :root { --gutter: 22px; }
    .card { padding: 20px 22px; }
    .hero { padding: 26px; }
    .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nowcast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
    .hero-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 24px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
    .hero-top { gap: 28px; }
    .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    :root { --gutter: 28px; }
    main { gap: 22px; padding-top: 24px; }
    .now-main .wx { width: 104px; height: 104px; }
    .now-temp { font-size: 92px; }
    .nowcast { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nc { padding: 9px 11px; }
    .nc .badge { display: none; }
    .metric { padding: 9px 11px; }
    .icm-hint { display: block; }
}

@media (max-width: 380px) {
    .now-temp { font-size: 64px; }
    .now-main .wx { width: 72px; height: 72px; }
    .day { grid-template-columns: 58px 40px minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 10px; }
}

/* ------------------------------------------------------------- animacje */

@keyframes mw-rise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mw-pop { 0% { opacity: 0; transform: scale(.5) rotate(-8deg); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes mw-growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mw-growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes mw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mw-dash { to { stroke-dashoffset: 0; } }
@keyframes mw-fade-t { from { opacity: 0; } to { opacity: .16; } }
@keyframes mw-turn { to { transform: rotate(360deg); } }
@keyframes mw-drift { from { transform: translateX(-.9px); } to { transform: translateX(.9px); } }
@keyframes mw-fall { 0% { transform: translate(.6px, -2.2px); opacity: 0; } 25%, 70% { opacity: 1; } 100% { transform: translate(-.9px, 2.8px); opacity: 0; } }
@keyframes mw-flake { 0% { transform: translate(0, -2.4px) rotate(0); opacity: 0; } 25%, 70% { opacity: 1; } 100% { transform: translate(.8px, 2.6px) rotate(120deg); opacity: 0; } }
@keyframes mw-flash { 0%, 84%, 100% { opacity: 1; } 86% { opacity: .15; } 88% { opacity: 1; } 91% { opacity: .3; } 93% { opacity: 1; } }
@keyframes mw-glow { from { opacity: .82; } to { opacity: 1; } }
@keyframes mw-sky { from { transform: translate(-6%, -3%) scale(1); } to { transform: translate(6%, 6%) scale(1.12); } }
@keyframes mw-rain { from { background-position: 0 0; } to { background-position: -18px 60px; } }
@keyframes mw-snowbg { from { background-position: 0 0; } to { background-position: 20px 80px; } }
@keyframes mw-twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes mw-ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes mw-beat { 0%, 100% { transform: none; } 50% { transform: scale(1.1); } }
@keyframes mw-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--lvl) 0%, transparent); } }

/* ikony pogody żyją: słońce się obraca, chmury płyną, pada deszcz i śnieg, błyska */
.wx .sun { transform-box: fill-box; transform-origin: center; animation: mw-turn 28s linear infinite; }
.wx .drift { animation: mw-drift 4.5s ease-in-out infinite alternate; }
.wx .drift.back { animation-duration: 6s; animation-direction: alternate-reverse; }
.wx .drop, .wx .dot { animation: mw-fall 1.15s linear infinite; }
.wx .hail { animation: mw-fall .85s linear infinite; }
.wx .flake { transform-box: fill-box; transform-origin: center; animation: mw-flake 2.6s linear infinite; }
.wx .bolt { animation: mw-flash 3.4s ease-in-out infinite; }
.wx .fog { animation: mw-drift 3.2s ease-in-out infinite alternate; }
.wx .moon { animation: mw-glow 3.5s ease-in-out infinite alternate; }

/* sekcje pojawiają się przy przewijaniu */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .85s cubic-bezier(.2, .75, .25, 1); }
.reveal.in { opacity: 1; transform: none; }

/* „Teraz”: wejście */
.hero.enter .now-main .wx { animation: mw-pop .8s cubic-bezier(.2, .75, .25, 1) both; }
.hero.enter .now-desc, .hero.enter .now-feel { animation: mw-rise .6s .15s both; }
.hero.enter .metric, .hero.enter .nc { animation: mw-rise .55s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
.hero.enter .strip > div { animation: mw-rise .5s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i, 0) * 28ms + 300ms); }

/* prognoza na tydzień: karty po kolei, ikony „wyskakują”, słupki rosną od minimum do maksimum */
.week.pre .day, .wk-sum.pre .chip { opacity: 0; }
.week.enter .day { animation: mw-rise .6s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 80ms); }
.week.enter .day .icons .wx { animation: mw-pop .7s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 80ms + 160ms); }
.week.enter .bar i { animation: mw-growX .9s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 80ms + 280ms); }
.wk-sum.enter .chip { animation: mw-rise .5s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 90ms + 500ms); }
@media (min-width: 900px) {
    .week.enter .bar i { animation-name: mw-growY; }
}

/* ECMWF: karty dni i paski prawdopodobieństwa */
.days10.pre .d10 { opacity: 0; }
.days10.enter .d10 { animation: mw-rise .55s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 55ms); }
.days10.enter .pbar i { animation: mw-growX .8s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i) * 55ms + 250ms); }

/* wykresy: linie się rysują, słupki rosną, pasma wyłaniają się */
.chart svg.anim .l-temp, .chart svg.anim .l-wind { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart svg.anim .a-band, .chart svg.anim .a-temp, .chart svg.anim .a-gust, .chart svg.anim .l-feel, .chart svg.anim .l-med { opacity: 0; }
.chart svg.anim rect.cbar { transform: scaleY(0); transform-box: fill-box; transform-origin: center bottom; }
.chart svg.anim.go .l-temp, .chart svg.anim.go .l-wind { animation: mw-dash 1.9s cubic-bezier(.35, .6, .3, 1) forwards; }
.chart svg.anim.go .l-feel, .chart svg.anim.go .l-med, .chart svg.anim.go .a-gust { animation: mw-fade 1s .9s forwards; }
.chart svg.anim.go .a-band { animation: mw-fade 1.2s .4s forwards; }
.chart svg.anim.go .a-temp { animation: mw-fade-t 1.2s .8s forwards; }
.chart svg.anim.go rect.cbar { animation: mw-growY .6s cubic-bezier(.2, .75, .25, 1) forwards; animation-delay: calc(var(--d, 0) * 1ms + 300ms); }

/* mapy AntiStorm i ostrzeżenia */
.asmap .stack img { animation: mw-fade .9s ease both; }
.asmap .pin::after {
    content: "";
    position: absolute;
    left: -12px;
    top: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(20, 30, 40, .4);
    animation: mw-ping 2.2s ease-out infinite;
}
.warn.l2 .warn-ico, .warn.l3 .warn-ico { animation: mw-pulse 2s ease-out infinite; }
.warn { animation: mw-rise .6s cubic-bezier(.2, .75, .25, 1) both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal, .week.pre .day, .wk-sum.pre .chip, .days10.pre .d10 { opacity: 1 !important; transform: none !important; }
    .chart svg.anim .l-temp, .chart svg.anim .l-wind { stroke-dasharray: none; stroke-dashoffset: 0; }
    .chart svg.anim .a-band, .chart svg.anim .l-feel, .chart svg.anim .l-med, .chart svg.anim .a-gust { opacity: 1; }
    .chart svg.anim .a-temp { opacity: .16; }
    .chart svg.anim rect.cbar { transform: none; }
}
