/* =========================================================
   MeteoNonna - stile comune a tutte le pagine
   Tema: [data-theme="light"|"dark"] su <html> (vedi layout.js)
   ========================================================= */
:root {
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --accent: #FF8A3D;

  --ground: #FFF7E8; --ink: #1B1A2E; --muted: #55536B; --card: #FFFFFF; --line: #F1E8D6;
  --chip: rgba(27,26,46,.08);
  --field: #FFFFFF; --field-line: #E8DCC4; --soft: #FFE7A3; --soft-ink: #3A2A00;
  --overlay: rgba(27,26,46,.45); --menu: #FFFFFF; --shadow: 0 10px 30px rgba(27,26,46,.12);

  --hero-sun: #FFC93C; --hero-partly: #FFD87A; --hero-cloud: #D7DEEA; --hero-rain: #9DB4DE; --hero-ink: #1B1A2E;
  --glow: #FFF6C9; --rays: #FFE27A; --disc: #FFF3B0;
  --cloud-light: #FFFFFF; --cloud-grey: #B9C3D3; --cloud-dark: #6F86B3;

  --m-morning: #DCEBFF; --m-morning-ink: #1D3A6B;
  --m-afternoon: #FF8A3D; --m-afternoon-ink: #3A1400;
  --m-evening: #6B4FA0; --m-evening-ink: #FFFFFF;
  --m-night: #2E2B6F; --m-night-ink: #FFFFFF;

  --d-sun: #FFE7A3; --d-sun-ink: #3A2A00; --d-sun-icon: #C26A00;
  --d-partly: #FFF0C7; --d-partly-ink: #3A2A00; --d-partly-icon: #C26A00;
  --d-cloud: #E4E9F2; --d-cloud-ink: #1B1A2E; --d-cloud-icon: #3D3A63;
  --d-rain: #1E3A8A; --d-rain-ink: #FFFFFF; --d-rain-icon: #FFFFFF;

  --tip-good: #CDEFD9; --tip-good-ink: #0F5A2E; --tip-wait: #ECEAF5; --tip-wait-ink: #3D3A63;
  --alert: #1E3A8A; --alert-ink: #FFFFFF; --alert-soft: #BFD0FF; --alert-text: #DCE5FF; --alert-lines: #5B7BD6;

  --h-head: #FFE7A3; --h-head-ink: #1B1A2E; --h-now: #FFF6DB; --h-wet: #E6F0FC; --h-wet-ink: #1E3A8A;
  --hero-snow: #DCE8F7; --hero-storm: #8E97B8; --hero-fog: #D3D7DF;
  --d-snow: #E3EEFB; --d-snow-ink: #17305C; --d-snow-icon: #2E6FD8;
  --d-storm: #3B4166; --d-storm-ink: #FFFFFF; --d-storm-icon: #FFFFFF;
  --d-fog: #E6E8EE; --d-fog-ink: #2A2D3A; --d-fog-icon: #5A6275;
  --i-snow: #3A86D6; --i-fog: #7C8496; --i-storm-fill: #A3AAC2; --fog-band: rgba(255,255,255,.55);
  --i-sun: #D98A00; --i-cloud-fill: #FFFFFF; --i-cloud: #55536B; --i-rain: #2E6FD8; --i-moon: #6B4FA0;
}
:root[data-theme="dark"] {
  --ground: #12111C; --ink: #F2F0FA; --muted: #A9A6C2; --card: #1E1C2C; --line: #2A2840;
  --chip: rgba(255,255,255,.12);
  --field: #1E1C2C; --field-line: #3A3854; --soft: #4A3B12; --soft-ink: #FFE7A3;
  --overlay: rgba(0,0,0,.6); --menu: #24223A; --shadow: 0 10px 30px rgba(0,0,0,.5);

  --hero-sun: #E5AE2E; --hero-partly: #D6B15E; --hero-cloud: #8D99B0; --hero-rain: #5F7BB8; --hero-ink: #14131F;
  --glow: #F7DE8A; --rays: #FFE27A; --disc: #FFEFA6;
  --cloud-light: #EEF1F7; --cloud-grey: #A7B1C3; --cloud-dark: #3F5689;

  --m-morning: #1F3357; --m-morning-ink: #D6E6FF;
  --m-afternoon: #E07A35; --m-afternoon-ink: #2A0F00;
  --m-evening: #4B3780; --m-evening-ink: #FFFFFF;
  --m-night: #23205A; --m-night-ink: #FFFFFF;

  --d-sun: #4A3B12; --d-sun-ink: #FFE7A3; --d-sun-icon: #FFC93C;
  --d-partly: #3E3620; --d-partly-ink: #FFEFC2; --d-partly-icon: #FFC93C;
  --d-cloud: #2A2F3D; --d-cloud-ink: #E4E9F2; --d-cloud-icon: #C9D2E3;
  --d-rain: #24438F; --d-rain-ink: #FFFFFF; --d-rain-icon: #FFFFFF;

  --tip-good: #17402A; --tip-good-ink: #8FE0AE; --tip-wait: #2A2840; --tip-wait-ink: #C9C6E8;
  --alert: #22408F; --alert-ink: #FFFFFF; --alert-soft: #BFD0FF; --alert-text: #DCE5FF; --alert-lines: #4A69C4;

  --h-head: #4A3B12; --h-head-ink: #FFE7A3; --h-now: #2A2615; --h-wet: #1A2742; --h-wet-ink: #9EC1FF;
  --hero-snow: #6F87AE; --hero-storm: #4E5677; --hero-fog: #7E8494;
  --d-snow: #26385A; --d-snow-ink: #E3EEFB; --d-snow-icon: #BFE0FF;
  --d-storm: #2B2F4A; --d-storm-ink: #FFFFFF; --d-storm-icon: #FFFFFF;
  --d-fog: #343842; --d-fog-ink: #E6E8EE; --d-fog-icon: #C2C8D4;
  --i-snow: #A9D3FF; --i-fog: #AEB6C6; --i-storm-fill: #4A5170; --fog-band: rgba(230,235,245,.35);
  --i-sun: #FFC93C; --i-cloud-fill: #3A4054; --i-cloud: #C9D2E3; --i-rain: #7FB0FF; --i-moon: #B9A6F0;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--ground); transition: background .3s; }
.sh-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.brand-name span { color: var(--accent); }
.sh-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--chip); cursor: pointer; font-weight: 700; font-size: 14px; }
.icon-btn:focus-visible, .pill-btn:focus-visible, .place:focus-visible, .temp-btn:focus-visible, .temp-hint:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang-wrap { position: relative; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 190px; background: var(--menu); border-radius: 16px; box-shadow: var(--shadow); z-index: 20; }
.lang-menu[hidden] { display: none; }
.lang-menu button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--chip); outline: none; }
.lang-menu button[aria-checked="true"] { font-weight: 700; }
.lang-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); }
.lang-code { display: inline-block; width: 28px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 36px; border-top: 1px solid var(--line); }
.sf-inner { max-width: 1120px; margin: 0 auto; padding: 24px 20px 36px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sf-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.sf-brand .brand-name { font-size: 18px; }
.sf-tag { margin: 6px 0 10px; font-weight: 500; }
.sf-credits { margin: 0 auto 6px; max-width: 560px; }
.sf-copy { margin: 0; }

/* ---------- caricamento / errore ---------- */
.loading { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.loading-sun { width: 84px; height: 84px; border-radius: 50%; background: var(--hero-sun); box-shadow: 0 0 0 14px var(--soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); } }
.error { padding: 60px 24px; text-align: center; }
.error h1 { font-family: var(--display); font-size: 30px; margin: 0 0 8px; }
.error button { margin-top: 20px; max-width: 260px; }

/* ---------- pagina meteo ---------- */
.weather { display: block; }
.col { min-width: 0; }

/* ---------- cielo ---------- */
.hero { position: relative; margin: 4px 12px 0; padding: 18px 20px 26px; border-radius: 32px; overflow: hidden; color: var(--hero-ink); transition: background .4s; }
.hero[data-sky="sun"] { background: var(--hero-sun); }
.hero[data-sky="partly"] { background: var(--hero-partly); }
.hero[data-sky="cloud"] { background: var(--hero-cloud); }
.hero[data-sky="rain"] { background: var(--hero-rain); }
.hero[data-sky="snow"] { background: var(--hero-snow); }
.hero[data-sky="storm"] { background: var(--hero-storm); }
.hero[data-sky="fog"] { background: var(--hero-fog); }
.hero > *:not(.scene) { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.place { background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; min-height: 44px; color: inherit; min-width: 0; }
.place-name { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; display: flex; align-items: center; gap: 6px; }
.place-area { display: block; font-size: 13px; opacity: .8; font-weight: 600; margin: 2px 0 0 28px; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; min-height: 40px; padding: 8px 16px; font-weight: 700; font-size: 14px; background: #FFFFFF; border-radius: 999px; color: #1B1A2E; white-space: nowrap; box-shadow: 0 2px 10px rgba(20,19,31,.16); }
.when { margin-top: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.when-day { font-family: var(--display); font-size: 20px; font-weight: 600; background: #1B1A2E; color: #FFFFFF; padding: 5px 14px 6px; border-radius: 999px; letter-spacing: -.2px; }
.when-date { font-size: 18px; font-weight: 700; }
.temp-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.temp-btn { background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; display: flex; align-items: flex-end; gap: 10px; color: inherit; }
.temp { font-family: var(--display); font-size: clamp(104px, 30vw, 140px); font-weight: 800; line-height: .85; letter-spacing: -6px; }
.temp-side { padding-bottom: 6px; display: block; }
.temp-side .min { display: block; font-size: 18px; font-weight: 700; margin-top: 2px; }
.temp-hint { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 14px; font-weight: 700; background: #FFFFFF; padding: 8px 16px; border-radius: 999px; border: 0; cursor: pointer; min-height: 38px; color: #1B1A2E; box-shadow: 0 2px 10px rgba(20,19,31,.16); }
.pill-btn:hover, .temp-hint:hover { box-shadow: 0 4px 14px rgba(20,19,31,.24); }
.headline { font-family: var(--display); font-size: clamp(30px, 8vw, 38px); font-weight: 600; line-height: 1.05; margin: 20px 0 0; letter-spacing: -.5px; }
.sub { font-size: 16px; line-height: 1.45; margin: 10px 0 0; max-width: 420px; }
.conf { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.45); padding: 5px 10px; border-radius: 999px; }
.conf i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.conf i.alta { background: #0F5A2E; } .conf i.media { background: #B86A00; } .conf i.bassa { background: #A32D2D; }

/* ---------- sfondi animati ---------- */
.scene { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sc-sun { position: absolute; right: -90px; top: -80px; width: 320px; height: 320px; }
.sc-sun.small { right: -60px; top: -70px; width: 250px; height: 250px; }
.sc-sun svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-glow circle { fill: var(--glow); }
.sc-rays { fill: var(--rays); opacity: .9; animation: spin 80s linear infinite; }
.sc-disc circle { fill: var(--disc); }
.sc-glow { animation: breathe 6s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.07); opacity: .8; } }
.sc-cloud { position: absolute; left: 0; animation: drift linear infinite; will-change: transform; }
.sc-cloud svg { display: block; width: 100%; height: auto; }
.sc-cloud.light path { fill: var(--cloud-light); opacity: .85; }
.sc-cloud.grey path { fill: var(--cloud-grey); opacity: .8; }
.sc-cloud.dark path { fill: var(--cloud-dark); opacity: .75; }
@keyframes drift { from { transform: translateX(-110%); } to { transform: translateX(680px); } }
.scene-rain { background: linear-gradient(180deg, rgba(30,58,138,.18), transparent 70%); }
.sc-drop { position: absolute; top: -30px; width: 2px; height: 18px; border-radius: 2px; background: rgba(255,255,255,.75); transform: rotate(12deg); animation: fall linear infinite; }
@keyframes fall { from { transform: translate(0, 0) rotate(12deg); } to { transform: translate(-90px, 700px) rotate(12deg); } }
.sc-flake { position: absolute; top: -12px; width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; opacity: .9; animation: snow linear infinite; }
@keyframes snow { 0% { transform: translate(0, 0); } 50% { transform: translate(18px, 350px); } 100% { transform: translate(-6px, 700px); } }

/* sagome dei monumenti (skylines.js): prendono la tinta dal cielo */
.hero-skyline { margin: 6px -20px -4px; height: 118px; pointer-events: none; }
.sc-skyline { display: block; width: 100%; height: 100%; color: var(--skl, #1B1A2E); animation: skl-in 1.2s ease-out both; }
.sc-skyline .sk-back { fill: currentColor; opacity: var(--skl-back, .07); }
.sc-skyline .sk-front { fill: currentColor; opacity: var(--skl-front, .15); }
.hero[data-sky="sun"], .hero[data-sky="partly"] { --skl: #8A4A00; --skl-front: .5; --skl-back: .2; }
.hero[data-sky="cloud"] { --skl: #2B3550; --skl-front: .45; --skl-back: .18; }
.hero[data-sky="rain"] { --skl: #13224F; --skl-front: .5; --skl-back: .22; }
.hero[data-sky="storm"] { --skl: #0E1030; --skl-front: .55; --skl-back: .25; }
.hero[data-sky="snow"] { --skl: #2A4A7A; --skl-front: .45; --skl-back: .18; }
.hero[data-sky="fog"] { --skl: #3A3F4E; --skl-front: .35; --skl-back: .14; }
/* la sagoma: un orizzonte sotto la temperatura */
@media (min-width: 640px) { .hero-skyline { margin-left: -28px; margin-right: -28px; height: 140px; } }
@keyframes skl-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- momenti ---------- */
.moments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 12px 0; }
.moment { border-radius: 24px; padding: 14px 12px 16px; }
.moment .lab { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.moment .t { font-family: var(--display); font-size: 44px; font-weight: 800; line-height: 1; margin: 10px 0 12px; letter-spacing: -2px; }
.moment .tip { font-size: 14px; font-weight: 700; margin-top: 4px; line-height: 1.25; }
.m-morning { background: var(--m-morning); color: var(--m-morning-ink); }
.m-afternoon { background: var(--m-afternoon); color: var(--m-afternoon-ink); }
.m-evening { background: var(--m-evening); color: var(--m-evening-ink); }
.m-night { background: var(--m-night); color: var(--m-night-ink); }

/* ---------- settimana ---------- */
.section { padding: 40px 12px 0; }
.section h2 { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 0 6px 12px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border-radius: 18px; padding: 10px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.day .d { font-size: 12px; font-weight: 700; }
.day .t { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.day .mn { font-size: 11px; opacity: .75; margin-top: -4px; }
.d-sun { background: var(--d-sun); color: var(--d-sun-ink); } .d-sun svg { color: var(--d-sun-icon); }
.d-partly { background: var(--d-partly); color: var(--d-partly-ink); } .d-partly svg { color: var(--d-partly-icon); }
.d-cloud { background: var(--d-cloud); color: var(--d-cloud-ink); } .d-cloud svg { color: var(--d-cloud-icon); }
.d-rain { background: var(--d-rain); color: var(--d-rain-ink); } .d-rain svg { color: var(--d-rain-icon); }
.d-snow { background: var(--d-snow); color: var(--d-snow-ink); } .d-snow svg { color: var(--d-snow-icon); }
.d-storm { background: var(--d-storm); color: var(--d-storm-ink); } .d-storm svg { color: var(--d-storm-icon); }
.d-fog { background: var(--d-fog); color: var(--d-fog-ink); } .d-fog svg { color: var(--d-fog-icon); }

/* ---------- consigli ---------- */
.tips { display: flex; flex-direction: column; gap: 10px; }
.tip-card { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 22px; padding: 14px 16px; }
.tip-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tip-icon.good { background: var(--tip-good); color: var(--tip-good-ink); }
.tip-icon.wait { background: var(--tip-wait); color: var(--tip-wait-ink); }
.tip-title { font-size: 16px; font-weight: 700; }
.tip-text { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- avviso ---------- */
.alert { margin: 16px 12px 0; position: relative; background: var(--alert); color: var(--alert-ink); border-radius: 28px; padding: 20px 20px 22px; overflow: hidden; }
.alert .rainlines { position: absolute; right: -10px; top: -6px; stroke: var(--alert-lines); }
.alert-when { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--alert-soft); text-transform: uppercase; }
.alert-row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.alert-title { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.05; max-width: 240px; }
.alert-t { text-align: right; }
.alert-t b { display: block; font-family: var(--display); font-size: 48px; font-weight: 800; line-height: .9; letter-spacing: -2px; }
.alert-t span { font-size: 13px; color: var(--alert-soft); }
.alert-text { position: relative; font-size: 14px; line-height: 1.45; margin-top: 12px; color: var(--alert-text); }
.updated { padding: 20px 20px 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- ricerca ---------- */
.search { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; z-index: 30; }
.search[hidden] { display: none; }
.search-box { width: 100%; max-width: 440px; background: var(--ground); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.search-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.search-label { font-family: var(--display); font-size: 20px; font-weight: 600; }
.search-close { background: none; border: 0; font-size: 30px; line-height: 1; width: 44px; height: 44px; cursor: pointer; flex-shrink: 0; }
#q { width: 100%; margin-top: 10px; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--field-line); background: var(--field); color: var(--ink); }
#q:focus { outline: none; border-color: var(--accent); }
.search-geo { margin-top: 10px; width: 100%; min-height: 44px; border: 0; border-radius: 14px; background: var(--soft); color: var(--soft-ink); font-weight: 700; cursor: pointer; }
.results { list-style: none; margin: 10px 0 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.results button { width: 100%; text-align: left; background: var(--card); border: 0; border-radius: 14px; padding: 12px 14px; margin-top: 6px; cursor: pointer; min-height: 44px; }
.results b { display: block; font-size: 16px; }
.results span { font-size: 13px; color: var(--muted); }
.res-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 14px 4px 2px; }
.res-msg { font-size: 14px; color: var(--muted); padding: 12px 4px; }

/* ---------- ora per ora ---------- */
.sheet { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet[hidden] { display: none; }
.sheet-box { width: 100%; max-width: 560px; height: 92vh; display: flex; flex-direction: column; background: var(--ground); border-radius: 28px 28px 0 0; padding: 18px 0 0; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-box .search-head { padding: 0 18px; }
.sheet-title { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0; }
.sheet-sub { margin: 4px 18px 10px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.hours-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 28px; }
.hrow { display: grid; grid-template-columns: 62px 44px minmax(0, 1fr) 66px; align-items: center; column-gap: 10px; }
.hday { background: var(--card); border-radius: 20px; margin-top: 10px; }
.hday .hrow:last-child { border-radius: 0 0 20px 20px; }
.hday-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 10px; background: var(--h-head); color: var(--h-head-ink); border-radius: 20px 20px 0 0; font-family: var(--display); font-size: 19px; font-weight: 600; }
.hday-span { font-family: var(--body); font-size: 16px; font-weight: 700; }
.hrow { padding: 12px 10px; border-top: 1px solid var(--line); min-height: 68px; }
.hrow.now { background: var(--h-now); }
.hrow.wet { background: var(--h-wet); }
.h-time { font-size: 18px; font-weight: 700; }
.h-sky { display: flex; justify-content: center; }
.h-sky.sun, .h-sky.partly { color: var(--i-sun); } .h-sky.cloud { color: var(--i-cloud); }
.h-sky.sky, .h-sky.wx { color: var(--i-cloud); } .h-sky.rain { color: var(--i-rain); } .h-sky.moon { color: var(--i-moon); }
.h-desc { min-width: 0; line-height: 1.2; }
.h-desc b { display: block; font-size: 18px; font-weight: 700; line-height: 1.15; hyphens: auto; }
.h-desc span { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.h-temp { font-family: var(--display); font-size: 27px; font-weight: 800; text-align: right; letter-spacing: -.5px; }
.h-rain, .h-wind { text-align: right; line-height: 1.2; }
.h-rain b, .h-wind b { display: block; font-size: 14px; font-weight: 700; }
.h-rain span, .h-wind span { font-size: 12px; color: var(--muted); }
.hrow.wet .h-rain b { color: var(--h-wet-ink); }

/* ---------- telefono piccolo ---------- */
@media (max-width: 370px) {
  .brand-name { font-size: 19px; }
  .moment .t { font-size: 38px; }
  .hrow { grid-template-columns: 54px 40px minmax(0, 1fr) 58px; column-gap: 7px; }
  .place-name { font-size: 22px; }
  .h-temp { font-size: 24px; }
}

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .weather { max-width: 680px; margin: 0 auto; }
  .hero { margin: 8px 16px 0; padding: 22px 28px 30px; }
  .moments, .section { padding-left: 16px; padding-right: 16px; }
  .alert { margin-left: 16px; margin-right: 16px; }
  .sheet { align-items: center; }
  .sheet-box { height: 86vh; border-radius: 28px; }
}

/* ---------- computer: due colonne ---------- */
@media (min-width: 980px) {
  .sh-inner { padding: 14px 24px; }
  .weather { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px 24px; align-items: start; padding: 0 8px; }
  .col-b > .section:first-child { padding-top: 8px; }
  .today-b .moments { padding-top: 8px; }
  .today-b .acts { padding-top: 20px; }
  .hours-inline { padding-top: 20px; }
  /* la settimana: un capitolo a se', staccato da "oggi" */
  .today-b + .week-sec { margin-top: 48px; padding-top: 34px; position: relative; }
  .today-b + .week-sec h2 { font-size: 26px; }
  .hours-inline .hday { margin-top: 6px; }
  .hours-inline .hday-head { position: static; }
  .hero { min-height: 520px; }
  .updated { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-rays, .sc-glow, .sc-cloud, .sc-drop, .sc-flake, .loading-sun, .sheet-box, .sc-skyline { animation: none !important; }
  .sc-drop, .sc-flake { display: none; }
}

/* interruttore "Mostra i numeri" */
.num-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0 18px 10px; font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 32px; }
.num-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

/* icone della pioggia animate: le striscette cadono */
.ri .st { stroke-dasharray: 3 5; animation: rfall 1s linear infinite; }
.ri-drops .st { stroke-dasharray: 2 6; animation-duration: 1.4s; }
.ri-little .st { animation-duration: 1.15s; }
.ri-lots .st { animation-duration: .75s; }
.ri-pour .st { stroke-dasharray: 3.5 2.5; animation-duration: .45s; stroke-width: 1.6; }
.ri .rd { animation: rblink 1.6s ease-in-out infinite; }
@keyframes rfall { to { stroke-dashoffset: -8; } }
.ri-pour .st { animation-name: rfall6; }
@keyframes rfall6 { to { stroke-dashoffset: -6; } }
@keyframes rblink { 0%, 100% { opacity: .15; transform: translateY(-1.5px); } 50% { opacity: 1; transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .ri .st, .ri .rd { animation: none !important; } }

/* icone del cielo a livelli */
.si .sp { stroke: var(--i-sun); }
.si .sp circle { fill: var(--i-sun); fill-opacity: .18; }
.si .cf { fill: var(--i-cloud-fill); }
.si .mp { stroke: var(--i-moon); fill: var(--i-moon); fill-opacity: .15; }
.si .glow { fill: var(--i-sun); stroke: none; opacity: .25; }
.si .star { fill: var(--i-sun); stroke: none; }
.si .rot, .si .glow, .si .star, .si .peek { transform-box: fill-box; transform-origin: center; }
.si .rot { animation: srot 16s linear infinite; }
.si .rot.fast { animation-duration: 7s; }
.si-hot .glow { animation: spulse 2.2s ease-in-out infinite; }
.si .drift { animation: sdrift 4.5s ease-in-out infinite alternate; }
.si .drift.slow { animation-duration: 7s; }
.si .drift2 { animation: sdrift2 5.5s ease-in-out infinite alternate; }
.si .peek { animation: speek 3.6s ease-in-out infinite; }
.si .star { animation: twinkle 2.2s ease-in-out infinite; }
@keyframes srot { to { transform: rotate(360deg); } }
@keyframes spulse { 0%, 100% { transform: scale(.82); opacity: .15; } 50% { transform: scale(1.12); opacity: .4; } }
@keyframes sdrift { from { transform: translateX(-1.2px); } to { transform: translateX(1.4px); } }
@keyframes sdrift2 { from { transform: translateX(1.2px); } to { transform: translateX(-1.6px); } }
@keyframes speek { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { transform: scale(.5); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .si * { animation: none !important; } }

/* ---------- pagine per citta' (scritte dal server) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ssr { padding: 8px 16px 20px; line-height: 1.55; }
.ssr h1 { font-family: var(--display); font-size: 30px; font-weight: 800; margin: 6px 0 10px; }
.ssr h2 { font-family: var(--display); font-size: 19px; margin: 20px 0 6px; }
.ssr ul { margin: 0; padding-left: 20px; }
.ssr li { margin: 3px 0; }
.sf-links { margin: 0 0 10px; }
.sf-links a, .cm-inner a, .cities-page a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.city-more { max-width: 1120px; margin: 28px auto 0; padding: 0 16px; }
.cm-inner { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.cm-inner h2 { font-family: var(--display); color: var(--ink); font-size: 20px; margin: 0 0 6px; }
.cm-inner h3 { color: var(--ink); font-size: 15px; margin: 14px 0 8px; }
.cm-inner p { margin: 0; }
.cm-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cm-links a { display: inline-block; background: var(--chip); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.cm-all { margin-top: 14px !important; }
.cities-page { max-width: 1120px; margin: 0 auto; padding: 8px 16px 0; }
.cities-page h1 { font-family: var(--display); font-size: 34px; font-weight: 800; margin: 8px 0 6px; }
.cities-sub { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.regions { columns: 1; column-gap: 16px; }
.region { break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; margin: 0 0 14px; }
.region h2 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; }
.region ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.region a { text-decoration: none; font-weight: 600; }
.region a:hover { text-decoration: underline; }
@media (min-width: 640px) { .regions { columns: 2; } }
@media (min-width: 980px) { .regions { columns: 3; } }

/* ---------- dialetto ---------- */
.lang-menu .lang-dial { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.dz-wait { animation: dzwait 1.2s ease-in-out infinite; }
@keyframes dzwait { 50% { opacity: .45; } }
.dz-pen { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 24px; height: 24px; margin-left: 4px;
  border: 0; border-radius: 999px; background: var(--chip); color: inherit; opacity: .7; cursor: pointer; padding: 0; }
.dz-pen:hover, .dz-pen:focus-visible { opacity: 1; }
.dz-note { margin: 8px 0 0; font-size: 13px; line-height: 1.4; opacity: .8; }
.dzfix { z-index: 40; }
.dzfix[hidden] { display: none; }
.dzfix .search-label { margin: 0; }
.dzfix-lab { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 4px; }
.dzfix-it { margin: 0; font-style: italic; color: var(--muted); }
.dzfix-now { margin: 0; font-weight: 600; }
.dzfix textarea, .dzfix input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 14px; padding: 10px 12px; }
.dzfix textarea { min-height: 80px; resize: vertical; }
.dzfix .dz-send { margin-top: 14px; width: 100%; }
.dzfix-msg { margin: 10px 0 0; font-weight: 600; min-height: 1em; }
@media (prefers-reduced-motion: reduce) { .dz-wait { animation: none; opacity: .6; } }

/* ---------- neve, temporali, nebbia, gelo ---------- */
.wi .cf { fill: var(--i-cloud-fill); }
.wi .cf.dark { fill: var(--i-storm-fill); }
.wi .fl { stroke: var(--i-snow); stroke-width: 1.15; transform-box: fill-box; transform-origin: center; animation: wflake 2.4s ease-in-out infinite; }
@keyframes wflake { 0% { transform: translate(0, -2px) rotate(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(1px, 3px) rotate(90deg); opacity: 0; } }
.wi-snow_heavy .fl { animation-duration: 1.6s; }
.wi .st { stroke: var(--i-rain); stroke-dasharray: 3 5; animation: rfall 1s linear infinite; }
.wi .bolt { fill: var(--i-sun); stroke: var(--i-sun); stroke-width: 1; animation: wbolt 2.6s steps(1) infinite; }
@keyframes wbolt { 0%, 62%, 100% { opacity: 1; } 64%, 68% { opacity: .1; } 66%, 70% { opacity: 1; } }
.wi .hail { fill: var(--i-cloud-fill); stroke: var(--i-snow); stroke-width: 1; animation: whail .9s ease-in infinite; }
@keyframes whail { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
.wi .fg { stroke: var(--i-fog); stroke-width: 1.8; animation: wfog 4s ease-in-out infinite alternate; }
.wi .fg.f2 { animation-direction: alternate-reverse; animation-duration: 5s; }
.wi .fg.thick { stroke-width: 2.6; }
@keyframes wfog { from { transform: translateX(-1.5px); } to { transform: translateX(1.8px); } }
.wi-haze .sp circle { fill: var(--i-sun); fill-opacity: .18; stroke: var(--i-sun); opacity: .7; }
.wi .ice { stroke: var(--i-snow); transform-box: fill-box; transform-origin: center; animation: srot 24s linear infinite; }
.wi .spark { stroke: var(--i-snow); transform-box: fill-box; transform-origin: center; animation: twinkle 1.8s ease-in-out infinite; }
.wi .spark.s2 { animation-delay: -.9s; }
.scene-storm { background: linear-gradient(180deg, rgba(20,22,50,.35), transparent 75%); }
.sc-flash { position: absolute; inset: 0; background: #FFFFFF; opacity: 0; animation: flash 7s infinite; }
@keyframes flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: .55; } 88% { opacity: .05; } 89% { opacity: .4; } 91% { opacity: 0; } }
.scene-snow { background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 70%); }
.sc-fog { position: absolute; left: -40%; width: 180%; height: 90px; border-radius: 50%; background: var(--fog-band); filter: blur(14px); animation: fogmove 22s ease-in-out infinite alternate; }
.sc-fog.f1 { top: 20px; } .sc-fog.f2 { top: 120px; animation-duration: 28s; animation-direction: alternate-reverse; }
.sc-fog.f3 { top: 230px; animation-duration: 25s; } .sc-fog.f4 { top: 330px; animation-duration: 31s; animation-direction: alternate-reverse; }
@keyframes fogmove { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
@media (prefers-reduced-motion: reduce) {
  .wi *, .sc-flash, .sc-fog { animation: none !important; }
  .wi .fl { opacity: 1; }
}

/* ---------- attivita' ---------- */
.acts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acts-head h2 { margin-bottom: 0; }
.acts-day { font-size: 14px; font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.chip svg { color: var(--muted); }
.chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip.on svg { color: var(--accent); }
.acts-hint { color: var(--muted); margin: 0; }
.act-cards { display: grid; gap: 10px; }
.act-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 20px; padding: 14px 16px; border: 1px solid var(--line); }
.act-icon { flex: none; width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.act-body { flex: 1; min-width: 0; }
.act-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act-name { font-weight: 700; font-size: 17px; }
.act-v { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.act-text { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.v-good .act-icon, .v-good .act-v { background: var(--tip-good); color: var(--tip-good-ink); }
.v-ok .act-icon, .v-ok .act-v { background: #FFEFC2; color: #6A4A00; }
.v-bad .act-icon, .v-bad .act-v { background: #FDE2E0; color: #9B1C14; }
.v-none .act-icon, .v-none .act-v { background: var(--tip-wait); color: var(--tip-wait-ink); }
:root[data-theme="dark"] .v-ok .act-icon, :root[data-theme="dark"] .v-ok .act-v { background: #4A3B12; color: #FFE7A3; }
:root[data-theme="dark"] .v-bad .act-icon, :root[data-theme="dark"] .v-bad .act-v { background: #4A1F1C; color: #FFB4AC; }

.acts-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(255,138,61,.35); transition: transform .15s; }
.acts-edit:hover { transform: translateY(-1px); } .acts-edit:active { transform: scale(.97); }
.acts-edit svg { stroke: #fff; }
.acts-head .acts-day { order: 3; width: 100%; margin-top: 2px; }
.acts-head .acts-hint { order: 4; width: 100%; margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.acts-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 14px 0 0; padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .15s; }
.acts-all:hover { background: rgba(255,138,61,.08); } .acts-all:active { transform: scale(.97); }
.acts-all svg { stroke: currentColor; }
.act-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pick-box { padding-bottom: 0; }
.pick-scroll { flex: 1; overflow-y: auto; padding: 0 18px 12px; -webkit-overflow-scrolling: touch; }
.pick-group { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 0; }
.pick-scroll .chips { margin: 8px 0 4px; }
.pick-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ground); }
.pick-foot .pick-done { margin-top: 0; }
.v-none .act-text { font-style: italic; }

/* ---------- solo nell'app ---------- */
.notify-box { z-index: 40; }
.notify-box[hidden] { display: none; }
.nf-text { color: var(--muted); margin: 6px 0 14px; line-height: 1.45; }
.nf-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; font-size: 17px; }
.nf-row input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--accent); }
.nf-time input { font: inherit; font-size: 18px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); }
.nf-msg { min-height: 1.2em; margin: 6px 0 0; font-weight: 600; }
.nf-head { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.nf-head:first-of-type { margin-top: 4px; }
.nf-text.nf-small { font-size: 14px; margin: 2px 0 8px; }
.nf-row input[type=checkbox] { flex: none; }
.notify-box .search-box { max-height: 92vh; overflow-y: auto; }
.nf-inbox { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nf-msgi { background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 16px; padding: 10px 14px; }
.nf-msgi.new { border-color: var(--accent); }
.nf-msgi.focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.25); }
.nf-msgi .nf-mt { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nf-msgi .nf-mt b { font-size: 16px; }
.nf-msgi .nf-mt span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.nf-msgi p { margin: 4px 0 0; color: var(--muted); line-height: 1.4; font-size: 15px; }
.nf-msgi.k-allerta { border-left: 5px solid #E8590C; }
.nf-box { display: flex; flex-direction: column; }
.nf-box > .search-head, .nf-box > .nf-settings, .nf-box > .nf-msg, .nf-box > .nf-done, .nf-box > .nf-head { flex: none; }
/* gli avvisi: se ne vedono 3-4, gli altri si scorrono; sotto le scelte restano fisse */
.nf-inbox-w { flex: 0 1 auto; min-height: 60px; max-height: min(340px, 42vh); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 2px 2px 10px; margin: 0 -2px; -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
.nf-settings { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.nf-settings .nf-row { min-height: 44px; font-size: 16px; }
.nf-morning { flex-wrap: wrap; row-gap: 4px; }
.nf-morning .nf-at { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.nf-morning .nf-at input { font: inherit; font-size: 16px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); }
#notify-btn { position: relative; }
#notify-btn.has-new::after { content: ""; position: absolute; top: 8px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: #E03131; box-shadow: 0 0 0 2px var(--bg); }
html.native .site-header { padding-top: env(safe-area-inset-top); }
html.native .site-footer .sf-links { display: none; }

/* logo: sole col tema chiaro, luna col tema scuro */
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: inline-block; }

/* ---------- pagine legali e supporto ---------- */
.sf-legal { margin: 0 0 10px; }
.sf-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
html.native .site-footer .sf-legal { display: block; }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 8px 20px 24px; }
.legal { line-height: 1.6; font-size: 16px; }
.legal[hidden] { display: none; }
.legal h1 { font-family: var(--display); font-size: 32px; font-weight: 800; margin: 10px 0 6px; }
.legal h2 { font-family: var(--display); font-size: 20px; margin: 26px 0 8px; }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 14px; padding: 0; text-align: left; }
.legal .short { background: var(--soft); color: var(--soft-ink); border-radius: 16px; padding: 14px 16px; margin: 0 0 6px; }
.legal .short a { color: inherit; }
.legal .box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px; border-top: 1px solid var(--line); }
.legal th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; border-top: 0; }
.legal .links { margin-top: 24px; font-weight: 600; }

/* la nonna che sbuca (app.js) */
.nonna-peek { position: fixed; right: 0; bottom: env(safe-area-inset-bottom, 0); height: min(40vh, 320px); width: auto; z-index: 25; pointer-events: none; }

/* sfogliare i giorni nel riquadro principale */
.hero { touch-action: pan-y; }
.hero-stage { position: relative; overflow: hidden; }
@supports (overflow: clip) { .hero-stage { overflow: visible; overflow-x: clip; } }
.hero-ghost { position: absolute; margin: 0 !important; pointer-events: none; z-index: 0; }
.hero-stage > .hero:not(.hero-ghost) { z-index: 1; will-change: transform; }
.hero.slide-next > *:not(.scene) { animation: slide-next .32s ease-out; }
.hero.slide-prev > *:not(.scene) { animation: slide-prev .32s ease-out; }
@keyframes slide-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.hero-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.hn-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(20,19,31,.1); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.hn-btn:disabled { opacity: .3; cursor: default; }
.hn-dots { display: inline-flex; gap: 6px; }
.hn-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .2s, width .2s; }
.hn-dots i.on { opacity: .85; width: 18px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .hero.slide-next > *, .hero.slide-prev > * { animation: none !important; } }

/* adesso → tra poco (solo oggi): un'unica etichetta chiara */
.nowline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; padding: 6px 12px 6px 10px; border-radius: 18px; background: rgba(255,255,255,.45); font-size: 14px; font-weight: 600; line-height: 1.3; max-width: 100%; }
.nl-part { display: inline-flex; align-items: center; gap: 6px; }
.nowline svg { width: 20px; height: 20px; flex: none; }
.nl-arrow { font-size: 16px; line-height: 1; opacity: .7; animation: nl-go 1.6s ease-in-out infinite; }
@keyframes nl-go { 50% { transform: translateX(3px); } }
/* notte serena */
.hero[data-sky="night"] { background: #26306A; --hero-ink: #F2F0FA; color: #F2F0FA; --skl: #070B24; --skl-front: .55; --skl-back: .3; }
.hero[data-sky="night"] .conf, .hero[data-sky="night"] .nowline { background: rgba(255,255,255,.14); }
.hero[data-sky="night"] .hn-btn { background: rgba(255,255,255,.12); color: inherit; }
.hero[data-sky="night"] .when-day { background: #F2F0FA; color: #1B1A2E; }
.sc-moon { position: absolute; right: 26px; top: 70px; width: 64px; height: 64px; border-radius: 50%; background: #FFF3C4; box-shadow: 0 0 40px 10px rgba(255,243,196,.25); }
.sc-moon::after { content: ""; position: absolute; left: 16px; top: -6px; width: 64px; height: 64px; border-radius: 50%; background: #26306A; }
.sc-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FFFFFF; opacity: .8; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .nl-arrow, .sc-star { animation: none !important; } }

/* allerta ufficiale della Protezione Civile */
.allerta { margin: 4px 12px 10px; padding: 14px 18px; border-radius: 22px; border: 2px solid; }
.allerta.lv-1 { background: #FFF6B8; border-color: #E8C600; color: #3A2F00; }
.allerta.lv-2 { background: #FFE0C2; border-color: #F07A00; color: #4A2000; }
.allerta.lv-3 { background: #FFD6D6; border-color: #D21C1C; color: #5A0000; }
.al-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.al-badge { font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; }
.allerta.lv-1 .al-badge::before, .allerta.lv-2 .al-badge::before, .allerta.lv-3 .al-badge::before { content: "▲ "; }
.al-when { font-weight: 700; font-size: 14px; opacity: .8; }
.al-title { margin: 6px 0 0; font-weight: 700; font-size: 16px; }
.al-text { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }
.al-src { margin: 8px 0 0; font-size: 12px; opacity: .75; }
.al-src a { color: inherit; }
@media (min-width: 640px) { .allerta { margin-left: 16px; margin-right: 16px; } }

.nonna-peek.nonna-walk { right: auto; left: 8px; height: min(34vh, 270px); }

/* oggi: "Ora: ... 21°" grande + la tendenza */
.nowbig { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 14px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.nb-row { display: flex; align-items: center; gap: 12px; }
.nb-ic { flex: none; display: inline-flex; }
.nb-now .nb-ic svg { width: 52px; height: 52px; }
.nb-next .nb-ic { width: 52px; justify-content: center; }
.nb-next .nb-ic svg { width: 30px; height: 30px; }
.nb-txt { flex: 1; min-width: 0; }
.nb-lab { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.15; }
.nb-t { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -2px; }
.nb-next .nb-txt { font-weight: 600; font-size: 16px; opacity: .9; }

/* giorni della settimana cliccabili */
.week .day { border: 0; font: inherit; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.week .day:hover { transform: translateY(-2px); }
.week .day.sel { box-shadow: 0 0 0 3px var(--accent); }
.week .day:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* "Clicca qui se vuoi il dettaglio": un invito discreto, non un pulsante */
.temp-hint { background: none !important; box-shadow: none !important; padding: 4px 0; min-height: 0; font-size: 14px; font-weight: 600; color: inherit; opacity: .8; text-decoration: underline; text-underline-offset: 3px; }
.temp-hint:hover { opacity: 1; box-shadow: none; }

/* capitoli della pagina: programmi e settimana staccati da quello che c'e' sopra */
.section.acts, .section.week-sec, .section.tips-sec, .section.italia-sec { margin-top: 48px; padding-top: 34px; position: relative; }
.section.acts .acts-head h2, .section.week-sec > h2, .section.tips-sec > h2, .italia-sec .it-head h2 { font-size: 24px; }
@media (min-width: 980px) { .today-b .section.acts { margin-top: 26px; } }
.nonna-peek.nonna-climb { right: auto; left: 50%; transform: translateX(-50%); height: min(36vh, 290px); }

/* ricerca nell'intestazione: solo sul computer */
.sh-search { display: none; }
@media (min-width: 980px) {
  .sh-search { display: inline-flex; align-items: center; gap: 8px; min-width: 240px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--field); color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; margin-right: 4px; }
  .sh-search:hover { border-color: var(--accent); color: var(--ink); }
  .sh-search svg { flex: none; }
}

/* oggi: la tendenza allineata come "Ora" */
.nb-next .nb-ic svg { width: 52px; height: 52px; }
.nb-next .nb-txt { font-weight: inherit; font-size: inherit; opacity: .92; }
.nb-t2 { font-size: 44px; letter-spacing: -1px; opacity: .92; }
/* avviso della settimana: la giornata ben in vista */
.alert-when { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; }
.alert-day { position: relative; margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: -.5px; color: #FFFFFF; }
.alert-row { margin-top: 10px; }
.alert-title { font-size: 24px; }

/* ---------- ora per ora: scelta della vista ---------- */
.hv-toggle { display: inline-flex; margin: 0 18px 10px; padding: 3px; border-radius: 999px; background: var(--chip); align-self: flex-start; }
.hv-toggle button { border: 0; background: transparent; color: var(--muted); font: 600 14px var(--body); padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.hv-toggle button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(27,26,46,.15); }
.num-toggle[hidden] { display: none; }

/* ---------- linea del tempo con la nonna ---------- */
.tl { flex: 1; overflow-y: auto; padding: 0 12px 28px; }
.tl[hidden] { display: none; }
.tl-cap { text-align: center; padding: 4px 8px 10px; min-height: 92px; }
.tl-when { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); }
.tl-when.was { color: var(--muted); }
.tl-big { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin-top: 2px; }
.tl-bh { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; color: var(--muted); }
.tl-bt { font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1; }
.tl-bw { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 4px; min-height: 26px; }
.tl-stage { position: relative; height: 320px; border-radius: 24px; overflow: hidden; background: var(--card); user-select: none; -webkit-user-select: none; }
.tl-track { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; outline: none; touch-action: pan-x;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.tl-track::-webkit-scrollbar { display: none; }
.tl-track.dragging { cursor: grabbing; }
.tl-track:focus-visible + .tl-mid { box-shadow: 0 0 0 3px var(--accent); }
.tl-row { display: flex; height: 100%; box-sizing: border-box; }
.tl-col { position: relative; flex: 0 0 64px; width: 64px; height: 100%; border: 0; padding: 0 0 10px; margin: 0; background: transparent;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; color: #1B1A2E; font-family: var(--body); cursor: pointer; }
.tl-col::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100px; background: rgba(255,255,255,.55); }
.tl-col.dark { color: #fff; }
.tl-col.dark::before { background: rgba(10,12,30,.28); }
.tl-col > span { position: relative; }
.tl-col.past::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 6px, transparent 6px 12px); pointer-events: none; }
.tl-col.past > span { opacity: .6; }
.tl-col.midnight { box-shadow: inset 2px 0 0 rgba(255,255,255,.75); }
.tl-day { position: absolute !important; top: 10px; left: 6px; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.88); color: #1B1A2E; z-index: 1; }
.tl-ic { line-height: 0; color: #55536B; }
.tl-col.dark .tl-ic { color: #fff; }
.tl-col.dark .tl-ic svg [fill="var(--i-cloud-fill)"] { fill: rgba(255,255,255,.2); }
.tl-t { font-family: var(--display); font-size: 17px; font-weight: 700; padding: 1px 8px; border-radius: 999px; transition: transform .15s, background .15s; }
.tl-h { font-size: 12px; font-weight: 600; opacity: .85; }
.tl-col.now .tl-h { font-weight: 800; opacity: 1; }
.tl-col.on .tl-t { background: var(--accent); color: #fff; transform: scale(1.18); }
.tl-col.on > span { opacity: 1; }
.tl-mid { position: absolute; left: 50%; bottom: 100px; width: 0; height: 0; margin-left: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--accent); pointer-events: none; }
.tl-nonna { position: absolute; left: 50%; bottom: 108px; width: 97px; height: 174px; margin-left: -48px; pointer-events: none; transform-origin: 50% 100%; }
.tl-nonna img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.18)); }
.tl-nonna .n-blink { visibility: hidden; }
.tl-nonna.blink .n-blink { visibility: visible; }
.tl-nonna.blink .n-open { visibility: hidden; }
.tl-nonna.night img { filter: brightness(.88) drop-shadow(0 0 10px rgba(255,240,190,.35)); }
.tl-nonna.walk { animation: tl-bob .32s ease-in-out infinite; }
@keyframes tl-bob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-3px) rotate(-2deg); } 75% { transform: translateY(-3px) rotate(2deg); } }
.tl-gear { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-gear > g { opacity: 0; transition: opacity .25s, transform .35s cubic-bezier(.3,1.5,.6,1); }
.g-umbrella { transform-origin: 248px 352px; transform: rotate(40deg) scale(.4); }
.g-umbrella .u-top { transform-origin: 190px 0; transform: scaleX(.15); transition: transform .35s .12s cubic-bezier(.3,1.5,.6,1); }
.has-umbrella .g-umbrella { opacity: 1; transform: none; }
.has-umbrella .g-umbrella .u-top { transform: none; }
.u-shaft { stroke: #1B1A2E; stroke-width: 8; stroke-linecap: round; fill: none; }
.u-hook { stroke: #1B1A2E; stroke-width: 8; stroke-linecap: round; fill: none; }
.u-canopy { fill: #E5484D; stroke: #1B1A2E; stroke-width: 6; stroke-linejoin: round; }
.u-rib { fill: none; stroke: #9E1F2A; stroke-width: 4; }
.u-tip { fill: #1B1A2E; }
.g-hat { transform: translateY(-70px); }
.has-hat .g-hat { opacity: 1; transform: none; }
.h-body { fill: #3E7BD6; stroke: #1B1A2E; stroke-width: 6; }
.h-stripe { fill: none; stroke: #fff; stroke-width: 9; }
.h-brim { fill: #2C5FAE; stroke: #1B1A2E; stroke-width: 6; }
.h-rib { stroke: rgba(27,26,46,.45); stroke-width: 4; }
.h-pom { fill: #fff; stroke: #1B1A2E; stroke-width: 6; }
.g-shades { transform: translateY(-40px); }
.has-shades .g-shades { opacity: 1; transform: none; }
.s-frame { fill: rgba(20,22,40,.92); stroke: #1B1A2E; stroke-width: 6; }
.s-bridge { fill: none; stroke: #1B1A2E; stroke-width: 6; }
.s-shine { stroke: rgba(255,255,255,.75); stroke-width: 5; stroke-linecap: round; }
.tl-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 8px 0; }
@media (prefers-reduced-motion: reduce) { .tl-nonna.walk { animation: none; } .tl-gear > g, .g-umbrella .u-top { transition: opacity .2s; } }

/* ---------- linea del tempo: il meteo disegnato nel cielo ---------- */
.tl-fx { position: absolute !important; left: 0; right: 0; top: 0; bottom: 100px; pointer-events: none; opacity: 1 !important; }
.tl-cloud { position: absolute; height: auto; overflow: visible; animation: tl-drift 8s ease-in-out infinite alternate; }
@keyframes tl-drift { to { transform: translateX(10px); } }
.tl-cloud path { stroke: none; }
.c-w path { fill: rgba(255,255,255,.92); }
.c-g path { fill: #E9EDF2; }
.c-f path { fill: rgba(255,255,255,.55); }
.c-d path { fill: #6E7889; }
.c-n path { fill: rgba(120,132,170,.55); }
.c-nd path { fill: #3E4658; }
.fx-rain::before, .fx-snow::after, .fx-stars::before, .fx-fog::before { content: ""; position: absolute; inset: 40px 0 0; pointer-events: none; }
.fx-rain::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg stroke='%23fff' stroke-opacity='.75' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 4l-3 12M44 18l-3 12M28 38l-3 12M58 44l-3 12M6 50l-3 10'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 64px 64px;
  animation: tl-rain .55s linear infinite; animation-delay: var(--d); }
.fx-pour::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg stroke='%23fff' stroke-opacity='.8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 4l-3 14M44 18l-3 14M28 38l-3 14M58 44l-3 14M6 50l-3 12M20 20l-3 14M36 2l-3 14M52 28l-3 14'/%3E%3C/g%3E%3C/svg%3E"); animation-duration: .4s; }
@keyframes tl-rain { from { background-position: 0 0; } to { background-position: -16px 64px; } }
.fx-snow::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='10' cy='8' r='3'/%3E%3Ccircle cx='42' cy='20' r='2.5'/%3E%3Ccircle cx='26' cy='40' r='3'/%3E%3Ccircle cx='56' cy='48' r='2'/%3E%3Ccircle cx='6' cy='54' r='2.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 64px 64px;
  animation: tl-snow 3.2s linear infinite; animation-delay: var(--d); filter: drop-shadow(0 0 1px rgba(80,100,140,.6)); }
@keyframes tl-snow { from { background-position: 0 0; } to { background-position: 12px 64px; } }
.fx-stars::before { inset: 0 0 30px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='90'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='8' cy='12' r='1.2'/%3E%3Ccircle cx='40' cy='30' r='1.6'/%3E%3Ccircle cx='24' cy='60' r='1'/%3E%3Ccircle cx='54' cy='76' r='1.3'/%3E%3Ccircle cx='50' cy='6' r='1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 64px 90px;
  animation: tl-twinkle 2.6s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes tl-twinkle { from { opacity: .45; } to { opacity: 1; } }
.fx-fog::before { inset: 30px 0 0; background: repeating-linear-gradient(to bottom, transparent 0 14px, rgba(255,255,255,.55) 14px 26px, transparent 26px 40px);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.6), #000, rgba(0,0,0,.6)); mask-image: linear-gradient(to right, rgba(0,0,0,.6), #000, rgba(0,0,0,.6)); }
.fx-fog2::before { background: repeating-linear-gradient(to bottom, rgba(255,255,255,.35) 0 10px, rgba(255,255,255,.7) 10px 26px, rgba(255,255,255,.35) 26px 40px); }
.tl-bolt { position: absolute; left: 22px; top: 70px; width: 20px; height: 40px; opacity: 0; animation: tl-flash 5s infinite; }
.tl-bolt path { fill: #FFE14D; stroke: #1B1A2E; stroke-width: 1.5; }
@keyframes tl-flash { 0%, 86%, 92%, 100% { opacity: 0; } 88%, 90% { opacity: 1; } }
.fx-storm::before { filter: brightness(.9); }
.tl-astro { position: absolute; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none; transition: left .45s ease, top .45s ease, opacity .4s; }
.tl-astro .tl-sun, .tl-astro .tl-moon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .4s; }
.tl-astro .tl-moon { opacity: 0; }
.tl-astro:not(.is-day) .tl-sun { opacity: 0; }
.tl-astro:not(.is-day) .tl-moon { opacity: 1; }
.tl-sun svg { overflow: visible; filter: drop-shadow(0 0 14px rgba(255,214,80,.85)); }
.tl-sun circle { fill: #FFD23F; stroke: #F2A900; stroke-width: 2; }
.tl-sun .rays { stroke: #FFB800; stroke-width: 5; stroke-linecap: round; animation: tl-spin 14s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }
.tl-moon path { fill: #FFF3C4; filter: drop-shadow(0 0 10px rgba(255,243,196,.7)); }
.tl-foot { display: flex; justify-content: center; margin-top: 12px; }
.tl-back { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 700 15px var(--body); padding: 10px 20px; min-height: 44px; cursor: pointer; box-shadow: 0 4px 12px rgba(255,138,61,.35); transition: opacity .2s, transform .2s; }
.tl-back.off { opacity: 0; pointer-events: none; transform: translateY(4px); }
@media (prefers-reduced-motion: reduce) { .tl-cloud, .fx-rain::before, .fx-snow::after, .fx-stars::before, .tl-sun .rays { animation: none; } }
/* ombrello chiuso (pioggia solo possibile): appeso alla mano, punta in giu' */
.g-closed { transform-origin: 250px 340px; transform: translateY(-30px); }
.has-closed .g-closed { opacity: 1; transform: none; }
.c-body { fill: #E5484D; stroke: #1B1A2E; stroke-width: 5; stroke-linejoin: round; }
.c-fold { fill: none; stroke: #9E1F2A; stroke-width: 3; }
/* cambio d'abito: un piccolo saltello */
.tl-nonna.swap img { animation: tl-swap .35s ease-out; }
@keyframes tl-swap { 0% { transform: scale(.92) translateY(6px); opacity: .4; } 100% { transform: none; opacity: 1; } }

/* ---------- linea del tempo: il vento ---------- */
.g-pin { opacity: 0; transition: opacity .3s; }
.g-pin path { stroke: #1B1A2E; stroke-width: 3; stroke-linejoin: round; }
.pin-rot { animation: tl-spin 1.6s linear infinite; }
.tl-stage[data-wind="1"] .g-pin, .tl-stage[data-wind="2"] .g-pin, .tl-stage[data-wind="3"] .g-pin { opacity: 1; }
.tl-stage[data-wind="2"] .pin-rot { animation-duration: .7s; }
.tl-stage[data-wind="3"] .pin-rot { animation-duration: .3s; }
/* la nonna si piega un po' nel vento */
.tl-stage[data-wind="2"] .tl-nonna:not(.walk) { animation: tl-lean 1.8s ease-in-out infinite; }
.tl-stage[data-wind="3"] .tl-nonna:not(.walk) { animation: tl-lean3 1.1s ease-in-out infinite; }
@keyframes tl-lean { 0%, 100% { transform: rotate(0) skewX(0); } 50% { transform: rotate(2deg) skewX(-2deg); } }
@keyframes tl-lean3 { 0%, 100% { transform: rotate(2deg) skewX(-2deg); } 50% { transform: rotate(5deg) skewX(-5deg); } }
/* foglie e folate che attraversano il cielo */
.tl-windfx { position: absolute; left: 0; right: 0; top: 0; bottom: 100px; pointer-events: none; overflow: hidden; }
.tl-windfx > * { position: absolute; left: -40px; opacity: 0; }
.leaf { width: 18px; height: 11px; }
.leaf path { fill: #C98A2B; stroke: #6B4A12; stroke-width: 1.2; }
.leaf.l1 path, .leaf.l4 path { fill: #8DB33A; stroke: #4D6B14; }
.leaf.l2 path { fill: #D9572B; stroke: #7A2A0E; }
.gust { display: block; width: 90px; height: 10px; border-top: 3px solid rgba(255,255,255,.75); border-radius: 50%; }
.l0 { top: 40px; } .l1 { top: 95px; } .l2 { top: 150px; } .l3 { top: 70px; } .l4 { top: 185px; } .l5 { top: 125px; }
.g0 { top: 55px; } .g1 { top: 110px; } .g2 { top: 165px; } .g3 { top: 30px; }
.tl-stage[data-wind="1"] .l0, .tl-stage[data-wind="1"] .l3, .tl-stage[data-wind="1"] .g0 { animation: tl-fly 4.5s linear infinite; }
.tl-stage[data-wind="1"] .l3 { animation-delay: -2.2s; } .tl-stage[data-wind="1"] .g0 { animation-name: tl-gust; animation-delay: -1s; }
.tl-stage[data-wind="2"] .leaf, .tl-stage[data-wind="3"] .leaf { animation: tl-fly 2.6s linear infinite; }
.tl-stage[data-wind="2"] .gust, .tl-stage[data-wind="3"] .gust { animation: tl-gust 1.6s linear infinite; }
.tl-stage[data-wind="3"] .leaf { animation-duration: 1.4s; } .tl-stage[data-wind="3"] .gust { animation-duration: .9s; }
.l1 { animation-delay: -.5s !important; } .l2 { animation-delay: -1.1s !important; } .l4 { animation-delay: -1.7s !important; } .l5 { animation-delay: -2.1s !important; }
.g1 { animation-delay: -.4s !important; } .g2 { animation-delay: -.9s !important; } .g3 { animation-delay: -1.3s !important; }
@keyframes tl-fly { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(calc(50vw), 18px) rotate(240deg); } 90% { opacity: 1; } 100% { transform: translate(calc(100vw + 80px), -10px) rotate(520deg); opacity: 0; } }
@keyframes tl-gust { 0% { transform: translateX(0) scaleX(.6); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateX(calc(100vw + 120px)) scaleX(1.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pin-rot, .tl-windfx > *, .tl-stage .tl-nonna:not(.walk) { animation: none !important; } }

/* ---------- in viaggio senza pioggia ---------- */
.act-trip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 700 14px var(--body); padding: 8px 14px; min-height: 38px; cursor: pointer; }
.trip-box { max-width: 640px; }
.trip-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0 18px 32px; }
.trip-scroll .sheet-sub { margin: 4px 0 14px; }
.trip-form { min-width: 0; background: var(--card); border-radius: 22px; padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); }
.tf-row { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 10px; }
.tf-lab { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.tf-place { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); border-radius: 14px; padding: 12px 14px; font: 600 17px var(--body); min-height: 48px; cursor: pointer; }
.tf-place.empty { color: var(--muted); font-weight: 500; }
.tf-pick { display: grid; gap: 6px; }
.tf-pick[hidden] { display: none; }
.tf-results button { width: 100%; text-align: left; background: var(--ground); border: 0; border-radius: 12px; padding: 10px 12px; margin-top: 4px; cursor: pointer; color: var(--ink); }
.tf-results b { display: block; font-size: 16px; } .tf-results span { font-size: 13px; color: var(--muted); }
.tf-when { display: flex; gap: 8px; min-width: 0; }
.tf-when select, .tf-when input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); border-radius: 14px; padding: 10px 12px; font: 600 17px var(--body); min-height: 48px; }
.tf-check { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink); cursor: pointer; }
.tf-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.tf-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: 700 18px var(--display); padding: 14px; min-height: 54px; cursor: pointer; }
.tf-go:disabled { opacity: .6; cursor: wait; }
.trip-out { margin-top: 16px; scroll-margin-top: 10px; }
.trip-wait { display: flex; align-items: center; gap: 12px; padding: 18px; color: var(--muted); font-size: 16px; }
.trip-wait .spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: tp-spin .8s linear infinite; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
.trip-err { padding: 14px 16px; border-radius: 16px; background: var(--tip-wait); color: var(--tip-wait-ink); font-size: 16px; }
.trip-adv { border-radius: 22px; padding: 18px; background: var(--tip-good); color: var(--tip-good-ink); }
.trip-adv.adv-less, .trip-adv.adv-wet { background: var(--h-wet); color: var(--h-wet-ink); }
.trip-adv.adv-stop { background: var(--soft); color: var(--soft-ink); }
.trip-adv p { margin: 6px 0 0; font-size: 16px; line-height: 1.45; }
.trip-adv .ta-head { margin: 0 0 8px; font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.2; }
.ta-stop { margin-top: 12px; border: 0; border-radius: 999px; background: rgba(0,0,0,.12); color: inherit; font: 700 14px var(--body); padding: 8px 14px; cursor: pointer; }
.trip-map { height: 320px; border-radius: 22px; margin-top: 14px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.trip-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 4px 0; font-size: 13px; color: var(--muted); }
.trip-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 4px; margin-right: 5px; vertical-align: middle; }
.trip-h { font-family: var(--display); font-size: 19px; margin: 22px 0 8px; }
.trip-hint { font-size: 14px; color: var(--muted); margin: -2px 0 10px; line-height: 1.4; }
.trip-roads { display: grid; gap: 8px; }
.trip-road { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; border: 2px solid transparent; background: var(--card); border-radius: 16px; padding: 12px 14px; cursor: pointer; color: var(--ink); }
.trip-road.on { border-color: var(--accent); }
.trip-road b { font-size: 16px; } .trip-road span { font-size: 14px; color: var(--muted); grid-column: 1; }
.trip-road em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.trip-road em.dry, .td-r.dry { background: var(--tip-good); color: var(--tip-good-ink); }
.trip-road em.wet, .td-r.wet { background: var(--h-wet); color: var(--h-wet-ink); }
.trip-deps { display: grid; gap: 6px; }
.trip-dep { position: relative; display: grid; grid-template-columns: 58px 1fr 44px; align-items: center; gap: 10px; border: 2px solid transparent; background: var(--card); border-radius: 14px; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.trip-dep.on { border-color: var(--accent); }
.td-h { font-weight: 700; font-size: 16px; text-align: left; } .td-h small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.td-strip { display: flex; height: 14px; border-radius: 7px; overflow: hidden; }
.td-strip i { flex: 1; }
.td-r { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 0; text-align: center; }
.td-tag { position: absolute; top: -8px; right: 54px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; }
.td-tag.want { background: var(--ink); color: var(--ground); }
.trip-src { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.4; }
.trip-stop-ic { font-size: 22px; line-height: 34px; text-align: center; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
/* casella di ricerca del viaggio: almeno 16px, altrimenti il telefono ingrandisce la pagina */
.tf-pick input { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--field-line); background: var(--field); color: var(--ink); }
.tf-pick input:focus { outline: none; border-color: var(--accent); }
.trip-box input, .trip-box select { font-size: 17px; }
/* la nonna in moto */
.trip-ride .tl-cap { min-height: 96px; }
.tr-stage { height: 270px; }
.tr-moto { width: 176px; height: 128px; margin-left: -88px; bottom: 100px; }
.tr-moto img { position: static; width: 100%; height: 100%; object-fit: contain; }
.tr-moto.tr-fallback { width: 70px; height: 125px; margin-left: -35px; }
.tr-moto.walk { animation: tr-ride .28s ease-in-out infinite; }
@keyframes tr-ride { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px) rotate(-1deg); } }
.tr-stop { position: absolute !important; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #fff; color: #1B1A2E; z-index: 2; opacity: 1 !important; }
/* play / pausa delle linee del tempo */
.tl-play { position: absolute; top: 10px; right: 10px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #1B1A2E; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.tl-play svg path { fill: currentColor; }
.tl-play .pa { display: none; }
.tl-play.on { background: var(--accent); color: #fff; }
.tl-play.on .pl { display: none; }
.tl-play.on .pa { display: inline; }
.tl-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* la nonna in Vespa animata */
.tr-moto { width: 214px; height: 134px; margin-left: -128px; }
.tr-svg { width: 100%; height: 100%; overflow: visible; }
.tr-head { transform-box: view-box; animation: tr-nod 1.6s ease-in-out infinite; }
@keyframes tr-nod { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.8deg) translateY(1px); } }
.tr-scarf { fill: #D63A3F; stroke: #1B1A2E; stroke-width: 4; stroke-linejoin: round; }
.tr-scarf + .tr-scarf { fill: #B82B33; }
.tr-knot { fill: #D63A3F; stroke: #1B1A2E; stroke-width: 4; }
.tr-speed path { stroke: #fff; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.55)); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 40 200; opacity: .8; animation: tr-whoosh .7s linear infinite; }
.tr-speed path:nth-child(2) { animation-delay: -.25s; } .tr-speed path:nth-child(3) { animation-delay: -.5s; }
@keyframes tr-whoosh { from { stroke-dashoffset: -60; } to { stroke-dashoffset: 180; } }
.tr-stage .tl-col.dark ~ * .tr-speed path { stroke: #fff; }
.tr-moto.walk { animation: tr-ride .22s ease-in-out infinite; }
.tr-stage.playing .tr-moto { animation: tr-ride .22s ease-in-out infinite; }
.tr-stage.playing .tr-head { animation-duration: .9s; }
@media (prefers-reduced-motion: reduce) { .tr-head, .tr-speed path, .tr-moto { animation: none !important; } }
.tf-check[hidden] { display: none; }

/* ---------- l'Italia in un colpo d'occhio ---------- */
.italia-sec { padding-left: 16px; padding-right: 16px; }
.it-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.it-head h2 { margin: 0; }
.it-when { font-weight: 700; color: var(--accent); font-size: 15px; }
.it-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px 0; padding-bottom: 2px; }
.it-days::-webkit-scrollbar { display: none; }
.it-day { flex: 1 0 auto; min-width: 48px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); font: 700 14px var(--body); padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); }
.it-day small { font-size: 12px; font-weight: 600; color: var(--muted); }
.it-day.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.it-day.on small { color: rgba(255,255,255,.85); }
.it-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.it-map { position: relative; flex: 1; max-width: 560px; margin: 0 auto; border-radius: 26px; background: var(--h-wet); overflow: hidden; touch-action: pan-y; }
.it-map.slide-next { animation: it-in-r .3s ease-out; } .it-map.slide-prev { animation: it-in-l .3s ease-out; }
@keyframes it-in-r { from { transform: translateX(24px); opacity: .3; } } @keyframes it-in-l { from { transform: translateX(-24px); opacity: .3; } }
.it-cv { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.it-cv.on { opacity: 1; }
.it-pins { position: absolute; inset: 0; }
.it-city { position: absolute; transform: translate(calc(-50% + var(--dx, 0px)), calc(-38% + var(--dy, 0px))); display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.it-city svg { position: static; width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); color: var(--i-cloud); }
.it-city b { font-family: var(--display); font-size: 15px; font-weight: 800; background: var(--card); border-radius: 999px; padding: 2px 6px; margin-top: -2px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.it-city b small { font-family: var(--body); font-size: .88em; font-weight: 700; color: var(--muted); margin-left: 4px; }
.it-city span { display: none; font-size: 11px; font-weight: 700; margin-top: 2px; text-shadow: 0 0 3px var(--card), 0 0 3px var(--card); }
.it-arrow { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; display: none; }
.it-arrow:disabled { opacity: .3; cursor: default; }
.it-note { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }
@media (min-width: 700px) { .it-arrow { display: block; } }
/* i nomi delle citta' solo quando la mappa e' abbastanza larga */
.it-map { container-type: inline-size; }
@container (min-width: 500px) {
  .it-city span { display: block; }
  .it-city svg { width: 36px; height: 36px; }
  .it-city b { font-size: 17px; }
}
@media (max-width: 400px) { .it-city svg { width: 26px; height: 26px; } .it-city b { font-size: 13px; padding: 1px 5px; } }

/* l'Italia dipinta: strumenti, legenda, schermo intero */
.it-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.it-mode { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--chip); }
.it-mode button { border: 0; background: transparent; color: var(--muted); font: 700 14px var(--body); padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.it-mode button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(27,26,46,.15); }
.it-big { position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #1B1A2E; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.it-big svg path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.it-map { cursor: zoom-in; }
.it-pins .it-city { pointer-events: none; }
.it-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.it-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; border: 1px solid rgba(0,0,0,.12); }
.it-legend.temp { align-items: center; gap: 8px; font-weight: 700; }
.it-legend.temp span { white-space: nowrap; }
.it-legend.temp i { flex: 0 1 220px; width: 220px; height: 10px; border-radius: 5px; margin: 0; }
.it-sheet .sheet-box { max-width: 980px; }
.it-bigbox { padding-left: 16px !important; padding-right: 16px !important; overflow-y: auto; }
.it-bigbox .search-head { padding: 0 2px; }
.it-bigbox .it-when { font-weight: 700; color: var(--accent); }
.it-bigmap { position: relative; flex: 1; min-height: 52vh; margin-top: 12px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
#it-lmap { position: absolute; inset: 0; }
.it-days.big { margin: 12px 0 0; }
.it-pin { background: none; border: 0; }
.it-pin .it-city { position: absolute; transform: translate(-50%, -38%); cursor: pointer; }
.it-pin .it-city svg { width: 28px; height: 28px; }
.it-pin .it-city b { font-size: 19px; padding: 3px 9px; }
.it-pin .it-city b small { font-size: .9em; }
.it-pin.only-name .it-city span { display: block; font-size: 12px; }
.it-bigmap.names .it-pin .it-city span { display: block; }
.it-pin .it-city span { color: #1B1A2E; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; }
.it-tscale { max-width: 300px; margin: 12px auto 0; }
.it-tscale i { display: block; height: 10px; border-radius: 5px; }
.it-tscale div { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.it-fxw, .it-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-move { animation: it-fall .55s linear infinite; will-change: transform; }
.fx-snow { animation-duration: 2.4s; }
@keyframes it-fall { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@media (prefers-reduced-motion: reduce) { .fx-move { animation: none; } .it-fx animate { display: none; } }
.it-here { background: none; border: 0; }
.it-here-dot { position: absolute; left: -9px; top: 22px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(255,138,61,.3), 0 2px 6px rgba(0,0,0,.35); }
.it-here-name { position: absolute; left: 14px; top: -11px; white-space: nowrap; font: 800 13px var(--body); color: #1B1A2E; background: #fff; border-radius: 999px; padding: 2px 8px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
