/* Bella Roma — web app clienti */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/fraunces.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/fraunces-italic.woff2') format('woff2'); }
@font-face { font-family: 'Karla'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/karla.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --crema: #F8F1E6;
  --carta: #FFFCF7;
  --sabbia: #F2E7D6;
  --sabbia-2: #EADCC6;
  --linea: #E9DCC8;
  --inchiostro: #241A13;
  --testo-2: #6B5C4E;
  --testo-3: #978776;
  --pomodoro: #B8321F;
  --pomodoro-2: #9A2817;
  --pomodoro-chiaro: #F7E1DA;
  --basilico: #2F6A3C;
  --basilico-chiaro: #E3EEDF;
  --oro: #E3A33C;
  --scuro: #17110D;
  --ombra-1: 0 1px 2px rgba(70, 40, 15, .05), 0 3px 12px rgba(70, 40, 15, .06);
  --ombra-2: 0 10px 34px rgba(70, 40, 15, .14);
  --ombra-cta: 0 8px 22px rgba(184, 50, 31, .28);
  --r: 22px;
  --r-m: 16px;
  --r-s: 12px;
  --titolo: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --testo: 'Karla', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lato: 20px;
  --alto: env(safe-area-inset-top, 0px);
  --basso: env(safe-area-inset-bottom, 0px);
  --dolce: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; min-height: 100dvh; background: var(--crema); color: var(--inchiostro);
  font: 400 16px/1.5 var(--testo); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
body.bloccato { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pomodoro) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── ACCENSIONE ─────────────────────────────────────────── */
/* stesso sfondo dell'app: prima la pizzeria, poi chi ha fatto l'app */
#accensione {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--crema);
  transition: opacity .5s ease, visibility .5s;
}
#accensione .insieme { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -4vh; }
#accensione img { height: auto; opacity: 0; transform: scale(.94); }
#accensione .br { width: min(60vw, 250px); animation: logo-dentro .9s var(--dolce) .1s forwards; }
#accensione .per { font: 500 28px/1 var(--titolo); color: var(--testo-3); opacity: 0; animation: logo-dentro .5s var(--dolce) .6s forwards; }
#accensione .ch { width: min(27vw, 104px); margin-top: 6px; animation: logo-dentro .7s var(--dolce) .75s forwards; }
#accensione.via { opacity: 0; visibility: hidden; }
@keyframes logo-dentro { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #accensione img, #accensione .per { animation-duration: .01s; animation-delay: 0s; } }

/* ── STRUTTURA ──────────────────────────────────────────── */
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.schermo { padding: calc(var(--alto) + 8px) var(--lato) calc(var(--basso) + 120px); animation: entra .28s var(--dolce); }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.schermo.indietro { animation: entra-sx .26s var(--dolce); }
@keyframes entra-sx { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* barra alta */
.barra { display: flex; align-items: center; gap: 12px; height: 60px; }
.barra .logo { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); background: var(--carta); object-fit: cover; }
.barra .marchio { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.barra .marchio b { font: 600 19px/1.1 var(--titolo); letter-spacing: -.01em; }
.tag-prova { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 2px 7px; border-radius: 99px; font: 700 11px/1.2 var(--testo); letter-spacing: .05em; text-transform: uppercase; background: var(--pomodoro-chiaro); color: var(--pomodoro-2); }
.stato-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--testo-2); margin-top: 3px; }
.stato-pill i { width: 7px; height: 7px; border-radius: 50%; background: #3E9A55; box-shadow: 0 0 0 3px rgba(62, 154, 85, .16); }
.stato-pill.chiuso i { background: var(--pomodoro); box-shadow: 0 0 0 3px rgba(184, 50, 31, .14); }
.barra .spazio { flex: 1; }
.tondo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--carta); box-shadow: 0 0 0 1px var(--linea); position: relative; transition: transform .12s; }
.tondo:active { transform: scale(.94); }
.tondo svg { width: 22px; height: 22px; }
.tondo .conta { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pomodoro); color: #fff; font: 700 12px/20px var(--testo); text-align: center; box-shadow: 0 0 0 2px var(--crema); }

/* titoli */
.saluto { margin: 18px 0 4px; font: 600 34px/1.05 var(--titolo); letter-spacing: -.02em; }
.saluto em { font-style: italic; font-weight: 500; color: var(--pomodoro); }
.sotto-saluto { margin: 0 0 20px; color: var(--testo-2); font-size: 17px; }
.sezione { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.sezione h2 { margin: 0; font: 600 23px/1.15 var(--titolo); letter-spacing: -.01em; }
.sezione span { font-size: 13px; color: var(--testo-3); white-space: nowrap; }
.nota { font-size: 14px; color: var(--testo-2); margin: 6px 0 0; }

/* ricerca finta in home */
.cerca-finta { width: 100%; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; border-radius: 27px; background: var(--carta); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); color: var(--testo-3); font-size: 16px; text-align: left; }
.cerca-finta svg { width: 20px; height: 20px; color: var(--testo-2); flex: none; }

/* ── CARD PIZZA ─────────────────────────────────────────── */
.lista { display: flex; flex-direction: column; gap: 12px; }
.pizza-card { position: relative; display: flex; align-items: stretch; background: var(--carta); border-radius: var(--r); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); overflow: hidden; }
.pizza-card .apri { flex: 1; min-width: 0; display: flex; gap: 14px; align-items: center; padding: 12px 58px 12px 12px; text-align: left; transition: background .15s; }
.pizza-card .apri:active { background: var(--sabbia); }
.foto { flex: none; width: 92px; height: 92px; border-radius: 18px; background: radial-gradient(circle at 50% 42%, #F7EDDD 0, var(--sabbia) 70%); display: grid; place-items: center; }
.foto svg { width: 84px; height: 84px; }
.pizza-card .testo { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pizza-card .nome { font: 600 23px/1.1 var(--titolo); letter-spacing: -.015em; overflow-wrap: anywhere; }
.pizza-card .ing { font-size: 14.5px; line-height: 1.35; color: var(--testo-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pizza-card .prezzo { margin-top: 4px; font-weight: 700; font-size: 16px; color: var(--pomodoro); font-variant-numeric: tabular-nums; }
.pizza-card .piu { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pomodoro); color: #fff; box-shadow: var(--ombra-cta); transition: transform .12s, background .15s; }
.pizza-card .piu:active { transform: scale(.9); background: var(--pomodoro-2); }
.pizza-card .piu svg { width: 20px; height: 20px; }
.pizza-card.finita { opacity: .55; }
.pizza-card.finita .piu { display: none; }
.etichetta { display: inline-flex; align-self: flex-start; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: var(--sabbia); color: var(--testo-2); }
.etichetta.rossa { background: var(--pomodoro-chiaro); color: var(--pomodoro-2); }
.etichetta.verde { background: var(--basilico-chiaro); color: var(--basilico); }

/* card speciali */
.card-maxi { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, #2B1D14, #3A281C); color: #FBEFDD; text-align: left; box-shadow: var(--ombra-2); position: relative; overflow: hidden; }
.card-maxi svg.anteprima { width: 150px; flex: none; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
.card-maxi b { display: block; font: 600 22px/1.1 var(--titolo); }
.card-maxi span { display: block; font-size: 14px; opacity: .8; margin-top: 4px; }
.card-maxi .freccia { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.card-maxi .freccia svg { width: 16px; height: 16px; }
.card-maxi > span:not(.freccia) { padding-right: 26px; }   /* il titolo non finisce sotto la freccia */

.card-bianca { background: var(--carta); border-radius: var(--r); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); padding: 18px; }
.card-attivo { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r); background: var(--basilico); color: #fff; text-align: left; box-shadow: 0 10px 26px rgba(47, 106, 60, .3); margin: 6px 0 4px; }
.card-attivo .icona { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.card-attivo .icona svg { width: 26px; height: 26px; }
.card-attivo b { display: block; font: 600 19px/1.15 var(--titolo); }
.card-attivo span { font-size: 14px; opacity: .88; }

.ripeti { display: flex; flex-direction: column; gap: 12px; }
.ripeti .mini { display: flex; gap: -8px; }
.ripeti .mini .foto { width: 48px; height: 48px; border-radius: 50%; margin-right: -10px; box-shadow: 0 0 0 3px var(--carta); }
.ripeti .mini .foto svg { width: 44px; height: 44px; }
.ripeti p { margin: 0; color: var(--testo-2); font-size: 14.5px; }

/* ── BOTTONI ────────────────────────────────────────────── */
.bottone { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 22px; border-radius: 28px; background: var(--pomodoro); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .01em; box-shadow: var(--ombra-cta); transition: transform .12s, background .15s, box-shadow .15s, opacity .15s; }
.bottone:active:not(:disabled) { transform: scale(.98); background: var(--pomodoro-2); }
.bottone:disabled { background: #CDBFAE; box-shadow: none; }
.bottone svg { width: 20px; height: 20px; }
.bottone .dx { margin-left: auto; font-variant-numeric: tabular-nums; }
.bottone.chiaro { background: var(--carta); color: var(--inchiostro); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); }
.bottone.chiaro:active:not(:disabled) { background: var(--sabbia); }
.bottone.verde { background: var(--basilico); box-shadow: 0 8px 22px rgba(47, 106, 60, .26); }
.bottone.contorno { background: transparent; color: var(--pomodoro); box-shadow: inset 0 0 0 1.5px var(--pomodoro); }
.bottone.piccolo { min-height: 46px; font-size: 15px; border-radius: 23px; }
.bottone.carica { pointer-events: none; opacity: .85; }
.bottone.carica::after { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.link { color: var(--pomodoro); font-weight: 700; text-decoration: none; padding: 6px 0; }

/* barra ordine in basso */
.barra-ordine { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px var(--lato) calc(var(--basso) + 12px); background: linear-gradient(to top, var(--crema) 70%, rgba(248, 241, 230, 0)); pointer-events: none; }
.barra-ordine > * { max-width: 520px; margin: 0 auto; pointer-events: auto; }
.barra-ordine .bottone .conta { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 15px; }
.barra-ordine.salta .bottone { animation: salta .5s var(--dolce); }
@keyframes salta { 30% { transform: scale(1.04); } 60% { transform: scale(.99); } }

/* ── MENU ───────────────────────────────────────────────── */
.testa-fissa { position: sticky; top: 0; z-index: 20; margin: 0 calc(-1 * var(--lato)); padding: calc(var(--alto) + 10px) var(--lato) 10px; background: rgba(248, 241, 230, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.riga-cerca { display: flex; gap: 10px; align-items: center; }
.campo-cerca { flex: 1; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 26px; background: var(--carta); box-shadow: 0 0 0 1px var(--linea); }
.campo-cerca:focus-within { box-shadow: 0 0 0 2px var(--pomodoro); }
.campo-cerca svg { width: 20px; height: 20px; color: var(--testo-2); flex: none; }
.campo-cerca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.campo-cerca input::placeholder { color: var(--testo-3); }
.campo-cerca .pulisci { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sabbia); }
.campo-cerca .pulisci svg { width: 14px; height: 14px; }
/* barra delle categorie: si scorre di lato dentro la barra, la pagina no */
.salti { display: flex; gap: 8px; overflow-x: auto; margin: 12px calc(-1 * var(--lato)) 0; padding: 2px var(--lato) 4px; scrollbar-width: none; }
.salti::-webkit-scrollbar { display: none; }
.salto { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px 0 16px; border-radius: 22px; background: var(--carta); box-shadow: 0 0 0 1px var(--linea); font-size: 15px; font-weight: 700; color: var(--testo-2); transition: background .2s, color .2s, box-shadow .2s; }
.salto:last-child { padding-right: 16px; }
.salto .n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center; background: var(--sabbia); font-size: 12.5px; font-variant-numeric: tabular-nums; transition: background .2s; }
.salto[aria-current="true"] { background: var(--inchiostro); color: #fff; box-shadow: none; }
.salto[aria-current="true"] .n { background: rgba(255, 255, 255, .18); }
.conteggio { font-size: 14px; color: var(--testo-3); margin: 14px 2px 0; }
/* sezioni del menù: righe compatte raccolte in un'unica scheda, cosi' a schermo ci stanno piu' pizze */
.sezione-menu { margin-top: 26px; }
.sezione-menu > header { margin: 0 2px 12px; }
.sezione-menu h2 { margin: 0; font: 600 24px/1.15 var(--titolo); letter-spacing: -.01em; }
.sezione-menu > header span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--testo-3); }
/* la ricerca ha gia' la sua X: niente quella del browser */
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.gruppo-righe { background: var(--carta); border-radius: var(--r); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); overflow: hidden; }
.pizza-card.riga { border-radius: 0; box-shadow: none; background: transparent; }
.pizza-card.riga + .pizza-card.riga { box-shadow: inset 0 1px 0 var(--linea); }
.pizza-card.riga .apri { gap: 12px; padding: 10px 66px 10px 10px; }
.pizza-card.riga .foto { width: 72px; height: 72px; border-radius: 16px; }
.pizza-card.riga .foto svg { width: 66px; height: 66px; }
.pizza-card.riga .nome { font-size: 19px; }
.pizza-card.riga .ing { font-size: 13.5px; line-height: 1.3; }
.pizza-card.riga .prezzo { margin-top: 2px; font-size: 15px; }
.pizza-card.riga .piu { top: 50%; bottom: auto; right: 12px; width: 44px; height: 44px; margin-top: -22px; }
/* home: l'ingresso al menù completo */
.card-menu { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; padding: 14px 14px 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, var(--pomodoro), #992616); color: #fff; text-align: left; box-shadow: var(--ombra-cta); transition: transform .12s; }
.card-menu:active { transform: scale(.985); }
.card-menu .pila { display: flex; flex: none; }
.card-menu .pila .foto { width: 50px; height: 50px; border-radius: 50%; background: #F7EDDD; box-shadow: 0 0 0 3px #B53120; }
.card-menu .pila .foto + .foto { margin-left: -18px; }
.card-menu .pila .foto svg { width: 46px; height: 46px; }
.card-menu .t { flex: 1; min-width: 0; }
.card-menu b { display: block; font: 600 21px/1.1 var(--titolo); letter-spacing: -.01em; }
.card-menu .t span { display: block; margin-top: 4px; font-size: 14px; opacity: .9; }
.card-menu .freccia { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.card-menu .freccia svg { width: 18px; height: 18px; }
.vuoto { text-align: center; padding: 40px 12px; color: var(--testo-2); }
.vuoto b { display: block; font: 600 22px/1.2 var(--titolo); color: var(--inchiostro); margin-bottom: 6px; }

/* ── FOGLIO (personalizzazione e maxi) ──────────────────── */
.foglio-velo { position: fixed; inset: 0; z-index: 50; background: rgba(36, 26, 19, .42); animation: velo .25s ease; }
@keyframes velo { from { opacity: 0; } }
.foglio { position: fixed; inset: 0; z-index: 51; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--crema); animation: su .34s var(--dolce); }
@keyframes su { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.foglio.chiude { animation: giu .22s ease forwards; }
@keyframes giu { to { transform: translateY(30px); opacity: 0; } }
.foglio-corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--lato) 24px; }
.foglio-testa { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; margin: 0 calc(-1 * var(--lato)); padding: calc(var(--alto) + 10px) var(--lato) 8px; background: linear-gradient(var(--crema) 72%, rgba(248, 241, 230, 0)); }
.foglio-piede { flex: none; display: flex; gap: 12px; align-items: center; padding: 12px var(--lato) calc(var(--basso) + 12px); background: var(--carta); box-shadow: 0 -1px 0 var(--linea), 0 -8px 24px rgba(70, 40, 15, .06); }
.palco { position: relative; display: grid; place-items: center; margin: 0 auto 8px; width: min(78vw, 330px); aspect-ratio: 1; }
.palco::before { content: ''; position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, #F2E4CC 0, rgba(242, 228, 204, 0) 70%); }
.palco svg { position: relative; width: 100%; height: 100%; }
.palco.metro { width: 100%; aspect-ratio: 360 / 190; }
.palco.metro::before { border-radius: 30px; }
.cade { transform-box: fill-box; transform-origin: center; animation: cade .5s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes cade { from { opacity: 0; transform: translateY(-14px) scale(1.5); } to { opacity: 1; transform: none; } }
/* pizze fotografiche: i pezzi nuovi cadono sulla pizza (unita' della foto, 1000 = pizza intera) */
.cade-f { transform-box: fill-box; transform-origin: center; animation: cade-f .5s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes cade-f { from { opacity: 0; transform: translateY(-60px) scale(1.5); } to { opacity: 1; transform: none; } }
/* pagina della pizza: inclinata come appoggiata sul tavolo, con lo spessore del cornicione e l'ombra */
.pz3d { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.pz3d-ombra { position: absolute; left: 6%; right: 6%; top: 50%; height: 36%; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 30, 10, .42), rgba(60, 30, 10, 0)); filter: blur(5px); }
.pz3d-inclina { position: relative; width: 98%; transform: perspective(820px) rotateX(44deg); transform-origin: 50% 58%; }
.palco .pz3d-inclina svg { display: block; width: 100%; height: auto; }
.palco .pz3d-inclina .pz3d-spessore { position: absolute; inset: 0; height: 100%; transform: translateY(3.2%); filter: brightness(.55) saturate(1.1); }
.palco:has(.pz3d)::before { display: none; }
.ing-foto { display: block; width: 86%; height: 86%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .cade-f { animation: none; } }
.titolo-pizza { text-align: center; margin: 4px 0 2px; font: 600 32px/1.05 var(--titolo); letter-spacing: -.02em; }
.ricetta { text-align: center; margin: 6px auto 0; max-width: 34ch; color: var(--testo-2); font-size: 15px; }
.ricetta .tolto { text-decoration: line-through; opacity: .55; }
.ricetta .aggiunto { color: var(--basilico); font-weight: 700; }
.avviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: #FBF0D9; color: #7A5516; font-size: 14.5px; margin-top: 14px; }
.avviso svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.avviso.rosso { background: var(--pomodoro-chiaro); color: var(--pomodoro-2); }
.avviso.verde { background: var(--basilico-chiaro); color: var(--basilico); }

.gruppo { margin-top: 26px; }
.gruppo > h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 10px; font: 600 19px/1.2 var(--titolo); }
.gruppo > h3 small { font: 400 13px var(--testo); color: var(--testo-3); }
.gettoni { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gettone { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px 8px 8px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); text-align: left; transition: background .15s, box-shadow .15s, transform .12s; }
.gettone:active:not(:disabled) { transform: scale(.97); }
.gettone .ico { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--sabbia); display: grid; place-items: center; }
.gettone .ico svg { width: 30px; height: 30px; }
.gettone .t { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.gettone .t b { font-weight: 700; font-size: 14px; line-height: 1.2; hyphens: auto; }
.gettone .t small { font-size: 13px; color: var(--testo-3); font-variant-numeric: tabular-nums; }
.gettone .spunta { position: absolute; left: 32px; top: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--pomodoro); box-shadow: 0 0 0 2px var(--carta); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .2s var(--dolce); }
.gettone .spunta svg { width: 12px; height: 12px; }
.gettone[aria-pressed="true"] { background: #FDF3EF; box-shadow: 0 0 0 2px var(--pomodoro); }
.gettone[aria-pressed="true"] .spunta { opacity: 1; transform: none; }
.gettone[aria-pressed="true"] .t small { color: var(--pomodoro); }
.gettone:disabled { opacity: .45; }
.gettone.togli[aria-pressed="true"] { background: var(--sabbia); box-shadow: 0 0 0 1.5px var(--testo-3); }
.gettone.togli[aria-pressed="true"] .t b { text-decoration: line-through; color: var(--testo-3); }
.gettone.togli[aria-pressed="true"] .spunta { background: var(--testo-3); }
.cerca-ing { margin-top: 18px; }
.cerca-ing .campo-cerca { height: 48px; }
.cerca-ing #risultati-ing { margin-top: 10px; }
.fisarmonica { border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); margin-top: 8px; overflow: hidden; }
.fisarmonica > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 16px; font-weight: 700; text-align: left; }
.fisarmonica > button svg { width: 18px; height: 18px; transition: transform .2s; color: var(--testo-2); }
.fisarmonica > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.fisarmonica > button .quanti { margin-left: auto; margin-right: 8px; font-size: 13px; color: var(--pomodoro); }
.fisarmonica .dentro { padding: 0 10px 12px; }
.fisarmonica .gettone { box-shadow: 0 0 0 1px var(--linea); }

.meta-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); }
.meta-box .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--sabbia); display: grid; place-items: center; flex: none; }
.meta-box .ico svg { width: 34px; height: 34px; }
.meta-box .t { flex: 1; min-width: 0; }
.meta-box .t b { display: block; font-weight: 700; }
.meta-box .t small { color: var(--testo-3); font-size: 13px; }

.passo { display: flex; align-items: center; background: var(--sabbia); border-radius: 28px; height: 56px; flex: none; }
.passo button { width: 48px; height: 56px; display: grid; place-items: center; border-radius: 28px; }
.passo button:active:not(:disabled) { background: var(--sabbia-2); }
.passo button:disabled { opacity: .35; }
.passo button svg { width: 20px; height: 20px; }
.passo output { min-width: 26px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.passo.piccolo { height: 40px; border-radius: 20px; }
.passo.piccolo button { width: 38px; height: 40px; border-radius: 20px; }
.passo.piccolo output { min-width: 20px; font-size: 16px; }

/* scelta gusto (maxi) e scelta meta' */
.segmenti { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 26px; background: var(--sabbia); margin: 4px 0 16px; }
.segmenti button { height: 46px; border-radius: 22px; font-weight: 700; font-size: 15px; color: var(--testo-2); transition: background .2s, color .2s, box-shadow .2s; }
.segmenti button[aria-pressed="true"] { background: var(--carta); color: var(--inchiostro); box-shadow: var(--ombra-1); }
.tocco { fill: transparent; cursor: pointer; }
.fette { display: grid; gap: 8px; margin-top: 10px; }
.fetta { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); text-align: left; }
.fetta[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pomodoro); background: #FDF3EF; }
.fetta .n { width: 30px; height: 30px; border-radius: 50%; background: var(--sabbia); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.fetta[aria-pressed="true"] .n { background: var(--pomodoro); color: #fff; }
.fetta .t { flex: 1; min-width: 0; }
.fetta .t b { display: block; font: 600 17px/1.2 var(--titolo); }
.fetta .t small { color: var(--testo-3); font-size: 13px; }
.fetta .mod { font-size: 13px; font-weight: 700; color: var(--pomodoro); padding: 8px 4px; }
.scelta-lista { display: flex; flex-direction: column; margin-top: 10px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); overflow: hidden; }
.scelta { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px 8px 8px; text-align: left; border-top: 1px solid var(--linea); }
.scelta:first-child { border-top: 0; }
.scelta:active { background: var(--sabbia); }
.scelta .foto { width: 46px; height: 46px; border-radius: 12px; }
.scelta .foto svg { width: 42px; height: 42px; }
.scelta .t { flex: 1; min-width: 0; }
.scelta .t b { display: block; font: 600 17px/1.2 var(--titolo); }
.scelta .t small { display: block; color: var(--testo-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scelta:disabled { opacity: .45; }

/* ── CARRELLO ───────────────────────────────────────────── */
.titolo-pagina { display: flex; align-items: center; gap: 12px; height: 60px; }
.titolo-pagina h1 { margin: 0; font: 600 26px/1.1 var(--titolo); letter-spacing: -.01em; }
.avanzamento { display: flex; gap: 6px; margin: 2px 0 18px; }
.avanzamento i { flex: 1; height: 4px; border-radius: 2px; background: var(--sabbia-2); }
.avanzamento i.fatto { background: var(--pomodoro); }
.voce { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linea); }
.voce:first-child { border-top: 0; }
.voce .foto { width: 58px; height: 58px; border-radius: 16px; }
.voce .foto svg { width: 54px; height: 54px; }
.voce .t { flex: 1; min-width: 0; }
.voce .t b { display: block; font: 600 18px/1.15 var(--titolo); }
.voce .t small { display: block; color: var(--testo-2); font-size: 13.5px; line-height: 1.35; }
.voce .t .p { display: block; margin-top: 2px; font-weight: 700; color: var(--pomodoro); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.voce .modifica { padding: 4px 0; font-size: 13px; font-weight: 700; color: var(--testo-2); text-decoration: underline; text-underline-offset: 3px; }
.voce .tondo.piccolo { width: 36px; height: 36px; }
.voce .tondo.piccolo svg { width: 18px; height: 18px; }
.extra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.extra-voce { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); text-align: center; }
.extra-voce .ico { width: 44px; height: 44px; }
.extra-voce b { font-size: 13.5px; line-height: 1.2; font-weight: 700; }
.extra-voce small { font-size: 12.5px; color: var(--testo-3); }
.extra-voce .passo.piccolo { margin-top: 2px; background: var(--sabbia); }
.extra-voce .aggiungi { margin-top: 2px; height: 40px; width: 100%; border-radius: 20px; background: var(--sabbia); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.extra-voce .aggiungi svg { width: 16px; height: 16px; }
.extra-voce.su { box-shadow: 0 0 0 2px var(--pomodoro); }
.extra-voce.finita { opacity: .45; }
.totali { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; }
.totali div { display: flex; justify-content: space-between; color: var(--testo-2); }
.totali .tot { color: var(--inchiostro); font-weight: 800; font-size: 19px; padding-top: 10px; border-top: 1px solid var(--linea); }
.totali span:last-child { font-variant-numeric: tabular-nums; }

/* ── MODULO CONSEGNA ────────────────────────────────────── */
.campo { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; position: relative; }
.campo > label { font-weight: 700; font-size: 14.5px; }
.campo .aiuto { font-size: 13px; color: var(--testo-3); }
.campo .errore { font-size: 13.5px; color: var(--pomodoro); font-weight: 600; }
.input { width: 100%; height: 56px; padding: 0 16px; border-radius: var(--r-m); border: 0; background: var(--carta); box-shadow: 0 0 0 1px var(--linea); font-size: 17px; outline: 0; transition: box-shadow .15s; }
.input:focus { box-shadow: 0 0 0 2px var(--pomodoro); }
.input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--pomodoro); background: #FFF7F4; }
.input:disabled { background: var(--sabbia); color: var(--testo-2); }
.input::placeholder { color: var(--testo-3); }
.due-campi { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
.suggerimenti { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea), var(--ombra-2); overflow: hidden; }
.suggerimenti button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 16px; text-align: left; font-size: 16px; border-top: 1px solid var(--linea); }
.suggerimenti button:first-child { border-top: 0; }
.suggerimenti button:active, .suggerimenti button.att { background: var(--sabbia); }
.suggerimenti svg { width: 18px; height: 18px; color: var(--testo-3); flex: none; }
.via-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--basilico); font-weight: 700; }
.via-ok svg { width: 16px; height: 16px; }
.orari { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.orario { position: relative; height: 52px; border-radius: var(--r-s); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; transition: background .15s, box-shadow .15s, color .15s; }
.orario[aria-pressed="true"] { background: var(--inchiostro); color: #fff; box-shadow: none; }
.orario.primo::before { content: 'prima possibile'; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: var(--basilico); color: #fff; }
.fascia-nome { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--testo-3); text-transform: uppercase; letter-spacing: .08em; }
.privacy { font-size: 12.5px; color: var(--testo-3); line-height: 1.45; margin: 14px 2px 0; }

/* riepilogo */
.riepilogo .riga { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--linea); font-size: 15.5px; }
.riepilogo .riga:first-child { border-top: 0; }
.riepilogo .riga span:first-child { min-width: 0; }
.riepilogo .riga small { display: block; color: var(--testo-3); font-size: 13px; }
.riepilogo .riga span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.riepilogo .riga span:only-child { white-space: normal; font-weight: 400; overflow-wrap: anywhere; }
.dettagli { display: grid; gap: 12px; }
.dettaglio { display: flex; gap: 12px; align-items: flex-start; }
.dettaglio svg { width: 22px; height: 22px; color: var(--pomodoro); flex: none; margin-top: 1px; }
.dettaglio b { display: block; font-weight: 700; }
.dettaglio span { color: var(--testo-2); font-size: 14.5px; }

/* ── ATTESA ─────────────────────────────────────────────── */
.attesa-scena { margin: 8px calc(-1 * var(--lato)) 0; aspect-ratio: 1.15; position: relative; overflow: hidden; }
.attesa-scena svg { width: 100%; height: 100%; }
.stato-ordine { text-align: center; margin-top: -6px; }
.stato-ordine .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--basilico-chiaro); color: var(--basilico); font-weight: 800; font-size: 13.5px; letter-spacing: .02em; }
.stato-ordine .pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulsa 1.6s ease-in-out infinite; }
.stato-ordine .pill.forno { background: #FDE9D6; color: #B4520F; }
@keyframes pulsa { 50% { opacity: .35; } }
.stato-ordine h1 { margin: 12px 0 4px; font: 600 30px/1.1 var(--titolo); letter-spacing: -.02em; }
.stato-ordine .ora { font: 600 54px/1 var(--titolo); color: var(--pomodoro); letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: lining-nums; }
.stato-ordine p { margin: 0; color: var(--testo-2); }
.tappe { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 18px 0 4px; }
.tappa { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--testo-3); }
.tappa i { width: 22px; height: 22px; border-radius: 50%; background: var(--sabbia-2); display: grid; place-items: center; }
.tappa i svg { width: 13px; height: 13px; color: #fff; }
.tappa.fatta { color: var(--inchiostro); }
.tappa.fatta i { background: var(--basilico); }
.tappa.ora i { background: var(--oro); }
.tappe .filo { width: 22px; height: 2px; background: var(--sabbia-2); border-radius: 1px; }
.azioni-ordine { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.scadenza { font-size: 13px; color: var(--testo-3); text-align: center; margin-top: 8px; }
.chiama { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); text-decoration: none; margin-top: 16px; }
.chiama .icona { width: 46px; height: 46px; border-radius: 50%; background: var(--pomodoro-chiaro); color: var(--pomodoro); display: grid; place-items: center; flex: none; }
.chiama .icona svg { width: 22px; height: 22px; }
.chiama b { display: block; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.chiama span { font-size: 13.5px; color: var(--testo-2); }

/* interruttore "avvisami" */
.interruttore { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--r-m); background: var(--carta); box-shadow: 0 0 0 1px var(--linea); cursor: pointer; }
.interruttore input { position: absolute; opacity: 0; pointer-events: none; }
.interruttore .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--basilico-chiaro); color: var(--basilico); display: grid; place-items: center; flex: none; }
.interruttore .ico svg { width: 20px; height: 20px; }
.interruttore .t { flex: 1; min-width: 0; line-height: 1.25; }
.interruttore .t b { display: block; font-weight: 700; font-size: 15px; }
.interruttore .t small { color: var(--testo-3); font-size: 13px; }
.interruttore .leva { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--sabbia-2); flex: none; transition: background .2s; }
.interruttore .leva::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .22s var(--dolce); }
.interruttore input:checked ~ .leva { background: var(--basilico); }
.interruttore input:checked ~ .leva::after { transform: translateX(20px); }
.interruttore input:focus-visible ~ .leva { outline: 3px solid color-mix(in srgb, var(--pomodoro) 55%, transparent); outline-offset: 2px; }

/* ── PIE' DI PAGINA ─────────────────────────────────────── */
.piede { margin: 44px 0 0; padding: 26px 0 10px; border-top: 1px solid var(--linea); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.piede img { width: 104px; height: auto; opacity: .82; }
.piede p { margin: 0; font-size: 13px; color: var(--testo-3); }
.piede a { color: var(--testo-2); font-weight: 700; text-decoration: none; }

/* ── AVVISI A COMPARSA ──────────────────────────────────── */
#brindisi { position: fixed; left: 50%; bottom: calc(var(--basso) + 96px); transform: translateX(-50%) translateY(20px); z-index: 80; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 40px); padding: 12px 18px; border-radius: 16px; background: var(--inchiostro); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--ombra-2); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--dolce); }
#brindisi.su { opacity: 1; transform: translateX(-50%); }
#brindisi svg { width: 18px; height: 18px; color: #8BD19B; flex: none; }

.dialogo-velo { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(36, 26, 19, .46); animation: velo .2s ease; padding: 0 12px calc(var(--basso) + 12px); }
.dialogo { width: 100%; max-width: 520px; border-radius: 26px; background: var(--carta); padding: 24px 20px 18px; box-shadow: var(--ombra-2); animation: su .3s var(--dolce); }
.dialogo h2 { margin: 0 0 6px; font: 600 24px/1.15 var(--titolo); }
.dialogo p { margin: 0 0 18px; color: var(--testo-2); }
.dialogo .bottoni { display: grid; gap: 10px; }
.dialogo .orari { margin-bottom: 16px; }

/* installazione */
.installa { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--carta); box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); margin-top: 24px; }
.installa img { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.installa .t { flex: 1; min-width: 0; }
.installa .t b { display: block; font: 600 17px/1.2 var(--titolo); }
.installa .t span { font-size: 13.5px; color: var(--testo-2); }
.installa .x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--testo-3); flex: none; }
.installa .x svg { width: 16px; height: 16px; }
.passi-ios { margin: 0; padding-left: 20px; color: var(--testo-2); }
.guida-installa { margin-top: 18px; padding: 16px; }
.guida-installa .testa { display: flex; align-items: center; gap: 12px; }
.guida-installa .testa img { width: 48px; height: 48px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px var(--linea); }
.guida-installa .testa b { display: block; font: 600 18px/1.2 var(--titolo); }
.guida-installa .testa span { display: block; margin-top: 2px; font-size: 14px; color: var(--testo-2); }
.guida-installa .passi-ios { margin: 12px 0 0; }
.guida-installa .passi-ios li { margin: 6px 0; }
.guida-installa .bottone { margin-top: 14px; }
.dialogo .passi-ios { margin: 4px 0 20px; }
.dialogo .passi-ios li { margin: 8px 0; }
.dialogo .invito { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.dialogo .invito img { width: 60px; height: 60px; border-radius: 16px; flex: none; box-shadow: 0 0 0 1px var(--linea), var(--ombra-1); }
.dialogo .invito p { margin: 0; }
.passi-ios li { margin: 6px 0; }
.passi-ios svg { display: inline; width: 18px; height: 18px; vertical-align: -3px; }

@media (max-width: 360px) {
  :root { --lato: 16px; }
  .foto { width: 80px; height: 80px; }
  .foto svg { width: 74px; height: 74px; }
  .pizza-card .nome { font-size: 21px; }
  .saluto { font-size: 30px; }
  .orari { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 600px) {
  .schermo { padding-top: calc(var(--alto) + 20px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
