/* ============================================================
   GIOCO DELLE STAGIONI — stile locale
   Carica prima css/kids-base.css (variabili, header, footer).
   Le convenzioni condivise sono in GUIDA-APP-KIDS.md.
   ============================================================ */

/* ---------- 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 dell'app: il giro dell'anno, dal verde tenero al ghiaccio */
    background:
        radial-gradient(560px 300px at 4% -40px, rgba(132, 204, 22, .14), transparent 62%),
        radial-gradient(560px 320px at 98% 6%, rgba(245, 158, 11, .14), transparent 62%),
        radial-gradient(620px 380px at 104% 104%, rgba(56, 189, 248, .16), transparent 62%),
        linear-gradient(180deg, #f7fee7 0%, #fffbeb 45%, #f0f9ff 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à */
.level-card.easy   { --lvl: #f59e0b; --lvl-dark: #b45309; --lvl-soft: #fffbeb; }
.level-card.medium { --lvl: #c2410c; --lvl-dark: #7c2d12; --lvl-soft: #fff7ed; }
.level-card.hard   { --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, #84cc16, #f59e0b, #38bdf8);
    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: 1rem;
    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-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;
}

/* ---------- Il tabellone delle stagioni ---------- */
.seasons-board {
    display: grid;
    gap: clamp(10px, 2.2vw, 16px);
    width: 100%;
    margin-bottom: 1rem;
}

.seasons-board.n1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.seasons-board.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seasons-board.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.zone {
    --st: #94a3b8;
    --st-dark: #475569;
    --st-soft: #f8fafc;
    background: var(--st-soft);
    border: 3px solid var(--st);
    border-radius: var(--kids-radius);
    box-shadow: 0 6px 0 var(--st-dark), var(--kids-shadow-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 128px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    animation: cardIn .35s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

/* Un colore per stagione: verde tenero, ambra, ruggine, ghiaccio */
.zone.primavera { --st: #84cc16; --st-dark: #4d7c0f; --st-soft: #f7fee7; }
.zone.estate    { --st: #f59e0b; --st-dark: #b45309; --st-soft: #fffbeb; }
.zone.autunno   { --st: #c2410c; --st-dark: #7c2d12; --st-soft: #fff7ed; }
.zone.inverno   { --st: #38bdf8; --st-dark: #0369a1; --st-soft: #f0f9ff; }

/* Quando una cosa è in mano (scelta o trascinata) le stagioni si offrono */
.zone.waiting { animation: zoneWait 1.4s ease-in-out infinite; }

@keyframes zoneWait {
    0%, 100% { box-shadow: 0 6px 0 var(--st-dark), 0 0 0 0 rgba(255, 255, 255, 0); }
    50%      { box-shadow: 0 6px 0 var(--st-dark), 0 0 0 10px rgba(255, 255, 255, .55); }
}

.zone.over {
    transform: translateY(-4px) scale(1.02);
    background: #fff;
    box-shadow: 0 10px 0 var(--st-dark), var(--kids-shadow);
}

.zone-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    align-self: center;
    box-shadow: var(--kids-shadow-sm);
    max-width: 100%;
}

.zone-icon { font-size: 1.3rem; line-height: 1; }

.zone-name {
    font-family: var(--kids-font-title);
    font-size: clamp(.95rem, 2.8vw, 1.15rem);
    font-weight: 700;
    color: var(--st-dark);
    white-space: nowrap;
}

.zone-drop {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border-radius: var(--kids-radius-sm);
    background: rgba(255, 255, 255, .55);
    border: 2px dashed rgba(255, 255, 255, .95);
    min-height: 64px;
}

/* ---------- Il vassoio ---------- */
.tray-card {
    width: 100%;
    background: #fff;
    border: 3px solid #e6f2f0;
    border-radius: var(--kids-radius);
    box-shadow: var(--kids-shadow-sm);
    padding: 12px;
}

.items-tray {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(8px, 2vw, 14px);
    min-height: 76px;
}

/* ---------- Le cose da smistare ---------- */
.thing {
    appearance: none;
    position: relative;
    width: clamp(60px, 16vw, 84px);
    aspect-ratio: 1;
    background: #fff;
    border: 3px solid #e6f2f0;
    border-radius: var(--kids-radius-sm);
    box-shadow: 0 4px 0 rgba(10, 91, 99, .10), var(--kids-shadow-sm);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, opacity .3s ease;
    animation: cardIn .35s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: scale(.6); }
}

.thing-icon {
    font-size: clamp(1.9rem, 6.4vw, 2.6rem);
    line-height: 1;
    pointer-events: none;
}

.thing:hover {
    transform: translateY(-5px) scale(1.04);
    border-color: #bfe6e0;
    box-shadow: 0 9px 0 rgba(10, 91, 99, .10), var(--kids-shadow);
}

.thing:active { transform: scale(.94); box-shadow: 0 2px 0 rgba(10, 91, 99, .10); }

/* Scelta col tocco: resta in evidenza in attesa della stagione */
.thing.chosen {
    border-color: var(--accent);
    background: #fff8ec;
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 10px 0 #b97b00, var(--kids-shadow);
    z-index: 2;
}

.thing.dragging { opacity: .35; }

/* Stati della risposta: gli stessi in tutte le app kids */
.thing.wrong {
    border-color: #ef4444;
    background: #fef2f2;
    animation: shakeCard .5s ease;
}

@keyframes shakeCard {
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Qui stavano .reveal e .vanish: servivano a far mettere all'app la
   figura al posto giusto dopo un errore, e a far sparire i distrattori
   provati. Tolte insieme a quel comportamento — l'app non smista al
   posto del bambino e non toglie niente dal vassoio. */

/* Una volta posata, la cosa è piccola e non si tocca più */
.thing.placed {
    width: clamp(38px, 10vw, 50px);
    border-width: 2px;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
    animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1);
}

.thing.placed .thing-icon { font-size: clamp(1.2rem, 4vw, 1.6rem); }
.thing.placed.ok { border-color: #86efac; background: #f0fdf4; }

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
}

.thing.done { pointer-events: none; }

/* Fantasma del trascinamento su touch (lo crea js/kids-touch.js) */
.kids-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .95;
    box-shadow: 0 14px 28px rgba(10, 91, 99, .35);
}

/* 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.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--kids-font-title);
    font-size: clamp(1rem, 3.1vw, 1.3rem);
    font-weight: 600;
    text-align: center;
    padding: 0.6rem 4px 0;
}

.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: #b45309; border: 2px solid #fed7aa; background: #fffbeb; }

/* 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); }
}

/* ---------- Esplora ---------- */
.season-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 1rem;
}

.season-tab {
    --st: #94a3b8;
    --st-dark: #475569;
    --st-soft: #f8fafc;
    appearance: none;
    background: #fff;
    border: 3px solid var(--st);
    border-radius: var(--kids-radius-sm);
    box-shadow: 0 5px 0 var(--st-dark);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.season-tab.primavera { --st: #84cc16; --st-dark: #4d7c0f; --st-soft: #f7fee7; }
.season-tab.estate    { --st: #f59e0b; --st-dark: #b45309; --st-soft: #fffbeb; }
.season-tab.autunno   { --st: #c2410c; --st-dark: #7c2d12; --st-soft: #fff7ed; }
.season-tab.inverno   { --st: #38bdf8; --st-dark: #0369a1; --st-soft: #f0f9ff; }

.season-tab:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--st-dark); }
.season-tab.on { background: var(--st-soft); transform: translateY(-3px); box-shadow: 0 8px 0 var(--st-dark); }

.tab-icon { font-size: 1.5rem; line-height: 1; }

.tab-name {
    font-family: var(--kids-font-title);
    font-size: .8rem;
    font-weight: 700;
    color: var(--st-dark);
}

.free-scene {
    --st: #94a3b8;
    --st-dark: #475569;
    --st-soft: #f8fafc;
    width: 100%;
    background: var(--st-soft);
    border: 3px solid var(--st);
    border-radius: var(--kids-radius);
    box-shadow: 0 6px 0 var(--st-dark), var(--kids-shadow-sm);
    padding: 14px 12px 18px;
    animation: fadeIn .35s ease-out;
}

.free-scene.primavera { --st: #84cc16; --st-dark: #4d7c0f; --st-soft: #f7fee7; }
.free-scene.estate    { --st: #f59e0b; --st-dark: #b45309; --st-soft: #fffbeb; }
.free-scene.autunno   { --st: #c2410c; --st-dark: #7c2d12; --st-soft: #fff7ed; }
.free-scene.inverno   { --st: #38bdf8; --st-dark: #0369a1; --st-soft: #f0f9ff; }

.free-title {
    font-family: var(--kids-font-title);
    font-size: clamp(1.3rem, 4.2vw, 1.8rem);
    font-weight: 700;
    color: var(--st-dark);
    margin-bottom: 0.8rem;
}

.free-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 14px);
    justify-items: center;
}

.free-grid .thing { width: 100%; max-width: 96px; cursor: pointer; }

/* ---------- 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; }
}

/* Le cose posate sono decorazione, non bersagli: il minimo dei 44px
   varrebbe solo a gonfiarle e a sfondare i riquadri. */
.thing.placed { min-height: 0; }

/* ---------- 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; }

    .zone { min-height: 116px; border-width: 2px; padding: 8px; }
    .zone-drop { min-height: 56px; }

    .free-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tab-name { font-size: .72rem; }
}

/* Sotto i 380px quattro riquadri affiancati non stanno: si incolonnano
   a due a due e le figure del vassoio scendono a tre per riga. */
@media (max-width: 380px) {
    .seasons-board.n4 { gap: 8px; }
    .zone { min-height: 104px; }
    .zone-name { font-size: .9rem; }
    .free-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tab-icon { font-size: 1.3rem; }
    .tab-name { font-size: .65rem; }
}

/* Meno animazioni se richiesto dal sistema */
@media (prefers-reduced-motion: reduce) {
    .hero-item,
    .bg-decor span,
    .end-icon,
    .thing,
    .zone,
    .zone.waiting,
    .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; }
