/* Squadra Lavori — app dei tecnici. Stile Windows 11 / Fluent (regola CGFA), pensata per il telefono all'aperto:
   testo 16 px, contrasto alto, comandi da 48 px, azione principale in basso a portata di pollice.
   Il colore d'accento arriva da contenuti/config.json (--acc), il resto è neutro. */
:root {
  color-scheme: light;
  --acc: #c2410c; --acc-t: #fff; --acc-soft: color-mix(in srgb, var(--acc) 11%, var(--carta));
  --fondo: #eef0f2; --mica: linear-gradient(160deg, #f4f5f7 0%, #eceef1 55%, #e9ecef 100%);
  --carta: #ffffff; --carta2: #f7f8f9; --carta3: #eff1f3;
  --testo: #16191d; --testo2: #4a525c; --testo3: #6b737d;
  --bordo: rgba(15, 23, 32, .09); --bordo2: rgba(15, 23, 32, .16);
  --ok: #0e7a0d; --ok-soft: #e3f4e1; --warn: #8a5300; --warn-soft: #fdf1d9; --ko: #b42318; --ko-soft: #fde8e6;
  --ombra1: 0 1px 2px rgba(15, 23, 32, .06), 0 1px 1px rgba(15, 23, 32, .04);
  --ombra2: 0 2px 6px rgba(15, 23, 32, .07), 0 8px 24px rgba(15, 23, 32, .07);
  --ombra3: 0 12px 40px rgba(15, 23, 32, .18), 0 2px 8px rgba(15, 23, 32, .08);
  --r: 8px; --r2: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Roboto", sans-serif;
  --font-d: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Roboto", sans-serif;
  --tab-h: 64px; --nav-w: 264px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
:root[data-tema="scuro"] {
  color-scheme: dark;
  --acc-soft: color-mix(in srgb, var(--acc) 22%, var(--carta));
  --fondo: #1c1d1f; --mica: linear-gradient(160deg, #222326 0%, #1d1e20 60%, #1a1b1d 100%);
  --carta: #2a2b2e; --carta2: #313236; --carta3: #38393d;
  --testo: #f3f4f6; --testo2: #c3c8cf; --testo3: #9aa1aa;
  --bordo: rgba(255, 255, 255, .08); --bordo2: rgba(255, 255, 255, .15);
  --ok: #7ad46f; --ok-soft: #1f3a1d; --warn: #f5c35b; --warn-soft: #3d2f12; --ko: #ff9a8f; --ko-soft: #47201c;
  --ombra1: 0 1px 2px rgba(0, 0, 0, .35); --ombra2: 0 2px 8px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3); --ombra3: 0 16px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--bordo2) transparent; }
body { margin: 0; min-height: 100dvh; font: 16px/1.5 var(--font); color: var(--testo); background: var(--fondo) var(--mica) fixed; -webkit-tap-highlight-color: transparent; }
::selection { background: color-mix(in srgb, var(--acc) 28%, transparent); }
:focus-visible { outline: 2px solid var(--testo); outline-offset: 2px; border-radius: 4px; }
a { color: var(--acc); text-underline-offset: 3px; }
:root[data-tema="scuro"] a:not([class]) { color: color-mix(in srgb, var(--acc) 55%, #fff); }
h1, h2, h3 { font-family: var(--font-d); text-wrap: balance; margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.salta { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--carta); padding: 8px 14px; border-radius: var(--r); }
.salta:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }

/* ---------------- guscio: NavigationView su PC, barra in basso sul telefono */
.demo { position: sticky; top: 0; z-index: 30; padding: 8px 16px; font-size: 13.5px; background: #1b1f24; color: #fff; text-align: center; }
.demo b { background: #ffd23f; color: #1b1f24; border-radius: 4px; padding: 1px 6px; margin-right: 6px; font-size: 12px; letter-spacing: .04em; }
.demo a { color: #ffd23f; }
.guscio { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.nav { display: none; }
.vista { padding: 18px 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); max-width: 760px; width: 100%; margin: 0 auto; outline: none; }
.vista.entra > * { animation: entra .32s var(--ease) both; }
.vista.entra > *:nth-child(2) { animation-delay: .03s; } .vista.entra > *:nth-child(3) { animation-delay: .06s; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }
.tab { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--carta) 82%, transparent); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-top: 1px solid var(--bordo); }
.tab a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--testo2); text-decoration: none; font-size: 12px; font-weight: 600; position: relative; }
.tab a .ic { width: 24px; height: 24px; }
.tab a.on { color: var(--acc); }
:root[data-tema="scuro"] .tab a.on { color: color-mix(in srgb, var(--acc) 55%, #fff); }
.tab a.on::before { content: ""; position: absolute; top: 6px; width: 34px; height: 30px; border-radius: 15px; background: var(--acc-soft); z-index: -1; animation: pill .3s var(--ease); }
@keyframes pill { from { transform: scaleX(.4); opacity: 0; } }
.tab .pal { position: absolute; top: 7px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ko); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

@media (min-width: 900px) {
  .guscio { grid-template-columns: var(--nav-w) 1fr; }
  .tab { display: none; }
  .nav { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 14px 10px; gap: 4px; background: color-mix(in srgb, var(--carta) 55%, transparent);
    backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); border-right: 1px solid var(--bordo); }
  .nav-marca { display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px; color: var(--testo); text-decoration: none; }
  .nav-marca img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: var(--carta); }
  .nav-marca img[data-largo] { width: auto; max-width: 110px; border-radius: 0; background: none; }
  .nav-marca b { display: block; font: 600 15px/1.2 var(--font-d); }
  .nav-marca small { color: var(--testo3); font-size: 12px; }
  .nav-voci { display: grid; gap: 2px; }
  .nav-voci a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 6px; color: var(--testo); text-decoration: none; font-size: 14.5px; position: relative; }
  .nav-voci a:hover { background: var(--carta3); }
  .nav-voci a.on { background: var(--carta); box-shadow: var(--ombra1); font-weight: 600; }
  .nav-voci a.on::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 2px; background: var(--acc); }
  .nav-voci .pal { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--ko); color: #fff; font-size: 12px; text-align: center; line-height: 20px; padding: 0 6px; }
  .nav-piede { margin-top: auto; padding: 10px 12px; font-size: 12px; color: var(--testo3); display: grid; gap: 2px; }
  .nav-piede a { color: var(--testo3); }
  .vista { padding: 28px 32px 40px; max-width: 820px; margin: 0; }
}

/* ---------------- pezzi comuni */
.testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.testa h1 { font-size: 26px; font-weight: 650; line-height: 1.15; letter-spacing: -.01em; }
.testa p { margin: 4px 0 0; color: var(--testo2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--bordo2); background: var(--carta); color: var(--testo);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: var(--ombra1); white-space: nowrap; }
.btn:hover { background: var(--carta2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn.acc { background: var(--acc); color: var(--acc-t); border-color: color-mix(in srgb, var(--acc) 70%, #000); }
.btn.acc:hover { background: color-mix(in srgb, var(--acc) 88%, #000); }
.btn.ok { background: var(--ok); color: #fff; border-color: transparent; }
:root[data-tema="scuro"] .btn.ok { color: #10230e; }
.btn.grande { min-height: 56px; font-size: 17px; border-radius: 8px; width: 100%; }
.btn.sub { background: transparent; border-color: transparent; box-shadow: none; }
.btn.sub:hover { background: var(--carta3); }
.btn.tondo { width: 44px; padding: 0; }
.btn.ko { color: var(--ko); }
.giro { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: giro .7s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.blocco { background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--r2); box-shadow: var(--ombra1); }
.sec { color: var(--testo3); font-size: 13.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; background: var(--carta3); color: var(--testo2); white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; }
.chip.in_corso { background: var(--acc-soft); color: var(--acc); }
:root[data-tema="scuro"] .chip.in_corso { color: color-mix(in srgb, var(--acc) 50%, #fff); }
.chip.sospeso, .chip.alta, .chip.attesa { background: var(--warn-soft); color: var(--warn); }
.chip.fatto, .chip.approvata, .chip.pubblicata { background: var(--ok-soft); color: var(--ok); }
.chip.urgente, .chip.ritardo, .chip.rifiutata, .chip.annullato { background: var(--ko-soft); color: var(--ko); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 8px;
  background: #1f2328; color: #fff; box-shadow: var(--ombra3); font-size: 15px; animation: toast .3s var(--ease); }
.toast.ko { background: var(--ko); }
.toast.via { opacity: 0; transition: opacity .4s; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.vuoto { text-align: center; padding: 48px 20px; color: var(--testo2); }
.vuoto-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--carta); box-shadow: var(--ombra1); color: var(--testo3); margin-bottom: 12px; }
.vuoto h2 { font-size: 19px; color: var(--testo); margin-bottom: 6px; }
.vuoto p { margin: 0 auto 16px; max-width: 36ch; }
.sch { border-radius: var(--r2); background: linear-gradient(90deg, var(--carta) 0%, var(--carta3) 50%, var(--carta) 100%); background-size: 200% 100%; animation: sch 1.2s linear infinite; height: 104px; margin-bottom: 10px; }
@keyframes sch { to { background-position: -200% 0; } }

/* ---------------- segmenti (Oggi / Prossimi / Fatti) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 3px; background: var(--carta3); border-radius: 8px; margin-bottom: 16px; }
.seg button { min-height: 40px; border: 0; border-radius: 6px; background: transparent; font-weight: 600; font-size: 14.5px; color: var(--testo2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--carta); color: var(--testo); box-shadow: var(--ombra1); }
.seg button .n { color: var(--testo3); font-weight: 500; margin-left: 4px; }

/* ---------------- lista lavori */
.giorno-t { font: 600 13px var(--font); color: var(--testo2); text-transform: capitalize; margin: 18px 4px 8px; }
.lavori { display: grid; gap: 10px; }
.lav { display: grid; grid-template-columns: 58px 1fr auto; gap: 4px 14px; align-items: start; padding: 14px 14px 14px 12px; color: inherit; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .2s; }
.lav:hover { box-shadow: var(--ombra2); }
.lav:active { transform: scale(.99); }
.lav-ora { grid-row: span 2; text-align: center; padding-top: 2px; }
.lav-ora b { display: block; font: 650 20px/1 var(--font-d); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lav-ora small { display: block; margin-top: 4px; font-size: 12px; color: var(--testo3); }
.lav-ora .pallino { width: 12px; height: 12px; border-radius: 50%; margin: 6px auto 0; background: var(--carta3); border: 2px solid var(--bordo2); }
.lav-ora .pallino.in_corso { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); animation: pulsa 2s ease-in-out infinite; }
.lav-ora .pallino.fatto { background: var(--ok); border-color: var(--ok); }
@keyframes pulsa { 50% { box-shadow: 0 0 0 7px transparent; } }
.lav h3 { font-size: 17px; font-weight: 650; line-height: 1.3; }
.lav-cli { margin: 2px 0 0; color: var(--testo2); font-size: 15px; }
.lav-ind { margin: 2px 0 0; color: var(--testo3); font-size: 14px; display: flex; gap: 4px; align-items: flex-start; }
.lav-ind .ic { width: 16px; height: 16px; margin-top: 2px; }
.lav-chip { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lav-frec { color: var(--testo3); align-self: center; grid-row: 1; grid-column: 3; }

/* ---------------- dettaglio lavoro */
.briciole { margin: -4px 0 10px; }
.briciole a { display: inline-flex; align-items: center; gap: 4px; color: var(--testo2); text-decoration: none; font-size: 14.5px; min-height: 40px; padding-right: 10px; }
.det-testa { padding: 18px; }
.det-testa h1 { font-size: 23px; font-weight: 650; line-height: 1.2; margin: 8px 0 4px; }
.det-testa .num { font: 600 13px var(--font); color: var(--testo3); font-variant-numeric: tabular-nums; }
.det-chip { display: flex; flex-wrap: wrap; gap: 6px; }
.azioni-rapide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.azioni-rapide .btn { min-height: 52px; min-width: 0; justify-content: flex-start; padding: 0 14px; font-size: 14.5px; white-space: normal; }
.azioni-rapide .btn small { display: block; font-weight: 400; color: var(--testo3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azioni-rapide .btn span { min-width: 0; overflow: hidden; text-align: left; line-height: 1.25; }
.azioni-rapide .btn:only-child { grid-column: 1 / -1; }
.vista { overflow-wrap: anywhere; }
.dati { margin-top: 12px; padding: 4px 18px; }
.dati > div { padding: 12px 0; border-top: 1px solid var(--bordo); }
.dati > div:first-child { border-top: 0; }
.dati dt { font-size: 13px; color: var(--testo3); font-weight: 600; }
.dati dd { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.titoletto { display: flex; align-items: center; justify-content: space-between; margin: 24px 2px 10px; }
.titoletto h2 { font-size: 18px; font-weight: 650; }
.storia { list-style: none; margin: 0; padding: 4px 18px; }
.storia li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--bordo); }
.storia li:first-child { border-top: 0; }
.storia .ic { color: var(--testo3); margin-top: 2px; }
.storia p { margin: 0; overflow-wrap: anywhere; }
.storia small { color: var(--testo3); font-size: 13px; }
.barra-az { position: sticky; bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom)); z-index: 10; display: flex; gap: 8px; margin-top: 18px; padding: 10px;
  border-radius: 14px; background: color-mix(in srgb, var(--carta) 80%, transparent); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); box-shadow: var(--ombra3); border: 1px solid var(--bordo); }
.barra-az .btn.grande { flex: 1; }
.barra-az .btn.sub { min-height: 56px; }
@media (min-width: 900px) { .barra-az { bottom: 16px; } }

/* ---------------- foto */
.griglia-foto { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.griglia-foto button { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--carta3); cursor: pointer; }
.griglia-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.griglia-foto button:hover img { transform: scale(1.04); }
.griglia-foto .bollo { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 3px; }
.griglia-foto .bollo span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 12px; background: rgba(16, 19, 23, .72); color: #fff; backdrop-filter: blur(6px); }
.griglia-foto .bollo span.attesa { background: #8a5300; } .griglia-foto .bollo span.ok { background: #0e7a0d; } .griglia-foto .bollo span.ko { background: #b42318; }
.griglia-foto .bollo .ic { width: 14px; height: 14px; }
.griglia-foto .in-coda { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(16, 19, 23, .45); color: #fff; font-size: 12px; font-weight: 600; }
.aggiungi-foto { display: grid; place-items: center; gap: 2px; aspect-ratio: 1; border: 1.5px dashed var(--bordo2) !important; background: var(--carta) !important; color: var(--acc); font-weight: 600; font-size: 13px; }
.aggiungi-foto .ic { width: 28px; height: 28px; }
.coda-info { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14.5px; }

/* nuova foto: anteprime + destinazione */
.anteprime { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.anteprime figure { margin: 0; flex: 0 0 auto; position: relative; scroll-snap-align: start; }
.anteprime img { height: 180px; border-radius: 10px; display: block; box-shadow: var(--ombra1); }
.anteprime .via { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 17px; border: 0; background: rgba(16, 19, 23, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dest { display: grid; gap: 8px; }
.dest label { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--bordo2); border-radius: 10px; background: var(--carta); cursor: pointer; transition: border-color .15s, background .15s; }
.dest label:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.dest .d-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--carta3); color: var(--testo2); }
.dest label:has(input:checked) .d-ic { background: var(--acc); color: var(--acc-t); }
.dest b { display: block; font-size: 16px; }
.dest small { color: var(--testo2); font-size: 13.5px; line-height: 1.35; display: block; }
.dest input { width: 22px; height: 22px; accent-color: var(--acc); }
.consenso { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--testo); font-size: 14.5px; margin-top: 10px; }
.consenso input { width: 22px; height: 22px; accent-color: var(--acc); margin: 0; }

/* ---------------- moduli */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo > span { font-size: 14px; font-weight: 600; color: var(--testo2); }
.campo input, .campo textarea, .campo select { min-height: 48px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--bordo2); border-bottom: 2px solid color-mix(in srgb, var(--testo) 35%, transparent); background: var(--carta); width: 100%; }
.campo input:focus, .campo textarea:focus { outline: none; border-bottom-color: var(--acc); }
.campo textarea { min-height: 96px; resize: vertical; }
.err { color: var(--ko); font-weight: 600; min-height: 1.5em; margin: 4px 0; }
.firma-box { position: relative; border: 1.5px dashed var(--bordo2); border-radius: 10px; background: #fff; touch-action: none; }
.firma-box canvas { display: block; width: 100%; height: 180px; border-radius: 10px; cursor: crosshair; }
.firma-box .vuota { position: absolute; inset: 0; display: grid; place-items: center; color: #8a9099; pointer-events: none; font-size: 15px; }
.firma-box .cancella { position: absolute; right: 6px; top: 6px; }

/* ---------------- finestre (dialog) e visore foto */
.dlg { border: 0; padding: 0; border-radius: 12px; max-width: min(520px, calc(100% - 24px)); width: 100%; background: var(--carta); color: var(--testo); box-shadow: var(--ombra3); }
.dlg::backdrop { background: rgba(10, 12, 15, .45); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg .28s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dlg-c { padding: 22px 20px 18px; position: relative; max-height: calc(100dvh - 40px); overflow: auto; }
.dlg-c h2 { font-size: 20px; margin-bottom: 8px; padding-right: 40px; }
.dlg-x { position: absolute; top: 10px; right: 10px; }
.dlg-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--acc-soft); color: var(--acc); margin-bottom: 10px; }
.dlg-az { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.lista { padding-left: 20px; margin: 8px 0; } .lista li { margin: 6px 0; }
.visore { position: fixed; inset: 0; z-index: 80; background: #0c0e10; display: grid; grid-template-rows: auto 1fr auto; color: #fff; animation: dlg .25s var(--ease); }
.visore header, .visore footer { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.visore footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; }
.visore .btn { background: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; box-shadow: none; }
.visore .foto-g { min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.visore .foto-g img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.visore p { margin: 0; color: #e8eaed; }
.visore small { color: #aab1ba; }

/* ---------------- accesso */
.entra-box { max-width: 440px; margin: 6vh auto 0; text-align: center; }
.entra-box .logo { width: 88px; height: 88px; border-radius: 20px; background: var(--carta); box-shadow: var(--ombra2); display: grid; place-items: center; margin: 0 auto 18px; overflow: hidden; }
.entra-box .logo img { width: 72px; height: 72px; object-fit: contain; }
/* loghi larghi (es. marchio con scritta): il riquadro si allarga */
.entra-box .logo:has(img[data-largo]) { width: auto; max-width: 300px; padding: 0 18px; }
.entra-box .logo img[data-largo] { width: auto; max-width: 264px; height: 60px; }
.entra-box h1 { font-size: 26px; margin-bottom: 6px; }
.entra-box > p { color: var(--testo2); margin: 0 auto 22px; max-width: 34ch; }
.passi { text-align: left; padding: 6px 18px; list-style: none; margin: 0 0 16px; counter-reset: p; }
.passi li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--bordo); counter-increment: p; }
.passi li:first-child { border-top: 0; }
.passi li::before { content: counter(p); width: 28px; height: 28px; border-radius: 14px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.scegli { display: grid; gap: 8px; text-align: left; }
.scegli button { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--bordo); border-radius: 10px; background: var(--carta); cursor: pointer; box-shadow: var(--ombra1); text-align: left; min-height: 64px; }
.scegli button:hover { border-color: var(--acc); }
.avatar { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; background: var(--acc); }

/* ---------------- Altro */
.menu { list-style: none; margin: 0 0 12px; padding: 4px; }
.menu a { display: grid; grid-template-columns: 40px 1fr 20px; gap: 12px; align-items: center; min-height: 60px; padding: 8px 10px; border-radius: 8px; color: var(--testo); text-decoration: none; }
.menu a:hover { background: var(--carta2); }
.menu small { display: block; color: var(--testo3); font-size: 13.5px; }
.menu .ic:last-child { color: var(--testo3); width: 16px; height: 16px; }
.lb-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--carta3); color: var(--testo2); }
.profilo { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; }
.profilo .avatar { width: 52px; height: 52px; border-radius: 26px; font-size: 19px; }
.profilo b { display: block; font-size: 18px; }
.funz { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.funz li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; }
.funz p { margin: 2px 0 4px; color: var(--testo2); }
.legale { padding: 6px 18px 14px; } .legale p { margin: 12px 0; }
.credit { text-align: center; color: var(--testo3); font-size: 13px; margin: 20px 0 6px; }
.credit a { color: var(--testo3); }

/* guida all'apertura */
.guida { text-align: center; }
.guida .g-img { display: grid; place-items: center; height: 150px; margin: 4px 0 14px; border-radius: 12px; background: var(--acc-soft); color: var(--acc); }
.guida .g-img .ic { width: 64px; height: 64px; stroke-width: 1.3; }
.punti { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.punti li { width: 8px; height: 8px; border-radius: 4px; background: var(--bordo2); transition: background-color .3s var(--ease); }
.punti li.on { width: 22px; background: var(--acc); }

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

/* invito ad attivare le notifiche */
.invito { display: grid; grid-template-columns: 40px 1fr 40px; gap: 4px 12px; align-items: center; padding: 12px 10px 12px 14px; margin-bottom: 12px; }
.invito b { display: block; } .invito small { color: var(--testo2); font-size: 13.5px; }
.invito .btn.acc { grid-column: 2; justify-self: start; min-height: 40px; margin-top: 6px; }
.invito .btn.tondo { grid-row: 1; grid-column: 3; }
