/* =====================================================================
   WEATHER  -  /weather/weather.css
   The whole page takes on the weather: the sky behind everything, the
   glass cards, the text colour, the accent, and the little city at the
   bottom (scene.js reads the --city-... colours from here).

   weather.js sets two things on <html>:
     data-scene  clear, partly, cloudy, fog, drizzle, rain, storm, snow
     data-phase  dawn, day, dusk, night
   Each mix of the two has its own palette below. To change a look,
   change its colours here; nothing else needs touching.
   ===================================================================== */

/* ---------------------------------------------------------------------
   The palettes
   --------------------------------------------------------------------- */
:root {
    /* a clear, sunny day: blue sky melting into pink */
    --sky: linear-gradient(180deg, #8ec5ff 0%, #b9dcff 34%, #ffd6e0 74%, #ffe9d6 100%);
    --sky-solid: #c9e1ff;
    --ink: #2b1d2a;
    --muted: #6a5566;
    --faint: #94818f;
    --line: rgba(43, 29, 42, 0.16);
    --card: rgba(255, 255, 255, 0.52);
    --card-line: rgba(255, 255, 255, 0.78);
    --card-shadow: 0 10px 30px rgba(120, 60, 90, 0.12);
    --track: rgba(43, 29, 42, 0.1);
    --accent: #e2557a;
    --accent-ink: #ffffff;
    --glow: rgba(255, 140, 170, 0.45);
    --rain: #3f7fd0;
    --windc: #2a9d8f;
    --ico-sun: #ffb703;
    --ico-ray: #ffb703;
    --ico-moon: #f6e7b0;
    --ico-cloud: #ffffff;
    --ico-cloud-back: #dfe6f1;
    --ico-cloud-line: rgba(80, 90, 120, 0.28);
    --ico-rain: #4a90e2;
    --ico-snow: #9cc6ff;
    --ico-bolt: #ffc93c;
    --ico-fog: #a99fb1;

    --city-far: #dcc7dc;
    --city-near: #b893ae;
    --city-win: #ffe3a3;
    --city-win-off: rgba(255, 255, 255, 0.38);
    --city-ground: #f3e1e5;
    --city-road: #7a6573;
    --city-line: #fff1d6;
    --city-tree: #7fb98a;
    --city-trunk: #7a5a46;
    --city-ink: #3b2f3a;

    --wx-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --wx-ease: cubic-bezier(.2, .7, .2, 1);
}

/* soft and a little grey, with sun peeking through */
:root[data-scene="partly"] {
    --sky: linear-gradient(180deg, #9cc3ea 0%, #c4d9ee 42%, #f2d8e2 82%, #fbe7dd 100%);
    --sky-solid: #c4d9ee;
}
/* overcast: lilac grey */
:root[data-scene="cloudy"] {
    --sky: linear-gradient(180deg, #a3a9ba 0%, #c6c4d1 48%, #e5d8de 100%);
    --sky-solid: #c6c4d1;
    --ink: #282230; --muted: #5d5666; --faint: #857d8c;
    --card: rgba(255, 255, 255, 0.42);
    --card-line: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 10px 30px rgba(60, 50, 80, 0.12);
    --accent: #c94f73;
    --ico-sun: #f2b84b;
    --city-far: #c3bac6; --city-near: #8f8496; --city-ground: #ddd5d9; --city-road: #6a6170;
    --city-win-off: rgba(255, 255, 255, 0.22); --city-tree: #87a08b; --city-line: #ece6e0;
}
/* fog: milky, faded, quiet */
:root[data-scene="fog"] {
    --sky: linear-gradient(180deg, #c3bfc8 0%, #d9d5da 48%, #ece6e6 100%);
    --sky-solid: #d9d5da;
    --ink: #302c36; --muted: #625d68; --faint: #8b8590;
    --card: rgba(255, 255, 255, 0.4);
    --card-line: rgba(255, 255, 255, 0.62);
    --card-shadow: 0 10px 30px rgba(60, 50, 70, 0.08);
    --accent: #b9557a;
    --city-far: #dcd7db; --city-near: #b9b1b8; --city-ground: #e5dfe1; --city-road: #8c8490;
    --city-win-off: rgba(255, 255, 255, 0.25); --city-tree: #a7b5a9; --city-trunk: #8f7f76; --city-ink: #6c6470;
}
/* drizzle: soft blue grey */
:root[data-scene="drizzle"] {
    --sky: linear-gradient(180deg, #7d8ca6 0%, #a5b0c3 50%, #cec8d3 100%);
    --sky-solid: #a5b0c3;
    --ink: #1f2436; --muted: #4f5670; --faint: #7a8097;
    --card: rgba(255, 255, 255, 0.38);
    --card-line: rgba(255, 255, 255, 0.55);
    --card-shadow: 0 10px 30px rgba(30, 40, 70, 0.14);
    --accent: #c4476f;
    --rain: #2f6fc0;
    --city-far: #9aa5ba; --city-near: #6c7893; --city-ground: #b4b9c6; --city-road: #4b5266;
    --city-win-off: rgba(255, 255, 255, 0.16); --city-tree: #6f8f80; --city-line: #c9ced9; --city-ink: #2a3042;
}
/* snow: icy blue and white, still a little pink */
:root[data-scene="snow"] {
    --sky: linear-gradient(180deg, #b4cae4 0%, #d8e5f2 50%, #f6eef3 100%);
    --sky-solid: #d8e5f2;
    --ink: #22304a; --muted: #56647e; --faint: #8592a8;
    --card: rgba(255, 255, 255, 0.55);
    --card-line: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 10px 30px rgba(60, 90, 140, 0.14);
    --accent: #d9487a;
    --rain: #4a7fd0;
    --ico-cloud-back: #d5deeb;
    --city-far: #c9d6e6; --city-near: #9fb1c8; --city-ground: #f4f7fb; --city-road: #8a95a8;
    --city-win-off: rgba(255, 255, 255, 0.4); --city-tree: #6f8f86; --city-line: #ffffff; --city-ink: #33405a;
}

/* ---- the dark looks: night, rain, storms, sunset. Light text on deep glass ---- */
:root[data-phase="night"],
:root[data-scene="rain"],
:root[data-scene="storm"],
:root[data-scene="clear"][data-phase="dusk"],
:root[data-scene="partly"][data-phase="dusk"] {
    --ink: #f6eaf2;
    --muted: #cdb9cf;
    --faint: #9d8ba3;
    --line: rgba(255, 255, 255, 0.16);
    --card: rgba(28, 20, 48, 0.42);
    --card-line: rgba(255, 255, 255, 0.13);
    --card-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
    --track: rgba(255, 255, 255, 0.12);
    --accent: #ff8fb1;
    --accent-ink: #2a1024;
    --glow: rgba(255, 143, 177, 0.4);
    --rain: #8fb8ff;
    --windc: #7fe0cf;
    --ico-cloud: #dcd8ea;
    --ico-cloud-back: #a49fbd;
    --ico-cloud-line: rgba(255, 255, 255, 0.2);
    --ico-rain: #8fb8ff;
    --ico-snow: #dbe8ff;
    --ico-fog: #b9b0c6;
}
/* rain by day: slate blue */
:root[data-scene="rain"] {
    --sky: linear-gradient(180deg, #4b5b78 0%, #6b7b97 45%, #9798ad 100%);
    --sky-solid: #6b7b97;
    --card: rgba(30, 40, 62, 0.32);
    --card-line: rgba(255, 255, 255, 0.18);
    --ink: #f4f6fb; --muted: #d3d9e6; --faint: #a6aec2;
    --rain: #a9cdff;
    --city-far: #5f6c87; --city-near: #414c66; --city-win: #ffd98a; --city-win-off: rgba(255, 255, 255, 0.07);
    --city-ground: #6c7389; --city-road: #2f3546; --city-line: #b8bfd0; --city-tree: #4f6f62; --city-trunk: #3f3434; --city-ink: #1f2433;
}
/* a storm: deep bruised purple */
:root[data-scene="storm"] {
    --sky: linear-gradient(180deg, #1d1832 0%, #372d52 45%, #5a476c 100%);
    --sky-solid: #372d52;
    --card: rgba(18, 13, 34, 0.45);
    --accent: #ff7aa8;
    --city-far: #3d3554; --city-near: #251f3a; --city-win: #ffcf7a; --city-win-off: rgba(255, 255, 255, 0.05);
    --city-ground: #3e3752; --city-road: #17131f; --city-line: #6b6385; --city-tree: #2f4a43; --city-trunk: #2a2030; --city-ink: #0f0b1a;
}

/* ---- sunrise and sunset ---- */
:root[data-scene="clear"][data-phase="dawn"],
:root[data-scene="partly"][data-phase="dawn"] {
    --sky: linear-gradient(180deg, #6265ad 0%, #c98ab9 38%, #ffb48c 74%, #ffe2b2 100%);
    --sky-solid: #c98ab9;
    --ink: #2a1b2e; --muted: #5e4760;
    --card: rgba(255, 255, 255, 0.46);
    --card-line: rgba(255, 255, 255, 0.66);
    --accent: #d9466f;
    --city-far: #c79bb7; --city-near: #8e6488; --city-win: #ffd48a; --city-ground: #e7c3c6; --city-road: #5d4561;
    --city-win-off: rgba(255, 255, 255, 0.18); --city-tree: #6f9579; --city-line: #ffe6c8;
}
:root[data-scene="clear"][data-phase="dusk"],
:root[data-scene="partly"][data-phase="dusk"] {
    --sky: linear-gradient(180deg, #2c2869 0%, #874c8e 34%, #ec7979 70%, #ffc28a 100%);
    --sky-solid: #874c8e;
    --card: rgba(46, 22, 56, 0.34);
    --card-line: rgba(255, 255, 255, 0.16);
    --city-far: #7a4f80; --city-near: #4c2e55; --city-win: #ffd48a; --city-win-off: rgba(255, 255, 255, 0.07);
    --city-ground: #6b4566; --city-road: #2e1d33; --city-line: #c99ab0; --city-tree: #3f5a50; --city-trunk: #3a2630; --city-ink: #1c1020;
}
:root[data-scene="cloudy"][data-phase="dawn"], :root[data-scene="cloudy"][data-phase="dusk"] {
    --sky: linear-gradient(180deg, #7d7895 0%, #b2a2b6 50%, #e3c3c2 100%);
}

/* ---- nights ---- */
:root[data-phase="night"] {
    --sky: linear-gradient(180deg, #0a0f2e 0%, #1c1641 45%, #39204f 80%, #592a5a 100%);
    --sky-solid: #1c1641;
    --city-far: #2a2350; --city-near: #1b1638; --city-win: #ffd27a; --city-win-off: rgba(255, 255, 255, 0.05);
    --city-ground: #2c2446; --city-road: #151129; --city-line: #6e6290; --city-tree: #2b453f; --city-trunk: #2a2030; --city-ink: #0d0a1c;
}
:root[data-scene="partly"][data-phase="night"] {
    --sky: linear-gradient(180deg, #121634 0%, #262250 48%, #43295a 100%);
}
:root[data-scene="cloudy"][data-phase="night"] {
    --sky: linear-gradient(180deg, #17182a 0%, #2a283d 50%, #433a52 100%);
    --sky-solid: #2a283d;
    --city-far: #34314a; --city-near: #222035;
}
:root[data-scene="fog"][data-phase="night"] {
    --sky: linear-gradient(180deg, #25252f 0%, #383742 50%, #4e4b56 100%);
    --sky-solid: #383742;
    --city-far: #4a4855; --city-near: #353341; --city-ground: #474452; --city-road: #26242e;
}
:root[data-scene="drizzle"][data-phase="night"],
:root[data-scene="rain"][data-phase="night"] {
    --sky: linear-gradient(180deg, #0e1323 0%, #1c2337 50%, #2e3248 100%);
    --sky-solid: #1c2337;
    --card: rgba(16, 22, 40, 0.45);
    --city-far: #263048; --city-near: #171d30; --city-ground: #2a3046; --city-road: #0f121c; --city-line: #59607a;
}
:root[data-scene="storm"][data-phase="night"] {
    --sky: linear-gradient(180deg, #08060f 0%, #181227 50%, #2b213f 100%);
    --sky-solid: #181227;
}
:root[data-scene="snow"][data-phase="night"] {
    --sky: linear-gradient(180deg, #172036 0%, #2b3956 52%, #4a5675 100%);
    --sky-solid: #2b3956;
    --card: rgba(22, 30, 54, 0.42);
    --accent: #ff9cbc;
    --city-far: #3a4766; --city-near: #27314d; --city-ground: #dfe7f3; --city-road: #59627a; --city-line: #ffffff;
    --city-tree: #3f5f5a; --city-ink: #141a2c;
}

/* ---- the little town: one wash of colour over it (--city-tint) and a softer
   one over the far castle and cathedral (--city-haze), for each look ---- */
:root { --city-tint: rgba(255, 240, 230, 0); --city-haze: rgba(190, 215, 255, 0.42); }
:root[data-scene="partly"] { --city-tint: rgba(80, 90, 130, 0.06); --city-haze: rgba(200, 215, 240, 0.45); }
:root[data-scene="cloudy"] { --city-tint: rgba(80, 75, 110, 0.2); --city-haze: rgba(200, 198, 212, 0.5); }
:root[data-scene="fog"] { --city-tint: rgba(215, 212, 220, 0.38); --city-haze: rgba(222, 218, 224, 0.72); }
:root[data-scene="drizzle"] { --city-tint: rgba(50, 65, 100, 0.25); --city-haze: rgba(160, 172, 195, 0.55); }
:root[data-scene="snow"] { --city-tint: rgba(160, 180, 220, 0.12); --city-haze: rgba(215, 228, 243, 0.55); }
:root[data-scene="rain"] { --city-tint: rgba(30, 42, 80, 0.4); --city-haze: rgba(105, 120, 150, 0.55); }
:root[data-scene="storm"] { --city-tint: rgba(25, 15, 55, 0.55); --city-haze: rgba(60, 50, 90, 0.6); }
:root[data-scene="clear"][data-phase="dawn"], :root[data-scene="partly"][data-phase="dawn"] { --city-tint: rgba(255, 130, 120, 0.16); --city-haze: rgba(220, 160, 190, 0.5); }
:root[data-scene="clear"][data-phase="dusk"], :root[data-scene="partly"][data-phase="dusk"] { --city-tint: rgba(110, 40, 100, 0.36); --city-haze: rgba(170, 90, 150, 0.5); }
:root[data-scene="cloudy"][data-phase="dawn"], :root[data-scene="cloudy"][data-phase="dusk"] { --city-tint: rgba(110, 70, 110, 0.3); --city-haze: rgba(170, 140, 170, 0.5); }
:root[data-phase="night"] { --city-tint: rgba(14, 10, 48, 0.62); --city-haze: rgba(40, 32, 85, 0.6); }
:root[data-scene="cloudy"][data-phase="night"] { --city-tint: rgba(18, 16, 36, 0.66); --city-haze: rgba(45, 42, 65, 0.6); }
:root[data-scene="fog"][data-phase="night"] { --city-tint: rgba(50, 48, 60, 0.6); --city-haze: rgba(70, 68, 80, 0.7); }
:root[data-scene="drizzle"][data-phase="night"], :root[data-scene="rain"][data-phase="night"] { --city-tint: rgba(8, 12, 30, 0.68); --city-haze: rgba(28, 35, 55, 0.65); }
:root[data-scene="storm"][data-phase="night"] { --city-tint: rgba(6, 4, 15, 0.72); --city-haze: rgba(24, 18, 40, 0.65); }
:root[data-scene="snow"][data-phase="night"] { --city-tint: rgba(20, 30, 75, 0.52); --city-haze: rgba(45, 58, 90, 0.55); }

/* ---------------------------------------------------------------------
   The page
   --------------------------------------------------------------------- */
html { background: var(--sky-solid); transition: background-color 1.5s ease; }
body.wx-page {
    position: relative;
    background: transparent;
    color: var(--ink);
    transition: color 1.2s ease;
}
body.wx-page > header, body.wx-page > nav, body.wx-page > main, body.wx-page > footer { position: relative; z-index: 1; }
body.wx-page h1, body.wx-page h1 a { color: var(--ink); transition: color 1.2s ease; }
body.wx-page h2 { color: var(--muted); border-bottom-color: var(--line); transition: color 1.2s ease; }
.site-title, .site-title:visited { color: inherit; text-decoration: none; }

/* the pill menu, made of the same glass */
body.wx-page {
    --ui-paper: var(--card);
    --ui-ink: var(--ink);
    --ui-line: var(--card-line);
    --ui-visited: var(--ink);
}
body.wx-page nav a, body.wx-page nav a:visited {
    color: var(--ink);
    border-color: var(--card-line);
    background: var(--card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
body.wx-page nav a:hover, body.wx-page nav a:visited:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 6px 16px var(--glow);
}
body.wx-page footer { margin-top: 0; border-top: 0; color: var(--muted); position: relative; z-index: 1; }

/* the sky behind everything */
.wx-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--sky); }
.wx-sky > i { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.wx-sky > i.on { opacity: 1; }
#wx-air { position: absolute; inset: 0; }
.wx-sky .wx-flash { background: radial-gradient(ellipse at 50% 20%, rgba(240, 244, 255, 0.9), rgba(220, 228, 255, 0.35) 60%, transparent); opacity: 0; transition: none; }
.wx-sky .wx-flash.go { animation: wx-flash 0.9s ease-out; }
@keyframes wx-flash { 0% { opacity: 0; } 8% { opacity: 0.85; } 18% { opacity: 0.15; } 28% { opacity: 0.6; } 100% { opacity: 0; } }

main.wx-main {
    display: block;
    flex: 1 0 auto;
    width: 100%;
    max-width: 1180px;
    margin: 6px auto 0;
    font-family: var(--wx-serif);
}
main.wx-main p { margin: 0; }
/* the site makes every paragraph black; here they follow the weather */
:where(body.wx-page) p { color: inherit; font-size: inherit; }
main.wx-main button, main.wx-main input { font-family: inherit; color: inherit; }
main.wx-main svg { flex: none; }
.wx-main a, .wx-main a:visited { color: var(--ink); }

/* ---------------------------------------------------------------------
   Search, my location, settings
   --------------------------------------------------------------------- */
.wx-bar { position: relative; z-index: 20; display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.wx-search { position: relative; flex: 1; min-width: 0; max-width: 560px; }
.wx-search > svg {
    position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
    fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.wx-search.busy > svg { animation: wx-pulse 0.9s ease-in-out infinite; }
#wx-q {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px 11px 42px;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    background: var(--card);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: var(--card-shadow);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 1.2s ease;
}
#wx-q::placeholder { color: var(--faint); }
#wx-q:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow), var(--card-shadow); }
#wx-q::-webkit-search-cancel-button { filter: grayscale(1); opacity: 0.6; }
.wx-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    margin: 0; padding: 6px; list-style: none;
    border: 1px solid var(--card-line);
    border-radius: 18px;
    background: var(--card);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    backdrop-filter: blur(22px) saturate(1.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    animation: wx-drop 0.25s var(--wx-ease);
    max-height: 340px; overflow-y: auto;
}
/* the list needs a solid back so it reads over the cards */
.wx-results::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--sky-solid); opacity: 0.85; }
.wx-results li {
    display: flex; flex-direction: column; gap: 1px;
    padding: 9px 12px; border-radius: 12px; cursor: pointer;
    transition: background 0.15s ease;
}
.wx-results li.on, .wx-results li:hover { background: var(--glow); }
.wx-r-name { font-size: 1rem; }
.wx-r-where { font-size: 0.82rem; color: var(--muted); }
.wx-results .wx-r-none { cursor: default; color: var(--muted); font-style: italic; }
.wx-results .wx-r-none:hover { background: none; }

.wx-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 16px;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    background: var(--card);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--card-shadow);
    color: var(--ink);
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s var(--wx-ease), background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.wx-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wx-pill:hover { transform: translateY(-1px); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 18px var(--glow); }
.wx-pill:active { transform: scale(0.97); }
.wx-pill:focus-visible, .wx-love:focus-visible, .wx-hour:focus-visible, .wx-day-row:focus-visible, .wx-seg button:focus-visible, .wx-chip button:focus-visible, .wx-btn:focus-visible, .wx-x:focus-visible, .wx-link:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
.wx-pill.busy svg { animation: wx-bob 0.8s ease-in-out infinite; }
.wx-icon-only { padding: 10px 11px; }
.wx-icon-only:hover svg { animation: wx-spin 1.2s linear; }

/* places you love */
.wx-places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wx-places:empty { display: none; }
.wx-chip {
    display: inline-flex; align-items: center;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    background: var(--card);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 0.9rem;
    animation: wx-pop 0.4s var(--wx-ease) both;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.wx-chip button { border: 0; background: none; cursor: pointer; }
.wx-chip-go { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px 6px 12px; }
.wx-chip-go svg { width: 14px; height: 14px; fill: var(--accent); }
.wx-chip-x { padding: 4px 11px 6px 6px; font-size: 1.05rem; line-height: 1; color: var(--faint); }
.wx-chip-x:hover { color: var(--accent); }
.wx-chip.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.wx-chip:hover { border-color: var(--accent); }

/* ---------------------------------------------------------------------
   Right now
   --------------------------------------------------------------------- */
.wx-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "where where" "now line" "now sum";
    gap: 4px 30px;
    align-items: end;
    padding: 30px 4px 26px;
}
.wx-where { grid-area: where; }
.wx-now { grid-area: now; display: flex; align-items: center; gap: 18px; }
.wx-line { grid-area: line; max-width: 24em; justify-self: end; text-align: right; font-style: italic; font-size: 1.12rem; line-height: 1.45; }
.wx-summary { grid-area: sum; max-width: 26em; justify-self: end; text-align: right; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.wx-line::before { content: "♥ "; color: var(--accent); font-style: normal; }

.wx-place { display: flex; align-items: center; gap: 10px; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: 0.01em; }
.wx-sub { margin-top: 4px !important; color: var(--muted); font-size: 0.95rem; }
.wx-love {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--card-line);
    border-radius: 50%;
    background: var(--card);
    cursor: pointer;
    transition: transform 0.25s var(--wx-ease), background 0.25s ease, border-color 0.25s ease;
}
.wx-love svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; transition: fill 0.25s ease, transform 0.35s var(--wx-ease); }
.wx-love:hover { transform: scale(1.08); border-color: var(--accent); }
.wx-love[aria-pressed="true"] svg { fill: var(--accent); animation: wx-beat 0.6s var(--wx-ease); }

.wx-now-icon { width: clamp(120px, 15vw, 172px); height: clamp(120px, 15vw, 172px); margin: -14px -10px -14px -16px; filter: drop-shadow(0 10px 22px var(--glow)); }
.wx-now-icon .wx-ico { width: 100%; height: 100%; }
.wx-temp { display: flex; align-items: flex-start; font-size: clamp(4.4rem, 11vw, 7.4rem); line-height: 0.9; font-weight: 300; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.wx-temp sup { margin: 0.12em 0 0 0.04em; font-size: 0.32em; letter-spacing: 0; color: var(--muted); }
.wx-cond { margin-top: 8px !important; font-size: 1.1rem; }
.wx-hilo { display: flex; gap: 14px; margin-top: 3px !important; color: var(--muted); font-size: 0.95rem; }

.wx-hero.is-in .wx-where { animation: wx-up 0.7s var(--wx-ease) both; }
.wx-hero.is-in .wx-now-icon { animation: wx-float-in 1s var(--wx-ease) 0.05s both; }
.wx-hero.is-in .wx-now-main { animation: wx-up 0.7s var(--wx-ease) 0.12s both; }
.wx-hero.is-in .wx-line { animation: wx-up 0.7s var(--wx-ease) 0.2s both; }
.wx-hero.is-in .wx-summary { animation: wx-up 0.7s var(--wx-ease) 0.28s both; }
.wx-now-icon .wx-ico { animation: wx-hover 6s ease-in-out infinite; }

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.wx-card, .wx-tile {
    position: relative;
    border: 1px solid var(--card-line);
    border-radius: 22px;
    background: var(--card);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: var(--card-shadow);
    transition: background 1.2s ease, border-color 1.2s ease, box-shadow 0.3s ease, transform 0.3s var(--wx-ease);
}
.wx-card { padding: 16px 18px 14px; margin-top: 16px; }
.wx-card.is-in, .wx-tile.is-in { animation: wx-up 0.7s var(--wx-ease) both; }
.wx-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 10px; }
.wx-label {
    display: flex; align-items: center; gap: 7px;
    margin: 0;
    font-size: 0.72rem; font-weight: normal; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted);
}
.wx-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wx-note { color: var(--muted); font-size: 0.9rem; }

/* little segmented switches */
.wx-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--card-line); border-radius: 999px; background: var(--track); }
.wx-seg button {
    padding: 5px 12px; border: 0; border-radius: 999px; background: none;
    color: var(--muted); font-size: 0.85rem; cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}
.wx-seg button:hover { color: var(--ink); }
.wx-seg button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 10px var(--glow); }

/* ---------------------------------------------------------------------
   Hour by hour
   --------------------------------------------------------------------- */
.wx-hours {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    margin: 0 -6px;
    padding: 4px 6px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--track) transparent;
    cursor: grab;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent);
}
.wx-hours:active { cursor: grabbing; }
.wx-hours:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.wx-hours-in { position: relative; width: calc(var(--n) * 64px); padding-top: 22px; }
.wx-curve { position: absolute; left: 0; top: 104px; width: 100%; height: 64px; pointer-events: none; overflow: visible; }
.wx-curve-line { stroke-dasharray: 4000; stroke-dashoffset: 0; animation: wx-draw 1.4s var(--wx-ease) both; }
.wx-sunmark {
    position: absolute; top: 0; transform: translateX(-50%);
    padding: 1px 8px; border-radius: 999px;
    background: var(--track);
    font-size: 0.72rem; white-space: nowrap; color: var(--muted);
}
.wx-sunmark::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 200px; background: linear-gradient(var(--accent), transparent 60%); opacity: 0.4; }
.wx-sunmark.sunrise { color: var(--ink); }
.wx-hour-cols { position: relative; display: grid; grid-template-columns: repeat(var(--n), 64px); }
.wx-hour {
    position: relative;
    display: grid; grid-template-rows: 18px 40px 22px 70px 20px; justify-items: center; align-items: center;
    padding: 4px 0; border: 0; border-radius: 16px; background: none; cursor: pointer;
    transition: background 0.25s ease;
}
.wx-hour:hover { background: var(--track); }
.wx-hour.on { background: var(--glow); }
.wx-hour.now .wx-h-t { color: var(--accent); font-weight: bold; }
.wx-hour.newday::before {
    content: attr(data-day);
    position: absolute; left: -1px; top: -18px;
    font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.wx-hour.newday::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.wx-h-t { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.wx-hour .wx-ico { width: 46px; height: 46px; }
.wx-h-v { font-size: 1rem; font-variant-numeric: tabular-nums; }
.wx-h-p { grid-row: 5; font-size: 0.72rem; color: var(--rain); }
.wx-arrow { display: inline-block; width: 14px; height: 14px; transform: rotate(calc(var(--d) + 180deg)); }
.wx-arrow::before { content: "↑"; display: block; line-height: 14px; font-style: normal; color: var(--windc); font-size: 0.9rem; }
.wx-hour-pick { margin-top: 6px !important; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.wx-hour-pick b { color: var(--ink); font-weight: normal; font-style: italic; }

/* ---------------------------------------------------------------------
   Ten days + the tiles beside them
   --------------------------------------------------------------------- */
.wx-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr); gap: 16px; align-items: start; margin-top: 16px; }
.wx-cols > .wx-card { margin-top: 0; }
.wx-days { margin: 0; padding: 0; list-style: none; }
.wx-day + .wx-day { border-top: 1px solid var(--line); }
.wx-day-row {
    display: grid;
    grid-template-columns: 5.6em 34px 2.6em 2.8em minmax(50px, 1fr) 2.8em;
    gap: 8px; align-items: center;
    width: 100%; padding: 8px 6px; border: 0; border-radius: 12px; background: none;
    font-size: 0.98rem; text-align: left; cursor: pointer;
    transition: background 0.2s ease;
}
.wx-day-row:hover { background: var(--track); }
.wx-day.open .wx-day-row { background: var(--glow); }
.wx-d-name { display: flex; flex-direction: column; line-height: 1.15; }
.wx-d-name small { font-size: 0.72rem; color: var(--faint); }
.wx-day-row .wx-ico { width: 42px; height: 42px; margin: -5px; }
.wx-d-p { font-size: 0.78rem; color: var(--faint); }
.wx-d-p.wet { color: var(--rain); }
.wx-d-lo { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.wx-d-hi { font-variant-numeric: tabular-nums; }
.wx-d-bar { position: relative; height: 6px; border-radius: 99px; background: var(--track); }
.wx-d-bar > i { position: absolute; top: 0; bottom: 0; border-radius: 99px; transform-origin: left; }
.wx-day-card-anim .wx-d-bar > i, .wx-days-card.is-in .wx-d-bar > i { animation: wx-grow 0.9s var(--wx-ease) both; }
.wx-dot { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 0 10px var(--glow); }
.wx-day-more { padding: 4px 8px 12px 10px; font-size: 0.9rem; color: var(--muted); animation: wx-drop 0.3s var(--wx-ease); }
.wx-day-more p { margin-bottom: 6px !important; color: var(--ink); font-style: italic; }
.wx-day-more dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; }
.wx-day-more dt { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.wx-day-more dd { margin: 0; color: var(--ink); }

.wx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wx-tile { padding: 14px 15px 13px; min-height: 128px; display: flex; flex-direction: column; gap: 6px; }
.wx-tile:hover { transform: translateY(-2px); }
.wx-tile.wide { grid-column: span 2; }
.wx-big { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wx-big small { margin-left: 6px; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.02em; }
.wx-mid { font-size: 1.15rem; line-height: 1.2; }
.wx-small { font-size: 0.83rem; line-height: 1.4; color: var(--muted); }

/* wind compass */
.wx-wind { display: flex; align-items: center; gap: 12px; }
.wx-compass { width: 70px; height: 70px; flex: none; }
.wx-wind .wx-small { font-size: 0.8rem; }
.wx-c-ring { fill: var(--track); stroke: var(--line); stroke-width: 1; }
.wx-c-tick { stroke: var(--faint); stroke-width: 0.8; }
.wx-c-tick.main { stroke: var(--ink); stroke-width: 1.4; }
.wx-c-n, .wx-c-l { font-size: 9px; text-anchor: middle; dominant-baseline: middle; fill: var(--muted); font-family: var(--wx-serif); }
.wx-c-n { fill: var(--accent); font-weight: bold; }
.wx-c-arrow { transform-origin: 50px 50px; transform: rotate(var(--d)); transition: transform 1.2s var(--wx-ease); }
.wx-tile.is-in .wx-c-arrow { animation: wx-needle 1.4s var(--wx-ease) both; }
.wx-c-arrow path, .wx-c-arrow circle { fill: var(--windc); }
.wx-c-arrow line { stroke: var(--windc); stroke-width: 2; stroke-linecap: round; }

/* humidity bar, uv scale */
.wx-meter { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.wx-meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rain), var(--accent)); transform-origin: left; }
.wx-tile.is-in .wx-meter > i, .wx-tile.is-in .wx-d-bar > i { animation: wx-grow 1s var(--wx-ease) 0.2s both; }
.wx-uv { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #66c27a, #f2c94c 30%, #f2994a 55%, #eb5757 75%, #9b51e0); }
.wx-uv > i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 2px 6px rgba(0, 0, 0, 0.25); }

/* the sun's path */
.wx-sunarc { width: 100%; height: auto; max-height: 92px; overflow: visible; }
.wx-arc { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 4; }
.wx-arc-done { fill: none; stroke: var(--ico-sun); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: var(--f) 1; }
.wx-horizon { stroke: var(--faint); stroke-width: 1; }
.wx-sundot { fill: var(--ico-sun); filter: drop-shadow(0 0 6px var(--ico-sun)); }
.wx-sundot.down { fill: var(--faint); filter: none; }
.wx-tile.is-in .wx-sundot { animation: wx-pop 0.8s var(--wx-ease) 0.4s both; transform-box: fill-box; transform-origin: center; }
.wx-two { display: flex; justify-content: space-between; font-size: 0.92rem; }

/* the moon */
.wx-moonrow { display: flex; align-items: center; gap: 14px; }
.wx-moon { width: 78px; height: 78px; margin: -8px -4px -8px -8px; }
.wx-tile.is-in .wx-moon { animation: wx-float-in 1.1s var(--wx-ease) both; }

/* air quality gauge */
.wx-aqi { display: flex; align-items: center; gap: 10px; }
.wx-aqi svg { width: 104px; height: auto; }
.wx-aqi-track { fill: none; stroke-width: 9; stroke-linecap: round; }
.wx-aqi-needle { transform-origin: 60px 62px; transform: rotate(var(--a)); }
.wx-tile.is-in .wx-aqi-needle { animation: wx-needle-a 1.4s var(--wx-ease) both; }
.wx-aqi-needle line { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.wx-aqi-needle circle { fill: var(--ink); }
.wx-pols { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8rem; color: var(--muted); }
.wx-pols b { color: var(--ink); font-weight: normal; }

/* pollen */
.wx-pollen { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.wx-pollen li { display: flex; justify-content: space-between; align-items: center; }
.wx-pollen i { padding: 0 8px; border-radius: 99px; font-style: normal; font-size: 0.74rem; }
.wx-pollen .lv-none { color: var(--faint); }
.wx-pollen .lv-low { background: rgba(102, 194, 122, 0.25); }
.wx-pollen .lv-moderate { background: rgba(242, 201, 76, 0.35); }
.wx-pollen .lv-high { background: rgba(235, 87, 87, 0.35); }

/* pressure */
.wx-gauge-row { display: flex; align-items: center; gap: 12px; }
.wx-gauge { width: 84px; height: 84px; }
.wx-g-track { fill: none; stroke: var(--track); stroke-width: 7; stroke-linecap: round; }
.wx-g-needle { transform-origin: 50px 54px; transform: rotate(var(--a)); }
.wx-tile.is-in .wx-g-needle { animation: wx-needle-a 1.4s var(--wx-ease) both; }
.wx-g-needle line { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.wx-g-needle circle { fill: var(--accent); }

/* rain chance as drops */
.wx-drops { display: flex; gap: 4px; }
.wx-drops i { width: 10px; height: 13px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--track); clip-path: polygon(50% 0, 100% 60%, 85% 100%, 15% 100%, 0 60%); }
.wx-drops i.on { background: var(--rain); }
.wx-tile.is-in .wx-drops i.on { animation: wx-drip 0.5s var(--wx-ease) both; }
.wx-drops i:nth-child(2) { animation-delay: 0.05s !important; } .wx-drops i:nth-child(3) { animation-delay: 0.1s !important; }
.wx-drops i:nth-child(4) { animation-delay: 0.15s !important; } .wx-drops i:nth-child(5) { animation-delay: 0.2s !important; }
.wx-drops i:nth-child(6) { animation-delay: 0.25s !important; } .wx-drops i:nth-child(7) { animation-delay: 0.3s !important; }
.wx-drops i:nth-child(8) { animation-delay: 0.35s !important; } .wx-drops i:nth-child(9) { animation-delay: 0.4s !important; }
.wx-drops i:nth-child(10) { animation-delay: 0.45s !important; }

/* cloud cover as little drifting puffs */
.wx-clouds { position: relative; height: 24px; overflow: hidden; border-radius: 12px; background: var(--track); }
.wx-clouds i {
    position: absolute; top: 5px; left: calc(var(--k) * 21%);
    width: 26px; height: 12px; border-radius: 99px; background: var(--ico-cloud);
    opacity: calc(0.15 + var(--c) * 0.85);
    animation: wx-puff 9s ease-in-out infinite alternate;
    animation-delay: calc(var(--k) * -1.7s);
}
.wx-clouds i::before { content: ""; position: absolute; left: 6px; top: -6px; width: 13px; height: 13px; border-radius: 50%; background: inherit; }

/* the next two hours */
.wx-soon.dry .wx-card-head { margin-bottom: 0; }
.wx-soon.dry .wx-soon-chart { display: none; }
.wx-soon-chart { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; align-items: end; height: 110px; }
.wx-soon-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; gap: 3px; }
.wx-soon-col i { align-self: end; justify-self: center; width: 70%; max-width: 34px; height: max(3px, var(--h)); border-radius: 8px 8px 3px 3px; background: linear-gradient(var(--rain), color-mix(in srgb, var(--rain) 40%, transparent)); transform-origin: bottom; animation: wx-rise 0.9s var(--wx-ease) both; }
.wx-soon-col span { font-size: 0.72rem; color: var(--muted); }
.wx-soon-col small { font-size: 0.68rem; color: var(--rain); min-height: 1em; }

/* ---------------------------------------------------------------------
   NOAA radar (places in the US)
   --------------------------------------------------------------------- */
.wx-radar[hidden] { display: none; }
.wx-radar-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wx-radar-ctl .wx-pill { padding: 7px; }
.wx-radar-ctl .wx-pill svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; }
#wx-radar-range { width: 160px; accent-color: var(--accent); cursor: pointer; }
.wx-radar-time { min-width: 9.5em; font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wx-radar-map {
    height: 430px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-line);
    background: var(--track);
    font-family: var(--wx-serif);
}
.wx-radar-map .leaflet-bar { border: 1px solid var(--card-line); border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
.wx-radar-map .leaflet-bar a { width: 32px; height: 32px; line-height: 30px; background: var(--sky-solid); color: var(--ink); border-bottom-color: var(--card-line); font-family: var(--wx-serif); }
.wx-radar-map .leaflet-bar a:hover { background: var(--accent); color: var(--accent-ink); }
.wx-radar-map .leaflet-control-attribution { background: rgba(255, 255, 255, 0.7); color: #444; font-size: 10px; border-radius: 8px 0 0 0; }
.wx-radar-map .leaflet-control-attribution a { color: #8a2b1d; }
/* the map underneath: soft by day, inverted into a night map when the page is dark (the radar itself is not touched) */
.wx-radar-map .wx-base-light { filter: saturate(0.6) sepia(0.12) brightness(1.02); }
.wx-radar-map .wx-base-dark { filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92) saturate(0.45); }
.wx-radar-pin { position: relative; }
.wx-radar-pin svg { position: relative; width: 28px; height: 28px; fill: var(--accent); stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); animation: wx-beat 2.4s ease-in-out infinite; }
.wx-radar-pin i { position: absolute; left: 50%; top: 58%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); opacity: 0.5; animation: wx-ping 2.4s ease-out infinite; }
@keyframes wx-ping { from { transform: scale(0.6); opacity: 0.6; } to { transform: scale(4.5); opacity: 0; } }
.wx-radar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-top: 10px; }
.wx-radar-legend { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); width: 260px; padding-top: 12px; font-size: 0.72rem; color: var(--muted); }
.wx-radar-legend i { position: absolute; left: 0; right: 0; top: 0; height: 7px; border-radius: 99px;
    background: linear-gradient(90deg, #04e9e7, #019ff4, #0300f4, #02fd02, #01c501, #008e00, #fdf802, #e5bc00, #fd9500, #fd0000, #d40000, #bc0000, #f800fd, #9854c6); }
.wx-radar-legend small:last-child { text-align: right; }
.wx-radar-foot .wx-note { font-size: 0.8rem; }
@media (max-width: 760px) {
    .wx-radar-map { height: 340px; }
    #wx-radar-range { width: 120px; }
}

/* credit */
.wx-credit { margin: 22px 0 6px !important; font-size: 0.8rem; color: var(--muted); text-align: center; line-height: 1.6; }
.wx-link { padding: 0; border: 0; background: none; color: var(--accent) !important; text-decoration: underline; cursor: pointer; font-size: inherit; }

/* ---------------------------------------------------------------------
   The icons: Meteocons (they animate themselves)
   --------------------------------------------------------------------- */
img.wx-ico, .wx-tico, .wx-mini, .wx-moon { display: block; object-fit: contain; -webkit-user-drag: none; user-select: none; filter: drop-shadow(0 1px 2px rgba(40, 30, 60, 0.28)); }
.wx-tico, .wx-mini { display: inline-block; }
.wx-tico { width: 26px; height: 26px; margin: -6px -2px -6px -6px; }
.wx-mini { width: 20px; height: 20px; margin: -6px 1px -5px -3px; vertical-align: middle; }
.wx-sunmark .wx-mini { width: 17px; height: 17px; }

/* heart burst when you love a place */
.wx-burst {
    position: absolute; z-index: 60; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.3-9-8.6C1.6 8 3.4 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.4 0 5.2 3.5 3.8 6.9C19 15.7 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.3-9-8.6C1.6 8 3.4 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.4 0 5.2 3.5 3.8 6.9C19 15.7 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: wx-burst 1.2s var(--wx-ease) both;
}

/* ---------------------------------------------------------------------
   The little city
   --------------------------------------------------------------------- */
.wx-city-wrap {
    position: relative; z-index: 1;
    width: 100vw;
    height: 310px;
    margin: 30px 0 0 calc(50% - 50vw);
    -webkit-mask-image: linear-gradient(transparent, #000 10%);
    mask-image: linear-gradient(transparent, #000 10%);
}
.wx-city-wrap[hidden] { display: none; }
#wx-city { display: block; width: 100%; height: 100%; }

/* ---------------------------------------------------------------------
   Settings
   --------------------------------------------------------------------- */
.wx-modal {
    position: fixed; inset: 0; z-index: 80;
    display: grid; place-items: center;
    padding: 16px;
    background: rgba(20, 10, 25, 0.38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.wx-modal[hidden] { display: none; }
.wx-modal.is-in { animation: wx-fade 0.25s ease both; }
.wx-modal.is-in .wx-sheet { animation: wx-up 0.4s var(--wx-ease) both; }
.wx-sheet {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 22px 22px 18px;
    border: 1px solid var(--card-line);
    border-radius: 24px;
    background: var(--sky-solid);
    background-image: linear-gradient(var(--card), var(--card));
    color: var(--ink);
    font-family: var(--wx-serif);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.wx-sheet p { margin: 0; }
.wx-kicker { font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.wx-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--track); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.wx-x:hover { background: var(--accent); color: var(--accent-ink); }
.wx-set-h { margin: 18px 0 6px; font-size: 1rem; font-weight: normal; font-style: italic; }
.wx-set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.wx-set-label { font-size: 0.95rem; }
.wx-set-row .wx-small { max-width: 18em; }
.wx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.wx-btn { padding: 9px 18px; border: 1px solid var(--card-line); border-radius: 999px; background: var(--track); color: var(--ink); font-family: inherit; font-size: 0.95rem; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease; }
.wx-btn:hover { transform: translateY(-1px); }
.wx-btn-main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px var(--glow); }

/* ---------------------------------------------------------------------
   Animations
   --------------------------------------------------------------------- */
@keyframes wx-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wx-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes wx-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes wx-float-in { from { opacity: 0; transform: translateY(18px) scale(0.85) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes wx-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes wx-drift { from { transform: translateX(-2px); } to { transform: translateX(3px); } }
@keyframes wx-rainfall { to { stroke-dashoffset: -20; } }
@keyframes wx-snowfall { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(6px) translateX(2px); opacity: 0; } }
@keyframes wx-bolt { 0%, 62%, 70%, 100% { opacity: 1; } 64%, 68% { opacity: 0.15; } }
@keyframes wx-fog { from { transform: translateX(-3px); } to { transform: translateX(4px); } }
@keyframes wx-draw { from { stroke-dashoffset: 4000; } to { stroke-dashoffset: 0; } }
@keyframes wx-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes wx-rise { from { transform: scaleY(0); } to { transform: none; } }
@keyframes wx-needle { from { transform: rotate(calc(var(--d) - 120deg)); } to { transform: rotate(var(--d)); } }
@keyframes wx-needle-a { from { transform: rotate(-90deg); } to { transform: rotate(var(--a)); } }
@keyframes wx-drip { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes wx-puff { from { transform: translateX(-6px); } to { transform: translateX(10px); } }
@keyframes wx-beat { 0% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(0.92); } 100% { transform: scale(1); } }
@keyframes wx-pulse { 50% { opacity: 0.35; } }
@keyframes wx-bob { 50% { transform: translateY(-3px); } }
@keyframes wx-burst {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(12deg); }
}

/* calmer, or none at all (the setting, and the system preference) */
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------
   Smaller screens
   --------------------------------------------------------------------- */
@media (max-width: 1020px) {
    .wx-cols { grid-template-columns: minmax(0, 1fr); }
    .wx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .wx-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "where" "now" "line" "sum"; gap: 10px; padding: 22px 0 14px; }
    .wx-line, .wx-summary { justify-self: start; text-align: left; }
    .wx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .wx-pill span { display: none; }
    .wx-pill { padding: 10px 11px; }
    .wx-city-wrap { height: 260px; }
}
@media (max-width: 480px) {
    .wx-card { padding: 14px 12px 12px; border-radius: 18px; }
    .wx-tile { padding: 12px; border-radius: 18px; min-height: 0; }
    .wx-day-row { grid-template-columns: 4.6em 28px 2.2em 2.4em minmax(30px, 1fr) 2.4em; gap: 6px; padding: 7px 2px; font-size: 0.92rem; }
    .wx-day-row .wx-ico { width: 36px; height: 36px; margin: -4px; }
    .wx-big { font-size: 1.6rem; }
    .wx-wind, .wx-gauge-row, .wx-aqi { flex-direction: column; align-items: flex-start; gap: 6px; }
    .wx-compass, .wx-gauge { width: 74px; height: 74px; }
    .wx-day-more dl { grid-template-columns: minmax(0, 1fr); }
}
