/* Il mio canale
   Vista TV: si legge dal divano. 1rem = 32px su uno schermo 1920x1080 (e scala uguale se la
   WebView riporta 960x540). Margine di sicurezza del 5% per il taglio dei bordi dei televisori.
   Vista telefono: touch, una colonna, pulsanti di almeno 56px. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }

:root {
  --carattere: "Amazon Ember", Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  /* TV: fondo scuro per non abbagliare in salotto; testo bianco, contrasto ≥ 7:1 */
  --sfondo: #0e1726;
  --superficie: #1b2a44;
  --superficie-2: #263a5c;
  --testo: #ffffff;
  --testo-2: #d3dcea;
  --spento: #9fb0c9;
  --fuoco: #ffd23f;
  --blu: #1e40af;
  --verde: #0d6b35;
  --rosso: #a11d17;
  /* telefono */
  --t-sfondo: #f4f6fa;
  --t-carta: #ffffff;
  --t-testo: #111827;
  --t-testo-2: #374151;
  --t-bordo: #cbd5e1;
  --t-blu: #1e40af;
  --t-blu-chiaro: #e0e7ff;
  --t-verde: #166534;
  --t-verde-chiaro: #dcfce7;
  --t-ambra: #78350f;
  --t-ambra-chiaro: #fef3c7;
  --t-rosso: #b91c1c;
}

body { font-family: var(--carattere); -webkit-font-smoothing: antialiased; }
.senza-js { padding: 2rem; font-size: 1.5rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico.giu { transform: rotate(135deg); }
.nascosto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ================================================================= VISTA TV */
html.tv { font-size: min(calc(100vw / 60), calc(100vh / 33.75)); background: var(--sfondo); }
html.tv body {
  background: var(--sfondo); color: var(--testo);
  width: 100vw; height: 100vh; overflow: hidden; line-height: 1.3;
  font-size: 1rem;
}
.tv #app {
  position: absolute; inset: 0; padding: 5vh 5vw 6.5vh;
  display: flex; flex-direction: column; gap: 1.1rem; overflow: hidden;
}

/* l'elemento selezionato: contorno doppio giallo, ben visibile su ogni colore */
.tv [data-nav] { outline: none; transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease; position: relative; }
.tv [data-nav]:focus {
  box-shadow: 0 0 0 .18rem var(--sfondo), 0 0 0 .45rem var(--fuoco), 0 .6rem 1.6rem rgba(0, 0, 0, .55);
  transform: scale(1.045); z-index: 2;
}

.testata { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex: none; }
.testata h1 { font-size: 2.1rem; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.sotto { font-size: 1.05rem; color: var(--testo-2); margin-top: .2rem; }
.data-ora { font-size: 1.05rem; color: var(--testo-2); text-align: right; }
.orario { display: block; font-size: 2.1rem; font-weight: 800; color: var(--testo); line-height: 1.1; }

.suggerimento { margin-top: auto; flex: none; font-size: .8rem; color: var(--spento); }
.suggerimento .tasto { color: var(--testo-2); font-weight: 700; }

.pulsante {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 2.8rem; padding: .55rem 1.3rem; border-radius: .7rem;
  background: var(--superficie); font-size: 1rem; font-weight: 700; white-space: nowrap;
}
.pulsante:focus { background: var(--superficie-2); }
.pulsante.principale { background: var(--blu); }
.pulsante.principale:focus { background: #2949c2; }
.pulsante.verde { background: var(--verde); }
.pulsante.verde:focus { background: #108040; }
.pulsante.rosso { background: var(--rosso); }
.pulsante.rosso:focus { background: #b8231c; }
.pulsante.grande { font-size: 1.2rem; min-height: 3.6rem; padding: .7rem 1.8rem; }
.pulsante.enorme { font-size: 1.6rem; min-height: 5rem; padding: 1rem 2.4rem; border-radius: 1rem; }
.pagina { font-weight: 400; color: var(--testo-2); margin-left: .3rem; }
.pallino { background: var(--fuoco); color: #111; font-size: .75rem; font-weight: 800; padding: .1rem .5rem; border-radius: 1rem; margin-left: .4rem; }

.servizi { display: flex; gap: 1.2rem; flex: none; flex-wrap: wrap; }

/* fascetta «Demo» */
.demo {
  position: absolute; top: 5vh; right: 5vw; z-index: 3;
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fde68a; color: #422006; font-weight: 800; font-size: .72rem;
  padding: .2rem .7rem; border-radius: 2rem; letter-spacing: .02em;
}
.demo .ico { width: 1em; height: 1em; }

/* home */
.vuoto { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; text-align: center; }
.vuoto-testo { font-size: 1.4rem; color: var(--testo-2); line-height: 1.4; }
.griglia-home { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; min-height: 0; padding: .5rem; }
.riquadro {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .2rem;
  padding: 1.6rem 1.8rem; border-radius: 1.1rem; text-align: left; min-height: 0;
  background: linear-gradient(160deg, #24426f, #182c4b);
}
.riquadro-spesa { background: linear-gradient(160deg, #1f5a43, #143a2c); }
.riquadro-videochiamate { background: linear-gradient(160deg, #6b2a12, #3f1a0d); }
.riquadro.solo { grid-column: span 2; }
.ico-riquadro { width: 3.4rem; height: 3.4rem; margin-bottom: auto; }
.riquadro-nome { font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.riquadro-descr { font-size: 1rem; color: var(--testo-2); }

/* gli elementi larghi crescono meno, se no il contorno esce dal bordo */
.tv .riga-prodotto:focus, .tv .modulo-riga:focus { transform: scale(1.012); }

/* moduli */
.colonna { flex: 1; display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start; padding: .5rem; }
.modulo-riga {
  width: 100%; display: flex; align-items: center; gap: 1.3rem; text-align: left;
  padding: 1.1rem 1.5rem; border-radius: 1rem; background: var(--superficie);
}
.modulo-riga:focus { background: var(--superficie-2); }
.ico-modulo { width: 2.6rem; height: 2.6rem; }
.mr-testi { flex: 1; display: flex; flex-direction: column; }
.mr-nome { font-size: 1.45rem; font-weight: 800; }
.mr-descr { font-size: 1rem; color: var(--testo-2); }
.interruttore {
  display: inline-flex; align-items: center; gap: .4rem; min-width: 7.5rem; justify-content: center;
  padding: .4rem 1rem; border-radius: 2rem; font-weight: 800; font-size: 1rem;
  background: #0b1220; color: var(--spento); border: .12rem solid #3a4d6e;
}
.interruttore.acceso { background: var(--verde); color: #fff; border-color: #2fae67; }
.colonna .pulsante { margin-top: .4rem; }

/* videochiamate */
.griglia-contatti { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; align-content: center; padding: .5rem; }
.contatto {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: 1.4rem 1rem 1.2rem; border-radius: 1.1rem; background: var(--superficie);
}
.contatto:focus { background: var(--superficie-2); }
.contatto .avatar { width: 7.5rem; height: 7.5rem; margin-bottom: .4rem; }
.contatto-nome { font-size: 1.5rem; font-weight: 800; }
.contatto-chi { font-size: .95rem; color: var(--testo-2); }

.chiamando, .arrivo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; }
.chiamando h1, .arrivo h1 { font-size: 2.3rem; font-weight: 800; margin-top: 1rem; }
.avatar-grande { width: 12rem; height: 12rem; border-radius: 50%; }
.chiamando .pulsante, .arrivo-azioni { margin-top: 1.6rem; }
.arrivo-azioni { display: flex; gap: 2.4rem; }
.pulsa { animation: pulsa 1.6s ease-in-out infinite; }
.squilla { animation: squilla 1.2s ease-out infinite; }
@keyframes pulsa { 50% { transform: scale(.94); opacity: .8; } }
@keyframes squilla { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, .55); } 100% { box-shadow: 0 0 0 2.2rem rgba(255, 210, 63, 0); } }

/* in chiamata: la persona prende quasi tutto lo schermo, Termina sempre visibile */
.tv #app.schermo-chiamata { padding: 0; }
.in-chiamata { position: absolute; inset: 0; background: #05080f; }
.persona {
  position: absolute; inset: 2.5vh 2.5vw 17.5vh; border-radius: 1.4rem; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--colore) 75%, #fff 10%), var(--colore) 45%, #120a06 100%);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .persona { background: radial-gradient(ellipse at 50% 35%, var(--colore), #120a06 100%); }
}
.avatar-video { width: 16rem; height: 16rem; border-radius: 50%; box-shadow: 0 0 0 .5rem rgba(255, 255, 255, .15); animation: respira 4s ease-in-out infinite; }
@keyframes respira { 50% { transform: scale(1.03); } }
.persona-nome { font-size: 2.2rem; font-weight: 800; text-shadow: 0 .1rem .4rem rgba(0, 0, 0, .5); }
.in-chiamata .demo { top: 5vh; right: 5vw; }
.durata { position: absolute; top: 5vh; left: 5vw; font-size: 1.1rem; font-weight: 800; background: rgba(0, 0, 0, .45); padding: .25rem .9rem; border-radius: 2rem; }
.tu {
  position: absolute; right: 5vw; bottom: 20vh; width: 12rem; height: 7.5rem; border-radius: .8rem;
  background: #1e293b; border: .15rem solid rgba(255, 255, 255, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--testo-2); font-weight: 700;
}
.tu .ico { width: 2.6rem; height: 2.6rem; }
.barra-chiamata { position: absolute; left: 0; right: 0; bottom: 5.5vh; display: flex; justify-content: center; }

/* spesa */
.azioni-spesa { display: flex; gap: 1.2rem; flex: none; padding: .5rem .5rem 0; }
.lista { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; padding: .6rem .8rem; scrollbar-width: none; }
.lista::-webkit-scrollbar { display: none; }
.riga { display: flex; gap: 1rem; flex: none; }
.riga-prodotto {
  flex: 1; display: flex; align-items: center; gap: 1.1rem; text-align: left;
  min-height: 3.6rem; padding: .55rem 1.3rem; border-radius: .8rem; background: var(--superficie);
  font-size: 1.35rem; font-weight: 700;
}
.riga-prodotto:focus, .riga-togli:focus { background: var(--superficie-2); }
.casella {
  width: 2.1rem; height: 2.1rem; flex: none; border-radius: .45rem; border: .18rem solid var(--testo-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.casella .ico { width: 1.5rem; height: 1.5rem; stroke-width: 3; }
.riga-nome { flex: 1; }
.riga-stato { font-size: 1rem; color: var(--testo-2); font-weight: 700; }
.riga-nota { font-size: .85rem; font-weight: 700; color: #111; background: var(--fuoco); border-radius: 1rem; padding: .05rem .55rem; margin-left: .7rem; vertical-align: middle; }
.riga-togli {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.2rem; border-radius: .8rem;
  background: var(--superficie); font-size: 1rem; font-weight: 700; color: var(--testo-2);
}
.riga.fatto .riga-nome { text-decoration: line-through; text-decoration-thickness: .1rem; color: var(--spento); }
.riga.fatto .casella { background: var(--verde); border-color: var(--verde); color: #fff; }
.riga:not(.fatto):not(.escluso) .riga-prodotto .casella:empty { background: transparent; }
.riga.escluso .riga-nome { color: var(--spento); text-decoration: line-through; }
.schermo-ricevuti .riga:not(.escluso) .casella { background: var(--blu); border-color: #6b8af0; }
.lista-vuota { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--testo-2); text-align: center; }

.griglia-prodotti { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 1.2rem; padding: .5rem; }
.tessera {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  border-radius: 1rem; background: var(--superficie); min-height: 0;
}
.tessera:focus { background: var(--superficie-2); }
.tessera-figura { font-size: 3.2rem; line-height: 1; }
.tessera-nome { font-size: 1.4rem; font-weight: 800; }
.tessera-segno { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 800; color: #111; background: var(--fuoco); padding: .05rem .6rem; border-radius: 1rem; }
.tessera.in-lista { background: #1f3a2e; }

.campo {
  flex: none; font-size: 1.7rem; font-weight: 800; min-height: 3.2rem; padding: .5rem 1.2rem; margin: 0 .5rem;
  background: #fff; color: #111; border-radius: .8rem; display: flex; align-items: center;
}
.segnaposto { color: #6b7280; font-weight: 400; }
.cursore { display: inline-block; width: .14em; height: 1.1em; background: var(--blu); margin-left: .08em; animation: lampeggia 1s steps(2) infinite; }
@keyframes lampeggia { 50% { opacity: 0; } }
.tastiera { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .5rem; justify-content: center; }
.fila { display: flex; gap: .6rem; justify-content: center; }
.tasto-lettera {
  width: 3.9rem; height: 2.9rem; border-radius: .7rem; background: var(--superficie);
  font-size: 1.5rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.tasto-lettera:focus { background: var(--superficie-2); }
.tasto-lettera.largo { width: auto; padding: 0 1.4rem; font-size: 1.1rem; }
.tasto-lettera.principale { background: var(--blu); }

/* abbina */
.abbina { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: .5rem; }
.passi { counter-reset: passo; display: flex; flex-direction: column; gap: .4rem; font-size: 1.2rem; }
.passi li { counter-increment: passo; position: relative; padding-left: 2.5rem; }
.passi li::before { content: counter(passo); position: absolute; left: 0; top: -.05rem; font-weight: 800; color: #111; background: var(--fuoco); width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 1rem; }
.codice { display: flex; gap: 1rem; margin: .4rem 0 .2rem 2.5rem; }
.codice span { width: 4.6rem; height: 5.6rem; border-radius: .9rem; background: #fff; color: #111; font-size: 3.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.esito { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 800; color: #7ee2a8; }
.abbina .pulsante { margin-top: auto; }

/* informazioni */
.info { flex: 1; display: flex; flex-direction: column; gap: 1rem; padding: .5rem; min-height: 0; }
.info-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.info-colonne section { background: var(--superficie); border-radius: 1rem; padding: 1.1rem 1.4rem; }
.info-colonne h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; margin-bottom: .6rem; }
.info-vero h2 { color: #7ee2a8; }
.info-finto h2 { color: #fde68a; }
.info-colonne li { font-size: .95rem; line-height: 1.35; padding-left: 1rem; position: relative; margin-top: .45rem; color: var(--testo-2); }
.info-colonne li::before { content: ""; position: absolute; left: 0; top: .55em; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.info-offline { font-size: .95rem; color: var(--testo-2); }
.info .pulsante { align-self: flex-start; }

/* finestra di domanda */
#dialogo:not(.aperto) { display: none; }
.velo { position: fixed; inset: 0; z-index: 20; background: rgba(3, 7, 15, .78); display: flex; align-items: center; justify-content: center; }
.tv .finestra { background: var(--superficie); border: .12rem solid #3a4d6e; border-radius: 1.3rem; padding: 2rem 2.4rem; max-width: 42rem; text-align: center; }
.tv .finestra h2 { font-size: 1.7rem; line-height: 1.25; }
.tv .finestra p { font-size: 1.05rem; color: var(--testo-2); margin-top: .6rem; }
.finestra-azioni { display: flex; gap: 1.6rem; justify-content: center; margin-top: 1.8rem; }
.tv .finestra-azioni .pulsante { font-size: 1.2rem; min-height: 3.4rem; min-width: 11rem; }

/* avvisi */
#avviso {
  position: fixed; z-index: 30; left: 50%; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; background: #f8fafc; color: #0b1220; font-weight: 700;
  box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .45); text-align: center;
}
#avviso.visibile { opacity: 1; transform: translate(-50%, 0); }
.tv #avviso { transform: translate(-50%, -1rem); }
.tv #avviso.visibile { transform: translate(-50%, 0); }
.tv #avviso { top: 4vh; font-size: 1.1rem; padding: .8rem 1.6rem; border-radius: .9rem; max-width: 60vw; }

/* barra dell'anteprima (solo fuori dall'APK; si usa col mouse) */
#anteprima {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  font: 600 13px/1.2 var(--carattere); z-index: 40;
}
#anteprima[hidden] { display: none; }
#anteprima button { padding: 5px 9px; border-radius: 6px; background: rgba(255, 255, 255, .12); color: inherit; border: 1px solid rgba(255, 255, 255, .25); }
#anteprima button:hover { background: rgba(255, 255, 255, .22); }
#anteprima button[aria-pressed="true"] { background: #ffd23f; color: #111; border-color: #ffd23f; }
.ant-titolo { opacity: .75; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.ant-gruppo { display: inline-flex; gap: 4px; }
.tv #anteprima { position: fixed; left: 50%; bottom: 4px; transform: translateX(-50%); flex-wrap: nowrap; white-space: nowrap; font-size: 11px; color: #e5e7eb; background: rgba(0, 0, 0, .55); padding: 4px 8px; border-radius: 10px; opacity: .85; }
.tv #anteprima:hover { opacity: 1; }

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

/* ================================================================= VISTA TELEFONO */
html.telefono { font-size: 18px; background: var(--t-sfondo); color: var(--t-testo); }
html.telefono body { background: var(--t-sfondo); color: var(--t-testo); line-height: 1.45; min-height: 100vh; }
.telefono #anteprima { color: var(--t-testo); background: #e2e8f0; padding: 6px 8px; font-size: 12px; }
.telefono .ant-titolo { display: none; }
.telefono #anteprima button { background: #fff; border-color: var(--t-bordo); }
.telefono #anteprima button[aria-pressed="true"] { background: var(--t-blu); color: #fff; border-color: var(--t-blu); }
.telefono #app { position: relative; min-height: calc(100vh - 44px); background: var(--t-sfondo); }
.telefono :focus-visible { outline: 3px solid var(--t-blu); outline-offset: 2px; }

.tel-intesta { background: var(--t-blu); color: #fff; padding: 28px 20px 24px; }
.marchio { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.tel-intesta h1 { font-size: 1.7rem; line-height: 1.2; margin-top: 4px; }
.stato-abbina { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .9rem; font-weight: 700; background: rgba(255, 255, 255, .15); padding: 6px 12px; border-radius: 20px; }
.stato-abbina.ok { background: #dcfce7; color: var(--t-verde); }

.tel-testata { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--t-carta); border-bottom: 1px solid var(--t-bordo); }
.tel-testata h1 { font-size: 1.15rem; line-height: 1.25; }
.tel-indietro { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 12px 0 6px; border-radius: 10px; color: var(--t-blu); font-weight: 700; flex: none; }
.tel-indietro:active { background: var(--t-blu-chiaro); }

.tel-corpo { padding: 18px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.tel-testo { color: var(--t-testo-2); }
.carta {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  min-height: 76px; padding: 14px 14px 14px 16px; background: var(--t-carta);
  border: 1px solid var(--t-bordo); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.carta:active { background: var(--t-blu-chiaro); }
.ico-carta { width: 30px; height: 30px; color: var(--t-blu); }
.avatar-carta { width: 40px; height: 40px; flex: none; }
.carta-testi { flex: 1; display: flex; flex-direction: column; }
.carta-titolo { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.carta-sotto { color: var(--t-testo-2); font-size: .9rem; }
.freccia { color: #64748b; }

.tel-pulsante {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 56px; padding: 12px 18px; border-radius: 14px; font-weight: 800; font-size: 1.05rem;
  background: var(--t-carta); color: var(--t-blu); border: 2px solid var(--t-blu); cursor: pointer; text-align: center;
}
.tel-pulsante.principale { background: var(--t-blu); color: #fff; }
.tel-pulsante.enorme { min-height: 68px; font-size: 1.15rem; }
.tel-pulsante:active { filter: brightness(.92); }
.link { color: var(--t-blu); text-decoration: underline; font-weight: 800; }

.nota-demo { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--t-ambra); background: var(--t-ambra-chiaro); border-radius: 12px; padding: 10px 12px; }
.nota-demo .ico { margin-top: 3px; }
.errore { color: var(--t-rosso); font-weight: 700; min-height: 0; }
.errore:empty { display: none; }

.tel-passi { counter-reset: passo; display: flex; flex-direction: column; gap: 10px; }
.tel-passi li { counter-increment: passo; position: relative; padding-left: 42px; min-height: 30px; }
.tel-passi li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--t-blu); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; margin-top: 1px; }
.tel-codice { display: flex; flex-direction: column; gap: 10px; }
.tel-codice label { font-weight: 800; }
.tel-codice input {
  width: 100%; font-size: 2.4rem; font-weight: 800; letter-spacing: .5em; text-align: center; padding: 10px 0 10px .5em;
  border: 2px solid var(--t-bordo); border-radius: 14px; background: var(--t-carta);
}
.tel-codice input:focus { border-color: var(--t-blu); outline: none; box-shadow: 0 0 0 3px var(--t-blu-chiaro); }

.esito-grande { text-align: center; background: var(--t-verde-chiaro); color: var(--t-verde); border-radius: 18px; padding: 22px 16px; }
.esito-grande > .ico { width: 52px; height: 52px; stroke-width: 2.5; }
.esito-grande h2 { font-size: 1.35rem; margin-top: 6px; }
.esito-grande p { color: #14532d; margin-top: 4px; }

.avanzamento { display: flex; gap: 6px; }
.avanzamento li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .85rem; font-weight: 700; color: #64748b; }
.avanzamento li span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #94a3b8; display: flex; align-items: center; justify-content: center; }
.avanzamento li.ora { color: var(--t-blu); }
.avanzamento li.ora span { background: var(--t-blu); border-color: var(--t-blu); color: #fff; }
.avanzamento li.fatto { color: var(--t-verde); }
.avanzamento li.fatto span { background: var(--t-verde); border-color: var(--t-verde); color: #fff; }

.anteprima-foto { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; background: #e2e8f0; }
.foglietto { background: #fffbea; border: 1px solid #e7dca8; border-radius: 6px; padding: 16px 22px; transform: rotate(-1.5deg); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); font-family: "Segoe Print", "Comic Sans MS", cursive; color: #1e3a8a; }
.foglietto p { font-weight: 700; text-decoration: underline; margin-bottom: 6px; }
.foglietto li { line-height: 1.8; border-bottom: 1px dashed #e7dca8; }
.lettura { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; color: var(--t-blu); padding: 8px; }
.rotella { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--t-blu-chiaro); border-top-color: var(--t-blu); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.tel-lista { display: flex; flex-direction: column; gap: 8px; }
.tel-lista li { display: flex; align-items: center; gap: 10px; background: var(--t-carta); border: 1px solid var(--t-bordo); border-radius: 12px; padding: 6px 10px 6px 12px; }
.tel-lista input[type="checkbox"] { width: 28px; height: 28px; accent-color: var(--t-blu); flex: none; }
.tel-nome { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font-size: 1.05rem; font-weight: 700; padding: 0 4px; border-radius: 6px; }
.tel-nome:focus { outline: 2px solid var(--t-blu); }

/* chiamate sul telefono */
.tel-scuro { min-height: calc(100vh - 44px); background: #0b1220; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; text-align: center; position: relative; }
.tel-scuro .demo { top: 14px; right: 14px; font-size: 12px; padding: 4px 10px; }
.tel-arrivo .avatar-grande { width: 140px; height: 140px; margin-bottom: 14px; }
.tel-arrivo h1 { font-size: 1.6rem; line-height: 1.2; }
.tel-arrivo p { color: #cbd5e1; }
.tel-tondi { display: flex; gap: 48px; margin-top: 48px; }
.tondo { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-weight: 800; }
.tondo .ico { width: 76px; height: 76px; padding: 20px; border-radius: 50%; }
.tondo.rosso .ico { background: #dc2626; }
.tondo.verde .ico { background: #16a34a; }
.tondo.rosso .ico.giu { transform: rotate(135deg); }
.tel-in-chiamata { padding: 0; justify-content: flex-start; }
.tel-in-chiamata .persona { inset: 10px 10px 130px; border-radius: 22px; }
.tel-in-chiamata .avatar-video { width: 150px; height: 150px; }
.tel-in-chiamata .persona-nome { font-size: 1.5rem; }
.tel-in-chiamata .durata { top: 22px; left: 22px; font-size: .95rem; }
.tel-in-chiamata .tu { right: 22px; bottom: 146px; width: 92px; height: 124px; font-size: .9rem; }
.tel-in-chiamata .tu .ico { width: 32px; height: 32px; }
.tel-in-chiamata .termina { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); }

.disegno { width: 100%; height: auto; border-radius: 14px; }
.camera { background: #0b1220; color: #e2e8f0; border-radius: 14px; overflow: hidden; text-align: center; }
.camera video { display: none; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transform: scaleX(-1); background: #000; }
.camera.accesa video { display: block; }
.camera p { padding: 12px; font-size: .95rem; }

.tel-info .info-colonne { display: flex; flex-direction: column; gap: 14px; }
.tel-info section { background: var(--t-carta); border: 1px solid var(--t-bordo); border-radius: 16px; padding: 14px 16px; }
.tel-info h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; margin-bottom: 6px; }
.tel-info .info-vero h2 { color: var(--t-verde); }
.tel-info .info-finto h2 { color: var(--t-ambra); }
.tel-info li { padding-left: 16px; position: relative; margin-top: 6px; color: var(--t-testo-2); }
.tel-info li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tel-info .info-offline { color: var(--t-testo-2); }

.telefono .velo { padding: 16px; }
.telefono .finestra { background: #fff; color: var(--t-testo); border-radius: 18px; padding: 20px; max-width: 380px; width: 100%; text-align: center; }
.telefono .finestra h2 { font-size: 1.2rem; }
.telefono .finestra-azioni { gap: 10px; margin-top: 18px; }
.telefono .finestra .pulsante { flex: 1; min-height: 52px; border-radius: 12px; font-weight: 800; background: #e2e8f0; }
.telefono .finestra .pulsante.principale { background: var(--t-blu); color: #fff; }
.telefono .finestra .pulsante.rosso { background: var(--t-rosso); color: #fff; }
.telefono #avviso { top: 12px; font-size: 1rem; padding: 12px 18px; border-radius: 14px; width: calc(100% - 32px); max-width: 420px; background: #111827; color: #fff; }

/* sul computer, la vista telefono sta dentro la sagoma di un telefono */
@media (min-width: 700px) and (min-height: 700px) {
  html.telefono body { display: flex; flex-direction: column; align-items: center; background: #cbd5e1; min-height: 100vh; }
  html.telefono #anteprima { background: transparent; }
  html.telefono #app {
    width: 400px; height: min(840px, calc(100vh - 70px)); min-height: 0; overflow-y: auto; margin: 6px 0 16px;
    border: 10px solid #111827; border-radius: 40px; box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
  }
  html.telefono .tel-scuro { min-height: 100%; }
  html.telefono #app > .tel-scuro { position: absolute; inset: 0; min-height: 0; }
}
