/* Perfetti sconosciuti · Mappa viva
   La mappa è scura (Jet Black), i pannelli sono bianchi con grigi freddi. Fucsia solo per rischio e attenzione. */

:root {
  --jet: #0e2e3e; --notte: #081d28; --imperial: #1d2f7a; --sky: #8eb7ce; --sky-chiaro: #d6e5ee;
  --fux: #f4364c; --fux-scuro: #c81d33; --fux-velo: #fde6e9; --peach: #f7cdb6; --peach-velo: #fdf1ea; --peach-scuro: #8a4b30; --mint: #f9fffb;
  --carta: #ffffff; --nebbia: #f3f6f9; --brina: #e5ebf1; --filo: #d0d9e2;
  --ink: #0e2e3e; --ink-2: #3b5262; --ardesia: #56687a;
  --l1: #e1ecf3; --l2: #aac9dc; --l3: #6f9fc2; --l4: #3b64a3; --l5: #1d2f7a;
  --vetro: rgba(8, 29, 40, .8); --vetro-filo: rgba(142, 183, 206, .22);
  --font: "Geist", "Helvetica Neue", Arial, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ombra: 0 1px 2px rgba(8, 29, 40, .1), 0 12px 32px rgba(8, 29, 40, .28);
  --ombra-forte: 0 2px 6px rgba(8, 29, 40, .2), 0 24px 60px rgba(4, 16, 24, .45);
  --r: 16px;
  --top: 72px; --sx: 104px; --giu: 92px; --frase-h: 150px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: var(--notte); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--sky-chiaro); color: var(--ink); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 500 12px/1 var(--mono); padding: 3px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .55; }
q { quotes: "«" "»"; }

/* ---------- scena */
.scena { position: fixed; inset: 0; }
.tavolo, .mappa { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mappa { touch-action: none; cursor: grab; }
.mappa.trascina { cursor: grabbing; }
.mappa:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(142, 183, 206, .5); }
.sonda { position: absolute; left: 0; top: 0; pointer-events: none; display: grid; gap: 1px; padding: 8px 11px; border-radius: 10px; background: rgba(8, 29, 40, .94); border: 1px solid var(--vetro-filo); color: var(--mint); opacity: 0; transition: opacity .15s; box-shadow: var(--ombra); white-space: nowrap; }
.sonda.su { opacity: 1; }
.sonda b { font-weight: 600; font-size: 13px; }
.sonda span { font-size: 12px; color: var(--sky); }
.sonda em { font-style: normal; font-size: 12px; color: var(--peach); }

/* ---------- testata */
.testa { position: fixed; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 18px; padding: 0 16px 0 20px; color: var(--mint); background: linear-gradient(to bottom, rgba(6, 22, 32, .92), rgba(6, 22, 32, .55) 70%, transparent); z-index: 20; pointer-events: none; }
.testa > * { pointer-events: auto; }
.marchio { display: flex; align-items: center; color: var(--mint); text-decoration: none; }
.marchio img { display: block; width: 128px; height: auto; }
.marchio-neutro { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.marchio-neutro i { width: 14px; height: 14px; border-radius: 50%; background: var(--sky); }
.prodotto { display: flex; align-items: baseline; gap: 8px; padding-left: 18px; border-left: 1px solid rgba(142, 183, 206, .3); white-space: nowrap; }
.prodotto b { font-weight: 600; font-size: 15px; }
.prodotto span { color: var(--sky); font-size: 13px; }
.simulata { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid rgba(247, 205, 182, .45); white-space: nowrap; overflow: hidden; }
.simulata b { background: var(--peach); color: var(--jet); font-size: 12px; font-weight: 600; padding: 4px 10px; }
.simulata span { font-size: 12px; padding: 4px 10px; color: rgba(249, 255, 251, .85); }
.testa-dx { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn-scuro { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--mint); border: 1px solid var(--vetro-filo); background: rgba(8, 29, 40, .55); font-size: 13px; font-weight: 500; transition: background .2s, border-color .2s; }
.btn-scuro:hover { background: rgba(29, 47, 122, .55); border-color: rgba(142, 183, 206, .5); }
.btn-scuro.tondo { width: 38px; padding: 0; justify-content: center; }
.chiedi { display: inline-flex; align-items: center; gap: 10px; height: 40px; width: 340px; padding: 0 10px 0 14px; border-radius: 12px; background: var(--carta); color: var(--ink-2); box-shadow: 0 6px 20px rgba(4, 16, 24, .35); font-size: 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.chiedi:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(4, 16, 24, .45); }
.chiedi .lbl { flex: 1; text-align: left; }
.chiedi kbd { color: var(--ardesia); }

/* ---------- frase-risultato */
.frase { position: fixed; top: var(--top); left: var(--sx); width: clamp(460px, 48vw, 740px); z-index: 15; background: var(--carta); border-radius: var(--r); box-shadow: var(--ombra); padding: 14px 18px 14px; display: grid; gap: 8px; }
.frase.risposta { box-shadow: 0 0 0 2px var(--imperial), var(--ombra); }
.fr-riga { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lente-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--brina); color: var(--ink); }
.lente-chip small { font-size: 12px; font-weight: 400; color: var(--ardesia); }
.lente-chip .ico { width: 14px; height: 14px; }
.lc-comp { background: var(--sky-chiaro); }
.lc-perc { background: var(--peach-velo); color: var(--peach-scuro); }
.lc-risc { background: var(--fux-velo); color: var(--fux-scuro); }
.lc-tal { background: #e6eefb; color: var(--imperial); }
.lc-tempo { background: var(--jet); color: var(--mint); }
.lc-risposta { background: var(--imperial); color: #fff; }
.lc-funz { cursor: pointer; background: var(--nebbia); border: 1px solid var(--filo); }
.fr-chiudi { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 8px; font-size: 12px; color: var(--ink-2); }
.fr-chiudi:hover { background: var(--nebbia); }
.fr-chiudi .ico { width: 15px; height: 15px; }
.fr-chiudi kbd { color: var(--ardesia); }
.fr-domanda { font-size: 13px; font-weight: 600; color: var(--imperial); }
.fr-testa { display: flex; align-items: flex-start; gap: 10px; }
.fr-testa .fr-titolo { flex: 1; }
.fr-testa .fr-chiudi { margin: -4px -8px 0 0; width: 32px; height: 32px; padding: 0; justify-content: center; flex: none; }
.fr-leggi b { font-weight: 600; color: var(--ink-2); }
.fr-funz { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--imperial); text-decoration: underline; text-underline-offset: 3px; }
.fr-funz .ico { width: 13px; height: 13px; }
.fr-apri { display: none; justify-self: start; font-size: 13px; font-weight: 500; color: var(--imperial); text-decoration: underline; text-underline-offset: 3px; }
.tempo-out small { display: block; font-size: 12px; font-weight: 400; color: var(--peach); }
.fr-titolo { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-wrap: pretty; }
.fr-piede { display: grid; gap: 8px; }
.fr-leggi { font-size: 13px; color: var(--ardesia); line-height: 1.45; }
.legenda { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.legenda li { display: inline-flex; align-items: center; gap: 7px; }
.legenda i { position: relative; width: 22px; height: 16px; border-radius: 5px; background: var(--jet); flex: none; }
.legenda i::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.lg-punto::after { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lg-anello::after { width: 7px; height: 7px; border-radius: 50%; background: #b9c7d3; box-shadow: 0 0 0 1.5px var(--jet), 0 0 0 3px var(--c); }
.lg-linea::after { width: 14px; height: 2px; border-radius: 2px; background: var(--c); }
.lg-tratto::after { width: 14px; height: 0; border-top: 2px dashed var(--c); }
.lg-pulsa::after { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--jet), 0 0 0 3.5px var(--c); }
.fr-comp { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.fr-comp select, .ca-corpo select { height: 34px; border-radius: 9px; border: 1px solid var(--filo); background: var(--nebbia); padding: 0 10px; font-size: 14px; color: var(--ink); min-width: 0; flex: 1; max-width: 360px; }

/* ---------- rail degli strumenti */
.rail { position: fixed; left: 14px; top: var(--top); width: 78px; z-index: 15; display: grid; gap: 2px; padding: 6px; border-radius: var(--r); background: var(--vetro); border: 1px solid var(--vetro-filo); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rail button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 11px; color: rgba(249, 255, 251, .86); font-size: 12px; line-height: 1.15; text-align: center; transition: background .2s, color .2s; }
.rail button:hover { background: rgba(142, 183, 206, .14); color: var(--mint); }
.rail button[aria-pressed="true"] { background: var(--carta); color: var(--ink); }
.rail .ico { width: 20px; height: 20px; }

/* ---------- dock: lenti, tempo, navigazione */
.dock { position: fixed; left: var(--sx); right: 16px; bottom: 16px; z-index: 16; display: grid; gap: 10px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.lenti { justify-self: start; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 15px; background: var(--vetro); border: 1px solid var(--vetro-filo); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--mint); }
.lenti button { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; white-space: nowrap; color: rgba(249, 255, 251, .88); transition: background .2s, color .2s; }
.lenti button:hover { background: rgba(142, 183, 206, .14); color: var(--mint); }
.lenti kbd { font-size: 12px; padding: 2px 4px; opacity: .45; }
.seg-lay { position: relative; display: flex; padding: 3px; border-radius: 12px; background: rgba(4, 16, 24, .55); }
.seg-lay button { position: relative; z-index: 1; height: 36px; }
.seg-lay button[aria-pressed="true"] { color: var(--ink); }
.seg-lay .pollice { position: absolute; top: 3px; left: 0; height: 36px; width: 0; border-radius: 9px; background: var(--carta); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.seg-lenti { display: flex; gap: 2px; padding-left: 8px; border-left: 1px solid var(--vetro-filo); }
.seg-lenti button[aria-pressed="true"], .btn-tempo[aria-pressed="true"] { background: var(--carta); color: var(--ink); }
.lp { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.lp-comp { background: linear-gradient(135deg, #3f5a69, var(--mint)); }
.lp-perc { background: linear-gradient(90deg, #6f9bff 50%, var(--peach) 50%); }
.lp-risc { background: var(--fux); box-shadow: 0 0 0 2px rgba(244, 54, 76, .35); }
.lp-tal { background: var(--mint); box-shadow: 0 0 0 2px var(--sky); }
.btn-tempo { border-left: 1px solid var(--vetro-filo); border-radius: 0 10px 10px 0 !important; }
.btn-tempo[aria-pressed="true"] { border-radius: 10px !important; }
.btn-strumenti { display: none !important; }

.tempo { justify-self: start; width: min(820px, 100%); display: none; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 10px 16px 8px 10px; border-radius: 15px; background: var(--vetro); border: 1px solid var(--vetro-filo); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--mint); }
.con-tempo .tempo { display: grid; }
.btn-play { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--carta); color: var(--ink); transition: transform .2s var(--ease); }
.btn-play:hover { transform: scale(1.06); }
.btn-play .ico { fill: currentColor; stroke-width: 1.4; }
.pista { position: relative; padding: 24px 0 18px; }
.pista input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; --p: 0%; cursor: pointer; }
.pista input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--fux) 0, var(--fux) var(--p), rgba(142, 183, 206, .3) var(--p)); }
.pista input::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(142, 183, 206, .3); }
.pista input::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--fux); }
.pista input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--mint); border: 3px solid var(--fux); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.pista input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--mint); border: 3px solid var(--fux); }
.segni, .anni { position: absolute; left: 10px; right: 10px; height: 0; }
.segni { top: 4px; }
.anni { bottom: 14px; }
.segno { position: absolute; transform: translateX(-50%); display: grid; justify-items: center; color: var(--peach); font-size: 12px; font-weight: 500; line-height: 1; }
.segno::after { content: ""; width: 1.5px; height: 9px; margin-top: 3px; background: rgba(247, 205, 182, .6); }
.segno:hover { color: var(--mint); }
.segno.oggi { transform: none; color: var(--sky); justify-items: start; }
.segno.oggi::after { background: rgba(142, 183, 206, .6); }
.anno { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--sky); white-space: nowrap; }
.anno.oggi { transform: none; }
.tempo-out { min-width: 128px; text-align: right; font-weight: 600; font-size: 15px; color: var(--mint); }

.nav-mappa { position: fixed; right: 16px; bottom: 16px; z-index: 16; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 15px; background: var(--vetro); border: 1px solid var(--vetro-filo); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--mint); }
.btn-chiaro { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--mint); white-space: nowrap; transition: background .2s; }
.btn-chiaro:hover { background: rgba(142, 183, 206, .14); }
.livello { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(4, 16, 24, .55); font-size: 12px; }
.livello span { padding: 5px 8px; border-radius: 7px; color: rgba(249, 255, 251, .6); transition: background .25s, color .25s; }
.livello span.on { background: rgba(142, 183, 206, .22); color: var(--mint); }
.zoom { display: flex; gap: 2px; }
.zoom button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--mint); }
.zoom button:hover { background: rgba(142, 183, 206, .14); }

/* ---------- pannelli chiari: scheda e cassetto */
.scheda, .cassetto { position: fixed; z-index: 18; top: var(--top); bottom: var(--giu); display: flex; flex-direction: column; background: var(--carta); border-radius: var(--r); box-shadow: var(--ombra-forte); visibility: hidden; opacity: 0; }
.scheda { right: 16px; width: 448px; }
.cassetto { left: var(--sx); top: calc(var(--top) + var(--frase-h) + 12px); width: 600px; }
.cassetto.v-matrice { width: min(880px, calc(100vw - var(--sx) - 32px)); }
.con-scheda .cassetto { width: min(600px, calc(100vw - var(--sx) - 496px)); }
.scheda-in, .cassetto-in { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.sc-testa { position: relative; padding: 18px 20px 12px; display: grid; gap: 12px; border-bottom: 1px solid var(--brina); }
.sc-chiudi { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-2); }
.sc-chiudi:hover { background: var(--nebbia); color: var(--ink); }
.sc-id { display: flex; gap: 14px; align-items: flex-start; padding-right: 36px; }
.sc-id h2 { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.sotto { color: var(--ardesia); font-size: 13px; }
.meta { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--jet); color: var(--c, var(--mint)); font-size: 12px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 1.5px var(--c, var(--sky)); }
.av.grande { width: 48px; height: 48px; font-size: 16px; }
.av.ruolo { color: var(--sky); }
.av.ruolo .ico { width: 22px; height: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 3px; border-radius: 999px; background: var(--nebbia); border: 1px solid var(--brina); font-size: 13px; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--sky-chiaro); border-color: var(--sky); }
.segnali { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sg { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--nebbia); color: var(--ink-2); }
.sg.rischio { background: var(--fux-velo); color: var(--fux-scuro); }
.sg.pesca { background: var(--peach-velo); color: var(--peach-scuro); }
.sg.ponte, .sg.blu { background: var(--sky-chiaro); color: var(--imperial); }
.sc-azioni { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--filo); background: var(--carta); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, transform .2s var(--ease); }
.btn:hover { background: var(--nebbia); border-color: var(--sky); }
.btn:active { transform: scale(.98); }
.btn.pieno { background: var(--jet); border-color: var(--jet); color: var(--mint); }
.btn.pieno:hover { background: var(--imperial); }
.btn.picc { height: 28px; padding: 0 9px; font-size: 12px; }
.btn.tondo { width: 36px; padding: 0; justify-content: center; }
.btn .ico { width: 16px; height: 16px; }
.sc-tabs { display: flex; gap: 2px; padding: 8px 14px 0; border-bottom: 1px solid var(--brina); overflow-x: auto; scrollbar-width: none; }
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tabs button { position: relative; height: 36px; padding: 0 9px; font-size: 13px; font-weight: 500; color: var(--ardesia); white-space: nowrap; }
.sc-tabs button:hover { color: var(--ink); }
.sc-tabs button[aria-selected="true"] { color: var(--ink); }
.sc-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.sc-corpo, .ca-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 22px; display: grid; align-content: start; gap: 12px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--filo) transparent; }
.sc-corpo::-webkit-scrollbar, .ca-corpo::-webkit-scrollbar { width: 8px; height: 8px; }
.sc-corpo::-webkit-scrollbar-thumb, .ca-corpo::-webkit-scrollbar-thumb { background: var(--filo); border-radius: 8px; }
.sc-corpo h3, .ca-corpo h3 { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.sc-corpo h3 small, .ca-corpo h3 small { font-weight: 400; font-size: 12px; color: var(--ardesia); }
.sc-corpo h3 .btn { margin-left: auto; }
.testo { font-size: 14px; color: var(--ink-2); }
.testo.grande { font-size: 15px; color: var(--ink); }
.nota { font-size: 12px; color: var(--ardesia); }
.etich { display: inline-block; font-style: normal; font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--nebbia); color: var(--ardesia); vertical-align: 1px; }
.etich.pesca { background: var(--peach-velo); color: var(--peach-scuro); }
.etich.fux { background: var(--fux-velo); color: var(--fux-scuro); }
.scarto { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); }
.scarto b { font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.scarto p { font-size: 13px; color: var(--ink-2); }
.scarto.alto { background: var(--peach-velo); }
.scarto.alto b { color: var(--peach-scuro); }
.compiti { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.compiti li { display: grid; grid-template-columns: 1fr 80px 38px 62px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--brina); font-size: 13px; }
.compiti .t { color: var(--ink); }
.compiti .p { text-align: right; font-weight: 600; font-family: var(--mono); font-size: 12px; }
.compiti .jd { text-align: right; font-size: 12px; color: var(--ardesia); }
.compiti li.via .t { color: var(--ardesia); text-decoration: line-through; text-decoration-color: var(--filo); }
.barra-t { height: 6px; border-radius: 6px; background: var(--brina); overflow: hidden; }
.barra-t i { display: block; height: 100%; background: var(--l3); transform-origin: 0 50%; }
.barra-t.nuovo i { background: #e9a487; }
.cit { display: block; font-size: 14px; line-height: 1.5; color: var(--ink); }
.cit-blocco { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); }
.cit-blocco figcaption, .fonte { margin-top: 6px; font-size: 12px; color: var(--ardesia); }
.citazioni { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.citazioni li { padding: 12px 14px; border-radius: 12px; background: var(--nebbia); }
.leg3 { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.leg3 span { display: inline-flex; align-items: center; gap: 6px; }
.leg3 i, .traccia i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.m-auto { border: 2px solid var(--l3); background: var(--carta); }
.m-resp { background: var(--peach); border: 2px solid #e9a487; border-radius: 3px !important; }
.m-ass { background: var(--jet); }
.leg3 .req, .traccia .req { width: 2px !important; height: 14px !important; border-radius: 1px !important; background: var(--fux); }
.comp-l { list-style: none; margin: 0; padding: 0; display: grid; }
.comp-l li { display: grid; grid-template-columns: 140px 1fr 32px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--brina); }
.comp-l .nm { text-align: left; font-size: 13px; font-weight: 500; color: var(--ink); }
.comp-l .nm:hover { color: var(--imperial); text-decoration: underline; text-underline-offset: 3px; }
.comp-l .v { text-align: right; font: 600 12px var(--mono); }
.comp-l .parole { grid-column: 2 / 4; font-size: 12px; color: var(--ardesia); }
.parole b { font-weight: 600; }
.neg { color: var(--fux-scuro); }
.pos { color: var(--peach-scuro); }
.traccia { position: relative; height: 16px; margin: 0 6px; background: linear-gradient(var(--brina), var(--brina)) center / 100% 2px no-repeat; }
.traccia i { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.flussi { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.flussi li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.flussi .w { font: 500 12px var(--mono); color: var(--ink-2); }
.verdetto { padding: 12px 14px; border-radius: 12px; background: var(--sky-chiaro); font-size: 14px; color: var(--ink); }
.piano { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.piano li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: var(--nebbia); font-size: 14px; }
.piano .v { font: 600 12px var(--mono); }
.piano small { grid-column: 1 / 3; font-size: 13px; color: var(--ink-2); }
.domande { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink); }
.domande li::marker { font-weight: 600; color: var(--ardesia); }
.punti { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.req { list-style: none; margin: 0; padding: 0; display: grid; }
.req li { display: grid; grid-template-columns: 1fr auto 36px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--brina); font-size: 13px; }
.req .v { text-align: right; font: 600 12px var(--mono); }
.pallini { display: inline-flex; gap: 3px; }
.pallini i { width: 8px; height: 8px; border-radius: 50%; background: var(--brina); }
.pallini i.on { background: var(--jet); }

/* ---------- cassetto */
.ca-testa { position: relative; padding: 18px 20px 10px; }
.ca-tit { padding-right: 40px; display: grid; gap: 4px; }
.ca-tit h2 { font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.ca-voci { display: none; gap: 4px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
.ca-voci button { height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13px; background: var(--nebbia); white-space: nowrap; }
.ca-voci button[aria-current="true"] { background: var(--jet); color: var(--mint); }
.ca-filtri { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 20px 10px; border-bottom: 1px solid var(--brina); }
.ca-filtri button { height: 30px; padding: 0 11px; border-radius: 999px; font-size: 13px; border: 1px solid var(--filo); color: var(--ink-2); }
.ca-filtri button:hover { border-color: var(--sky); }
.ca-filtri button[aria-pressed="true"] { background: var(--jet); border-color: var(--jet); color: var(--mint); }
.scoperte { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scop { width: 100%; text-align: left; display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); border: 1px solid transparent; transition: border-color .2s, background .2s, transform .25s var(--ease); }
.scop:hover { border-color: var(--sky); background: var(--carta); transform: translateX(3px); }
.scop .tipo { font-size: 12px; font-weight: 600; color: var(--imperial); }
.scop .tipo.forte { color: var(--fux-scuro); }
.scop b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.scop .testo { font-size: 13px; }
.scop .cit { font-size: 13px; color: var(--ink-2); }
.az-brevi { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.az-brevi li { display: grid; gap: 1px; font-size: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--brina); }
.az-brevi span { font-size: 12px; color: var(--ardesia); }
.numeri { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.numeri div { padding: 10px 12px; border-radius: 12px; background: var(--nebbia); }
.numeri dt { font-size: 12px; color: var(--ardesia); }
.numeri dd { margin: 0; font-size: 18px; font-weight: 600; }
.numeri dd.nota { font-size: 12px; font-weight: 400; }
.azioni { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.az { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--nebbia); }
.az.fatta { opacity: .6; }
.az.fatta b { text-decoration: line-through; text-decoration-color: var(--ardesia); }
.spunta { width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--filo); background: var(--carta); display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.spunta .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.spunta[aria-checked="true"] { background: var(--jet); border-color: var(--jet); color: var(--mint); }
.az-corpo { text-align: left; display: grid; gap: 3px; }
.az-corpo b { font-size: 14px; font-weight: 600; }
.az-corpo .dett { font-size: 13px; color: var(--ink-2); }
.az-corpo .meta { margin: 2px 0 0; font-size: 12px; color: var(--ardesia); gap: 4px 10px; }
.imp { font-weight: 600; color: var(--ink-2); }
.imp.l5 { color: var(--fux-scuro); }
.az-corpo:hover b { color: var(--imperial); }
.procedure { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pr { width: 100%; text-align: left; display: grid; gap: 5px; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); border: 1px solid transparent; transition: border-color .2s; }
.pr:hover { border-color: var(--sky); }
.pr .r { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pr .r.alto { color: var(--fux-scuro); }
.pr .r.max { color: #fff; background: var(--fux); justify-self: start; padding: 1px 8px; border-radius: 999px; }
.pr b { font-size: 15px; }
.pr .meta { margin: 0; font-size: 12px; color: var(--ardesia); }
.pr .meta.az { color: var(--imperial); }
.matr-box { padding: 0 0 10px; display: block; overflow: auto; }
.matrice { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.matrice th.nome { position: sticky; left: 0; z-index: 2; background: var(--carta); text-align: left; padding: 0 8px 0 16px; font-weight: 500; white-space: nowrap; }
.matrice thead th { position: sticky; top: 0; z-index: 3; background: var(--carta); vertical-align: bottom; height: 128px; padding: 0 0 6px; }
.matrice thead th.nome { z-index: 4; }
.matrice thead button { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 2px; white-space: nowrap; }
.matrice thead button:hover { color: var(--imperial); }
.matrice th.nome button { font-size: 13px; color: var(--ink); text-align: left; }
.matrice th.nome button:hover { color: var(--imperial); }
.matrice td button { display: grid; place-items: center; width: 34px; height: 26px; padding: 0; line-height: 1; border-radius: 5px; font: 500 12px var(--mono); color: var(--ink); }
.matrice td button.req { box-shadow: inset 0 0 0 1.5px var(--jet); }
.matrice td button:hover { outline: 2px solid var(--imperial); outline-offset: 1px; }
.ruoli { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ru { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.ru:hover { background: var(--nebbia); }
.ru b { font-size: 14px; }
.ru .sotto { grid-column: 1; font-size: 12px; }
.ru .sc { grid-row: 1; grid-column: 2; font: 600 12px var(--mono); color: var(--ink-2); }
.ru .sc.alto { color: var(--peach-scuro); }
.ru .etich { grid-column: 2; justify-self: end; }
.fabb { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fabb li { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); }
.fb-t { display: flex; align-items: baseline; gap: 10px; }
.fb-t .n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.link { font-weight: 600; font-size: 14px; color: var(--ink); text-align: left; }
.link:hover { color: var(--imperial); text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.conf-scelte { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.conf-scelte label { display: flex; border-radius: 10px; padding-left: 10px; }
.conf-scelte label.a { background: var(--l3); }
.conf-scelte label.b { background: #e9a487; }
.conf-scelte select { max-width: none; width: 100%; border-radius: 0 9px 9px 0; }
.pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 2px 0 8px; }
.pt.a { background: var(--l3); }
.pt.b { background: #e9a487; }
.conf-comp { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.conf-comp li { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--brina); font-size: 13px; }
.conf-comp .v { text-align: right; font: 500 12px var(--mono); }
.duo { display: grid; gap: 3px; }
.duo i { display: block; height: 6px; border-radius: 6px; transform-origin: 0 50%; }
.duo i.a { background: var(--l3); }
.duo i.b { background: #e9a487; }
.conf-due { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-compiti { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.mini-compiti li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--brina); padding-bottom: 4px; }
.mini-compiti b { font: 600 12px var(--mono); }
.funz { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.funz button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; text-align: left; font-size: 14px; }
.funz button:hover { background: var(--nebbia); }
.funz button[aria-pressed="true"] { background: var(--jet); color: var(--mint); }
.funz button span { margin-left: auto; font-size: 12px; opacity: .7; }
.punto { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--jet); }

/* ---------- chiedi alla mappa */
.palette, .modale { position: fixed; inset: 0; z-index: 40; display: none; }
.palette[aria-hidden="false"], .modale[aria-hidden="false"] { display: block; }
.pal-velo, .mod-velo { position: absolute; inset: 0; background: rgba(4, 16, 24, .45); }
.pal-box { position: absolute; left: 50%; top: 11vh; width: min(660px, calc(100vw - 24px)); transform: translateX(-50%); background: var(--carta); border-radius: 18px; box-shadow: var(--ombra-forte); overflow: hidden; display: flex; flex-direction: column; max-height: 74vh; }
.pal-campo { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--brina); color: var(--ardesia); }
.pal-campo .ico { width: 20px; height: 20px; }
.pal-campo input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font-size: 16px; color: var(--ink); background: transparent; }
.pal-campo input::placeholder { color: #7d8e9d; }
.pal-lista { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; min-height: 0; }
.pal-g { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ardesia); }
.pal-lista [role="option"] { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.pal-lista [aria-selected="true"] { background: var(--nebbia); box-shadow: inset 2px 0 0 var(--imperial); }
.pal-lista .t { flex: 1; color: var(--ink); }
.pal-lista .s { font-size: 12px; color: var(--ardesia); white-space: nowrap; }
.pal-ico { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--brina); color: var(--ink-2); flex: none; }
.pal-ico .ico { width: 15px; height: 15px; }
.pal-vuoto { padding: 16px 10px; font-size: 14px; color: var(--ardesia); }
.pal-nota { padding: 10px 16px 12px; font-size: 12px; color: var(--ardesia); border-top: 1px solid var(--brina); background: var(--nebbia); }
.mod-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: 86vh; overflow: auto; background: var(--carta); border-radius: 18px; box-shadow: var(--ombra-forte); padding: 20px 22px; display: grid; gap: 14px; }
.mod-box header { position: relative; }
.mod-box h2 { font-size: 19px; font-weight: 600; }
.mod-box .sc-chiudi { top: -6px; right: -8px; }
.tasti { margin: 0; display: grid; gap: 6px; }
.tasti div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.tasti dt { display: flex; gap: 4px; }
.tasti kbd { opacity: .8; color: var(--ink-2); }
.tasti dd { margin: 0; color: var(--ink-2); }
.notifica { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); z-index: 45; padding: 10px 16px; border-radius: 12px; background: var(--carta); color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: var(--ombra-forte); opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }
.notifica.su { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ingresso: il tavolo dei telefoni */
.ingresso { position: fixed; inset: 0; z-index: 50; display: none; grid-template-rows: auto 1fr auto; padding: 40px 48px 32px; color: var(--mint); overflow: hidden; }
.ingresso[aria-hidden="false"] { display: grid; }
.ing-fondo { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 80% 70% at 50% 62%, #123a4e 0%, #0b2533 52%, #05141d 100%); }
.ing-testa { display: grid; gap: 10px; width: min(760px, 100%); }
.ing-testa h1 { font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -.035em; }
.ing-testa p { font-size: 18px; line-height: 1.45; color: rgba(214, 229, 238, .92); }
.ing-tavolo { position: relative; display: flex; justify-content: center; align-items: center; gap: 22px; }
.ing-piano { position: absolute; left: 50%; top: 52%; width: min(1240px, 96vw); height: 74%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, rgba(142, 183, 206, .16), rgba(29, 47, 122, .14) 55%, rgba(8, 29, 40, 0) 72%); box-shadow: inset 0 0 0 1px rgba(142, 183, 206, .1); }
.tel { position: relative; transform: rotate(var(--rot)); transition: transform .45s var(--ease); }
.tel:nth-child(odd) { margin-top: 46px; }
.tel:hover, .tel:focus-visible { transform: rotate(0) translateY(-10px); }
.tel-corpo { display: block; width: 204px; height: 400px; padding: 9px; border-radius: 34px; background: linear-gradient(160deg, #1b2730, #070c10); box-shadow: 0 30px 50px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .09); }
.tel-schermo { position: relative; display: flex; flex-direction: column; height: 100%; padding: 26px 10px 10px; border-radius: 26px; background: #04080b; overflow: hidden; transition: background .5s; }
.tel-schermo::before { content: ""; position: absolute; left: 50%; top: 9px; width: 54px; height: 14px; transform: translateX(-50%); border-radius: 10px; background: #000; }
.tel.acceso .tel-schermo { background: radial-gradient(ellipse at 50% 0%, #2c4596 0%, #142a52 45%, #0b1d2b 100%); box-shadow: 0 0 60px rgba(142, 183, 206, .28); }
.tel.acceso .tel-corpo { box-shadow: 0 30px 50px rgba(0, 0, 0, .5), 0 0 90px rgba(142, 183, 206, .22), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.tel-ora { text-align: center; font-size: 34px; font-weight: 300; letter-spacing: -.02em; color: rgba(249, 255, 251, .0); transition: color .6s; margin-bottom: 12px; }
.tel.acceso .tel-ora { color: rgba(249, 255, 251, .9); }
.notif { display: grid; gap: 4px; padding: 11px 11px 12px; border-radius: 16px; background: rgba(249, 255, 251, .95); color: var(--ink); text-align: left; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.notif-app { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ardesia); }
.notif-app i { width: 16px; height: 16px; border-radius: 5px; background: var(--jet) url("comune/logo/marchio-scuro-sky.svg") center / 11px no-repeat; }
.notif-t.forte { color: var(--fux-scuro); }
.notif-t { font-size: 14px; line-height: 1.3; font-weight: 600; }
.notif-q { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.notif-chi { font-size: 12px; color: var(--ardesia); }
.ing-piede { display: flex; align-items: center; gap: 18px; }
.btn-luce { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 14px; background: var(--carta); color: var(--ink); font-size: 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .25s var(--ease); }
.btn-luce:hover { transform: translateY(-2px); }
.btn-luce kbd { color: var(--ardesia); }
.sugg { font-size: 14px; color: var(--sky); }
.con-ingresso .testa, .con-ingresso .frase, .con-ingresso .rail, .con-ingresso .dock, .con-ingresso .nav-mappa { visibility: hidden; }

/* ---------- stampa della JD */
#stampa { display: none; }
@media print {
  body { background: #fff; overflow: visible; height: auto; }
  .app, .ingresso, .palette, .modale, .notifica { display: none !important; }
  #stampa { display: block; font: 12pt/1.5 Helvetica, Arial, sans-serif; color: #0e2e3e; }
  #stampa h1 { font-size: 22pt; margin: 0 0 4pt; }
  #stampa h2 { font-size: 12pt; margin: 16pt 0 4pt; border-bottom: 1px solid #d0d9e2; padding-bottom: 3pt; }
  #stampa table { width: 100%; border-collapse: collapse; }
  #stampa td { padding: 4pt 0; border-bottom: 1px solid #e5ebf1; }
  #stampa td.p { text-align: right; }
  #stampa .nuovo { color: #8a4b30; font-size: 9pt; }
  #stampa .intest { display: flex; justify-content: space-between; font-size: 9pt; color: #56687a; border-bottom: 2px solid #0e2e3e; padding-bottom: 6pt; margin-bottom: 14pt; }
  #stampa .piede { font-size: 9pt; color: #56687a; margin-top: 20pt; }
}

/* ---------- schermi medi */
@media (max-width: 1360px) {
  .livello { display: none; }
  .lenti kbd { display: none; }
  .chiedi { width: 280px; }
}
@media (max-width: 1180px) {
  .prodotto span, .simulata span, #btnScoperte .lbl { display: none; }
  .frase { width: min(620px, calc(100vw - var(--sx) - 16px)); }
  .btn-chiaro span { display: none; }
  .con-scheda .frase { width: calc(100vw - var(--sx) - 480px); min-width: 320px; }
}

/* ---------- telefono */
@media (max-width: 759px) {
  :root { --top: 58px; --sx: 10px; }
  .testa { height: 54px; gap: 10px; padding: 0 10px 0 12px; }
  .marchio img { width: 104px; }
  .prodotto { display: none; }
  .simulata b { padding: 3px 8px; }
  .chiedi { width: 40px; padding: 0; justify-content: center; }
  .chiedi .lbl, .chiedi kbd, #btnAiuto { display: none; }
  .btn-scuro { height: 40px; width: 40px; padding: 0; justify-content: center; }
  .frase { left: 10px; right: 10px; width: auto; padding: 11px 13px; gap: 6px; border-radius: 14px; }
  .fr-titolo { font-size: 15px; line-height: 1.35; }
  .fr-apri { display: inline-block; }
  .frase:not(.aperta) .fr-piede { display: none; }
  .fr-leggi { font-size: 12px; }
  .fr-chiudi span, .fr-chiudi kbd { display: none; }
  .legenda { gap: 4px 10px; }
  .rail, .nav-mappa .livello, .nav-mappa .zoom { display: none; }
  .dock { left: 0; right: 0; bottom: 0; gap: 0; }
  .lenti { justify-self: stretch; flex-wrap: wrap; gap: 6px; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .lenti button { height: 40px; padding: 0 10px; font-size: 14px; }
  .lenti kbd, .lenti .lp { display: none; }
  .seg-lay { order: 1; }
  .btn-tempo { order: 2; border-left: 0; border-radius: 10px !important; }
  .btn-strumenti { order: 3; display: inline-flex !important; margin-left: auto; }
  .seg-lenti { order: 4; flex-basis: 100%; justify-content: space-between; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--vetro-filo); }
  .seg-lenti button { flex: 1; justify-content: center; padding: 0 6px; }
  .segno span, .segno.oggi { display: none; }
  .tempo-out small { max-width: 110px; }
  .segni { top: 14px; }
  .tempo { justify-self: stretch; width: auto; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 8px 12px 6px 8px; gap: 10px; }
  .tempo-out { min-width: 0; font-size: 13px; }
  .nav-mappa { right: 10px; bottom: auto; top: calc(var(--top) + var(--frase-h) + 8px); padding: 4px; border-radius: 12px; }
  .btn-chiaro { height: 36px; padding: 0 10px; }
  .scheda, .cassetto, .cassetto.v-matrice, .con-scheda .cassetto { inset: 0; top: 0; bottom: 0; left: 0; right: 0; width: auto; border-radius: 0; z-index: 30; }
  .sc-testa { padding: 16px 16px 12px; }
  .sc-corpo, .ca-corpo { padding: 14px 16px 28px; }
  .compiti li { grid-template-columns: 1fr 52px 36px 56px; gap: 8px; }
  .sc-tabs { padding: 6px 8px 0; }
  .sc-tabs button { padding: 0 7px; }
  .matrice td button { width: 28px; height: 24px; font-size: 12px; }
  .matrice thead th { height: 112px; }
  .comp-l li { grid-template-columns: 112px 1fr 30px; }
  .ca-voci { display: flex; }
  .conf-comp li { grid-template-columns: 110px 1fr 64px; }
  .conf-due { grid-template-columns: 1fr; }
  .numeri { grid-template-columns: 1fr; }
  .notifica { bottom: 120px; }
  .pal-box { top: 8px; max-height: calc(100vh - 16px); }
  .ingresso { padding: 22px 16px 18px; gap: 14px; overflow-y: auto; }
  .ing-testa h1 { font-size: 36px; }
  .ing-testa p { font-size: 15px; }
  .ingresso { overflow: hidden; }
  .ing-tavolo { justify-content: flex-start; align-items: center; gap: 14px; margin: 0 -16px; padding: 10px 16px 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .ing-tavolo::-webkit-scrollbar { display: none; }
  .ing-piano { display: none; }
  .tel { flex: none; scroll-snap-align: center; transform: rotate(calc(var(--rot) * .4)); }
  .tel:nth-child(odd) { margin-top: 0; }
  .tel-corpo { width: 228px; height: min(430px, 56vh); }
  .tel-ora { font-size: 28px; margin-bottom: 8px; }
  .ing-piede { flex-direction: column; align-items: stretch; gap: 8px; }
  .btn-luce { justify-content: center; }
  .sugg { text-align: center; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- ritorno alla dashboard dei dati (mappa.html) */
a.btn-scuro { text-decoration: none; }
.torna { border-color: rgba(142, 183, 206, .5); }
@media (max-width: 759px) { .torna .lbl { display: none; } }

/* ---------- interruttore Mappa | Dashboard (gemello di quello in dashboard.css)
   Sta accanto al nome del prodotto: è la scelta della vista, non uno strumento. */
.vista-vai { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 13px; border-radius: 11px; background: var(--sky); color: var(--jet); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; box-shadow: 0 0 0 4px rgba(142, 183, 206, .18), 0 6px 18px rgba(4, 16, 24, .35); transition: background .15s, transform .15s; }
.vista-vai:hover { background: var(--mint); transform: translateY(-1px); }
.vista-vai .ico { stroke-width: 2; }
.vista-vai kbd { padding: 2px 5px; font-size: 11px; color: var(--jet); border-color: rgba(14, 46, 62, .45); opacity: .8; }
@media (max-width: 760px) { .vista-vai .lbl, .vista-vai kbd { display: none; } .vista-vai { width: 40px; padding: 0; justify-content: center; } }

/* suggerimento che indica la dashboard, finché non la si apre o lo si chiude */
.sugg-vista { position: fixed; top: 64px; z-index: 25; width: 280px; padding: 12px 14px 12px; border-radius: 12px; background: var(--mint); color: var(--jet); box-shadow: var(--ombra-forte); font-size: 13px; line-height: 1.4; opacity: 0; transform: translateY(-6px); transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; }
.sugg-vista.su { opacity: 1; transform: none; pointer-events: auto; }
.sugg-vista::before { content: ""; position: absolute; top: -6px; left: var(--freccia, 40px); width: 12px; height: 12px; background: var(--mint); transform: rotate(45deg); border-radius: 2px; }
.sugg-vista b { display: block; font-size: 14px; margin-bottom: 2px; }
.sugg-vista .riga { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.sugg-vista .vai { height: 32px; padding: 0 12px; border-radius: 8px; background: var(--jet); color: var(--mint); font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sugg-vista .no { height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13px; }
.sugg-vista .no:hover { background: var(--brina); }

/* con l'interruttore in testata serve più spazio */
.btn-scuro { white-space: nowrap; }
.chiedi { width: 270px; }
@media (max-width: 1560px) { .simulata span { display: none; } }
.simulata { flex: none; }
.sugg-vista { width: 330px; }
.sugg-vista .vai, .sugg-vista .no { white-space: nowrap; }
@media (max-width: 1400px) { #btnScoperte .lbl { display: none; } .chiedi { width: 220px; } }

/* Il passaggio alla dashboard è l'elemento più chiaro della testata: bianco pieno, più grande, un richiamo a impulsi all'arrivo.
   «Chiedi alla mappa» diventa vetro scuro per non competere. */
.vista-vai { height: 44px; padding: 0 16px 0 14px; border-radius: 12px; background: var(--mint); color: var(--jet); font-size: 15px; font-weight: 650; box-shadow: 0 0 0 2px var(--sky), 0 8px 24px rgba(4, 16, 24, .45); position: relative; }
.vista-vai:hover { background: #fff; }
.vista-vai .ico { width: 20px; height: 20px; }
.vista-vai::after { content: ""; position: absolute; inset: -2px; border-radius: 14px; box-shadow: 0 0 0 0 rgba(142, 183, 206, .9); animation: richiamo 1.8s var(--ease) 1s 4; pointer-events: none; }
@keyframes richiamo { 0% { box-shadow: 0 0 0 0 rgba(142, 183, 206, .9); } 100% { box-shadow: 0 0 0 16px rgba(142, 183, 206, 0); } }
@media (prefers-reduced-motion: reduce) { .vista-vai::after { animation: none; } }
.chiedi { background: rgba(8, 29, 40, .6); color: rgba(249, 255, 251, .85); border: 1px solid var(--vetro-filo); box-shadow: none; }
.chiedi:hover { background: rgba(29, 47, 122, .55); }
.chiedi kbd { color: inherit; }
