.scene {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.scene__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.scene__back {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow);
    font-size: 22px;
}

.scene__back:hover {
    box-shadow: var(--shadow-lifted);
}

.scene__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.scene__stage {
    flex: 1;
    position: relative;
    margin: 0 20px 20px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, #eee3d3, #e2d3bb);
    min-height: 420px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 18px;
}

/* Hotspots (Words track) — flow in the wrapping grid above, always large
   and never overlapping regardless of how many objects a level has. */
.hotspot {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow);
    font-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-lifted);
}

.hotspot--active {
    animation: hotspot-pop 0.4s ease-out;
}

@keyframes hotspot-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.hotspot--done {
    background: #eef4ef;
    box-shadow: none;
    border: 2px solid var(--color-success);
}

/* Letters track */
.letter-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.letter-card:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-2px);
}

.letter-card__icon {
    font-size: 72px;
}

.letter-card__letter {
    font-size: 56px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

/* Numbers track */
.number-group {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.number-group:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-2px);
}

.number-group__items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
    font-size: 40px;
}

.number-group__item {
    opacity: 0.55;
    transition: opacity 0.2s;
}

.number-group__item--counted {
    opacity: 1;
}

.number-group__numeral {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

/* Reusable word caption: visual reinforcement for whatever was just tapped */
.word-reveal {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--color-surface);
    border-radius: 999px;
    box-shadow: var(--shadow);
    padding: 14px 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.word-reveal--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.word-reveal__text {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary-dark);
    letter-spacing: 0.02em;
}

/* Appears once every object has been heard at least once. Learner can keep
   replaying anything before tapping this to actually finish the level. */
.scene__continue {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    font-size: 28px;
    box-shadow: var(--shadow);
    animation: continue-pulse 1.6s ease-in-out infinite;
}

.scene__continue:hover {
    box-shadow: var(--shadow-lifted);
}

@keyframes continue-pulse {
    0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(79, 122, 92, 0.4); }
    50% { box-shadow: var(--shadow), 0 0 0 10px rgba(79, 122, 92, 0); }
}

@media (max-width: 480px) {
    .hotspot {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }

    .scene__stage {
        margin: 0 12px 12px;
        padding: 16px;
    }

    .letter-card {
        padding: 24px 28px;
    }

    .letter-card__icon {
        font-size: 56px;
    }

    .letter-card__letter {
        font-size: 44px;
    }

    .number-group {
        padding: 24px 20px;
    }

    .number-group__items {
        max-width: 100%;
        font-size: 32px;
    }

    .number-group__numeral {
        font-size: 38px;
    }

    .word-reveal {
        padding: 12px 20px;
    }

    .word-reveal__text {
        font-size: 22px;
    }
}
