/* Seetizen · Mappa interattiva (nuova interfaccia) */
:root { --m-alto: 76px; --vetro: rgba(255, 253, 246, .9); --ombra: 0 24px 60px -28px rgba(16, 51, 38, .55); }
.mappa-body { overflow: hidden; height: 100vh; height: 100dvh; }
.m-app { position: relative; height: calc(100vh - var(--m-alto)); height: calc(100dvh - var(--m-alto)); overflow: hidden; background: #e9e6dc; }
#m-map { position: absolute; inset: 0; z-index: 0; background: #e9e6dc; font-family: 'Inter', sans-serif; }
.m-tiles-chiare { filter: grayscale(1) contrast(.9) brightness(1.06); opacity: .62; }
.leaflet-container { font-family: 'Inter', sans-serif; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 253, 246, .8) !important; border-radius: 8px 0 0 0; }

/* ---------- Vetro: pannelli flottanti ---------- */
.m-vetro { background: var(--vetro); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .6); box-shadow: var(--ombra); }

/* ---------- Pannello di comando (sinistra) ---------- */
.m-pannello { position: absolute; z-index: 600; top: 16px; left: 16px; bottom: 16px; width: 380px; border-radius: 26px; display: flex; flex-direction: column; overflow: hidden; }
@supports (corner-shape: squircle) {
 .m-pannello { border-radius: 46px; } }
.m-testa { position: relative; z-index: 30; padding: 22px 22px 14px; } /* la lista dei risultati della ricerca sta sopra schede e pulsanti */
.m-testa .kicker { font-size: 10.5px; }
.m-titolo { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.m-titolo h1 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: -.02em; color: #103326; }
.m-titolo h1 em { color: #1d5c45; }
.m-contatore { text-align: right; line-height: 1.1; }
.m-contatore b { display: block; font-family: 'Fraunces', serif; font-weight: 400; font-size: 24px; color: #103326; font-variant-numeric: tabular-nums; }
.m-contatore span { font-size: 10.5px; color: #5f6b63; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }

/* Ricerca */
.m-cerca { position: relative; z-index: 30; margin: 14px 0 0; }
.m-cerca input { width: 100%; padding: 12px 40px 12px 42px; border-radius: 16px; border: 1px solid rgba(16, 51, 38, .12); background: #fffdf6; font-size: 14px; color: #17261f; outline: none; transition: border-color .2s, box-shadow .2s; }
.m-cerca input:focus { border-color: #1d5c45; box-shadow: 0 0 0 4px rgba(159, 216, 67, .25); }
.m-cerca > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #5f6b63; font-size: 14px; }
.m-cerca kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: 'Inter', sans-serif; font-size: 11px; color: #5f6b63; border: 1px solid rgba(16, 51, 38, .14); border-radius: 6px; padding: 1px 6px; background: #f5f3ea; }
.m-risultati { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: #fffdf6; border: 1px solid rgba(16, 51, 38, .1); border-radius: 16px; box-shadow: var(--ombra); max-height: 320px; overflow-y: auto; padding: 6px; display: none; }
.m-risultati.aperti { display: block; }
.m-risultati .gruppo-t { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #5f6b63; padding: 8px 10px 4px; }
.m-risultati button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; color: #17261f; }
.m-risultati button:hover, .m-risultati button.sel { background: #f5f3ea; }
.m-risultati button i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: rgba(159, 216, 67, .25); color: #1d5c45; flex-shrink: 0; }
@supports (corner-shape: squircle) {
 .m-risultati button i { corner-shape: round; } }
.m-risultati button small { display: block; color: #5f6b63; font-size: 11.5px; }
.m-risultati .vuoto { padding: 12px; font-size: 13px; color: #5f6b63; }

/* Schede dei temi */
/* temi: tesserine basse, 3 per riga */
.m-tab { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 22px; padding: 5px; border-radius: 16px; background: rgba(16, 51, 38, .06); }
.m-tab button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 9px 4px 8px; border-radius: 12px; background: rgba(255, 253, 246, .7); border: 1px solid rgba(16, 51, 38, .07); font-size: 12px; font-weight: 600; color: #5f6b63; transition: color .3s, background-color .3s, border-color .3s, box-shadow .3s; }
.m-tab button:not(.attiva):hover { color: #103326; border-color: rgba(16, 51, 38, .2); background: #fffdf6; }
.m-tab button i { font-size: 16px; }
/* la tessera scelta si colora (in dissolvenza), quella lasciata torna chiara */
.m-tab button.attiva { color: #f5f3ea; background: #103326; border-color: #103326; box-shadow: 0 8px 18px -10px rgba(16, 51, 38, .8); }
.m-tab button .pallino { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #f47b38; box-shadow: 0 0 0 2px var(--vetro); transform: scale(0); transition: transform .25s; }
@supports (corner-shape: squircle) {
 .m-tab button .pallino { corner-shape: round; } }
.m-tab button.con-livelli .pallino { transform: scale(1); }

/* Contenuto della scheda */
.m-corpo { flex: 1; overflow-y: auto; padding: 18px 22px 22px; scrollbar-width: thin; margin-top: 12px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px); mask-image: linear-gradient(to bottom, transparent 0, #000 26px); } /* stacco dal menù dei temi: chi scorre sfuma prima di arrivarci */
.m-sezione + .m-sezione { margin-top: 20px; }
.m-etichetta { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: #5f6b63; margin-bottom: 10px; }
.m-etichetta button { text-transform: none; letter-spacing: 0; font-size: 12px; color: #1d5c45; text-decoration: underline; text-underline-offset: 3px; }
.m-nota { font-size: 12.5px; line-height: 1.55; color: #5f6b63; background: rgba(245, 243, 234, .8); border-radius: 14px; padding: 11px 13px; display: flex; gap: 9px; }
.m-nota i { color: #f47b38; margin-top: 2px; }

/* Interruttore */
.m-switch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: #fffdf6; border: 1px solid rgba(16, 51, 38, .09); text-align: left; transition: border-color .2s, background-color .2s; }
.m-switch:hover { border-color: rgba(29, 92, 69, .45); }
.m-switch .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--c, #1d5c45); color: #fff; font-size: 14px; flex-shrink: 0; }
.m-switch .t { flex: 1; min-width: 0; }
.m-switch b { display: block; font-size: 13.5px; color: #17261f; font-weight: 600; line-height: 1.3; }
.m-switch small { display: block; font-size: 11.5px; color: #5f6b63; margin-top: 1px; }
.m-switch .lev { width: 38px; height: 22px; border-radius: 999px; background: rgba(16, 51, 38, .18); position: relative; flex-shrink: 0; transition: background-color .25s; }
.m-switch .lev::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
@supports (corner-shape: squircle) {
 .m-switch .lev::after { corner-shape: round; } }
.m-switch[aria-pressed="true"] { border-color: #1d5c45; background: #fff; }
.m-switch[aria-pressed="true"] .lev { background: #1d5c45; }
.m-switch[aria-pressed="true"] .lev::after { transform: translateX(16px); }
.m-switch + .m-switch { margin-top: 8px; }
.m-switch.piccolo { padding: 9px 12px; border-radius: 13px; }
.m-switch.piccolo .ico { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.m-switch.piccolo b { font-size: 12.5px; }

/* Pillole */
.m-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(16, 51, 38, .13); background: #fffdf6; font-size: 12.5px; font-weight: 500; color: #17261f; transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
.m-pill:hover { border-color: #1d5c45; }
.m-pill:active { transform: scale(.96); }
.m-pill.attiva { background: #103326; border-color: #103326; color: #f5f3ea; }
.m-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
@supports (corner-shape: squircle) {
 .m-pill .dot { corner-shape: round; } }
.m-pill .n { font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.m-pill-riga { display: flex; flex-wrap: wrap; gap: 6px; }
.m-segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(16, 51, 38, .06); }
.m-segmento button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: #5f6b63; transition: background-color .2s, color .2s; }
.m-segmento button.attiva { background: #fffdf6; color: #103326; box-shadow: 0 4px 12px -6px rgba(16, 51, 38, .4); }

/* Elenco di luoghi */
.m-elenco { display: grid; gap: 2px; max-height: 280px; overflow-y: auto; margin-top: 10px; }
.m-elenco button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; font-size: 13px; text-align: left; color: #17261f; transition: background-color .15s; }
.m-elenco button:hover { background: #fffdf6; }
.m-elenco button i { color: var(--c, #1d5c45); font-size: 11px; width: 14px; text-align: center; }
.m-elenco button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-elenco button small { color: #5f6b63; font-size: 11px; white-space: nowrap; }

/* Legenda */
.m-legenda { margin-top: 12px; }
.m-legenda .bar { height: 9px; border-radius: 999px; }
.m-legenda .v { display: flex; justify-content: space-between; font-size: 11px; color: #5f6b63; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Livelli attivi */
.m-piede { padding: 12px 22px 16px; border-top: 1px solid rgba(16, 51, 38, .08); }
.m-attivi { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; align-items: center; }
.m-attivi .vuoto { font-size: 12px; color: #5f6b63; }
.m-attivo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border-radius: 999px; background: #103326; color: #f5f3ea; font-size: 11.5px; font-weight: 600; }
.m-attivo i.fa-xmark { color: rgba(245, 243, 234, .6); font-size: 10px; }
.m-attivo:hover { background: #c8452c; }

/* ---------- Linea del tempo (in basso) ---------- */
.m-tempo { position: absolute; z-index: 550; left: 412px; right: 84px; bottom: 16px; border-radius: 22px; padding: 12px 18px 10px 12px; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; align-items: center; }
@supports (corner-shape: squircle) {
 .m-tempo { border-radius: 39px; } }
.m-tempo.nascosta { pointer-events: none; }
.m-play { width: 48px; height: 48px; border-radius: 50%; background: #103326; color: #9fd843; display: grid; place-items: center; font-size: 16px; box-shadow: 0 10px 22px -10px rgba(16, 51, 38, .7); transition: transform .2s, background-color .2s; }
@supports (corner-shape: squircle) {
 .m-play { corner-shape: round; } }
.m-play:hover { transform: scale(1.06); }
.m-play.attivo { background: #f47b38; color: #fff; }
.m-anno { font-family: 'Fraunces', serif; font-size: 34px; line-height: 1; color: #103326; font-variant-numeric: tabular-nums; min-width: 4.6ch; }
.m-anno small { display: block; font-family: 'Inter', sans-serif; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #5f6b63; font-weight: 600; margin-top: 3px; }
.m-tempo-barra { position: relative; }
.m-isto { display: flex; align-items: flex-end; gap: 1px; height: 38px; margin: 0 9px; }
.m-isto span { flex: 1; min-width: 1px; border-radius: 2px 2px 0 0; background: rgba(29, 92, 69, .22); transition: height .35s cubic-bezier(.16, 1, .3, 1), background-color .2s; }
.m-isto span.dentro { background: #1d5c45; }
.m-range { position: relative; height: 24px; margin-top: -2px; }
.m-range .traccia { position: absolute; left: 9px; right: 9px; top: 50%; height: 4px; margin-top: -2px; border-radius: 999px; background: rgba(16, 51, 38, .14); }
.m-range .riemp { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #1d5c45; }
.m-range input { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; }
.m-range input::-webkit-slider-runnable-track { background: transparent; height: 24px; }
.m-range input::-moz-range-track { background: transparent; }
.m-range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: #fff; border: 3px solid #1d5c45; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); cursor: grab; }
@supports (corner-shape: squircle) {
 .m-range input::-webkit-slider-thumb { corner-shape: round; } }
.m-range input::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #1d5c45; cursor: grab; }
@supports (corner-shape: squircle) {
 .m-range input::-moz-range-thumb { corner-shape: round; } }
.m-estremi { display: flex; justify-content: space-between; font-size: 10.5px; color: #5f6b63; margin: 0 4px; font-variant-numeric: tabular-nums; }

/* ---------- Scheda di dettaglio (destra) ---------- */
.m-scheda { position: absolute; z-index: 650; top: 16px; right: 16px; bottom: 16px; width: 380px; border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; transform: translateX(calc(100% + 32px)); visibility: hidden; }
@supports (corner-shape: squircle) {
 .m-scheda { border-radius: 46px; } }
.m-scheda.aperta { visibility: visible; }
.m-scheda-testa { position: relative; padding: 20px 22px 18px; background: #103326; color: #f5f3ea; }
.m-scheda-testa .kicker { color: rgba(245, 243, 234, .62); font-size: 10.5px; }
.m-scheda-testa h2 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 28px; line-height: 1.05; letter-spacing: -.015em; margin-top: 10px; padding-right: 30px; }
.m-scheda-testa p { font-size: 12.5px; color: rgba(245, 243, 234, .68); margin-top: 6px; }
.m-chiudi { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(245, 243, 234, .12); color: #f5f3ea; transition: background-color .2s, transform .2s; }
@supports (corner-shape: squircle) {
 .m-chiudi { corner-shape: round; } }
.m-chiudi:hover { background: rgba(245, 243, 234, .22); transform: rotate(90deg); }
.m-scheda-corpo { flex: 1; overflow-y: auto; padding: 20px 22px 24px; }
.m-numeri { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-numero { background: #fffdf6; border: 1px solid rgba(16, 51, 38, .08); border-radius: 16px; padding: 12px 14px; }
.m-numero b { display: block; font-family: 'Fraunces', serif; font-weight: 400; font-size: 26px; line-height: 1; color: #103326; font-variant-numeric: tabular-nums; }
.m-numero span { font-size: 11.5px; color: #5f6b63; }
.m-barre { display: grid; gap: 10px; }
.m-barre .t { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 4px; }
.m-barre .t span:first-child { font-weight: 600; color: #17261f; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.m-barre .t span:last-child { color: #5f6b63; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-barre .b { height: 7px; border-radius: 999px; background: rgba(16, 51, 38, .07); overflow: hidden; }
.m-barre .b i { display: block; height: 100%; border-radius: 999px; transform-origin: left; }
.m-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.m-chips span { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #f5f3ea; color: #1d5c45; border: 1px solid rgba(16, 51, 38, .08); }
.m-righe { border-top: 1px solid rgba(16, 51, 38, .08); }
.m-righe div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(16, 51, 38, .08); font-size: 13px; }
.m-righe dt { color: #5f6b63; }
.m-righe dd { margin: 0; font-weight: 600; text-align: right; }
.m-vai { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; padding: 13px 16px; border-radius: 16px; background: #103326; color: #f5f3ea; font-size: 13.5px; font-weight: 600; transition: background-color .2s; }
.m-vai:hover { background: #1d5c45; }
.m-vai i { color: #9fd843; }
.m-coord { font-size: 11px; color: #5f6b63; margin-top: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Comandi della mappa (destra) ---------- */
.m-comandi { position: absolute; z-index: 560; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 20px; }
@supports (corner-shape: squircle) {
 .m-comandi { border-radius: 35px; } }
.m-comandi button { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #103326; font-size: 14px; transition: background-color .2s, color .2s; position: relative; }
.m-comandi button:hover { background: rgba(16, 51, 38, .07); }
.m-comandi button.attivo { background: #103326; color: #9fd843; }
.m-comandi hr { border: 0; height: 1px; background: rgba(16, 51, 38, .1); margin: 2px 6px; }
.m-comandi button[data-tip]:hover::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: #103326; color: #f5f3ea; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 9px; pointer-events: none; }
.con-scheda .m-comandi { right: 412px; }
.con-scheda .m-tempo { right: 412px; }
.m-tempo, .m-comandi { transition: right .45s cubic-bezier(.16, 1, .3, 1); }

/* Indicatore di caricamento */
.m-carica { position: absolute; z-index: 700; left: 50%; top: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #103326; opacity: 0; pointer-events: none; transition: opacity .25s; }
.m-carica.vis { opacity: 1; }
.m-carica i { color: #1d5c45; }

/* Indicazioni sulla mappa */
.m-tip { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: #17261f; border: 0; border-radius: 10px; padding: 6px 10px; box-shadow: 0 10px 24px -12px rgba(16, 51, 38, .5); }
.m-tip small { display: block; font-weight: 500; color: #5f6b63; }
.m-segno { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; border: 2.5px solid #fff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .55); transition: transform .2s; }
@supports (corner-shape: squircle) {
 .m-segno { corner-shape: round; } }
.m-segno:hover { transform: scale(1.15); }
.m-segno.piccolo { width: 20px; height: 20px; font-size: 9px; border-width: 2px; }
.m-segno.quadro { border-radius: 8px; }
.m-spark { width: 100%; height: 70px; display: block; margin-top: 6px; }
.m-spark-mesi { display: flex; justify-content: space-between; font-size: 10.5px; color: #5f6b63; }
.m-segno.scelto { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(159, 216, 67, .55), 0 6px 14px -6px rgba(0, 0, 0, .55); }
.m-io { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); animation: m-pulsa 2s infinite; }
@supports (corner-shape: squircle) {
 .m-io { corner-shape: round; } }
@keyframes m-pulsa { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); } 70% { box-shadow: 0 0 0 18px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }

/* ---------- Telefono e tablet: pannello e scheda diventano fogli dal basso ---------- */
.m-maniglia { display: none; }
@media (max-width: 1023px) and (orientation: portrait), (max-width: 1023px) and (min-height: 521px) {
    .m-pannello { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 62%; border-radius: 24px; transform: translateY(calc(100% - 172px)); transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
    @supports (corner-shape: squircle) {
  .m-pannello { border-radius: 42px; } }
    .m-pannello.esteso { transform: none; }
    .m-maniglia { display: block; width: 100%; padding: 10px 0 2px; }
    .m-maniglia span { display: block; width: 42px; height: 5px; border-radius: 999px; background: rgba(16, 51, 38, .2); margin: 0 auto; }
    .m-testa { padding: 6px 18px 10px; }
    .m-titolo { margin-top: 6px; }
    .m-titolo h1 { font-size: 24px; }
    .m-cerca { margin-top: 10px; }
    .m-cerca kbd { display: none; }
    .m-tab { margin: 0 18px; }
    .m-corpo { padding: 16px 18px 18px; }
    /* livelli attivi anche su telefono, in fondo al foglio: una riga che scorre di lato, si spengono con la × o con "Disattiva tutti" */
    .m-piede { padding: 10px 18px 12px; background: rgba(255, 253, 246, .6); }
    .m-piede .m-etichetta { margin-bottom: 6px; }
    .m-attivi { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .m-attivi::-webkit-scrollbar { display: none; }
    .m-attivo { flex-shrink: 0; padding: 7px 10px 7px 12px; font-size: 12px; }
    .m-attivo i.fa-xmark { font-size: 12px; padding-left: 2px; }
    .m-spegni-tutti { flex-basis: auto; flex-shrink: 0; margin-top: 0; padding: 7px 12px; }
    .m-tempo { left: 8px; right: 8px; bottom: calc(172px + 16px); padding: 10px 12px 8px 10px; gap: 10px; grid-template-columns: auto minmax(0, 1fr); }
    .m-tempo .m-anno { display: none; }
    .m-pannello.esteso ~ .m-tempo { opacity: 0; pointer-events: none; }
    .m-play { width: 42px; height: 42px; }
    .m-scheda { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 72%; transform: translateY(calc(100% + 24px)); z-index: 680; }
    .m-comandi { top: 12px; right: 12px; transform: none; flex-direction: column; padding: 4px; border-radius: 16px; }
    #c-piu, #c-meno { display: none; } /* su telefono si zooma con due dita */
    .m-comandi button { width: 38px; height: 38px; }
    .m-comandi hr { display: none; }
    .m-comandi button[data-tip]:hover::after { display: none; }
    .con-scheda .m-comandi { right: 12px; }
    .con-scheda .m-tempo { right: 8px; opacity: 0; pointer-events: none; }
}

/* ---------- Scheda "Fresco" ---------- */
.m-vicino { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-vicino.m-vicino-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-vicino button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: #fffdf6; border: 1px solid rgba(16, 51, 38, .09); font-size: 12px; font-weight: 600; color: #17261f; transition: border-color .2s, transform .15s, background-color .2s; }
.m-vicino button i { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 14px; }
.m-vicino button:hover { border-color: var(--c); }
.m-vicino button:active { transform: scale(.96); }
.m-vicino-nota { font-size: 11.5px; color: #5f6b63; margin-top: 8px; }
.m-vicino-nota.avviso { color: #b8573a; font-weight: 600; }
.m-collega { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: rgba(8, 145, 178, .08); border: 1px solid rgba(8, 145, 178, .25); text-align: left; font-size: 12px; color: #5f6b63; transition: background-color .2s; }
.m-collega:hover { background: rgba(8, 145, 178, .14); }
.m-collega > i:first-child { color: #0891b2; font-size: 15px; }
.m-collega span { flex: 1; }
.m-collega b { display: block; font-size: 13px; color: #17261f; }
.m-collega > i:last-child { color: #0891b2; }
.m-segno-fresco { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; border: 2px solid #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); transition: transform .2s; }
@supports (corner-shape: squircle) {
 .m-segno-fresco { corner-shape: round; } }
.m-segno-fresco:hover { transform: scale(1.18); }
.m-segno-fresco .n { position: absolute; top: -6px; right: -7px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: #103326; color: #fff; font: 700 9px/14px Inter, sans-serif; text-align: center; }
.m-segno-fresco { position: relative; }
.m-scuole { display: grid; gap: 8px; }
.m-scuole > div { padding: 10px 12px; border-radius: 14px; background: #fffdf6; border: 1px solid rgba(16, 51, 38, .09); }
.m-scuole b { display: block; font-size: 14px; color: #17261f; }
.m-scuole span { display: block; font-size: 12px; color: #5f6b63; margin-top: 2px; }
.m-scuole a { color: #1d5c45; font-weight: 600; }
.m-segno-fresco.scelto { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(8, 145, 178, .35), 0 4px 10px -4px rgba(0, 0, 0, .5); }
.m-coord-link { color: #1d5c45; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.m-coord-link:hover { color: #103326; }
.m-spegni-tutti { flex-basis: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 4px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(200, 69, 44, .35); color: #c8452c; font-size: 12px; font-weight: 600; transition: background-color .2s, color .2s; }
.m-spegni-tutti:hover { background: #c8452c; color: #fff; }

/* ---------- Livelli dal registro (servizi, mobilità, città, stazioni) ---------- */
.m-liv + .m-liv { margin-top: 8px; }
.m-liv-info { margin: 6px 2px 2px; padding: 10px 12px; border-radius: 12px; background: rgba(16, 51, 38, .04); font-size: 11.5px; line-height: 1.45; color: #5f6b63; }
.m-liv-info[hidden] { display: none; }
.m-fonte-riga { margin: 0; }
.m-fonte-riga b { font-weight: 600; color: #17261f; }
.m-fonte-riga a { color: #1d5c45; text-decoration: underline; text-underline-offset: 2px; }
.m-fonte-metodo { margin: 6px 0 0; }
.m-liv-zoom { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-weight: 600; color: #b45309; }
.m-liv-zoom[hidden] { display: none; }
.m-liv-legenda { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 8px; }
.m-liv-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.m-liv-legenda i.c { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.m-liv-legenda i.l { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.m-liv-testo { margin: 0; font-size: 13px; line-height: 1.55; color: #3c4a42; }
.m-liv-fonte { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(16, 51, 38, .04); font-size: 11.5px; line-height: 1.45; color: #5f6b63; }
.m-volte { font-weight: 500; color: #5f6b63; font-size: 12px; }
.m-grappolo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent), 0 4px 10px -4px rgba(0, 0, 0, .4); }
@supports (corner-shape: squircle) {
 .m-grappolo { corner-shape: round; } }
/* Voto per area: modalità, scelta, classifica delle circoscrizioni */
.m-voto { display: grid; gap: 10px; margin: 0 0 12px; }
.m-voto-modi { display: grid; grid-template-columns: auto 1fr auto; padding: 3px; border-radius: 999px; background: rgba(74, 44, 63, .08); }
.m-voto-modi button { padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #4a2c3f; white-space: nowrap; transition: background-color .2s, color .2s; }
.m-voto-modi button[aria-pressed="true"] { background: #4a2c3f; color: #fffdf6; }
.m-voto-cand { display: flex; flex-wrap: wrap; gap: 5px; }
.m-voto-cand button { padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(74, 44, 63, .22); background: #fffdf6; font-size: 12px; color: #17261f; transition: border-color .2s, background-color .2s; }
.m-voto-cand button:hover { border-color: #4a2c3f; }
.m-voto-cand button[aria-pressed="true"] { border-color: #4a2c3f; background: #4a2c3f; color: #fffdf6; }
.m-voto-lista select { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(74, 44, 63, .25); background: #fffdf6; font-size: 12px; color: #17261f; }
.m-voto-lista .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.m-voto-titolo { margin: 2px 0 -4px; font-weight: 700; font-size: 12.5px; color: #17261f; }
.m-voto-titolo span { display: block; font-weight: 400; font-size: 11px; color: #5f6b63; }
.m-voto-aree { list-style: none; margin: 0; padding: 0; display: grid; }
.m-voto-aree button { width: 100%; display: grid; grid-template-columns: 12px 92px 1fr 42px; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 6px; text-align: left; color: #17261f; font-size: 12px; }
.m-voto-aree button:hover { background: rgba(74, 44, 63, .07); }
.m-voto-aree .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(74, 44, 63, .2); }
.m-voto-aree .b { height: 6px; border-radius: 3px; background: rgba(74, 44, 63, .1); overflow: hidden; }
.m-voto-aree .b i { display: block; height: 100%; width: var(--w); background: #4a2c3f; border-radius: 3px; transition: width .35s cubic-bezier(.3, .7, .2, 1); }
.m-voto-aree .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.m-voto .m-liv-legenda { margin: 0; }
@media (prefers-reduced-motion: reduce) { .m-voto-aree .b i { transition: none; } }
.m-liv-scala { align-items: center; }
.m-liv-scala i.g { width: 110px; height: 9px; border-radius: 3px; display: inline-block; }
