/* YouppySchool. Colori per il tema chiaro e lo scuro; accento: blu scuola #3f5bd9. Le variabili --lettura-* le imposta il
   test visivo (tema.js): valgono per i testi da studiare (.lettura) e, se la persona lo sceglie, per tutta l'app. */
[data-tema="chiaro"] {
  --sfondo: #f3f4f9; --carta: #ffffff; --testo: #171a2b; --tenue: #66698a; --linea: #e3e5f0;
  --accento: #3f5bd9; --accento-forte: #3049bd; --su-accento: #ffffff; --accento-tenue: #e1e6fb;
  --rosso: #d8392f; --verde: #1a9d55; --blu: #2f6bd8; --viola: #7a52d6; --arancio: #d9701a; --rosa: #d6418e;
  --ombra: 0 2px 14px rgba(20, 30, 90, .08); --campo: #eef0f7;
  --c0: #3f5bd9; --c1: #0e9f8e; --c2: #1a9d55; --c3: #d8392f; --c4: #7a52d6; --c5: #e0781e; --c6: #d6418e; --c7: #5a6b7a;
}
[data-tema="scuro"] {
  --sfondo: #14161f; --carta: #1e2130; --testo: #edeffa; --tenue: #9a9fbf; --linea: #2c3046;
  --accento: #8ea2ff; --accento-forte: #a9b8ff; --su-accento: #0f1430; --accento-tenue: #262d55;
  --rosso: #ff6b60; --verde: #45d08f; --blu: #7d9bff; --viola: #b79bff; --arancio: #ffa04d; --rosa: #ff7fb8;
  --ombra: 0 2px 14px rgba(0, 0, 0, .4); --campo: #282c40;
  --c0: #8ea2ff; --c1: #2fd3bd; --c2: #45d08f; --c3: #ff6b60; --c4: #b79bff; --c5: #ffa04d; --c6: #ff7fb8; --c7: #9aabbd;
}
/* lo sfondo di lettura in tutta l'app: le superfici prendono il colore scelto, il testo il suo inchiostro */
[data-lettura-tutta="si"] { --sfondo: var(--lettura-sfondo); --carta: color-mix(in srgb, var(--lettura-sfondo) 78%, #fff); --testo: var(--lettura-testo);
  --campo: color-mix(in srgb, var(--lettura-sfondo) 82%, #000 6%); --linea: color-mix(in srgb, var(--lettura-sfondo) 80%, #000 12%); --tenue: color-mix(in srgb, var(--lettura-testo) 68%, var(--lettura-sfondo)); }

* { 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.45 system-ui, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: var(--accento-forte); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blu); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
[hidden], .nascosto { display: none !important; }
.cifre { font-variant-numeric: tabular-nums; }

#app { height: 100dvh; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; background: var(--sfondo); position: relative; overflow: hidden; }
#vista { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
@media (min-width: 720px) { body { background: color-mix(in srgb, var(--sfondo) 84%, var(--accento) 16%); } #app { box-shadow: 0 0 60px rgba(20, 30, 90, .18); } }

/* ---- barra in basso ---- */
#barra { display: flex; justify-content: space-around; padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); background: var(--carta); border-top: 1px solid var(--linea); z-index: 2; }
#barra button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 3px; color: var(--tenue); font-size: 11px; font-weight: 600; border-radius: 14px; white-space: nowrap; }
#barra button.attiva { color: var(--accento-forte); }
#barra button .ic { position: relative; width: 46px; height: 28px; padding: 3px 12px; border-radius: 12px; transition: background .2s; }
#barra button.attiva .ic { background: var(--accento-tenue); }
#barra svg { width: 100%; height: 100%; display: block; }
#barra .num { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rosso); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; }

/* ---- pezzi comuni ---- */
.pagina { padding: calc(14px + env(safe-area-inset-top)) 16px 100px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.testata { display: flex; align-items: center; gap: 10px; min-height: 44px; }
@font-face { font-family: "Baloo 2"; src: url("/caratteri/Baloo2.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
.testata h1 { flex: 1; min-width: 0; font-family: "Baloo 2", system-ui, sans-serif; font-size: clamp(22px, 6.8vw, 29px); font-weight: 800; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.testata h1 b { color: var(--accento-forte); }
.sotto { color: var(--tenue); font-size: 13.5px; margin-top: -8px; }
.riga2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--tenue); font-size: 12.5px; min-width: 0; }
.sottoCorso { margin-top: -6px; font-size: 13.5px; }
.tondo { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--tenue); background: var(--carta); box-shadow: var(--ombra); }
.tondo:active { transform: scale(.92); }
.tondo svg { width: 22px; height: 22px; }
.carta { background: var(--carta); border-radius: 20px; padding: 16px; box-shadow: var(--ombra); min-width: 0; }
.nota { color: var(--tenue); font-size: 14px; }
.nota.centro, .centro { text-align: center; }
.aiuto { color: var(--tenue); font-size: 12.5px; margin-top: 5px; display: block; }
.bottone { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 16px; background: var(--accento); color: var(--su-accento); font-weight: 700; font-size: 16px; text-align: center; text-decoration: none; cursor: pointer; }
.bottone:active { transform: scale(.97); }
.bottone.secondario { background: var(--accento-tenue); color: var(--accento-forte); }
.bottone.chiaro { background: var(--campo); color: var(--testo); }
.bottone.pericolo { background: none; color: var(--rosso); }
.bottone.largo { width: 100%; }
.bottone.piccolo { min-height: 42px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.bottone svg { width: 20px; height: 20px; flex: none; }
.pillola { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; border-radius: 999px; background: var(--campo); color: var(--tenue); font-weight: 700; font-size: 11.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pillola.forte { background: var(--accento-tenue); color: var(--accento-forte); }
.pillola.tinta { background: color-mix(in srgb, var(--t) 15%, transparent); color: var(--t); }
.vuoto { text-align: center; padding: 30px 16px; color: var(--tenue); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vuoto > svg { width: 52px; height: 52px; color: var(--linea); }
.vuoto h3 { color: var(--testo); font-size: 19px; font-weight: 800; }
.titoletto { font-size: 13px; font-weight: 800; color: var(--tenue); text-transform: uppercase; letter-spacing: .06em; margin: 6px 2px -4px; cursor: pointer; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.elenco { display: flex; flex-direction: column; gap: 8px; }
.campo { width: 100%; background: var(--campo); border: 1px solid transparent; border-radius: 14px; padding: 12px 14px; font-size: 16px; min-height: 48px; }
.campo:focus { border-color: var(--accento); outline: none; background: var(--carta); }
textarea.campo { resize: vertical; min-height: 80px; line-height: 1.5; }
input[type=file].campo { padding: 10px; font-size: 14px; }
.codiceCampo { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; text-align: center; font-size: 20px; }
.etichetta { display: block; font-size: 13px; font-weight: 700; color: var(--tenue); margin: 2px 2px 6px; }
.campoRiga { display: flex; flex-direction: column; margin-bottom: 12px; min-width: 0; }
.interruttore { display: flex; align-items: center; gap: 12px; padding: 8px 2px; font-weight: 600; cursor: pointer; }
.interruttore span { flex: 1; }
.interruttore input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--linea); position: relative; transition: background .2s; flex: none; margin: 0; cursor: pointer; }
.interruttore input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.interruttore input:checked { background: var(--accento); }
.interruttore input:checked::after { transform: translateX(18px); }
.cursore { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.cursore .valore { color: var(--accento-forte); font-weight: 800; }
.cursore input[type=range] { width: 100%; accent-color: var(--accento); }
.segmento { display: flex; background: var(--campo); border-radius: 14px; padding: 3px; gap: 3px; }
.segmento button { flex: 1; min-width: 0; padding: 9px 4px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--tenue); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.segmento button.on { background: var(--carta); color: var(--testo); box-shadow: var(--ombra); }
.segmento.scorre { overflow-x: auto; scrollbar-width: none; }
.segmento.scorre button { flex: 1 0 auto; padding: 9px 11px; }
.scelte, .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.scelte button, .chips button { min-height: 38px; padding: 0 13px; border-radius: 12px; background: var(--campo); font-weight: 700; font-size: 14px; color: var(--tenue); }
.scelte button[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--accento); color: var(--su-accento); }
.coloriScelta { display: flex; gap: 10px; flex-wrap: wrap; }
.coloriScelta button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); position: relative; }
.coloriScelta button[aria-pressed="true"]::after { content: '✓'; color: #fff; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; }

/* ---- corsi, voci, persone ---- */
.corso, .voce { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--carta); border-radius: 18px; padding: 12px 13px; box-shadow: var(--ombra); position: relative; overflow: hidden; min-width: 0; }
.voce::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--t); }
.corso .bollo { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; background: var(--c); }
.cuore { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cuore h3 { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corso > svg, .voce > svg { width: 20px; height: 20px; color: var(--tenue); flex: none; }
.voce .emo { font-size: 22px; flex: none; width: 30px; text-align: center; }
.voce .data { width: 42px; flex: none; text-align: center; color: var(--tenue); font-size: 12px; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.voce .data b { display: block; font-size: 21px; color: var(--testo); }
.testoVoce { color: var(--tenue); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.togli { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--campo); color: var(--tenue); }
.togli svg { width: 16px; height: 16px; }
.persona { display: flex; align-items: center; gap: 11px; background: var(--carta); border-radius: 16px; padding: 10px 12px; box-shadow: var(--ombra); min-width: 0; }
.persona .nome { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persona .nome small { display: block; font-weight: 600; color: var(--tenue); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--c, var(--accento)); font-size: 15px; }
.avatar.grande { width: 72px; height: 72px; font-size: 28px; }
.profiloTesta { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0; }
.profiloTesta h2 { font-size: 22px; font-weight: 800; }
.riga { display: flex; align-items: center; gap: 12px; padding: 10px 2px; width: 100%; text-align: left; }
.riga > svg { width: 22px; height: 22px; color: var(--accento-forte); flex: none; }
.riga span { flex: 1; min-width: 0; font-weight: 600; }
.riga small { color: var(--tenue); font-size: 13px; }
.codiceBig { font-size: 30px; font-weight: 800; letter-spacing: .14em; text-align: center; color: var(--accento-forte); background: var(--accento-tenue); border-radius: 16px; padding: 14px; }
.giornoTitolo { display: flex; align-items: baseline; gap: 8px; margin: 8px 2px 0; }
.giornoTitolo h3 { font-size: 15px; font-weight: 800; }
.giornoTitolo h3::first-letter { text-transform: uppercase; }
.giornoTitolo span { font-size: 12.5px; color: var(--tenue); font-weight: 600; }
.giornoTitolo.oggi h3 { color: var(--accento-forte); }
.giornoTitolo.passato { opacity: .6; }

/* ---- lezione: strumenti, file, foto ---- */
.strumenti { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.strumento { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--accento-tenue); color: var(--accento-forte); font-weight: 700; font-size: 12px; text-align: center; cursor: pointer; line-height: 1.2; }
.strumento svg { width: 26px; height: 26px; }
@media (max-width: 380px) { .strumenti { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.carta.file { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.carta.file video, .carta.file audio { width: 100%; border-radius: 12px; max-height: 60dvh; background: #000; }
.carta.file audio { background: none; }
.fileRiga { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.carta.fileRiga > svg { width: 22px; height: 22px; color: var(--accento-forte); flex: none; }
.nomeFile { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--testo); }
.nomeFile small { display: block; color: var(--tenue); font-weight: 600; font-size: 12px; }
.galleria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scatto { position: relative; }
.scatto .togli { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; }
.immagine { display: block; width: 100%; padding: 0; overflow: hidden; border-radius: 14px; background: var(--campo); }
.galleria .immagine { aspect-ratio: 4 / 3; }
.immagine img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carta.immagine img { height: auto; object-fit: contain; }
.fotoGrande { width: 100%; border-radius: 14px; display: block; }
details.carta summary { font-weight: 700; cursor: pointer; }
.trascrizione { margin-top: 10px; max-height: 60dvh; overflow-y: auto; }
.rotella { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accento-tenue); border-top-color: var(--accento); animation: gira .9s linear infinite; flex: none; }
@keyframes gira { to { transform: rotate(360deg); } }
.caricamento { position: absolute; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--carta); color: var(--testo); padding: 10px 16px; border-radius: 999px; box-shadow: var(--ombra); font-weight: 700; z-index: 5; pointer-events: auto; }
.registrazione { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; }
.tempoGrande { font-size: 44px; font-weight: 800; }
.anteprimaVideo { width: 100%; border-radius: 14px; background: #000; max-height: 45dvh; }
.puntoRosso { width: 12px; height: 12px; border-radius: 50%; background: var(--rosso); flex: none; animation: pulsa 1.2s infinite; display: inline-block; }
.puntoRosso.piccolo { width: 8px; height: 8px; }
@keyframes pulsa { 50% { opacity: .3; } }

/* ---- testi da studiare: qui valgono le scelte del test visivo ---- */
.lettura { background: var(--lettura-sfondo, var(--carta)); color: var(--lettura-testo, var(--testo)); font-family: var(--lettura-carattere); font-size: var(--lettura-dimensione, 17px);
  line-height: var(--lettura-interlinea, 1.6); letter-spacing: var(--lettura-spaziatura, 0); }
.lettura h2 { font-size: 1.15em; font-weight: 800; margin-bottom: .5em; font-family: "Baloo 2", system-ui, sans-serif; letter-spacing: 0; }
.lettura h3 { font-size: 1.02em; font-weight: 800; margin: .9em 0 .3em; }
.ricco p { margin: 0 0 .75em; overflow-wrap: anywhere; }
.ricco p:last-child { margin-bottom: 0; }
.ricco ul, .lettura ul { margin: 0 0 .75em; padding-left: 1.3em; }
.ricco li, .lettura li { margin-bottom: .3em; overflow-wrap: anywhere; }
.formula { font-family: 'Cambria Math', 'STIX Two Math', Cambria, Georgia, serif; font-style: italic; background: color-mix(in srgb, currentColor 8%, transparent); padding: 0 .3em; border-radius: 5px; white-space: nowrap; }
.frazione { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-size: .9em; line-height: 1.1; margin: 0 .1em; font-style: normal; }
.frazione > span { padding: 0 .2em; }
.frazione > span:first-child { border-bottom: 1.5px solid currentColor; }
.radice > span { border-top: 1.5px solid currentColor; padding: 0 .1em; }
.formula sup, .formula sub { font-size: .7em; }
.formula .testoF { font-style: normal; }
.formula:has(.frazione) { padding: .15em .3em; }
.concetto + .concetto { border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.glossario { margin: 0; }
.glossario dt { font-weight: 800; margin-top: .6em; }
.glossario dd { margin: .1em 0 0; }
.domanda { border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); padding: .6em 0; }
.domanda summary { cursor: pointer; font-weight: 700; }
.domanda .risposta { margin-top: .5em; padding-left: .8em; border-left: 3px solid var(--verde); }
.documento { border-radius: 20px; padding: 18px; box-shadow: var(--ombra); }
.documento .titoloDoc { font-size: 1.35em; }
.documento section { margin-top: 1.2em; }
.figura { margin: .8em 0; text-align: center; }
.figura img { max-width: 100%; height: auto; background: #fff; border-radius: 12px; padding: 8px; }
.figura figcaption { font-size: .85em; opacity: .8; margin-top: .3em; }
.nota-docente { border-left: 5px solid var(--verde); display: flex; flex-direction: column; gap: 6px; }

/* ---- test visivo ---- */
.test h2 { font-size: 20px; font-weight: 800; }
.duello { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .duello { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.provaTesto { position: relative; display: block; width: 100%; text-align: left; border-radius: 16px; padding: 16px 16px 16px 44px; border: 2px solid rgba(0,0,0,.08); }
.provaTesto.corta, .provaTesto.fermo { padding-left: 16px; }
.provaTesto .lettera { position: absolute; left: 12px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.75); color: #fff; font: 800 13px/24px system-ui, sans-serif; text-align: center; letter-spacing: 0; }
.provaTesto:active { transform: scale(.99); }
.inchiostri { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.barretta { height: 6px; border-radius: 3px; background: var(--campo); overflow: hidden; margin-top: 4px; }
.barretta i { display: block; height: 100%; background: var(--accento); transition: width .3s; }

/* ---- lavagna dal vivo ---- */
.live { display: flex; flex-direction: column; gap: 10px; }
.liveTesta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.liveCornice { position: relative; overflow: hidden; border-radius: 16px; background: #000; aspect-ratio: 16 / 9; touch-action: none; }
.liveCornice:fullscreen { border-radius: 0; aspect-ratio: auto; }
.liveVideo { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; }
.liveComandi { display: flex; justify-content: center; gap: 10px; }

/* ---- chat ---- */
.chatPagina { padding-bottom: 12px; height: 100%; }
.chatBox { flex: 1; min-height: 360px; display: flex; flex-direction: column; min-width: 0; }

/* ---- pulsante + fluttuante, fogli, avvisi ---- */
.fab { position: absolute; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 19px; background: var(--accento); color: var(--su-accento); display: grid; place-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accento) 50%, transparent); z-index: 3; }
.fab svg { width: 28px; height: 28px; }
#strati { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.velo { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.velo.on { opacity: 1; }
.foglio { position: absolute; left: 0; right: 0; bottom: 0; max-width: 680px; margin: 0 auto; background: var(--carta); color: var(--testo); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 40px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); pointer-events: auto; max-height: 92dvh; overflow-y: auto; }
.foglio.largo { max-height: 96dvh; }
.foglio.on { transform: translateY(0); }
.foglio h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.manico { width: 40px; height: 4px; border-radius: 2px; background: var(--linea); margin: -6px auto 12px; }
.azioni { display: flex; gap: 8px; margin-top: 6px; }
.azioni .bottone { flex: 1; }
.toast { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--testo); color: var(--sfondo); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90%; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- stampa: solo il documento, con lo sfondo di lettura scelto ---- */
.stampaSolo { display: none; }
@media print {
  #barra, .fab, .testata, .sottoCorso, .duo, .carta:not(.lettura), #strati .velo { display: none !important; }
  body, #app { background: #fff; height: auto; overflow: visible; box-shadow: none; }
  #vista { overflow: visible; }
  .lettura { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
  body:has(.stampaSolo) #app { display: none; }
  .stampaSolo { display: block; padding: 24px; min-height: 100vh; }
}
