/* ============================================================
   DESTRA E SINISTRA — stile locale
   Carica prima css/kids-base.css (variabili, header, footer).

   Questo file contiene le parti che si ripetono in ogni app kids:
   schermate, HUD, card dei livelli, opzioni, riscontro, risultato,
   coriandoli: arrivano dal modello e sono uguali in tutte le app kids.
   Le parti proprie di questo gioco sono la scena con la figura e le
   due mani da toccare.
   ============================================================ */

/* ---------- Layout principale ---------- */
.game-container {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 36px) 12px 48px;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--kids-font-body);
    /* Lo sfondo è l'unica cosa che distingue un'app dall'altra. Qui due
       aloni opposti, uno a sinistra e uno a destra: è il tema del gioco. */
    background:
        radial-gradient(620px 340px at -4% 0%, rgba(56, 189, 248, .16), transparent 62%),
        radial-gradient(620px 340px at 104% 100%, rgba(251, 113, 133, .14), transparent 62%),
        linear-gradient(180deg, #f0f9ff 0%, #fff7f7 100%);
}

/* Decorazioni che galleggiano sullo sfondo */
.bg-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-decor span {
    position: absolute;
    opacity: .13;
    line-height: 1;
    animation: decorFloat 9s ease-in-out infinite alternate;
}

@keyframes decorFloat {
    from { transform: translateY(-12px) rotate(-8deg); }
    to   { transform: translateY(14px) rotate(10deg); }
}

/* ---------- Schermate ---------- */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 760px;
    padding: 0.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Schermata iniziale ---------- */
.hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2.5vw, 18px);
    margin-bottom: 0.9rem;
    min-height: 92px;
}

.hero-item {
    width: clamp(62px, 12vw, 88px);
    aspect-ratio: 1;
    border-radius: 20px;
    background: #fff;
    border: 3px solid #d7efec;
    box-shadow: 0 5px 0 rgba(10, 91, 99, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.9rem, 6vw, 2.6rem);
    line-height: 1;
    animation: heroBob 2.6s ease-in-out infinite;
}

.hero-item:nth-child(2) { animation-delay: .35s; }
.hero-item:nth-child(3) { animation-delay: .7s; }
.hero-item:nth-child(4) { animation-delay: 1.05s; }

@keyframes heroBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

.game-title {
    font-family: var(--kids-font-title);
    font-size: clamp(2rem, 5.6vw, 3.2rem);
    font-weight: 700;
    color: var(--brand);
    margin: 0 0 0.4rem;
    text-shadow: 0 3px 0 rgba(10, 91, 99, .12);
}

.game-subtitle {
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    color: var(--ink-2);
    font-weight: 700;
    margin: 0 0 1.8rem;
}

.choose-label {
    font-family: var(--kids-font-title);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brand);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* Card delle modalità */
.level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 300px));
    gap: clamp(12px, 2.5vw, 22px);
    justify-content: center;
    width: 100%;
}

.level-card {
    --lvl: #22c55e;
    --lvl-dark: #15803d;
    --lvl-soft: #f0fdf4;
    appearance: none;
    border: 3px solid var(--lvl);
    background: #fff;
    border-radius: var(--kids-radius);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 7px 0 var(--lvl-dark), var(--kids-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    font-family: var(--kids-font-body);
}

.level-card:hover {
    transform: translateY(-4px);
    background: var(--lvl-soft);
    box-shadow: 0 11px 0 var(--lvl-dark), var(--kids-shadow);
}

.level-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--lvl-dark);
}

/* Un colore per modalità, nell'ordine della progressione */
.level-card.medium { --lvl: #f59e0b; --lvl-dark: #b45309; --lvl-soft: #fffbeb; }
.level-card.hard   { --lvl: #fb7185; --lvl-dark: #be123c; --lvl-soft: #fff1f2; }
.level-card.expert { --lvl: #8b5cf6; --lvl-dark: #6d28d9; --lvl-soft: #f5f3ff; }
.level-card.libera { --lvl: #0ea5e9; --lvl-dark: #0369a1; --lvl-soft: #f0f9ff; }

.level-card.wide { grid-column: 1 / -1; }

.level-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }

.level-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.level-name {
    font-family: var(--kids-font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
}

.level-desc {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-2);
}

/* ---------- Scheda per gli adulti ---------- */
.info-box {
    background: #fff;
    border: 2px dashed #cfe2e2;
    border-radius: 18px;
    padding: 1.3rem 1.4rem;
    margin-top: 2.2rem;
    width: 100%;
    text-align: left;
    color: #3b4a4a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-box h2 {
    font-family: var(--kids-font-title);
    font-size: 1.15rem;
    color: var(--brand);
    margin: 0 0 0.7rem;
}

.info-box h3 {
    font-family: var(--kids-font-title);
    font-size: 1rem;
    color: var(--brand);
    margin: 1.1rem 0 0.4rem;
}

.info-box p { margin: 0 0 0.55rem; }
.info-box ul { margin: 0 0 0.55rem; padding-left: 1.2rem; }
.info-box li { margin-bottom: 0.35rem; }

.info-box .info-tip {
    margin-top: 0.9rem;
    background: #f0fdfa;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
}

/* ---------- HUD ---------- */
.hud {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 1rem;
}

.hud-pill {
    background: #fff;
    border: 2px solid #ffe1a6;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-family: var(--kids-font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    box-shadow: var(--kids-shadow-sm);
    white-space: nowrap;
}

.free-pill { border-color: #bae6fd; font-size: 1.05rem; margin-right: auto; }

.score-pill.bump { animation: scoreBump .45s ease; }

@keyframes scoreBump {
    30% { transform: scale(1.22); }
}

.hud-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.progress-track {
    flex: 1;
    height: 16px;
    background: #e4ece7;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(10, 91, 99, .12);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #2dd4bf);
    transition: width .5s cubic-bezier(.22, 1, .36, 1);
}

.progress-label {
    font-family: var(--kids-font-title);
    font-weight: 600;
    color: var(--brand);
    font-size: 1rem;
    white-space: nowrap;
}

.hud-right { display: flex; gap: 8px; }

.hud-btn {
    appearance: none;
    border: 2px solid #d7efec;
    background: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--kids-shadow-sm);
    transition: transform .15s ease, background .15s ease;
    padding: 0;
    line-height: 1;
}

.hud-btn:hover { transform: translateY(-2px); background: #f0fdfa; }
.hud-btn.home { border-color: var(--brand); background: #f0fdfa; }

/* ---------- Consegna ---------- */
.prompt-card {
    position: relative;
    background: #fff;
    border: 3px solid #d7efec;
    border-radius: var(--kids-radius);
    box-shadow: var(--kids-shadow-sm);
    padding: 1rem 3.6rem 1rem 1.4rem;
    width: 100%;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Ripete la consegna a voce: per chi non sa ancora leggere */
.say-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ffe1a6;
    background: #fff8ec;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: var(--kids-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: transform .15s ease;
}

.say-btn:hover { transform: scale(1.1); }
.say-btn:active { transform: scale(0.9); }

.prompt-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 0;
}

.prompt-text {
    font-family: var(--kids-font-title);
    font-size: clamp(1.15rem, 3.6vw, 1.6rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

/* ---------- Opzioni ---------- */
.options-grid {
    display: grid;
    gap: clamp(10px, 2.4vw, 18px);
    justify-content: center;
    width: 100%;
    margin-bottom: 0.4rem;
}

/* Tre disposizioni, una per tipo di domanda. «fila» tiene le tre cose
   affiancate a QUALUNQUE larghezza: se andassero a capo, «quello a
   destra» non vorrebbe più dire niente. */
.options-grid.layout-fila { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.options-grid.layout-gruppo { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; }
.options-grid.layout-figura { grid-template-columns: minmax(0, 340px); }

.option-btn {
    appearance: none;
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    border: 3px solid #e6f2f0;
    border-radius: var(--kids-radius);
    box-shadow: 0 5px 0 rgba(10, 91, 99, .10), var(--kids-shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, opacity .3s ease;
    animation: cardIn .35s cubic-bezier(.34, 1.56, .64, 1) backwards;
    overflow: hidden;
}

@keyframes cardIn {
    from { opacity: 0; transform: scale(.6); }
}

.option-btn:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: #bfe6e0;
    box-shadow: 0 10px 0 rgba(10, 91, 99, .10), var(--kids-shadow);
}

.option-btn:active { transform: scale(.94); box-shadow: 0 2px 0 rgba(10, 91, 99, .10); }

/* Stati della risposta: sempre questi quattro, in tutte le app */
.option-btn.correct {
    border-color: #22c55e;
    background: #f0fdf4;
    animation: popCorrect .5s ease;
    z-index: 2;
}

@keyframes popCorrect {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.12) rotate(-3deg); }
    70%  { transform: scale(.97) rotate(2deg); }
    100% { transform: scale(1); }
}

.option-btn.wrong {
    border-color: #ef4444;
    background: #fef2f2;
    animation: shakeCard .5s ease;
}

@keyframes shakeCard {
    20%, 60% { transform: translateX(-9px); }
    40%, 80% { transform: translateX(9px); }
}

/* Qui c'erano `.reveal` (la risposta giusta che si accendeva e pulsava)
   e `.dim` (le altre che si spegnevano attorno). Erano i pezzi con cui
   il modello rispondeva al posto del bambino dopo un errore: tolti.
   Sbagliando si ritenta, e la risposta giusta si accende solo quando è
   il bambino a toccarla. */

.option-btn.locked { pointer-events: none; }

/* Una scelta già provata e sbagliata. Resta AL SUO POSTO — farla
   sparire sposterebbe le altre sotto il dito, e il bambino toccherebbe
   quella arrivata al posto di quella che stava guardando — ma si spegne
   e non si tocca più. Niente croce e niente rosso acceso: si è già
   detto che non andava, e il giro non è finito. */
.option-btn.fuori {
    opacity: .3;
    pointer-events: none;
    filter: grayscale(1);
    box-shadow: none;
    transform: none;
}

/* La cosa da scegliere nel livello «Da che parte?»: emoji grande */
.cosa {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
    line-height: 1;
}

/* Le figure dentro le card del livello «Chi alza la destra?» */
.option-btn svg { width: 100%; height: auto; display: block; }

.opt-name {
    font-family: var(--kids-font-title);
    font-size: clamp(.85rem, 2.6vw, 1.05rem);
    font-weight: 600;
    color: var(--ink);
}

/* Scintille sulla risposta giusta */
.sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleFly .65s ease-out forwards;
    z-index: 3;
}

@keyframes sparkleFly {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.1); opacity: 0; }
}

/* ---------- Riscontro ---------- */
.feedback-msg {
    min-height: 3.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--kids-font-title);
    font-size: clamp(1.1rem, 3.4vw, 1.45rem);
    font-weight: 600;
    text-align: center;
    padding: 0 4px;
}

.feedback-msg span {
    display: inline-block;
    padding: 0.35rem 1.2rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--kids-shadow-sm);
    animation: toastIn .35s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes toastIn {
    from { opacity: 0; transform: scale(.6) translateY(8px); }
}

.feedback-msg.correct span { color: #15803d; border: 2px solid #bbf7d0; background: #f0fdf4; }
.feedback-msg.wrong span   { color: #b91c1c; border: 2px solid #fecaca; background: #fef2f2; }

/* Serie di risposte giuste */
.streak-badge {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f97316, #fbbf24);
    color: #fff;
    font-family: var(--kids-font-title);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1.6rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(249, 115, 22, .4);
    opacity: 0;
    pointer-events: none;
    z-index: 40;
}

.streak-badge.show { animation: badgePop 1.4s ease forwards; }

@keyframes badgePop {
    0%   { opacity: 0; transform: translateX(-50%) scale(.4); }
    15%  { opacity: 1; transform: translateX(-50%) scale(1.15); }
    25%  { transform: translateX(-50%) scale(1); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) scale(.9) translateY(-18px); }
}

/* ---------- Schermata finale ---------- */
.result-content {
    background: #fff;
    border: 3px solid #d7efec;
    color: var(--ink);
    padding: clamp(1.6rem, 5vw, 3rem);
    border-radius: 28px;
    text-align: center;
    width: min(480px, 94%);
    box-shadow: var(--kids-shadow);
}

.stars-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: clamp(2.4rem, 8vw, 3.4rem);
    margin-bottom: 0.4rem;
    min-height: 1.2em;
}

.stars-row .star { filter: grayscale(1) opacity(.35); }

.stars-row .star.earned {
    filter: none;
    animation: starPop .5s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

@keyframes starPop {
    from { transform: scale(0) rotate(-40deg); }
}

.end-icon {
    font-size: clamp(3rem, 9vw, 4.2rem);
    margin-bottom: 0.6rem;
    animation: heroBob 2.4s ease-in-out infinite;
}

#end-title {
    font-family: var(--kids-font-title);
    font-size: clamp(1.8rem, 5.5vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--brand);
}

.final-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-2);
    margin: 0 0 1.6rem;
}

.final-score span {
    color: var(--accent);
    font-family: var(--kids-font-title);
    font-size: 1.45rem;
}

.action-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.btn-big {
    appearance: none;
    font-family: var(--kids-font-title);
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-big.primary   { background: var(--brand); color: #fff; box-shadow: 0 5px 0 #063d42; }
.btn-big.secondary { background: var(--accent); color: #4a3200; box-shadow: 0 5px 0 #b97b00; }
.btn-big.ghost     { background: #fff; color: var(--brand); border: 2px solid var(--brand); box-shadow: 0 5px 0 rgba(10, 91, 99, .25); }

.btn-big:hover { transform: translateY(-2px); }
.btn-big:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }

/* ---------- Coriandoli ---------- */
.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -5vh;
    width: 10px;
    height: 15px;
    border-radius: 3px;
    animation: confettiFall linear forwards;
}

.confetti-piece.round { height: 10px; border-radius: 50%; }

@keyframes confettiFall {
    to { top: 108vh; transform: translateX(var(--drift)) rotate(var(--spin)); }
}

/* ---------- Header (bottone "Torna alle App") ---------- */
.site-header .btn {
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 14px;
    box-shadow: none;
}

/* ---------- Touch ----------
   kids-base.css impone min-height:44px a tutti i button sugli schermi
   touch: sui pulsanti tondi alzava solo l'altezza, schiacciandoli in
   ovali. Il minimo va imposto anche in larghezza. NON togliere. */
@media (pointer: coarse) {
    .hud-btn, .say-btn { min-width: 44px; min-height: 44px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .level-grid { grid-template-columns: minmax(200px, 340px); }

    .level-icon { font-size: 2rem; }
    .level-name { font-size: 1.15rem; }
    .level-desc { font-size: 0.85rem; }

    .hud { flex-wrap: wrap; gap: 8px; }
    .hud-progress { order: 3; width: 100%; flex-basis: 100%; }
    .hud-right { margin-left: auto; }
    .hud-pill { font-size: 1rem; padding: 0.4rem 0.8rem; }

    .prompt-card { padding: 0.9rem 3.2rem 0.9rem 1rem; }
    .say-btn { top: 0.6rem; right: 0.6rem; }

    /* Le griglie cambiano forma, non solo scala */
    .options-grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .options-grid.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .options-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .option-btn { border-width: 2px; }
}

@media (max-width: 380px) {
    .options-grid.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Meno animazioni se richiesto dal sistema */
@media (prefers-reduced-motion: reduce) {
    .hero-item,
    .bg-decor span,
    .end-icon,
    .option-btn,
    .screen.active {
        animation: none !important;
    }
}

/* ---------- Pulsante dell'audio ----------
   Sta nell'HUD accanto al 🏠: si spegne mentre si gioca. Da spento
   resta ben visibile che è spento, altrimenti un adulto pensa che
   l'app sia rotta. */
.hud-btn.audio-btn { border-color: #ffe1a6; background: #fff8ec; }
.hud-btn.audio-btn.spento { border-color: #fecaca; background: #fef2f2; opacity: .85; }

/* ============================================================
   LA SCENA CON LA FIGURA
   Il disegno è un SVG che riempie il riquadro; sopra le due mani
   stanno due pulsanti tondi. Si tocca la MANO, non una scritta:
   il gioco è sul corpo, e una parola da leggere lo tradirebbe.
   ============================================================ */
.scena-figura {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1;
    margin: 0 auto;
    background: #fff;
    border: 3px solid #e6f2f0;
    border-radius: var(--kids-radius);
    box-shadow: 0 6px 0 rgba(10, 91, 99, .10), var(--kids-shadow-sm);
    animation: cardIn .35s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

.scena-figura svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Il pulsante sopra la mano: tondo, trasparente, e grande abbastanza
   da essere un bersaglio vero. Il 25% di 340px fa 85px, ben sopra i
   44px minimi anche sui telefoni stretti. */
.mano-btn {
    position: absolute;
    width: 25%;
    aspect-ratio: 1;
    padding: 0;
    border: 3px dashed transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.mano-btn:hover { border-color: rgba(10, 91, 99, .35); background: rgba(10, 91, 99, .06); }
.mano-btn:active { transform: scale(.92); }

.mano-btn.correct {
    border-color: #22c55e;
    border-style: solid;
    background: rgba(34, 197, 94, .18);
    animation: popCorrect .5s ease;
}

.mano-btn.wrong {
    border-color: #ef4444;
    border-style: solid;
    background: rgba(239, 68, 68, .15);
    animation: shakeCard .5s ease;
}

/* Una mano già provata e sbagliata: si spegne e resta al suo posto.
   Vale solo dove le opzioni sono più di due — con due sole mani
   spegnerne una equivarrebbe a indicare l'altra. */
.mano-btn.fuori {
    opacity: .35;
    pointer-events: none;
    border-color: rgba(100, 116, 139, .5);
    border-style: solid;
    background: rgba(100, 116, 139, .12);
    animation: none;
}

.mano-btn.locked { pointer-events: none; }

/* Nella modalità libera il tocco non è giusto né sbagliato: lampeggia
   e basta, perché non c'è niente da sbagliare. */
.mano-btn.tocca {
    animation: manoTocca .6s ease;
}

@keyframes manoTocca {
    0%   { border-color: #38bdf8; background: rgba(56, 189, 248, .28); border-style: solid; }
    100% { border-color: transparent; background: transparent; }
}

/* Il pulsante per girare la figura, sotto la scena */
.gira-riga {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.gira-btn { min-width: 200px; }

@media (prefers-reduced-motion: reduce) {
    .scena-figura, .mano-btn.correct, .mano-btn.wrong, .mano-btn.tocca { animation: none !important; }
}
