/* YouppyTime, nello stile dell'app Orologio di OPPO (ColorOS): fondo chiaro e piatto (nero vero nel tema scuro), schede bianche
   arrotondate, cifre grandi e sottili, verde come colore dei comandi. I colori stanno tutti qui sotto, una volta per tema. */
[data-tema="chiaro"] {
  --sfondo: #f4f5f7; --carta: #ffffff; --testo: #1a1a1a; --tenue: #8a8d93; --linea: #e8e9ec; --premuto: #eceef1;
  --accento: #00b45a; --accento-forte: #009c4e; --su-accento: #ffffff; --accento-tenue: #e3f6eb;
  --rosso: #ee3b3b; --verde: #00b45a; --giallo: #ffb92e;
  --quadrante: #ffffff; --tacche: #d3d5da; --lancetta: #1a1a1a; --interruttore: #d8dade; --tondo: #e9ebee;
  --notte: #232a45; --crepuscolo: #8b78c9; --giorno: #ffd36b;
}
[data-tema="scuro"] {
  --sfondo: #000000; --carta: #1c1c1e; --testo: #f2f2f4; --tenue: #8e9096; --linea: #2c2c2f; --premuto: #2a2a2d;
  --accento: #1fcf73; --accento-forte: #3ddb88; --su-accento: #002a12; --accento-tenue: #10301f;
  --rosso: #ff5c5c; --verde: #1fcf73; --giallo: #ffc44d;
  --quadrante: #1c1c1e; --tacche: #3a3a3e; --lancetta: #f2f2f4; --interruttore: #3a3a3e; --tondo: #2a2a2d;
  --notte: #0c1124; --crepuscolo: #5b4d99; --giorno: #e8b64c;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--sfondo); color: var(--testo); font: 16px/1.4 'OPPO Sans', 'HarmonyOS Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }
h1, h2 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
.cifre { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.icona { display: inline-flex; width: 24px; height: 24px; flex: none; }
.icona svg { width: 100%; height: 100%; }

#app { height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; background: var(--sfondo); position: relative; overflow: hidden; }
#vista { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
#vista::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { body { background: var(--linea); } #app { box-shadow: 0 0 40px rgba(0, 0, 0, .12); } }

/* ---- barra delle schede in basso: icona e nome, quella aperta nel colore dell'app ---- */
#barra { display: flex; padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--sfondo); z-index: 2; }
#barra button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 4px; color: var(--tenue); font-size: 11px; position: relative; }
#barra button span:not(.pallino):not(.icona) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#barra button.attiva { color: var(--accento); }
#barra .icona { width: 25px; height: 25px; }
#barra .pallino { position: absolute; top: 6px; right: calc(50% - 18px); width: 7px; height: 7px; border-radius: 50%; background: var(--accento); }

/* ---- testata: azioni in alto a destra, titolo grande, una riga grigia ---- */
.pagina { padding: env(safe-area-inset-top) 16px 28px; display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.testata { padding: 4px 8px 6px; }
.testata .azioni { display: flex; align-items: center; gap: 2px; min-height: 52px; margin-right: -14px; }
.testata .spazio { flex: 1; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accento); color: var(--su-accento); font-weight: 600; font-size: 15px; margin-left: -6px; }
.avatar.vuoto { background: var(--tondo); color: var(--tenue); }
.avatar .icona { width: 20px; height: 20px; }
.avatar.grande { width: 84px; height: 84px; font-size: 36px; margin: 0; }
.avatar.grande .icona { width: 44px; height: 44px; }
.testata h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; margin-top: 4px; }
.sottotitolo { color: var(--tenue); font-size: 14px; margin-top: 6px; }
.azione { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--testo); transition: background .15s; }
.azione:hover:not(:disabled) { background: var(--premuto); }
.azione:disabled { opacity: .3; }
.azione.accento { color: var(--accento); }
.azione.piccola { width: 36px; height: 36px; color: var(--tenue); }
.azione.piccola .icona { width: 20px; height: 20px; }
.bottone-testo { color: var(--accento); font-weight: 600; font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.bottone-testo:hover { background: var(--premuto); }
.bottone-testo.pericolo { color: var(--rosso); align-self: center; margin-top: 4px; }
.bottone { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 28px; border-radius: 22px; background: var(--accento); color: var(--su-accento); font-weight: 600; font-size: 16px; transition: transform .1s, background .15s; }
.bottone:hover { background: var(--accento-forte); }
.bottone:active { transform: scale(.97); }
.bottone.secondario { background: var(--tondo); color: var(--testo); }
.pillola { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 16px; border-radius: 17px; background: var(--tondo); color: var(--testo); font-weight: 500; font-size: 14px; white-space: nowrap; }
.pillola.tenue { color: var(--tenue); }
.carta { background: var(--carta); border-radius: 16px; }
.elenco { display: flex; flex-direction: column; gap: 10px; }
.intestazione { color: var(--tenue); font-size: 13px; padding: 10px 8px 0; }
.nota { color: var(--tenue); font-size: 13px; }
.nota.centro { text-align: center; padding: 6px 12px; }
.riga-azioni { display: flex; justify-content: center; gap: 10px; }
.vuoto { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; color: var(--tenue); text-align: center; }
.vuoto .icona.grande { width: 96px; height: 96px; color: var(--tacche); }
.vuoto .icona.grande svg { stroke-width: 1.2; }

/* invito a entrare con il profilo YouppyApps */
.invito { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 18px; }
.invito .bottone { min-height: 36px; padding: 0 18px; text-decoration: none; }
a.bottone { text-decoration: none; }

/* interruttore di ColorOS: pillola larga, verde quando è acceso */
.interruttore { width: 46px; height: 26px; border-radius: 13px; background: var(--interruttore); position: relative; flex: none; transition: background .2s; }
.interruttore::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s cubic-bezier(.3, .7, .4, 1); }
.interruttore[aria-checked="true"] { background: var(--accento); }
.interruttore[aria-checked="true"]::after { transform: translateX(20px); }
.interruttore:disabled { opacity: .5; }

/* ---- sveglie ---- */
.sveglia { display: flex; align-items: center; gap: 12px; padding: 16px 18px 16px 20px; cursor: pointer; transition: background .15s; }
.sveglia:active { background: var(--premuto); }
.sveglia-testo { flex: 1; min-width: 0; }
.sveglia .orario { font-size: 38px; font-weight: 300; line-height: 1.1; letter-spacing: -.01em; }
.sveglia .orario small { font-size: 15px; font-weight: 400; margin-right: 4px; }
.sveglia .descrizione { color: var(--tenue); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sveglia.spenta .orario, .sveglia.spenta .descrizione { opacity: .45; }

/* rotelle: la riga centrale grande e scura, le altre più piccole e sbiadite */
.rotelle { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 12px 0 4px; position: relative; }
.rotelle::before { content: ''; position: absolute; left: 8%; right: 8%; top: 50%; height: 56px; margin-top: -24px; border-radius: 14px; background: var(--carta); z-index: 0; }
.rotelle.tre::before { margin-top: -38px; }
.rotelle-segno { font-size: 36px; font-weight: 300; z-index: 1; padding-bottom: 4px; }
.rotella { position: relative; z-index: 1; height: 260px; width: 96px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.rotella::-webkit-scrollbar { display: none; }
.rotella:focus-visible { outline: none; }
.rotella:focus-visible .centro { color: var(--accento); }
.rotella-lista { padding: 104px 0; }
.rotella-voce { height: 52px; display: grid; place-items: center; font-size: 40px; font-weight: 300; color: var(--testo); scroll-snap-align: center; cursor: pointer; user-select: none; white-space: nowrap; transform-origin: center; }
.rotella-voce.centro { font-weight: 400; }
.rotelle:not(.tre) .rotella-voce { font-size: 44px; }
.rotelle.tre .rotella { width: 84px; }
.rotella-colonna { display: flex; flex-direction: column; align-items: center; }
.rotella-unita { font-size: 13px; color: var(--tenue); margin-top: 2px; }
.tra-quanto { text-align: center; color: var(--tenue); font-size: 14px; margin-bottom: 8px; }

/* gruppi di righe, come le impostazioni di ColorOS */
.gruppo { background: var(--carta); border-radius: 16px; padding: 4px 0; display: flex; flex-direction: column; }
.riga, .voce { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 18px; text-align: left; width: 100%; }
.gruppo > .riga + .riga { border-top: 1px solid var(--linea); }
.riga.a-capo { flex-wrap: wrap; padding-bottom: 14px; }
.riga.cliccabile { cursor: pointer; }
.riga.cliccabile:hover:not(:disabled) { background: var(--premuto); }
.riga.gia { opacity: .4; }
.riga-testo, .voce > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.riga-testo b, .voce b { font-weight: 500; font-size: 16px; }
.riga-testo small, .voce small { color: var(--tenue); font-size: 13px; }
.riga .valore { color: var(--tenue); font-size: 18px; font-weight: 300; }
.riga select, .voce select { appearance: none; -webkit-appearance: none; border: 0; background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238a8d93" stroke-width="2" stroke-linecap="round"><path d="M9 6l6 6-6 6"/></svg>') right center / 16px no-repeat; color: var(--tenue); padding: 8px 22px 8px 4px; text-align: right; max-width: 58%; cursor: pointer; }
.riga select option, .voce select option { background: var(--carta); color: var(--testo); }
.riga input[type="text"] { border: 0; background: none; text-align: right; color: var(--tenue); min-width: 0; width: 55%; padding: 8px 0; outline: none; }
.riga input[type="text"]:focus { color: var(--testo); }
.giorni-scelta { display: flex; gap: 6px; justify-content: space-between; width: 100%; margin-top: 10px; }
.giorni-scelta button { width: 38px; height: 38px; border-radius: 50%; background: var(--tondo); color: var(--testo); font-size: 14px; transition: background .15s, color .15s; }
.giorni-scelta button[aria-pressed="true"] { background: var(--accento); color: var(--su-accento); }

/* ---- schermate intere (salgono dal basso) ---- */
.velo.schermata { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .35); display: flex; justify-content: center; animation: appare .2s; }
.schermata-corpo { width: 100%; max-width: 560px; height: 100%; background: var(--sfondo); display: flex; flex-direction: column; animation: sale .28s cubic-bezier(.2, .8, .3, 1); }
.barra-alta { display: flex; align-items: center; gap: 4px; padding: calc(4px + env(safe-area-inset-top)) 6px 4px; min-height: 56px; }
.barra-alta h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schermata-scorre { flex: 1; overflow-y: auto; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.schermata-scorre > .voce { background: var(--carta); border-radius: 16px; }
.schermata-scorre > .carta { padding: 16px 18px; }
.cerca { display: flex; align-items: center; gap: 8px; height: 44px; border-radius: 22px; background: var(--carta); padding: 0 16px; color: var(--tenue); }
.cerca .icona { width: 20px; height: 20px; }
.cerca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--testo); height: 100%; }

/* menu «⋮» */
.velo-menu { position: fixed; inset: 0; z-index: 30; }
.menu { position: fixed; min-width: 200px; background: var(--carta); border-radius: 16px; padding: 6px 0; box-shadow: 0 10px 34px rgba(0, 0, 0, .18); animation: appare .15s; }
.menu button { display: block; width: 100%; text-align: left; padding: 12px 20px; font-size: 15px; }
.menu button:hover, .menu button:focus-visible { background: var(--premuto); outline: none; }

/* ---- orologio mondiale ---- */
.orologio-locale { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 10px; }
.quadrante { width: min(66vw, 256px); aspect-ratio: 1; overflow: visible; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .13)) drop-shadow(0 2px 4px rgba(0, 0, 0, .08)); }
.quadrante.cliccabile { cursor: pointer; transition: transform .2s; }
.quadrante.cliccabile:hover { transform: scale(1.02); }
.quadrante .numero { font-size: 17px; font-weight: 500; text-anchor: middle; dominant-baseline: central; font-family: system-ui, sans-serif; }
.quadrante .numero.grande { font-size: 22px; font-weight: 400; }
.quadrante .numero.romano { font-size: 14px; font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
.quadrante .data-quadrante { font-size: 9px; font-weight: 600; letter-spacing: .12em; text-anchor: middle; dominant-baseline: central; opacity: .75; }
.quadrante .digitale-quadrante { font-size: 15px; font-weight: 300; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.quadrante .ombra-lancette { filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, .28)); }
.quadrante.mini { width: 100%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12)); }
.ora-locale { font-size: 44px; font-weight: 300; line-height: 1.1; }
.ora-locale small { font-size: 16px; margin-left: 4px; color: var(--tenue); }
.citta { display: flex; align-items: center; gap: 12px; padding: 14px 18px 14px 20px; }
.citta-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.citta-testo b { font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citta-testo small { color: var(--tenue); font-size: 13px; }
.citta-ora { display: flex; align-items: center; gap: 8px; }
.citta .orario { font-size: 34px; font-weight: 300; line-height: 1; }
.citta .orario small { font-size: 14px; margin-right: 3px; }
.astro-box .astro { display: block; width: 18px; height: 18px; }
.astro svg { width: 100%; height: 100%; display: block; }
.togli { width: 24px; height: 24px; border-radius: 50%; background: var(--rosso); color: #fff; display: grid; place-items: center; flex: none; }
.togli .icona { width: 16px; height: 16px; }
.togli .icona svg { stroke-width: 3; }
.sposta { padding: 12px 18px; }
.sposta-riga { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tenue); }
.sposta-riga span { flex: 1; }
.sposta-riga b { color: var(--testo); }
.sposta-riga .bottone-testo { padding: 4px 8px; }
.sposta input[type="range"] { width: 100%; accent-color: var(--accento); height: 30px; }

/* ---- cronometro: quadrante a tacche ---- */
.crono { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.crono-quadrante { position: relative; width: min(82vw, 320px); aspect-ratio: 1; display: grid; place-items: center; }
.crono-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crono-svg .tacche { stroke: var(--tacche); }
.crono-svg .tacche.accese { stroke: var(--accento); }
.crono-svg .crono-numero { fill: var(--tenue); font-size: 13px; text-anchor: middle; dominant-baseline: central; }
.crono-svg .crono-punto { fill: var(--accento); }
.crono-tempo { position: relative; text-align: center; }
.crono-tempo .grande { font-size: clamp(40px, 12vw, 52px); font-weight: 300; line-height: 1; }
.crono-tempo .cent { color: var(--tenue); font-size: .62em; }
.crono-tempo .giro-ora { font-size: 14px; color: var(--tenue); margin-top: 8px; min-height: 1.2em; }
.comandi { display: flex; align-items: center; justify-content: center; gap: 36px; padding: 6px 0; }
.comandi.fondo { position: sticky; bottom: 0; margin: auto -16px -28px; padding: 18px 0 22px; background: linear-gradient(transparent, var(--sfondo) 35%); }
.tondo { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tondo); color: var(--testo); transition: transform .1s, background .15s, opacity .15s; }
.tondo:active:not(:disabled) { transform: scale(.93); }
.tondo:disabled { opacity: .35; }
.tondo .icona { width: 24px; height: 24px; }
.tondo.testo { font-size: 14px; font-weight: 500; }
.tondo.principale { width: 72px; height: 72px; background: var(--accento); color: var(--su-accento); }
.tondo.principale .icona { width: 30px; height: 30px; }
.giri { width: 100%; display: flex; flex-direction: column; }
.giro { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 12px 10px; border-top: 1px solid var(--linea); font-size: 15px; }
.giro span:nth-child(2) { text-align: center; }
.giro span:last-child { text-align: right; color: var(--tenue); }
.giro.migliore span:nth-child(2) { color: var(--verde); }
.giro.peggiore span:nth-child(2) { color: var(--rosso); }

/* ---- timer ---- */
.campo-nome { align-self: center; width: min(100%, 300px); height: 40px; border-radius: 20px; border: 0; background: var(--carta); text-align: center; padding: 0 16px; outline: none; font-size: 14px; }
/* minmax(0, 1fr) e min-width: 0: un nome lungo («Uova alla coque») si accorcia coi puntini invece di allargare la colonna fuori schermo */
.pronti { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pronto { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; transition: background .15s; }
.pronto:active { background: var(--premuto); }
/* il nome va a capo su due righe (a 360 px «Lavarsi i denti» e «Maschera viso» non stanno su una), così si legge intero */
.pronto b { font-size: 13px; font-weight: 500; line-height: 1.25; min-height: 2.5em; color: var(--tenue); max-width: 100%; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pronto:has(.togli-pronto) b { padding-right: 16px; }
.pronto span.cifre { font-size: 22px; font-weight: 300; }
.togli-pronto { position: absolute; top: 4px; right: 8px; color: var(--tenue); font-size: 18px; line-height: 1; padding: 2px 4px; }
.timer-grande { position: relative; align-self: center; width: min(78vw, 300px); aspect-ratio: 1; display: grid; place-items: center; margin: 8px 0 6px; }
.anello-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.anello-svg .binario { stroke: var(--tacche); }
.anello-svg .scia { stroke: var(--accento); transition: stroke-dashoffset .1s linear; }
.fermo .anello-svg .scia { stroke: var(--tenue); }
.timer-centro { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.timer-centro .nome { color: var(--tenue); font-size: 14px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-centro .resto { font-size: clamp(44px, 13vw, 58px); font-weight: 300; line-height: 1; }
.timer-centro .fine { color: var(--tenue); font-size: 14px; }
.timer-riga { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; cursor: pointer; }
.mini-anello { position: relative; width: 44px; height: 44px; flex: none; }
.timer-riga .riga-testo b { font-size: 22px; font-weight: 300; }

/* ---- galleria ed editor dei quadranti ---- */
.galleria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tessera { background: var(--carta); border-radius: 18px; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 6px; border: 2px solid transparent; transition: border-color .15s; }
.tessera.scelta { border-color: var(--accento); }
.tessera-tasto { width: 100%; padding: 4px 10px; }
.tessera-nome { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 36px; font-size: 14px; font-weight: 500; }
.tessera.scelta .tessera-nome span::after { content: " \2713"; color: var(--accento); }
.tessera.nuova { align-items: center; justify-content: center; gap: 10px; min-height: 200px; color: var(--accento); font-weight: 600; border: 2px dashed var(--tacche); background: none; }
.piu-grande { width: 54px; height: 54px; border-radius: 50%; background: var(--accento-tenue); display: grid; place-items: center; }
.anteprima-quadrante { display: grid; place-items: center; padding: 10px 0 4px; }
.anteprima-quadrante .quadrante { width: min(58vw, 220px); }
.tavolozze { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tavolozza { width: 40px; height: 40px; border-radius: 50%; border: 3px solid; position: relative; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.tavolozza span { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--carta); }
.segmenti { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 10px; }
.segmenti button { flex: 1 1 auto; min-height: 34px; padding: 0 12px; border-radius: 17px; background: var(--tondo); font-size: 13.5px; white-space: nowrap; }
.segmenti button[aria-checked="true"] { background: var(--accento); color: var(--su-accento); }
.riga input[type="color"] { width: 44px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.riga input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.riga input[type="color"]::-webkit-color-swatch { border: 1px solid var(--linea); border-radius: 10px; }
.riga input[type="range"] { width: 100%; accent-color: var(--accento); margin-top: 6px; }

/* ---- profilo ed etichette ---- */
.profilo-corpo { display: flex; flex-direction: column; gap: 12px; }
.profilo-testa { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 0 6px; }
.profilo-testa h2 { font-size: 22px; font-weight: 600; }
.statistiche { flex-direction: row; padding: 14px 6px; }
.statistiche > div { flex: 1; display: flex; flex-direction: column; align-items: center; }
.statistiche b { font-size: 22px; font-weight: 400; }
.statistiche small { color: var(--tenue); font-size: 12px; }
.etichetta-icona { width: 36px; height: 36px; border-radius: 12px; background: var(--tondo); display: grid; place-items: center; font-size: 19px; flex: none; }
.barretta { width: 54px; height: 6px; border-radius: 3px; background: var(--tondo); overflow: hidden; flex: none; }
.barretta span { display: block; height: 100%; background: var(--accento); border-radius: 3px; }
.nuova-etichetta { display: flex; align-items: center; gap: 8px; width: 100%; }
.nuova-etichetta input { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 12px; background: var(--tondo); padding: 0 12px; outline: none; }
.nuova-etichetta .bottone { min-height: 40px; padding: 0 16px; font-size: 14px; }
.emoji-scelta { width: 40px; height: 40px; border-radius: 12px; background: var(--tondo); font-size: 20px; flex: none; }
.emoji-tavola { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; width: 100%; margin-top: 10px; }
.emoji-tavola button { height: 40px; border-radius: 10px; font-size: 20px; }
.emoji-tavola button:hover { background: var(--tondo); }
.etichette-scelta { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; width: 100%; padding: 2px 0; }
.etichette-scelta::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px 0 10px; border-radius: 17px; background: var(--carta); border: 1px solid var(--linea); font-size: 14px; white-space: nowrap; }
.riga .chip, .gruppo .chip { background: var(--tondo); border-color: transparent; }
.chip.scelta { background: var(--accento); color: var(--su-accento); border-color: var(--accento); }
.chip.tenue { color: var(--tenue); background: none; border-style: dashed; }
.etichette-vuote { color: var(--accento); font-size: 13.5px; text-align: left; padding: 6px 2px; }

/* ---- fotofinish ---- */
.ff-alto { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ff-tempo { font-size: clamp(40px, 12vw, 54px); font-weight: 300; line-height: 1.05; }
.ff-stato { color: var(--tenue); font-size: 14px; text-align: center; min-height: 1.4em; }
.ff-scatola { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; touch-action: none; cursor: ew-resize; user-select: none; flex: none; }
.ff-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ff-scatola.specchio .ff-video { transform: scaleX(-1); }
.ff-linea { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #ff2d2d; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 12px rgba(255, 45, 45, .8); pointer-events: none; }
.ff-linea::before, .ff-linea::after { content: ""; position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #ff2d2d; border: 2px solid #fff; }
.ff-linea::before { top: 6px; }
.ff-linea::after { bottom: 6px; }
.ff-fascia { position: absolute; top: 0; bottom: 0; width: 34px; margin-left: -17px; background: rgba(255, 45, 45, 0); pointer-events: none; transition: background .08s; }
.ff-fascia.attiva { background: rgba(255, 45, 45, .28); }
.ff-suggerimento { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; opacity: .8; pointer-events: none; }
.ff-arrivi { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ff-arrivo { overflow: hidden; }
.ff-immagine { display: block; width: 100%; height: 150px; object-fit: cover; object-position: center; background: #111; border-radius: 16px 16px 0 0; }
.ff-immagine.vuota { display: grid; place-items: center; color: #aaa; font-size: 13px; }
.ff-arrivo-sotto { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; }
.ff-arrivo-sotto .riga-testo b { font-size: 22px; font-weight: 300; }
.ff-arrivo-sotto a { text-decoration: none; }
.ff-rivedi { width: 100%; max-height: 52vh; border-radius: 16px; background: #000; }
.schermata-scorre > .ff-immagine { border-radius: 16px; height: auto; max-height: 200px; }

/* ---- modalità comodino ---- */
#comodino { position: fixed; inset: 0; z-index: 30; background: #000; color: #e9e9e9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; user-select: none; cursor: pointer; }
#comodino .comodino-quadrante { width: min(44vw, 36vh); filter: brightness(.85); }
#comodino.tenue .comodino-quadrante { filter: brightness(.35); }
#comodino .ora { font-size: min(28vw, 44vh); font-weight: 200; line-height: 1; }
#comodino .sotto { font-size: min(5vw, 20px); opacity: .6; text-align: center; }
#comodino .uscita { position: absolute; bottom: 20px; font-size: 13px; opacity: .4; }
#comodino.tenue { color: #555; }

/* ---- la sveglia che suona: fondo scuro sfumato, ora grande, «Posticipa» e il grande tasto per fermare ---- */
#suoneria { position: fixed; inset: 0; z-index: 40; background: radial-gradient(120% 80% at 50% 0%, #1f5c45 0%, #0d2a20 45%, #050b09 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(56px + env(safe-area-inset-top)) 24px calc(44px + env(safe-area-inset-bottom)); text-align: center; }
#suoneria .campana { display: none; }
#suoneria .ora { font-size: clamp(76px, 25vw, 120px); font-weight: 200; line-height: 1; }
#suoneria h2 { font-size: 20px; font-weight: 500; margin-top: 12px; }
#suoneria p { opacity: .7; font-size: 14px; margin-top: 4px; }
#suoneria .bottoni { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
#suoneria .bottone.secondario { background: rgba(255, 255, 255, .14); color: #fff; min-height: 44px; backdrop-filter: blur(8px); }
#suoneria .bottone:last-child { width: 96px; height: 96px; border-radius: 50%; padding: 0; background: #fff; color: #0d2a20; font-size: 17px; box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); animation: pulsa 1.6s infinite; }
@keyframes pulsa { to { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0); } }
@keyframes appare { from { opacity: 0; } }
@keyframes sale { from { transform: translateY(30%); opacity: 0; } }

#avviso { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(40, 40, 42, .92); color: #fff; padding: 10px 18px; border-radius: 20px; z-index: 50; font-size: 14px; max-width: calc(100% - 32px); text-align: center; animation: appare .2s; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.nuova-etichetta input[type="text"] { text-align: left; width: auto; color: var(--testo); padding: 0 12px; }

/* ---- pagina Profilo nella barra (correzione 02.11) ---- */
.reg { padding-top: 6px; padding-bottom: 6px; }
.reg-apri { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 4px 0; }
.reg-tempo { flex: none; min-width: 74px; font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.reg-tempo small { font-size: 13px; color: var(--tenue); }
.reg-tempo.spento { color: var(--tenue); }
.reg-giri { width: 100%; display: flex; flex-direction: column; gap: 0; padding: 2px 0 4px 86px; color: var(--tenue); font-size: 14px; }
.reg-giri .giro { padding: 7px 0; font-size: 14px; }
.icona.piena svg { fill: currentColor; }
.centro-testo { justify-content: center; color: var(--accento); font-weight: 600; font-size: 14px; min-height: 46px; }
.azione.piccola.accento { color: var(--accento); }
.avatar.vuoto { flex: none; padding: 0; gap: 0; display: grid; }   /* «.vuoto» (stato vuoto delle liste) lo allargava a ovale per gli ospiti */
