@font-face { font-family: 'Lexend'; src: url(../fonts/lexend.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --carta: #f6f0e4;
  --carta-2: #ede3d0;
  --foglio: #fffaf1;
  --inchiostro: #2f3d44;
  --inchiostro-2: #56656c;
  --linea: rgba(47, 61, 68, .14);
  --mare: #5e9a96;
  --mare-scuro: #3c726e;
  --mare-tenue: #dcebe8;
  --cielo: #dbe7ee;
  --faro: #e3a24f;
  --faro-tenue: #f6e2bf;
  --corallo: #c8685b;
  --verde: #6f9a66;
  --ombra: 0 1px 0 rgba(90, 70, 40, .06), 0 8px 22px -10px rgba(70, 55, 30, .28);
  --ombra-su: 0 2px 0 rgba(90, 70, 40, .06), 0 14px 30px -12px rgba(70, 55, 30, .34);
  --r: 26px;
  --r-s: 18px;
  --t: 1;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
:root[data-contrasto="alto"] {
  --carta: #ffffff; --carta-2: #eeeeee; --foglio: #ffffff; --inchiostro: #101820; --inchiostro-2: #26333a;
  --linea: rgba(0, 0, 0, .45); --mare: #22625e; --mare-scuro: #124542; --faro: #a8650f; --corallo: #9c3326;
}
:root[data-testo="grande"] { --t: 1.18; }
:root[data-calmo="1"] *, :root[data-calmo="1"] *::before, :root[data-calmo="1"] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Lexend', system-ui, sans-serif; font-size: calc(18px * var(--t)); line-height: 1.45;
  background: var(--carta); color: var(--inchiostro);
  -webkit-user-select: none; user-select: none; overscroll-behavior: none;
  background-image: radial-gradient(circle at 12% 0%, rgba(227, 162, 79, .10), transparent 40%), radial-gradient(circle at 100% 100%, rgba(94, 154, 150, .10), transparent 45%);
  background-attachment: fixed;
}
::selection { background: var(--faro-tenue); color: var(--inchiostro); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--faro); outline-offset: 3px; border-radius: 12px; }
input, textarea, select { font: inherit; color: var(--inchiostro); user-select: text; -webkit-user-select: text; }
svg { display: block; width: 100%; height: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--carta-2); border-radius: 10px; border: 2px solid var(--carta); }

#app { min-height: 100%; max-width: 1180px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.schermo { flex: 1; display: flex; flex-direction: column; animation: entra .45s var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

/* ---------- barra in alto ---------- */
.barra { display: flex; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 14px; }
.barra h1 { font-size: calc(1.45rem * var(--t)); font-weight: 700; flex: 1; }
.tasto-tondo { width: 60px; height: 60px; flex: none; border-radius: 50%; background: var(--foglio); box-shadow: var(--ombra); display: grid; place-items: center; transition: transform .25s var(--ease), box-shadow .25s; }
.tasto-tondo:active { transform: scale(.94); }
.tasto-tondo svg { width: 30px; height: 30px; }
.tasto-tondo.basta { background: #f4dcd6; }
.tasto-tondo .etic { position: absolute; }
.gettoni { display: flex; gap: 6px; padding: 8px 12px; background: var(--foglio); border-radius: 40px; box-shadow: var(--ombra); }
.gettoni i { width: 22px; height: 22px; border-radius: 50%; background: var(--carta-2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); transition: background .5s var(--ease), transform .5s var(--ease); }
.gettoni i.on { background: var(--faro); transform: scale(1.08); box-shadow: 0 0 0 3px var(--faro-tenue); }

/* ---------- home ---------- */
.home-testa { display: flex; align-items: center; gap: 14px; padding: 6px 0 18px; }
.logo { width: 58px; height: 58px; flex: none; }
.home-testa .saluto { flex: 1; }
.home-testa h1 { font-size: calc(1.7rem * var(--t)); font-weight: 700; }
.home-testa p { color: var(--inchiostro-2); font-size: .95em; }
.genitori { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--foglio); box-shadow: var(--ombra); display: grid; place-items: center; }
.genitori svg { width: 28px; height: 28px; }
.genitori .anello { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--faro) calc(var(--p, 0) * 1turn), transparent 0); -webkit-mask: radial-gradient(circle, transparent 29px, #000 30px); mask: radial-gradient(circle, transparent 29px, #000 30px); }
.suggerimento { font-size: .78em; color: var(--inchiostro-2); text-align: right; }

.adesso { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-bottom: 18px; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); border: 2px solid var(--faro-tenue); text-align: left; width: 100%; }
.adesso .pic { width: 84px; height: 84px; flex: none; }
.adesso small { display: block; font-size: .8em; color: var(--inchiostro-2); font-weight: 600; letter-spacing: .02em; }
.adesso strong { font-size: calc(1.4rem * var(--t)); }
.adesso .dopo { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--inchiostro-2); font-size: .85em; }
.adesso .dopo .pic { width: 52px; height: 52px; opacity: .8; }

.attivita { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease); min-height: 170px; grid-column: span 2; }
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); box-shadow: var(--ombra-su); } }
.tile .pic { width: 96px; height: 96px; }
.tile b { font-size: calc(1.15rem * var(--t)); font-weight: 600; }
.tile.grande { grid-column: span 3; flex-direction: row; justify-content: flex-start; text-align: left; gap: 20px; padding: 22px 26px; min-height: 150px; }
.tile.grande .pic { width: 104px; height: 104px; }
.tile.grande b { font-size: calc(1.45rem * var(--t)); display: block; }
.tile.grande span { color: var(--inchiostro-2); font-size: .9em; }
.tile.parlo { background: var(--mare-tenue); }
.tile.giornata { background: var(--faro-tenue); }
.tile.calmo { grid-column: span 6; flex-direction: row; min-height: 120px; background: var(--cielo); justify-content: flex-start; gap: 20px; padding: 18px 26px; text-align: left; overflow: hidden; }
.tile.calmo .onde { position: absolute; inset: auto 0 0 0; height: 46px; opacity: .55; }
.tile.calmo b { font-size: calc(1.35rem * var(--t)); display: block; }
.tile.calmo span { color: var(--inchiostro-2); font-size: .9em; }
.tile.calmo .pic { width: 84px; height: 84px; }
.credito { margin-top: 26px; text-align: center; font-size: .78em; color: var(--inchiostro-2); }
.credito a { color: var(--mare-scuro); text-underline-offset: 3px; }

@media (max-width: 760px) {
  .attivita { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile, .tile.grande { grid-column: span 1; }
  .tile.grande { flex-direction: column; text-align: center; justify-content: center; padding: 18px 12px; gap: 8px; }
  .tile.grande span { display: none; }
  .tile.grande .pic, .tile .pic { width: 76px; height: 76px; }
  .tile { min-height: 150px; padding: 14px 10px; }
  .tile.calmo { grid-column: span 2; }
  .adesso .dopo span { display: none; }
  .adesso .pic { width: 64px; height: 64px; }
}

/* ---------- consegna e scelte (giochi) ---------- */
.consegna { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 6px 18px; text-align: center; }
.consegna p { font-size: calc(1.5rem * var(--t)); font-weight: 600; }
.ripeti { width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--mare-tenue); display: grid; place-items: center; }
.ripeti svg { width: 26px; height: 26px; }
.modello { width: min(220px, 46vw); aspect-ratio: 1; margin: 0 auto 18px; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 22px; border: 3px dashed var(--linea); }
.modello.ombra svg { filter: none; }
.scelte { display: grid; gap: 18px; justify-content: center; grid-template-columns: repeat(var(--n, 3), minmax(0, 220px)); margin: auto 0; padding-bottom: 12px; }
.scelta { aspect-ratio: 1; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 18%; display: grid; place-items: center; position: relative; transition: transform .35s var(--ease), opacity .4s, box-shadow .3s; }
.scelta:active { transform: scale(.96); }
.scelta.nome { padding: 12% 12% 22%; }
.scelta.nome span { position: absolute; bottom: 9%; left: 0; right: 0; font-weight: 600; font-size: .95em; }
.scelta.numero { font-size: calc(3.4rem * var(--t)); font-weight: 700; padding: 8%; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.scelta.numero .puntini { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 80%; }
.scelta.numero .puntini i { width: 10px; height: 10px; border-radius: 50%; background: var(--mare); }
.scelta.no { opacity: .38; transform: scale(.95); }
.scelta.aiuto { box-shadow: 0 0 0 5px var(--faro), var(--ombra-su); animation: respira 1.6s var(--ease) infinite; }
.scelta.si { box-shadow: 0 0 0 5px var(--verde), var(--ombra-su); transform: scale(1.04); }
@keyframes respira { 50% { transform: scale(1.04); } }
.ombra-sil svg g { fill: #44525a !important; stroke: #44525a !important; }
.ombra-sil svg g * { fill: #44525a !important; stroke: #44525a !important; opacity: 1 !important; }
@media (max-width: 560px) { .scelte { gap: 12px; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); } .scelte[style*="--n:4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scelta.nome span { font-size: .8em; } }

/* contare */
.da-contare { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 560px; margin: 0 auto 22px; padding: 18px; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); }
.da-contare button { width: 74px; height: 74px; border-radius: 50%; padding: 6px; transition: transform .3s var(--ease), background .3s; position: relative; }
.da-contare button.contato { background: var(--mare-tenue); }
.da-contare button.contato::after { content: attr(data-n); position: absolute; right: -2px; top: -4px; background: var(--mare-scuro); color: #fff; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; font-weight: 700; display: grid; place-items: center; }

/* sequenze */
.slot-riga { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.slot { width: min(150px, 21vw); aspect-ratio: 1; border-radius: var(--r-s); border: 3px dashed var(--linea); display: grid; place-items: center; position: relative; background: rgba(255, 250, 241, .5); padding: 12%; }
.slot .n { position: absolute; top: 6px; left: 10px; font-weight: 700; color: var(--inchiostro-2); font-size: .9em; }
.slot.pieno { border-style: solid; border-color: var(--verde); background: var(--foglio); animation: entra .4s var(--ease); }
.slot.prossimo { border-color: var(--faro); }

/* ---------- comunicatore CAA ---------- */
.frase { display: flex; align-items: center; gap: 10px; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 10px; min-height: 108px; margin-bottom: 14px; }
.frase .parole { flex: 1; display: flex; gap: 8px; overflow-x: auto; min-height: 86px; align-items: center; padding: 0 4px; }
.frase .parole:empty::before { content: attr(data-vuoto); color: var(--inchiostro-2); font-size: .95em; padding-left: 8px; }
.frase .parola { flex: none; width: 82px; text-align: center; font-size: .72em; font-weight: 600; }
.frase .parola .pic { width: 62px; height: 62px; margin: 0 auto 2px; }
.frase .azioni { display: flex; gap: 8px; }
.tasto-parla { width: 80px; height: 80px; border-radius: 22px; background: var(--mare); color: #fff; display: grid; place-items: center; box-shadow: var(--ombra); }
.tasto-parla svg { width: 38px; height: 38px; }
.tasto-cancella { width: 60px; height: 80px; border-radius: 18px; background: var(--carta-2); display: grid; place-items: center; }
.tasto-cancella svg { width: 30px; height: 30px; }
.categorie { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.categorie button { flex: none; padding: 10px 16px 10px 10px; border-radius: 40px; background: var(--foglio); box-shadow: var(--ombra); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9em; }
.categorie button .pic { width: 34px; height: 34px; }
.categorie button[aria-pressed="true"] { background: var(--inchiostro); color: var(--foglio); }
.griglia-caa { display: grid; grid-template-columns: repeat(var(--col, 5), 1fr); gap: 12px; padding-bottom: 20px; }
.carta-caa { background: var(--foglio); border-radius: var(--r-s); box-shadow: var(--ombra); padding: 10px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; font-size: calc(.95rem * var(--t)); transition: transform .2s var(--ease); border: 3px solid transparent; }
.carta-caa:active { transform: scale(.95); }
.carta-caa .pic { width: 100%; aspect-ratio: 1; max-width: 120px; }
.carta-caa[data-cat="base"] { border-color: #f1d8a8; }
.carta-caa[data-cat="sento"] { border-color: #f3e2a0; }
.carta-caa.parlata { box-shadow: 0 0 0 4px var(--mare), var(--ombra); }
@media (max-width: 760px) { .griglia-caa { --col: 3 !important; gap: 10px; } .frase .parola { width: 64px; } .frase .parola .pic { width: 48px; height: 48px; } .tasto-parla { width: 64px; height: 64px; } .tasto-cancella { height: 64px; width: 50px; } }

/* ---------- giornata (agenda) ---------- */
.agenda-viste { display: flex; gap: 8px; margin-bottom: 14px; }
.chip { padding: 10px 18px; border-radius: 40px; background: var(--foglio); box-shadow: var(--ombra); font-weight: 600; font-size: .92em; }
.chip[aria-pressed="true"] { background: var(--inchiostro); color: var(--foglio); }
.prima-poi { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.pp { background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 18px; text-align: center; }
.pp h2 { font-size: calc(1.6rem * var(--t)); margin-bottom: 8px; }
.pp .pic { width: min(210px, 34vw); aspect-ratio: 1; margin: 0 auto 8px; }
.pp strong { font-size: calc(1.25rem * var(--t)); }
.pp.ora { border: 3px solid var(--faro); }
.passi { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.passo { display: flex; align-items: center; gap: 16px; background: var(--foglio); border-radius: var(--r-s); box-shadow: var(--ombra); padding: 10px 16px 10px 10px; width: 100%; text-align: left; transition: opacity .4s, transform .4s var(--ease); }
.passo .pic { width: 72px; height: 72px; flex: none; }
.passo b { flex: 1; font-size: calc(1.15rem * var(--t)); font-weight: 600; }
.passo .spunta { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--linea); display: grid; place-items: center; flex: none; }
.passo .spunta svg { width: 26px; height: 26px; opacity: 0; }
.passo.fatto { opacity: .55; }
.passo.fatto b { text-decoration: line-through; text-decoration-thickness: 2px; }
.passo.fatto .spunta { background: var(--verde); border-color: var(--verde); }
.passo.fatto .spunta svg { opacity: 1; }
.passo.ora { box-shadow: 0 0 0 4px var(--faro), var(--ombra-su); }

/* timer visivo */
.timer-box { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 6px; }
.disco { width: min(340px, 74vw); aspect-ratio: 1; position: relative; }
.disco svg { overflow: visible; }
.disco .resto { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(2.4rem * var(--t)); font-weight: 700; font-variant-numeric: tabular-nums; }
.preset { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.preset button { min-width: 84px; padding: 14px 16px; border-radius: 18px; background: var(--foglio); box-shadow: var(--ombra); font-weight: 600; }
.preset button[aria-pressed="true"] { background: var(--mare); color: #fff; }

/* ---------- storie sociali ---------- */
.libreria { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.libreria .tile { grid-column: auto; }
.pagina-storia { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 10px 0 20px; }
.pagina-storia .pics { display: flex; gap: 18px; justify-content: center; }
.pagina-storia .pic { width: min(220px, 40vw); aspect-ratio: 1; background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 20px; }
.pagina-storia p { font-size: calc(1.55rem * var(--t)); font-weight: 600; max-width: 22ch; }
.sfoglia { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sfoglia .grande-tasto { min-width: 140px; }
.pallini { display: flex; gap: 8px; }
.pallini i { width: 12px; height: 12px; border-radius: 50%; background: var(--carta-2); }
.pallini i.on { background: var(--mare); }

/* ---------- angolo calmo ---------- */
.calmo-scelte { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.calmo-scelte .tile { grid-column: auto; }
.respiro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; }
.cerchio-respiro { width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; }
.cerchio-respiro::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e6f1ef, var(--mare-tenue) 55%, #c4dcd8); box-shadow: 0 20px 60px -20px rgba(60, 114, 110, .5); transform: scale(var(--s, .55)); transition: transform 4s cubic-bezier(.45, 0, .55, 1); }
.cerchio-respiro span { position: relative; font-size: calc(1.6rem * var(--t)); font-weight: 600; color: var(--mare-scuro); }
.vasca { flex: 1; position: relative; border-radius: var(--r); background: linear-gradient(180deg, #e7f0f3, #d4e5ea); overflow: hidden; min-height: 60vh; touch-action: none; }
.bolla { position: absolute; border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .2) 30%, rgba(156, 198, 214, .35) 70%, rgba(120, 170, 190, .55)); box-shadow: inset -4px -6px 12px rgba(94, 154, 150, .25); transition: transform .5s var(--ease), opacity .5s; }
.bolla.pop { transform: scale(1.5); opacity: 0; }
.lampada { flex: 1; border-radius: var(--r); min-height: 60vh; transition: background 6s linear; display: grid; place-items: center; }
.lampada p { background: rgba(255, 255, 255, .55); padding: 10px 18px; border-radius: 30px; font-weight: 600; }

/* ---------- area genitori ---------- */
.pannello { display: grid; gap: 14px; padding-bottom: 30px; }
.sezione { background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra); padding: 18px 20px; }
.sezione h2 { font-size: calc(1.15rem * var(--t)); margin-bottom: 10px; }
.sezione p, .sezione li { font-size: .92em; color: var(--inchiostro-2); }
.sezione ul { padding-left: 1.1em; margin: 6px 0 0; }
.voce { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--linea); }
.voce:first-of-type { border-top: 0; }
.voce label { font-weight: 500; }
.voce small { display: block; color: var(--inchiostro-2); font-size: .8em; }
.interr { width: 58px; height: 34px; border-radius: 34px; background: var(--carta-2); position: relative; flex: none; transition: background .3s; }
.interr::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.interr[aria-checked="true"] { background: var(--mare); }
.interr[aria-checked="true"]::after { transform: translateX(24px); }
.segmenti { display: flex; background: var(--carta-2); border-radius: 14px; padding: 4px; flex: none; }
.segmenti button { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .88em; }
.segmenti button[aria-pressed="true"] { background: var(--foglio); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.campo { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--linea); background: #fff; }
.campo:focus { outline: none; border-color: var(--mare); }
textarea.campo { min-height: 120px; resize: vertical; }
.grande-tasto { padding: 16px 24px; border-radius: 18px; background: var(--mare); color: #fff; font-weight: 600; box-shadow: var(--ombra); text-align: center; }
.grande-tasto.secondario { background: var(--foglio); color: var(--inchiostro); }
.grande-tasto:disabled { opacity: .5; }
.riga-tasti { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.menu-genitori { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.menu-genitori button { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--foglio); border-radius: var(--r-s); box-shadow: var(--ombra); text-align: left; font-weight: 600; }
.menu-genitori button .pic { width: 46px; height: 46px; flex: none; }
.menu-genitori button small { display: block; font-weight: 400; color: var(--inchiostro-2); font-size: .8em; }
.barre { display: grid; gap: 10px; }
.barre .b { display: grid; grid-template-columns: 130px 1fr 70px; gap: 10px; align-items: center; font-size: .9em; }
.barre .b .t { height: 14px; border-radius: 10px; background: var(--carta-2); overflow: hidden; }
.barre .b .t i { display: block; height: 100%; background: var(--mare); border-radius: 10px; }
.barre .b span { text-align: right; font-variant-numeric: tabular-nums; color: var(--inchiostro-2); }
.libreria-scegli { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px; }
.libreria-scegli button { background: var(--carta); border-radius: 14px; padding: 6px; font-size: .7em; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.libreria-scegli button .pic { width: 56px; height: 56px; }
.edit-passo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linea); }
.edit-passo .pic { width: 46px; height: 46px; flex: none; }
.edit-passo span { flex: 1; font-weight: 500; }
.mini { width: 40px; height: 40px; border-radius: 12px; background: var(--carta); display: grid; place-items: center; }
.mini svg { width: 20px; height: 20px; }
.stato-segn { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78em; font-weight: 600; background: var(--carta-2); }
.stato-segn.risolta { background: #d9ead3; } .stato-segn.in_lavorazione { background: var(--faro-tenue); }

/* ---------- festa, avvisi ---------- */
.velo { position: fixed; inset: 0; background: rgba(246, 240, 228, .92); display: grid; place-items: center; z-index: 50; padding: 20px; animation: entra .4s var(--ease); }
.festa { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 520px; }
.festa .faro-grande { width: 190px; height: 190px; }
.festa h2 { font-size: calc(2rem * var(--t)); }
.faro-luce { transform-origin: 50px 28px; animation: gira 6s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.licenza-banner { background: var(--faro-tenue); border-radius: var(--r-s); padding: 12px 16px; margin-bottom: 14px; font-size: .88em; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.scheda-guida { background: var(--foglio); border-radius: var(--r); box-shadow: var(--ombra-su); padding: 28px; max-width: 520px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.scheda-guida .pic { width: 120px; height: 120px; }
.scheda-guida h2 { font-size: calc(1.5rem * var(--t)); }
.scheda-guida p { color: var(--inchiostro-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--inchiostro); color: var(--foglio); padding: 12px 20px; border-radius: 30px; font-size: .9em; z-index: 60; animation: entra .3s var(--ease); max-width: 90vw; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
