:root {
  --navy: #0d1b4d;
  --blu: #2f6bff; --blu-d: #1237a8;
  --ros: #d93a2b; --ros-d: #8f1a10;
  --oro: #ffcf1f; --ok: #2fbf6a; --ko: #ffb4ab;
  --titoli: "Segoe UI Black", "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  --testo: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  --k: clamp(46px, calc(5.2 * var(--vw, 1vw)), 100px); /* larghezza di un bambino */
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--testo); background: var(--navy); color: #fff; display: flex; flex-direction: column; overflow: hidden; }
footer { text-align: center; font-size: .78rem; padding: 3px 6px; color: #b9c7ff; }
#suoni, #schermo, #voce { font: 700 .8rem var(--testo); color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
#suoni:focus-visible, #schermo:focus-visible, #voce:focus-visible { outline: 3px solid var(--oro); }

main { --p: 0; position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ===== campo del tiro alla fune (in alto) ===== */
.campo { position: relative; flex: none; height: calc(var(--k) * 1.523 + 18px); background: linear-gradient(180deg, #14297a, #0d1b4d); border-bottom: 4px solid #050c2b; overflow: hidden; }
.campo::after { content: ""; position: absolute; left: 0; right: 0; top: calc(4px + var(--k) * 1.523); height: 6px; background: #e9d6a6; box-shadow: 0 2px 0 #b79b5c; }
.fila { position: absolute; top: 4px; display: flex; z-index: 3; }
.fila.s0 { left: 1.5%; color: var(--blu); }
.fila.s1 { right: 1.5%; color: var(--ros); transform: scaleX(-1); }
.kid { width: var(--k); height: calc(var(--k) * 1.523); margin-right: calc(var(--k) * -.12); transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.s0 .kid { transform: rotate(calc(-10deg + var(--l, 0) * 12deg)); }
.s1 .kid { transform: rotate(calc(-10deg - var(--l, 0) * 12deg)); }
.fila.tira .kid { animation: passo .45s ease-out; }
.fila .kid:nth-child(2) { transition-delay: .05s; } .fila .kid:nth-child(3) { transition-delay: .1s; }

/* corda e nodo */
#fune { position: absolute; left: 0; right: 0; top: calc(4px + var(--k) * .568 - 5px); height: 10px; z-index: 2; border-radius: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(0,0,0,0) 45%, rgba(0,0,0,.45)), repeating-linear-gradient(115deg, #d1a25f 0 7px, #8a5f2c 7px 14px); box-shadow: 0 0 0 2px #3b2610; }
#nodo { position: absolute; z-index: 4; left: calc(50% + var(--p) * 30%); top: calc(4px + var(--k) * .568 - 17px); width: 34px; height: 34px; margin-left: -17px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3a8, var(--oro) 55%, #d49a00); border: 3px solid #3b2610;
  box-shadow: inset -4px -5px 6px rgba(120,70,0,.5), inset 3px 3px 5px rgba(255,255,255,.6), 0 8px 8px rgba(0,0,0,.4); transition: left .55s cubic-bezier(.3, 1.5, .5, 1); }

/* scala del vantaggio: segni evidenti sotto la corda */
.banda { position: absolute; z-index: 1; left: 20%; width: 60%; top: calc(4px + var(--k) * .568 + 10px); height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--blu), #5b78d6 45%, #fff 50%, #e06a5e 55%, var(--ros)); box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
#scala { position: absolute; z-index: 1; left: 20%; width: 60%; top: calc(4px + var(--k) * .568 + 10px); height: 34px; }
#scala i { position: absolute; top: 0; width: 2px; height: 12px; margin-left: -1px; background: rgba(13,27,77,.55); }
#scala i.m5 { height: 18px; width: 3px; background: #fff; }
#scala i.m0 { height: 26px; width: 5px; margin-left: -2.5px; background: var(--oro); border-radius: 2px; }
#scala b { position: absolute; top: 15px; transform: translateX(-50%); font: 800 clamp(.7rem, calc(1.4 * var(--vw, 1vw)), 1rem) var(--testo); color: #fff; }
#scala b.bl { color: #9dbbff; } #scala b.ro { color: #ff9c90; }

@keyframes passo { 30% { transform: rotate(calc(-18deg + var(--l, 0) * 12deg)) translateX(-6px); } }

/* ===== arena: due metà uguali ===== */
.arena { flex: 1; display: flex; min-height: 0; }
.meta {
  --c: var(--blu); --cd: var(--blu-d); --tinta: #aecbff;
  container-type: inline-size; position: relative;
  flex: 1 1 0; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; gap: clamp(5px, calc(1.3 * var(--vh, 1vh)), 14px); padding: clamp(8px, calc(1.4 * var(--vh, 1vh)), 16px) clamp(12px, 3cqw, 28px) 10px;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 16px, transparent 16px 32px), linear-gradient(180deg, var(--c), var(--cd));
}
#m1 { --c: var(--ros); --cd: var(--ros-d); --tinta: #ffb9b0; border-left: 4px solid #050c2b; }

.meta h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--titoli); font-size: clamp(1rem, 4.4cqw, 1.8rem); letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255,255,255,.35), 0 3px 0 rgba(0,0,0,.28), 0 6px 8px rgba(0,0,0,.3); }
.nome { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nome::before { content: "●"; margin-right: .4em; }
#m1 .nome::before { content: "◆"; }
.tot { flex: none; font: 800 .55em var(--testo); letter-spacing: .06em; padding: .25em .7em; border-radius: 999px; background: rgba(0,0,0,.3); color: #fff; text-shadow: none; }
.tot b { font-family: var(--titoli); font-size: 1.2em; color: var(--oro); }
.punti { flex: none; min-width: 2.1em; padding: .05em .35em; text-align: center; background: linear-gradient(180deg, #fff, #e6edff); color: var(--cd); border-radius: 999px; text-shadow: none; box-shadow: 0 1px 0 #fff inset, 0 3px 0 #a9b6e0, 0 6px 7px rgba(0,0,0,.3); }
.barra { flex: none; height: 12px; background: rgba(0,0,0,.3); border-radius: 999px; box-shadow: inset 0 3px 4px rgba(0,0,0,.35); overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe66b, var(--oro)); border-radius: 999px; box-shadow: 0 0 10px rgba(255,207,31,.7); transition: width .4s ease; }

/* targa dell'indizio */
.quesito { flex: none; align-self: center; max-width: 100%; white-space: nowrap; font-family: var(--titoli); font-size: min(clamp(1.1rem, min(4.4cqw, calc(4.4 * var(--vh, 1vh))), 3rem), calc(100cqw / (var(--n, 20) * .6))); line-height: 1.15; padding: .12em .5em; border-radius: .25em; color: var(--navy);
  border: 3px solid var(--c); border-bottom-width: 5px; box-shadow: 0 4px 8px rgba(0,0,0,.28);
  background: linear-gradient(115deg, #fff 0%, #fff 36%, var(--tinta) 50%, #fff 64%, #fff 100%) 0 0 / 260% 100%;
  text-shadow: 0 1px 0 var(--c), 0 2px 0 var(--cd), 0 4px 4px rgba(0,0,0,.25); animation: lampo-targa 5s ease-in-out infinite; }
@keyframes lampo-targa { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* valore attuale e tempo al prossimo calo */
.info { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; }
.valore { font: 900 clamp(1.1rem, min(3.4cqw, calc(3.6 * var(--vh, 1vh))), 2.2rem) var(--titoli); color: var(--navy); background: var(--oro); padding: .08em .6em; border-radius: 999px; box-shadow: 0 3px 0 #b88a00, 0 5px 8px rgba(0,0,0,.3); }
.valore.cala { animation: salto .4s ease; }
.tempo { width: min(40cqw, 320px); height: 10px; background: rgba(0,0,0,.3); border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.tempo i { display: block; height: 100%; width: 0; background: #fff; border-radius: 999px; transition: width .25s linear; }

/* caselle della parola */
.risposta { flex: none; display: flex; justify-content: center; gap: clamp(3px, 1cqw, 10px); min-height: 1.3em; font-size: min(clamp(1.3rem, min(7cqw, calc(7 * var(--vh, 1vh))), 4rem), calc(92cqw / (var(--L, 6) * 1.3))); }
.risposta span { flex: none; width: 1.05em; text-align: center; font: 900 1em/1.2 var(--titoli); color: #fff; border-bottom: .09em solid rgba(255,255,255,.85); text-shadow: 0 3px 0 rgba(0,0,0,.3), 0 5px 7px rgba(0,0,0,.3); }
.risposta span.sv { color: var(--oro); border-bottom-color: var(--oro); }
.risposta.errata { animation: scuoti .35s; }
.risposta.errata span { color: var(--ko); }
.risposta.giusta span, .risposta.giusta span.sv { color: #8dffb8; }
.risposta.rivelata { align-items: baseline; gap: .5em; font-size: min(clamp(1.3rem, min(7cqw, calc(7 * var(--vh, 1vh))), 4rem), calc(70cqw / (var(--L, 6) * .8))); }
.risposta.rivelata small { font: 700 .4em var(--testo); color: #ffe66b; }
.risposta.rivelata span { width: auto; padding: 0 .3em; color: #ffe66b; border-bottom-color: #ffe66b; }

/* tastiera di lettere: 9 colonne, 3 righe (26 lettere + ←) */
.tastiera { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(3, 1fr); gap: clamp(4px, 1cqw, 12px); padding-bottom: 8px; perspective: 900px; }
.tastiera button {
  position: relative; overflow: hidden; min-width: 0; min-height: 0; padding: 0; font-family: var(--titoli); font-size: clamp(1.1rem, min(4.6cqw, calc(6 * var(--vh, 1vh))), 3.4rem); color: var(--navy);
  background: linear-gradient(180deg, #fff, #eaf1ff); border: 0; border-radius: 14px; cursor: pointer; touch-action: manipulation;
  transform: rotateX(6deg); transform-origin: 50% 100%;
  box-shadow: 0 1px 0 #fff inset, 0 4px 0 #9aa8d8, 0 9px 10px rgba(0,0,0,.3); text-shadow: 0 2px 0 rgba(255,255,255,.9);
  transition: transform .08s, box-shadow .08s, opacity .2s;
}
.tastiera button::after { content: ""; position: absolute; inset: 0 0 58% 0; background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)); border-radius: 14px 14px 60% 60% / 14px 14px 30% 30%; pointer-events: none; }
.tastiera button.canc { color: #b3261e; }
.tastiera button:focus-visible { outline: 4px solid var(--oro); outline-offset: 2px; }
@media (hover: hover) { .tastiera button:hover { transform: rotateX(3deg) translateY(-2px); } }
.tastiera button:active { transform: rotateX(6deg) translateY(4px); box-shadow: 0 1px 0 #fff inset, 0 1px 0 #9aa8d8, 0 3px 4px rgba(0,0,0,.3); }
.meta.bloccata .tastiera button { opacity: .5; }
.fermo .tastiera button { pointer-events: none; }

/* ===== schermate: menu, riepilogo, finale ===== */
[hidden] { display: none !important; }
#velo { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 12px; text-align: center; overflow: hidden auto;
  background: linear-gradient(100deg, rgba(47,107,255,.96) 50%, rgba(217,58,43,.96) 50%); backdrop-filter: blur(4px); }
#velo.nascosto { display: none; }
#velo.vince0 { background: linear-gradient(180deg, var(--blu), var(--blu-d)); }
#velo.vince1 { background: linear-gradient(180deg, var(--ros), var(--ros-d)); }
#velo.vinceP { background: linear-gradient(100deg, var(--blu-d) 50%, var(--ros-d) 50%); }
.avvio { margin: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, calc(2.2 * var(--vh, 1vh)), 24px); }
.occhiello { margin: 0; font-size: clamp(.9rem, calc(2 * var(--vw, 1vw)), 1.3rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
#messaggio { font-family: var(--titoli); font-size: clamp(2.2rem, min(calc(8 * var(--vw, 1vw)), calc(12 * var(--vh, 1vh))), 6rem); line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.28), 0 6px 0 rgba(0,0,0,.24), 0 9px 0 rgba(0,0,0,.2), 0 18px 20px rgba(0,0,0,.4); }
.fasi { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, calc(2 * var(--vw, 1vw)), 26px); width: min(calc(94 * var(--vw, 1vw)), 1000px); }
.fase, .temabtn { flex: 1 1 220px; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: clamp(12px, calc(2.6 * var(--vh, 1vh)), 26px) 14px; font-family: var(--titoli); font-size: clamp(1.1rem, calc(2.2 * var(--vw, 1vw)), 1.8rem); color: var(--navy); background: linear-gradient(180deg, #fff, #eaf1ff); border: 0; border-radius: 22px; cursor: pointer; touch-action: manipulation; box-shadow: 0 1px 0 #fff inset, 0 5px 0 #9aa8d8, 0 12px 14px rgba(0,0,0,.35); }
.fase b, .temabtn b { font-weight: 400; }
.fase small, .temabtn small { font: 700 .55em var(--testo); letter-spacing: .08em; text-transform: uppercase; color: #3d56b3; }
.fase:active:not(:disabled), .temabtn:active { transform: translateY(4px); box-shadow: 0 1px 0 #fff inset, 0 1px 0 #9aa8d8, 0 3px 4px rgba(0,0,0,.3); }
.fase:disabled { cursor: default; opacity: .6; filter: grayscale(.6); }
.fase.inarrivo small { color: #8f1a10; }
.fase:focus-visible, .temabtn:focus-visible { outline: 5px solid var(--oro); outline-offset: 3px; }
.regole { margin: 0; max-width: min(900px, calc(92 * var(--vw, 1vw))); font-size: clamp(.9rem, calc(2.2 * var(--vh, 1vh)), 1.3rem); line-height: 1.35; padding: 10px 18px; background: rgba(8, 18, 66, .42); border: 2px solid rgba(255,255,255,.35); border-radius: 18px; }
.dettaglio { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: clamp(1.1rem, calc(3 * var(--vh, 1vh)), 1.8rem); }
.azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
#prossima, #rigioca { font-family: var(--titoli); font-size: clamp(1.5rem, min(calc(4 * var(--vw, 1vw)), calc(7 * var(--vh, 1vh))), 2.4rem); padding: .4em 1.6em; color: var(--navy); background: var(--oro); border: 0; border-radius: 20px; box-shadow: 0 4px 0 #b88a00, 0 6px 10px rgba(0,0,0,.25); cursor: pointer; }
#prossima:active, #rigioca:active { transform: translateY(3px); box-shadow: 0 1px 0 #b88a00; }
#prossima:focus-visible, #rigioca:focus-visible { outline: 5px solid #fff; outline-offset: 3px; }
#menu, .home { display: inline-flex; align-items: center; justify-content: center; font: 800 clamp(1rem, calc(2.2 * var(--vh, 1vh)), 1.4rem) var(--testo); color: #fff; text-decoration: none; background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.7); border-radius: 999px; padding: 10px 26px; min-height: 44px; cursor: pointer; }
#menu:hover { background: rgba(255,255,255,.28); }
#menu:focus-visible, .home:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }

/* ===== effetti speciali ===== */
.scintilla { position: fixed; z-index: 20; width: 12px; height: 12px; margin: -6px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 8px #fff; animation: scoppia .75s ease-out forwards; }
.piu1 { position: fixed; z-index: 21; transform: translate(-50%, 0); font: 900 clamp(2rem, calc(6 * var(--vw, 1vw)), 3.6rem) var(--titoli); color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.4), 0 0 14px var(--oro); pointer-events: none; animation: sali .9s ease-out forwards; }
.piu1.meno { color: #ffd0ca; text-shadow: 0 3px 0 rgba(0,0,0,.45), 0 0 14px #ff3b2f; }
.meta.lampo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.55), transparent 65%); pointer-events: none; animation: svanisce .5s ease-out forwards; }
.coriandolo { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 2px; animation: cade linear forwards; }
#messaggio.pulsa { animation: pulsa .8s ease-out; }
.punti.sale { animation: salto .45s ease; }
.punti.scende { animation: scende .5s ease; }
.stelle { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }
.stelle i { position: absolute; top: -3rem; font-style: normal; line-height: 1; text-shadow: 0 0 10px rgba(255,207,31,.9), 0 3px 0 rgba(0,0,0,.25); animation: stella linear forwards; }
@keyframes salto { 50% { transform: scale(1.12); } }
@keyframes scende { 25% { transform: translateY(6px) scale(.9); background: #ffd0ca; } }
@keyframes scuoti { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes cade { to { transform: translateY(calc(110 * var(--vh, 1vh))) rotate(720deg); } }
@keyframes scoppia { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes sali { to { transform: translate(-50%, -90px) scale(1.3); opacity: 0; } }
@keyframes svanisce { to { opacity: 0; } }
@keyframes pulsa { 0% { transform: scale(.4); opacity: 0; } 40% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
@keyframes stella { 0% { transform: translateY(0) rotate(0) scale(.6); opacity: 0; } 10% { opacity: 1; transform: translateY(calc(8 * var(--vh, 1vh))) rotate(40deg) scale(1); } 100% { transform: translateY(calc(110 * var(--vh, 1vh))) translateX(40px) rotate(420deg) scale(1); opacity: .9; } }

/* fine gara */
#fine { font: 700 .8rem var(--testo); color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 4px 12px; cursor: pointer; min-height: 36px; }
#fine.conferma { background: var(--ros); border-color: #fff; animation: salto .5s ease; }
#fine:focus-visible { outline: 3px solid var(--oro); }

/* ===== corda, bambini, scala in punti ===== */
:root { --k: clamp(40px, calc(4.3 * var(--vw, 1vw)), 84px); }
.campo { height: calc(var(--k) * 1.523 + 12px); border-bottom: 0; }
.campo::after { top: calc(4px + var(--k) * 1.523); height: 8px; background: linear-gradient(180deg, #ecd09a, #c99b58 60%, #8d6431); box-shadow: none; }
#scala i { width: 1px; margin-left: -.5px; height: 6px; background: rgba(13,27,77,.5); }
#scala i.m5 { height: 10px; width: 1.5px; margin-left: -.75px; background: rgba(255,255,255,.9); }
#scala i.m10 { height: 14px; width: 2.5px; margin-left: -1.25px; background: #fff; }
#scala i.m0 { height: 20px; width: 5px; margin-left: -2.5px; background: var(--oro); }
#scala b { top: 16px; font-size: clamp(.62rem, calc(1.2 * var(--vw, 1vw)), .9rem); }
#scala b:not(.bl):not(.ro) { top: 21px; }

/* ===== telefono e schermi grandi ===== */
@media (orientation: portrait) {
  .arena { flex-direction: column; }
  #m1 { border-left: 0; border-top: 4px solid #050c2b; }
  .meta { padding: 5px 10px 6px; gap: 4px; }
  .barra { height: 8px; }
  .tastiera { gap: 4px; padding-bottom: 2px; }
  .tastiera button { font-size: clamp(1rem, 5cqw, 2rem); border-radius: 10px; box-shadow: 0 1px 0 #fff inset, 0 3px 0 #9aa8d8, 0 6px 6px rgba(0,0,0,.3); }
  .risposta { font-size: min(clamp(1.1rem, 7cqw, 2.4rem), calc(92cqw / (var(--L, 6) * 1.3))); }
  .quesito { font-size: min(clamp(.9rem, 4.2cqw, 1.8rem), calc(100cqw / (var(--n, 20) * .6))); }
}
@media (max-width: 520px) {
  .kid:nth-child(3) { display: none; }
  #messaggio { font-size: clamp(2rem, calc(11 * var(--vw, 1vw)), 3rem); }
  footer { font-size: .68rem; }
  #aiuto { display: none; }
  .banda, #scala { left: 24%; width: 52%; }
  #nodo { left: calc(50% + var(--p) * 26%); }
  #scala b.x { display: none; }
  .regole { font-size: .85rem; padding: 8px 12px; }
  .meta h2 { font-size: 1rem; }
  .tempo { height: 7px; }
}
@media (pointer: coarse) { #suoni, #schermo, #voce, #fine { min-height: 44px; padding: 6px 16px; font-size: .95rem; } }
@media (min-width: 1600px) { footer { font-size: 1rem; } #suoni, #schermo, #voce, #fine { font-size: 1rem; } .occhiello { font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* LIM / tablet: nessuna selezione o zoom accidentale */
html, body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: none; }
#suoni, #schermo, #voce { min-height: 36px; }

/* schermi grandi: l'interfaccia si ingrandisce in modo uniforme (--z da gioco.js) */
body { zoom: var(--z, 1); height: calc(100 * var(--vh, 1vh)); }

/* quiz tematici: domanda su più righe e 4 opzioni a tutta larghezza */
.meta.quiz .quesito { white-space: normal; text-align: center; font-size: clamp(.95rem, min(3.1cqw, calc(3.6 * var(--vh, 1vh))), 2.2rem); line-height: 1.2; padding: .3em .6em; }
.meta.quiz .risposta { display: none; }
.meta.quiz .tastiera { grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); }
.meta.quiz .tastiera button { display: flex; align-items: center; gap: .6em; padding: 0 .8em; text-align: left; font-family: var(--testo); font-weight: 800; line-height: 1.15; font-size: clamp(.95rem, min(2.8cqw, calc(3.4 * var(--vh, 1vh))), 1.9rem); }
.meta.quiz .tastiera button .lt { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; color: #fff; background: #3d56b3; font: 900 .9em var(--titoli); text-shadow: none; }
.meta.quiz .tastiera button.spenta { opacity: .3; pointer-events: none; }
.meta.quiz .tastiera button.giusta { background: linear-gradient(180deg, #d6ffe4, #7be8a5); }
.meta.quiz .tastiera button.errata { background: linear-gradient(180deg, #ffe0dd, #ff9b92); }
.fermo .temabtn { pointer-events: auto; }
#temi.fasi { margin-top: 4px; }
.classi { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(calc(94 * var(--vw, 1vw)), 1000px); }
.classe { padding: .5em 1.1em; min-height: 44px; font: 800 clamp(.9rem, calc(1.6 * var(--vw, 1vw)), 1.2rem) var(--testo); color: #fff; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.55); border-radius: 999px; cursor: pointer; touch-action: manipulation; }
.classe[aria-pressed="true"] { color: var(--navy); background: #fff; border-color: #fff; }
.classe:focus-visible { outline: 4px solid var(--oro); outline-offset: 2px; }
@media (orientation: portrait) {
  .meta.quiz .quesito { font-size: clamp(.85rem, 3.9cqw, 1.5rem); padding: .2em .5em; }
  .meta.quiz .tastiera button { font-size: clamp(.8rem, 3.6cqw, 1.3rem); padding: 0 .5em; }
  .meta.quiz .tastiera { gap: 3px; }
}
.meta.quiz .quesito { min-height: 2.5em; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }

.meta.quiz .quesito.spiega { font-size: clamp(.85rem, min(2.5cqw, calc(3 * var(--vh, 1vh))), 1.7rem); font-weight: 700; line-height: 1.25; }
@media (orientation: portrait) { .meta.quiz .quesito.spiega { font-size: clamp(.78rem, 3.4cqw, 1.2rem); } }
.meta.quiz.bloccata .tastiera button.giusta, .meta.quiz .tastiera button.giusta { opacity: 1; }

/* ghigliottina: coppie di parole e termine nascosto */
.meta.ghigl .quesito { white-space: normal; text-align: center; font-size: clamp(.95rem, min(3cqw, calc(3.4 * var(--vh, 1vh))), 2.1rem); line-height: 1.2; padding: .3em .6em; min-height: 2.5em; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.meta.ghigl.scelta .risposta { display: none; }
.meta.ghigl.scelta .tastiera { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: clamp(8px, 2cqw, 22px); }
.meta.ghigl .tastiera button.parola { text-transform: uppercase; letter-spacing: .03em; font-size: clamp(1.1rem, min(5.2cqw, calc(6 * var(--vh, 1vh))), 3.2rem); padding: 0 .3em; overflow-wrap: anywhere; }
.meta.ghigl .tastiera button.parola.scelta { background: linear-gradient(180deg, #d9e6ff, #9fbdff); }
.meta.ghigl .tastiera button.parola.giusta { background: linear-gradient(180deg, #d6ffe4, #7be8a5); opacity: 1; }
.meta.ghigl .tastiera button.parola.errata { background: linear-gradient(180deg, #ffe0dd, #ff9b92); opacity: 1; }
.meta.ghigl .tastiera button.parola.spenta { pointer-events: none; opacity: .45; }
.meta.ghigl .tastiera button.parola.spenta.giusta, .meta.ghigl .tastiera button.parola.spenta.errata { opacity: 1; }
.meta.ghigl.bloccata .tastiera button.parola { opacity: 1; }
@media (orientation: portrait) {
  .meta.ghigl .quesito { font-size: clamp(.8rem, 3.6cqw, 1.3rem); padding: .2em .5em; }
  .meta.ghigl .tastiera button.parola { font-size: clamp(1rem, 6cqw, 1.8rem); }
}

/* ghigliottina: tessere degli indizi, taglio del montepremi, legami */
.meta.ghigl .quesito { background: none; border: 0; box-shadow: none; animation: none; padding: 0; gap: clamp(4px, 1cqw, 10px); flex-wrap: wrap; text-shadow: none; max-width: 100%; }
.slot { display: inline-flex; align-items: center; justify-content: center; min-width: 3.4em; padding: .38em .75em; border-radius: 10px; font: 800 clamp(.72rem, min(2cqw, calc(2.5 * var(--vh, 1vh))), 1.45rem) var(--testo); text-transform: uppercase; letter-spacing: .04em; text-shadow: none; }
.slot.vuoto { color: rgba(255,255,255,.6); background: rgba(0,0,0,.25); border: 2px dashed rgba(255,255,255,.32); box-shadow: inset 0 2px 4px rgba(0,0,0,.3); }
.slot.vuoto.prossimo { color: var(--oro); border-color: var(--oro); }
.slot.noto { color: var(--navy); background: linear-gradient(180deg, #fff, #eaf1ff); box-shadow: 0 3px 0 #9aa8d8, 0 6px 8px rgba(0,0,0,.3); animation: salto .45s ease; }
.slot.legame { text-transform: none; letter-spacing: 0; color: var(--navy); background: linear-gradient(180deg, #fff, #eaf1ff); box-shadow: 0 3px 0 #9aa8d8, 0 5px 7px rgba(0,0,0,.3); font-weight: 700; }
.slot.legame b { color: #b3261e; text-transform: uppercase; margin: 0 .3em; }
.valore.taglio { position: relative; animation: taglio .75s ease; }
.valore.taglio::after { content: ""; position: absolute; left: -12%; right: -12%; top: 47%; height: 4px; border-radius: 2px; background: #fff; box-shadow: 0 0 8px #fff; opacity: 0; animation: lama .55s ease-out; }
@keyframes taglio { 0% { transform: scale(1); } 25% { transform: scale(1.4) rotate(-6deg); background: #ff4d3d; color: #fff; } 100% { transform: scale(1); } }
@keyframes lama { 0% { opacity: 1; transform: translateX(-35%) rotate(-24deg); } 100% { opacity: 0; transform: translateX(35%) rotate(-24deg); } }
@media (orientation: portrait) { .slot { min-width: 2.6em; padding: .3em .45em; font-size: clamp(.62rem, 3cqw, 1rem); } }

/* ghigliottina: due rettangoli 3D affiancati; la scelta cade sul montepremi (in basso) */
.meta.ghigl .info { order: 10; margin-top: 2px; }
.meta.ghigl .valore { font-size: clamp(1.2rem, min(3.8cqw, calc(4 * var(--vh, 1vh))), 2.6rem); padding: .1em 1.1em; }
.meta.ghigl .valore::before { content: "Montepremi "; font-size: .5em; letter-spacing: .08em; text-transform: uppercase; margin-right: .5em; }
.meta.ghigl.scelta .tastiera { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; align-content: start; gap: clamp(10px, 2.4cqw, 26px); padding: clamp(8px, calc(4 * var(--vh, 1vh)), 40px) clamp(10px, 6cqw, 70px) 0; perspective: 700px; }
.meta.ghigl.scelta .tastiera button.parola { height: clamp(58px, calc(12 * var(--vh, 1vh)), 130px); font-size: clamp(1rem, min(3.4cqw, calc(4.4 * var(--vh, 1vh))), 2.3rem); transform: rotateX(14deg); transform-origin: 50% 100%;
  background: linear-gradient(180deg, #ffffff 0%, #eef3ff 45%, #cfdcff 100%); border-radius: 16px;
  box-shadow: 0 2px 0 #fff inset, 0 -3px 0 #b3c3f0 inset, 0 8px 0 #7f93d6, 0 14px 0 #4a5fae, 0 22px 22px rgba(0, 0, 0, .45); }
.meta.ghigl.scelta .tastiera button.parola::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; border-radius: 16px 16px 60% 60% / 16px 16px 30% 30%; background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)); pointer-events: none; }
@media (hover: hover) { .meta.ghigl.scelta .tastiera button.parola:hover { transform: rotateX(10deg) translateY(-4px); } }
.meta.ghigl.scelta .tastiera button.parola:active { transform: rotateX(18deg) translateY(8px); box-shadow: 0 2px 0 #fff inset, 0 -3px 0 #b3c3f0 inset, 0 2px 0 #7f93d6, 0 5px 0 #4a5fae, 0 8px 10px rgba(0, 0, 0, .4); }
.meta.ghigl .tastiera button.parola.bloccato { pointer-events: none; }
.meta.ghigl .tastiera button.parola.cade { animation: cade-a .7s cubic-bezier(.5, 0, .9, .6) forwards; z-index: 3; }
.meta.ghigl .tastiera button.parola.atterra { transform: translate(var(--dx), var(--dy)) scale(.45); animation: atterra .35s ease; z-index: 3; }
.meta.ghigl .tastiera button.parola.sale { animation: sale .7s cubic-bezier(.5, 0, .75, 0) forwards; z-index: 3; }
.slot.noto.nuovo { animation: compare .5s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.scheggia { width: 9px; height: 9px; border-radius: 2px; }
@keyframes cade-a { 0% { transform: rotateX(14deg); } 100% { transform: translate(var(--dx), var(--dy)) scale(.45) rotate(-4deg); } }
@keyframes atterra { 0% { transform: translate(var(--dx), var(--dy)) scale(.45); } 40% { transform: translate(var(--dx), var(--dy)) scale(.5, .36); } 100% { transform: translate(var(--dx), var(--dy)) scale(.45); } }
@keyframes sale { 0% { transform: translate(var(--dx), var(--dy)) scale(.45); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--ux), var(--uy)) scale(.3); opacity: 0; } }
@keyframes compare { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@media (orientation: portrait) { .meta.ghigl.scelta .tastiera { padding: 6px 8px 0; } .meta.ghigl.scelta .tastiera button.parola { height: clamp(48px, 9vh, 80px); font-size: clamp(.9rem, 4.6cqw, 1.5rem); } }
@media (prefers-reduced-motion: reduce) { .meta.ghigl .tastiera button.parola.cade, .meta.ghigl .tastiera button.parola.atterra, .meta.ghigl .tastiera button.parola.sale, .slot.noto.nuovo { animation: none; } }

/* cronometro della fase (ghigliottina) */
.crono { font: 800 .8rem var(--testo); color: #fff; background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 4px 12px; margin-right: 6px; letter-spacing: .04em; }
.meta.ghigl .crono { display: inline-block; }
.meta:not(.ghigl) .crono { display: none; }

