:root {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --navy: #0c2429;
  --navy-deep: #07181c;
  --navy-mid: #143840;
  --ink: #122126;
  --paper: #e6eef0;
  --paper-2: #d5e2e6;
  --snow: #ffffff;
  --muted: #4d656c;
  --subtle: #6d848b;
  --ice: #0f8f86;
  --ice-bright: #3ec4b4;
  --border: #d3e0e4;
  --sidebar-fg: #e7f3f2;
  --sidebar-muted: #8eb0b3;
  --good: #1f8a62;
  --warn: #b4742a;
  --bad: #c25448;
  --temp: #e15b45;
  --feel: #e0893a;
  --hum: #2b88c7;
  --wind: #3d7d8c;
  --rain: #1f8a62;
  --press: #2f7f8e;
  --solar: #d4892a;
  --uv: #7a5caf;
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(12, 36, 41, 0.05), 0 10px 28px rgba(12, 36, 41, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(62, 196, 180, 0.18), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color 2.8s ease, color 2.8s ease;
}
img { max-width: 100%; display: block; }
button, [role="button"] { cursor: pointer; font-family: inherit; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.tabular { font-variant-numeric: tabular-nums; }

.shell { min-height: 100vh; }
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
}

.sidebar {
  display: none;
  flex-direction: column;
  background: var(--navy);
  color: var(--sidebar-fg);
}
@media (min-width: 1024px) {
  .sidebar { display: flex; position: sticky; top: 0; height: 100vh; overflow: auto; }
}
.sidebar.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 40;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  text-decoration: none;
}
.brand-text { line-height: 1.15; }
.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--snow);
}
.brand-text small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}
.nav { flex: 1; padding: 0 12px; display: grid; gap: 4px; align-content: start; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--sidebar-muted);
}
.nav a:hover { background: rgba(251, 250, 246, 0.08); color: var(--snow); }
.nav a.is-active { background: var(--ice); color: var(--navy); }
.nav svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar__station { padding: 12px; }
.sidebar__station img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 8px;
}
.sidebar__station p {
  margin-top: 8px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--sidebar-muted);
}
.icon-btn {
  background: none;
  border: 0;
  color: var(--snow);
  padding: 8px;
  border-radius: 8px;
}
@media (min-width: 1024px) {
  .icon-btn.only-mobile { display: none; }
}

.topbar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 280px;
  min-height: 0;
  background: var(--navy);
  color: var(--snow);
}
.valley-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.topbar__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1) 48%, transparent);
}
.topbar__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  height: 280px;
  min-height: 0;
  padding: 16px;
}
.valley-sky .wx-snow { animation: none; }
@media (min-width: 640px) { .topbar__row { padding: 12px 24px; } }
.topbar h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}
@media (min-width: 640px) { .topbar h1 { font-size: 1.6rem; } }
.topbar .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.82);
}
.valley-sky { --sky1:#6eb8e0; --sky2:#e7f6ea; --sun:#ffe08a; --far:#86a39a; --near:#4d756c; --cap:#f7fbfb; --meadow:#6f9b5c; --river:#7eb8c8; --town:#2c3d3a; }
.sky-sole { --sky1:#6eb8e0; --sky2:#e7f6ea; }
.sky-caldo { --sky1:#f0a15a; --sky2:#ffe3b8; --sun:#ffd36a; --far:#c4a07a; --near:#8d6a48; --meadow:#c6a24e; }
.sky-freddo { --sky1:#c5d6e6; --sky2:#eef3f6; --sun:#f4f7fb; --far:#9aafc0; --near:#6d8496; --meadow:#b7c6b4; }
.sky-nuvoloso { --sky1:#8ea4b4; --sky2:#d5dee4; --far:#7d919c; --near:#5c727c; --meadow:#7f947c; }
.sky-pioggia { --sky1:#4e6270; --sky2:#8ea0aa; --far:#5d7278; --near:#3e5558; --meadow:#5d735c; }
.sky-neve { --sky1:#d7e4ee; --sky2:#f7fafc; --far:#c5d3dc; --near:#9aafbc; --meadow:#e7eef2; }
.sky-nebbia { --sky1:#c5ced4; --sky2:#e8ecee; --far:#aeb8bc; --near:#8b989c; --meadow:#b7c0b4; }
.sky-temporale { --sky1:#2a3148; --sky2:#6a5870; --far:#4a5568; --near:#323c4c; --meadow:#3e5348; }
.valley-sky .drops, .valley-sky .flakes, .valley-sky .fog, .valley-sky .bolt, .valley-sky .cap-deep, .valley-sky .veil, .valley-sky .cloud-deck { display:none; }
.sky-sole .cloud, .sky-caldo .cloud, .sky-freddo .cloud, .sky-velato .cloud { opacity: 0; }
.nubi-layer {
  animation-name: nubi-move;
  animation-duration: var(--dur, 1200s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: var(--lag, 0s);
}
.sky-sole .nubi, .sky-caldo .nubi, .sky-freddo .nubi { opacity: 1; }
.valley-sky.is-dawn .nubi-layer { filter: sepia(.4) saturate(1.6) hue-rotate(-8deg) brightness(1.05); }
.valley-sky.is-dusk .nubi-layer { filter: sepia(.5) saturate(1.85) hue-rotate(-10deg) brightness(1.06); }
.sky-pioggia.is-dawn .nubi-layer, .sky-pioggia.is-dusk .nubi-layer,
.sky-coperto.is-dawn .nubi-layer, .sky-coperto.is-dusk .nubi-layer,
.sky-temporale.is-dawn .nubi-layer, .sky-temporale.is-dusk .nubi-layer,
.sky-nebbia.is-dawn .nubi-layer, .sky-nebbia.is-dusk .nubi-layer,
.sky-nuvoloso.is-dawn .nubi-layer, .sky-nuvoloso.is-dusk .nubi-layer,
.sky-neve.is-dawn .nubi-layer, .sky-neve.is-dusk .nubi-layer { filter: brightness(.78) saturate(.45); }
.valley-sky.is-night .nubi-layer { filter: brightness(.38) saturate(.3); }
.valley-sky .sky-wash { pointer-events: none; }
.sky-velato .veil { display:block; opacity:.48; }
.sky-velato .sun { opacity:.72; }
.sky-poco .cloud-lot, .sky-poco .cloud-deck { opacity: 0; }
.sky-poco .cloud-few { opacity: .9; }
.sky-poco .cloud-few .cloud-track { animation: cloud-drift 70s linear infinite; }
.sky-freddo .cap-deep, .sky-neve .cap-deep { display:block; }
.sky-nuvoloso .cloud-few, .sky-nuvoloso .cloud-deck { opacity: 0; }
.sky-nuvoloso .cloud-lot { opacity: .92; }
.sky-nuvoloso .cloud-lot .cloud-track { animation: cloud-drift 160s linear infinite; }
.sky-coperto .cloud-few, .sky-coperto .cloud-lot, .sky-pioggia .cloud-few, .sky-pioggia .cloud-lot, .sky-temporale .cloud-few, .sky-temporale .cloud-lot { display:none; }
.sky-coperto .cloud-deck, .sky-pioggia .cloud-deck, .sky-temporale .cloud-deck { display:block; opacity:.96; }
.sky-coperto .sun, .sky-pioggia .sun, .sky-neve .sun, .sky-nebbia .sun, .sky-temporale .sun { display:none; }
.sky-neve .cloud-lot { opacity: .72; }
.sky-nebbia .cloud { opacity: .45; }
.valley-sky .sun.sun-covered { opacity: .25; }
.sky-pioggia .drops, .sky-temporale .drops { display:block; }
.rain-sheet {
  transform-box: view-box;
  transform-origin: 960px 250px;
  animation: rain-sheet var(--fall, 1.2s) linear infinite;
}
.valley-sky.is-night .rain-sheet { filter: brightness(0.72) saturate(0.7); }
.valley-sky.is-night .flakes { filter: brightness(0.75); }
.sky-neve .flakes { display:block; }
.fall-snow { animation: snow-fall var(--snow-dur, 9s) linear infinite; }
.sky-nebbia .fog, .sky-freddo .fog { display:block; }
.sky-temporale .bolt { display:block; }
@keyframes sky-fall { from { transform: translateY(-28px);} to { transform: translateY(36px);} }
@keyframes rain-sheet { from { transform: translate3d(0,0,0) skewX(var(--rain-skew, 0deg)); } to { transform: translate3d(0,640px,0) skewX(var(--rain-skew, 0deg)); } }
@keyframes snow-fall { from { transform: translate(0,-16px);} to { transform: translate(var(--snow-dx, 14px), 210px);} }
@keyframes cloud-drift { from { transform: translateX(0);} to { transform: translateX(-1920px);} }
@keyframes nubi-move { from { transform: translate3d(0,0,0);} to { transform: translate3d(var(--dx, -1920px),0,0);} }
.nubi-depth {
  transform-box: view-box;
  transform-origin: 50% 34%;
  animation-name: nubi-depth;
  animation-duration: var(--ddur, 40s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes nubi-depth {
  0% { transform: translateY(var(--y0, 0px)) scale(var(--s0, 1)); opacity: 0; }
  20% { opacity: 1; }
  50% { opacity: 1; }
  70% { opacity: 0; }
  100% { transform: translateY(var(--y1, 0px)) scale(var(--s1, 1)); opacity: 0; }
}
@keyframes sun-glow { 0%, 100% { opacity: .88; } 50% { opacity: 1; } }
.valley-sky .star { transform-box: fill-box; transform-origin: center; }
.valley-sky .sun image { transform-box: fill-box; transform-origin: center; animation: sun-glow 7s ease-in-out infinite; }
.valley-sky.is-day .star { display: none; }
.valley-sky.is-day .sat { display: none; }
.valley-sky .sky-hit { cursor: pointer; }
.valley-sky .star text {
  font: 600 13px Figtree, sans-serif;
  fill: #fff;
  stroke: rgba(8, 18, 28, .72);
  stroke-width: 3px;
  paint-order: stroke;
}
.valley-sky.is-twilight .star { opacity: .4; }
.valley-sky .planet text, .valley-sky .sat text {
  font: 600 13px Figtree, sans-serif;
  fill: #fff;
  stroke: rgba(8, 18, 28, .72);
  stroke-width: 3px;
  paint-order: stroke;
}
.valley-sky .sat circle { filter: drop-shadow(0 0 3px #fff); }
@keyframes twinkle { 50% { opacity: .55; } }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  display: inline-block;
  background: var(--good);
}
.dot.off { background: var(--bad); }
.clock {
  margin-left: auto;
  text-align: right;
  line-height: 1.15;
}
.clock time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
}
.clock small { font-size: 11px; color: rgba(255,255,255,.82); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--snow);
  padding: 8px 16px;
}
.toolbar p { font-size: 14px; color: var(--muted); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--snow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.btn:hover { background: var(--paper); }
.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--snow);
}
.btn-navy:hover { background: var(--navy-mid); }
.btn-ice { background: var(--ice); border-color: var(--ice); color: var(--navy); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.main { padding: 16px 12px 28px; }
@media (min-width: 640px) { .main { padding: 20px; } }

.page-head { margin-bottom: 16px; }
.page-head h1 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 400; }
.page-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}
.span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: span 12; }
@media (min-width: 640px) {
  .span-3 { grid-column: span 6; }
  .span-4 { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .span-6 { grid-column: span 6; }
  .span-8 { grid-column: span 8; }
  .span-4 { grid-column: span 4; }
  .span-3 { grid-column: span 3; }
}

.card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(18, 40, 58, 0.16);
  border-radius: var(--radius);
  background: var(--snow);
  box-shadow: 0 10px 24px rgba(16, 32, 44, 0.08);
  transition: background-color 2.8s ease, color 2.8s ease, box-shadow 2.8s ease;
}
.card-pad { padding: 16px; }
.widget { min-width: 0; }
.widget.is-edit { outline: 1px dashed rgba(11, 31, 51, 0.28); outline-offset: 2px; border-radius: 14px; }
.widget__tools {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  gap: 4px;
}
.widget.is-edit .widget__tools { display: flex; }
.chip {
  min-width: 32px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--navy);
  color: var(--snow);
  font-size: 11px;
  font-weight: 700;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) { .kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpi-strip { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

.block-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c2a30;
}
.instrument-block { min-width: 0; }
.nowcast-card > .block-title { padding: 14px 16px 0; margin: 0; }
.sheet {
  padding: 18px 20px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ice) 14%, transparent), transparent);
}
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 0;
}
.sheet-head .block-title { margin: 0; padding: 0; }
.template-name { margin: 0 0 6px; font-size: 1.35rem; font-weight: 700; }
.sheet .quadri--prima { padding: 0; }
.webcam__bar--top { position: static; }
.kpi:hover { transform: translateY(-2px); }
.kpi__ico { transition: transform 180ms var(--ease); }
.kpi:hover .kpi__ico { transform: scale(1.12); }
.wx-icon { transition: transform 200ms var(--ease); }
.nowcast:hover .wx-icon,
.day:hover .wx-icon,
.hour:hover .wx-icon { transform: scale(1.08) rotate(-6deg); }
.kpi__top { display: flex; align-items: flex-start; gap: 8px; }
.kpi__ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.kpi__ico svg { width: 16px; height: 16px; }
.kpi__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi__val {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}
.kpi__val small { margin-left: 4px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi__sub { margin-top: 8px; font-size: 11px; color: var(--subtle); }
.t-temp { color: var(--temp); }
.t-feel { color: var(--feel); }
.t-hum { color: var(--hum); }
.t-wind { color: var(--wind); }
.t-rain { color: var(--rain); }
.t-press { color: var(--press); }
.t-solar { color: var(--solar); }
.t-uv { color: var(--uv); }

.nowcast {
  display: grid;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ice) 14%, transparent), transparent);
}
@media (min-width: 860px) {
  .nowcast { grid-template-columns: minmax(260px, 0.85fr) 1.35fr; align-items: center; }
}
.nowcast__hero { display: flex; align-items: center; gap: 14px; }
.wx-icon { width: 80px; height: 80px; flex-shrink: 0; }
.nowcast__hero .big {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.95;
}
.nowcast__hero .big small { font-size: 0.42em; margin-left: 2px; }
.nowcast__hero .sky { font-weight: 650; font-size: 1.05rem; }
.nowcast__hero .feels { margin-top: 4px; font-size: 14px; color: var(--muted); }
.daybar { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 650; }
.daybar__track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #3b6fd8, #3aaa7a 45%, #e2b23a 75%, #d23b32);
}
.daybar__track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #16324f;
  transform: translate(-50%, -50%);
}
.nowcast__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.now-chip {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 74px;
}
.now-chip span { display: block; font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }
.now-chip strong { display: block; margin-top: 2px; font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.now-chip em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .nowcast__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nowcast__hero .big { font-size: 2.8rem; }
}
.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--paper);
  padding: 8px 12px;
}
.pill svg { width: 16px; height: 16px; }
.pill strong { display: block; font-size: 14px; }
.pill span { font-size: 11px; color: var(--muted); }

.template-mark .block-title { margin: 0 0 4px; }
.template-log { margin: 8px 0 0; padding-left: 18px; max-height: 280px; overflow: auto; }
.template-log li { margin: 2px 0; font-size: 15px; }
.work-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-list { margin: 8px 0 0; padding: 0; list-style: none; }
.work-list li { padding: 8px 0; border-bottom: 1px solid rgba(18, 40, 58, 0.1); font-size: 16px; }
.work-list em { font-style: normal; font-size: 13px; font-weight: 700; color: #6a4a12; }
@media (max-width: 800px) { .work-cols { grid-template-columns: 1fr; } }
.webcam-board__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; }
.webcam-board__top .block-title { margin: 0; }
.webcam-board__sets { display: flex; flex-wrap: wrap; gap: 6px; }
.webcam-board__stage { display: block; width: 100%; border: 0; padding: 0; background: #10202c; cursor: zoom-in; }
.webcam-board__stage img { display: block; width: 100%; height: 240px; object-fit: cover; }
.webcam-board__bar { position: static; background: #10202c; }
.webcam-board__bar span:last-child { max-width: 58%; text-align: right; }
.cam-frame { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(8, 16, 24, 0.72); padding: 16px; }
.cam-frame[hidden] { display: none; }
.cam-frame__box { width: min(960px, 96vw); max-height: 92vh; background: #10202c; border-radius: 14px; overflow: auto; resize: both; }
.cam-frame__box.is-m { width: min(640px, 94vw); }
.cam-frame__box.is-l { width: min(960px, 96vw); }
.cam-frame__box.is-f { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
.cam-frame__bar { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; color: #fff; }
.cam-frame__box img { display: block; width: 100%; height: auto; }
.sky-card__text { color: #d5e2ea; padding: 4px 14px 16px; margin: 0; font-size: 1.05rem; line-height: 1.45; }
.webcam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.webcam__bar {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: rgba(11, 31, 51, 0.55);
  color: var(--snow);
  font-size: 12px;
  padding: 8px 12px;
}

.detail { display: flex; flex-direction: column; min-height: 100%; }
.detail__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.detail__head svg { width: 14px; height: 14px; }
.detail--temp .detail__head { background: var(--temp); }
.detail--hum .detail__head { background: var(--hum); }
.detail--rain .detail__head { background: var(--rain); }
.detail--wind .detail__head { background: var(--wind); }
.detail--press .detail__head { background: var(--press); }
.detail--solar .detail__head { background: var(--solar); }
.detail__body { padding: 8px 14px 12px; }
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.row:last-child { border-bottom: 0; }
.row span { color: var(--muted); }
.row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.section-title h3 { font-size: 14px; font-weight: 700; }
.tabs {
  display: flex;
  background: var(--paper);
  padding: 2px;
  border-radius: 8px;
}
.tabs button, .tabs a {
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.tabs .is-on { background: var(--navy); color: var(--snow); }

.mm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding: 5px 0;
}
.mm-row span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.mm-row svg { width: 14px; height: 14px; }
.mm-row b { font-variant-numeric: tabular-nums; }

.chart-box { height: 260px; }
.metric-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.metric-tabs button {
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--snow);
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.metric-tabs button.is-on { background: var(--navy); color: var(--snow); border-color: var(--navy); }

.forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 800px) { .forecast { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.day {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--paper);
}
.day strong { display: block; font-size: 13px; }
.day .wx { width: 36px; height: 36px; margin: 8px auto; }
.day .tx { font-variant-numeric: tabular-nums; font-weight: 700; }
.day .tn { color: var(--muted); font-size: 13px; }
.day small { display: block; margin-top: 4px; font-size: 11px; color: var(--subtle); }

.hourly {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}
.hour-split {
  flex: 0 0 auto;
  align-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 8px 0;
}
.hour {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: 10px 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone, var(--border));
  background: var(--paper);
  font: inherit;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}
.hour.is-now {
  background: var(--snow);
  box-shadow: 0 0 0 2px var(--ice);
}
.hour time { color: var(--muted); font-weight: 700; font-size: 12px; }
.hour.is-now time { color: var(--navy); }
.hour .wx-icon { width: 36px; height: 36px; margin: 4px auto 2px; }
.hour .cond { min-height: 2.5em; font-size: 11px; font-weight: 600; line-height: 1.2; }
.hour .temp { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hour .rain { color: #1f5f86; font-weight: 700; }
.hour .pop, .hour .wind { color: var(--muted); font-size: 11px; }
.hour .trust { margin-top: 2px; font-size: 10px; font-weight: 700; }
.trust-alta { color: #1f7a46; }
.trust-media { color: #9a6a12; }
.trust-bassa { color: #a33b32; }
.hour .wx-icon .wx-sun { transform-origin: 26px 28px; animation: wx-pulse 3.4s ease-in-out infinite; }
.hour .wx-icon .wx-cloud { animation: wx-drift 5.5s ease-in-out infinite; }
.hour-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; margin: 0; }
.hour-hero .wx-icon { width: 64px; height: 64px; }
.hour-hero .wx-sun { transform-origin: 26px 28px; animation: wx-pulse 3.4s ease-in-out infinite; }
.hour-hero .wx-cloud { animation: wx-drift 5.5s ease-in-out infinite; }
.hour-hero .phrase { margin: 0 0 8px; text-align: left; line-height: 1.45; font-size: 17px; }
.hour-after { margin: 0 0 12px; text-align: left; line-height: 1.45; color: var(--muted); font-size: 15px; }
.hour-mix { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr); gap: 8px 28px; align-items: start; }
.hour-mix__nums h4 { margin: 10px 0 0; }
.hour-mix__nums h4:first-child { margin-top: 0; }
.hour-mix__nums > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 7px 0; }
.hour-mix__nums span { color: var(--muted); }
.hour-mix__nums b { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.hour-detail h4 { margin: 14px 0 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hour-detail .note { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; border: 0; line-height: 1.4; }
#hourDetail .modal__card { width: min(880px, 100%); }
#dayForecast .phrase { margin: 0 0 8px; line-height: 1.5; font-size: 16px; }
@keyframes wx-pulse { 50% { transform: scale(1.08); } }
@keyframes wx-drift { 50% { transform: translateX(3px); } }
@media (max-width: 700px) {
  .hour-cols { grid-template-columns: 1fr; }
  .hour-mix { grid-template-columns: 1fr; }
}
.hour-detail > div:not(.hour-mix) { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.hour-detail > .hour-hero { display: block; border: 0; padding: 0; }

.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 700px) { .shortcuts { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.shortcuts a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  min-height: 72px;
}
.nav a.sub { padding-left: 36px; font-size: 13px; color: var(--sidebar-muted); }
.trend { font-size: 0.85rem; margin-left: 4px; }
.kpi[data-open-chart] { cursor: pointer; }
.kpi[data-open-chart]:hover { box-shadow: 0 0 0 2px var(--ice); }
.kpi-strip .kpi__label[data-open-chart],
.kpi-strip .kpi__val[data-open-chart] { cursor: pointer; }
.kpi-strip .kpi__val { text-shadow: 0 0 12px color-mix(in srgb, currentColor 70%, transparent); }
.kpi-strip .kpi__ico { color: inherit !important; }
.kpi-strip .kpi__ico svg [fill^="#"] { fill: currentColor; }
.detail__ico { display: inline-flex; color: inherit; }
.detail__ico svg [fill^="#"] { fill: currentColor; }
.kpi-strip .gauge,
.kpi-strip .gauge canvas { cursor: grab; touch-action: pan-y; }
.kpi-strip .gauge canvas.is-turn { cursor: grabbing; }
.detail__body { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; align-items: center; }
.gauge { display: block; width: 108px; padding: 0; border: 0; background: none; cursor: pointer; }
.gauge svg { width: 108px; height: 78px; display: block; }
.detail__more { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ice); background: none; border: 0; padding: 0; }
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 18px; background: rgba(8, 16, 22, 0.62);
}
#minmax.card { overflow: visible; height: auto; }
.modal[hidden] { display: none; }
.modal__card {
  width: min(1100px, 100%); max-height: 92vh; overflow: auto; background: var(--snow); color: var(--ink);
  border-radius: 16px; padding: 16px 16px 12px; box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.chart-box--hd { height: 520px; }
@media (max-width: 700px) { .detail__body { grid-template-columns: 1fr; } .chart-box--hd { height: 280px; } }

[data-theme="giorno"] {
  --navy: #0a3a42; --navy-deep: #06262c; --paper: #e7f6f4; --paper-2: #d2ebe7;
  --snow: #ffffff; --ink: #102428; --muted: #3d656c; --ice: #0c9b8a; --border: #c5e0dc;
}
[data-theme="prealba"] {
  --navy: #12182c; --navy-deep: #0b1020; --paper: #141b30; --paper-2: #1c2642;
  --snow: #1a2340; --ink: #e4e9f6; --muted: #aeb8d4; --subtle: #8792b0;
  --ice: #b7a6e4; --border: #2c3858;
}
[data-theme="alba"] {
  --navy: #243044; --navy-deep: #172233; --paper: #e4eaf3; --paper-2: #d3dce8;
  --snow: #f7f8fb; --ink: #1c2836; --muted: #546378; --ice: #e08a55; --border: #cdd6e2;
}
[data-theme="aurora"] {
  --navy: #3a2832; --navy-deep: #261820; --paper: #f8ece8; --paper-2: #f0d8d4;
  --snow: #fff8f6; --ink: #2c1e24; --muted: #7a5560; --ice: #e07a78; --border: #edd4d0;
}
[data-theme="mattina"] {
  --navy: #0e3334; --navy-deep: #082224; --paper: #e5f4ef; --paper-2: #d0e8e1;
  --snow: #ffffff; --ink: #102822; --muted: #3f655c; --ice: #149e86; --border: #c7e0d8;
}
[data-theme="meriggio"] {
  --navy: #1a3028; --navy-deep: #10201a; --paper: #eef3e8; --paper-2: #dce6d4;
  --snow: #fbfdf8; --ink: #16241c; --muted: #4d6556; --ice: #2f9a62; --border: #d0e0d2;
}
[data-theme="pomeriggio"] {
  --navy: #243028; --navy-deep: #161e19; --paper: #f3ead8; --paper-2: #e6d8bf;
  --snow: #fffdf8; --ink: #2a2418; --muted: #6d5e48; --ice: #c9842a; --border: #e2d3b8;
}
[data-theme="oro"] {
  --navy: #3a2c14; --navy-deep: #261c0c; --paper: #f8e8c4; --paper-2: #f0d59a;
  --snow: #fff9ee; --ink: #2e2412; --muted: #746038; --ice: #d4922a; --border: #edd6a4;
}
[data-theme="tramonto"] {
  --navy: #4a2a22; --navy-deep: #2e1814; --paper: #f8e3d2; --paper-2: #efd0b8;
  --snow: #fff7f1; --ink: #3a221c; --muted: #7a5348; --ice: #d85a3a; --border: #ecc8b4;
  --temp: #d85a3a;
}
[data-theme="crepuscolo"] {
  --navy: #0e1726; --navy-deep: #090f1a; --paper: #162033; --paper-2: #1e2c46;
  --snow: #1e2c42; --ink: #e7eef6; --muted: #a9b8cc; --subtle: #8496ad;
  --ice: #8eb7e0; --border: #2c3d58;
}
[data-theme="sera"] {
  --navy: #0a101c; --navy-deep: #060a12; --paper: #101624; --paper-2: #182236;
  --snow: #161d2e; --ink: #dfe6f2; --muted: #9aabc4; --subtle: #7486a2;
  --ice: #6f8cb8; --border: #243044;
}
[data-theme="notte"] {
  --navy: #070b10; --navy-deep: #04070b; --navy-mid: #151c24;
  --ink: #e7eef3; --paper: #0c1116; --paper-2: #161d26; --snow: #141b23;
  --muted: #9aabba; --subtle: #7d8d9b; --ice: #7fb6c6; --border: #24303a;
}
[data-theme="ghiaccio"] {
  --navy: #16344a; --navy-deep: #0e2434; --paper: #eef4f6; --paper-2: #dce8ee;
  --snow: #f7fbfc; --ink: #143042; --ice: #3d8aa3; --border: #c9d8e0;
}
[data-theme="vigneto"] {
  --navy: #2a1b16; --navy-deep: #1a100d; --paper: #f4eee4; --paper-2: #e6d9c8;
  --snow: #fbf7f1; --ink: #2a1b16; --ice: #8a5a3c; --border: #e0d0c0;
  --temp: #9a3d32;
}
[data-theme="ardesia"] {
  --navy: #1c2128; --navy-deep: #12161b; --paper: #e8eaed; --paper-2: #d5d8de;
  --snow: #f4f5f7; --ink: #1c2128; --ice: #5d7384; --border: #cfd4da;
}
.shortcuts svg { width: 20px; height: 20px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 11px;
  color: var(--subtle);
}

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
table.data th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.form { display: grid; gap: 12px; max-width: 560px; }
label.field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
input, select, textarea {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  background: var(--snow);
  color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
.alert {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper-2);
  font-size: 13px;
}
.alert.ok { background: color-mix(in srgb, var(--good) 16%, var(--snow)); }
.alert.err { background: color-mix(in srgb, var(--bad) 16%, var(--snow)); }

.catalog { display: grid; gap: 8px; }
.catalog button.add {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border: 0;
  background: var(--paper);
  border-radius: 10px;
  padding: 12px;
}
.catalog button.add:hover { background: var(--paper-2); }
.catalog small { display: block; font-weight: 400; color: var(--muted); }

.layout-list { display: grid; gap: 6px; }
.layout-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 10px;
}
.layout-item strong { font-size: 14px; }
.layout-item .ops { display: flex; gap: 4px; }

code, .mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 12px; }
pre.box {
  overflow-x: auto;
  background: var(--navy);
  color: var(--snow);
  padding: 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

body { font-size: 17px; }
.nav a { font-size: 16px; min-height: 48px; }
.brand-text small, .clock small, .topbar .meta, .kpi__sub, .pill span, .day small, .foot, table.data th {
  font-size: 14px;
}
.kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { min-height: 0; padding: 12px 14px 16px; }
.kpi .gauge { width: 100%; margin: 0 auto 4px; }
.kpi .gauge svg { width: 100%; height: 92px; }
.kpi__label { font-size: 18px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.kpi__val { font-size: 2.15rem; }
.kpi__val small { font-size: 16px; }
.kpi__ico { width: 48px; height: 48px; }
.kpi__ico svg { width: 28px; height: 28px; }
.kpi .gauge svg { width: 100%; height: 128px; }
.detail .gauge, .detail .gauge svg { width: 150px; height: 140px; }
.chart-box { height: 560px; background: #fff; border-radius: 12px; }
.chart-box--hd { height: 540px; }
@media (max-width: 700px) {
  .detail__body { grid-template-columns: 1fr; }
  .chart-box, .chart-box--hd { height: 360px; }
  .spa-box { height: 420px; }
}
.spa-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.spa-row button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.spa-row button.is-on { background: #0c2429; color: #fff; border-color: #0c2429; }
.spa-row button:disabled { opacity: 0.45; cursor: default; }
.spa-stamp { margin: 4px 0 6px; font-size: 16px; font-weight: 750; }
.spa-note, .spa-status { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.spa-box { height: 640px; background: #fff; }
.gram-strip { margin: 0 0 16px; padding: 12px 12px 8px; background: linear-gradient(180deg, #f7fbfe 0%, #fff 40%); border: 1px solid rgba(20, 50, 70, 0.08); border-radius: 16px; }
.gram-strip[hidden] { display: none !important; }
.gram-label { margin: 0 0 6px; font-size: 16px; font-weight: 750; letter-spacing: 0.01em; }
.gram-box { position: relative; height: 360px; }
.gram-strip[data-gram-strip="cloud"] .gram-box { height: 420px; }
#gramRoot .spa-row button { display: inline-flex; align-items: center; gap: 8px; }
#gramRoot .spa-row button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, #9aa8b2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, #9aa8b2) 25%, transparent);
}
#gramRoot [data-gram-models] button::before { display: none; }
#gramRoot .spa-row button.is-on {
  background: color-mix(in srgb, var(--dot, #10242c) 16%, #fff);
  color: #10242c;
  border-color: var(--dot, #10242c);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--dot, #10242c) 28%, transparent);
}
#gramRoot [data-gram-models] button.is-on {
  background: #10242c;
  color: #fff;
  border-color: #10242c;
  box-shadow: none;
}
.gram-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 2px 0 12px; font-size: 13px; font-weight: 700; color: #3d4d63; }
.gram-scale i { display: inline-block; width: 72px; height: 10px; border-radius: 999px; }
.gram-scale__temp { background: linear-gradient(90deg, #2456c9, #3aa0e8 18%, #3adf6a 42%, #f0e04a 64%, #f07820 82%, #e23b3b); }
.gram-scale__rain { background: linear-gradient(90deg, #7ec8f0, #2b9bdc 45%, #1d4f8f 75%, #3a1d6e); }
.gram-scale__snow { background: linear-gradient(90deg, #f4fbff, #b9e6fb); border: 1px solid #9ed4ee; }
@media (max-width: 700px) {
  .spa-box { height: 420px; }
  .gram-box { height: 280px; }
  .gram-strip[data-gram-strip="cloud"] .gram-box { height: 320px; }
}
.nowcast__hero .big { font-size: 3.6rem; }
.nowcast__hero .sky { font-size: 1.15rem; }
.nowcast__hero .feels, .pill strong, .row, .section-title h3, .day strong, .hour, .btn, .toolbar p, .page-head p {
  font-size: 16px;
}
.detail__head { font-size: 16px; }
.detail__more { font-size: 15px; }
.detail__body { grid-template-columns: 160px minmax(0, 1fr); }
.row b { font-size: 17px; }
.day .tx { font-size: 1.35rem; }
.day .tn { font-size: 16px; }
.hour b { font-size: 16px; }
table.data td { font-size: 15px; }
.topbar h1 { font-size: 1.85rem; }
.clock time { font-size: 2.1rem; }

.kpi-strip { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
@media (min-width: 800px) {
  .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.kpi {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px;
  padding: 16px 12px 18px !important;
  min-height: 0;
  text-align: center;
  border: 1px solid rgba(18, 40, 58, 0.18);
}
.kpi .gauge {
  display: grid !important;
  width: min(320px, 100%) !important;
  height: auto !important;
  max-height: 320px;
  aspect-ratio: 1;
  margin: 8px auto 6px;
  padding: 0;
  border: 0;
  background: transparent;
  place-items: center;
}
.kpi .gauge svg { width: 100% !important; height: 100% !important; }
.kpi__head { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.kpi__head .kpi__ico { width: 44px !important; height: 44px !important; margin: 0 !important; }
.kpi__head .kpi__label { text-align: left; }
.kpi .gauge--uv { width: 100% !important; height: 96px !important; margin: 8px 0 4px; }
.kpi .gauge--uv svg { width: 100% !important; height: 96px !important; }
.kpi__ico { width: 46px !important; height: 46px !important; margin: 0 auto 2px; flex: none; border-radius: 12px; }
.kpi__ico svg { width: 28px !important; height: 28px !important; }
.kpi__label { display: block !important; order: 0; font-size: 22px !important; margin: 0 !important; font-weight: 750; text-transform: none; letter-spacing: 0; color: #1c2a30 !important; }
.kpi__val { display: flex; align-items: baseline; justify-content: center; gap: 8px; font-size: 3rem !important; font-weight: 750; margin: 0 !important; line-height: 1; color: inherit; }
.kpi__val small { color: inherit; font-size: 18px !important; font-weight: 700; }
.kpi__dir { font-size: 22px; font-weight: 750; letter-spacing: 0.02em; }
.gauge-photo { position: relative; display: block; width: 100%; height: 100%; }
.gauge-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gauge-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gauge [data-liq] { transition: y 700ms ease; }
.gauge [data-needle] { transition: x1 700ms ease, y1 700ms ease, x2 700ms ease, y2 700ms ease; }
.gauge [data-dir] { transition: transform 800ms ease; }
.gauge [data-uv] { transition: transform 600ms ease; }
.gauge [data-glow] { transition: opacity 700ms ease; }
.gauge[data-draw="cru"] [data-needle] {
  transform-box: view-box;
  transform-origin: 100px 100px;
  transition: transform 800ms ease;
}
.gauge[data-draw="cru"] .cru-spin.is-on {
  transform-box: view-box;
  transform-origin: 100px 100px;
  animation: spin var(--spin, 3s) linear infinite;
}
.kpi .gauge[data-draw="cru"],
.quadri .gauge[data-draw="cru"] { position: relative; }
.kpi .gauge[data-draw="cru"] canvas,
.quadri .gauge[data-draw="cru"] canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail .gauge[data-draw="cru"],
.detail .gauge[data-draw="cru"] svg { width: 200px; height: 200px; }
@media (prefers-reduced-motion: reduce) {
  .gauge[data-draw="cru"] .cru-spin.is-on { animation: none; }
}
.gauge .glass-drop { display: none; }
.gauge[data-rain="wet"] .glass-drop.is-still { display: block; }
.gauge[data-rain="light"] .glass-drop.is-light,
.gauge[data-rain="rain"] .glass-drop.is-light,
.gauge[data-rain="rain"] .glass-drop.is-rain,
.gauge[data-rain="heavy"] .glass-drop.is-light,
.gauge[data-rain="heavy"] .glass-drop.is-rain,
.gauge[data-rain="heavy"] .glass-drop.is-heavy {
  display: block;
  animation: glass-fall var(--fall, 1.3s) linear infinite;
}
.gauge[data-rain="light"] { --fall: 2.6s; }
.gauge[data-rain="rain"] { --fall: 1.15s; }
.gauge[data-rain="heavy"] { --fall: 0.5s; }
@keyframes glass-fall {
  0% { transform: translateY(-36px); opacity: 0; }
  14% { opacity: 0.9; }
  100% { transform: translateY(250px); opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) {
  .gauge [data-liq], .gauge [data-needle], .gauge [data-dir], .gauge [data-uv] { transition: none; }
  .cups.is-on .cups__rotor, .gauge .glass-drop { animation: none; }
}
.kpi__sub { font-size: 18px !important; margin-top: 6px !important; color: #314048; line-height: 1.35; white-space: pre-line; }
.kpi__trend { margin-top: 2px; font-size: 14px; font-weight: 750; color: #1c2a30; }
.kpi-hd .kpi__top { align-items: center; gap: 14px; margin-top: 4px; }
.kpi-hd .kpi__ico { width: 64px; height: 64px; border-radius: 14px; }
.kpi-hd .kpi__ico svg { width: 36px; height: 36px; }
.kpi-hd .kpi__label { font-size: 26px; line-height: 1.15; font-weight: 700; }
.kpi-hd .kpi__val { font-size: 3rem; margin-top: 2px; }
.kpi-hd .kpi__val small { font-size: 20px; }
.kpi-hd .kpi__sub { font-size: 17px; margin-top: 6px; }
.detail__body { grid-template-columns: 230px minmax(0, 1fr) !important; align-items: center; }
.detail .gauge,
.detail .gauge svg {
  width: min(220px, 100%) !important;
  height: auto !important;
  max-height: 220px;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
}
.detail .gauge svg { width: 100% !important; height: 100% !important; }
@media (max-width: 700px) {
  .detail__body { grid-template-columns: 1fr !important; }
}

.topbar__veil {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 26%, transparent 52%) !important;
}
.topbar {
  aspect-ratio: 1920 / 500 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
.topbar__row {
  position: absolute;
  inset: 0;
  height: auto !important;
  align-items: flex-end;
  padding: 20px 28px 16px;
}
.icon-btn.only-mobile {
  background: rgba(7, 24, 28, 0.82);
  color: #fff;
}
.menu-phone {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
  background: var(--navy);
}
.menu-phone a {
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
@media (min-width: 1024px) {
  .menu-phone { display: none; }
}
.topbar__row {
  position: absolute;
  inset: 0;
  height: auto !important;
  align-items: flex-end;
  padding: 18px 20px 16px;
}
.topbar h1 {
  font-size: clamp(1.55rem, 2.4vw, 2.8rem) !important;
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
}
.topbar .meta, .clock small, .clock time {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
@media (min-width: 1100px) {
  .topbar {
    aspect-ratio: 1920 / 500 !important;
    max-height: none;
    min-height: 0;
  }
  .topbar__row { padding: 22px 32px 18px; }
  .detail__body { grid-template-columns: 250px minmax(0, 1fr) !important; }
  .detail .gauge, .detail .gauge svg {
    width: 230px !important;
    height: 230px !important;
  }
}

.kpi__trend:empty { display: none; }
.kpi.is-fresh,
.now-chip.is-fresh,
.card[data-live].is-fresh,
.feels.is-fresh,
.big.is-fresh,
.mast__cell.is-fresh {
  animation: live-flash 2s ease;
}
@keyframes live-flash {
  0%, 65% { box-shadow: inset 0 0 0 2px var(--ice); }
  100% { box-shadow: inset 0 0 0 0 transparent; }
}

.mast {
  background: var(--snow);
  color: var(--ink);
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.mast__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.mast__id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mast h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.5vw, 2.6rem);
  line-height: 1.05;
  color: var(--ink);
  text-shadow: none;
}
.mast__place { margin-top: 4px; color: var(--muted); font-size: 15px; }
.mast__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; font-size: 14px; }
.mast .clock small, .mast .clock time { color: var(--ink); text-shadow: none; }
.mast .clock small { color: var(--muted); }
.mast .icon-btn.only-mobile { background: var(--paper); color: var(--ink); }
.station-state {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--paper); color: inherit;
  border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer;
}
.station-state.state-late .dot { background: #d4922a; }
.station-state.state-down .dot { background: var(--bad); }

.mast__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 900px) {
  .mast__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.mast__cell {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px 12px;
  min-width: 0;
  color: inherit;
}
button.mast__cell { font: inherit; cursor: pointer; }
.mast__cell > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.mast__cell b {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
}
.mast__cell em:empty { display: none; }
.mast__cell em,
.mast__cell small {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}
.sky-note { font-weight: 500; color: var(--subtle); }
.mast .clock time { font-size: clamp(2rem, 3vw, 2.8rem); }
.mast--oss { background: transparent; padding-top: 10px; }
.mast--oss .mast__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.mast--oss .only-mobile { grid-column: 1; justify-self: start; }
.mast--oss .oss-pill { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 22px -16px rgba(16,32,42,.45); font: 600 14px/1.2 inherit; cursor: pointer; }
.mast--oss .mast__id { text-align: center; }
.mast--oss .mast__id h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: 0; }
.mast--oss .clock { justify-self: end; text-align: right; }
.oss-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.oss-sc { display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 12px 14px; border-radius: 18px; background: var(--paper); box-shadow: 0 10px 24px -18px rgba(16,32,42,.5); }
.oss-sc strong { display: block; font-size: 1.35rem; line-height: 1.15; }
.oss-sc p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.oss-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.oss-arc { display: block; width: min(210px, 100%); height: 52px; margin-top: 4px; }
.oss-arc path { fill: none; stroke: var(--line, #c9dadf); stroke-width: 2.5; stroke-linecap: round; }
.oss-arc circle { fill: #f4c542; }
.oss-block { display: grid; gap: 14px; }
.oss-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.oss-head p { margin: 0; color: var(--muted); font-size: 13px; }
.oss-hero { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.1fr); gap: 12px; }
.oss-sky, .oss-temp, .oss-metric { border-radius: 20px; background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line, #c9dadf) 80%, transparent); padding: 16px; min-width: 0; }
.oss-sky { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.oss-sky__ico { grid-row: span 2; }
.oss-sky strong { font-size: 1.7rem; }
.oss-okta { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 16%, transparent); font-weight: 700; font-size: 14px; }
.oss-sky p, .oss-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.oss-tiles { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.oss-tiles div { padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--muted) 8%, var(--paper)); }
.oss-tiles span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.oss-tiles b { font-size: 1.25rem; }
.oss-temp { background: radial-gradient(80% 70% at 100% 0, color-mix(in srgb, var(--tled, #2f9d9a) 18%, transparent), transparent 65%), var(--paper); }
.oss-temp__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.oss-temp__row b { font-size: clamp(4.2rem, 8vw, 6.4rem); line-height: .85; color: var(--tled, #2f9d9a); font-variant-numeric: tabular-nums; }
.oss-temp__row small { font-size: 1.8rem; color: var(--muted); }
.oss-temp__row em { margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tled, #2f9d9a) 16%, transparent); font-style: normal; font-weight: 700; font-size: 14px; }
.oss-feels { display: flex; gap: 16px; margin: 8px 0; font-weight: 600; }
.oss-spark { display: block; width: 100%; height: 42px; }
.oss-spark polyline { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.oss-range { position: relative; height: 8px; margin: 8px 4px 4px; border-radius: 8px; background: linear-gradient(90deg, #3f9fe0, #45c9a5 40%, #efc04c 70%, #e2574c); }
.oss-range i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transform: translate(-50%, -50%); left: 50%; }
.oss-rl { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.oss-rl b { font-size: 1.25rem; }
.oss-rl .lo b { color: #2f8fc4; }
.oss-rl .hi { text-align: right; }
.oss-rl .hi b { color: #cf4f47; }
.oss-tools__h { display: flex; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin: 4px 0 8px; }
.oss-tools__h h3 { margin: 0; font-size: 1.15rem; }
.oss-tools__h p { margin: 0; color: var(--muted); font-size: 13px; }
.oss-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.oss-metric { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; overflow: hidden; }
.oss-metric::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--led); }
.oss-metric__h { display: flex; align-items: center; gap: 8px; width: 100%; }
.oss-dial { width: min(190px, 100%); height: auto; }
.oss-dial .trk { fill: none; stroke: color-mix(in srgb, var(--muted) 25%, transparent); stroke-width: 8; stroke-linecap: round; }
.oss-dial [data-speed] { fill: none; stroke: var(--led); stroke-width: 8; stroke-linecap: round; }
.oss-dial line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.oss-dial circle { fill: var(--ink); }
.oss-dial text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.oss-metric__v { margin: 0; font-size: 2rem; line-height: 1; color: var(--led); font-variant-numeric: tabular-nums; }
.oss-metric__s { margin: 4px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.mast--oss, .oss-block { font-family: Barlow, Figtree, system-ui, sans-serif; }
.mast--oss h1, .oss-sc strong, .oss-temp__row b, .oss-metric__v b, .oss-tiles b, .oss-rl b, .oss-sky strong {
  font-family: "Barlow Condensed", Figtree, sans-serif;
  font-weight: 700;
}
.oss-tools-top { justify-self: end; display: flex; align-items: center; gap: 12px; }
.oss-theme { border: 0; border-radius: 12px; padding: 8px 12px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 22px -16px rgba(16,32,42,.45); font: 600 13px/1 inherit; cursor: pointer; }
.oss-cat { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--led); text-transform: none; letter-spacing: 0; }
.oss-metric__h { justify-content: center; }
.oss-metric:hover::after { content: "Apri grafico"; position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 12%, var(--paper)); font-size: 11px; font-weight: 700; color: var(--muted); }
body[data-oss="light"] .mast--oss, body[data-oss="light"] .oss-block { --ink:#17303c; --muted:#556f7b; --paper:#f7fafb; --line:#c9dadf; color:#17303c; }
body[data-oss="dark"] .mast--oss, body[data-oss="dark"] .oss-block { --ink:#e4f0f3; --muted:#9db6bf; --paper:#16252d; --line:#2f4852; color:#e4f0f3; }
@media (max-width: 900px) {
  .oss-hero, .oss-metrics, .oss-strip { grid-template-columns: 1fr; }
  .mast--oss .mast__top { grid-template-columns: auto 1fr; }
  .mast--oss .clock { grid-column: auto; }
  .oss-tools-top { grid-column: 1 / -1; justify-self: end; }
}

button.station-state.mast__cell { border-radius: 12px; padding: 10px 12px 12px; }

.visit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.visit-cell span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.visit-cell b { display: block; font-size: 1.7rem; line-height: 1.1; margin-top: 2px; }
.visit-cell small { color: var(--muted); }
.foot a { color: inherit; }

.mast__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.mast__id { grid-column: 2; text-align: center; }
.mast .clock { grid-column: 3; justify-self: end; margin-left: 0; text-align: right; }
.mast .icon-btn.only-mobile { grid-column: 1; justify-self: start; }
.mast h1 { text-align: center; }
.led {
  --led: #3dba72;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.led.state-late { --led: #e0a23a; }
.led.state-down { --led: #c4523e; }
.led__lamp {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 10px var(--led);
}
.led__lamp::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid var(--led);
  animation: led-ring 1.8s ease-out infinite;
}
.led.state-down .led__lamp::after { animation: none; opacity: 0.45; }
@keyframes led-ring {
  0% { transform: scale(0.45); opacity: 0.85; }
  100% { transform: scale(1.55); opacity: 0; }
}
@media (min-width: 800px) {
  .mast__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 960px; margin-left: auto; margin-right: auto; }
}
.mast__cell { text-align: center; }
.mast__cell > span { justify-content: center; }
.mast .clock time { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
@media (max-width: 720px) {
  .mast__top { grid-template-columns: auto 1fr; }
  .mast__id, .mast .clock { grid-column: 1 / -1; }
  .mast .clock { justify-self: center; text-align: center; }
}
.mast__id { display: flex; flex-direction: column; align-items: center; }

.nowcast__list { display: flex; flex-direction: column; min-width: 0; }
.now-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.now-row:last-child { border-bottom: 0; }
.now-svg { grid-row: 1 / span 2; width: 46px; height: 46px; }
.now-row__name { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.now-row strong { grid-column: 3; grid-row: 1 / span 2; font-size: clamp(1.25rem, 1.6vw, 1.55rem); color: var(--tone, inherit); }
.now-row em { grid-column: 2; font-style: normal; font-size: 13px; color: var(--muted); }
.nowcast__hero .wx-icon { width: 96px; height: 96px; animation: wx-float 4.5s ease-in-out infinite; }
@keyframes wx-float { 50% { transform: translateY(-5px); } }
.now-svg .rays { transform-origin: 32px 32px; animation: spin 16s linear infinite; }
.now-svg .drip { animation: drip 1.5s linear infinite; }
.now-svg .drip-2 { animation-delay: .4s; }
.now-svg .drip-3 { animation-delay: .8s; }
.now-svg .gust { animation: slide 1.8s ease-in-out infinite; }
.now-svg .gust-2 { animation-delay: .3s; }
.now-svg .gust-3 { animation-delay: .6s; }
.now-svg .needle { transform-origin: 32px 40px; animation: sway 2.6s ease-in-out infinite; }
.now-svg .pulse { animation: glow 2.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: translateY(-3px); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateY(7px); opacity: 0; } }
@keyframes gauge-rain { 0% { transform: translateY(-8px); opacity: 0; } 18% { opacity: 1; } 72% { transform: translateY(58px); opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
@keyframes slide { 50% { transform: translateX(4px); } }
@keyframes sway { 50% { transform: rotate(16deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { 50% { opacity: .45; } }
.now-row.is-fresh { animation: live-flash 2s ease; }

.quadri { display: grid; }
.quadro { padding: 2px 16px 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.quadro .now-row { border-bottom: 0; padding-bottom: 2px; }
.quadro__lines { display: grid; gap: 3px; margin: 0 0 4px 58px; }
.quadro__lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.quadro__lines span { color: var(--muted); }
@media (min-width: 900px) {
  .quadri { grid-template-columns: 1fr 1fr; }
  .quadro:nth-child(odd) { border-right: 1px solid var(--border); }
}

.quadri-wrap > .block-title { padding: 14px 16px 0; }
.quadri--prima { display: grid; gap: 12px; padding: 12px; }
.quadri--prima .card { min-width: 0; }
.detail--uv .detail__head { background: #7a3ff0; }
@media (min-width: 800px) {
  .quadri--prima { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1200px) {
  .quadri--prima { grid-template-columns: 1fr 1fr 1fr; }
}

.foot-visits {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  width: 100%;
  margin-bottom: 4px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.foot-visits span { font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.foot-visits b { font-weight: 600; }
.foot-visits em { font-style: normal; font-size: 1.15rem; font-weight: 750; color: var(--ink); }

.card.card-pad:not(.template-mark) { padding: 0 0 16px; }
.card.card-pad > .block-title,
.card.card-pad > .section-title {
  margin: 0 0 12px;
  padding: 14px 16px 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c2a30;
}
.card.card-pad > .section-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c2a30;
}
.card.card-pad > :not(.block-title):not(.section-title) {
  margin-left: 16px;
  margin-right: 16px;
}

body { font-size: 19px; }
.nav a { font-size: 18px; }
.block-title,
.nowcast-card .block-title,
.quadri-wrap > .block-title,
.card.card-pad > .block-title,
.card.card-pad > .section-title,
.card.card-pad > .section-title h3 {
  font-size: 15px;
}
.now-row__name { font-size: 14px; }
.now-row em { font-size: 15px; }
.now-row strong { font-size: 1.7rem; }
.kpi__label { font-size: 20px; }
.kpi__val { font-size: 2.35rem; }
.kpi__sub, .kpi__trend { font-size: 14px; }
.nowcast__hero .big { font-size: 4rem; }
.nowcast__hero .sky { font-size: 1.3rem; }
.nowcast__hero .feels { font-size: 16px; }
.detail__head { font-size: 18px; }
.detail__more { font-size: 16px; }
.row, .row span { font-size: 16px; }
.row b { font-size: 19px; }
.day .tx { font-size: 1.5rem; }
.day strong, .day .tn, .hour time, .hour b { font-size: 15px; }
.hour .temp { font-size: 1.35rem; }
table.data td { font-size: 16px; }
.now-svg.now-svg--kpi,
.kpi__ico .now-svg { width: 36px; height: 36px; grid-row: auto; }
.now-svg.now-svg--sm,
.detail__head .now-svg,
.mm-row .now-svg,
.shortcuts .now-svg { width: 22px; height: 22px; grid-row: auto; }
.detail__head .now-svg { width: 26px; height: 26px; }
.mm-row span, .shortcuts a { display: inline-flex; align-items: center; gap: 8px; }

.mm-tabs { flex-wrap: wrap; }
.mm-tabs a { height: auto; min-height: 36px; padding: 6px 12px; font-size: 15px; }
.mm-period { margin: 0 0 12px; font-size: 1.2rem; font-weight: 700; }
.mm-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.mm-pick select { min-height: 40px; font-size: 16px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; background: var(--snow); }
.mm-table-wrap { overflow: visible; }
.mm-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.mm-table th, .mm-table td { text-align: center; vertical-align: middle; }
.mm-table thead th {
  font-size: 14px;
  font-weight: 700;
  color: #1c2a30;
  padding: 0 8px 4px;
}
.mm-table tbody th, .mm-table tbody td { padding: 12px 8px; }
.mm-name {
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  color: #1c2a30;
  white-space: nowrap;
}
.mm-name span, .mm-name { display: inline-flex; }
.mm-name { display: flex; align-items: center; gap: 10px; }
.mm-name .now-svg { width: 28px; height: 28px; flex: none; }
.mm-k { display: none; }
.mm-min, .mm-mid, .mm-max, .mm-empty, .mm-rain {
  border-radius: 10px;
  min-width: 108px;
}
.mm-min { background: #e7f0ff; }
.mm-mid { background: #f4f1e8; }
.mm-max { background: #fde8e3; }
.mm-empty { background: #f7f5f0; }
.mm-rain { background: #e7f3ee; }
.mm-min b, .mm-mid b, .mm-max b, .mm-rain b, .mm-empty b {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.mm-min b { color: #143e86; }
.mm-mid b { color: #1a2428; }
.mm-max b { color: #9d2e1c; }
.mm-rain b { color: #0f6b45; }
.mm-empty b { color: #8aa0a8; font-weight: 500; }
.mm-table em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 15px;
  color: #243038;
}
.mm-go { width: 1%; }
.mm-go button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--snow);
  font-size: 15px;
  font-weight: 700;
  color: #1c2a30;
  cursor: pointer;
}
.mm-foot { margin: 12px 0 0; font-size: 16px; color: #243038; }
#minmax.is-loading { opacity: 0.55; }
.mm-track-row td { padding-top: 0; background: transparent; }
.mm-track {
  position: relative;
  height: 8px;
  margin: 0 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #7eaaef, #f3c7be);
}
.mm-track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1c2a30;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(28, 42, 48, 0.35);
  transform: translate(-50%, -50%);
}
.mm-track-row em {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-style: normal;
  font-size: 14px;
  color: #243038;
}
@media (max-width: 720px) {
  .mm-table tr.mm-track-row { display: block; margin: -4px 0 12px; }
  .mm-track-row td { display: none; }
  .mm-track-row td[colspan] { display: block; }
  .mm-only { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .mm-table thead { display: none; }
  .mm-table, .mm-table tbody, .mm-table tr, .mm-table th, .mm-table td { display: block; }
  .mm-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 14px;
  }
  .mm-name, .mm-go, .mm-rain { grid-column: 1 / -1; }
  .mm-k { display: block; font-size: 12px; font-weight: 700; color: #243038; margin-bottom: 2px; }
  .mm-min b, .mm-mid b, .mm-max b, .mm-rain b { font-size: 1.35rem; }
}
.mm-cal { margin: 0 0 14px; }
.mm-cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 18px; }
.mm-cal__nav a { text-decoration: none; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--paper); color: var(--ink); }
.mm-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mm-cal__grid span { font-size: 13px; color: var(--muted); font-weight: 700; }
.mm-cal__grid a, .mm-cal__grid i { min-height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-style: normal; font-size: 16px; }
.mm-cal__grid a { text-decoration: none; background: var(--paper); color: var(--ink); font-weight: 700; }
.mm-cal__grid a.is-on { background: var(--navy); color: var(--snow); }
.mm-cal__grid i.is-off { color: #b7c4c8; }
@media (max-width: 640px) {
  .mm-side b { font-size: 1.45rem; }
}

/* Layout A: menu e contenuto stanno insieme. Il blocco si ferma a 1440px. */
.shell > div { min-width: 0; }
@media (min-width: 1024px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
    width: 100%;
    margin-inline: auto;
  }
  .shell > div > .topbar,
  .shell > div > .mast,
  .shell > div > .main,
  .shell > div > .foot {
    width: 100%;
    margin-inline: 0;
  }
}
@media (min-width: 1280px) {
  .shell {
    grid-template-columns: 240px minmax(0, 1fr);
    width: min(1800px, 100%);
  }
}
@media (max-width: 767px) {
  .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
}
@media (min-width: 768px) {
  .span-8 { grid-column: span 8; }
  .span-6 { grid-column: span 6; }
  .span-4 { grid-column: span 4; }
  .span-3 { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .span-3 { grid-column: span 3; }
}
.kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (min-width: 800px) {
  .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.kpi .gauge:not(.gauge--uv),
.kpi .gauge:not(.gauge--uv) svg,
.detail .gauge,
.detail .gauge svg {
  width: min(320px, 100%) !important;
  height: auto !important;
  max-height: 320px;
  aspect-ratio: 1;
}
.forecast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1280px) {
  .forecast { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.quadri--prima { grid-template-columns: 1fr !important; }
@media (min-width: 800px) {
  .quadri--prima { grid-template-columns: 1fr 1fr !important; }
}
.quadri--prima .detail__body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-template-columns: 1fr !important;
  gap: 8px;
}
.quadri--prima .detail__body > .qtable { width: 100%; }
.quadri--prima .detail .gauge,
.quadri--prima .detail .gauge svg {
  width: min(280px, 100%) !important;
  height: auto !important;
  max-height: 280px !important;
  margin: 0 auto !important;
  aspect-ratio: 1;
}
.qtable { width: 100%; border-collapse: collapse; }
.qtable td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 16px; vertical-align: baseline; }
.qtable td:last-child { text-align: right; font-weight: 750; white-space: nowrap; }
.qtable tr:first-child td { font-size: 20px; }
.quadri--prima .detail__head { letter-spacing: 0.04em; font-size: 16px; }
.gauge canvas { width: 100%; height: 100%; display: block; }
.gauge:has(canvas) svg { display: none !important; }
.kpi .gauge { height: 168px; }
.kpi .gauge canvas { height: 168px; }
.quadri--prima .detail .gauge,
.quadri--prima .detail .gauge canvas {
  width: min(240px, 100%) !important;
  height: 240px !important;
  max-height: none !important;
}
.mast__grid { max-width: none; }
.table-wrap, .mm-table-wrap, .main iframe, .main table { max-width: 100%; }
button.day {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button.day:hover { outline: 2px solid var(--ice); }
.day .wx-icon { width: 52px; height: 52px; margin: 8px auto; display: block; }
.day small.trust { font-weight: 750; color: #1c2a30; }
.band { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); text-align: left; }
.band h4 { margin: 0 0 4px; font-size: 18px; }
.band p { font-size: 16px; line-height: 1.45; }
.band .wx-icon { width: 56px; height: 56px; }
.day-hours { display: flex; gap: 8px; overflow: auto; padding-top: 12px; }
.day-hours .hour { min-width: 88px; }
#hourDetail { z-index: 260; }
#dayForecast .modal__card { text-align: left; }
@media (max-width: 720px) {
  .mm-table thead { display: none; }
}

.kpi .kpi__sub { white-space: normal; }
.kpi-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.kpi-badge {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  font-size: 15px; font-weight: 700; line-height: 1.2;
  background: color-mix(in srgb, var(--bc, #44565f) 18%, #fff);
  color: var(--bc, #44565f);
}
.kpi-badge.up { --bc: #c4352d; }
.kpi-badge.down { --bc: #1f5fd0; }
.kpi-badge.flat { --bc: #5c6b73; }
.kpi-rows { width: 100%; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(20, 34, 42, .12); display: grid; gap: 5px; }
.kpi-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: baseline; }
.kpi-rows dt { margin: 0; font-size: 15px; color: #44565f; display: flex; align-items: center; gap: 7px; }
.kpi-rows dt::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #8aa0a8; flex: 0 0 auto; }
.kpi-rows dt.lo::before { background: #1f5fd0; }
.kpi-rows dt.hi::before { background: #c4352d; }
.kpi-rows dd { margin: 0; font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.kpi-rows dt.lo + dd { color: #1f5fd0; }
.kpi-rows dt.hi + dd { color: #c4352d; }
.kpi-rows dd.t { font-weight: 600; font-size: 14px; color: #5c6b73; min-width: 2.8em; }
.board-page { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.board-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.board-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; min-height: 180px; }
.board-grid.is-phone { max-width: 390px; }
.board-grid.is-phone .board-card { grid-column: span 12 !important; }
.board-card { position: relative; min-height: 96px; padding: 12px 12px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); cursor: grab; }
.board-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.board-card header b { font-size: 15px; }
.board-mini { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.board-resize { position: absolute; right: 6px; bottom: 6px; width: 14px; height: 14px; cursor: ew-resize; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); }
.board-src, .board-tile { display: flex; width: 100%; text-align: left; gap: 8px; align-items: center; justify-content: space-between; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--snow); color: inherit; }
.board-src small, .board-tile small { display: block; color: var(--muted); font-size: 12px; }
.board-src:disabled { opacity: .4; }
.board-tile i { cursor: pointer; padding: 0 4px; }
@media (max-width: 900px) { .board-page { grid-template-columns: 1fr; } }
[data-live-val].is-up,
[data-live-val].is-dn {
  color: var(--mled) !important;
  text-shadow: 0 0 8px var(--mglow);
}
[data-live-val].is-up[data-lv="2"],
[data-live-val].is-dn[data-lv="2"] {
  text-shadow: 0 0 6px var(--mglow), 0 0 16px var(--mglow);
}
[data-live-val].is-up[data-lv="3"],
[data-live-val].is-dn[data-lv="3"] {
  text-shadow: 0 0 4px #fff, 0 0 12px var(--mglow), 0 0 26px var(--mglow);
}
.mv-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  font-family: Figtree, Barlow, sans-serif;
  font-weight: 750;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--mled);
  background: color-mix(in srgb, var(--mled) 18%, transparent);
  box-shadow: 0 0 10px var(--mglow);
  vertical-align: middle;
  text-shadow: none;
}
.arch-alert{position:sticky;top:0;z-index:40;padding:10px 16px;background:#7a1c1c;color:#fff;font-weight:700;text-align:center}
