/* Mappa Salute — design system e shell comune (17/10/2026). Caricato DOPO il CSS di ogni pagina e solo con la shell attiva:
   tutto è sotto body[data-ms-shell], una pagina senza shell resta identica. Contrasti verificati AA in chiaro e in scuro. */

/* ───────────── token ───────────── */
body[data-ms-shell]{
  --bg:#f5f5f7; --card:#fff; --ink:#1d1d1f; --muted:#55555a; --line:#e3e3e8; --link:#0066cc;
  --radius:18px; --shadow:0 1px 2px rgba(0,0,0,.04),0 8px 28px -10px rgba(0,0,0,.10);
  --vetro:rgba(245,245,247,.78); --vetro-card:rgba(255,255,255,.82);
  --c-ps:#d70015; --c-farmacie:#1e7a35; --c-strutture:#5e5ce6; --c-tempi:#c93400;
  --t-ps:#fff0f1; --t-farmacie:#ecf8ef; --t-strutture:#f0f0fe; --t-tempi:#fff3ec;
  --acc:#0066cc; --acc-t:#eaf3fd;
  --brand:#0066cc; --brand2:#5e5ce6;   /* i grafici dei vecchi JS leggono --brand */
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:15.5px; letter-spacing:-.01em; background:var(--bg); color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
[data-theme=dark] body[data-ms-shell]{
  --bg:#000; --card:#1c1c1e; --ink:#f5f5f7; --muted:#a1a1a6; --line:#2f2f33; --link:#4da3ff;
  --shadow:0 1px 2px rgba(0,0,0,.5),0 8px 28px -10px rgba(0,0,0,.8);
  --vetro:rgba(22,22,24,.72); --vetro-card:rgba(28,28,30,.85);
  --c-ps:#ff6b6b; --c-farmacie:#32d74b; --c-strutture:#9d9bff; --c-tempi:#ff9f43;
  --t-ps:#3a1215; --t-farmacie:#0f2a16; --t-strutture:#1e1e3d; --t-tempi:#38200f;
  --acc:#4da3ff; --acc-t:#0d2238;
  --brand:#0a6fd6; --brand2:#5e5ce6;   /* fondo di pulsanti con testo bianco (4,9:1) e linea dei grafici sul nero */
}
body[data-ms-sez="pronto-soccorso"],.ms-c-pronto-soccorso{--acc:var(--c-ps);--acc-t:var(--t-ps)}
body[data-ms-sez="farmacie"],.ms-c-farmacie{--acc:var(--c-farmacie);--acc-t:var(--t-farmacie)}
body[data-ms-sez="strutture"],.ms-c-strutture{--acc:var(--c-strutture);--acc-t:var(--t-strutture)}
body[data-ms-sez="tempi-attesa"],.ms-c-tempi-attesa{--acc:var(--c-tempi);--acc-t:var(--t-tempi)}

:where(body[data-ms-shell]) .ic{width:1.15em;height:1.15em;vertical-align:-.2em;flex-shrink:0;fill:currentColor}
:where(body[data-ms-shell]) a{color:var(--link)}
body.ms-bloccato{overflow:hidden}

/* ───────────── testata ───────────── */
.ms-hdr{position:sticky;top:0;z-index:60;background:var(--vetro);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid var(--line)}
.ms-hdr-in{max-width:1120px;margin:0 auto;height:56px;display:flex;align-items:center;gap:10px;padding:0 16px}
.ms-logo{display:inline-flex;align-items:center;gap:8px;color:var(--ink)!important;text-decoration:none;font-size:18px;letter-spacing:-.4px;white-space:nowrap;min-height:44px}
.ms-logo b{font-weight:800}
.ms-nav{display:none}
.ms-nav-a{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:999px;color:var(--ink)!important;text-decoration:none;font-weight:600;font-size:14px;transition:background .2s}
.ms-nav-a .ic{color:var(--acc);width:20px;height:20px}
.ms-nav-a:hover{background:rgba(127,127,140,.12)}
.ms-nav-a.on{background:var(--acc-t);color:var(--acc)!important}
.ms-menu-btn{margin-left:auto;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font:600 14px/1 inherit;cursor:pointer}
.ms-menu-btn .ic{width:20px;height:20px}
@media(min-width:960px){ .ms-nav{display:flex;gap:2px;margin-left:auto} .ms-menu-btn{margin-left:6px} }

/* titolo e «dati rilevati alle» portati fuori dalla vecchia testata */
.ms-sopra{max-width:1120px;margin:0 auto;padding:22px 16px 2px}
.ms-h1,body[data-ms-shell] .d-title{font-size:clamp(27px,5.4vw,42px);font-weight:800;letter-spacing:-.045em;line-height:1.08;margin:4px 0 8px;color:var(--ink)}
.ms-sopra .updated{max-width:none;margin:0;color:var(--muted);opacity:1;font-size:13.5px}
body[data-ms-shell] .d-sub{color:var(--muted);font-size:16px}

/* ───────────── contenuto: le classi di sempre, ridisegnate ───────────── */
body[data-ms-shell] .wrap{max-width:1120px;padding:14px 16px 40px}
body[data-ms-shell] .detail-wrap{max-width:820px}
body[data-ms-shell] .card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px 22px;margin-bottom:16px}
body[data-ms-shell] .card h2{font-size:19px;font-weight:700;letter-spacing:-.02em;margin:0 0 12px}
body[data-ms-shell] .row,body[data-ms-shell] .sum-stats{border-radius:var(--radius);box-shadow:var(--shadow);border-color:var(--line)}
body[data-ms-shell] .controls{top:56px;background:var(--vetro);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid var(--line);box-shadow:none}
body[data-ms-shell] .emerg-note{border-radius:14px;background:var(--t-ps);border-color:transparent;color:var(--ink)}
body[data-ms-shell] .emerg-note .ic{color:var(--c-ps)}
body[data-ms-shell] .crumbs{font-size:13px}
body[data-ms-shell] .d-table th{letter-spacing:.02em}
body[data-ms-shell] details summary{min-height:28px}
body[data-ms-shell] .geo-btn,body[data-ms-shell] .toggle-btn,body[data-ms-shell] .adv-toggle{border-radius:999px}

/* ───────────── menu (mega-menu su desktop, foglio a tutto schermo su mobile) ───────────── */
.ms-menu{position:fixed;inset:0;z-index:100}
.ms-menu-bg{position:absolute;inset:0;background:rgba(0,0,0,.32);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .25s}
.ms-menu-pan{position:absolute;inset:0;overflow:auto;background:var(--bg);padding:0 16px calc(24px + env(safe-area-inset-bottom));transform:translateY(-12px);opacity:0;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .2s}
.ms-menu.show .ms-menu-bg{opacity:1}
.ms-menu.show .ms-menu-pan{transform:none;opacity:1}
.ms-menu-top{position:sticky;top:0;z-index:1;display:flex;align-items:center;height:56px;background:var(--bg);margin:0 -16px;padding:0 16px;border-bottom:1px solid var(--line)}
.ms-x{margin-left:auto;width:44px;height:44px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer;display:grid;place-items:center}
.ms-x .ic{width:20px;height:20px}
.ms-menu-griglia{display:grid;gap:14px;margin-top:16px}
.ms-menu-sez{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:16px;box-shadow:var(--shadow)}
.ms-menu-sez.on{outline:2px solid var(--acc);outline-offset:-1px}
.ms-menu-tit{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)!important;min-height:48px}
.ms-menu-tit b{display:block;font-size:18px;letter-spacing:-.02em}
.ms-menu-tit small{display:block;color:var(--muted);font-size:13px;margin-top:1px}
.ms-tile{width:44px;height:44px;border-radius:13px;background:var(--acc);display:grid;place-items:center;color:#fff;flex-shrink:0;box-shadow:0 6px 16px -8px var(--acc)}
.ms-tile .ic{width:26px;height:26px}
.ms-menu-sez ul{list-style:none;margin:10px 0 0;padding:0}
.ms-menu-sez li a{display:flex;align-items:center;gap:11px;min-height:46px;padding:0 4px;border-top:1px solid var(--line);color:var(--ink)!important;text-decoration:none;font-size:15px}
.ms-menu-sez li:first-child a{border-top:0}
.ms-menu-sez li a .ic{color:var(--acc);width:21px;height:21px}
.ms-menu-sez li a span{flex:1}
.ms-menu-sez li a .ms-freccia{color:var(--muted);width:16px;height:16px}
.ms-menu-sez li a:hover span{color:var(--acc)}
.ms-arrivo{font-size:13px;color:var(--muted);padding:10px 4px 0;border-top:1px solid var(--line)}
.ms-menu-et{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:14px 4px 8px}
.ms-chips{display:flex;flex-wrap:wrap;gap:7px}
.ms-chip{display:inline-flex;align-items:center;min-height:34px;padding:0 12px;border-radius:999px;background:var(--acc-t);color:var(--ink)!important;text-decoration:none;font-size:13.5px;font-weight:600}
.ms-chip:hover{background:var(--acc);color:#fff!important}
.ms-menu-piede{display:grid;gap:12px;margin-top:16px}
.ms-112{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:var(--t-ps);color:var(--ink)!important;text-decoration:none}
.ms-112 .ic{width:30px;height:30px;color:var(--c-ps)}
.ms-112 b{display:block;font-size:16px}.ms-112 small{display:block;font-size:13px;color:var(--muted)}
.ms-tema{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;border-radius:14px;background:var(--card);border:1px solid var(--line)}
.ms-tema button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:600 14px/1 inherit;cursor:pointer}
.ms-tema button[aria-pressed=true]{background:var(--bg);box-shadow:var(--shadow)}
.ms-tema .ic{width:18px;height:18px}
@media(min-width:720px){ .ms-menu-griglia{grid-template-columns:1fr 1fr} .ms-menu-piede{grid-template-columns:1.4fr 1fr;align-items:center} }
@media(min-width:960px){
  .ms-menu-pan{inset:0 0 auto 0;max-height:calc(100vh - 24px);border-radius:0 0 28px 28px;padding:0 max(24px,calc((100vw - 1120px)/2)) 28px;box-shadow:0 30px 60px -20px rgba(0,0,0,.35)}
  .ms-menu-top{margin:0 calc(-1 * max(24px,calc((100vw - 1120px)/2)));padding:0 max(24px,calc((100vw - 1120px)/2))}
}
@media(min-width:1180px){ .ms-menu-griglia{grid-template-columns:repeat(4,1fr)} }

/* ───────────── barra in basso (solo mobile) ───────────── */
.ms-tab{position:fixed;left:0;right:0;bottom:0;z-index:55;display:grid;grid-template-columns:repeat(4,1fr);background:var(--vetro);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:1px solid var(--line);padding:0 4px env(safe-area-inset-bottom)}
.ms-tab a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;color:var(--muted)!important;text-decoration:none;font-size:11px;font-weight:600}
.ms-tab a .ic{width:24px;height:24px;color:var(--acc);opacity:.85}
.ms-tab a.on{color:var(--ink)!important;font-weight:800}
.ms-tab a.on .ic{opacity:1}
@media(max-width:959px){
  body[data-ms-shell]{padding-bottom:calc(58px + env(safe-area-inset-bottom))}
  body[data-ms-shell] .cookie-banner,body[data-ms-shell] .d-stickybar{bottom:calc(58px + env(safe-area-inset-bottom))!important}
}
@media(min-width:960px){ .ms-tab{display:none} }

/* ───────────── footer ───────────── */
.ms-foot{margin-top:28px;border-top:1px solid var(--line);background:var(--bg)}
.ms-foot-in{max-width:1120px;margin:0 auto;padding:32px 16px 28px;display:grid;gap:24px;font-size:13.5px;color:var(--muted)}
.ms-foot-marca p{margin:10px 0 0;max-width:42ch;line-height:1.5}
.ms-foot-col h2{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ink);margin:0 0 8px}
.ms-foot-col ul{list-style:none;margin:0;padding:0}
.ms-foot-col a{display:inline-flex;align-items:center;min-height:32px;color:var(--muted)!important;text-decoration:none}
.ms-foot-col a:hover{color:var(--ink)!important;text-decoration:underline}
.ms-foot-fonte p{margin:0;line-height:1.5}
.ms-foot-fonte a{color:var(--muted)!important;text-decoration:underline}
.ms-foot-firma{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;border-top:1px solid var(--line)}
.ms-creabit{display:inline-flex;align-items:center;gap:8px;color:var(--muted)!important;text-decoration:none;min-height:44px}
.ms-creabit img{display:block;height:20px;width:auto}
[data-theme=dark] .ms-creabit picture{background:#f5f5f7;border-radius:8px;padding:5px 8px}
@media(min-width:760px){ .ms-foot-in{grid-template-columns:1.6fr 1fr 1fr} .ms-foot-fonte,.ms-foot-firma{grid-column:1/-1} }

/* ───────────── movimento ───────────── */
@media(prefers-reduced-motion:reduce){ .ms-menu-bg,.ms-menu-pan,.ms-nav-a{transition:none} }

/* ───────────── home e pagine nazionali (portale) ───────────── */
body[data-ms-shell] main.msh{max-width:1120px}
.msh-hero{padding:28px 0 8px;text-align:left}
.msh-kicker{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;padding:6px 12px;border-radius:999px;background:var(--card);border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--muted)}
.msh-dot{width:8px;height:8px;border-radius:50%;background:#30b84f;box-shadow:0 0 0 0 rgba(48,184,79,.6);animation:msh-pulse 2s infinite}
@keyframes msh-pulse{0%{box-shadow:0 0 0 0 rgba(48,184,79,.55)}70%{box-shadow:0 0 0 9px rgba(48,184,79,0)}100%{box-shadow:0 0 0 0 rgba(48,184,79,0)}}
.msh-hero h1{font-size:clamp(34px,7.4vw,68px);line-height:1.03;letter-spacing:-.05em;font-weight:800;margin:0 0 16px;max-width:17ch}
.msh-grad{background:linear-gradient(92deg,#ff375f 0%,#bf5af2 45%,#0a66d6 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.msh-lead{font-size:clamp(17px,2.3vw,21px);line-height:1.45;color:var(--muted);max-width:60ch;margin:0 0 22px}
.msh-cta{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:26px}
.msh-btn{display:inline-flex;align-items:center;gap:9px;min-height:50px;padding:0 20px;border-radius:999px;background:var(--card);border:1px solid var(--line);color:var(--ink)!important;text-decoration:none;font-weight:700;font-size:16px;box-shadow:var(--shadow);transition:transform .15s}
.msh-btn:hover{transform:translateY(-1px)}
.msh-btn .ic{width:21px;height:21px}
.msh-btn-pri{background:#d70015;border-color:#d70015;color:#fff!important}
[data-theme=dark] .msh-btn-pri{background:#e0243a;border-color:#e0243a}
.msh-numeri{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0}
.msh-numeri div{display:flex;flex-direction:column;justify-content:space-between;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px 14px 12px;box-shadow:var(--shadow)}
.msh-numeri dt{font-size:12.5px;color:var(--muted);line-height:1.3}
.msh-numeri dd{margin:4px 0 0;font-size:clamp(26px,5vw,38px);font-weight:800;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.msh-112{display:flex;align-items:center;gap:12px;margin:18px 0 6px;padding:14px 16px;border-radius:18px;background:var(--t-ps);color:var(--ink)!important;text-decoration:none;font-size:14.5px;line-height:1.4}
.msh-112 .ic{width:28px;height:28px;color:var(--c-ps)}
.msh-griglia{display:grid;gap:14px;margin:18px 0 8px}
.msh-card{position:relative;display:flex;justify-content:space-between;gap:12px;overflow:hidden;background:var(--card);border:1px solid var(--line);border-radius:26px;padding:22px;box-shadow:var(--shadow);min-height:220px}
.msh-card::before{content:"";position:absolute;inset:auto -30% -55% auto;width:70%;aspect-ratio:1;border-radius:50%;background:var(--acc-t);z-index:0}
.msh-card-txt{position:relative;z-index:1;flex:1;min-width:0}
.msh-card .ms-tile{display:none}
.msh-card h2{font-size:clamp(22px,3vw,28px);letter-spacing:-.035em;line-height:1.12;margin:2px 0 8px}
.msh-card h2 a{color:var(--ink)!important;text-decoration:none}
.msh-card h2 a::after{content:"";position:absolute;inset:0;z-index:0}
.msh-card p{color:var(--muted);margin:0 0 14px;line-height:1.45;max-width:46ch}
.msh-links{position:relative;z-index:2;display:flex;flex-wrap:wrap;gap:6px}
.msh-link{display:inline-flex;align-items:center;gap:4px;min-height:36px;padding:0 12px;border-radius:999px;background:var(--acc-t);color:var(--acc)!important;text-decoration:none;font-weight:700;font-size:14px}
.msh-link .ic{width:15px;height:15px}
.msh-ill{position:relative;z-index:1;width:110px;height:110px;flex-shrink:0;align-self:flex-end}
.msh-live{position:relative;z-index:2;margin-top:16px;background:var(--bg);border-radius:16px;padding:12px 14px}
.msh-live-t{display:flex;align-items:center;gap:8px;margin:0 0 6px!important;font-size:13px;font-weight:600}
.msh-live ol{margin:0;padding:0;list-style:none;counter-reset:l}
.msh-live li a{display:flex;align-items:center;gap:10px;min-height:38px;color:var(--ink)!important;text-decoration:none;border-top:1px solid var(--line)}
.msh-live li:first-child a{border-top:0}
.msh-live li a::before{counter-increment:l;content:counter(l);width:22px;height:22px;border-radius:50%;background:var(--acc);color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center}
.msh-live li a span{flex:1}
.msh-live li a b{font-variant-numeric:tabular-nums}
@media(min-width:860px){
  .msh-griglia{grid-template-columns:repeat(3,1fr)}
  .msh-card-big{grid-column:span 2;grid-row:span 2}
  .msh-card-big .msh-ill{width:170px;height:170px}
  .msh-card{flex-direction:column}
  .msh-card .msh-ill{position:absolute;right:18px;top:18px;width:84px;height:84px}
  .msh-card-big .msh-ill{width:150px;height:150px}
  .msh-card h2{padding-right:96px}
  .msh-card-big h2{padding-right:160px}
  .msh-griglia>.ms-c-tempi-attesa{grid-column:1/-1;min-height:0}
  .msh-griglia>.ms-c-tempi-attesa p{max-width:70ch}
}
.msh-blocco{margin:34px 0 0}
.msh-blocco>h2{font-size:clamp(24px,3.6vw,34px);letter-spacing:-.04em;margin:0 0 6px}
.msh-sub{color:var(--muted);margin:0 0 16px;max-width:70ch}
.msh-leg{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 12px;font-size:13px;color:var(--muted)}
.msh-leg span{display:inline-flex;align-items:center;gap:6px}
.msh-leg .ic{color:var(--acc);width:18px;height:18px}
.msh-regioni{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.msh-regioni li{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:6px 8px 6px 14px;min-height:50px}
.msh-regioni li:not(.attiva) .msh-reg{color:var(--muted)}
.msh-reg{font-weight:600}
.msh-celle{display:flex;gap:4px}
.msh-ok,.msh-no{width:38px;height:38px;border-radius:11px;display:grid;place-items:center}
.msh-ok{background:var(--acc-t);color:var(--acc)!important}
.msh-ok .ic{width:21px;height:21px}
.msh-no::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--muted);opacity:.45}
@media(min-width:760px){ .msh-regioni{grid-template-columns:1fr 1fr} }
@media(min-width:1080px){ .msh-regioni{grid-template-columns:1fr 1fr 1fr} }
.msh-stampa-g{display:grid;gap:10px;grid-template-columns:1fr 1fr}
.msh-stampa-g a{display:flex;flex-direction:column;gap:4px;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px;color:var(--ink)!important;text-decoration:none;box-shadow:var(--shadow)}
.msh-stampa-g .ic{width:26px;height:26px;color:var(--link);margin-bottom:6px}
.msh-stampa-g span{color:var(--muted);font-size:13px}
@media(min-width:860px){ .msh-stampa-g{grid-template-columns:repeat(4,1fr)} }
/* pagine nazionali */
.msh-hero-sez .ms-tile{width:58px;height:58px;border-radius:17px;margin-bottom:14px}
.msh-hero-sez .ms-tile .ic{width:34px;height:34px}
.msh-hero-sez h1{font-size:clamp(30px,5.6vw,52px);max-width:22ch}
.msh-regsez{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.msh-regsez li a,.msh-reg-x{display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 14px;border-radius:16px;background:var(--card);border:1px solid var(--line);text-decoration:none;color:var(--ink)!important}
.msh-regsez li a{box-shadow:var(--shadow);border-color:var(--acc)}
.msh-regsez li a .ic{color:var(--acc);width:24px;height:24px}
.msh-regsez li a span,.msh-reg-x{flex:1}
.msh-regsez b{display:block}
.msh-regsez small{display:block;color:var(--muted);font-size:12.5px}
.msh-regsez li a small{color:var(--acc);font-weight:700}
.msh-reg-x{background:transparent;border-style:dashed}
@media(min-width:760px){ .msh-regsez{grid-template-columns:repeat(3,1fr)} .msh-due{display:grid;grid-template-columns:repeat(3,1fr);gap:14px} .msh-due .card{margin:0} }
@media(prefers-reduced-motion:no-preference){ .msh-griglia>*{animation:msh-in .6s cubic-bezier(.2,.8,.2,1) both} .msh-griglia>*:nth-child(2){animation-delay:.06s} .msh-griglia>*:nth-child(3){animation-delay:.12s} .msh-griglia>*:nth-child(4){animation-delay:.18s} }
@keyframes msh-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){ .msh-dot{animation:none} }
@media(max-width:600px){
  .msh-hero{padding-top:18px}
  .msh-hero h1{font-size:34px;margin-bottom:12px}
  .msh-lead{font-size:16.5px;margin-bottom:18px}
  .msh-cta{margin-bottom:18px}
  .msh-btn{min-height:48px;padding:0 16px;font-size:15px;width:100%;justify-content:center}
  .msh-numeri{gap:8px}
  .msh-numeri div{padding:10px 12px}
  .msh-numeri dd{font-size:26px}
  .msh-card{padding:18px;min-height:0}
  .msh-ill{width:84px;height:84px}
}

/* ───────────── card della lista e barra del triage (portale) ───────────── */
body[data-ms-shell] .row.msr{padding:0;cursor:default;border:1px solid var(--line);border-left:0;overflow:hidden;position:relative;transition:transform .15s,box-shadow .15s}
body[data-ms-shell] .row.msr::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--line)}
body[data-ms-shell] .row.msr[data-aff="0"]::before{background:var(--aff0)} body[data-ms-shell] .row.msr[data-aff="1"]::before{background:var(--aff1)}
body[data-ms-shell] .row.msr[data-aff="2"]::before{background:var(--aff2)} body[data-ms-shell] .row.msr[data-aff="3"]::before{background:var(--aff3)}
body[data-ms-shell] .row.msr:hover{transform:translateY(-1px);box-shadow:0 2px 4px rgba(0,0,0,.05),0 14px 34px -14px rgba(0,0,0,.22)}
.msr-link{display:block;padding:16px 16px 12px 20px;color:var(--ink)!important;text-decoration:none}
.msr-link:focus-visible{outline:3px solid var(--link);outline-offset:-3px}
.msr-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.msr-tit{min-width:0}
.msr .r-name{font-size:17px;font-weight:700;letter-spacing:-.02em;line-height:1.25}
.msr .r-meta{font-size:13px;margin-top:2px}
.msr-num{text-align:right;flex-shrink:0;line-height:1}
.msr-num b{display:block;font-size:30px;font-weight:800;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.msr-num span{font-size:11.5px;color:var(--muted);font-weight:600}
.msr-bar{display:flex;gap:2px;height:10px;border-radius:999px;overflow:hidden;margin:14px 0 8px;background:var(--bg)}
.msr-bar i{display:block;min-width:6px}
.msr-bar .b-rosso{background:var(--rosso)} .msr-bar .b-arancione{background:var(--arancione)} .msr-bar .b-azzurro{background:var(--azzurro)}
.msr-bar .b-verde{background:var(--verde)} .msr-bar .b-bianco{background:#94a3b8} .msr-bar .b-vuoto{flex:1;background:var(--line)}
.msr-leg{display:flex;flex-wrap:wrap;gap:4px 12px;list-style:none;margin:0;padding:0;font-size:12.5px;color:var(--muted)}
.msr-leg li{display:inline-flex;align-items:center;gap:5px}
.msr-leg li::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;flex-shrink:0}
.msr-leg b{color:var(--ink);font-variant-numeric:tabular-nums}
.msr-leg .l-rosso::before{background:var(--rosso)} .msr-leg .l-arancione::before{background:var(--arancione)} .msr-leg .l-azzurro::before{background:var(--azzurro)}
.msr-leg .l-verde::before{background:var(--verde)} .msr-leg .l-bianco::before{background:#94a3b8}
.msr-leg li.zero b{font-weight:500;color:var(--muted)}
.msr-nd{margin:12px 0 6px;font-size:13.5px;color:var(--muted)}
.msr-foot{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:12px;font-size:13px;color:var(--muted)}
.msr-foot b{color:var(--ink)}
.msr-tip{display:inline-flex;align-items:center;gap:5px}
.msr-tip .ic{width:16px;height:16px;color:var(--c-ps)}
.msr-act{display:flex;gap:8px;padding:0 16px 14px 20px}
.msr-btn{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border-radius:999px;background:var(--bg);border:1px solid var(--line);color:var(--ink)!important;text-decoration:none;font-weight:700;font-size:13.5px}
.msr-btn .ic{width:18px;height:18px;color:var(--c-ps)}
.msr-btn:hover{background:var(--card)}

/* ───────────── scheda: testa di stato e ordine delle sezioni ───────────── */
.ms-stato{background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);padding:18px 18px 16px;margin:10px 0 14px}
.ms-stato .d-status{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.ms-stato .d-big{font-size:15px;color:var(--muted)}
.ms-stato .d-big b{font-size:40px;letter-spacing:-.045em;color:var(--ink);font-weight:800;margin-right:4px;vertical-align:-4px}
.ms-stato .msr-bar{height:12px;margin-top:14px}
.ms-azioni{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.ms-azioni a{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:14px;font-weight:700;text-decoration:none;font-size:15px;border:1px solid var(--line);background:var(--bg);color:var(--ink)!important}
.ms-azioni a .ic{width:20px;height:20px}
.ms-azioni a.pri{background:#0066cc;border-color:#0066cc;color:#fff!important}
[data-theme=dark] .ms-azioni a.pri{background:#0a84ff;border-color:#0a84ff;color:#000!important}
.ms-azioni a:only-child{grid-column:1/-1}
body[data-ms-shell] main.detail-wrap{display:flex;flex-direction:column}
body[data-ms-shell] main.detail-wrap>*{order:50}
body[data-ms-shell] main.detail-wrap>.crumbs{order:1} body[data-ms-shell] main.detail-wrap>.d-title{order:2} body[data-ms-shell] main.detail-wrap>.d-sub{order:3}
body[data-ms-shell] main.detail-wrap>.ms-stato{order:4} body[data-ms-shell] main.detail-wrap>.d-presenti{order:5} body[data-ms-shell] main.detail-wrap>.emerg-note{order:6}
body[data-ms-shell] main.detail-wrap>.d-card,body[data-ms-shell] main.detail-wrap>.ms-o-tratt{order:7} body[data-ms-shell] main.detail-wrap>.ms-o-trend{order:8} body[data-ms-shell] main.detail-wrap>#profilo-card{order:9}
body[data-ms-shell] main.detail-wrap>.ms-o-vicini{order:10} body[data-ms-shell] main.detail-wrap>.ms-o-mappa{order:11} body[data-ms-shell] main.detail-wrap>.ms-o-info{order:12}
body[data-ms-shell] main.detail-wrap>.ms-o-reparti{order:13} body[data-ms-shell] main.detail-wrap>.alt-card{order:14} body[data-ms-shell] main.detail-wrap>.ugc-card{order:15}
body[data-ms-shell] main.detail-wrap>.ms-o-faq{order:16} body[data-ms-shell] main.detail-wrap>.back{order:90} body[data-ms-shell] main.detail-wrap>.ps-views{order:91}
body[data-ms-shell] .d-card .d-table th{font-size:11.5px}
body[data-ms-shell] .d-presenti{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:14px 16px;box-shadow:var(--shadow);margin-bottom:12px}
@media(max-width:959px){ body[data-ms-shell] .d-stickybar{display:none!important} }
/* card dei luoghi (farmacie, strutture) e delle prestazioni (tempi d'attesa) */
body[data-ms-shell] .row.msr-luogo::before{background:var(--acc)}
body[data-ms-shell] .row.msr[data-tda="ok"]::before{background:#15803d} body[data-ms-shell] .row.msr[data-tda="warn"]::before{background:#b45309}
body[data-ms-shell] .row.msr[data-tda="bad"]::before{background:#c81400}
.msr-luogo .msr-head{align-items:center}
.msr-tile{width:44px;height:44px;border-radius:13px;background:var(--acc-t);color:var(--acc);display:grid;place-items:center;flex-shrink:0}
.msr-tile .ic{width:25px;height:25px}
.msr-luogo .msr-tit{flex:1}
.msr-badge{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.msr-badge .ph-badge{font-size:11.5px;border-radius:999px}
.msr-dist{text-align:right;flex-shrink:0;line-height:1.1}
.msr-dist b{display:block;font-size:17px;font-weight:800;color:var(--ink)}
.msr-dist span{font-size:11.5px;color:var(--muted)}
.msr-num-t b{font-size:22px}
.msr-tda{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:13px;color:var(--muted)}
.msr-tda b{color:var(--ink)}
.msr-tda-bar{flex:0 0 38%;height:8px;border-radius:999px;background:var(--bg);overflow:hidden}
.msr-tda-bar i{display:block;height:100%;border-radius:999px}
/* pagina 404 */
.msh-404 h1{max-width:14ch}
.msh-404-sez li a{border-color:var(--line)!important}
.msh-404-sez li a .msr-tile{flex:0 0 40px;width:40px;height:40px}
@media(min-width:760px){ .msh-404-sez{grid-template-columns:1fr 1fr} }
/* liste scritte dal server (comuni, categorie, schede): stessa card del portale */
body[data-ms-shell] .r-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
body[data-ms-shell] .r-card.ms-card{display:flex;align-items:center;gap:6px;background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:0 10px 0 0;transition:transform .15s}
body[data-ms-shell] .r-card.ms-card:hover{transform:translateY(-1px)}
body[data-ms-shell] .r-card.ms-card>a:first-child{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:12px 6px 12px 14px;color:var(--ink)!important;text-decoration:none;min-height:64px}
body[data-ms-shell] .r-card.ms-card .msr-tile{width:40px;height:40px;border-radius:12px}
body[data-ms-shell] .r-card.ms-card .msr-tile .ic{width:23px;height:23px}
body[data-ms-shell] .ms-card-txt{min-width:0}
body[data-ms-shell] .r-card.ms-card .r-name{font-weight:700;font-size:15.5px;line-height:1.3;letter-spacing:-.01em}
body[data-ms-shell] .r-card.ms-card .r-meta{font-size:13px;color:var(--muted);margin-top:2px}
body[data-ms-shell] .r-card.ms-card .r-tel{flex:0 0 44px;width:44px;height:44px;padding:0;border-radius:999px;display:grid;place-items:center;background:var(--acc-t);color:var(--acc)!important}
body[data-ms-shell] .r-card.ms-card .r-tel .ic{width:20px;height:20px}
@media(min-width:760px){ body[data-ms-shell] .r-list{grid-template-columns:1fr 1fr} }
@media(min-width:1080px){ body[data-ms-shell] .r-list{grid-template-columns:1fr 1fr 1fr} }
body[data-ms-shell] .crumbs a{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}

/* ───────────── distanza nella scheda ───────────── */
.ms-dist{margin-top:12px;min-height:24px;font-size:14px;color:var(--muted)}
.ms-dist:empty{display:none}
.ms-dist .ic{width:18px;height:18px;color:var(--link);margin-right:6px;vertical-align:-4px}
.ms-dist b{color:var(--ink);font-size:16px}
.ms-dist small{color:var(--muted)}
.ms-dist-btn{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:600 14px/1 inherit;cursor:pointer}

/* ───────────── vicino a me: ricerca e mappa ───────────── */
.ms-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ms-vm{position:relative}
.ms-vm-cerca{display:flex;flex-wrap:wrap;gap:8px}
.ms-vm-campo{flex:1 1 220px;display:block}
.ms-vm-campo input{width:100%;min-height:48px;padding:0 16px;border-radius:14px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-size:16px}
.ms-vm-campo input:focus{outline:3px solid var(--link);outline-offset:1px}
.ms-vm .dbtn.primary{min-height:48px;border-radius:14px}
.ms-vm-sugg{position:absolute;z-index:1100;left:22px;right:22px;top:76px;list-style:none;margin:0;padding:6px;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 40px -16px rgba(0,0,0,.35);max-height:320px;overflow:auto}
.ms-vm-sugg li{padding:10px 12px;border-radius:10px;cursor:pointer;display:flex;flex-direction:column}
.ms-vm-sugg li:hover{background:var(--bg)}
.ms-vm-sugg small{color:var(--muted);font-size:12.5px}
.ms-vm-sugg .ms-vm-nessuno{cursor:default;color:var(--muted);font-size:13.5px}
.ms-vm-mappa{height:380px;border-radius:16px;overflow:hidden;margin:12px 0 6px;background:var(--bg);border:1px solid var(--line)}
@media(min-width:760px){ .ms-vm-mappa{height:480px} }
.ms-vm-dim{border:0;background:none;color:var(--link);text-decoration:underline;font:inherit;cursor:pointer;padding:0 0 0 4px;min-height:24px}
body[data-ms-shell] .vm-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
body[data-ms-shell] .vm-item{background:var(--bg);border-radius:14px;padding:12px 14px}

/* ───────────── popup delle mappe (lista e vicino a me), chiaro e scuro ───────────── */
body[data-ms-shell] .leaflet-popup-content-wrapper{border-radius:16px;box-shadow:0 18px 40px -14px rgba(0,0,0,.35);background:var(--card);color:var(--ink)}
body[data-ms-shell] .leaflet-popup-tip{background:var(--card)}
body[data-ms-shell] .leaflet-popup-content{margin:14px 16px;font:14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
body[data-ms-shell] .leaflet-container a.leaflet-popup-close-button{color:var(--muted);width:28px;height:28px;font-size:20px}
.ms-pop-n{display:block;font-weight:700;font-size:15.5px;color:var(--ink)!important;text-decoration:none;margin-right:16px}
.ms-pop-m{color:var(--muted);font-size:12.5px;margin:2px 0 8px}
.ms-pop-s{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px}
.ms-pop-a{display:flex;gap:6px;margin-top:10px}
.ms-pop-a a{flex:1;text-align:center;min-height:36px;line-height:36px;border-radius:10px;background:var(--bg);color:var(--ink)!important;text-decoration:none;font-weight:700;font-size:13px}
.ms-pop-a a:first-child{background:#0066cc;color:#fff!important}
[data-theme=dark] body[data-ms-shell] .map-pop{color:var(--ink)}
[data-theme=dark] body[data-ms-shell] .leaflet-tile-pane{filter:brightness(.78) contrast(1.08) saturate(.85)}
body[data-ms-shell] .trend-info{display:block;line-height:1.55}   /* era flex: il testo misto a <b> andava a capo a pezzi */
body[data-ms-shell] .trend-info .ti-dot{display:inline-block;vertical-align:1px;margin-right:6px}
.ms-vm-apri{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:0;background:var(--acc-t);color:var(--ink);font:600 15px/1.3 inherit;cursor:pointer}
.ms-vm-apri .ic{width:44px;height:44px;color:var(--c-ps)}

/* ★ 17/10/2026 — pagina nazionale delle farmacie: «vicino a me» e «aperte adesso vicino a me» portano alla regione giusta */
button.msh-btn{cursor:pointer;font-family:inherit}
.msh-cta-farm{margin:18px 0 0}
.msh-btn-farm{background:#1e7a35;border-color:#1e7a35;color:#fff!important}
.msh-nota{flex-basis:100%;margin:2px 0 0;font-size:14px;color:var(--muted);min-height:20px}
