*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Segoe UI,Arial,sans-serif;background:#edf6fb;color:#0d3763}
body{overflow-x:hidden}
.st-shell{display:grid;grid-template-columns:175px 1fr;min-height:100vh}
.st-sidebar{background:#f8fcff;border-right:1px solid #d7e6f1;padding:18px 10px}
.st-brand{display:block;text-align:center;margin-bottom:28px;text-decoration:none}
.st-brand-badge{width:88px;height:88px;margin:0 auto;border-radius:50%;display:grid;place-items:center;background:#123c69;color:#fff;font-size:28px;font-weight:800;letter-spacing:.5px}
.st-nav{display:flex;flex-direction:column;gap:8px}
.st-nav a{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:8px;color:#17466f;text-decoration:none;font-weight:600}
.st-nav a span{font-size:20px}
.st-nav a:hover,.st-nav a.is-active{background:#1689d4;color:white}
.st-main{min-width:0}
.st-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:22px 30px;color:white;background:linear-gradient(110deg,#2d77ae,#0f5e92)}
.st-kicker{margin:0 0 3px;opacity:.82;font-size:14px}
.st-hero h1{margin:0;font-size:34px}
.st-location,.st-coords{margin:5px 0 0;opacity:.92}
.st-status{text-align:right}
.st-online{display:inline-block;padding:8px 12px;border-radius:9px;background:#51697d;font-weight:800}
.st-online.is-online{background:#078b56}
.st-online.is-offline{background:#a73737}
.st-updated{margin-top:8px;font-size:13px}

/* Tre blocchi principali: Temperatura, Precipitazioni, Vento */
.st-overview{
  display:grid;
  grid-template-columns:1.15fr 1.15fr .9fr;
  gap:22px;
  padding:24px 24px 0;
}
.st-group{
  background:#fff;
  border:1px solid #dbe9f3;
  border-radius:16px;
  box-shadow:0 5px 18px rgba(43,91,126,.09);
  padding:24px;
  min-height:245px;
}
.st-group-temp{border-top:5px solid #1689d4}
.st-group-rain{border-top:5px solid #1996d3}
.st-group-wind{border-top:5px solid #5a87ad}
.st-group-head,.st-group-title-row{display:flex;align-items:center;gap:16px}
.st-group-title-row{margin-bottom:26px}
.st-icon{color:#1689d4}
.st-icon-large{font-size:46px;line-height:1}
.st-group-label{margin:0 0 6px;font-size:14px;font-weight:800;letter-spacing:.08em;color:#58738a}
.st-main-reading{font-size:56px;font-weight:800;line-height:.95;color:#0a3159;white-space:nowrap}
.st-main-reading small{font-size:17px;font-weight:700;margin-left:5px}
.st-main-reading-rate{font-size:48px}
.st-reading-label{display:block;color:#637d91;font-size:14px;font-weight:700;margin-bottom:9px}

/* Dettagli temperatura */
.st-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:26px}
.st-detail{background:#f6fafc;border:1px solid #e2edf4;border-radius:10px;padding:12px 14px}
.st-detail span{display:block;color:#6e8799;font-size:12px;margin-bottom:5px}
.st-detail strong{display:block;font-size:16px;color:#123b61}
.st-detail strong small{font-size:12px}

/* Pioggia: i due numeri sono protagonisti */
.st-rain-focus{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.st-rain-primary{background:#f5fbfe;border:1px solid #d8ebf5;border-radius:13px;padding:22px 18px;min-height:150px;display:flex;flex-direction:column;justify-content:center}
.st-rain-primary .st-main-reading{font-size:54px}

/* Vento più compatto */
.st-wind-main{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.st-wind-main>div{background:#f7fafc;border:1px solid #e3edf3;border-radius:11px;padding:16px 14px}
.st-wind-reading{font-size:34px;font-weight:800;color:#0a3159;line-height:1}
.st-wind-reading small{font-size:13px;margin-left:4px}
.st-wind-bottom{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.st-wind-dir{background:#f7fafc;border:1px solid #e3edf3;border-radius:11px;padding:12px 14px;position:relative;min-height:78px}
.st-wind-dir span{display:block;color:#6e8799;font-size:12px}
.st-wind-dir strong{display:block;font-size:22px;margin-top:3px}
.st-direction-arrow{position:absolute;right:13px;bottom:11px;font-size:30px;color:#138ee0;transform-origin:center}

/* Dati secondari in fascia compatta */
.st-secondary-strip{
  display:grid;
  grid-template-columns:repeat(5,minmax(150px,1fr));
  gap:14px;
  padding:18px 24px 0;
}
.st-mini-card{
  background:#fff;
  border:1px solid #dbe9f3;
  border-radius:12px;
  box-shadow:0 3px 10px rgba(43,91,126,.07);
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:88px;
}
.st-mini-icon{font-size:28px;color:#1689d4;min-width:34px;text-align:center}
.st-mini-icon-text{font-size:20px;font-weight:800}
.st-mini-card span{display:block;color:#617d92;font-size:12px;margin-bottom:4px}
.st-mini-card strong{display:block;font-size:22px;color:#0a3159;line-height:1.05}
.st-mini-card strong small{font-size:12px}
.st-badge{display:inline-block;margin-top:6px;padding:3px 7px;border-radius:5px;background:#ffe067;color:#2f3d46;font-style:normal;font-size:11px;font-weight:700}
.sensor-optional.is-hidden{display:none}

/* Sezioni sotto */
.st-section{padding:28px 24px 18px}
.st-section>h2{font-size:20px;margin:0 0 12px}
.st-charts{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.st-panel{background:#fff;border:1px solid #dbe9f3;border-radius:14px;box-shadow:0 3px 12px rgba(43,91,126,.07);padding:16px}
.st-panel h2,.st-panel h3{margin:0 0 12px}
.st-placeholder{height:185px;display:flex;align-items:center;justify-content:center;color:#7b92a4;background:linear-gradient(#fbfdff,#f2f7fb);border:1px dashed #c9dbe8;border-radius:9px}
.st-bottom{display:grid;grid-template-columns:1.1fr 1fr 1.2fr;gap:18px;padding:18px 24px 28px}
.st-extreme{display:flex;justify-content:space-between;border-bottom:1px solid #edf2f6;padding:10px 0}
.st-extreme:last-child{border-bottom:0}
.st-map-panel{min-height:310px}
#stationMap{height:250px;border-radius:8px;overflow:hidden}
.st-radar-links{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.st-radar-links a{height:120px;border-radius:9px;background:linear-gradient(145deg,#0f77bc,#4ab1d2);color:white;text-decoration:none;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px}

/* Responsive */
@media(max-width:1250px){
  .st-overview{grid-template-columns:1fr 1fr}
  .st-group-wind{grid-column:1/-1;min-height:auto}
  .st-group-wind .st-wind-main,.st-group-wind .st-wind-bottom{grid-template-columns:repeat(2,1fr)}
  .st-secondary-strip{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:850px){
  .st-shell{grid-template-columns:1fr}
  .st-sidebar{position:sticky;top:0;z-index:20;padding:8px}
  .st-brand{display:none}
  .st-nav{flex-direction:row;overflow:auto}
  .st-nav a{white-space:nowrap}
  .st-hero{padding:18px;align-items:flex-start}
  .st-hero h1{font-size:27px}
  .st-status{font-size:12px}
  .st-overview{grid-template-columns:1fr;padding:16px 14px 0;gap:14px}
  .st-group-wind{grid-column:auto}
  .st-secondary-strip{grid-template-columns:1fr 1fr;padding:14px 14px 0}
  .st-charts,.st-bottom{grid-template-columns:1fr}
  .st-section{padding:22px 14px 14px}
  .st-bottom{padding:0 14px 22px}
}
@media(max-width:520px){
  .st-hero{flex-direction:column}
  .st-status{text-align:left}
  .st-main-reading{font-size:46px}
  .st-rain-primary .st-main-reading{font-size:43px}
  .st-rain-focus,.st-detail-grid,.st-wind-main,.st-wind-bottom,.st-secondary-strip{grid-template-columns:1fr}
  .st-group{padding:18px;min-height:auto}
}

/* Migliora leggibilità dei dati secondari senza cambiare dimensione dei riquadri */

/* Umidità e punto di rugiada nel blocco temperatura */
.st-detail span{
  font-size:14px;
  font-weight:700;
}
.st-detail strong{
  font-size:21px;
  font-weight:800;
}
.st-detail strong small{
  font-size:14px;
  font-weight:700;
}

/* Seconda riga di riquadri: testi e numeri più leggibili */
.st-secondary-strip .st-mini-card{
  padding-top:16px;
  padding-bottom:16px;
}

.st-secondary-strip .st-mini-card span{
  font-size:14px;
  font-weight:700;
  color:#4f6f87;
  margin-bottom:7px;
}

.st-secondary-strip .st-mini-card strong{
  font-size:27px;
  font-weight:800;
  line-height:1.05;
  color:#082f57;
}

.st-secondary-strip .st-mini-card strong small{
  font-size:14px;
  font-weight:700;
}

.st-secondary-strip .st-mini-icon{
  font-size:31px;
}

.st-secondary-strip .st-mini-icon-text{
  font-size:23px;
}

/* Badge UV leggermente più leggibile */
.st-secondary-strip .st-badge{
  font-size:12px;
  padding:4px 8px;
}

/* Mantiene compattezza su schermi più piccoli */
@media(max-width:850px){
  .st-secondary-strip .st-mini-card span{
    font-size:13px;
  }

  .st-secondary-strip .st-mini-card strong{
    font-size:24px;
  }

  .st-detail strong{
    font-size:19px;
  }
}

/* LEGGIBILITA V6 */

/* Nel blocco temperatura: Umidità e Punto di rugiada più evidenti */
.st-detail-grid-temp .st-detail span{
  font-size:16px !important;
  font-weight:800 !important;
  color:#456a84 !important;
}
.st-detail-grid-temp .st-detail strong{
  font-size:27px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1.05 !important;
}
.st-detail-grid-temp .st-detail strong small{
  font-size:16px !important;
  font-weight:800 !important;
}

/* Seconda fila: stesse dimensioni dei riquadri, ma scritte molto più leggibili */
.st-secondary-strip .st-mini-card > div:last-child > span{
  font-size:16px !important;
  font-weight:800 !important;
  color:#456a84 !important;
  margin-bottom:8px !important;
  line-height:1.15 !important;
}

.st-secondary-strip .st-mini-card > div:last-child > strong{
  font-size:32px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1 !important;
}

.st-secondary-strip .st-mini-card > div:last-child > strong small{
  font-size:16px !important;
  font-weight:800 !important;
}

.st-secondary-strip .st-mini-icon{
  font-size:34px !important;
}

.st-secondary-strip .st-mini-icon-text{
  font-size:25px !important;
  font-weight:900 !important;
}

.st-secondary-strip .st-badge{
  font-size:13px !important;
  font-weight:800 !important;
  margin-top:7px !important;
}

/* "Intensità attuale" un po' più leggibile */
.st-group-rain .st-reading-label{
  font-size:16px !important;
  font-weight:800 !important;
}

/* Non cambiare la dimensione dei riquadri */
.st-secondary-strip .st-mini-card{
  min-height:88px !important;
}

@media(max-width:850px){
  .st-detail-grid-temp .st-detail span{
    font-size:15px !important;
  }
  .st-detail-grid-temp .st-detail strong{
    font-size:24px !important;
  }
  .st-secondary-strip .st-mini-card > div:last-child > span{
    font-size:15px !important;
  }
  .st-secondary-strip .st-mini-card > div:last-child > strong{
    font-size:28px !important;
  }
}

/* FIX NUMERI SECONDA RIGA V7 */

/* I valori numerici dentro <strong> devono avere la stessa dimensione dell'Indice UV.
   La regola generica .st-mini-card span li rendeva troppo piccoli. */
.st-secondary-strip .st-mini-card strong > span{
  display:inline !important;
  font-size:inherit !important;
  font-weight:inherit !important;
  color:inherit !important;
  margin:0 !important;
  line-height:inherit !important;
}

/* Uniforma esplicitamente i valori principali della seconda riga */
#vP,
#vS,
#vA,
#vUV{
  font-size:32px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1 !important;
}

@media(max-width:850px){
  #vP,
  #vS,
  #vA,
  #vUV{
    font-size:28px !important;
  }
}

/* COLORI ESTREMI V8 */

/* Temperature massime in rosso */
#vTmax,
#eTmax{
  color:#d62828 !important;
  font-weight:900 !important;
}

/* Mantiene rossa anche l'unità se contenuta nello stesso elemento */
#vTmax small,
#eTmax small{
  color:#d62828 !important;
}

/* LAYOUT V10 */

/* Due righe, tre colonne:
   1) Temperatura | Precipitazioni | Vento
   2) Grazie a    | Pressione/Heat | Radiazione/UV
*/
.st-dashboard{
  display:grid;
  grid-template-columns:1.15fr 1.15fr .9fr;
  grid-template-areas:
    "temp rain wind"
    "partner meta1 meta2";
  gap:18px 20px;
  padding:24px 24px 0;
  align-items:stretch;
}

.st-area-temp{grid-area:temp}
.st-area-rain{grid-area:rain}
.st-area-wind{grid-area:wind}
.st-area-partner{grid-area:partner}
.st-area-meta1{grid-area:meta1}
.st-area-meta2{grid-area:meta2}

/* Prima riga perfettamente allineata */
.st-dashboard > .st-group{
  margin:0 !important;
  min-height:255px !important;
  height:100%;
}

/* Il blocco Grazie a ha la stessa altezza del blocco Precipitazioni */
.st-partner-card{
  min-height:255px !important;
  height:255px !important;
  margin:0 !important;
  background:#fff;
  border:1px solid #dbe9f3;
  border-radius:14px;
  box-shadow:0 4px 14px rgba(43,91,126,.08);
  padding:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.st-partner-title{
  font-size:15px;
  font-weight:800;
  color:#315b7a;
  text-align:center;
  margin:0 0 10px;
  flex:0 0 auto;
}

.st-partner-link{
  display:block;
  min-height:0;
  flex:1 1 auto;
}

.st-partner-image{
  width:100%;
  height:100%;
  max-height:205px;
  object-fit:contain;
  border-radius:9px;
  background:#f7fafc;
  display:block;
}

.st-partner-placeholder{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
  border:1px dashed #c7d9e6;
  border-radius:9px;
  background:#f8fbfd;
  color:#55748b;
  padding:18px;
}

.st-partner-placeholder strong{
  font-size:18px;
  color:#123b61;
}

.st-partner-placeholder span{
  font-size:13px;
}

.st-partner-placeholder-empty{
  opacity:.65;
}

/* Due riquadri sovrapposti, stessa altezza totale di Grazie a */
.st-stack{
  height:255px;
  display:grid;
  grid-template-rows:1fr 1fr;
  gap:14px;
}

.st-stack .st-mini-card{
  min-height:0 !important;
  height:100% !important;
  margin:0 !important;
  padding:16px 18px !important;
}

/* Mantiene i numeri ben leggibili */
.st-stack .st-mini-card > div:last-child > span{
  font-size:16px !important;
  font-weight:800 !important;
  color:#456a84 !important;
  margin-bottom:8px !important;
}

.st-stack .st-mini-card > div:last-child > strong{
  font-size:32px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1 !important;
}

.st-stack .st-mini-card strong > span{
  display:inline !important;
  font-size:inherit !important;
  font-weight:inherit !important;
  color:inherit !important;
  margin:0 !important;
}

.st-stack .st-mini-card strong small{
  font-size:16px !important;
  font-weight:800 !important;
}

.st-stack .st-mini-icon{
  font-size:34px !important;
}

.st-stack .st-mini-icon-text{
  font-size:25px !important;
  font-weight:900 !important;
}

/* Temperature massime rosse */
#vTmax,
#eTmax{
  color:#d62828 !important;
  font-weight:900 !important;
}

/* Tablet */
@media(max-width:1250px){
  .st-dashboard{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "temp rain"
      "wind wind"
      "partner meta1"
      "meta2 meta2";
  }

  .st-area-wind{
    min-height:auto !important;
  }

  .st-area-meta2{
    grid-template-columns:1fr 1fr;
    grid-template-rows:1fr;
    height:125px;
  }
}

/* Mobile */
@media(max-width:850px){
  .st-dashboard{
    grid-template-columns:1fr;
    grid-template-areas:
      "temp"
      "rain"
      "wind"
      "partner"
      "meta1"
      "meta2";
    padding:16px 14px 0;
    gap:14px;
  }

  .st-dashboard > .st-group,
  .st-partner-card{
    min-height:auto !important;
    height:auto !important;
  }

  .st-partner-card{
    min-height:220px !important;
  }

  .st-stack,
  .st-area-meta2{
    height:auto;
    grid-template-columns:1fr 1fr;
    grid-template-rows:1fr;
  }
}

@media(max-width:560px){
  .st-stack,
  .st-area-meta2{
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
  }
}

/* FIX FINALE V11 - Umidità e Heat Index */

#vH{
  font-size:27px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1 !important;
}

#vA{
  font-size:32px !important;
  font-weight:900 !important;
  color:#082f57 !important;
  line-height:1 !important;
}

@media(max-width:850px){
  #vH{
    font-size:24px !important;
  }

  #vA{
    font-size:28px !important;
  }
}



/* ==========================================================
   PERSONALIZZAZIONE STAZIONE DA PANNELLO ADMIN
   ========================================================== */

.st-hero{
  background:var(--station-header-bg, #1f6fa5) !important;
  color:var(--station-header-text, #fff) !important;
}

.st-hero h1{
  font-size:var(--station-title-size, 30px) !important;
  font-weight:var(--station-title-weight, 800) !important;
  text-transform:var(--station-title-transform, none) !important;
  color:var(--station-header-text, #fff) !important;
}

.st-hero .st-kicker,
.st-hero .st-location,
.st-hero .st-coords,
.st-hero .st-updated{
  color:var(--station-header-text, #fff) !important;
}

.st-brand{
  display:flex !important;
  align-items:center;
  justify-content:center;
  padding:10px !important;
}

.st-brand-logo{
  display:block;
  width:105px;
  max-width:100%;
  height:82px;
  object-fit:contain;
  border-radius:10px;
  background:#fff;
}

@media(max-width:850px){
  .st-brand-logo{
    width:82px;
    height:62px;
  }
}


/* ==========================================================
   STILI PERSONALIZZABILI DA ADMIN - V30
   ========================================================== */

.st-hero{
  background:var(--station-header-bg, linear-gradient(110deg,#2d77ae,#0f5e92)) !important;
}

.st-kicker{
  font-weight:var(--station-kicker-weight,400) !important;
}

.st-location{
  font-weight:var(--station-address-weight,400) !important;
}

.st-coords{
  font-weight:var(--station-coords-weight,400) !important;
}

.st-online{
  font-weight:var(--station-status-weight,800) !important;
}

.st-updated,
.st-updated strong{
  font-weight:var(--station-updated-weight,400) !important;
}

.st-nav a{
  font-weight:var(--station-nav-weight,700) !important;
}

.st-group-label{
  font-weight:var(--station-group-title-weight,800) !important;
}

.st-main-reading,
.st-wind-reading{
  font-weight:var(--station-main-value-weight,800) !important;
}

.st-reading-label,
.st-detail > span,
.st-wind-dir > span{
  font-weight:var(--station-detail-label-weight,700) !important;
}

.st-detail strong,
.st-wind-dir strong{
  font-weight:var(--station-detail-value-weight,800) !important;
}

.st-stack .st-mini-card > div:last-child > span{
  font-weight:var(--station-mini-label-weight,800) !important;
}

.st-stack .st-mini-card > div:last-child > strong,
.st-stack .st-mini-card strong > span,
#vP,#vS,#vA,#vUV{
  font-weight:var(--station-mini-value-weight,900) !important;
}

.st-panel h2,
.st-panel h3{
  font-weight:var(--station-bottom-title-weight,800) !important;
}

.st-extreme > span{
  font-weight:var(--station-extreme-label-weight,400) !important;
}

.st-extreme > strong{
  font-weight:var(--station-extreme-value-weight,800) !important;
}


/* FIX V31 - spazio tra seconda riga e pannelli inferiori */
.st-bottom{
  padding-top:18px !important;
}

@media(max-width:850px){
  .st-bottom{
    padding-top:14px !important;
  }
}


/* FIX V32 - logo Meteogruppo globale più grande */
.st-brand{
  padding:4px 2px !important;
  margin-bottom:20px !important;
}

.st-brand-logo{
  width:145px !important;
  max-width:145px !important;
  height:125px !important;
  object-fit:contain !important;
  border-radius:0 !important;
  background:transparent !important;
}

@media(max-width:850px){
  .st-brand-logo{
    width:110px !important;
    max-width:110px !important;
    height:90px !important;
  }
}


/* FIX V34 - testo sensore assente più piccolo */
#vS.sensor-missing,
#vUV.sensor-missing{
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.15 !important;
  color:#607b91 !important;
  white-space:normal !important;
}

#cardSolar .sensor-missing,
#cardUV .sensor-missing{
  font-size:13px !important;
}


/* ==========================================================
   V42 - Termometro PHP dinamico, integrato nel riquadro
   ========================================================== */

.st-temp-row{
  display:grid;
  grid-template-columns:68px minmax(0,1fr);
  gap:12px;
  align-items:start;
  height:100%;
}

.st-temp-instrument{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding-top:2px;
  min-width:0;
}

.st-temp-instrument img{
  display:block;
  width:62px;
  height:170px;
  object-fit:contain;
}

.st-temp-data{
  min-width:0;
}

.st-temp-data .st-group-head{
  margin-bottom:14px;
  gap:0;
}

.st-temp-data .st-detail-grid-temp{
  margin-top:0;
}

@media(max-width:1250px){
  .st-temp-row{
    grid-template-columns:64px minmax(0,1fr);
    gap:10px;
  }
  .st-temp-instrument img{
    width:58px;
    height:166px;
  }
}

@media(max-width:850px){
  .st-temp-row{
    grid-template-columns:60px minmax(0,1fr);
  }
  .st-temp-instrument img{
    width:54px;
    height:158px;
  }
}

@media(max-width:520px){
  .st-temp-row{
    grid-template-columns:54px minmax(0,1fr);
    gap:8px;
  }
  .st-temp-instrument img{
    width:50px;
    height:150px;
  }
}


/* ==========================================================
   V43 - Termometro più alto, quasi a tutta altezza del riquadro
   ========================================================== */

.st-temp-row{
  grid-template-columns:82px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
}

.st-temp-instrument{
  align-items:flex-start !important;
  padding-top:0 !important;
  min-height:212px !important;
}

.st-temp-instrument img{
  width:70px !important;
  height:214px !important;
  object-fit:contain !important;
}

@media(max-width:1250px){
  .st-temp-row{
    grid-template-columns:78px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:66px !important;
    height:210px !important;
  }
}

@media(max-width:850px){
  .st-temp-row{
    grid-template-columns:72px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:62px !important;
    height:202px !important;
  }
}

@media(max-width:520px){
  .st-temp-row{
    grid-template-columns:64px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:58px !important;
    height:192px !important;
  }
}


/* ==========================================================
   V45 - termometro ancora più lungo e raccordo più lineare
   ========================================================== */

.st-temp-row{
  grid-template-columns:88px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
}

.st-temp-instrument{
  align-items:flex-start !important;
  padding-top:0 !important;
  min-height:238px !important;
}

.st-temp-instrument img{
  width:74px !important;
  height:238px !important;
  object-fit:contain !important;
}

.st-temp-data .st-group-head{
  margin-bottom:14px !important;
}

@media(max-width:1250px){
  .st-temp-row{
    grid-template-columns:84px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:70px !important;
    height:232px !important;
  }
}

@media(max-width:850px){
  .st-temp-row{
    grid-template-columns:78px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:66px !important;
    height:224px !important;
  }
}

@media(max-width:520px){
  .st-temp-row{
    grid-template-columns:68px minmax(0,1fr) !important;
    gap:10px !important;
  }
  .st-temp-instrument img{
    width:60px !important;
    height:208px !important;
  }
}


/* ==========================================================
   V46 - termometro ancora più lungo + contorno continuo
   ========================================================== */

.st-temp-row{
  grid-template-columns:92px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
}

.st-temp-instrument{
  align-items:flex-start !important;
  padding-top:0 !important;
  min-height:264px !important;
}

.st-temp-instrument img{
  width:78px !important;
  height:266px !important;
  object-fit:contain !important;
}

@media(max-width:1250px){
  .st-temp-row{
    grid-template-columns:88px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:74px !important;
    height:258px !important;
  }
}

@media(max-width:850px){
  .st-temp-row{
    grid-template-columns:82px minmax(0,1fr) !important;
  }
  .st-temp-instrument img{
    width:70px !important;
    height:248px !important;
  }
}

@media(max-width:520px){
  .st-temp-row{
    grid-template-columns:72px minmax(0,1fr) !important;
    gap:10px !important;
  }
  .st-temp-instrument img{
    width:64px !important;
    height:228px !important;
  }
}


/* ==========================================================
   V47 - termometro fino alla base del blocco temperatura
   ========================================================== */

.st-group-temp{
  position:relative !important;
}

.st-temp-row{
  grid-template-columns:96px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
  min-height:270px !important;
}

.st-temp-instrument{
  align-self:stretch !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  min-height:270px !important;
}

.st-temp-instrument img{
  width:82px !important;
  height:292px !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:top center !important;
  display:block !important;
  margin:0 !important;
}

@media(max-width:1250px){
  .st-temp-row{
    grid-template-columns:92px minmax(0,1fr) !important;
    min-height:264px !important;
  }
  .st-temp-instrument{
    min-height:264px !important;
  }
  .st-temp-instrument img{
    width:78px !important;
    height:284px !important;
  }
}

@media(max-width:850px){
  .st-temp-row{
    grid-template-columns:86px minmax(0,1fr) !important;
    min-height:250px !important;
  }
  .st-temp-instrument{
    min-height:250px !important;
  }
  .st-temp-instrument img{
    width:74px !important;
    height:270px !important;
  }
}

@media(max-width:520px){
  .st-temp-row{
    grid-template-columns:74px minmax(0,1fr) !important;
    gap:10px !important;
    min-height:230px !important;
  }
  .st-temp-instrument{
    min-height:230px !important;
  }
  .st-temp-instrument img{
    width:66px !important;
    height:246px !important;
  }
}


/* ==========================================================
   V48 - Pluviometro dinamico "Pioggia oggi"
   Lungo come il termometro, scala 0–100 mm
   ========================================================== */

.st-group-rain{
  position:relative !important;
}

.st-rain-row{
  display:grid;
  grid-template-columns:104px minmax(0,1fr);
  gap:14px;
  align-items:stretch;
  min-height:270px;
}

.st-rain-instrument{
  align-self:stretch;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:0;
  min-height:270px;
}

.st-rain-instrument img{
  width:92px;
  height:292px;
  max-height:none;
  object-fit:contain;
  object-position:top center;
  display:block;
  margin:0;
}

.st-rain-data{
  min-width:0;
}

.st-rain-data .st-group-title-row{
  margin-bottom:22px;
}

.st-rain-data .st-rain-focus{
  padding-right:0 !important;
  margin-top:0 !important;
}

@media(max-width:1250px){
  .st-rain-row{
    grid-template-columns:98px minmax(0,1fr);
    min-height:264px;
  }
  .st-rain-instrument{
    min-height:264px;
  }
  .st-rain-instrument img{
    width:88px;
    height:284px;
  }
}

@media(max-width:850px){
  .st-rain-row{
    grid-template-columns:92px minmax(0,1fr);
    min-height:250px;
  }
  .st-rain-instrument{
    min-height:250px;
  }
  .st-rain-instrument img{
    width:82px;
    height:270px;
  }
}

@media(max-width:520px){
  .st-rain-row{
    grid-template-columns:80px minmax(0,1fr);
    gap:10px;
    min-height:230px;
  }
  .st-rain-instrument{
    min-height:230px;
  }
  .st-rain-instrument img{
    width:72px;
    height:246px;
  }
  .st-rain-data .st-rain-focus{
    grid-template-columns:1fr !important;
  }
}


/* ==========================================================
   V49 - Manica a vento illustrata nel riquadro Vento
   ========================================================== */

.st-group-wind{
  position:relative !important;
}

.st-wind-row{
  display:grid;
  grid-template-columns:128px minmax(0,1fr);
  gap:12px;
  align-items:stretch;
  min-height:270px;
}

.st-wind-instrument{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  min-height:270px;
  overflow:hidden;
}

.st-wind-instrument img{
  display:block;
  width:120px;
  height:250px;
  object-fit:contain;
  object-position:top center;
  mix-blend-mode:multiply;
  transition:transform .35s ease, opacity .35s ease;
  transform-origin:28% 10%;
}

.st-wind-data{
  min-width:0;
}

.st-wind-data .st-group-title-row{
  margin-bottom:18px;
}

.st-wind-data .st-wind-main,
.st-wind-data .st-wind-bottom{
  padding-right:0 !important;
}

/* Piccola risposta visiva alla velocità: la manica diventa leggermente più tesa */
.st-wind-instrument img.wind-calm{
  transform:scaleX(.92) rotate(2deg);
  opacity:.90;
}

.st-wind-instrument img.wind-breeze{
  transform:scaleX(.97) rotate(1deg);
  opacity:.96;
}

.st-wind-instrument img.wind-strong{
  transform:scaleX(1.03) rotate(0deg);
  opacity:1;
}

@media(max-width:1250px){
  .st-wind-row{
    grid-template-columns:118px minmax(0,1fr);
  }
  .st-wind-instrument img{
    width:110px;
    height:238px;
  }
}

@media(max-width:850px){
  .st-wind-row{
    grid-template-columns:108px minmax(0,1fr);
  }
  .st-wind-instrument img{
    width:100px;
    height:224px;
  }
}

@media(max-width:520px){
  .st-wind-row{
    grid-template-columns:92px minmax(0,1fr);
    gap:8px;
  }
  .st-wind-instrument img{
    width:86px;
    height:205px;
  }
}


/* ==========================================================
   V50 - Nuovo ordine interno riquadro Vento
   Manica a sinistra, dati compatti sopra, dati grandi sotto
   ========================================================== */

.st-group-wind{
  padding:14px 16px 16px !important;
  overflow:hidden !important;
}

.st-wind-layout{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:12px;
  align-items:start;
  min-height:255px;
}

.st-wind-visual{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:16px;
  overflow:hidden;
}

.st-wind-visual img{
  width:102px !important;
  height:190px !important;
  object-fit:contain !important;
  object-position:top center !important;
  display:block !important;
  margin:0 !important;
  mix-blend-mode:multiply;
  transform-origin:28% 10%;
}

.st-wind-content{
  min-width:0;
}

.st-wind-title-row{
  margin:0 0 10px 0;
}

.st-wind-title-row .st-group-label{
  margin:0;
  font-size:18px !important;
  font-weight:800 !important;
  color:#53708b;
  letter-spacing:.04em;
}

.st-wind-top{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}

.st-wind-bottom-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.st-wind-card{
  background:#f2f7fb;
  border:1px solid #d9e7f1;
  border-radius:12px;
  box-sizing:border-box;
  min-width:0;
}

.st-wind-card-small{
  min-height:86px;
  padding:10px 12px;
}

.st-wind-card-big{
  min-height:112px;
  padding:14px 14px 12px;
}

.st-wind-card .st-reading-label{
  display:block;
  font-size:13px !important;
  font-weight:700 !important;
  color:#6b8192 !important;
  margin-bottom:8px;
  line-height:1.15;
}

.st-wind-dir-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.st-wind-dir-line strong{
  font-size:25px;
  line-height:1;
  font-weight:900;
  color:#0d3763;
}

.st-wind-dir-line .st-direction-arrow{
  font-size:26px;
  line-height:1;
  color:#1689d4;
  flex:0 0 auto;
}

.st-wind-reading-small{
  font-size:20px;
  line-height:1.05;
  font-weight:900;
  color:#0d3763;
  white-space:normal;
}

.st-wind-reading-big{
  display:flex;
  align-items:baseline;
  gap:5px;
  white-space:nowrap;
}

.st-wind-reading-big span{
  font-size:48px !important;
  line-height:.95;
  font-weight:900 !important;
  color:#082f57;
}

.st-wind-reading-big small{
  font-size:15px !important;
  font-weight:800 !important;
  color:#082f57;
}

/* manteniamo le tre risposte alla velocità già usate dalla V49 */
.st-wind-visual img.wind-calm{
  transform:scaleX(.92) rotate(2deg);
  opacity:.90;
}

.st-wind-visual img.wind-breeze{
  transform:scaleX(.97) rotate(1deg);
  opacity:.96;
}

.st-wind-visual img.wind-strong{
  transform:scaleX(1.03) rotate(0deg);
  opacity:1;
}

@media(max-width:1250px){
  .st-wind-layout{
    grid-template-columns:104px minmax(0,1fr);
  }
  .st-wind-visual img{
    width:94px !important;
    height:178px !important;
  }
  .st-wind-reading-big span{
    font-size:43px !important;
  }
}

@media(max-width:850px){
  .st-wind-layout{
    grid-template-columns:96px minmax(0,1fr);
  }
  .st-wind-visual img{
    width:86px !important;
    height:168px !important;
  }
  .st-wind-reading-big span{
    font-size:38px !important;
  }
  .st-wind-card-small{
    min-height:82px;
  }
}

@media(max-width:560px){
  .st-wind-layout{
    grid-template-columns:82px minmax(0,1fr);
    gap:8px;
  }
  .st-wind-visual img{
    width:74px !important;
    height:150px !important;
  }
  .st-wind-top,
  .st-wind-bottom-grid{
    gap:8px;
  }
  .st-wind-card-big{
    min-height:100px;
    padding:12px 10px;
  }
  .st-wind-reading-big span{
    font-size:33px !important;
  }
  .st-wind-reading-big small{
    font-size:12px !important;
  }
}


/* ==========================================================
   V51 - asta manica a vento più bassa + pluviometro con svasatura
   ========================================================== */

.st-rain-row{
  min-height:282px;
}
.st-rain-instrument{
  align-items:flex-start;
  min-height:282px;
}
.st-rain-instrument img{
  width:96px;
  height:296px;
}

.st-wind-layout{
  grid-template-columns:118px minmax(0,1fr);
  gap:12px;
  min-height:272px;
  align-items:stretch;
}

.st-wind-visual{
  align-self:stretch;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:0 0 6px 0;
  min-height:272px;
  overflow:hidden;
}

.st-wind-visual img{
  width:100px !important;
  height:auto !important;
  max-width:100px !important;
  max-height:242px !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  display:block !important;
  margin:0 !important;
  mix-blend-mode:multiply;
  transform-origin:18% 8%;
}

@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:112px minmax(0,1fr); min-height:266px;}
  .st-wind-visual{min-height:266px; padding-bottom:4px;}
  .st-wind-visual img{max-width:94px !important; width:94px !important; max-height:230px !important;}
}

@media(max-width:850px){
  .st-wind-layout{grid-template-columns:102px minmax(0,1fr); min-height:254px;}
  .st-wind-visual{min-height:254px;}
  .st-wind-visual img{max-width:86px !important; width:86px !important; max-height:214px !important;}
}

@media(max-width:560px){
  .st-wind-layout{grid-template-columns:88px minmax(0,1fr); min-height:240px; gap:8px;}
  .st-wind-visual{min-height:240px; padding-bottom:2px;}
  .st-wind-visual img{max-width:74px !important; width:74px !important; max-height:194px !important;}
}


/* ==========================================================
   V52 - asta manica più lunga + pluviometro con vera svasatura
   ========================================================== */
.st-rain-row{
  min-height:286px;
}
.st-rain-instrument{
  align-items:flex-start;
  min-height:286px;
}
.st-rain-instrument img{
  width:104px;
  height:304px;
}

.st-wind-layout{
  grid-template-columns:118px minmax(0,1fr);
  gap:12px;
  min-height:282px;
  align-items:stretch;
}
.st-wind-visual{
  align-self:stretch;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:0 0 0 0;
  min-height:282px;
  overflow:hidden;
}
.st-wind-visual img{
  width:100px !important;
  height:auto !important;
  max-width:100px !important;
  max-height:260px !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  display:block !important;
  margin:0 !important;
  mix-blend-mode:multiply;
  transform-origin:18% 8%;
}

@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:112px minmax(0,1fr); min-height:274px;}
  .st-wind-visual{min-height:274px;}
  .st-wind-visual img{max-width:96px !important; width:96px !important; max-height:248px !important;}
}
@media(max-width:850px){
  .st-wind-layout{grid-template-columns:102px minmax(0,1fr); min-height:260px;}
  .st-wind-visual{min-height:260px;}
  .st-wind-visual img{max-width:88px !important; width:88px !important; max-height:232px !important;}
}
@media(max-width:560px){
  .st-wind-layout{grid-template-columns:88px minmax(0,1fr); min-height:246px; gap:8px;}
  .st-wind-visual{min-height:246px;}
  .st-wind-visual img{max-width:76px !important; width:76px !important; max-height:206px !important;}
}


/* ==========================================================
   V53 - ripristino bulbo pioggia originale + asta manica lunga fino in basso
   ========================================================== */
.st-rain-row{
  min-height:270px;
  grid-template-columns:104px minmax(0,1fr);
}
.st-rain-instrument{
  align-self:stretch;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  min-height:270px;
  padding:0;
}
.st-rain-instrument img{
  width:92px !important;
  height:292px !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:top center !important;
  display:block !important;
  margin:0 !important;
}

.st-wind-layout{
  grid-template-columns:122px minmax(0,1fr);
  gap:12px;
  min-height:278px;
  align-items:stretch;
}
.st-wind-visual{
  align-self:stretch;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-height:278px;
  padding:0;
  overflow:hidden;
}
.st-wind-visual img{
  width:104px !important;
  height:auto !important;
  max-width:104px !important;
  max-height:270px !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  display:block !important;
  margin:0 !important;
  mix-blend-mode:multiply;
  transform-origin:26% 8%;
}

@media(max-width:1250px){
  .st-rain-row{grid-template-columns:100px minmax(0,1fr); min-height:264px;}
  .st-rain-instrument{min-height:264px;}
  .st-rain-instrument img{width:88px !important; height:284px !important;}
  .st-wind-layout{grid-template-columns:116px minmax(0,1fr); min-height:270px;}
  .st-wind-visual{min-height:270px;}
  .st-wind-visual img{max-width:98px !important; width:98px !important; max-height:262px !important;}
}
@media(max-width:850px){
  .st-rain-row{grid-template-columns:92px minmax(0,1fr); min-height:250px;}
  .st-rain-instrument{min-height:250px;}
  .st-rain-instrument img{width:82px !important; height:270px !important;}
  .st-wind-layout{grid-template-columns:104px minmax(0,1fr); min-height:256px;}
  .st-wind-visual{min-height:256px;}
  .st-wind-visual img{max-width:90px !important; width:90px !important; max-height:244px !important;}
}
@media(max-width:560px){
  .st-rain-row{grid-template-columns:80px minmax(0,1fr); gap:10px; min-height:230px;}
  .st-rain-instrument{min-height:230px;}
  .st-rain-instrument img{width:72px !important; height:246px !important;}
  .st-wind-layout{grid-template-columns:88px minmax(0,1fr); min-height:238px; gap:8px;}
  .st-wind-visual{min-height:238px;}
  .st-wind-visual img{max-width:76px !important; width:76px !important; max-height:220px !important;}
}


/* ==========================================================
   V54 - asta manica più lunga + temperatura attuale blu
   ========================================================== */
.st-group-temp .st-main-reading,
.st-group-temp .st-main-reading #vT,
.st-group-temp .st-main-reading small{
  color:#3346d3 !important;
}

.st-wind-layout{
  grid-template-columns:126px minmax(0,1fr) !important;
  gap:12px !important;
  min-height:296px !important;
  align-items:stretch !important;
}
.st-wind-visual{
  align-self:stretch !important;
  display:flex !important;
  align-items:flex-end !important;
  justify-content:center !important;
  min-height:296px !important;
  padding:0 !important;
  overflow:visible !important;
}
.st-wind-visual img{
  width:112px !important;
  max-width:112px !important;
  height:auto !important;
  max-height:296px !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  display:block !important;
  margin:0 !important;
  transform-origin:26% 8% !important;
}
@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:120px minmax(0,1fr) !important;min-height:286px !important;}
  .st-wind-visual{min-height:286px !important;}
  .st-wind-visual img{width:106px !important;max-width:106px !important;max-height:286px !important;}
}
@media(max-width:850px){
  .st-wind-layout{grid-template-columns:108px minmax(0,1fr) !important;min-height:270px !important;}
  .st-wind-visual{min-height:270px !important;}
  .st-wind-visual img{width:96px !important;max-width:96px !important;max-height:270px !important;}
}
@media(max-width:560px){
  .st-wind-layout{grid-template-columns:92px minmax(0,1fr) !important;min-height:248px !important;gap:8px !important;}
  .st-wind-visual{min-height:248px !important;}
  .st-wind-visual img{width:82px !important;max-width:82px !important;max-height:248px !important;}
}


/* ==========================================================
   V55 - Tmin blu + triplo pannello estremi
   ========================================================== */
/* Ripristina temperatura attuale colore standard */
.st-group-temp .st-main-reading,
.st-group-temp .st-main-reading #vT,
.st-group-temp .st-main-reading small{
  color:#0a3159 !important;
}

/* Minima giornaliera in blu come il fondo del termometro */
#vTmin,
#eTmin,
#eMTmin,
#eYTmin{
  color:#3346d3 !important;
  font-weight:900 !important;
}

#vTmin small,
#eTmin small,
#eMTmin small,
#eYTmin small{
  color:#3346d3 !important;
}

/* Layout pannelli bassi */
.st-bottom{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:18px !important;
  padding:18px 24px 28px !important;
}
.st-bottom-extremes{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.st-bottom-extra{
  display:grid;
  grid-template-columns:1.08fr 1.2fr;
  gap:18px;
}

/* Riga estremi un po' più compatta */
.st-extreme{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border-bottom:1px solid #edf2f6;
  padding:8px 0;
}
.st-extreme > span{
  font-size:14px !important;
  line-height:1.25;
  color:#58738a;
}
.st-extreme > strong{
  font-size:15px;
  line-height:1.2;
  text-align:right;
  white-space:nowrap;
}

@media(max-width:1250px){
  .st-bottom-extremes{grid-template-columns:1fr 1fr;}
  .st-bottom-extra{grid-template-columns:1fr 1fr;}
}
@media(max-width:850px){
  .st-bottom{padding:14px 14px 22px !important;}
  .st-bottom-extremes,
  .st-bottom-extra{grid-template-columns:1fr;}
}


/* ==========================================================
   V56 - Tre pannelli estremi realmente affiancati
   ========================================================== */
.st-extremes-row{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:18px !important;
  padding:18px 24px 0 !important;
  align-items:stretch !important;
}

.st-extremes-row > .st-panel{
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  height:100% !important;
}

.st-bottom-extra{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:18px !important;
  padding:18px 24px 28px !important;
}

/* neutralizza il vecchio contenitore bottom se rimasto in cache/css */
.st-bottom-extremes{display:contents !important;}

@media(max-width:1050px){
  .st-extremes-row{
    grid-template-columns:1fr 1fr !important;
  }
  .st-extremes-row > .st-panel:last-child{
    grid-column:1/-1;
  }
}

@media(max-width:700px){
  .st-extremes-row,
  .st-bottom-extra{
    grid-template-columns:1fr !important;
    padding-left:14px !important;
    padding-right:14px !important;
  }
  .st-extremes-row > .st-panel:last-child{
    grid-column:auto;
  }
}


/* ==========================================================
   V57 - Valori degli estremi più vicini alle etichette
   ========================================================== */
.st-extremes-row .st-extreme{
  display:grid !important;
  grid-template-columns:minmax(150px, 205px) max-content !important;
  justify-content:start !important;
  align-items:center !important;
  column-gap:14px !important;
  row-gap:0 !important;
  padding:7px 0 !important;
}

.st-extremes-row .st-extreme > span{
  min-width:0 !important;
}

.st-extremes-row .st-extreme > strong{
  justify-self:start !important;
  text-align:left !important;
  white-space:nowrap !important;
}

@media(max-width:1250px){
  .st-extremes-row .st-extreme{
    grid-template-columns:minmax(145px, 195px) max-content !important;
    column-gap:12px !important;
  }
}

@media(max-width:700px){
  .st-extremes-row .st-extreme{
    grid-template-columns:minmax(140px, 190px) max-content !important;
    column-gap:10px !important;
  }
}


/* ==========================================================
   V58 - Pannelli estremi più stretti e tutti uguali
   ========================================================== */
.st-extremes-row{
  grid-template-columns:repeat(3, 350px) !important;
  justify-content:start !important;
  gap:16px !important;
}

.st-extremes-row > .st-panel{
  width:350px !important;
  max-width:350px !important;
  min-width:350px !important;
  padding:14px !important;
}

/* Contenuto interno proporzionato alla nuova larghezza */
.st-extremes-row .st-extreme{
  grid-template-columns:185px max-content !important;
  column-gap:10px !important;
  padding:7px 0 !important;
}

/* Tablet: due pannelli, sempre della stessa misura */
@media(max-width:1180px){
  .st-extremes-row{
    grid-template-columns:repeat(2, 350px) !important;
  }
  .st-extremes-row > .st-panel{
    width:350px !important;
    max-width:350px !important;
    min-width:350px !important;
  }
}

/* Mobile: un pannello per riga e larghezza adattabile */
@media(max-width:760px){
  .st-extremes-row{
    grid-template-columns:1fr !important;
  }
  .st-extremes-row > .st-panel{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }
  .st-extremes-row .st-extreme{
    grid-template-columns:minmax(150px,185px) max-content !important;
  }
}


/* ==========================================================
   V60 - Vento: NON rimpicciolisce i dati; libera spazio dalla manica
   ========================================================== */
/* leggermente più spazio alla colonna vento, senza stravolgere le altre */
.st-dashboard{
  grid-template-columns:1.12fr 1.12fr .96fr !important;
}

/* colonna della manica più stretta; dati mantengono la dimensione originale */
.st-wind-layout{
  grid-template-columns:78px minmax(0,1fr) !important;
  gap:8px !important;
  min-height:292px !important;
  align-items:stretch !important;
}

.st-wind-visual{
  min-height:292px !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:2px 0 0 0 !important;
  overflow:visible !important;
}

/* manica più in alto, asta lunga fino in basso, ma più stretta lateralmente */
.st-wind-visual img{
  width:74px !important;
  max-width:74px !important;
  height:282px !important;
  max-height:282px !important;
  object-fit:contain !important;
  object-position:top center !important;
  display:block !important;
  margin:0 auto !important;
  transform-origin:25% 7% !important;
}

/* riquadri: recuperiamo dimensioni leggibili, senza rimpicciolire i numeri */
.st-wind-top,
.st-wind-bottom-grid{
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
}

.st-wind-card-small{
  min-height:86px !important;
  padding:10px 11px !important;
}

.st-wind-card-big{
  min-height:112px !important;
  padding:14px 11px 12px !important;
}

.st-wind-reading-big{
  display:flex !important;
  align-items:baseline !important;
  gap:4px !important;
  white-space:nowrap !important;
  flex-wrap:nowrap !important;
}

.st-wind-reading-big span{
  font-size:48px !important;
  line-height:.95 !important;
  font-weight:900 !important;
}

.st-wind-reading-big small{
  font-size:14px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
  margin-left:0 !important;
}

@media(max-width:1250px){
  .st-dashboard{
    grid-template-columns:1fr 1fr !important;
  }
  .st-wind-layout{
    grid-template-columns:78px minmax(0,1fr) !important;
    min-height:280px !important;
  }
  .st-wind-visual{min-height:280px !important;}
  .st-wind-visual img{
    width:72px !important;
    max-width:72px !important;
    height:270px !important;
    max-height:270px !important;
  }
}

@media(max-width:850px){
  .st-wind-layout{
    grid-template-columns:72px minmax(0,1fr) !important;
    min-height:262px !important;
  }
  .st-wind-visual{min-height:262px !important;}
  .st-wind-visual img{
    width:66px !important;
    max-width:66px !important;
    height:250px !important;
    max-height:250px !important;
  }
  .st-wind-reading-big span{font-size:42px !important;}
  .st-wind-reading-big small{font-size:13px !important;}
}


/* ==========================================================
   V61 - asta manica più lunga + riquadri superiori leggermente più stretti
   ========================================================== */
.st-wind-layout{
  grid-template-columns:82px minmax(0,1fr) !important;
  gap:10px !important;
  min-height:292px !important;
}
.st-wind-visual{
  min-height:292px !important;
  align-items:flex-end !important;
  justify-content:center !important;
  padding:0 !important;
}
.st-wind-visual img{
  width:78px !important;
  max-width:78px !important;
  height:292px !important;
  max-height:292px !important;
  object-fit:contain !important;
  object-position:center bottom !important;
}
/* in alto i due riquadri sono appena più stretti per non toccare la manica */
.st-wind-top{
  grid-template-columns:46% 46% !important;
  justify-content:space-between !important;
  gap:0 !important;
}
.st-wind-top .st-wind-card-small{
  min-height:84px !important;
  padding:10px 10px !important;
}
@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:78px minmax(0,1fr) !important; min-height:282px !important;}
  .st-wind-visual{min-height:282px !important;}
  .st-wind-visual img{width:74px !important; max-width:74px !important; height:282px !important; max-height:282px !important;}
}
@media(max-width:850px){
  .st-wind-layout{grid-template-columns:72px minmax(0,1fr) !important; min-height:266px !important;}
  .st-wind-visual{min-height:266px !important;}
  .st-wind-visual img{width:68px !important; max-width:68px !important; height:266px !important; max-height:266px !important;}
  .st-wind-top{grid-template-columns:1fr 1fr !important; gap:8px !important;}
}


/* ==========================================================
   V62 - manica a vento più in alto, asta più lunga, riquadri top meno invasivi
   ========================================================== */
.st-wind-layout{
  grid-template-columns:96px minmax(0,1fr) !important;
  gap:10px !important;
  min-height:304px !important;
}
.st-wind-visual{
  min-height:304px !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  padding:0 !important;
}
.st-wind-visual img{
  width:94px !important;
  max-width:94px !important;
  height:304px !important;
  max-height:304px !important;
  object-fit:contain !important;
  object-position:left top !important;
  display:block !important;
}
.st-wind-top{
  grid-template-columns:44% 44% !important;
  justify-content:space-between !important;
  gap:0 !important;
}
.st-wind-top .st-wind-card-small{
  min-height:82px !important;
  padding:10px 10px !important;
}
@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:90px minmax(0,1fr) !important;min-height:292px !important;}
  .st-wind-visual{min-height:292px !important;}
  .st-wind-visual img{width:88px !important;max-width:88px !important;height:292px !important;max-height:292px !important;}
}
@media(max-width:850px){
  .st-wind-layout{grid-template-columns:82px minmax(0,1fr) !important;min-height:272px !important;}
  .st-wind-visual{min-height:272px !important;}
  .st-wind-visual img{width:80px !important;max-width:80px !important;height:272px !important;max-height:272px !important;}
  .st-wind-top{grid-template-columns:1fr 1fr !important;gap:8px !important;}
}


/* V64 - manica dinamica grande come la versione precedente */
.st-wind-visual img{width:96px !important;max-width:96px !important;height:304px !important;max-height:304px !important;object-fit:contain !important;object-position:left top !important;}
@media(max-width:1250px){.st-wind-visual img{width:90px !important;max-width:90px !important;height:292px !important;max-height:292px !important;}}
@media(max-width:850px){.st-wind-visual img{width:82px !important;max-width:82px !important;height:272px !important;max-height:272px !important;}}


/* ==========================================================
   V66 - Manica a vento fissa, pulita e stabile
   ========================================================== */
.st-wind-layout{
  grid-template-columns:112px minmax(0,1fr) !important;
  gap:12px !important;
  min-height:292px !important;
  align-items:stretch !important;
}
.st-wind-visual{
  min-height:292px !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:0 !important;
  overflow:hidden !important;
}
.st-wind-visual img{
  width:104px !important;
  max-width:104px !important;
  height:292px !important;
  max-height:292px !important;
  object-fit:contain !important;
  object-position:center top !important;
  display:block !important;
  margin:0 auto !important;
  transform:none !important;
  opacity:1 !important;
}
/* La manica è decorativa: nessuna classe di intensità deve deformarla. */
.st-wind-visual img.wind-calm,
.st-wind-visual img.wind-breeze,
.st-wind-visual img.wind-strong{
  transform:none !important;
  opacity:1 !important;
}
/* Quattro riquadri dati larghi e leggibili */
.st-wind-top,
.st-wind-bottom-grid{
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
}
.st-wind-card-small,
.st-wind-card-big{
  min-width:0 !important;
}
.st-wind-reading-big{
  white-space:nowrap !important;
}
.st-wind-reading-big small{
  white-space:nowrap !important;
}
@media(max-width:1250px){
  .st-wind-layout{grid-template-columns:104px minmax(0,1fr) !important;min-height:282px !important;}
  .st-wind-visual{min-height:282px !important;}
  .st-wind-visual img{width:96px !important;max-width:96px !important;height:282px !important;max-height:282px !important;}
}
@media(max-width:850px){
  .st-wind-layout{grid-template-columns:94px minmax(0,1fr) !important;min-height:266px !important;}
  .st-wind-visual{min-height:266px !important;}
  .st-wind-visual img{width:86px !important;max-width:86px !important;height:266px !important;max-height:266px !important;}
}

/* ==========================================================
   V70 - Un'unica griglia per estremi e webcam.
   Desktop: [Oggi] [Mese] [Anno] [Webcam 1]
            [Mappa e posizione] [Webcam 2]
   I quattro bordi della prima riga condividono la stessa griglia.
   Nessun vecchio selettore .st-extremes-row/.st-bottom-extra coinvolto.
   ========================================================== */
.st-summary-board{
  --summary-camera-height:240px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-areas:
    "day month year camera-one"
    "map map map camera-two";
  grid-template-rows:auto auto;
  gap:18px;
  align-items:stretch;
  width:100%;
  max-width:1502px;
  padding:18px 24px 28px;
  box-sizing:border-box;
}
.st-summary-board > .st-panel{
  min-width:0;
  width:auto;
  max-width:none;
  margin:0;
  padding:14px;
  box-sizing:border-box;
}
.st-summary-board .st-summary-day{grid-area:day;}
.st-summary-board .st-summary-month{grid-area:month;}
.st-summary-board .st-summary-year{grid-area:year;}
.st-summary-board .st-summary-card{
  min-height:220px;
  height:auto;
}
.st-summary-board > .st-panel h2{
  margin:0 0 12px;
  font-size:20px;
  line-height:1.2;
}
.st-summary-board .st-summary-card .st-extreme{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);
  gap:10px;
  justify-content:start;
  align-items:center;
  padding:7px 0;
}
.st-summary-board .st-summary-card .st-extreme > span{
  min-width:0;
  line-height:1.25;
}
.st-summary-board .st-summary-card .st-extreme > strong{
  min-width:0;
  justify-self:start;
  text-align:left;
  white-space:normal;
  overflow-wrap:break-word;
  line-height:1.2;
}
.st-summary-board .st-summary-camera{
  display:flex;
  flex-direction:column;
  min-height:0;
  min-width:0;
  overflow:hidden;
}
.st-summary-board .st-summary-camera-one{
  grid-area:camera-one;
  /* Stretch sulla STESSA riga dei tre estremi: allineamento nativo. */
  align-self:stretch;
  height:auto;
}
.st-summary-board .st-summary-camera-two{
  grid-area:camera-two;
  align-self:start;
  height:var(--summary-camera-height);
}
.st-summary-board .st-summary-camera > h2{
  flex:0 0 auto;
}
.st-summary-board .st-webcam-placeholder{
  flex:1 1 0;
  min-width:0;
  min-height:0;
  width:100%;
  height:auto;
  border:1px dashed #bfd2df;
  border-radius:9px;
  background:linear-gradient(180deg,#fafdff,#f1f7fb);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:#6a8397;
  font-size:14px;
  font-weight:700;
  text-align:center;
}
.st-summary-board .st-webcam-placeholder > span{
  padding:12px;
}
.st-summary-board .st-webcam-placeholder img,
.st-summary-board .st-webcam-placeholder iframe,
.st-summary-board .st-webcam-placeholder video{
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  border:0;
  object-fit:contain;
}
.st-summary-board .st-summary-map{
  grid-area:map;
  align-self:start;
  min-width:0;
}
/* Solo su schermi piccoli i blocchi diventano verticali.
   Le webcam restano consecutive: la mappa non si inserisce fra le due. */
@media(max-width:1050px){
  .st-summary-board{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"day" "month" "year" "camera-one" "camera-two" "map";
    max-width:none;
    padding:14px 14px 22px;
    gap:14px;
  }
  .st-summary-board .st-summary-camera-one{height:240px;}
  .st-summary-board .st-summary-card .st-extreme{
    grid-template-columns:minmax(0,185px) minmax(0,1fr);
  }
}


/* V71 - Webcam opzionali + HLS */
.st-summary-board .st-webcam-video{width:100%;height:100%;min-height:0;object-fit:cover;background:#0a1620}
.st-summary-board .st-webcam-placeholder{position:relative}
.st-summary-board .st-webcam-error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;background:#eef5f9;color:#607b8e;font-weight:700;text-align:center}
.st-summary-board .st-webcam-error[hidden]{display:none}
.webcam-count-0 .st-summary-board{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"day month year" "map map map"}
.webcam-count-1 .st-summary-board{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-areas:"day month year camera-one" "map map map map"}
.webcam-count-1 .st-summary-camera-two{grid-area:camera-one;align-self:stretch;height:auto}
.webcam-count-2 .st-summary-board{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-areas:"day month year camera-one" "map map map camera-two"}
@media(max-width:1050px){
.webcam-count-0 .st-summary-board,.webcam-count-1 .st-summary-board,.webcam-count-2 .st-summary-board{grid-template-columns:1fr}
.webcam-count-0 .st-summary-board{grid-template-areas:"day" "month" "year" "map"}
.webcam-count-1 .st-summary-board{grid-template-areas:"day" "month" "year" "camera-one" "map"}
.webcam-count-2 .st-summary-board{grid-template-areas:"day" "month" "year" "camera-one" "camera-two" "map"}
.webcam-count-1 .st-summary-camera-two{grid-area:camera-one;height:240px}
}


/* ==========================================================
   V73 - Colori temperature estreme
   ========================================================== */

/* Massime: oggi, mese e anno in rosso */
#eTmax,
#eMTmax,
#eYTmax{
  color:#d62828 !important;
  font-weight:900 !important;
}

/* Minime: oggi, mese e anno in blu */
#eTmin,
#eMTmin,
#eYTmin{
  color:#3346d3 !important;
  font-weight:900 !important;
}


/* ==========================================================
   V74 - Pulsante Admin discreto nel menu laterale
   ========================================================== */
.sidebar .nav-admin,
.nav-admin{
  margin-top:18px;
  padding-top:10px;
  padding-bottom:10px;
  font-size:13px;
  opacity:.72;
  border-top:1px solid #d7e3ec;
}
.sidebar .nav-admin:hover,
.nav-admin:hover{
  opacity:1;
}


/* V75 - Admin sotto Ultimo aggiornamento */
.header-admin-btn{
  display:inline-block;
  margin-top:7px;
  padding:4px 10px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:7px;
  color:#fff;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  background:rgba(255,255,255,.10);
}
.header-admin-btn:hover{
  background:rgba(255,255,255,.20);
  color:#fff;
}
