/* ==========================================================================
   Hauna Fun Assessments — playful kid theme with lots of animation
   ========================================================================== */

/* ---------- Theme tokens ---------- */
:root {
    --asmt-candy-red: #ff5d73;
    --asmt-candy-orange: #ff9f43;
    --asmt-candy-yellow: #ffd93d;
    --asmt-candy-green: #6bcB77;
    --asmt-candy-teal: #4ecdc4;
    --asmt-candy-blue: #54a0ff;
    --asmt-candy-purple: #a29bfe;
    --asmt-candy-pink: #fd79a8;
    --asmt-ink: #3d3352;
    --asmt-ink-soft: #6b5f88;
    --asmt-cream: #fff9f0;
    --asmt-cloud: #ffffff;
    --asmt-radius-lg: 28px;
    --asmt-radius-md: 20px;
    --asmt-radius-sm: 14px;
    --asmt-shadow-pop: 0 10px 0 rgba(61, 51, 82, 0.14), 0 18px 40px rgba(61, 51, 82, 0.18);
    --asmt-shadow-soft: 0 8px 24px rgba(61, 51, 82, 0.12);
    --asmt-font-fun: 'Fredoka One', 'Playpen Sans', cursive;
    --asmt-font-body: 'Playpen Sans', 'Roboto', sans-serif;
}

/* ---------- Page base ---------- */
.assessment-page {
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 217, 61, 0.22), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(84, 160, 255, 0.20), transparent 36%),
        radial-gradient(circle at 85% 88%, rgba(255, 157, 67, 0.18), transparent 38%),
        radial-gradient(circle at 10% 90%, rgba(174, 128, 255, 0.18), transparent 36%),
        linear-gradient(180deg, #fff9f0 0%, #fdf3ff 55%, #f0fbff 100%);
    overflow-x: hidden;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.assessment-hero {
    position: relative;
    padding: 4.5rem 1.25rem 5.5rem;
    overflow: hidden;
}

.assessment-hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2.5rem;
    align-items: center;
}

.assessment-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--asmt-ink);
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--asmt-shadow-soft);
    animation: badge-wiggle 3.2s ease-in-out infinite;
}

@keyframes badge-wiggle {

    0%,
    100% {
        transform: rotate(-1.5deg);
    }

    50% {
        transform: rotate(1.5deg);
    }
}

.assessment-hero h1 {
    font-family: var(--asmt-font-fun);
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.12;
    color: var(--asmt-ink);
    margin: 1.1rem 0 0.9rem;
    text-shadow: 3px 3px 0 rgba(255, 217, 61, 0.55);
    animation: hero-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.assessment-hero p {
    font-family: var(--asmt-font-body);
    font-size: 1.15rem;
    color: var(--asmt-ink-soft);
    max-width: 34rem;
    line-height: 1.7;
    animation: hero-pop 0.9s 0.12s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes hero-pop {
    from {
        opacity: 0;
        transform: translateY(26px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.assessment-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.8rem;
    animation: hero-pop 0.9s 0.24s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.assessment-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.9rem;
    border-radius: 999px;
    font-family: var(--asmt-font-fun);
    font-size: 1.05rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.assessment-cta-primary {
    background: linear-gradient(135deg, var(--asmt-candy-red), var(--asmt-candy-orange));
    color: #fff;
    box-shadow: 0 8px 0 #d43f57, 0 16px 30px rgba(255, 93, 115, 0.4);
    animation: cta-pulse 2.4s ease-in-out infinite;
}

.assessment-cta-primary:hover {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.05);
}

.assessment-cta-primary:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #d43f57;
}

@keyframes cta-pulse {

    0%,
    100% {
        box-shadow: 0 8px 0 #d43f57, 0 16px 30px rgba(255, 93, 115, 0.4);
    }

    50% {
        box-shadow: 0 8px 0 #d43f57, 0 22px 44px rgba(255, 93, 115, 0.55);
    }
}

.assessment-cta-secondary {
    background: #ffffff;
    color: var(--asmt-ink);
    box-shadow: 0 6px 0 rgba(61, 51, 82, 0.12), 0 12px 24px rgba(61, 51, 82, 0.14);
}

.assessment-cta-secondary:hover {
    transform: translateY(-3px);
    color: var(--asmt-candy-blue);
}

/* --- Mascot --- */
.assessment-hero-mascot {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 300px;
}

.mascot-bounce {
    font-size: 7.5rem;
    line-height: 1;
    filter: drop-shadow(0 18px 22px rgba(61, 51, 82, 0.25));
    animation: mascot-bounce 2.6s ease-in-out infinite;
}

@keyframes mascot-bounce {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-22px) rotate(3deg);
    }
}

.mascot-bubble {
    position: absolute;
    top: 4%;
    right: 2%;
    background: #ffffff;
    color: var(--asmt-ink);
    font-family: var(--asmt-font-body);
    font-weight: 700;
    padding: 0.7rem 1.1rem;
    border-radius: 18px 18px 18px 4px;
    box-shadow: var(--asmt-shadow-soft);
    animation: bubble-float 3s ease-in-out infinite;
}

@keyframes bubble-float {

    0%,
    100% {
        transform: translateY(0) rotate(2deg);
    }

    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

.mascot-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mascot-sparkles i {
    position: absolute;
    font-style: normal;
    font-size: 1.4rem;
    color: var(--asmt-candy-yellow);
    animation: sparkle-twinkle 2.2s ease-in-out infinite;
}

.mascot-sparkles i:nth-child(1) {
    top: 12%;
    left: 8%;
}

.mascot-sparkles i:nth-child(2) {
    top: 30%;
    right: 6%;
    animation-delay: 0.3s;
    color: var(--asmt-candy-pink);
}

.mascot-sparkles i:nth-child(3) {
    bottom: 18%;
    left: 14%;
    animation-delay: 0.6s;
    color: var(--asmt-candy-teal);
}

.mascot-sparkles i:nth-child(4) {
    bottom: 8%;
    right: 18%;
    animation-delay: 0.9s;
}

.mascot-sparkles i:nth-child(5) {
    top: 55%;
    left: 2%;
    animation-delay: 1.2s;
    color: var(--asmt-candy-purple);
}

@keyframes sparkle-twinkle {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.6) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.25) rotate(180deg);
    }
}

/* --- Floating hero decor --- */
.assessment-hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.assessment-hero-inner {
    position: relative;
    z-index: 1;
}

.hero-float {
    position: absolute;
    font-style: normal;
    font-size: 2.6rem;
    opacity: 0.85;
    filter: drop-shadow(0 8px 12px rgba(61, 51, 82, 0.18));
    animation: hero-float 6s ease-in-out infinite;
}

.hero-float-1 {
    top: 16%;
    left: 4%;
    animation-duration: 7s;
}

.hero-float-2 {
    top: 10%;
    right: 12%;
    animation-delay: 0.8s;
}

.hero-float-3 {
    bottom: 20%;
    left: 8%;
    animation-delay: 1.6s;
    font-size: 3.2rem;
}

.hero-float-4 {
    bottom: 12%;
    right: 6%;
    animation-delay: 2.2s;
    animation-duration: 8s;
}

.hero-float-5 {
    top: 45%;
    right: 40%;
    animation-delay: 3s;
    font-size: 2.2rem;
}

.hero-float-6 {
    top: 60%;
    left: 38%;
    animation-delay: 1.2s;
    font-size: 2.2rem;
}

@keyframes hero-float {

    0%,
    100% {
        transform: translateY(0) rotate(-6deg);
    }

    50% {
        transform: translateY(-26px) rotate(8deg);
    }
}

/* ==========================================================================
   STAR PROGRESS STRIP
   ========================================================================== */
.assessment-progress-strip {
    padding: 0 1.25rem 1rem;
    margin-top: -2.2rem;
    position: relative;
    z-index: 2;
}

.assessment-progress-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.star-progress-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, #ffffff, #fff4e6);
    border: 3px solid #ffe3a3;
    border-radius: var(--asmt-radius-md);
    padding: 1.1rem 1.5rem;
    box-shadow: var(--asmt-shadow-pop);
    animation: hero-pop 0.9s 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.star-progress-emoji {
    font-size: 2.6rem;
    animation: mascot-bounce 3s ease-in-out infinite;
}

.star-progress-copy {
    display: grid;
    gap: 0.15rem;
    flex: 1;
}

.star-progress-copy strong {
    font-family: var(--asmt-font-fun);
    font-size: 1.25rem;
    color: var(--asmt-ink);
}

.star-progress-copy span {
    font-family: var(--asmt-font-body);
    color: var(--asmt-ink-soft);
    font-size: 0.95rem;
}

.star-jar {
    display: flex;
    gap: 0.3rem;
    font-size: 1.5rem;
}

.star-jar i {
    font-style: normal;
    opacity: 0.22;
    transform: scale(0.85);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-jar i.is-earned {
    opacity: 1;
    transform: scale(1);
    animation: star-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes star-pop {
    0% {
        transform: scale(0) rotate(-90deg);
    }

    70% {
        transform: scale(1.4) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ==========================================================================
   GAME PICKER
   ========================================================================== */
.assessment-games {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3rem 1.25rem 4.5rem;
}

.assessment-section-title {
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--asmt-ink);
    text-align: center;
    text-shadow: 2px 2px 0 rgba(255, 217, 61, 0.5);
    margin-bottom: 0.5rem;
}

.assessment-feature-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin: -0.8rem auto 2rem;
}

.assessment-feature-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border: 2px solid rgba(162, 155, 254, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--asmt-ink);
    font-family: var(--asmt-font-body);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(61, 51, 82, 0.08);
    animation: badge-wiggle 3.2s ease-in-out infinite;
}

.assessment-feature-pill:nth-child(2) {
    animation-delay: 0.25s;
}

.assessment-feature-pill:nth-child(3) {
    animation-delay: 0.5s;
}

.assessment-feature-pill:nth-child(4) {
    animation-delay: 0.75s;
}

.assessment-section-sub {
    font-family: var(--asmt-font-body);
    text-align: center;
    color: var(--asmt-ink-soft);
    font-size: 1.05rem;
    margin-bottom: 2.4rem;
}

.assessment-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.assessment-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--asmt-cloud);
    border-radius: var(--asmt-radius-lg);
    padding: 1.8rem 1.6rem 1.6rem;
    box-shadow: var(--asmt-shadow-soft);
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    animation: card-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.assessment-game-card:nth-child(1) {
    animation-delay: 0.05s;
}

.assessment-game-card:nth-child(2) {
    animation-delay: 0.15s;
}

.assessment-game-card:nth-child(3) {
    animation-delay: 0.25s;
}

.assessment-game-card:nth-child(4) {
    animation-delay: 0.35s;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(40px) rotate(-2deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

.assessment-game-card:hover {
    transform: translateY(-10px) rotate(-1deg);
    box-shadow: var(--asmt-shadow-pop);
    border-color: var(--card-accent, var(--asmt-candy-blue));
}

.assessment-game-card[data-game="mcq"] {
    --card-accent: var(--asmt-candy-red);
}

.assessment-game-card[data-game="fill"] {
    --card-accent: var(--asmt-candy-blue);
}

.assessment-game-card[data-game="tf"] {
    --card-accent: var(--asmt-candy-green);
}

.assessment-game-card[data-game="match"] {
    --card-accent: var(--asmt-candy-orange);
}

.assessment-game-card[data-game="final"] {
    --card-accent: var(--asmt-candy-purple);
}

.assessment-game-card-practice {
    --card-accent: var(--asmt-candy-teal);
    background: linear-gradient(150deg, #ffffff 0%, #edfffb 100%);
}

.game-card-glow {
    position: absolute;
    inset: -40% -40% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, var(--card-accent, var(--asmt-candy-blue)) 0%, transparent 70%);
    opacity: 0.16;
    border-radius: 50%;
    animation: glow-drift 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-16px, 14px) scale(1.15);
    }
}

.game-card-icon {
    font-size: 3.4rem;
    line-height: 1;
    filter: drop-shadow(0 8px 10px rgba(61, 51, 82, 0.2));
    animation: icon-wiggle 3.4s ease-in-out infinite;
}

@keyframes icon-wiggle {

    0%,
    100% {
        transform: rotate(-6deg) scale(1);
    }

    50% {
        transform: rotate(6deg) scale(1.08);
    }
}

.assessment-game-card h3 {
    font-family: var(--asmt-font-fun);
    font-size: 1.35rem;
    color: var(--asmt-ink);
    margin: 0.2rem 0 0;
}

.assessment-game-card p {
    font-family: var(--asmt-font-body);
    color: var(--asmt-ink-soft);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.game-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.game-chip {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-accent, var(--asmt-candy-blue)) 16%, #ffffff);
    color: var(--asmt-ink);
    border: 2px solid color-mix(in srgb, var(--card-accent, var(--asmt-candy-blue)) 40%, #ffffff);
}

.game-card-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: var(--asmt-radius-sm);
    font-family: var(--asmt-font-fun);
    font-size: 1.05rem;
    color: #ffffff;
    background: var(--card-accent, var(--asmt-candy-blue));
    box-shadow: 0 6px 0 color-mix(in srgb, var(--card-accent, var(--asmt-candy-blue)) 72%, #000000);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.game-card-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.game-card-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 color-mix(in srgb, var(--card-accent, var(--asmt-candy-blue)) 72%, #000000);
}

/* Final card special shine */
.assessment-game-card-final {
    background: linear-gradient(150deg, #ffffff 0%, #f6efff 100%);
}

.assessment-game-card-final::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    transform: skewX(-20deg);
    animation: crown-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes crown-shine {

    0%,
    55% {
        left: -80%;
    }

    100% {
        left: 160%;
    }
}

/* ==========================================================================
   QUIZ OVERLAY
   ========================================================================== */
.quiz-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(61, 51, 82, 0.45);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.quiz-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.quiz-shell {
    width: min(860px, 100%);
    max-height: min(92vh, 780px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffdf8, #fff4f8);
    border-radius: var(--asmt-radius-lg);
    box-shadow: 0 30px 80px rgba(61, 51, 82, 0.4);
    overflow: hidden;
    transform: translateY(40px) scale(0.92);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-overlay.is-open .quiz-shell {
    transform: translateY(0) scale(1);
}

/* --- Quiz header --- */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(135deg, var(--asmt-candy-purple), var(--asmt-candy-pink));
    color: #ffffff;
}

.quiz-close-btn {
    width: 44px;
    height: 44px;
    flex: none;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quiz-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.quiz-title-group {
    flex: 1;
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.quiz-level-chip {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    width: fit-content;
}

#quizTitle {
    font-family: var(--asmt-font-fun);
    font-size: 1.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-score-pill {
    font-family: var(--asmt-font-fun);
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-score-pill.is-bumped {
    animation: score-bump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes score-bump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35) rotate(-4deg);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Quiz progress with buddy --- */
.quiz-progress {
    position: relative;
    height: 18px;
    margin: 0.9rem 1.4rem 0;
    background: rgba(61, 51, 82, 0.1);
    border-radius: 999px;
}

.quiz-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--asmt-candy-teal), var(--asmt-candy-green), var(--asmt-candy-yellow));
    background-size: 200% 100%;
    animation: progress-shimmer 2.4s linear infinite;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes progress-shimmer {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 200% 0%;
    }
}

.quiz-progress-buddy {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 1.7rem;
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 6px rgba(61, 51, 82, 0.3));
    animation: buddy-hop 0.9s ease-in-out infinite;
}

@keyframes buddy-hop {

    0%,
    100% {
        margin-top: -2px;
    }

    50% {
        margin-top: -8px;
    }
}

/* --- Quiz stage --- */
.quiz-stage {
    flex: 1;
    overflow-y: auto;
    padding: 1.6rem 1.6rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    outline: none;
}

.quiz-question-label {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--asmt-ink-soft);
    background: #ffffff;
    border: 2px dashed color-mix(in srgb, var(--asmt-candy-purple) 50%, #ffffff);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    width: fit-content;
    animation: fade-slide-in 0.4s ease both;
}

.quiz-question-text {
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--asmt-ink);
    line-height: 1.35;
    margin: 0;
    animation: fade-slide-in 0.45s 0.05s ease both;
}

.quiz-question-emoji {
    font-size: 1.2em;
    vertical-align: middle;
    display: inline-block;
    animation: icon-wiggle 2.8s ease-in-out infinite;
}

@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MCQ picture options --- */
.quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quiz-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.3rem 1rem 1.1rem;
    background: #ffffff;
    border: 3px solid #f0e6f7;
    border-radius: var(--asmt-radius-md);
    cursor: pointer;
    font-family: var(--asmt-font-body);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-option:nth-child(1) {
    animation-delay: 0.08s;
}

.quiz-option:nth-child(2) {
    animation-delay: 0.16s;
}

.quiz-option:nth-child(3) {
    animation-delay: 0.24s;
}

.quiz-option:nth-child(4) {
    animation-delay: 0.32s;
}

@keyframes option-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-option:hover:not(:disabled) {
    transform: translateY(-6px) rotate(-1deg);
    border-color: var(--asmt-candy-blue);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-option-emoji {
    font-size: 3.2rem;
    line-height: 1;
    filter: drop-shadow(0 6px 8px rgba(61, 51, 82, 0.18));
}

.quiz-option-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--asmt-ink);
}

.quiz-option-letter {
    position: absolute;
    top: -12px;
    left: -10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--asmt-candy-purple);
    color: #ffffff;
    font-family: var(--asmt-font-fun);
    font-size: 0.78rem;
    text-transform: lowercase;
    box-shadow: 0 4px 8px rgba(61, 51, 82, 0.25);
}

.quiz-option.is-correct {
    border-color: var(--asmt-candy-green);
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-option.is-wrong {
    border-color: var(--asmt-candy-red);
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

@keyframes correct-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    35% {
        transform: translateY(-14px) scale(1.06);
    }

    65% {
        transform: translateY(0) scale(0.98);
    }
}

@keyframes wrong-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-9px) rotate(-2deg);
    }

    40% {
        translate: 9px 0;
        transform: translateX(9px) rotate(2deg);
    }

    60% {
        transform: translateX(-6px) rotate(-1deg);
    }

    80% {
        transform: translateX(6px) rotate(1deg);
    }
}

.quiz-option:disabled {
    cursor: default;
    opacity: 0.75;
}

.quiz-option.is-correct:disabled {
    opacity: 1;
}

/* --- Fill in the blanks --- */
.quiz-fill-word {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    color: var(--asmt-ink);
    letter-spacing: 0.06em;
    padding: 1rem 0.5rem;
}

.quiz-blank {
    display: inline-grid;
    place-items: center;
    min-width: 2.4em;
    height: 1.6em;
    padding: 0 0.3em;
    border-bottom: 6px dotted var(--asmt-candy-purple);
    color: var(--asmt-candy-purple);
    animation: blank-glow 1.6s ease-in-out infinite;
}

@keyframes blank-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 0 rgba(162, 155, 254, 0));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(162, 155, 254, 0.8));
    }
}

.quiz-blank.is-filled {
    animation: star-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-blank.is-correct {
    color: var(--asmt-candy-green);
    border-bottom-color: var(--asmt-candy-green);
}

.quiz-blank.is-wrong {
    color: var(--asmt-candy-red);
    border-bottom-color: var(--asmt-candy-red);
    animation: wrong-shake 0.5s ease;
}

.quiz-letter-tray {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
}

.quiz-letter-tile {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    font-family: var(--asmt-font-fun);
    font-size: 1.2rem;
    text-transform: lowercase;
    color: #ffffff;
    background: linear-gradient(160deg, var(--asmt-candy-blue), var(--asmt-candy-teal));
    border: none;
    border-radius: var(--asmt-radius-sm);
    box-shadow: 0 6px 0 #2f7cd3, 0 10px 18px rgba(84, 160, 255, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-letter-tile:nth-child(1) {
    animation-delay: 0.08s;
}

.quiz-letter-tile:nth-child(2) {
    animation-delay: 0.16s;
}

.quiz-letter-tile:nth-child(3) {
    animation-delay: 0.24s;
}

.quiz-letter-tile:nth-child(4) {
    animation-delay: 0.32s;
}

.quiz-letter-tile:hover:not(:disabled) {
    transform: translateY(-5px) rotate(-2deg);
    filter: brightness(1.08);
}

.quiz-letter-tile:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2f7cd3;
}

.quiz-letter-tile:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: 0 6px 0 #2f7cd3;
}

.quiz-letter-tile.is-correct {
    background: linear-gradient(160deg, var(--asmt-candy-green), #4cae55);
    box-shadow: 0 6px 0 #3d9147;
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-letter-tile.is-wrong {
    background: linear-gradient(160deg, var(--asmt-candy-red), #e84a60);
    box-shadow: 0 6px 0 #c93a50;
    animation: wrong-shake 0.5s ease;
}

/* --- Match the following --- */
.quiz-match-board {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) auto minmax(260px, 1.5fr);
    align-items: center;
    gap: 1rem;
}

.quiz-match-letter {
    min-height: 190px;
    border: 4px solid var(--asmt-candy-orange);
    border-radius: var(--asmt-radius-lg);
    background: linear-gradient(160deg, #fff1d8, #ffffff);
    color: var(--asmt-ink);
    box-shadow: 0 8px 0 #e18a2c, 0 14px 24px rgba(255, 159, 67, 0.25);
    cursor: pointer;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    font-family: var(--asmt-font-fun);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-match-letter:hover {
    transform: translateY(-5px) rotate(-2deg);
}

.quiz-match-letter strong {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1;
    color: var(--asmt-candy-orange);
    text-transform: lowercase;
    text-shadow: 2px 2px 0 #ffdca9;
}

.quiz-match-label,
.quiz-match-hint {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    color: var(--asmt-ink-soft);
}

.quiz-match-hint {
    font-size: 0.8rem;
}

.quiz-match-connector {
    color: var(--asmt-candy-pink);
    font-size: 2.2rem;
    animation: connector-bounce 1.4s ease-in-out infinite;
}

@keyframes connector-bounce {
    50% {
        transform: translateX(7px) scale(1.12);
    }
}

.quiz-match-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 0.8rem;
}

.quiz-match-picture {
    min-height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem;
    border: 3px solid #f0e6f7;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    cursor: pointer;
    font-family: var(--asmt-font-body);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.quiz-match-picture:hover:not(:disabled) {
    transform: translateY(-6px) rotate(2deg);
    border-color: var(--asmt-candy-orange);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-match-picture.is-correct {
    border-color: var(--asmt-candy-green);
    background: #eafff0;
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-match-picture.is-wrong {
    border-color: var(--asmt-candy-red);
    background: #fff0f2;
    animation: wrong-shake 0.5s ease;
}

.quiz-match-picture:disabled {
    cursor: default;
    opacity: 0.65;
}

.quiz-match-picture.is-correct:disabled {
    opacity: 1;
}

/* --- H1 practice: odd-one-out word sorting --- */
.quiz-practice-board {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1rem;
    border: 3px solid #b8eee7;
    border-radius: var(--asmt-radius-lg);
    background: linear-gradient(145deg, #f2fffd, #ffffff);
    box-shadow: 0 10px 22px rgba(78, 205, 196, 0.16);
}

.quiz-practice-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--asmt-ink-soft);
    font-family: var(--asmt-font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.quiz-practice-guide span:first-child {
    font-size: 1.5rem;
    animation: icon-wiggle 2.4s ease-in-out infinite;
}

.quiz-practice-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.quiz-practice-word {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1rem 0.7rem;
    border: 3px solid #d9f5f1;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    color: var(--asmt-ink);
    cursor: pointer;
    font-family: var(--asmt-font-body);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-practice-word:nth-child(1) {
    animation-delay: 0.08s;
}

.quiz-practice-word:nth-child(2) {
    animation-delay: 0.16s;
}

.quiz-practice-word:nth-child(3) {
    animation-delay: 0.24s;
}

.quiz-practice-word:nth-child(4) {
    animation-delay: 0.32s;
}

.quiz-practice-word:hover:not(:disabled) {
    transform: translateY(-6px) rotate(-2deg);
    border-color: var(--asmt-candy-teal);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-practice-word-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--asmt-candy-teal), var(--asmt-candy-blue));
    color: #ffffff;
    font-family: var(--asmt-font-fun);
    font-size: 0.8rem;
    text-transform: lowercase;
}

.quiz-practice-word strong {
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.15rem, 3vw, 1.55rem);
}

.quiz-practice-sound {
    color: var(--asmt-candy-teal);
    font-size: 0.95rem;
    font-weight: 800;
}

.quiz-practice-word.is-correct {
    border-color: var(--asmt-candy-green);
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-practice-word.is-wrong {
    border-color: var(--asmt-candy-red);
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

.quiz-practice-word:disabled {
    cursor: default;
    opacity: 0.65;
}

.quiz-practice-word.is-correct:disabled {
    opacity: 1;
}

/* --- True / False --- */
.quiz-tf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    padding: 0.4rem 0;
}

.quiz-tf-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.6rem 1rem;
    border: 4px solid transparent;
    border-radius: var(--asmt-radius-lg);
    font-family: var(--asmt-font-fun);
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.quiz-tf-true {
    background: linear-gradient(160deg, var(--asmt-candy-green), #4cae55);
    box-shadow: 0 8px 0 #3d9147, 0 16px 30px rgba(107, 203, 119, 0.4);
    animation: option-in 0.5s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-tf-false {
    background: linear-gradient(160deg, var(--asmt-candy-red), #e84a60);
    box-shadow: 0 8px 0 #c93a50, 0 16px 30px rgba(255, 93, 115, 0.4);
    animation: option-in 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-tf-btn:hover:not(:disabled) {
    transform: translateY(-6px) scale(1.02);
    filter: brightness(1.06);
}

.quiz-tf-btn:active:not(:disabled) {
    transform: translateY(2px);
}

.quiz-tf-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-tf-btn.is-correct {
    opacity: 1;
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-tf-btn.is-wrong {
    opacity: 1;
    animation: wrong-shake 0.5s ease;
}

.quiz-tf-icon {
    font-size: 3rem;
    line-height: 1;
}

.quiz-hint {
    padding: 0.85rem 1rem;
    border: 2px dashed var(--asmt-candy-yellow);
    border-radius: var(--asmt-radius-md);
    background: linear-gradient(135deg, #fffbea, #fff3bd);
    color: #765400;
    font-family: var(--asmt-font-body);
    font-weight: 700;
    animation: feedback-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- Feedback banner --- */
.quiz-feedback {
    display: none;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--asmt-radius-md);
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 1.05rem;
    animation: feedback-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-feedback.is-visible {
    display: flex;
}

@keyframes feedback-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-feedback.is-correct {
    background: linear-gradient(135deg, #eafff0, #d9f7e3);
    color: #2c7a3f;
    border: 2px solid var(--asmt-candy-green);
}

.quiz-feedback.is-wrong {
    background: linear-gradient(135deg, #fff0f2, #ffe1e6);
    color: #b8324a;
    border: 2px solid var(--asmt-candy-red);
}

.quiz-feedback-emoji {
    font-size: 1.8rem;
    animation: icon-wiggle 2s ease-in-out infinite;
}

/* --- Quiz footer --- */
.quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: #ffffff;
    border-top: 3px solid #f6ecfa;
}

.quiz-streak {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    color: var(--asmt-ink-soft);
    font-size: 0.95rem;
}

.quiz-streak.is-hot {
    color: var(--asmt-candy-orange);
    animation: score-bump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-footer-right {
    display: flex;
    gap: 0.7rem;
}

.quiz-control-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--asmt-radius-sm);
    font-family: var(--asmt-font-fun);
    font-size: 1rem;
    color: var(--asmt-ink);
    background: #f1eaf8;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.quiz-control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.quiz-control-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.quiz-hint-btn {
    color: #8a5a00;
    background: linear-gradient(135deg, #fff0a8, #ffd86b);
    box-shadow: 0 5px 0 #d8a52e;
}

.quiz-hint-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-2px) rotate(-2deg);
}

.quiz-next-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--asmt-candy-green), var(--asmt-candy-teal));
    box-shadow: 0 5px 0 #3d9147;
}

.quiz-next-btn:hover:not(:disabled) {
    box-shadow: 0 5px 0 #3d9147;
    filter: brightness(1.06);
}

.quiz-next-btn:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #3d9147;
}

/* --- Results screen --- */
.quiz-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    padding: 1rem 0.5rem 2rem;
    animation: hero-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-results-trophy {
    font-size: 6rem;
    line-height: 1;
    animation: mascot-bounce 2.4s ease-in-out infinite;
    filter: drop-shadow(0 16px 20px rgba(61, 51, 82, 0.25));
}

.quiz-results h3 {
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: var(--asmt-ink);
    margin: 0;
    text-shadow: 2px 2px 0 rgba(255, 217, 61, 0.5);
}

.quiz-results-message {
    font-family: var(--asmt-font-body);
    color: var(--asmt-ink-soft);
    font-size: 1.1rem;
    max-width: 30rem;
    line-height: 1.65;
    margin: 0;
}

.quiz-results-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 2.6rem;
}

.quiz-results-stars i {
    font-style: normal;
    opacity: 0.2;
    transform: scale(0.8);
}

.quiz-results-stars i.is-earned {
    opacity: 1;
    transform: scale(1);
    animation: star-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-results-stars i.is-earned:nth-child(1) {
    animation-delay: 0.15s;
}

.quiz-results-stars i.is-earned:nth-child(2) {
    animation-delay: 0.4s;
}

.quiz-results-stars i.is-earned:nth-child(3) {
    animation-delay: 0.65s;
}

.quiz-results-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.quiz-stat-chip {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--asmt-ink);
    background: #ffffff;
    border: 2px solid #f0e6f7;
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    box-shadow: var(--asmt-shadow-soft);
}

.quiz-results-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.quiz-results-btn {
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 999px;
    font-family: var(--asmt-font-fun);
    font-size: 1.02rem;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--asmt-candy-purple), var(--asmt-candy-pink));
    box-shadow: 0 6px 0 #8a7bd8;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.quiz-results-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.quiz-results-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8a7bd8;
}

.quiz-results-btn.is-secondary {
    color: var(--asmt-ink);
    background: #ffffff;
    box-shadow: 0 6px 0 rgba(61, 51, 82, 0.12);
}

/* ==========================================================================
   CONFETTI
   ========================================================================== */
.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1300;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -4vh;
    font-size: 1.4rem;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-6vh) rotate(0deg) translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(720deg) translateX(var(--confetti-drift, 0px));
        opacity: 0.9;
    }
}

/* Star burst when earning a star */
.star-burst {
    position: fixed;
    z-index: 1301;
    font-size: 2rem;
    pointer-events: none;
    animation: star-burst 0.9s ease-out forwards;
}

@keyframes star-burst {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -140%) scale(1.6);
        opacity: 0;
    }
}

/* ==========================================================================
   H2 NUMBERS & SHAPES GAMES
   ========================================================================== */

/* ---------- Level switch (H1 Phonics ⇄ H2 Numbers) ---------- */
.assessment-level-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem;
    margin: 0 auto 2rem;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: var(--asmt-shadow-soft);
    border: 2px solid #f2e8fa;
}

.assessment-level-btn {
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.4rem;
    font-family: var(--asmt-font-fun);
    font-size: 1rem;
    color: var(--asmt-ink-soft);
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease;
}

.assessment-level-btn:hover {
    transform: translateY(-2px);
    color: var(--asmt-ink);
}

.assessment-level-btn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--asmt-candy-purple), var(--asmt-candy-blue));
    box-shadow: 0 6px 0 color-mix(in srgb, var(--asmt-candy-purple) 70%, #000000);
}

/* The game-set grid uses `display: grid`, which would otherwise beat the
   UA `[hidden] { display: none }` rule and show both levels at once. */
.assessment-game-set[hidden] {
    display: none;
}

/* ---------- New card accents ---------- */
.assessment-game-card[data-game="counting"] {
    --card-accent: var(--asmt-candy-green);
}

.assessment-game-card[data-game="numbers"] {
    --card-accent: var(--asmt-candy-blue);
}

.assessment-game-card[data-game="compare"] {
    --card-accent: var(--asmt-candy-orange);
}

.assessment-game-card[data-game="shapes"] {
    --card-accent: var(--asmt-candy-teal);
}

.assessment-game-card[data-game="pattern"] {
    --card-accent: var(--asmt-candy-pink);
}

.assessment-game-card[data-game="classify"] {
    --card-accent: var(--asmt-candy-yellow);
}

.assessment-game-card[data-game="h2champion"] {
    --card-accent: var(--asmt-candy-purple);
}

/* ---------- Shared H2 board shell ---------- */
.quiz-count-board,
.quiz-number-board,
.quiz-pattern-board {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem;
    border: 3px solid #d8f0e8;
    border-radius: var(--asmt-radius-lg);
    background: linear-gradient(145deg, #f4fffb, #ffffff);
    box-shadow: 0 10px 22px rgba(107, 203, 119, 0.16);
}

/* ---------- Counting game ---------- */
.quiz-count-tray {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--asmt-radius-md);
    background: repeating-linear-gradient(45deg, #fffdf6, #fffdf6 18px, #fff7e6 18px, #fff7e6 36px);
    border: 2px dashed #ffe0a3;
    min-height: 110px;
    align-items: center;
}

.quiz-count-item {
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1;
    animation: count-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    filter: drop-shadow(0 6px 8px rgba(61, 51, 82, 0.2));
}

@keyframes count-pop {
    from {
        opacity: 0;
        transform: scale(0.2) rotate(-25deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.quiz-count-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.quiz-count-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 1rem 0.5rem;
    border: 3px solid #e3f5ef;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    color: var(--asmt-ink);
    cursor: pointer;
    font-family: var(--asmt-font-body);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-count-num:nth-child(1) {
    animation-delay: 0.06s;
}

.quiz-count-num:nth-child(2) {
    animation-delay: 0.14s;
}

.quiz-count-num:nth-child(3) {
    animation-delay: 0.22s;
}

.quiz-count-num:nth-child(4) {
    animation-delay: 0.3s;
}

.quiz-count-num strong {
    font-family: var(--asmt-font-fun);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1;
}

.quiz-count-word {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--asmt-ink-soft);
    text-transform: capitalize;
}

.quiz-count-num:hover:not(:disabled) {
    transform: translateY(-8px) rotate(-2deg);
    border-color: var(--asmt-candy-green);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-count-num.is-correct,
.quiz-train-carriage.is-correct {
    border-color: var(--asmt-candy-green) !important;
    background: linear-gradient(180deg, #ffffff, #eafff0) !important;
    color: #2c7a3f !important;
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-count-num.is-wrong,
.quiz-train-carriage.is-wrong {
    border-color: var(--asmt-candy-red) !important;
    background: linear-gradient(180deg, #ffffff, #fff0f2) !important;
    color: #b8324a !important;
    animation: wrong-shake 0.5s ease;
}

.quiz-count-num:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-count-num.is-correct:disabled {
    opacity: 1;
}

/* ---------- Number train ---------- */
.quiz-number-train {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0;
}

.quiz-train-engine {
    font-size: 2.6rem;
    line-height: 1;
    animation: train-chug 1s ease-in-out infinite;
    filter: drop-shadow(0 6px 8px rgba(61, 51, 82, 0.25));
}

@keyframes train-chug {

    0%,
    100% {
        transform: translateX(0) rotate(-2deg);
    }

    50% {
        transform: translateX(4px) rotate(2deg);
    }
}

.quiz-train-carriage {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--asmt-candy-blue), #3576d6);
    color: #ffffff;
    font-family: var(--asmt-font-fun);
    font-size: 1.9rem;
    box-shadow: 0 6px 0 #2a5fae;
    animation: train-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-train-carriage.is-blank {
    background: repeating-linear-gradient(45deg, #fff3bd, #fff3bd 10px, #ffe98a 10px, #ffe98a 20px);
    color: #a37a00;
    box-shadow: 0 6px 0 #e0be4c;
    border: 3px dashed #e0b93c;
    animation: train-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both, blank-glow 1.6s ease-in-out infinite;
}

@keyframes train-pop {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.6);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Big or small ---------- */
.quiz-compare-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.quiz-compare-pick {
    display: grid;
    place-items: center;
    padding: 1.6rem 1rem;
    min-height: 190px;
    border: 4px dashed #ffe0c2;
    border-radius: var(--asmt-radius-lg);
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-compare-emoji {
    font-size: clamp(3rem, 12vw, 5.5rem);
    line-height: 1;
    filter: drop-shadow(0 10px 12px rgba(61, 51, 82, 0.2));
}

.quiz-compare-pick.is-big-pick .quiz-compare-emoji {
    font-size: clamp(4rem, 16vw, 7rem);
}

.quiz-compare-pick.is-small-pick .quiz-compare-emoji {
    font-size: clamp(2rem, 8vw, 3.2rem);
}

.quiz-compare-pick:hover:not(:disabled) {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--asmt-candy-orange);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-compare-pick.is-correct {
    border-color: var(--asmt-candy-green);
    border-style: solid;
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-compare-pick.is-wrong {
    border-color: var(--asmt-candy-red);
    border-style: solid;
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

.quiz-compare-pick:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-compare-pick.is-correct:disabled {
    opacity: 1;
}

/* ---------- Shape safari ---------- */
.quiz-shape-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eaf6ff, #f2ecff);
    border: 2px dashed color-mix(in srgb, var(--asmt-candy-blue) 45%, #ffffff);
}

.quiz-shape-silhouette {
    width: 48px;
    height: 48px;
    color: var(--asmt-candy-purple);
    animation: icon-wiggle 2.6s ease-in-out infinite;
}

.quiz-shape-name {
    font-family: var(--asmt-font-fun);
    font-size: 1.3rem;
    color: var(--asmt-ink);
    text-transform: capitalize;
}

.quiz-shape-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.quiz-shape-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.6rem;
    border: 3px solid #ece2fb;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-shape-card:nth-child(1) {
    animation-delay: 0.06s;
}

.quiz-shape-card:nth-child(2) {
    animation-delay: 0.14s;
}

.quiz-shape-card:nth-child(3) {
    animation-delay: 0.22s;
}

.quiz-shape-card:nth-child(4) {
    animation-delay: 0.3s;
}

.quiz-shape-shape {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    color: var(--asmt-candy-blue);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-shape-card[data-shape="circle"] .quiz-shape-shape {
    color: #ff5d73;
}

.quiz-shape-card[data-shape="oval"] .quiz-shape-shape {
    color: #ff9f43;
}

.quiz-shape-card[data-shape="square"] .quiz-shape-shape {
    color: #ffd93d;
}

.quiz-shape-card[data-shape="triangle"] .quiz-shape-shape {
    color: #6bcb77;
}

.quiz-shape-card[data-shape="star"] .quiz-shape-shape {
    color: #54a0ff;
}

.quiz-shape-card[data-shape="heart"] .quiz-shape-shape {
    color: #a29bfe;
}

.quiz-shape-shape svg {
    width: 100%;
    height: 100%;
}

.quiz-shape-label {
    font-family: var(--asmt-font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--asmt-ink);
    text-transform: capitalize;
}

.quiz-shape-card:hover:not(:disabled) {
    transform: translateY(-8px) rotate(-3deg);
    border-color: var(--asmt-candy-blue);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-shape-card:hover:not(:disabled) .quiz-shape-shape {
    transform: scale(1.15) rotate(6deg);
}

.quiz-shape-card.is-correct {
    border-color: var(--asmt-candy-green);
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-shape-card.is-wrong {
    border-color: var(--asmt-candy-red);
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

.quiz-shape-card:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-shape-card.is-correct:disabled {
    opacity: 1;
}

/* ---------- Pattern parade ---------- */
.quiz-pattern-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--asmt-radius-md);
    background: linear-gradient(135deg, #fff0f7, #f3ecff);
}

.quiz-pattern-cell {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: #ffffff;
    font-size: 2rem;
    line-height: 1;
    box-shadow: var(--asmt-shadow-soft);
    animation: option-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-pattern-cell.is-next {
    background: repeating-linear-gradient(45deg, #fff3bd, #fff3bd 9px, #ffe98a 9px, #ffe98a 18px);
    border: 3px dashed #e0b93c;
    color: #a37a00;
    font-family: var(--asmt-font-fun);
    animation: option-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both, blank-glow 1.6s ease-in-out infinite;
}

.quiz-pattern-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.quiz-pattern-option {
    display: grid;
    place-items: center;
    padding: 0.9rem;
    border: 3px solid #f6e2ef;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-pattern-option:nth-child(1) {
    animation-delay: 0.06s;
}

.quiz-pattern-option:nth-child(2) {
    animation-delay: 0.14s;
}

.quiz-pattern-option:nth-child(3) {
    animation-delay: 0.22s;
}

.quiz-pattern-option:nth-child(4) {
    animation-delay: 0.3s;
}

.quiz-pattern-option:hover:not(:disabled) {
    transform: translateY(-8px) rotate(4deg) scale(1.06);
    border-color: var(--asmt-candy-pink);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-pattern-option.is-correct {
    border-color: var(--asmt-candy-green);
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-pattern-option.is-wrong {
    border-color: var(--asmt-candy-red);
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

.quiz-pattern-option:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-pattern-option.is-correct:disabled {
    opacity: 1;
}

/* ---------- Odd one out (H2 sorting) ---------- */
.quiz-classify-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
    border: 3px solid #ffe9b8;
    border-radius: var(--asmt-radius-lg);
    background: linear-gradient(145deg, #fffbe9, #ffffff);
    box-shadow: 0 10px 22px rgba(255, 217, 61, 0.18);
}

.quiz-classify-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 140px;
    padding: 1rem 0.7rem;
    border: 3px solid #fdeecb;
    border-radius: var(--asmt-radius-md);
    background: #ffffff;
    color: var(--asmt-ink);
    cursor: pointer;
    font-family: var(--asmt-font-body);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    animation: option-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quiz-classify-card:nth-child(1) {
    animation-delay: 0.06s;
}

.quiz-classify-card:nth-child(2) {
    animation-delay: 0.14s;
}

.quiz-classify-card:nth-child(3) {
    animation-delay: 0.22s;
}

.quiz-classify-card:nth-child(4) {
    animation-delay: 0.3s;
}

.quiz-classify-emoji {
    font-size: 2.8rem;
    line-height: 1;
    filter: drop-shadow(0 6px 8px rgba(61, 51, 82, 0.18));
}

.quiz-classify-label {
    font-family: var(--asmt-font-fun);
    font-size: 1.05rem;
    text-transform: capitalize;
}

.quiz-classify-card:hover:not(:disabled) {
    transform: translateY(-8px) rotate(-2deg);
    border-color: var(--asmt-candy-yellow);
    box-shadow: var(--asmt-shadow-pop);
}

.quiz-classify-card.is-correct {
    border-color: var(--asmt-candy-green);
    background: linear-gradient(180deg, #ffffff, #eafff0);
    animation: correct-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-classify-card.is-wrong {
    border-color: var(--asmt-candy-red);
    background: linear-gradient(180deg, #ffffff, #fff0f2);
    animation: wrong-shake 0.5s ease;
}

.quiz-classify-card:disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-classify-card.is-correct:disabled {
    opacity: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .assessment-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .assessment-hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .assessment-hero-cta {
        justify-content: center;
    }

    .assessment-hero-mascot {
        min-height: 240px;
    }

    .mascot-bounce {
        font-size: 5.5rem;
    }
}

@media (max-width: 640px) {
    .assessment-hero {
        padding: 3rem 1rem 4.5rem;
    }

    .star-progress-card {
        flex-direction: column;
        text-align: center;
    }

    .star-jar {
        justify-content: center;
    }

    .quiz-tf-row {
        grid-template-columns: 1fr;
    }

    .quiz-match-board {
        grid-template-columns: 1fr;
    }

    .quiz-practice-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-count-options,
    .quiz-shape-grid,
    .quiz-pattern-options,
    .quiz-classify-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-compare-board {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .quiz-train-carriage {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .assessment-level-switch {
        display: flex;
        width: 100%;
    }

    .assessment-level-btn {
        flex: 1;
        padding: 0.7rem 0.8rem;
        font-size: 0.92rem;
    }

    .quiz-match-connector {
        transform: rotate(90deg);
    }

    .quiz-match-choices {
        width: 100%;
    }

    .quiz-letter-tile {
        width: 52px;
        height: 52px;
        font-size: 1rem;
    }

    .quiz-header {
        padding: 0.8rem 1rem;
    }

    .quiz-stage {
        padding: 1.2rem 1rem 1rem;
    }

    .quiz-footer {
        flex-direction: column;
        gap: 0.7rem;
    }

    .quiz-footer-right {
        width: 100%;
        justify-content: stretch;
    }

    .quiz-footer-right .quiz-control-btn {
        flex: 1;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}