/* ============================================================
   Kids English Adventure — Design System (Pastel, Kid-Friendly)
   Target: iPad landscape, touch-first, age 3+
   ============================================================ */

/* ──────────── CSS Reset ──────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ──────────── Design Tokens ──────────── */
:root {
    /* Safe Area Insets for Notch / Dynamic Island / Punch Hole */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* Font */
    --font-main: 'Baloo 2', 'Nunito', -apple-system, sans-serif;

    /* Pastel Palette */
    --color-sky: #87CEEB;
    --color-sky-light: #B8E4F9;
    --color-sky-dark: #5BB5D9;
    --color-mint: #98D8C8;
    --color-mint-light: #C2EBE1;
    --color-peach: #FFDAB9;
    --color-peach-light: #FFE8D1;
    --color-lavender: #E6E6FA;
    --color-lavender-light: #F0F0FF;
    --color-coral: #FF7F7F;
    --color-coral-light: #FFA8A8;
    --color-sunshine: #FFE066;
    --color-sunshine-light: #FFEC99;
    --color-grass: #77DD77;
    --color-grass-light: #A8EEAA;
    --color-cloud: #FFFFFF;
    --color-cloud-soft: #F8FBFF;

    /* Text */
    --text-dark: #2C3E50;
    --text-medium: #546E7A;
    --text-light: #90A4AE;
    --text-white: #FFFFFF;
    --text-vocab: #E53935;

    /* Shadows */
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.10);
    --shadow-btn: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Borders */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;
    --radius-round: 50%;

    /* Transitions */
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s var(--ease-smooth);
    --transition-smooth: all 0.3s var(--ease-smooth);
    --transition-bounce: all 0.5s var(--ease-bounce);

    /* Sizes */
    --touch-min: 64px;     /* Minimum touch target for 3yo */
    --nav-btn-size: 56px;
}

/* ──────────── Base Styles ──────────── */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    font-size: 18px;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--color-sky-light) 0%, var(--color-lavender-light) 100%);
}

/* ──────────── App Container ──────────── */
.app-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
}

/* ──────────── Screen System ──────────── */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) translateZ(0);
    will-change: transform, opacity;
    contain: layout style;
    transition: opacity 0.35s var(--ease-smooth),
                visibility 0.35s var(--ease-smooth),
                transform 0.35s var(--ease-smooth);
    z-index: 1;
}

.screen:not(.active) {
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateZ(0);
    z-index: 10;
}

/* ──────────── Splash Screen ──────────── */
.screen--splash {
    background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-mint) 50%, var(--color-lavender) 100%);
    z-index: 100;
}

.screen--splash:not(.active) {
    display: none !important;
}

.splash__content {
    text-align: center;
    animation: fadeInUp 0.8s var(--ease-bounce);
}

.splash__icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounceFloat 2s infinite ease-in-out;
}

.splash__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.splash__loader {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.loader-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-white);
    animation: dotPulse 1.4s infinite ease-in-out;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

/* ──────────── Navigation Back Button ──────────── */
.nav-back-btn {
    position: absolute;
    top: max(16px, calc(env(safe-area-inset-top, 0px) + 8px));
    left: max(16px, calc(env(safe-area-inset-left, 0px) + 8px));
    width: var(--nav-btn-size);
    height: var(--nav-btn-size);
    border-radius: var(--radius-round);
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    z-index: 20;
    font-size: 0;
}

.nav-back-icon {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.nav-back-btn:active {
    transform: scale(0.9);
}

/* ──────────── Home Screen (Kid-First Sago Mini Style) ──────────── */
.screen--home {
    background: linear-gradient(180deg, #B8E4F9 0%, #E8F5E9 50%, #FFF9C4 100%);
    padding: max(0.8rem, calc(env(safe-area-inset-top, 0px) + 0.3rem))
             max(1.2rem, calc(env(safe-area-inset-right, 0px) + 0.4rem))
             max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.4rem))
             max(1.2rem, calc(env(safe-area-inset-left, 0px) + 0.4rem));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow: hidden; /* STRICTLY ZERO SCROLL ON IPAD */
    position: relative;
}

/* ──────────── Compact Header Bar ──────────── */
.home__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1160px;
    height: 56px;
    margin-bottom: 0.6rem;
    padding: 0 0.5rem;
    flex-shrink: 0;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ──────────── Chunky Unit Switcher Tabs ──────────── */
.curriculum-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.curriculum-tab-btn {
    border-radius: 999px;
    padding: 8px 22px;
    border: 3px solid #FFFFFF;
    background: rgba(255, 255, 255, 0.88);
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.2s var(--ease-bounce);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.curriculum-tab-btn:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.curriculum-tab-btn.active {
    background: #FFE066;
    color: #5D4037;
    border-color: #FFA000;
    transform: scale(1.06);
    box-shadow: 0 6px 16px rgba(255, 160, 0, 0.35);
}

/* ──────────── Stage: Giant Chunky Cards Grid (Zero Scroll) ──────────── */
.home__unit-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1180px;
    flex: 1;
    margin: 0 auto;
    padding: 0.4rem 0.6rem 0.8rem;
    overflow: hidden; /* STRICTLY NO SCROLLBAR */
}

/* ──────────── Kid Giant Adventure Card (Sago Mini Arcade Style) ──────────── */
.kid-unit-card {
    flex: 1;
    max-width: 340px;
    min-width: 220px;
    height: 100%;
    max-height: calc(100vh - 95px);
    background: #FFFFFF;
    border-radius: 36px;
    border: 5px solid var(--card-border, #4BA3E3);
    box-shadow: 0 12px 0 var(--card-border, #4BA3E3), 0 20px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.2rem 1.4rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s var(--ease-bounce);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.kid-unit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 0 var(--card-border, #4BA3E3), 0 26px 40px rgba(0, 0, 0, 0.18);
}

.kid-unit-card:active {
    transform: translateY(6px);
    box-shadow: 0 6px 0 var(--card-border, #4BA3E3), 0 10px 18px rgba(0, 0, 0, 0.12);
}

/* Card Header Banner */
.kid-unit-card__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.kid-unit-card__badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    background: var(--card-border, #4BA3E3);
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.kid-unit-card__count {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.06);
    padding: 4px 12px;
    border-radius: 999px;
}

/* Card Hero Art (Big bouncing SVG) */
.kid-unit-card__art {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 0.4rem 0;
}

.kid-unit-card__hero-img {
    width: auto;
    height: auto;
    max-width: 170px;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.14));
    transition: transform 0.3s var(--ease-bounce);
}

.kid-unit-card:hover .kid-unit-card__hero-img {
    transform: scale(1.1) rotate(-3deg);
}

/* Card Title */
.kid-unit-card__title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.15;
    margin: 0.2rem 0;
    flex-shrink: 0;
}

/* Stars Row */
.kid-unit-card__stars {
    display: flex;
    gap: 4px;
    font-size: 1.6rem;
    margin: 0.2rem 0 0.5rem;
    flex-shrink: 0;
}

.kid-unit-card__star {
    opacity: 0.2;
    transition: transform 0.2s ease;
}

.kid-unit-card__star.earned {
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.5));
    animation: bounceIn 0.3s var(--ease-bounce);
}

/* Chunky Play Button */
.kid-unit-card__btn {
    width: 100%;
    height: 54px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--card-border, #4BA3E3) 0%, var(--card-color, #B8E4F9) 100%);
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    pointer-events: none; /* card takes click */
}

/* ──────────── Coming Soon Card ──────────── */
.kid-unit-card--coming-soon {
    border-style: dashed;
    border-color: #BDBDBD;
    box-shadow: 0 8px 0 #BDBDBD, 0 14px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    cursor: default;
}

.kid-unit-card--coming-soon:hover,
.kid-unit-card--coming-soon:active {
    transform: none;
    box-shadow: 0 8px 0 #BDBDBD, 0 14px 20px rgba(0, 0, 0, 0.08);
}

.kid-unit-card--coming-soon .kid-unit-card__hero-img {
    filter: grayscale(0.6) opacity(0.6);
}

.kid-unit-card--coming-soon .kid-unit-card__btn {
    background: #E0E0E0;
    color: #757575;
    box-shadow: none;
}

/* ──────────── Unit Hub Screen ──────────── */
.screen--unit-hub {
    background: linear-gradient(135deg, var(--color-peach-light) 0%, var(--color-lavender-light) 100%);
    padding: max(1.5rem, calc(env(safe-area-inset-top, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-right, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-left, 0px) + 0.5rem));
}

.hub__header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 54px;
}

.hub__title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.hub__zones {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.hub__zone-card {
    width: 220px;
    height: 220px;
    border-radius: var(--radius-xl);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.hub__zone-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    pointer-events: none;
}

.hub__zone-card--learn {
    background: linear-gradient(145deg, var(--color-mint) 0%, var(--color-grass) 100%);
}

.hub__zone-card--play {
    background: linear-gradient(145deg, var(--color-sunshine) 0%, var(--color-coral-light) 100%);
}

.hub__zone-card--video {
    background: linear-gradient(145deg, var(--color-sky) 0%, var(--color-lavender) 100%);
}

.hub__zone-card:active {
    transform: scale(0.93);
}

.zone-card__icon {
    font-size: 4rem;
}

.zone-card__label {
    font-family: var(--font-main);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ──────────── Story Screen ──────────── */
.screen--story {
    background: linear-gradient(180deg, var(--color-cloud-soft) 0%, var(--color-lavender-light) 100%);
    padding: 1rem;
}

.story__container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.story-page {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    opacity: 0;
    transform: translateX(100%) translateZ(0);
    will-change: transform, opacity;
    contain: layout style;
    transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
}

.story-page.active {
    opacity: 1;
    transform: translateX(0) translateZ(0);
}

.story-page.exit-left {
    opacity: 0;
    transform: translateX(-100%) translateZ(0);
}

.story-page__image {
    max-width: 320px;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
    cursor: pointer;
    transition: var(--transition-bounce);
}

.story-page__image:active {
    transform: scale(1.08) rotate(-2deg);
}

.story-page__image.bounce-in {
    animation: bounceIn 0.7s var(--ease-bounce);
}

.story-page__sentence {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.4;
}

.story-page__vocab {
    color: var(--text-vocab);
    font-weight: 800;
    font-size: 2.4rem;
    position: relative;
}

.story-page__vocab::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--text-vocab);
    border-radius: 2px;
    opacity: 0.3;
}

/* Story Navigation */
.story__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
}

.story__nav-btn {
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: var(--radius-round);
    border: none;
    background: var(--color-cloud);
    box-shadow: var(--shadow-soft);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story__nav-btn:active {
    transform: scale(0.9);
    background: var(--color-sky-light);
}

.story__nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.story__dots {
    display: flex;
    gap: 8px;
}

.story__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-sky-light);
    transition: var(--transition-smooth);
}

.story__dot.active {
    background: var(--color-sky-dark);
    transform: scale(1.3);
}

/* ──────────── Game Select Screen ──────────── */
.screen--game-select {
    background: linear-gradient(135deg, var(--color-sunshine-light) 0%, var(--color-peach-light) 100%);
    padding: max(1.5rem, calc(env(safe-area-inset-top, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-right, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-left, 0px) + 0.5rem));
}

.game-select__header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 54px;
}

.game-select__title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.game-select__grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.game-select__card {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-xl);
    border: 4px solid transparent;
    background: var(--color-cloud);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.game-select__card:active {
    transform: scale(0.93);
    border-color: var(--color-sunshine);
}

.game-card__icon {
    font-size: 3.5rem;
}

.game-card__name {
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.game-card__desc {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* ──────────── Game Play Screen ──────────── */
.screen--game-play {
    background: linear-gradient(180deg, var(--color-sunshine-light) 0%, var(--color-cloud-soft) 100%);
    padding: max(1rem, calc(env(safe-area-inset-top, 0px) + 0.4rem))
             max(1rem, calc(env(safe-area-inset-right, 0px) + 0.4rem))
             max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.4rem))
             max(1rem, calc(env(safe-area-inset-left, 0px) + 0.4rem));
}

.game-play__area {
    flex: 1;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Find It Game */
.find-it__prompt {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.find-it__prompt .vocab-highlight {
    color: var(--text-vocab);
    font-size: 2.2rem;
    font-weight: 800;
}

.find-it__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 700px;
}

.find-it__item {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    background: var(--color-cloud);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    border: 4px solid transparent;
    padding: 0.5rem;
}

.find-it__item:active {
    transform: scale(0.95);
}

.find-it__item.correct {
    border-color: var(--color-grass);
    background: var(--color-grass-light);
    animation: correctPulse 0.6s var(--ease-bounce);
}

.find-it__item.wrong {
    animation: wrongWobble 0.5s var(--ease-smooth);
}

.find-it__item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.find-it__item-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
}

/* Match It Game */
.match-it__container {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
}

.match-it__column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-it__item {
    min-width: 130px;
    min-height: 80px;
    border-radius: var(--radius-md);
    background: var(--color-cloud);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    cursor: grab;
    transition: var(--transition-bounce);
    border: 3px solid transparent;
}

.match-it__item:active {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.match-it__item.matched {
    border-color: var(--color-grass);
    background: var(--color-grass-light);
}

.match-it__item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.match-it__item-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Roy's Room Game */
.roys-room__scene {
    width: 100%;
    max-width: 700px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem;
    background: var(--color-peach-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.roys-room__scene.night-mode {
    background: linear-gradient(135deg, #1E1E38 0%, #2A2A4E 100%);
    box-shadow: 0 0 25px rgba(100, 180, 255, 0.4);
}

.roys-room__scene.night-mode .roys-room__drop-zone-label {
    color: #FFE066;
}

.roys-room__drop-zone {
    aspect-ratio: 1;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    transition: var(--transition-smooth);
    min-height: 100px;
    cursor: pointer;
}

.roys-room__drop-zone-silhouette {
    width: 70px;
    height: 70px;
    object-fit: contain;
    opacity: 0.2;
    filter: brightness(0) drop-shadow(0 0 1px rgba(100, 180, 255, 0.8)) drop-shadow(0 0 3px rgba(100, 180, 255, 0.4));
    pointer-events: none;
    transition: var(--transition-smooth);
}

.roys-room__drop-zone.filled .roys-room__drop-zone-silhouette {
    opacity: 0;
    display: none;
}

.roys-room__drop-zone-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-sky);
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.roys-room__drop-zone.filled {
    background: rgba(119, 221, 119, 0.1);
}

.roys-room__drop-zone.filled .roys-room__drop-zone-label {
    color: var(--color-grass);
    font-weight: 700;
    opacity: 1;
}

.roys-room__drop-zone.highlight {
    background: rgba(255, 127, 80, 0.1);
}

.roys-room__tray {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.roys-room__drag-item {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--color-cloud);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    border: 3px solid transparent;
}

.roys-room__drag-item:active {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.roys-room__drag-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    pointer-events: none;
}

/* ──────────── Video Screen ──────────── */
.screen--video {
    background: #1A1A2E;
    padding: 1rem;
}

.video__container {
    flex: 1;
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video__player {
    width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
}

/* ──────────── Particle Canvas ──────────── */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* ──────────── Celebration Overlay ──────────── */
.celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.3s var(--ease-smooth);
}

.celebration__emoji {
    font-size: 6rem;
    animation: celebrateBounce 0.8s var(--ease-bounce);
}

.celebration__text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
    animation: fadeInUp 0.6s var(--ease-smooth) 0.3s both;
}

/* ──────────── Keyframe Animations ──────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.08); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes wrongWobble {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes celebrateBounce {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes sparkle {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.5) rotate(180deg); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(2deg); }
    75% { transform: translateY(4px) rotate(-2deg); }
}

/* ──────────── iPad-Specific Responsive ──────────── */

/* iPad Portrait */
@media (max-width: 820px) and (orientation: portrait) {
    .hub__zones {
        flex-direction: column;
        align-items: center;
    }
    
    .hub__zone-card {
        width: 260px;
        height: 140px;
        flex-direction: row;
        gap: 1.2rem;
        padding: 0 2rem;
    }

    .game-select__grid {
        flex-direction: column;
        align-items: center;
    }

    .game-select__card {
        width: 280px;
        height: 120px;
        flex-direction: row;
        gap: 1rem;
        padding: 0 1.5rem;
    }
}

/* iPad Landscape (primary target) */
@media (min-width: 1024px) and (orientation: landscape) {
    .home__title {
        font-size: 3rem;
    }
    
    .home__unit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-page__image {
        max-width: 400px;
        max-height: 350px;
    }

    .story-page__sentence {
        font-size: 2.4rem;
    }

    .find-it__item {
        width: 160px;
        height: 160px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    html { font-size: 15px; }
    
    .splash__title { font-size: 2rem; }
    .splash__icon { font-size: 3.5rem; }
    
    .hub__zone-card {
        width: 160px;
        height: 160px;
    }
    
    .zone-card__icon { font-size: 3rem; }
    .zone-card__label { font-size: 1.1rem; }
    
    .find-it__item {
        width: 110px;
        height: 110px;
    }
}

/* ──────────── Profile Setup Screen ──────────── */
.screen--profile-setup {
    background: linear-gradient(135deg, var(--color-sunshine-light) 0%, var(--color-peach-light) 50%, var(--color-lavender-light) 100%);
    padding: 2rem;
}

.profile-setup__content {
    text-align: center;
    max-width: 450px;
    animation: fadeInUp 0.6s var(--ease-bounce);
}

.profile-setup__emoji {
    font-size: 5rem;
    animation: bounceFloat 2s infinite ease-in-out;
    margin-bottom: 0.5rem;
}

.profile-setup__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.profile-setup__subtitle {
    font-size: 1.3rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.profile-setup__avatars {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-round);
    border: 3px solid transparent;
    background: var(--color-cloud);
    box-shadow: var(--shadow-soft);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option.selected {
    border-color: var(--color-sky-dark);
    background: var(--color-sky-light);
    transform: scale(1.15);
}

.avatar-option:active {
    transform: scale(0.95);
}

.profile-setup__input {
    width: 100%;
    max-width: 320px;
    padding: 1rem 1.5rem;
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 3px solid var(--color-sky-light);
    border-radius: var(--radius-lg);
    background: var(--color-cloud);
    color: var(--text-dark);
    outline: none;
    transition: var(--transition-smooth);
    -webkit-user-select: text;
    user-select: text;
}

.profile-setup__input:focus {
    border-color: var(--color-sky-dark);
    box-shadow: 0 0 0 4px rgba(135, 206, 235, 0.3);
}

.profile-setup__btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto 0;
    padding: 1rem;
    font-family: var(--font-main);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--color-grass) 0%, var(--color-mint) 100%);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    transition: var(--transition-bounce);
}

.profile-setup__btn:active {
    transform: scale(0.95);
}

.profile-setup__btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ──────────── Profile Badge (Home Screen) ──────────── */
.home__profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin-bottom: 0.5rem;
}

.profile-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-cloud);
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.profile-badge:active {
    transform: scale(0.97);
}

.profile-badge__avatar {
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-sunshine-light);
    border-radius: var(--radius-round);
}

.profile-badge__name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.total-stars {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-cloud);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.total-stars:active {
    transform: scale(0.97);
}

.total-stars__icon {
    font-size: 1.5rem;
}

.total-stars__count {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ──────────── Unit Card Stars ──────────── */
.unit-card__stars {
    display: flex;
    gap: 2px;
    margin-top: 0.3rem;
}

.unit-card__star {
    font-size: 1rem;
    opacity: 0.25;
}

.unit-card__star.earned {
    opacity: 1;
    animation: bounceIn 0.3s var(--ease-bounce);
}

.unit-card__mastery {
    width: 100%;
    height: 6px;
    background: var(--color-sky-light);
    border-radius: 3px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.unit-card__mastery-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-grass) 0%, var(--color-mint) 100%);
    border-radius: 3px;
    transition: width 0.5s var(--ease-smooth);
}

/* ──────────── Progress Report Screen ──────────── */
.screen--progress {
    background: linear-gradient(180deg, var(--color-cloud-soft) 0%, var(--color-lavender-light) 100%);
    padding: max(1.2rem, calc(env(safe-area-inset-top, 0px) + 0.8rem)) 2rem 3rem 2rem;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.progress__header {
    text-align: center;
    margin-bottom: 1.2rem;
    flex-shrink: 0 !important;
    width: 100%;
    padding: 0 56px;
}

.progress__title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.progress__content {
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 3rem;
    flex-shrink: 0 !important;
}

.progress-unit {
    background: var(--color-cloud);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.progress-unit__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-unit__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.progress-unit__stars {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.progress-unit__mastery-bar {
    width: 100%;
    height: 12px;
    background: var(--color-sky-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-unit__mastery-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s var(--ease-smooth);
}

.mastery-fill--low { background: var(--color-coral); }
.mastery-fill--mid { background: var(--color-sunshine); }
.mastery-fill--high { background: linear-gradient(90deg, var(--color-grass) 0%, var(--color-mint) 100%); }

.progress-games {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.progress-game {
    text-align: center;
    padding: 0.8rem;
    background: var(--color-cloud-soft);
    border-radius: var(--radius-md);
}

.progress-game__icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.3rem;
}

.progress-game__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-medium);
    display: block;
}

.progress-game__accuracy {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    display: block;
    margin-top: 0.2rem;
}

.progress-game__plays {
    font-size: 0.75rem;
    color: var(--text-light);
    display: block;
}

.progress-activities {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.progress-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    padding: 0.3rem 0.6rem;
    background: var(--color-cloud-soft);
    border-radius: var(--radius-sm);
}

.progress-badge--done {
    color: var(--color-grass);
}

/* ──────────── Parent Gate & Modal Overlay ──────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--color-cloud);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.8rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 420px;
    width: 90%;
    max-height: 94dvh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s var(--ease-bounce);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-cloud-soft);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-medium);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close-btn:active {
    transform: scale(0.9);
}

.parent-gate__header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.parent-gate__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.4rem;
}

.parent-gate__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
}

.parent-gate__subtitle {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-top: 0.3rem;
}

.parent-gate__challenge {
    background: var(--color-cloud-soft);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.2rem;
}

.parent-gate__math {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-sky-dark);
    margin-bottom: 0.4rem;
}

.parent-gate__display {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text-dark);
    min-height: 2.2rem;
}

.parent-gate__error {
    font-size: 0.85rem;
    color: var(--color-coral);
    font-weight: 600;
    margin-top: 0.4rem;
    min-height: 1.2rem;
}

.parent-gate__keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.pg-key {
    background: var(--color-sky-light);
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 4px 0 var(--color-sky-dark);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.pg-key:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--color-sky-dark);
}

.pg-key--clear {
    background: #FFE4E1;
    box-shadow: 0 4px 0 #CD5C5C;
    color: #B22222;
}

.pg-key--clear:active {
    box-shadow: 0 1px 0 #CD5C5C;
}

.pg-key--submit {
    background: var(--color-mint);
    box-shadow: 0 4px 0 var(--color-grass);
    color: var(--text-dark);
}

.pg-key--submit:active {
    box-shadow: 0 1px 0 var(--color-grass);
}

/* ──────────── Parent Panel Controls ──────────── */
.parent-panel-card {
    background: #FFF9E6;
    border: 2px dashed #FFD700;
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-top: 1.5rem;
}

.parent-panel-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parent-panel-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn-parent-action {
    background: var(--color-cloud);
    border: 2px solid #DEB887;
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-parent-action:active {
    transform: scale(0.95);
}

.btn-parent-action--danger {
    background: #FFE4E1;
    border-color: #FA8072;
    color: #C71585;
}

/* ──────────── Real Photo Badge / Toggle ──────────── */
.real-photo-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

/* ──────────── Peeking Character (Where Am I) ──────────── */
.peeking-character {
    position: absolute;
    top: -16px;
    right: -10px;
    font-size: 2.4rem;
    animation: peekBounce 1.4s infinite ease-in-out;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

@keyframes peekBounce {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) scale(1.1) rotate(10deg);
    }
}

/* ──────────── Home Subject Portal (2 Thẻ Khổng Lồ Ngoài Màn Hình Chính) ──────────── */
.home__subject-portal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 840px;
    margin: auto;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
    align-content: center;
    justify-content: center;
    align-items: stretch;
    flex: 1;
}

@media (max-width: 600px) {
    .home__subject-portal {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        margin: auto;
    }
}

.subject-portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 280px;
    padding: 2.2rem 1.6rem;
    border-radius: 36px;
    border: 5px solid transparent;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    user-select: none;
    touch-action: manipulation;
}

.subject-portal-card:active {
    transform: scale(0.96);
}

.subject-portal-card--english {
    background: linear-gradient(145deg, #E0F2FE 0%, #BAE6FD 60%, #7DD3FC 100%);
    border-color: #38BDF8;
}

.subject-portal-card--english:hover {
    box-shadow: 0 16px 36px rgba(56, 189, 248, 0.35);
    transform: translateY(-4px);
}

.subject-portal-card--math {
    background: linear-gradient(145deg, #FEF3C7 0%, #FDE68A 60%, #FCD34D 100%);
    border-color: #F59E0B;
}

.subject-portal-card--math:hover {
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.35);
    transform: translateY(-4px);
}

.portal-card__icon-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.portal-card__icon {
    font-size: 2.8rem;
}

.portal-card__mascot {
    position: absolute;
    bottom: -6px;
    right: -6px;
    font-size: 1.8rem;
    animation: bounceSubtle 2s infinite ease-in-out;
}

.portal-card__title {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1E293B;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
}

.portal-card__desc {
    font-size: 0.92rem;
    color: #475569;
    margin: 0 0 0.85rem 0;
    font-weight: 600;
    line-height: 1.35;
}

.portal-card__arrow {
    display: inline-block;
    background: #FFFFFF;
    color: #0F172A;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Circular Back Button on Home Screen (Portal return) */
.home__header .nav-back-btn--home,
.nav-back-btn--home {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: var(--radius-round);
    border: 3px solid #FFFFFF;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s ease;
    z-index: 15;
    flex-shrink: 0;
    margin: 0;
}

.nav-back-btn--home:hover {
    transform: scale(1.06);
    background: #FFFFFF;
}

.nav-back-btn--home:active {
    transform: scale(0.92);
}

/* ──────────── Pedagogical Pause (Bong Bóng Lắng Nghe) ──────────── */
.pedagogical-pause-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 2.5px solid #38BDF8;
    border-radius: 24px;
    padding: 6px 14px;
    margin-top: 6px;
    animation: pulseListen 1.5s infinite ease-in-out;
}

.listen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284C7;
    animation: listenWave 1.2s infinite ease-in-out;
}
.listen-dot:nth-child(2) { animation-delay: 0.2s; }
.listen-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes listenWave {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes pulseListen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
}

/* ──────────── Shadow Match Game (Ghép Bóng Mờ) ──────────── */
.shadow-match__container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 680px;
    margin: 10px auto;
    gap: 16px;
}

.shadow-match__column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.shadow-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 95px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 3px solid #E2E8F0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    padding: 8px;
    box-sizing: border-box;
}

.shadow-card:active {
    transform: scale(0.95);
}

.shadow-card.selected {
    border-color: #38BDF8;
    background: #F0F9FF;
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.shadow-card--silhouette .shadow-card__img {
    filter: brightness(0) opacity(0.24);
    transition: filter 0.35s ease;
}

.shadow-card.matched {
    border-color: #10B981;
    background: #ECFDF5;
    pointer-events: none;
}

.shadow-card.matched.shadow-card--silhouette .shadow-card__img {
    filter: none;
    animation: popReveal 0.5s ease-out;
}

.shadow-card__img {
    max-width: 75px;
    max-height: 75px;
    object-fit: contain;
}

@keyframes popReveal {
    0% { transform: scale(0.7) rotate(-10deg); filter: brightness(2); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); filter: none; }
}

/* ──────────── Magic Kitchen Game (Nấu Ăn / Làm Bánh) ──────────── */
.magic-kitchen__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    flex: 1;
    justify-content: space-between;
}

.magic-kitchen__pot-wrap {
    position: relative;
    width: 160px;
    height: 140px;
    margin: 10px auto;
}

.magic-cauldron {
    font-size: 5.5rem;
    animation: cauldronBubble 1.8s infinite ease-in-out;
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.15));
}

@keyframes cauldronBubble {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

.magic-kitchen__ingredients {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
}

.ingredient-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border: 3px solid #FCD34D;
    border-radius: 20px;
    padding: 8px 4px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.ingredient-item:active {
    transform: scale(0.92);
}

.ingredient-item.added {
    opacity: 0.25;
    pointer-events: none;
    transform: scale(0.85);
}

.ingredient-item__img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.ingredient-item__label {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #334155;
    margin-top: 4px;
}

/* ──────────── Math Touch-to-Count & Magic Hands ──────────── */
.math-touch__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: space-around;
    padding: 6px;
    box-sizing: border-box;
}

.math-touch__items-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 520px;
    margin: 6px auto;
}

.math-touch-item {
    position: relative;
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    border-radius: 22px;
    border: 3px solid #E2E8F0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.math-touch-item:active {
    transform: scale(0.9);
}

.math-touch-item.counted {
    border-color: #F59E0B;
    background: #FEF3C7;
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.math-touch-item__badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F59E0B;
    color: #FFFFFF;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: popBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.math-touch-item__img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Bàn tay thần kỳ (Magic Hand Finger Representation) */
.magic-hand-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #FCD34D;
    border-radius: 26px;
    padding: 8px 18px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
    margin-top: 8px;
}

.magic-hand-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.magic-hand-graphic {
    font-size: 2.8rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.magic-hand-label {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #B45309;
    margin-top: 4px;
}

.magic-hand-plus-icon {
    font-size: 1.8rem;
    font-weight: 800;
    color: #F59E0B;
}

.math-touch-item.eaten {
    opacity: 0.25;
    transform: scale(0.7);
    pointer-events: none;
    filter: grayscale(1);
}

/* Video selector bar */
.video__selector-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
    width: 100%;
}

.video-selector-btn {
    background: #FFFFFF;
    border: 3px solid #38BDF8;
    border-radius: 999px;
    padding: 6px 16px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0369A1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
    transition: all 0.2s ease;
}

.video-selector-btn.active {
    background: #38BDF8;
    color: #FFFFFF;
}


/* ──────────── Header Tools & BGM Toggle ──────────── */
.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bgm-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-cloud);
    border: 3px solid var(--color-sunshine);
    box-shadow: var(--shadow-btn);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.bgm-toggle-btn:active {
    transform: scale(0.9);
}

.bgm-toggle-btn.muted {
    opacity: 0.5;
    filter: grayscale(0.8);
    border-color: #CBD5E1;
}

/* ──────────── Quick Avatar Modal ──────────── */
.avatar-modal-card {
    max-width: 480px;
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--color-cloud);
}

.avatar-modal__title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.avatar-modal__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    justify-items: center;
}

.avatar-modal__item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: var(--color-cloud-soft);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-bounce);
}

.avatar-modal__item:active {
    transform: scale(0.88);
}

.avatar-modal__item.selected {
    border-color: var(--color-sunshine);
    background: var(--color-sunshine-light);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255, 224, 102, 0.8);
}

/* ──────────── Match It! Endless & Donut Progress ──────────── */
.match-it__progress {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
}

.match-it__round-badge {
    font-weight: 700;
    color: var(--color-coral);
    font-size: 1.1rem;
}

.donut-track {
    display: flex;
    gap: 8px;
    font-size: 1.4rem;
}

.chicky-runner {
    font-size: 1.6rem;
    animation: chickyIdle 1.5s infinite ease-in-out;
}

.magic-snap-card {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.magic-snap-matched {
    transform: scale(1.15);
    border-color: var(--color-grass) !important;
    box-shadow: 0 0 20px rgba(119, 221, 119, 0.8) !important;
}

/* ──────────── Sago Sandbox Interactive World ──────────── */
.sago-sandbox__container {
    width: 100%;
    max-width: 760px;
    height: 480px;
    position: relative;
    background: linear-gradient(135deg, var(--color-peach-light) 0%, var(--color-lavender-light) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.sago-sandbox__container.night-mode {
    background: linear-gradient(135deg, #181829 0%, #292942 100%);
    box-shadow: 0 0 30px rgba(100, 180, 255, 0.5);
}

.sago-item {
    position: absolute;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sago-item:active {
    transform: scale(0.92);
}

.sago-item__img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
    transition: var(--transition-bounce);
}

.sago-item__label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    margin-top: 4px;
}

.sago-sandbox__container.night-mode .sago-item__label {
    background: rgba(40, 40, 70, 0.85);
    color: #FFE066;
}

/* Specific Positions in Sago Room — 3-row layout (no overlap) */
.sago-item--lamp { top: 25px; left: 40px; z-index: 3; }
.sago-item--window { top: 15px; right: 55px; z-index: 3; }
.sago-item--bed { top: 50%; left: 25px; transform: translateY(-50%); z-index: 2; }
.sago-item--closet { top: 50%; right: 25px; transform: translateY(-50%); z-index: 2; }
.sago-item--plant { bottom: 85px; left: 50%; transform: translateX(-50%); z-index: 2; }
.sago-item--rug { bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 1; width: 180px; }

/* ── State: Lamp ON (golden glow) ── */
.sago-item--lamp.lamp-on .sago-item__img {
    filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.9))
            drop-shadow(0 0 40px rgba(255, 180, 0, 0.5));
    transform: scale(1.08);
}
.sago-item--lamp.lamp-on .sago-item__label {
    background: rgba(255, 230, 100, 0.9);
    color: #6b4c00;
}

/* ── State: Window OPEN (curtain slide) ── */
.sago-window-wrap {
    position: relative;
    overflow: hidden;
    display: inline-block;
}
.sago-curtain {
    position: absolute;
    top: 12%;
    width: 42%;
    height: 72%;
    background: linear-gradient(180deg, #ffb6c1 0%, #ff85a2 50%, #ffb6c1 100%);
    border-radius: 0 0 6px 6px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}
.sago-curtain--left { left: 6%; transform-origin: left center; }
.sago-curtain--right { right: 6%; transform-origin: right center; }
.sago-item--window.window-open .sago-curtain--left { transform: scaleX(0.15); }
.sago-item--window.window-open .sago-curtain--right { transform: scaleX(0.15); }
.sago-item--window.window-open .sago-item__img {
    filter: drop-shadow(0 0 12px rgba(135, 206, 235, 0.7));
}
.sago-item--window.window-open .sago-item__label {
    background: rgba(200, 230, 255, 0.9);
}

/* ── State: Blanket COVERED (Chicky sleeps) ── */
.sago-bed-wrap {
    position: relative;
    display: inline-block;
}
.sago-chicky-on-bed {
    position: absolute;
    top: 15%;
    left: 55%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}
.sago-item--bed.blanket-covered .sago-chicky-on-bed {
    transform: translateX(-50%) rotate(90deg) scale(0.7);
    top: 35%;
    opacity: 0.6;
    filter: grayscale(0.3);
}
.sago-item--bed.blanket-covered .sago-item__img {
    filter: drop-shadow(0 0 15px rgba(180, 160, 255, 0.6));
}
.sago-item--bed.blanket-covered::after {
    content: '💤';
    position: absolute;
    top: -5px;
    right: 20px;
    font-size: 1.6rem;
    animation: zzz 2s ease-in-out infinite;
    z-index: 4;
}
@keyframes zzz {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-15px); opacity: 1; }
}

/* ── State: Closet OPEN (door swing) ── */
.sago-closet-wrap {
    position: relative;
    display: inline-block;
}
.sago-closet-door {
    position: absolute;
    top: 8%;
    left: 12%;
    width: 76%;
    height: 62%;
    background: linear-gradient(135deg, #d4a574 0%, #c49565 50%, #b8875a 100%);
    border-radius: 4px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: left center;
    z-index: 2;
    box-shadow: inset -3px 0 6px rgba(0,0,0,0.15), 2px 2px 4px rgba(0,0,0,0.1);
}
.sago-closet-door::after {
    content: '🔘';
    position: absolute;
    right: 8px;
    top: 45%;
    font-size: 0.6rem;
}
.sago-item--closet.closet-open .sago-closet-door {
    transform: perspective(400px) rotateY(-75deg);
    opacity: 0.7;
}
.sago-item--closet.closet-open .sago-item__img {
    filter: drop-shadow(0 0 10px rgba(255, 170, 100, 0.5));
}

/* ── State: Plant WATERED (bloom) ── */
.sago-item--plant.plant-watered .sago-item__img {
    transform: scale(1.25);
    filter: drop-shadow(0 0 12px rgba(119, 221, 119, 0.7))
            hue-rotate(25deg) brightness(1.1);
}

/* ── Night mode enhancements ── */
.sago-sandbox__container.night-mode .sago-curtain {
    background: linear-gradient(180deg, #2a2a4a 0%, #3a3a5a 100%);
}
.sago-sandbox__container.night-mode .sago-item--window .sago-item__img {
    filter: brightness(0.5) drop-shadow(0 0 8px rgba(100, 150, 255, 0.6));
}

/* ──────────── Where is Chicky Hide & Seek Game ──────────── */
.hide-seek__scene {
    width: 100%;
    max-width: 760px;
    height: 480px;
    position: relative;
    background: linear-gradient(135deg, var(--color-mint-light) 0%, var(--color-sky-light) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.hide-spot {
    position: absolute;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hide-spot:active {
    transform: scale(0.94);
}

.hide-spot__name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    box-shadow: var(--shadow-soft);
}

.hide-spot__chicky {
    position: absolute;
    width: 70px;
    height: 70px;
    font-size: 3rem;
    text-align: center;
    line-height: 70px;
    z-index: 1;
    transition: var(--transition-bounce);
    opacity: 0;
    transform: scale(0.5);
    top: -30px;
    left: 50%;
    margin-left: -35px;
}

.hide-spot.found .hide-spot__chicky {
    opacity: 1;
    transform: scale(1.1) translateY(-30px);
    z-index: 10;
}

.hide-spot.found .hide-spot__name {
    background: rgba(255, 230, 100, 0.9);
    color: #6b4c00;
}

/* ============================================================
   MATH & CHICKY DICE ADVENTURE DESIGN SYSTEM (SAGO MINI ARCADE)
   Strictly Zero-Scroll on iPad, 60 FPS GPU-accelerated
   ============================================================ */

/* ──────────── Top Bar: Header Left & Subject Switcher ──────────── */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subject-switcher {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    padding: 3px;
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.subject-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.25s var(--ease-bounce);
    outline: none;
}

.subject-btn__icon {
    font-size: 1.25rem;
}

.subject-btn:hover {
    color: var(--text-dark);
}

.subject-btn.active {
    background: #FF6F61;
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.35);
    transform: scale(1.04);
}

.subject-btn[data-subject="math"].active {
    background: #FFA000;
    box-shadow: 0 4px 10px rgba(255, 160, 0, 0.4);
}

/* ──────────── Math Hub Screen ──────────── */
.screen--math-hub {
    background: linear-gradient(180deg, #FFF9C4 0%, #FFE0B2 50%, #FFCCBC 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.math-modes__grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    width: 100%;
    max-width: 1100px;
    flex: 1;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.math-mode-card {
    flex: 1;
    max-width: 250px;
    height: 100%;
    max-height: 440px;
    background: #FFFFFF;
    border-radius: 32px;
    border: 5px solid #FFA000;
    box-shadow: 0 10px 0 #E65100, 0 16px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s var(--ease-bounce);
    outline: none;
    text-align: center;
}

.math-mode-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 0 #E65100, 0 22px 36px rgba(0, 0, 0, 0.16);
}

.math-mode-card:active {
    transform: translateY(6px);
    box-shadow: 0 4px 0 #E65100, 0 8px 14px rgba(0, 0, 0, 0.12);
}

.math-mode-card__icon {
    font-size: 4.2rem;
    margin-bottom: 0.8rem;
    animation: bounceFloat 2.2s infinite ease-in-out;
}

.math-mode-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.math-mode-card__desc {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-medium);
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 12px;
    border-radius: 999px;
}

.math-mode-card--chicky {
    border-color: #2ED573;
    box-shadow: 0 10px 0 #26AF5F, 0 16px 30px rgba(0, 0, 0, 0.12);
}
.math-mode-card--chicky:hover {
    box-shadow: 0 16px 0 #26AF5F, 0 22px 36px rgba(0, 0, 0, 0.16);
}

/* ──────────── Math Play Screen (Zero-Scroll Stage) ──────────── */
.screen--math-play {
    background: linear-gradient(180deg, #E0F7FA 0%, #E8F5E9 50%, #FFFDE7 100%);
    padding: max(0.8rem, calc(env(safe-area-inset-top, 0px) + 0.4rem))
             max(1.2rem, calc(env(safe-area-inset-right, 0px) + 0.4rem))
             max(0.8rem, calc(env(safe-area-inset-bottom, 0px) + 0.4rem))
             max(1.2rem, calc(env(safe-area-inset-left, 0px) + 0.4rem));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.math-play__header {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    margin-bottom: 0.5rem;
    padding-left: 64px; /* Room for back button! */
    padding-right: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.math-play__badge {
    background: #FFFFFF;
    border: 3px solid #4BA3E3;
    color: #0288D1;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.math-play__speaker {
    background: #FFE066;
    border: 3px solid #FFA000;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 160, 0, 0.3);
    transition: transform 0.2s var(--ease-bounce);
}

.math-play__speaker:hover {
    transform: scale(1.1);
}

.math-play__score {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 3px solid #FFD54F;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #F57F17;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.math-play__stage {
    width: 100%;
    max-width: 1120px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Prevent clipping */
    padding-bottom: 0.5rem;
    min-height: 0;
}

/* ──────────── Math Problem Box ──────────── */
.math-problem-box {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 36px;
    border: 4px solid #FFFFFF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
    margin-bottom: 0.8rem;
    position: relative;
    overflow: visible; /* Prevent clipping */
    min-height: 0;
}

.math-prompt-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.math-prompt-speaker {
    background: #E1F5FE;
    border: 2px solid #03A9F4;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--ease-bounce);
}

.math-prompt-speaker:hover {
    transform: scale(1.15);
}

/* Items Grid for Counting */
.math-items-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 800px;
}

.math-item-card {
    width: 90px;
    height: 90px;
    background: #FFFFFF;
    border-radius: 24px;
    border: 3px solid #B2EBF2;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    animation: popIn 0.4s var(--ease-bounce) both;
    position: relative;
    transition: transform 0.25s var(--ease-bounce);
}

.math-item-card:hover {
    transform: scale(1.08) rotate(3deg);
}

.math-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Take-away state */
.math-item-card.taken-away {
    opacity: 0.35;
    border-color: #FFCDD2;
    background: #FFEBEE;
    filter: grayscale(80%);
}

.taken-cross {
    position: absolute;
    font-size: 2.2rem;
    color: #E53935;
    animation: popIn 0.3s var(--ease-bounce);
}

/* ──────────── Equation Banner & Visual Groups ──────────── */
.math-equation-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.eq-num {
    background: #FFFFFF;
    border: 3px solid #E0E0E0;
    padding: 4px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.eq-num.target {
    border-color: #FFA000;
    color: #E65100;
    background: #FFF9C4;
    animation: bounceFloat 1.8s infinite ease-in-out;
}

.eq-op {
    font-size: 2.4rem;
}

.eq-op.plus { color: #2ED573; }
.eq-op.minus { color: #FF4757; }
.eq-op.equals { color: #1E90FF; }

.math-equation-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

.math-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    border: 2px dashed #90CAF9;
}

/* Addition Display Layout with 2 Number Cards (A + B) */
.math-addition-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-top: 0.2rem;
}

.addition-group-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 46%;
}

.addition-group-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease;
    user-select: none;
}

.addition-group-header:active {
    transform: scale(0.95);
}

.addition-group-header--a {
    border: 3px solid #FF9800;
}

.addition-group-header--b {
    border: 3px solid #2196F3;
}

.addition-group-num-pill {
    font-family: var(--font-main);
    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1;
    padding: 3px 10px;
    border-radius: 999px;
    color: #FFFFFF;
}

.addition-group-header--a .addition-group-num-pill {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.addition-group-header--b .addition-group-num-pill {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.addition-group-text {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.05rem;
    color: #374151;
    text-transform: capitalize;
}

.addition-group-speaker-mini {
    font-size: 1rem;
    opacity: 0.7;
}

.addition-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    border: 2px dashed #90CAF9;
    min-height: 96px;
}

.addition-plus-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

.addition-plus-sign {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2ED573;
    flex-shrink: 0;
    user-select: none;
    animation: pulseSlow 2s infinite ease-in-out;
}

.math-operator-pill {
    font-size: 2.4rem;
    font-weight: 800;
    color: #FFFFFF;
    background: #4BA3E3;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(75, 163, 227, 0.35);
}

/* Takeaway tail items styling */
.math-sub-item--takeaway {
    border-color: #FB923C !important;
    background: #FFF7ED !important;
}

.math-sub-item--takeaway::after {
    content: '🦖';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ──────────── Giant Arcade Answer Buttons ──────────── */
.math-answer-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    height: 90px;
    flex-shrink: 0;
}

.math-answer-btn {
    min-width: 130px;
    height: 80px;
    border-radius: 28px;
    border: 5px solid #FFFFFF;
    background: linear-gradient(180deg, #FFE066 0%, #FFB300 100%);
    box-shadow: 0 8px 0 #E65100, 0 14px 24px rgba(0, 0, 0, 0.15);
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: 800;
    color: #5D4037;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s var(--ease-bounce);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.math-answer-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 #E65100, 0 18px 28px rgba(0, 0, 0, 0.2);
}

.math-answer-btn:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #E65100, 0 6px 12px rgba(0, 0, 0, 0.15);
}

.math-answer-btn.correct {
    background: linear-gradient(180deg, #70A1FF 0%, #1E90FF 100%);
    box-shadow: 0 8px 0 #0C2461, 0 14px 24px rgba(30, 144, 255, 0.4);
    color: #FFFFFF;
    animation: correctPulse 0.5s ease-out;
}

.math-answer-btn.wrong {
    background: linear-gradient(180deg, #FF7675 0%, #D63031 100%);
    box-shadow: 0 8px 0 #7A1919, 0 14px 24px rgba(214, 48, 49, 0.4);
    color: #FFFFFF;
    animation: wrongShake 0.4s ease-in-out;
}

/* ──────────── CHICKY DICE ADVENTURE TRACK & BOARD ──────────── */
.dice-adventure-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 0.2rem 0;
}

.dice-control-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 28px;
    padding: 0.6rem 1.4rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.dice-display-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dice-face-img {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
    transition: transform 0.2s var(--ease-bounce);
}

.dice-display-box.rolling .dice-face-img {
    animation: diceRollShake 0.15s infinite;
}

.dice-plus-symbol {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFA000;
}

.dice-roll-btn {
    padding: 10px 28px;
    border-radius: 999px;
    border: 4px solid #FFFFFF;
    background: linear-gradient(180deg, #FF6B81 0%, #ED4C67 100%);
    box-shadow: 0 6px 0 #B53471, 0 12px 20px rgba(237, 76, 103, 0.35);
    font-family: var(--font-main);
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s var(--ease-bounce);
    outline: none;
}

.dice-roll-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #B53471, 0 14px 24px rgba(237, 76, 103, 0.4);
}

.dice-roll-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #B53471, 0 6px 12px rgba(237, 76, 103, 0.25);
}

.dice-roll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dice-instruction-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    background: rgba(255, 236, 179, 0.6);
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid #FFE082;
}

/* ──────────── Stadium Racetrack Arena (16 Dots Loop around Center Dice) ──────────── */
.racetrack-arena {
    width: 100%;
    max-width: 720px;
    height: 100%;
    max-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 12px;
    padding: 0.8rem;
    margin: 0 auto;
    position: relative;
    place-items: center;
    user-select: none;
    -webkit-user-select: none;
}

/* 16 Dots Mapped in Clockwise Loop on 5x5 Grid Perimeter */
#advTile_0  { grid-column: 1; grid-row: 1; }
#advTile_1  { grid-column: 2; grid-row: 1; }
#advTile_2  { grid-column: 3; grid-row: 1; }
#advTile_3  { grid-column: 4; grid-row: 1; }
#advTile_4  { grid-column: 5; grid-row: 1; }
#advTile_5  { grid-column: 5; grid-row: 2; }
#advTile_6  { grid-column: 5; grid-row: 3; }
#advTile_7  { grid-column: 5; grid-row: 4; }
#advTile_8  { grid-column: 5; grid-row: 5; }
#advTile_9  { grid-column: 4; grid-row: 5; }
#advTile_10 { grid-column: 3; grid-row: 5; }
#advTile_11 { grid-column: 2; grid-row: 5; }
#advTile_12 { grid-column: 1; grid-row: 5; }
#advTile_13 { grid-column: 1; grid-row: 4; }
#advTile_14 { grid-column: 1; grid-row: 3; }
#advTile_15 { grid-column: 1; grid-row: 2; }

/* 16 Dot Stones Styling (No printed numbers, clean & vibrant) */
.adventure-dot-tile {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--dot-color, #74B9FF);
    border: 4px solid #FFFFFF;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16), 0 10px 18px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s ease, background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.adventure-dot-tile:hover {
    transform: scale(1.08);
}

/* ──────────── Unvisited State (Chưa nhảy qua -> Màu Xám) ──────────── */
.adventure-dot-tile.dot-unvisited {
    background: linear-gradient(145deg, #E2E8F0, #CBD5E1) !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 4px 0 #94A3B8, 0 6px 12px rgba(0, 0, 0, 0.08) !important;
    opacity: 0.58;
}

.adventure-dot-tile.dot-unvisited .dot-badge-icon {
    filter: grayscale(1) opacity(0.32) !important;
    transform: scale(0.85);
    transition: filter 0.35s ease, transform 0.35s var(--ease-bounce);
}

/* ──────────── Visited State (Đã nhảy qua -> Bật Màu + Viền Xanh Lá) ──────────── */
.adventure-dot-tile.is-visited {
    background: var(--dot-color, #2ED573) !important;
    border-color: #2ED573 !important;
    box-shadow: 0 6px 0 #10AC84, 0 0 14px rgba(46, 213, 115, 0.55) !important;
    opacity: 1;
}

.adventure-dot-tile.is-visited .dot-badge-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)) !important;
    transform: scale(1);
    transition: filter 0.35s ease, transform 0.35s var(--ease-bounce);
}

.adventure-dot-tile.is-visited::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px dashed rgba(46, 213, 115, 0.6);
    pointer-events: none;
}

@keyframes dotPopGlow {
    0% {
        transform: scale(0.85);
        filter: brightness(1.3);
    }
    50% {
        transform: scale(1.18);
        filter: brightness(1.5);
        box-shadow: 0 0 22px #2ED573;
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.adventure-dot-tile.dot-just-stepped {
    animation: dotPopGlow 0.45s var(--ease-bounce) !important;
}

.adventure-dot-tile.target-dot-glowing {
    animation: targetPulseGlow 1.1s infinite ease-in-out !important;
    opacity: 1 !important;
    border-color: #FFE082 !important;
}

.adventure-dot-tile.target-dot-glowing .dot-badge-icon {
    filter: drop-shadow(0 0 8px #FFD54F) !important;
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

.adventure-dot-tile.dot-shake-wrong {
    animation: wrongShake 0.4s ease-in-out;
}

.dot-badge-icon {
    font-size: 1.65rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    pointer-events: none;
}

/* Character Pawn on the Tile */
.adventure-character-pawn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    z-index: 25;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.adventure-character-pawn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--char-border, #FFE066);
    background: #FFFFFF;
    animation: bounceFloat 1.8s infinite ease-in-out;
}

.adventure-character-pawn.hop-bounce {
    animation: pawnHop 0.36s ease-out;
}

/* ──────────── Center Dice Arena (Rows 2-4, Cols 2-4) ──────────── */
.racetrack-center-arena {
    grid-column: 2 / 5;
    grid-row: 2 / 5;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 36px;
    border: 4px dashed #FFE082;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), inset 0 2px 10px rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    gap: 8px;
    z-index: 5;
    text-align: center;
}

.arena-lap-badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: #E65100;
    background: #FFE082;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.center-dice-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.center-dice-plus {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFA000;
}

.center-dice-box.rolling .dice-face-img {
    animation: diceRollShake 0.15s infinite;
}

.center-roll-btn {
    padding: 10px 26px;
    border-radius: 999px;
    border: 4px solid #FFFFFF;
    background: linear-gradient(180deg, #FF6B81 0%, #ED4C67 100%);
    box-shadow: 0 6px 0 #B53471, 0 12px 20px rgba(237, 76, 103, 0.35);
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s var(--ease-bounce);
    outline: none;
}

.center-roll-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #B53471, 0 14px 24px rgba(237, 76, 103, 0.4);
}

.center-roll-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #B53471, 0 6px 12px rgba(237, 76, 103, 0.25);
}

.center-roll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.arena-speech-bubble {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    background: rgba(255, 243, 224, 0.85);
    border: 2px solid #FFE0B2;
    border-radius: 999px;
    padding: 4px 14px;
    line-height: 1.3;
}

/* ──────────── Action Event Popup (Floating Over Board) ──────────── */
.tile-action-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tile-action-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tile-action-card {
    background: #FFFFFF;
    border-radius: 32px;
    border: 5px solid #FFD54F;
    box-shadow: 0 12px 0 #FFA000, 0 20px 36px rgba(0, 0, 0, 0.2);
    padding: 1.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 88%;
    animation: popIn 0.4s var(--ease-bounce);
}

.action-card__icon {
    font-size: 3.5rem;
    margin-bottom: 0.4rem;
    animation: bounceFloat 1.8s infinite ease-in-out;
}

.action-card__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #E65100;
    margin-bottom: 0.3rem;
}

.action-card__desc {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.action-card__reward-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD54F, #FFA000);
    color: #5D4037;
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 900;
    padding: 6px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255, 160, 0, 0.35);
    margin-bottom: 1rem;
    animation: popBounce 0.6s var(--ease-bounce);
}

.action-card__claim-btn {
    padding: 10px 28px;
    border-radius: 999px;
    border: 3px solid #FFFFFF;
    background: linear-gradient(180deg, #2ED573 0%, #10AC84 100%);
    box-shadow: 0 6px 0 #0E8F6C, 0 10px 20px rgba(46, 213, 115, 0.4);
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s var(--ease-bounce);
    outline: none;
}

.action-card__claim-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #0E8F6C;
}

/* ──────────── Dice Quiz Box (How many dots?) ──────────── */
.dice-quiz-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    animation: popIn 0.3s var(--ease-bounce);
}

.dice-quiz-title {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    color: #E65100;
    background: #FFF3E0;
    padding: 4px 14px;
    border-radius: 999px;
    border: 2px solid #FFE0B2;
}

.dice-quiz-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.dice-quiz-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #FFFFFF;
    background: linear-gradient(180deg, #FFE066 0%, #FFB300 100%);
    box-shadow: 0 6px 0 #E65100, 0 8px 16px rgba(0, 0, 0, 0.15);
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: 900;
    color: #5D4037;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce), background 0.2s ease;
    outline: none;
}

.dice-quiz-btn:active {
    transform: scale(0.92);
}

.dice-quiz-btn.correct {
    background: linear-gradient(180deg, #2ED573 0%, #10AC84 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 0 #0E8F6C, 0 0 16px rgba(46, 213, 115, 0.6) !important;
    transform: scale(1.15) !important;
}

.dice-quiz-btn.wrong {
    animation: wrongShake 0.4s ease-in-out;
    background: linear-gradient(180deg, #FF6B81 0%, #ED4C67 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 0 #B53471 !important;
}

/* ──────────── Chiếu sáng độc bản lộ trình & Làm mờ ô cũ ──────────── */
.adventure-dot-tile.dot-dimmed {
    opacity: 0.32 !important;
    filter: grayscale(0.5);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.adventure-dot-tile.dot-route-active {
    opacity: 1 !important;
    border-color: #FFE082 !important;
    box-shadow: 0 0 16px #FFD54F, 0 6px 0 #FFA000 !important;
    transform: scale(1.06);
}

.dot-step-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E65100;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    animation: popBounce 0.35s var(--ease-bounce);
    z-index: 10;
}

/* Victory Screen in Board */
.dice-victory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 36px;
    border: 6px solid #FFD54F;
    box-shadow: 0 14px 0 #FFA000, 0 24px 40px rgba(0, 0, 0, 0.16);
    padding: 1.8rem 2.5rem;
    text-align: center;
    animation: popIn 0.5s var(--ease-bounce);
}

.dice-victory__trophy {
    width: 100px;
    height: 100px;
    margin-bottom: 0.8rem;
    animation: bounceFloat 2s infinite ease-in-out;
}

.trophy-img {
    width: 100%;
    height: 100%;
}

.dice-victory__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #E65100;
    margin-bottom: 0.4rem;
}

.dice-victory__desc {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-medium);
    margin-bottom: 0.8rem;
}

.dice-victory__next-hero {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2E7D32;
    background: #E8F5E9;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-hero-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.dice-play-again-btn {
    padding: 12px 36px;
    border-radius: 999px;
    border: 4px solid #FFFFFF;
    background: linear-gradient(180deg, #2ED573 0%, #26AF5F 100%);
    box-shadow: 0 6px 0 #1E824C, 0 12px 20px rgba(46, 213, 115, 0.35);
    font-family: var(--font-main);
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce);
}

.dice-play-again-btn:hover {
    transform: scale(1.05);
}

/* ──────────── Keyframes Animations ──────────── */
@keyframes diceRollShake {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    50% { transform: rotate(15deg) scale(0.95); }
    75% { transform: rotate(-8deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes targetPulseGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15), 0 0 0 rgba(255, 224, 102, 0); }
    50% { transform: scale(1.1); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2), 0 0 22px rgba(255, 224, 102, 0.9); }
}

@keyframes pawnHop {
    0% { transform: translateX(-50%) translateY(0) scale(1); }
    40% { transform: translateX(-50%) translateY(-26px) scale(1.2); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE BREAKPOINTS (SMARTPHONES — PORTRAIT & LANDSCAPE)
   ──────────────────────────────────────────────────────────── */

/* 📱 MOBILE PORTRAIT (<= 480px, iPhone 12/13/14/15/16, Galaxy S) */
@media (max-width: 480px) {
    html, body {
        font-size: 15px;
    }

    /* Notch-Safe Padding across all screens */
    .screen--home {
        padding-top: max(52px, calc(env(safe-area-inset-top, 0px) + 8px));
        padding-left: max(0.6rem, calc(env(safe-area-inset-left, 0px) + 0.3rem));
        padding-right: max(0.6rem, calc(env(safe-area-inset-right, 0px) + 0.3rem));
        padding-bottom: max(0.6rem, calc(env(safe-area-inset-bottom, 0px) + 0.3rem));
    }

    .screen--math-play {
        padding-top: max(52px, calc(env(safe-area-inset-top, 0px) + 8px));
        padding-left: max(0.6rem, calc(env(safe-area-inset-left, 0px) + 0.3rem));
        padding-right: max(0.6rem, calc(env(safe-area-inset-right, 0px) + 0.3rem));
        padding-bottom: max(0.6rem, calc(env(safe-area-inset-bottom, 0px) + 0.3rem));
    }

    .screen--unit-hub,
    .screen--story,
    .screen--game-select,
    .screen--progress,
    .screen--game-play,
    .screen--math-hub {
        padding-top: max(52px, calc(env(safe-area-inset-top, 0px) + 8px));
        padding-left: max(0.6rem, calc(env(safe-area-inset-left, 0px) + 0.3rem));
        padding-right: max(0.6rem, calc(env(safe-area-inset-right, 0px) + 0.3rem));
        padding-bottom: max(0.6rem, calc(env(safe-area-inset-bottom, 0px) + 0.3rem));
    }

    /* Mobile Back Button: Align with lowered safe header */
    .nav-back-btn {
        top: max(50px, calc(env(safe-area-inset-top, 0px) + 6px));
        left: max(10px, calc(env(safe-area-inset-left, 0px) + 6px));
        width: 42px;
        height: 42px;
    }

    .nav-back-icon {
        font-size: 1.4rem;
    }

    /* Screen headers avoid overlapping back button */
    .hub__header,
    .game-select__header,
    .progress__header {
        padding: 0 46px;
        margin-bottom: 1.2rem;
    }

    .hub__title,
    .game-select__title,
    .progress__title {
        font-size: 1.45rem;
    }

    /* Compact 2-Tier Header on Home */
    .home__header {
        height: auto;
        flex-wrap: wrap;
        padding: 0.2rem 0.4rem;
        gap: 8px;
        margin-bottom: 0.3rem;
    }

    .header-left {
        gap: 6px;
    }

    .profile-badge {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .profile-badge__avatar {
        font-size: 1.3rem;
    }

    .subject-switcher {
        padding: 3px;
        gap: 3px;
    }

    .subject-btn {
        padding: 4px 10px;
        font-size: 0.85rem;
    }

    .curriculum-tabs {
        width: 100%;
        order: 3;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 3px 0;
        gap: 6px;
        scrollbar-width: none;
    }

    .curriculum-tab-btn {
        padding: 5px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .header-tools {
        gap: 6px;
    }

    .bgm-toggle-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .total-stars {
        padding: 3px 8px;
        font-size: 0.9rem;
    }

    /* Mobile Portrait Home Cards: 2-Column Grid of Small Rectangles */
    .home__unit-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: minmax(auto, calc((100dvh - 148px) / 2));
        gap: 10px;
        padding: 0.3rem 0.5rem;
        width: 100%;
        max-width: 440px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .home__unit-grid::-webkit-scrollbar {
        display: none;
    }

    .kid-unit-card {
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 100%;
        max-height: calc((100dvh - 148px) / 2);
        padding: 0.5rem 0.5rem 0.6rem;
        border-radius: 20px;
        border-width: 3px;
        box-shadow: 0 5px 0 var(--card-border, #4BA3E3);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
    }

    .kid-unit-card__top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .kid-unit-card__step {
        font-size: 0.7rem;
        padding: 2px 6px;
        white-space: nowrap;
        background: var(--card-border, #4BA3E3);
        color: #fff;
        border-radius: 999px;
        font-weight: 800;
    }

    .kid-unit-card__count {
        font-size: 0.7rem;
        padding: 2px 6px;
        white-space: nowrap;
        background: rgba(0, 0, 0, 0.06);
        border-radius: 999px;
        font-weight: 700;
    }

    .kid-unit-card__art {
        min-height: 0;
        padding: 2px 0;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .kid-unit-card__hero-img {
        max-height: 56px;
        max-width: 76px;
    }

    .kid-unit-card__title {
        font-size: 1rem;
        margin: 0.1rem 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .kid-unit-card__stars {
        display: flex;
        gap: 2px;
        font-size: 0.85rem;
        margin: 0 0 0.2rem 0;
    }

    .kid-unit-card__btn {
        height: 34px;
        font-size: 0.88rem;
        border-radius: 999px;
        padding: 0 8px;
    }

    .kid-unit-card.math-arcade-card .kid-unit-card__stars {
        display: none;
    }

    /* Unit Hub Zones on Mobile: 3 Small Rounded Horizontal Rows */
    .hub__zones {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 320px;
        align-items: stretch;
        margin: auto;
    }

    .hub__zone-card {
        width: 100%;
        height: 66px;
        border-radius: 20px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 1.2rem;
        gap: 1rem;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    .zone-card__icon {
        font-size: 2.2rem;
        flex-shrink: 0;
    }

    .zone-card__label {
        font-size: 1.25rem;
        font-weight: 800;
        flex: 1;
        text-align: left;
    }

    .hub__zone-card::after {
        content: '▶';
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 800;
    }

    /* Game Select on Mobile: 2x2 Grid of Small Rectangles */
    .game-select__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: 340px;
        padding: 0.2rem;
        margin: auto;
    }

    .game-select__card {
        width: 100%;
        height: auto;
        min-height: 106px;
        border-radius: 20px;
        padding: 0.6rem 0.4rem;
        gap: 0.2rem;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    }

    .game-card__icon {
        font-size: 2.2rem;
    }

    .game-card__name {
        font-size: 1.05rem;
    }

    .game-card__desc {
        font-size: 0.74rem;
    }

    /* Mascot Chicky */
    .chicky-mascot {
        bottom: 84px;
        right: 8px;
        transform: scale(0.85);
        transform-origin: bottom right;
    }

    /* Math Play Header: Clears back button cleanly */
    .math-play__header {
        height: 44px;
        margin-bottom: 0.3rem;
        padding-left: 54px; /* Clears 42px back button nicely */
        padding-right: 4px;
    }

    .math-play__badge {
        font-size: 0.92rem;
        padding: 4px 12px;
        border-width: 2px;
        white-space: nowrap;
        max-width: calc(100vw - 180px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .math-play__speaker {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
        border-width: 2px;
    }

    .math-play__score {
        padding: 4px 12px;
        font-size: 1.05rem;
        border-width: 2px;
    }

    /* Racetrack Arena on Mobile Portrait: zero clipping, ample room for pawns */
    .racetrack-arena {
        width: 100%;
        max-width: min(330px, calc(100vw - 24px));
        height: auto;
        aspect-ratio: 1 / 1;
        gap: 6px;
        padding: 24px 6px 6px 6px; /* Top padding allows room for pawns on row 0 */
        margin: auto auto;
        overflow: visible;
    }

    .adventure-dot-tile {
        width: 44px;
        height: 44px;
        border-width: 3px;
    }

    .dot-badge-icon {
        font-size: 1.15rem;
    }

    .adventure-character-pawn {
        width: 38px;
        height: 38px;
        top: 50%; transform: translate(-50%, -50%);
    }

    .racetrack-center-arena {
        padding: 0.3rem 0.5rem;
        border-radius: 20px;
        gap: 4px;
    }

    .arena-lap-badge {
        font-size: 0.78rem;
        padding: 2px 8px;
    }

    .dice-face-img {
        width: 40px;
        height: 40px;
    }

    .center-roll-btn {
        padding: 5px 14px;
        font-size: 1rem;
        border-width: 3px;
    }

    .arena-speech-bubble {
        font-size: 0.8rem;
        padding: 3px 8px;
        line-height: 1.2;
    }

    /* Universal Math Items Sizing: fits all equations without clipping */
    .math-item-card,
    .math-items-grid .math-item-card,
    .addition-group .math-item-card {
        width: clamp(38px, 10.5vw, 46px);
        height: clamp(38px, 10.5vw, 46px);
        padding: 3px;
        border-radius: 12px;
        border-width: 2px;
    }

    .math-item-img {
        max-width: 100%;
        max-height: 100%;
    }

    .math-items-grid {
        gap: 8px;
        max-width: 330px;
    }

    .math-addition-display {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        margin-top: 0.2rem;
    }

    .addition-group {
        padding: 4px 6px;
        gap: 5px;
        border-radius: 14px;
        max-width: 46%;
    }

    .addition-plus-sign {
        font-size: 1.3rem;
    }

    .math-problem-box {
        padding: 0.5rem 0.6rem;
        margin-bottom: 0.5rem;
        border-radius: 24px;
        border-width: 3px;
    }

    .math-prompt-banner {
        margin-bottom: 0.3rem;
    }

    .math-prompt-text {
        font-size: 1.15rem;
        margin-bottom: 0;
    }

    .math-prompt-speaker {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .math-equation-banner {
        font-size: 1.5rem;
        gap: 8px;
        margin-bottom: 0.4rem;
    }

    .eq-num {
        padding: 2px 10px;
        border-radius: 12px;
        border-width: 2px;
    }

    .eq-op {
        font-size: 1.3rem;
    }

    .math-answer-bar {
        gap: 10px;
        padding: 0.3rem;
        height: 64px;
    }

    .math-answer-btn {
        min-width: 80px;
        height: 56px;
        font-size: 1.7rem;
        border-radius: 20px;
        border-width: 3px;
        box-shadow: 0 5px 0 #E65100, 0 8px 16px rgba(0, 0, 0, 0.12);
    }
}

/* 📱 MOBILE LANDSCAPE (Short Screen: <= 500px Height) */
@media (max-height: 500px) and (orientation: landscape) {
    .screen {
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
        padding-left: max(16px, calc(env(safe-area-inset-left, 0px) + 8px));
        padding-right: max(16px, calc(env(safe-area-inset-right, 0px) + 8px));
    }

    .home__header {
        height: 42px;
        margin-bottom: 0.2rem;
        padding: 0 0.5rem;
    }

    .profile-badge {
        padding: 3px 10px;
        font-size: 0.85rem;
    }

    .subject-btn {
        padding: 4px 12px;
        font-size: 0.85rem;
    }

    .curriculum-tab-btn {
        padding: 4px 12px;
        font-size: 0.85rem;
    }

    .home__unit-grid {
        gap: 0.8rem;
        padding: 0.2rem 0.5rem;
    }

    .kid-unit-card {
        max-height: calc(100vh - 54px);
        padding: 0.5rem 0.8rem;
    }

    .kid-unit-card__hero-img {
        max-height: 75px;
    }

    .kid-unit-card__title {
        font-size: 1.15rem;
        margin: 0;
    }

    .kid-unit-card__stars {
        margin: 0;
        font-size: 1.1rem;
    }

    .kid-unit-card__btn {
        height: 36px;
        font-size: 0.95rem;
    }

    /* Racetrack Arena on Mobile Landscape */
    .racetrack-arena {
        max-height: calc(100vh - 55px);
        width: auto;
        aspect-ratio: 1.25 / 1;
        gap: 6px;
        padding: 4px;
        overflow: visible;
    }

    .adventure-dot-tile {
        width: 44px;
        height: 44px;
    }

    .dot-badge-icon {
        font-size: 1.15rem;
    }

    .adventure-character-pawn {
        width: 38px;
        height: 38px;
        top: -22px;
    }

    .racetrack-center-arena {
        padding: 0.3rem 0.6rem;
        gap: 4px;
    }

    .dice-face-img {
        width: 38px;
        height: 38px;
    }

    .center-roll-btn {
        padding: 5px 14px;
        font-size: 0.95rem;
    }

    .arena-speech-bubble {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    /* Math Play Answers */
    .math-problem-box {
        padding: 0.4rem;
        overflow: visible;
    }

    .math-items-grid .math-item-card,
    .addition-group .math-item-card,
    .math-item-card {
        width: 46px;
        height: 46px;
    }

    .math-item-img {
        max-width: 36px;
        max-height: 36px;
    }

    .math-answer-bar {
        padding: 0.3rem;
    }

    .math-answer-btn {
        min-width: 76px;
        height: 48px;
        font-size: 1.4rem;
    }
}




/* ============================================================
   📱 & 📲 RESPONSIVE MASTER OVERHAUL: IPAD & MOBILE OPTIMIZATIONS
   ============================================================ */

/* ── 1. Universal Back Button Clearance on Sub-screens ── */
.screen--game-play,
.screen--math-play,
.screen--story,
.screen--unit-hub,
.screen--game-select,
.screen--math-hub,
.screen--progress,
.screen--video {
    position: absolute;
    width: 100%;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.game-play__area {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Ensure game prompt never overlaps with back button */
.find-it__prompt {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.8rem;
    padding: 0 54px; /* clearance for nav-back-btn */
    width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.pedagogical-pause-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFFFFF;
    border: 2.5px solid #38BDF8;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0369A1;
    margin-bottom: 1rem;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

/* ── 2. IPAD / TABLET OPTIMIZATIONS (Portrait & Landscape: 768px – 1200px) ── */
@media (min-width: 601px) and (max-width: 1200px) {
    /* Home Subject Portal on iPad */
    .home__subject-portal {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        max-width: 840px;
        width: 100%;
        margin: auto;
        padding: 1.5rem;
        align-items: stretch;
        align-content: center;
        justify-content: center;
    }

    .subject-portal-card {
        width: 100%;
        padding: 2.2rem 1.6rem;
        border-radius: 36px;
        min-height: 290px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .portal-card__mascot-stage {
        width: 110px;
        height: 110px;
        margin-bottom: 0.9rem;
    }

    .portal-card__mascot-art {
        width: 85px;
        height: 85px;
        border-radius: 50%;
    }

    .portal-card__title {
        font-size: 1.85rem;
        margin-bottom: 0.35rem;
    }

    .portal-card__kid-pill {
        font-size: 1.05rem;
        padding: 8px 20px;
    }

    /* Unit Grid on iPad: 4 Thẻ Dàn Đều Thẳng Hàng (Zero-Scroll) */
    .home__unit-grid {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 1.2rem;
        width: 100%;
        max-width: 1160px;
        margin: 0 auto;
        padding: 0.6rem 1rem;
        overflow: hidden;
    }

    .kid-unit-card {
        flex: 1;
        max-width: 270px;
        min-width: 200px;
        height: 100%;
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        padding: 1.1rem 0.9rem;
        border-radius: 30px;
    }

    /* Games on iPad */
    .find-it__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        max-width: 620px;
        width: 100%;
    }

    .find-it__item {
        width: 100%;
        min-height: 150px;
        aspect-ratio: 1;
        padding: 1rem;
    }

    .find-it__item-img {
        width: 90px;
        height: 90px;
    }

    .shadow-match__container {
        max-width: 580px;
        gap: 24px;
    }

    .shadow-match__card {
        height: 105px;
        padding: 10px;
    }

    .shadow-match__img {
        max-width: 80px;
        max-height: 80px;
    }

    .magic-kitchen__stage {
        max-width: 580px;
    }

    .magic-kitchen__ingredients {
        max-width: 540px;
        gap: 14px;
    }

    .magic-ingredient-btn {
        padding: 10px;
    }

    .magic-ingredient-img {
        width: 60px;
        height: 60px;
    }
}

/* ── 3. MOBILE PORTRAIT OPTIMIZATIONS (Screen width <= 600px) ── */
@media (max-width: 600px) {
    /* Header layout */
    .home__header {
        height: auto;
        padding: 0.3rem 0.6rem;
        gap: 8px;
        margin-bottom: 0.4rem;
        flex-wrap: wrap;
    }

    .header-left {
        order: 1;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .header-tools {
        order: 2;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .curriculum-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    /* Home Subject Portal on Mobile Portrait */
    .home__subject-portal {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.1rem;
        width: 100%;
        max-width: 350px;
        margin: auto;
        padding: 0.5rem 1rem;
        flex: 1;
    }

    .subject-portal-card {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1.35rem 1rem;
        border-radius: 28px;
        border-width: 4px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    }

    .portal-card__mascot-stage {
        width: 88px;
        height: 88px;
        margin-bottom: 0.6rem;
    }

    .portal-card__mascot-art {
        width: 68px;
        height: 68px;
        border-radius: 50%;
    }

    .portal-card__title {
        font-size: 1.45rem;
        margin-bottom: 0.2rem;
    }

    .portal-card__kid-pill {
        font-size: 0.92rem;
        padding: 5px 16px;
    }

    /* Back Button on Home Unit list */
    .nav-back-btn--home {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    /* Find It Game on Mobile */
    .find-it__prompt {
        font-size: 1.35rem;
        padding: 0 46px;
        margin-bottom: 0.5rem;
    }

    .pedagogical-pause-bubble {
        font-size: 0.85rem;
        padding: 5px 12px;
        margin-bottom: 0.75rem;
    }

    .find-it__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
        max-width: 350px;
        padding: 0;
    }

    .find-it__item {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        min-height: 115px;
        padding: 8px;
        border-radius: 18px;
    }

    .find-it__item-img {
        width: 62px;
        height: 62px;
    }

    .find-it__item-label {
        font-size: 0.9rem;
        font-weight: 700;
    }

    /* Shadow Match Game on Mobile */
    .shadow-match__container {
        display: flex;
        gap: 10px;
        width: 100%;
        max-width: 350px;
        padding: 0;
    }

    .shadow-match__card {
        height: 78px;
        padding: 6px;
        border-radius: 16px;
    }

    .shadow-match__img {
        max-width: 52px;
        max-height: 52px;
    }

    .shadow-match__label {
        font-size: 0.8rem;
        font-weight: 700;
    }

    /* Magic Kitchen Game on Mobile */
    .magic-kitchen__stage {
        width: 100%;
        max-width: 360px;
        padding: 0 4px;
    }

    .magic-kitchen__pot {
        font-size: 4.2rem;
    }

    .magic-kitchen__progress {
        font-size: 1rem;
        padding: 3px 12px;
    }

    .magic-kitchen__ingredients {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
        max-width: 360px;
        padding: 0;
    }

    .magic-ingredient-btn {
        padding: 6px 2px;
        border-radius: 14px;
        border: 2px solid #E2E8F0;
        background: #FFFFFF;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    .magic-ingredient-img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .magic-ingredient-name {
        font-size: 0.72rem;
        font-weight: 700;
        margin-top: 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Living Picture on Mobile */
    .living-picture__scene {
        width: 100%;
        max-width: 360px;
        height: 380px;
        border-radius: 20px;
    }

    /* Math Hub & Touch-to-count on Mobile */
    .math-arcade-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 360px;
        padding: 0 8px;
    }

    .math-touch__container {
        padding: 0.5rem;
        gap: 10px;
    }

    .math-items-grid {
        gap: 8px;
    }

    .math-item-card {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .math-item-img {
        max-width: 44px;
        max-height: 44px;
    }

    .magic-hand-dock {
        padding: 6px 14px;
    }

    .magic-hand-icon {
        font-size: 2.2rem;
    }

    .magic-hand-text {
        font-size: 1rem;
    }
}

/* ── 4. MOBILE LANDSCAPE OPTIMIZATIONS (Height <= 550px & orientation: landscape) ── */
@media (max-height: 550px) and (orientation: landscape) {
    /* Safe Area Insets for horizontal notch */
    .screen {
        padding-top: max(6px, env(safe-area-inset-top, 0px));
        padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
        padding-left: max(16px, calc(env(safe-area-inset-left, 0px) + 10px));
        padding-right: max(16px, calc(env(safe-area-inset-right, 0px) + 10px));
        overflow-y: auto;
        overflow-x: hidden;
        justify-content: flex-start;
    }

    .nav-back-btn {
        top: 8px;
        left: max(12px, calc(env(safe-area-inset-left, 0px) + 6px));
        width: 38px;
        height: 38px;
    }

    .nav-back-icon {
        font-size: 1.2rem;
    }

    .home__header {
        height: 38px;
        margin-bottom: 0.2rem;
        padding: 0 0.5rem;
    }

    /* Home Subject Portal in Mobile Landscape: Two horizontal compact cards */
    .home__subject-portal {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        max-width: 700px;
        margin: auto;
        padding: 0 0.5rem;
        flex: 1;
        align-content: center;
    }

    .subject-portal-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.5rem 0.8rem;
        gap: 0.7rem;
        border-radius: 20px;
        max-height: 110px;
    }

    .portal-card__mascot-stage {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 50%;
        margin-bottom: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .portal-card__mascot-art {
        width: 46px;
        height: 46px;
        border-radius: 50%;
    }

    .portal-card__badge {
        font-size: 0.65rem;
        padding: 2px 7px;
        margin-bottom: 0.15rem;
    }

    .portal-card__title {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }

    .portal-card__desc {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .portal-card__kid-pill {
        font-size: 0.75rem;
        padding: 3px 10px;
    }

    .portal-card__arrow {
        display: none; /* hide arrow to save vertical height */
    }

    /* Unit Grid in Mobile Landscape */
    .home__unit-grid {
        display: flex;
        flex-direction: row;
        gap: 0.6rem;
        padding: 0.2rem 0.4rem;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        max-width: 100%;
    }

    .kid-unit-card {
        flex: 0 0 200px;
        height: calc(100vh - 55px);
        max-height: calc(100dvh - 55px);
        padding: 0.4rem 0.6rem;
    }

    /* Games in Mobile Landscape */
    .find-it__prompt {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
        padding: 0 46px;
    }

    .pedagogical-pause-bubble {
        font-size: 0.8rem;
        padding: 3px 10px;
        margin-bottom: 0.4rem;
    }

    .find-it__grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        max-width: 600px;
    }

    .find-it__item {
        width: 95px;
        height: 95px;
        padding: 4px;
    }

    .find-it__item-img {
        width: 50px;
        height: 50px;
    }

    .shadow-match__container {
        flex-direction: row;
        gap: 12px;
        max-width: 550px;
    }

    .shadow-match__card {
        height: 56px;
        padding: 4px 10px;
    }

    .shadow-match__img {
        max-width: 40px;
        max-height: 40px;
    }

    .magic-kitchen__stage {
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        max-width: 600px;
        gap: 12px;
    }

    .magic-kitchen__pot {
        font-size: 3.5rem;
    }

    .magic-kitchen__ingredients {
        grid-template-columns: repeat(2, 1fr);
        max-width: 240px;
        gap: 6px;
    }

    .magic-ingredient-btn {
        padding: 4px;
    }

    .magic-ingredient-img {
        width: 36px;
        height: 36px;
    }

    /* Math in Mobile Landscape */
    .math-touch__container {
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 12px;
    }

    .math-item-card {
        width: 48px;
        height: 48px;
    }

    .math-item-img {
        max-width: 36px;
        max-height: 36px;
    }

    .magic-hand-dock {
        padding: 4px 10px;
    }

    .magic-hand-icon {
        font-size: 1.8rem;
    }
}


/* ──────────── Math Item Pre-badges & Subtraction Distinction ──────────── */
.math-item-prebadge {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #1E293B;
    border: 2.5px solid #CBD5E1;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    z-index: 5;
    transition: transform 0.2s ease, background 0.2s ease;
}

.math-touch-item.counted .math-item-prebadge {
    background: #FCD34D;
    color: #B45309;
    border-color: #F59E0B;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Takeaway Subtraction Item (Coral/Amber distinct styling) */
.math-sub-item--takeaway {
    border: 4px dashed #F97316 !important;
    background: rgba(254, 243, 199, 0.6) !important;
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.15) !important;
}

.math-sub-item--takeaway .prebadge--takeaway {
    background: #FFEDD5;
    color: #C2410C;
    border-color: #F97316;
}

.math-sub-item--takeaway.eaten {
    opacity: 0.35;
    filter: grayscale(0.8) scale(0.88);
    border-style: dotted !important;
    pointer-events: none;
}

/* Remaining Subtraction Item (Teal/Emerald distinct styling) */
.math-sub-item--remaining {
    border: 4px solid #10B981 !important;
    background: rgba(209, 250, 229, 0.4) !important;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.18) !important;
}

.math-sub-item--remaining .prebadge--remaining {
    background: #D1FAE5;
    color: #047857;
    border-color: #10B981;
}

/* Pawn origin pulse */
@keyframes originPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6); }
    50% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
}
.pawn-origin-pulse {
    animation: originPulse 1.5s infinite;
}

/* ============================================================
   🎨 SESSION 14: PEDAGOGY, MASCOTS & 3 MINI-GAMES OVERHAUL
   ============================================================ */

/* ── 1. Video Selector Bar Underneath Player ── */
.video__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 10px 16px;
    box-sizing: border-box;
}

#videoPlayer {
    width: 100%;
    max-height: calc(100dvh - 160px);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    background: #000000;
}

.video__selector-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    width: 100%;
    max-width: 720px;
    flex-wrap: wrap;
    z-index: 5;
}

.video-selector-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    background: #FFFFFF;
    color: #1E293B;
    border: 3px solid #E2E8F0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
    user-select: none;
}

.video-selector-btn:hover {
    transform: translateY(-2px);
    border-color: #38BDF8;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

.video-selector-btn:active {
    transform: scale(0.95);
}

.video-selector-btn.active {
    background: linear-gradient(135deg, #FEF08A 0%, #FDE047 100%);
    border-color: #F59E0B;
    color: #92400E;
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

/* ── 2. Cartoon Mascot Home Portal Cards ── */
.portal-card__mascot-stage {
    position: relative;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    border: 4px solid #FFFFFF;
    margin-bottom: 0.75rem;
}

.portal-card__mascot-art {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: floatMascot 2.5s ease-in-out infinite alternate;
}

@keyframes floatMascot {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-6px) rotate(4deg); }
}

.portal-card__badge {
    position: absolute;
    bottom: -4px;
    right: -6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #FFFFFF;
    letter-spacing: 0.5px;
}

.portal-card__badge--english {
    background: #0284C7;
    color: #FFFFFF;
}

.portal-card__badge--math {
    background: #D97706;
    color: #FFFFFF;
}

.portal-card__kid-pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    border: 2px solid #FFFFFF;
    transition: transform 0.2s ease;
}

.portal-card__kid-pill--english {
    background: #0284C7;
    color: #FFFFFF;
}

.portal-card__kid-pill--math {
    background: #D97706;
    color: #FFFFFF;
}

.subject-portal-card:hover .portal-card__kid-pill {
    transform: scale(1.08);
}

/* ── 3. Shadow Match Redesign (1 Item vs 3 Shelf Shadows) ── */
.shadow-match-game__wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    gap: 18px;
}

.shadow-target-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 4px solid #38BDF8;
    border-radius: 28px;
    padding: 16px 28px;
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.25);
    animation: gentleBob 2s ease-in-out infinite alternate;
}

@keyframes gentleBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.shadow-target-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
}

.shadow-target-label {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0369A1;
    margin-top: 6px;
}

.shadow-shelf {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
    padding: 14px 16px;
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.25);
    position: relative;
}

.shadow-slot-btn {
    flex: 1;
    max-width: 140px;
    aspect-ratio: 1;
    background: #FFFFFF;
    border: 3.5px dashed #B45309;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding: 8px;
    touch-action: manipulation;
}

.shadow-slot-btn:active {
    transform: scale(0.92);
}

.shadow-slot-silhouette {
    width: 75px;
    height: 75px;
    object-fit: contain;
    filter: brightness(0) opacity(0.22);
    transition: all 0.4s ease;
}

.shadow-slot-btn.revealed {
    border: 4px solid #10B981 !important;
    background: #ECFDF5 !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4) !important;
    transform: scale(1.12);
}

.shadow-slot-btn.revealed .shadow-slot-silhouette {
    filter: none !important;
    animation: snapReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes snapReveal {
    0% { transform: scale(0.6) rotate(-15deg); filter: brightness(2); }
    60% { transform: scale(1.25) rotate(5deg); }
    100% { transform: scale(1) rotate(0); filter: none; }
}

.shadow-slot-btn.wobble-wrong {
    animation: wrongWobble 0.5s ease;
    border-color: #EF4444;
}

@keyframes wrongWobble {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px) rotate(-4deg); }
    75% { transform: translateX(8px) rotate(4deg); }
}

/* ── 4. Magic Kitchen Birthday Cake Redesign ── */
.magic-kitchen-cake__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    gap: 16px;
    position: relative;
}

.magic-cake-center-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
    border: 4px solid #FDA4AF;
    border-radius: 32px;
    padding: 16px 24px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 28px rgba(244, 63, 94, 0.15);
}

.magic-cake-art {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.12));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.magic-cake-art.cake-bounce {
    animation: cakeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cakeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25) rotate(-3deg); }
}

.magic-cake-progress-pill {
    background: #FFFFFF;
    border: 2px solid #FB7185;
    color: #E11D48;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: 4px 14px;
    border-radius: 999px;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.12);
}

.magic-wooden-tray {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    background: linear-gradient(180deg, #E2B57B 0%, #B47836 100%);
    padding: 14px;
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(118, 71, 23, 0.3), inset 0 2px 4px rgba(255,255,255,0.4);
    box-sizing: border-box;
}

.tray-ingredient-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 3.5px solid #FCD34D;
    border-radius: 20px;
    padding: 8px 4px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
    user-select: none;
}

.tray-ingredient-card:active {
    transform: scale(0.92);
}

.tray-ingredient-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.tray-ingredient-name {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #334155;
    margin-top: 4px;
}

/* Checked Star Badge when added to cake (NEVER DISAPPEARS!) */
.tray-ingredient-card.added-to-cake {
    background: #F8FAFC;
    border-color: #10B981;
    filter: saturate(0.85);
}

.ingredient-checked-star {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: #FEF08A;
    border: 2px solid #F59E0B;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
    animation: starPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ── 5. Living Picture Full Illustrated Cozy Bedroom ── */
.living-bedroom__scene {
    position: relative;
    width: 100%;
    max-width: 680px;
    height: 420px;
    background: linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 65%, #C7D2FE 65%, #A5B4FC 100%);
    border-radius: 32px;
    border: 5px solid #FFFFFF;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    margin: 0 auto;
    transition: background 0.6s ease;
}

.living-bedroom__scene.night-mode {
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 65%, #312E81 65%, #1E1B4B 100%);
}

.living-wall-window {
    position: absolute;
    top: 20px;
    right: 35px;
    width: 110px;
    height: 100px;
    background: linear-gradient(180deg, #38BDF8 0%, #818CF8 100%);
    border: 6px solid #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.living-bedroom__scene.night-mode .living-wall-window {
    background: linear-gradient(180deg, #0284C7 0%, #1E1B4B 100%);
}

.living-window-stars {
    font-size: 1.6rem;
    animation: twinkle 1.8s infinite ease-in-out alternate;
}

@keyframes twinkle {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.1); }
}

.living-item-closet {
    position: absolute;
    bottom: 35px;
    left: 20px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.living-item-bed {
    position: absolute;
    bottom: 25px;
    left: 170px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.living-item-lamp {
    position: absolute;
    bottom: 155px;
    left: 150px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.living-item-lamp.lamp-active {
    filter: drop-shadow(0 0 24px rgba(253, 224, 71, 0.9));
}

.living-item-plant {
    position: absolute;
    bottom: 40px;
    right: 25px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.living-item-rug {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.living-item-rug:active {
    transform: translateX(-50%) scale(0.92);
}

.living-story-bubble {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 340px;
    width: 90%;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #38BDF8;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0369A1;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    animation: popInBubble 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 30;
}

@keyframes popInBubble {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    .living-bedroom__scene {
        height: 350px;
    }
    .living-item-bed {
        left: 120px;
        transform: scale(0.85);
    }
    .living-item-closet {
        left: 5px;
        transform: scale(0.85);
    }
    .living-item-lamp {
        left: 110px;
        bottom: 120px;
        transform: scale(0.85);
    }
    .living-item-plant {
        right: 10px;
        transform: scale(0.85);
    }
    .living-item-rug {
        bottom: 5px;
        transform: translateX(-50%) scale(0.85);
    }
    .living-wall-window {
        right: 15px;
        width: 85px;
        height: 80px;
    }
    .magic-wooden-tray {
        gap: 8px;
        padding: 10px;
    }
    .tray-ingredient-img {
        width: 44px;
        height: 44px;
    }
    .shadow-target-img {
        width: 80px;
        height: 80px;
    }
}

/* ──────────── 4 Living Picture Themes & Interactive Labels ──────────── */
.living-scene-container {
    position: relative;
    width: 100%;
    max-width: 680px;
    height: 420px;
    border-radius: 32px;
    border: 5px solid #FFFFFF;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    margin: 0 auto;
    transition: background 0.6s ease;
}

.living-scene--bedroom {
    background: linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 65%, #C7D2FE 65%, #A5B4FC 100%);
}

.living-scene--family {
    background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 60%, #FED7AA 60%, #FDBA74 100%);
}

.living-scene--hygiene {
    background: linear-gradient(180deg, #ECFEFF 0%, #CFFAFE 60%, #BAE6FD 60%, #7DD3FC 100%);
}

.living-scene--toyshop {
    background: linear-gradient(180deg, #FFF1F2 0%, #FFE4E6 60%, #FECDD3 60%, #FDA4AF 100%);
}

.living-item-wrap {
    position: absolute;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.living-item-wrap:active {
    transform: scale(0.92);
}

.living-item-tag {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    border: 2.5px solid #F59E0B;
    border-radius: 999px;
    padding: 2px 10px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: #B45309;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s var(--ease-bounce);
    z-index: 20;
}

.living-item-wrap.active .living-item-tag {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px) scale(1.1);
    background: #FEF3C7;
}

.shadow-revealed-label {
    margin-top: 6px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #15803D;
    background: #DCFCE7;
    border: 2px solid #86EFAC;
    border-radius: 999px;
    padding: 2px 10px;
    animation: popIn 0.3s var(--ease-bounce);
}

.shadow-slot-silhouette {
    width: 58px;
    height: 58px;
}


/* ══════════════════════════════════════════════════════════════════
   CHUẨN SƯ PHẠM MẦM NON: PHÉP CỘNG, PHÉP TRỪ & CÁ NGỰA (v2.6.0)
   - Phép tính A + B = ? ở trên đỉnh
   - 2 Ô bao lớn chứa hình vẽ (không in số) ở dưới
   - Đồng bộ nhịp MP3 & Chống chọn bừa (Pedagogical Gating)
   ══════════════════════════════════════════════════════════════════ */

/* Hàng phép tính toán học trên đỉnh: A + B = ? (LUÔN XẾP HÀNG NGANG CHUẨN MỰC) */
.math-equation-top {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.6rem auto 1rem;
    padding: 0.6rem 1.8rem;
    background: #FFFFFF;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 3.5px solid #F1F5F9;
    max-width: 480px;
    white-space: nowrap !important;
    box-sizing: border-box;
}

/* Thanh phép tính số học trên đỉnh xúc xắc trong trò Cá ngựa */
.dice-equation-top {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.2rem auto 0.6rem;
    padding: 0.4rem 1.4rem;
    background: #FFFFFF;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    border: 3px solid #F1F5F9;
    white-space: nowrap !important;
    user-select: none;
    max-width: 92%;
    box-sizing: border-box;
}

.dice-equation-top .equation-num {
    font-size: 2rem;
    min-width: 40px;
    height: 40px;
}

.dice-equation-top .equation-op {
    font-size: 1.5rem;
}

.dice-equation-top .equation-slot {
    font-size: 1.8rem;
    min-width: 44px;
    height: 40px;
}

.equation-num {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    min-width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: transform 0.25s var(--ease-bounce), background 0.3s ease;
}

.equation-num--a {
    color: #EA580C;
    background: #FFF7ED;
    border: 2.5px solid #FDBA74;
}

.equation-num--b {
    color: #16A34A;
    background: #F0FDF4;
    border: 2.5px solid #86EFAC;
}

.equation-op {
    font-size: 1.8rem;
    color: #94A3B8;
    user-select: none;
}

.equation-slot {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    min-width: 52px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FEF3C7;
    border: 3px dashed #F59E0B;
    border-radius: 14px;
    color: #D97706;
    animation: slotPulse 1.5s infinite alternate;
}

@keyframes slotPulse {
    0% { transform: scale(0.96); border-color: #F59E0B; }
    100% { transform: scale(1.04); border-color: #EF4444; box-shadow: 0 0 16px rgba(245, 158, 11, 0.4); }
}

.equation-slot.filled {
    border-style: solid;
    border-color: #10B981;
    background: #D1FAE5;
    color: #047857;
    animation: popBounce 0.5s var(--ease-bounce);
}

/* Khung 2 Ô bao lớn (Container Boxes) */
.math-containers-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
    max-width: 720px;
    margin: 0 auto 1.2rem;
}

.math-container-box {
    flex: 1;
    min-width: 180px;
    min-height: 140px;
    border-radius: 28px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    position: relative;
}

.math-container-box.box-a {
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF7ED 100%);
    border: 4px solid #FB923C;
}

.math-container-box.box-b {
    background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
    border: 4px solid #4ADE80;
}

.math-container-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.math-container-box:active,
.math-container-box.box-pulse-active {
    transform: scale(0.96);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.container-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.6rem;
    pointer-events: none;
}

.box-badge {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #EA580C;
}

.box-b .box-badge {
    color: #16A34A;
}

.box-title {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    text-transform: capitalize;
}

.box-speaker {
    font-size: 0.9rem;
}

.container-box-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
}

.container-box-items .math-touch-item {
    width: 68px;
    height: 68px;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--ease-bounce);
    cursor: pointer;
}

.container-box-items .math-touch-item:active {
    transform: scale(1.18);
}

.container-box-items .math-touch-item img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    pointer-events: none;
}

.container-plus-separator {
    font-size: 2.5rem;
    color: #CBD5E1;
    user-select: none;
}

/* Hàng đáp án: Cơ chế Sư phạm Khóa / Mở khóa (Pedagogical Gating) */
.math-options-dock {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.math-options-dock--locked {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.2);
}

.options-dock-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #FEF3C7;
    border: 2px dashed #F59E0B;
    border-radius: 999px;
    padding: 6px 16px;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #B45309;
}

.math-options-dock--unlocked .options-dock-header {
    background: #DCFCE7;
    border: 2px solid #86EFAC;
    color: #15803D;
    animation: popIn 0.3s ease;
}

.options-buttons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
}

.math-choice-btn {
    width: 80px;
    height: 80px;
    border-radius: 26px;
    border: 4px solid #FFFFFF;
    background: linear-gradient(145deg, #38BDF8 0%, #0284C7 100%);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce), background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.math-choice-btn:hover {
    transform: scale(1.08);
}

.math-choice-btn:active {
    transform: scale(0.92);
}

.math-choice-btn.correct {
    background: linear-gradient(145deg, #4ADE80 0%, #16A34A 100%);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.4);
    animation: popBounce 0.5s var(--ease-bounce);
}

.math-choice-btn.wrong {
    background: linear-gradient(145deg, #F87171 0%, #DC2626 100%);
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.4);
    animation: shakeWrong 0.5s ease;
}

.math-options-dock.cooldown {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes shakeWrong {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}


/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE HÀNG NGANG CHO PHÉP TOÁN & XÚC XẮC TRÊN MỌI THIẾT BỊ
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .math-equation-top {
        gap: 0.4rem !important;
        padding: 0.4rem 0.8rem !important;
        max-width: 95% !important;
        margin: 0.3rem auto 0.6rem !important;
    }
    .math-equation-top .equation-num {
        font-size: 1.8rem !important;
        min-width: 36px !important;
        height: 36px !important;
    }
    .math-equation-top .equation-op {
        font-size: 1.3rem !important;
    }
    .math-equation-top .equation-slot {
        font-size: 1.6rem !important;
        min-width: 40px !important;
        height: 36px !important;
    }
    .math-containers-wrap {
        gap: 0.5rem !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
    }
    .math-container-box {
        min-width: 110px !important;
        min-height: 110px !important;
        padding: 0.5rem !important;
        border-radius: 18px !important;
    }
    .container-box-header {
        padding: 2px 8px !important;
        gap: 0.3rem !important;
        margin-bottom: 0.4rem !important;
    }
    .box-badge {
        font-size: 1rem !important;
    }
    .box-title {
        font-size: 0.9rem !important;
    }
    .container-plus-separator {
        font-size: 1.4rem !important;
    }
    .math-touch-item {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
    }
    .math-touch-item__img {
        max-width: 36px !important;
        max-height: 36px !important;
    }

    .dice-equation-top {
        gap: 0.3rem !important;
        padding: 0.25rem 0.8rem !important;
    }
    .dice-equation-top .equation-num {
        font-size: 1.5rem !important;
        min-width: 32px !important;
        height: 32px !important;
    }
    .dice-equation-top .equation-op {
        font-size: 1.2rem !important;
    }
    .dice-equation-top .equation-slot {
        font-size: 1.4rem !important;
        min-width: 36px !important;
        height: 32px !important;
    }
}


/* ============================================================
   v2.7.0 — SPEAKING TEST 1-1 & AI TEACHER COMPANION FOR MINH NGUYỆT (MOON)
   GPU-friendly transforms, zero backdrop-filter lag, responsive on Mobile & iPad
   ============================================================ */

.header-speaking-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.header-speaking-pill:active {
    transform: scale(0.93);
}

/* 4-Portal Grid on Home Screen */
.home__subject-portal--quad {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 1.1rem !important;
    max-width: 1120px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0.5rem 1rem 1.5rem !important;
}

.subject-portal-card--speaking {
    background: linear-gradient(145deg, #FDF2F8 0%, #FCE7F3 100%) !important;
    border: 5px solid #DB2777 !important;
    box-shadow: 0 10px 0 #9D174D, 0 14px 24px rgba(219, 39, 119, 0.22) !important;
}

.subject-portal-card--drills {
    background: linear-gradient(145deg, #FEF3C7 0%, #FDE68A 100%) !important;
    border: 5px solid #D97706 !important;
    box-shadow: 0 10px 0 #92400E, 0 14px 24px rgba(217, 119, 6, 0.22) !important;
}

.portal-card__badge--speaking {
    background: #DB2777 !important;
    color: #FFF !important;
}

.portal-card__badge--drills {
    background: #D97706 !important;
    color: #FFF !important;
}

.portal-card__subtitle {
    font-size: 0.92rem;
    font-weight: 700;
    color: #475569;
    margin: 0.15rem 0 0.45rem;
    line-height: 1.3;
}

.portal-card__kid-pill--speaking {
    background: #DB2777 !important;
    color: #FFFFFF !important;
}

.portal-card__kid-pill--drills {
    background: #D97706 !important;
    color: #FFFFFF !important;
}

/* ──── Speaking Test Screen Layout ──── */
.screen--speaking-test {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, #F0F9FF 0%, #FEFCE8 100%);
    overflow: hidden;
}
.screen--speaking-test.active {
    display: flex;
}

.st-screen-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.2rem;
    background: #FFFFFF;
    border-bottom: 3px solid #E2E8F0;
    flex-shrink: 0;
}

.nav-back-btn--inline {
    position: static !important;
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0;
}

.st-screen-header__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1E293B;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-screen-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem 2rem;
    -webkit-overflow-scrolling: touch;
}

/* ──── Hub View ──── */
.st-hub {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.st-profile-banner {
    background: linear-gradient(135deg, #EFF6FF 0%, #FDF2F8 100%);
    border: 4px solid #60A5FA;
    border-radius: 24px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.st-profile-banner__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 260px;
}

.st-profile-banner__avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 4px solid #3B82F6;
    background: #FFF;
    flex-shrink: 0;
}

.st-profile-banner__badge {
    display: inline-block;
    background: #DBEAFE;
    color: #1D4ED8;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 4px;
}

.st-profile-banner__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1E293B;
    margin: 0 0 4px;
}

.st-profile-banner__desc {
    font-size: 0.92rem;
    color: #334155;
    margin: 0;
    line-height: 1.35;
}

.st-profile-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.st-btn-fulltest {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 0 #6D28D9;
    transition: transform 0.15s ease;
}
.st-btn-fulltest:active {
    transform: translateY(3px);
}

.st-btn-family-photo {
    background: #FFFFFF;
    color: #1D4ED8;
    border: 2px solid #93C5FD;
    border-radius: 14px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.st-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.st-tab-btn {
    flex: 1;
    min-width: 220px;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    border: 3px solid #CBD5E1;
    background: #FFFFFF;
    color: #475569;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}
.st-tab-btn.active {
    background: #1D4ED8;
    color: #FFFFFF;
    border-color: #1E40AF;
    box-shadow: 0 4px 0 #1E3A8A;
}

.st-last-score-strip {
    background: #FEF9C3;
    border: 2px solid #FDE047;
    border-radius: 14px;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: #854D0E;
}

.st-last-score-pill {
    background: #F59E0B;
    color: #FFF;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
}

/* 7 Modules Grid */
.st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 1rem;
}

.st-card {
    background: var(--st-bg, #EFF6FF);
    border: 4px solid var(--st-border, #2563EB);
    border-radius: 22px;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease;
}
.st-card:active {
    transform: scale(0.96);
}

.st-card__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.st-card__step {
    color: #FFF;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 999px;
}

.st-card__count {
    font-size: 0.8rem;
    font-weight: 800;
    color: #334155;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 999px;
}

.st-card__art {
    width: 96px;
    height: 96px;
    background: #FFFFFF;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0 0.6rem;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.st-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.st-card__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
}

.st-card__subtitle {
    font-size: 0.86rem;
    font-weight: 700;
    color: #475569;
    margin: 0.2rem 0 0.7rem;
    min-height: 2.3em;
}

.st-card__btn {
    width: 100%;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 0.55rem;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
}

/* 4 Smart Drills Grid */
.st-drills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.st-drill-card {
    background: var(--st-bg, #FEF3C7);
    border: 4px solid var(--st-border, #D97706);
    border-radius: 22px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
}

.st-drill-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #FFF;
    flex-shrink: 0;
}

.st-drill-card__body {
    flex: 1;
}

.st-drill-card__title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #0F172A;
}

.st-drill-card__desc {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin: 2px 0 4px;
}

.st-drill-card__meta {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748B;
}

.st-drill-card__btn {
    color: #FFF;
    border: none;
    border-radius: 14px;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* ──── 2. Session Stage View ──── */
.st-stage {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.st-stage__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.st-progress-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #FFFFFF;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid #CBD5E1;
    font-weight: 800;
    font-size: 0.9rem;
    color: #1E293B;
}

.st-progress-bar {
    width: 120px;
    height: 10px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
}

.st-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #EC4899);
    transition: width 0.25s ease;
}

.st-automic-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    padding: 6px 12px;
    border-radius: 999px;
    border: 2px solid #CBD5E1;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

/* Split-Screen 2 Bên: Trái = Video Cô Giáo Nửa Người | Phải = Hình Hỏi & Sửa Phát Âm */
.st-split-workspace {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 1.1rem;
    align-items: stretch;
}

@media (max-width: 760px) {
    .st-split-workspace {
        grid-template-columns: 1fr;
    }
}

.st-split-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #FFFFFF;
    border: 3px solid #93C5FD;
    border-radius: 26px;
    padding: 0.85rem;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}

.st-teacher-video-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #3B82F6;
    background: #EFF6FF;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.st-teacher-video-card.is-speaking {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), 0 8px 20px rgba(37, 99, 235, 0.28);
}

.st-teacher-video-card.is-praising {
    border-color: #EC4899;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.28), 0 8px 20px rgba(236, 72, 153, 0.3);
}

.st-teacher-video-card.is-listening {
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22), 0 8px 18px rgba(16, 185, 129, 0.2);
}

.st-teacher-video-halfbody {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.st-teacher-state-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.st-teacher-replay-chip {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(37, 99, 235, 0.92);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 999px;
    padding: 4px 11px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.st-split-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.st-right-question-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 3px solid #60A5FA;
    border-radius: 20px;
    padding: 0.7rem 1.1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.st-right-question-banner.recast-mode {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-color: #F59E0B;
}

.st-right-question-icon {
    font-size: 1.45rem;
    flex-shrink: 0;
}

.st-right-question-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.25;
}

.st-speech-bubble {
    flex: 1;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 18px;
    padding: 0.65rem 0.85rem;
}

.st-speech-bubble__name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #2563EB;
    text-transform: uppercase;
}

.st-speech-bubble__en {
    font-size: 1.18rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.28;
    margin: 3px 0;
}

.st-speech-bubble__vi {
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
}

/* Interactive Desk Area */
.st-desk-area {
    flex: 1;
    background: #FFFFFF;
    border: 4px solid #FDE047;
    border-radius: 24px;
    padding: 1rem;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.st-prop-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
}

.st-prop-main-img {
    max-width: 175px;
    max-height: 155px;
    object-fit: contain;
    transition: transform 0.2s ease;
}
.st-prop-card:active .st-prop-main-img {
    transform: scale(1.06);
}

.st-prop-badge {
    background: #FEF3C7;
    border: 2px solid #F59E0B;
    color: #92400E;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 4px 16px;
    border-radius: 999px;
}

/* Open-Ended Multi-Variant Chips (e.g. Happy/Tired/Hungry, Sunny/Cloudy/Rainy) */
.st-variants-bar {
    width: 100%;
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    border-top: 2px dashed #E2E8F0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.st-variants-bar__label {
    font-size: 0.84rem;
    font-weight: 800;
    color: #475569;
    text-align: center;
}

.st-variants-bar__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.st-variant-chip {
    background: #F8FAFC;
    border: 2.5px solid #93C5FD;
    color: #1E3A8A;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.st-variant-chip:active,
.st-variant-chip.active {
    background: #DBEAFE;
    border-color: #2563EB;
    transform: scale(1.05);
}

/* Count Items Grid */
.st-count-header {
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
}

.st-count-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.st-count-item {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    border: 3px solid #CBD5E1;
    background: #F8FAFC;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.15s ease;
}
.st-count-item__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.st-count-item__num {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #16A34A;
    color: #FFF;
    font-weight: 800;
    font-size: 0.95rem;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFF;
}
.st-count-item.counted {
    border-color: #16A34A;
    background: #DCFCE7;
    transform: scale(1.05);
}
.st-count-item.counted .st-count-item__num {
    display: flex;
}

/* Family Photo Prop */
.st-family-real-frame {
    position: relative;
    max-width: 340px;
    border-radius: 18px;
    overflow: hidden;
    border: 4px solid #EC4899;
}
.st-family-real-img {
    width: 100%;
    max-height: 190px;
    object-fit: cover;
    display: block;
}
.st-family-change-btn,
.st-family-upload-inline {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 2px solid #93C5FD;
    border-radius: 999px;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}
.st-family-Placeholder-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.st-family-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 16px;
    border: 3px solid #E2E8F0;
    background: #F8FAFC;
    cursor: pointer;
}
.st-family-member.focused {
    border-color: #EC4899;
    background: #FDF2F8;
    transform: scale(1.05);
}
.st-family-member img {
    height: 90px;
    object-fit: contain;
}
.st-family-member span {
    font-weight: 800;
    font-size: 0.88rem;
    margin-top: 4px;
}
.st-family-upload-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mystery Box, Compare Size, Wearing, Choices, Hoop */
.st-mystery-box-btn {
    background: #F5F3FF;
    border: 3px dashed #8B5CF6;
    border-radius: 20px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.st-mystery-cta {
    font-weight: 800;
    color: #6D28D9;
    font-size: 1rem;
}
.st-mystery-revealed,
.st-compare-row,
.st-wearing-row,
.st-choices-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.st-mystery-toy,
.st-compare-item,
.st-wearing-option,
.st-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    border: 3px solid #CBD5E1;
    background: #F8FAFC;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.95rem;
}
.st-compare-item--big img {
    width: 115px;
    height: 115px;
}
.st-compare-item--small img {
    width: 64px;
    height: 64px;
}
.st-wearing-option img,
.st-choice-card img,
.st-mystery-toy img {
    width: 92px;
    height: 92px;
    object-fit: contain;
}
.st-wearing-option.selected,
.st-choice-card.correct {
    border-color: #16A34A;
    background: #DCFCE7;
}

.st-hoop-stage {
    position: relative;
    width: 240px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.st-hoop-svg {
    width: 220px;
    height: 110px;
    object-fit: contain;
}
.st-hoop-mun-avatar {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.st-hoop-stage.mun-inside .st-hoop-mun-avatar {
    transform: translateY(-8px) scale(1.1);
}
.st-hoop-stage.mun-outside .st-hoop-mun-avatar {
    transform: translate(95px, -24px);
}
.st-hoop-mun-emoji {
    font-size: 2.6rem;
}
.st-hoop-mun-tag {
    background: #0284C7;
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}
.st-hoop-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.st-hoop-jump-btn {
    background: #0284C7;
    color: #FFF;
    border: none;
    border-radius: 14px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

/* Feedback & Gentle 1-Turn Recast Card */
.st-feedback-box {
    background: #FFFFFF;
    border: 3px solid #E2E8F0;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.st-feedback-target {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-weight: 800;
    color: #334155;
}

.st-model-sentence-btn {
    background: #EFF6FF;
    border: 2px solid #60A5FA;
    color: #1D4ED8;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.st-model-recast-demo-btn {
    background: #FDF2F8;
    border: 2px solid #F472B6;
    color: #BE185D;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.st-feedback-hint {
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748B;
}

.st-heard-pill {
    font-size: 0.9rem;
    color: #475569;
    background: #F1F5F9;
    padding: 4px 12px;
    border-radius: 999px;
    align-self: flex-start;
}

.st-recast-card {
    background: #FFFBEB;
    border: 3px solid #F59E0B;
    border-radius: 16px;
    padding: 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.st-recast-card--success {
    background: #F0FDF4;
    border-color: #22C55E;
}
.st-recast-card__title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #92400E;
}
.st-recast-card--success .st-recast-card__title {
    color: #15803D;
}
.st-recast-card__sentence {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0F172A;
}
.st-recast-card__actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 4px;
}
.st-recast-btn {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
}
.st-recast-btn--try {
    background: #F59E0B;
    color: #FFFFFF;
}
.st-recast-btn--next {
    background: #16A34A;
    color: #FFFFFF;
}

/* Bottom Controls Dock */
.st-controls-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.st-ctrl-btn {
    padding: 0.75rem 1.1rem;
    border-radius: 18px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    border: 3px solid #CBD5E1;
    background: #FFFFFF;
    color: #1E293B;
}
.st-ctrl-btn--next {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #1D4ED8;
}

.st-mic-main-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.2rem;
    border-radius: 22px;
    border: 4px solid #DB2777;
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 0 #9D174D;
    transition: transform 0.15s ease;
}
.st-mic-main-btn.listening {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    border-color: #FEF08A;
    animation: stMicPulse 1s infinite alternate;
}

@keyframes stMicPulse {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

/* 3. Summary View */
.st-summary {
    max-width: 640px;
    margin: 1rem auto;
}
.st-summary__card {
    background: #FFFFFF;
    border: 4px solid #F59E0B;
    border-radius: 28px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.st-summary__trophy {
    font-size: 3.2rem;
}
.st-summary__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0.4rem 0;
}
.st-summary__stars {
    font-size: 2rem;
    margin: 0.5rem 0 1rem;
}
.st-summary__recast-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    text-align: left;
}
.st-summary__recast-title {
    font-weight: 800;
    color: #92400E;
    font-size: 0.95rem;
}
.st-summary__recast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FEF3C7;
    border: 2px solid #F59E0B;
    border-radius: 14px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-weight: 800;
    color: #1E293B;
    cursor: pointer;
}
.st-summary__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

/* ──── 4. Teacher Speech Speed Selector & Upgraded Smart Reflex Drills ──── */
.st-speed-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    background: #FFFFFF;
    border: 3px solid #BFDBFE;
    border-radius: 18px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.st-speed-control-bar__label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1E3A8A;
}
.st-speed-control-bar__btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.st-speed-chip {
    background: #F1F5F9;
    border: 2px solid #CBD5E1;
    color: #334155;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.st-speed-chip.active {
    background: #2563EB;
    border-color: #1D4ED8;
    color: #FFFFFF;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.st-topbar-speed-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #FFFFFF;
    border: 2px solid #CBD5E1;
    border-radius: 999px;
    padding: 3px 6px;
}
.st-speed-mini-btn {
    background: transparent;
    border: none;
    color: #475569;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}
.st-speed-mini-btn.active {
    background: #2563EB;
    color: #FFFFFF;
}

/* Rich Smart Drill Cards in Hub */
.st-drill-contrast-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    padding: 0.55rem 0.75rem;
    margin: 0.35rem 0;
    border: 2px dashed rgba(15, 23, 42, 0.15);
}
.st-drill-contrast-row {
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
}
.st-drill-contrast-row--wrong {
    color: #DC2626;
    text-decoration: line-through;
    opacity: 0.88;
}
.st-drill-contrast-row--right {
    color: #15803D;
    font-size: 0.98rem;
}
.st-drill-coach-tip {
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
    line-height: 1.35;
    text-align: left;
    margin-bottom: 0.35rem;
}

/* Interactive Visual Reflex Coach Panel Inside Session */
.st-reflex-coach-panel {
    background: var(--drill-bg, #FEF3C7);
    border: 3px solid var(--drill-border, #F59E0B);
    border-radius: 18px;
    padding: 0.65rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.st-reflex-coach-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.st-reflex-coach-panel__title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
}
.st-reflex-coach-panel__pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.st-reflex-pill {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
}
.st-reflex-pill--wrong {
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}
.st-reflex-pill--right {
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #86EFAC;
}
.st-reflex-coach-panel__tip {
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
}
.st-reflex-coach-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.45rem;
    margin-top: 2px;
}
.st-reflex-card-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #FFFFFF;
    border: 2px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.st-reflex-card-btn:hover {
    transform: translateY(-2px);
    border-color: var(--drill-border, #2563EB);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.st-reflex-card-btn__badge {
    font-size: 0.74rem;
    font-weight: 800;
    color: #64748B;
}
.st-reflex-card-btn__label {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F172A;
}

/* ================================================================
   V3.2: RESTRUCTURED 1-1 ENGLISH CLASSROOM + STATIC COUNTING + RIGHT/WRONG EVALUATION
   ================================================================ */
.home__subject-portal--trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    align-items: stretch;
}
@media (max-width: 900px) {
    .home__subject-portal--trio {
        grid-template-columns: 1fr;
    }
}

/* Waiting for Mun's Answer Box (No Answer Spoiler Before Mun Speaks) */
.st-waiting-answer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}
.st-waiting-answer-box__text {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1E3A8A;
    line-height: 1.4;
    flex: 1 1 260px;
}
.st-waiting-answer-box__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.st-reveal-hint-btn {
    background: #EFF6FF;
    border: 2px solid #93C5FD;
    color: #1D4ED8;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.st-reveal-hint-btn:hover {
    background: #DBEAFE;
    border-color: #3B82F6;
}

/* Static Counting Illustration Card (Hình Tĩnh Để Mun Tự Đếm) */
.st-prop-static-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
}
.st-prop-static-count__hero {
    width: 220px;
    height: 200px;
    max-height: 220px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}
.st-static-count-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 540px;
    padding: 0.5rem;
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 20px;
}
.st-static-count-item {
    width: 96px;
    height: 96px;
    background: #FFFFFF;
    border: 3px solid #E2E8F0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    pointer-events: none;
    user-select: none;
}
.st-static-count-grid--7 .st-static-count-item {
    width: 86px;
    height: 86px;
}
.st-static-count-item__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.st-static-count-caption {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F766E;
    background: #CCFBF1;
    border: 2px solid #5EEAD4;
    padding: 5px 14px;
    border-radius: 999px;
    text-align: center;
}

/* Encourage & Retry Cards for Right/Wrong Speech Comparison */
.st-recast-card__note {
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
    line-height: 1.35;
}
.st-recast-card--encourage {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: #F59E0B;
}
.st-recast-card--encourage .st-recast-card__title {
    color: #B45309;
}
.st-recast-card--retry {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #3B82F6;
}
.st-recast-card--retry .st-recast-card__title {
    color: #1D4ED8;
}

/* ================================================================
   V3.3: LINGOKIDS 3-YEAR-OLD VISUAL UI ("TOÀN HÌNH, NÚT TO 3D ĐẸP")
   + LIVE WORD-BY-WORD KARAOKE BAR ("NGHE ĐÂU HIỆN CHỮ TỚI ĐÓ")
   ================================================================ */

/* Sky-blue / Pastel Playground Background matching Home Screen */
.screen--speaking-test {
    background: linear-gradient(180deg, #B8E4F9 0%, #E0F7FA 48%, #FFF9C4 100%) !important;
    padding: max(1rem, calc(env(safe-area-inset-top, 0px) + 0.5rem))
             max(1.2rem, calc(env(safe-area-inset-right, 0px) + 0.5rem))
             max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 0.8rem))
             max(1.2rem, calc(env(safe-area-inset-left, 0px) + 0.5rem)) !important;
}

/* 1. Kid Hub Topbar (Big Visual Tabs + Speed Chips + Play All) */
.st-hub--kid {
    max-width: 1140px;
    margin: 0 auto;
    padding-top: 0.4rem;
}

.st-kid-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.5rem 0.4rem 0.5rem 58px;
    margin-bottom: 1.1rem;
}

.st-kid-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.92);
    padding: 6px;
    border-radius: 999px;
    border: 4px solid #FFFFFF;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    gap: 8px;
}

.st-kid-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 800;
    color: #475569;
    background: transparent;
    cursor: pointer;
    transition: all 0.22s var(--ease-bounce);
}

.st-kid-tab__icon {
    font-size: 1.55rem;
}

.st-kid-tab.active {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #FFFFFF;
    box-shadow: 0 5px 0 #D9480F, 0 8px 16px rgba(255, 107, 107, 0.35);
    transform: translateY(-2px);
}

.st-kid-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.st-kid-speed-pills {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #FFFFFF;
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.st-kid-speed-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce), background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-kid-speed-btn.active {
    background: #3B82F6;
    box-shadow: 0 3px 0 #1D4ED8;
    transform: scale(1.08);
}

.st-kid-playall-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: 4px solid #FFFFFF;
    border-radius: 999px;
    padding: 10px 26px;
    font-family: var(--font-main);
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 0 #047857, 0 12px 24px rgba(16, 185, 129, 0.32);
    transition: transform 0.18s var(--ease-bounce), box-shadow 0.18s ease;
}

.st-kid-playall-btn:hover {
    transform: translateY(-3px);
}

.st-kid-playall-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #047857;
}

/* 2. Giant Colorful Card Grid (Matching Screenshot 1's beloved .kid-unit-card) */
.st-kid-unit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    padding: 0.4rem 0.2rem 1.5rem;
}

.st-kid-unit-grid--drills {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .st-kid-unit-grid,
    .st-kid-unit-grid--drills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .st-kid-unit-grid,
    .st-kid-unit-grid--drills {
        grid-template-columns: 1fr;
    }
}

.st-kid-unit-grid .kid-unit-card {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 310px;
    max-height: none;
    background: #FFFFFF;
    padding: 1.15rem 1.2rem 1.35rem;
}

.st-kid-unit-grid .kid-unit-card__art {
    min-height: 145px;
    padding: 0.5rem 0;
}

.st-kid-unit-grid .kid-unit-card__hero-img {
    max-width: 165px;
    max-height: 150px;
}

.st-kid-unit-grid .kid-unit-card__title {
    font-size: 1.55rem;
}

/* 3. Lingokids 1-1 Stage View (Pure Visuals, Zero Adult Clutter) */
.st-stage--lingokids {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.st-stage__topbar--kid {
    padding-left: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.st-progress-stars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    border: 3px solid #FFFFFF;
    border-radius: 999px;
    padding: 6px 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.st-progress-star {
    font-size: 1.45rem;
    opacity: 0.25;
    transform: scale(0.88);
    transition: all 0.25s var(--ease-bounce);
}

.st-progress-star.done {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.45));
}

.st-progress-star.current {
    opacity: 1;
    transform: scale(1.22);
    filter: drop-shadow(0 3px 6px rgba(245, 158, 11, 0.65));
    animation: bounceFloat 1.5s infinite ease-in-out;
}

.st-split-workspace--kid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 1.15rem;
    align-items: stretch;
}

@media (max-width: 820px) {
    .st-split-workspace--kid {
        grid-template-columns: 1fr;
    }
}

.st-split-left--kid {
    background: #FFFFFF;
    border: 5px solid #60A5FA;
    box-shadow: 0 10px 0 #3B82F6, 0 16px 28px rgba(37, 99, 235, 0.14);
    border-radius: 32px;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.st-speech-bubble--kid {
    background: #EFF6FF;
    border: 3px solid #BFDBFE;
    border-radius: 22px;
    padding: 0.65rem 0.85rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
}

.st-speech-bubble--kid .st-speech-bubble__en {
    font-size: 1.28rem;
    font-weight: 900;
    color: #1E3A8A;
    margin: 0;
}

/* Giant Visual Stage Card on Right */
.st-desk-area--kid {
    background: #FFFFFF;
    border: 5px solid #FBBF24;
    box-shadow: 0 10px 0 #D97706, 0 16px 28px rgba(245, 158, 11, 0.14);
    border-radius: 34px;
    min-height: 255px;
    padding: 1.1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-prop-card--kid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    position: relative;
}

.st-faceboard-wrap {
    width: 100%;
    min-height: 195px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-prop-main-img--giant {
    width: 220px !important;
    height: 200px !important;
    max-width: 240px !important;
    max-height: 215px !important;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
    transition: transform 0.25s var(--ease-bounce);
}

.st-prop-card--kid:hover .st-prop-main-img--giant,
.st-prop-card--kid:active .st-prop-main-img--giant {
    transform: scale(1.07) rotate(-2deg);
}

.st-prop-sound-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FEF3C7;
    border: 3px solid #F59E0B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 0 #D97706;
}

.st-prop-badge--kid {
    font-size: 1.35rem;
    padding: 6px 22px;
    background: #DCFCE7;
    border: 3px solid #22C55E;
    color: #15803D;
    box-shadow: 0 4px 0 #16A34A;
}

.st-variant-chip--kid {
    font-size: 1.15rem;
    padding: 8px 18px;
    border-width: 3px;
    box-shadow: 0 4px 0 #60A5FA;
}

.st-wearing-option--kid {
    min-width: 120px;
    padding: 0.7rem 1rem !important;
    border-radius: 24px !important;
    border-width: 4px !important;
}

.st-wearing-option--kid img {
    width: 105px !important;
    height: 95px !important;
    object-fit: contain;
}

.st-choice-card--kid img {
    width: 120px !important;
    height: 115px !important;
    object-fit: contain;
}

.st-mystery-box-btn--kid {
    padding: 1.1rem 2rem;
    border-width: 4px;
    border-radius: 28px;
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
    box-shadow: 0 8px 0 #7C3AED;
}

/* 4. Live Word-by-Word Karaoke Bar ("Nghe đâu hiện chữ tới đó" + 6s Auto-Pass Bar) */
.st-live-speech-bar {
    position: relative;
    background: #FFFFFF;
    border: 4px solid #93C5FD;
    border-radius: 24px;
    padding: 0.65rem 1.1rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 62px;
    box-shadow: 0 6px 0 #60A5FA, 0 10px 20px rgba(37, 99, 235, 0.1);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.st-live-speech-bar.listening {
    border-color: #10B981;
    box-shadow: 0 6px 0 #059669, 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.st-live-speech-bar.has-words {
    background: #F0FDF4;
    border-color: #22C55E;
}

.st-wave-bars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    flex-shrink: 0;
}

.st-wave-bars span {
    display: block;
    width: 6px;
    height: 10px;
    border-radius: 999px;
    background: #94A3B8;
    transition: height 0.15s ease, background 0.15s ease;
}

.st-wave-bars.active span {
    background: #10B981;
    animation: stWaveBounce 0.65s infinite ease-in-out alternate;
}

.st-wave-bars.active span:nth-child(2) { animation-delay: 0.12s; }
.st-wave-bars.active span:nth-child(3) { animation-delay: 0.24s; }
.st-wave-bars.active span:nth-child(4) { animation-delay: 0.36s; }
.st-wave-bars.active span:nth-child(5) { animation-delay: 0.18s; }

@keyframes stWaveBounce {
    0% { height: 8px; }
    100% { height: 28px; }
}

.st-live-words {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
}

.st-live-placeholder {
    font-size: 1.35rem;
    font-weight: 800;
    color: #64748B;
    opacity: 0.75;
}

.st-live-word {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: 900;
    animation: popIn 0.22s var(--ease-bounce) both;
}

.st-live-word--spoken {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #FFFFFF;
    box-shadow: 0 3px 0 #15803D;
}

.st-live-word--model {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    box-shadow: 0 3px 0 #B45309;
}

.st-mic-timer-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(226, 232, 240, 0.8);
}

.st-mic-timer-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 70%, #EF4444 100%);
    transition: width 0.09s linear;
}

/* 5. Visual Feedback Pill & Giant 3D Toy Action Buttons */
.st-feedback-box--kid {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-kid-feedback-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 8px 22px;
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 900;
    animation: popIn 0.28s var(--ease-bounce) both;
}

.st-kid-feedback-pill--star {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 4px solid #F59E0B;
    color: #92400E;
    box-shadow: 0 5px 0 #D97706;
}

.st-kid-feedback-pill--guide {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    border: 4px solid #0284C7;
    color: #075985;
    box-shadow: 0 5px 0 #0369A1;
}

.st-kid-mini-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    background: #10B981;
    color: #FFFFFF;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #047857;
}

.st-controls--kid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding-top: 0.2rem;
}

.st-toy-btn {
    width: 78px;
    height: 78px;
    border-radius: 26px;
    border: 4px solid #FFFFFF;
    font-size: 2.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s var(--ease-bounce), box-shadow 0.18s ease;
}

.st-toy-btn--repeat {
    background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
    box-shadow: 0 8px 0 #0369A1, 0 12px 22px rgba(2, 132, 199, 0.3);
}

.st-toy-btn--next {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    box-shadow: 0 8px 0 #B45309, 0 12px 22px rgba(245, 158, 11, 0.3);
}

.st-toy-btn:hover {
    transform: translateY(-4px);
}

.st-toy-btn:active {
    transform: translateY(5px);
}

.st-mic-main-btn--kid {
    min-width: 210px;
    height: 84px;
    border-radius: 999px;
    border: 5px solid #FFFFFF;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 9px 0 #047857, 0 14px 28px rgba(16, 185, 129, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: 2.3rem;
    padding: 0 2rem;
}

.st-mic-main-btn--kid .st-mic-label {
    font-size: 2rem;
}

.st-mic-main-btn--kid.listening {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 9px 0 #991B1B, 0 0 0 8px rgba(239, 68, 68, 0.25);
    animation: pulseGlow 1.2s infinite ease-in-out;
}

.st-summary__card--kid {
    padding: 2.5rem 2rem;
    border-radius: 38px;
    border: 6px solid #F59E0B;
    box-shadow: 0 12px 0 #D97706, 0 24px 40px rgba(0, 0, 0, 0.15);
}

/* ================================================================
   V3.6: IPAD 6TH GEN (1024x768 LANDSCAPE & 768x1024 PORTRAIT)
   ZERO-OVERLAP, FULL-VIEWPORT CLASSROOM STAGE & CHUNKY PILL TOOLS
   ================================================================ */

#speakingTestScreen.screen--speaking-test {
    padding: 0 !important;
    overflow: hidden !important;
}

#speakingTestScreen #speakingTestBack.nav-back-btn {
    top: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
    left: max(12px, calc(env(safe-area-inset-left, 0px) + 6px));
    width: 48px;
    height: 48px;
    z-index: 30;
}

#speakingTestScreen .st-screen-body {
    width: 100%;
    height: 100%;
    padding: max(0.5rem, calc(env(safe-area-inset-top, 0px) + 0.35rem))
             max(0.85rem, calc(env(safe-area-inset-right, 0px) + 0.5rem))
             max(0.6rem, calc(env(safe-area-inset-bottom, 0px) + 0.45rem))
             max(0.85rem, calc(env(safe-area-inset-left, 0px) + 0.5rem)) !important;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Topbar Action Pills (Speed 0.85x/1.0x, Model Audio, Family Photo) */
.st-kid-actions,
.st-topbar-kid-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.st-kid-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #FFFFFF;
    color: #1E3A8A;
    border: 3px solid #60A5FA;
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--font-main);
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 #3B82F6, 0 6px 12px rgba(37, 99, 235, 0.14);
    transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s ease;
    white-space: nowrap;
}

.st-kid-pill-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #3B82F6;
}

.st-kid-pill-btn.has-photo {
    background: #ECFDF5;
    border-color: #10B981;
    color: #065F46;
    box-shadow: 0 4px 0 #059669;
}

/* Hub Topbar: Never collide with #speakingTestBack on 1024px or 768px */
.st-kid-topbar {
    padding: 0.25rem 0.25rem 0.25rem 60px !important;
    margin-bottom: 0.75rem !important;
    min-height: 52px;
    gap: 0.6rem !important;
}

.st-kid-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    padding: 4px !important;
    gap: 5px !important;
    border-width: 3px !important;
}

.st-kid-tab {
    padding: 7px 15px !important;
    font-size: 1.05rem !important;
    gap: 6px !important;
    white-space: nowrap;
}

.st-kid-tab__icon {
    font-size: 1.28rem !important;
}

/* Collapse empty feedback box so it NEVER wastes vertical height or pushes Next button */
#stFeedbackBox:empty {
    display: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.st-feedback-box.st-feedback-box--kid {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* Session Stage: Fit 100% cleanly inside iPad 6th Gen viewport without overlap or clipping */
.st-stage--lingokids {
    max-width: 1040px;
    width: 100%;
    min-height: calc(100dvh - 1.2rem);
    max-height: calc(100dvh - 1.1rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.45rem !important;
    box-sizing: border-box;
}

.st-stage__topbar--kid {
    padding-left: 60px !important;
    min-height: 46px;
    flex-shrink: 0;
    gap: 0.5rem !important;
}

.st-progress-stars {
    padding: 4px 14px !important;
    gap: 5px !important;
    flex-wrap: wrap;
}

.st-progress-star {
    font-size: 1.22rem !important;
}

.st-split-workspace--kid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 440px;
    display: grid;
    grid-template-columns: 265px 1fr !important;
    gap: 0.85rem !important;
    align-items: stretch;
}

@media (min-height: 790px) {
    .st-stage--lingokids {
        justify-content: center;
        gap: 0.9rem !important;
    }
    .st-split-workspace--kid {
        flex: 0 1 420px;
        max-height: 420px;
    }
}

.st-split-left--kid {
    padding: 0.65rem 0.75rem !important;
    border-radius: 26px !important;
    border-width: 4px !important;
    box-shadow: 0 6px 0 #3B82F6, 0 10px 20px rgba(37, 99, 235, 0.12) !important;
    gap: 0.5rem !important;
    justify-content: center;
    min-height: 0;
}

.st-teacher-video-card--kid {
    width: 100%;
    max-width: 225px;
    max-height: 225px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    flex-shrink: 1;
}

.st-speech-bubble--kid {
    padding: 0.45rem 0.65rem !important;
    min-height: 48px !important;
    border-radius: 18px !important;
    flex: 0 0 auto;
}

.st-speech-bubble--kid .st-speech-bubble__en {
    font-size: 1.12rem !important;
    line-height: 1.22 !important;
}

.st-split-right--kid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem !important;
    min-height: 0;
    min-width: 0;
}

.st-desk-area--kid {
    flex: 1 1 auto;
    min-height: 185px !important;
    max-height: 300px;
    padding: 0.65rem 0.9rem !important;
    border-radius: 26px !important;
    border-width: 4px !important;
    box-shadow: 0 6px 0 #D97706, 0 10px 20px rgba(245, 158, 11, 0.12) !important;
    overflow: hidden;
}

.st-prop-card--kid {
    gap: 0.4rem !important;
}

.st-faceboard-wrap {
    min-height: 145px !important;
}

.st-prop-main-img--giant {
    width: 175px !important;
    height: 150px !important;
    max-width: 190px !important;
    max-height: 160px !important;
}

.st-prop-card--kid:has(.st-variants-bar) .st-prop-main-img--giant {
    width: 135px !important;
    height: 118px !important;
    max-height: 120px !important;
}

.st-prop-badge--kid {
    font-size: 1.15rem !important;
    padding: 4px 16px !important;
    box-shadow: 0 3px 0 #16A34A !important;
}

/* Compact Static Counting Grid so 5-8 items + badge never overflow */
.st-static-count-grid {
    gap: 0.45rem !important;
    padding: 0.35rem 0.5rem !important;
    max-width: 480px;
}

.st-static-count-item {
    width: 72px !important;
    height: 72px !important;
    padding: 6px !important;
    border-radius: 14px !important;
}

.st-static-count-grid--6 .st-static-count-item,
.st-static-count-grid--7 .st-static-count-item,
.st-static-count-grid--8 .st-static-count-item {
    width: 64px !important;
    height: 64px !important;
}

.st-variants-bar {
    margin-top: 0.15rem !important;
    padding-top: 0.35rem !important;
    gap: 0.3rem !important;
}

.st-variant-chip--kid {
    font-size: 0.98rem !important;
    padding: 4px 13px !important;
}

.st-wearing-option--kid {
    min-width: 100px !important;
    padding: 0.45rem 0.7rem !important;
}

.st-wearing-option--kid img {
    width: 82px !important;
    height: 76px !important;
}

.st-choice-card--kid img {
    width: 92px !important;
    height: 86px !important;
}

/* Live Karaoke Bar & Feedback Pill */
.st-live-speech-bar {
    padding: 0.45rem 0.9rem 0.65rem !important;
    min-height: 50px !important;
    border-radius: 20px !important;
    border-width: 3px !important;
    box-shadow: 0 4px 0 #60A5FA, 0 6px 14px rgba(37, 99, 235, 0.08) !important;
    flex-shrink: 0;
}

.st-live-words {
    min-height: 30px !important;
    gap: 0.35rem !important;
}

.st-live-word {
    padding: 3px 11px !important;
    font-size: 1.12rem !important;
}

.st-kid-feedback-pill {
    padding: 5px 16px !important;
    font-size: 1.12rem !important;
    border-width: 3px !important;
}

/* Bottom 3D Controls Dock (Always 100% visible, never overlapped) */
.st-controls--kid {
    flex-shrink: 0;
    gap: 1.1rem !important;
    padding: 0.15rem 0 0.45rem !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 5;
}

.st-toy-btn {
    width: 66px !important;
    height: 66px !important;
    border-radius: 22px !important;
    font-size: 1.85rem !important;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22), 0 10px 18px rgba(0, 0, 0, 0.14) !important;
}

.st-mic-main-btn--kid {
    min-width: 185px !important;
    height: 70px !important;
    font-size: 1.95rem !important;
    padding: 0 1.6rem !important;
    box-shadow: 0 7px 0 #047857, 0 12px 22px rgba(16, 185, 129, 0.28) !important;
}

.st-mic-main-btn--kid .st-mic-label {
    font-size: 1.7rem !important;
}

/* iPad Portrait (768x1024 / 768x954) Optimization */
@media (max-width: 860px) and (min-width: 680px) {
    .st-kid-topbar {
        padding-left: 56px !important;
        gap: 0.4rem !important;
    }
    .st-kid-tabs {
        flex-wrap: nowrap !important;
        gap: 3px !important;
        padding: 3px !important;
    }
    .st-kid-tab {
        padding: 6px 9px !important;
        font-size: 0.86rem !important;
        gap: 4px !important;
    }
    .st-kid-tab__icon {
        font-size: 1.08rem !important;
    }
    .st-kid-pill-btn {
        padding: 5px 10px !important;
        font-size: 0.86rem !important;
    }
    .st-split-workspace--kid {
        grid-template-columns: 230px 1fr !important;
        gap: 0.75rem !important;
        max-height: 410px !important;
    }
    .st-teacher-video-card--kid {
        max-width: 195px;
        max-height: 195px;
    }
    .st-desk-area--kid {
        max-height: 310px;
    }
}

/* Compact Mobile / Narrow Split View (< 680px) */
@media (max-width: 679px) {
    .st-stage--lingokids {
        max-height: none;
    }
    .st-split-workspace--kid {
        grid-template-columns: 1fr !important;
    }
    .st-split-left--kid {
        flex-direction: row !important;
        align-items: center !important;
    }
    .st-teacher-video-card--kid {
        width: 110px !important;
        height: 110px !important;
        max-width: 110px !important;
        max-height: 110px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    .st-speech-bubble--kid {
        flex: 1 !important;
    }
}

/* ============================================================
   NETLIFY BADGE / HUD BLOCKER & TODDLER EXPLORATION SHIELD (v4.2)
   ============================================================ */
#nl-hud-frame,
#nl-badge-frame,
iframe[id^="nl-"],
script[data-nf-variant] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: fixed !important;
    left: -9999px !important;
}

.screen--speaking-test,
.screen--speaking-test * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

@keyframes toddlerExplorePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.07) rotate(-2deg); }
    75% { transform: scale(0.97) rotate(1.5deg); }
    100% { transform: scale(1); }
}

.st-toddler-bounce {
    animation: toddlerExplorePop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.st-toy-btn--next.is-cooldown {
    opacity: 0.55;
    filter: saturate(0.6);
}

.st-double-tap-hint {
    position: fixed;
    top: 14px;
    left: 74px;
    z-index: 9999;
    background: rgba(30, 41, 59, 0.92);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    border: 2px solid #FDE047;
    pointer-events: none;
    animation: toddlerExplorePop 0.3s ease-out;
}

/* ============================================================
   GIANT FRIENDLY NAVIGATION ARROWS & KID VIDEO CONTROLS (v4.3)
   ============================================================ */
.st-progress-star[data-star-idx] {
    cursor: pointer;
}

.st-toy-btn--prev {
    background: linear-gradient(180deg, #60A5FA 0%, #3B82F6 100%) !important;
    border: 4px solid #FFFFFF !important;
    box-shadow: 0 6px 0 #1D4ED8, 0 10px 18px rgba(37, 99, 235, 0.28) !important;
    color: #FFFFFF !important;
}

.st-toy-btn--prev.is-disabled {
    opacity: 0.38;
    filter: grayscale(0.4);
}

.st-arrow-next-giant {
    width: auto !important;
    min-width: 156px !important;
    padding: 0 22px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%) !important;
    border: 4px solid #FFFFFF !important;
    box-shadow: 0 7px 0 #15803D, 0 12px 24px rgba(22, 163, 74, 0.38) !important;
    color: #FFFFFF !important;
    font-family: inherit;
    cursor: pointer;
}

.st-arrow-next-label {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.st-arrow-next-icon {
    font-size: 1.7rem;
    line-height: 1;
}

@keyframes nextCardReadyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 7px 0 #15803D, 0 0 0 0 rgba(250, 204, 21, 0.85);
    }
    50% {
        transform: scale(1.08) translateY(-3px);
        box-shadow: 0 10px 0 #15803D, 0 0 0 12px rgba(250, 204, 21, 0);
    }
}

.st-arrow-next-giant.is-disabled {
    opacity: 0.36 !important;
    filter: grayscale(0.88) !important;
    background: linear-gradient(180deg, #94A3B8 0%, #64748B 100%) !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 4px 0 #475569 !important;
    cursor: not-allowed !important;
    transform: none !important;
    animation: none !important;
}

.st-progress-star.locked {
    opacity: 0.4;
    filter: grayscale(0.85);
    cursor: not-allowed;
}

.st-kid-card--newest {
    box-shadow: 0 10px 0 var(--card-border), 0 0 0 3px #FDE047, 0 14px 28px rgba(0, 0, 0, 0.14);
}

.st-arrow-next-giant.is-ready-next,
.video-kid-btn--next.is-ready-next {
    background: linear-gradient(180deg, #FACC15 0%, #16A34A 100%) !important;
    border-color: #FEF08A !important;
    animation: nextCardReadyPulse 1.15s infinite ease-in-out;
}

/* Kid-Friendly Video Control Bar (#videoKidControls) */
.video__kid-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
    width: 100%;
    max-width: 780px;
}

.video-kid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 54px;
    padding: 0 20px;
    border-radius: 999px;
    border: 3px solid #FFFFFF;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.video-kid-btn:active {
    transform: translateY(3px) scale(0.97);
}

.video-kid-btn--rewind {
    background: linear-gradient(180deg, #60A5FA 0%, #2563EB 100%);
    box-shadow: 0 5px 0 #1D4ED8;
}

.video-kid-btn--pause {
    min-width: 200px;
    background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 5px 0 #B45309;
}

.video-kid-btn--pause.is-paused {
    background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
    box-shadow: 0 5px 0 #15803D;
}

.video-kid-btn--next {
    min-width: 165px;
    background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
    box-shadow: 0 5px 0 #15803D;
}

/* =========================================================================
   V5.0: TODDLER SCIENCE EDITION (3-YEAR-OLD DIRECT USER FIRST + CO-VIEWING PARENT TRACKER)
   - Giant Illustration Magnified (~260x235px)
   - Subtle Left-Column Parent Co-Pilot Box (#stSpeechBubble.st-parent-tracker)
   - Receptive 2-Choice Warmup Stage & 9s Smooth Escape Hatch Glow
   - Bottom Bezel Palm-Rest Safe Margin on iPad 6th Gen (Zero Overlap)
   ========================================================================= */

.st-kid-pill-btn--daily {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%) !important;
    border-color: #F59E0B !important;
    color: #9A3412 !important;
    box-shadow: 0 4px 0 #D97706, 0 6px 12px rgba(245, 158, 11, 0.2) !important;
}

/* Maximize Workspace Height Safely on iPad 6th Gen (668px Safari & 768px Fullscreen) */
.st-split-workspace--kid {
    max-height: 490px !important;
    grid-template-columns: 278px 1fr !important;
    gap: 0.9rem !important;
}

.st-split-left--kid {
    padding: 0.55rem 0.65rem !important;
    gap: 0.5rem !important;
    justify-content: flex-start !important;
    overflow: hidden;
}

.st-teacher-video-card--kid {
    max-width: 192px !important;
    max-height: 192px !important;
    flex-shrink: 0 !important;
}

@media (min-height: 740px) {
    .st-split-workspace--kid {
        max-height: 530px !important;
    }
    .st-teacher-video-card--kid {
        max-width: 210px !important;
        max-height: 210px !important;
    }
}

/* Compact, Calm Co-Viewing Parent Tracker beneath Teacher Mia */
.st-parent-tracker.st-speech-bubble--kid {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    text-align: left !important;
    background: #F8FAFC !important;
    border: 2px solid #CBD5E1 !important;
    border-radius: 16px !important;
    padding: 0.5rem 0.65rem !important;
    gap: 4px !important;
    min-height: 0 !important;
    box-shadow: inset 0 1px 0 #FFFFFF;
}

.st-parent-tracker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 1px;
}

.st-parent-tracker__badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
    background: #E2E8F0;
    padding: 1px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.st-parent-tracker__step {
    font-size: 0.74rem;
    font-weight: 800;
    color: #64748B;
}

.st-parent-tracker__ask {
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    color: #1E3A8A !important;
    line-height: 1.26 !important;
}

.st-parent-tracker__target {
    font-size: 0.84rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.24;
}

.st-parent-tracker__note {
    font-size: 0.77rem;
    font-weight: 700;
    color: #334155;
    background: #EFF6FF;
    border-radius: 9px;
    padding: 4px 8px;
    line-height: 1.32;
}

/* Magnified Educational Illustration Stage for 3-Year-Old Direct User */
.st-desk-area--kid {
    min-height: 265px !important;
    max-height: 425px !important;
    padding: 0.65rem 0.85rem !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.st-prop-main-img--giant {
    width: 300px !important;
    height: 265px !important;
    max-width: 325px !important;
    max-height: 275px !important;
}

.st-prop-card--kid:has(.st-variants-bar) .st-prop-main-img--giant {
    width: 235px !important;
    height: 205px !important;
    max-height: 210px !important;
}

@media (min-height: 740px) {
    .st-prop-main-img--giant {
        width: 330px !important;
        height: 292px !important;
        max-width: 350px !important;
        max-height: 305px !important;
    }
    .st-prop-card--kid:has(.st-variants-bar) .st-prop-main-img--giant {
        width: 255px !important;
        height: 222px !important;
        max-height: 228px !important;
    }
}

/* 9-Second Smooth Escape Hatch Visual Glow & Bouncing Cue */
.st-desk-area--kid.is-escape-ready {
    border-color: #22C55E !important;
    box-shadow: 0 7px 0 #15803D, 0 0 0 6px rgba(34, 197, 94, 0.24) !important;
}

.st-escape-tap-cue {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 6;
    background: linear-gradient(135deg, #FEF08A 0%, #FACC15 100%);
    color: #713F12;
    border: 3px solid #FFFFFF;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.95rem;
    font-weight: 900;
    box-shadow: 0 4px 0 #CA8A04, 0 6px 14px rgba(0, 0, 0, 0.16);
    pointer-events: none;
    animation: nextCardReadyPulse 1.1s infinite ease-in-out;
}

/* Receptive Warm-up 2-Card Giant Touch Stage */
.st-warmup-choices-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    width: 100%;
    height: 100%;
}

.st-warmup-choice-btn {
    flex: 0 1 255px;
    min-height: 235px;
    background: #FFFFFF;
    border: 5px solid #93C5FD;
    border-radius: 28px;
    padding: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 0 #3B82F6, 0 12px 22px rgba(37, 99, 235, 0.14);
    transition: transform 0.18s var(--ease-bounce), border-color 0.2s ease, background 0.2s ease;
}

.st-warmup-choice-btn:active {
    transform: translateY(4px) scale(0.97);
}

.st-warmup-choice-btn.is-correct {
    background: #F0FDF4;
    border-color: #22C55E;
    box-shadow: 0 8px 0 #15803D, 0 0 0 6px rgba(34, 197, 94, 0.28);
}

.st-warmup-choice-btn.is-wrong {
    border-color: #F59E0B;
    animation: wobbleWrong 0.45s ease;
}

.st-warmup-choice-img {
    width: 195px !important;
    height: 195px !important;
    object-fit: contain;
    pointer-events: none;
}

/* Slim, Non-Overflowing Soundwave Bar Directly Under Stage */
.st-live-speech-bar {
    min-height: 44px !important;
    max-height: 52px !important;
    padding: 0.35rem 0.85rem 0.5rem !important;
}

.st-live-words {
    min-height: 26px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
}

.st-live-word {
    padding: 2px 9px !important;
    font-size: 1.02rem !important;
    white-space: nowrap;
}

/* Bottom Bezel Wrist-Rest Safe Cushion for 3-Year-Olds */
.st-controls--kid {
    padding: 0.15rem 0 max(0.65rem, env(safe-area-inset-bottom, 0.5rem)) !important;
}

/* High-Five 5-Card Milestone Toast & Summary Sticker / Co-Play Mission */
.st-highfive-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: linear-gradient(135deg, #FEF08A 0%, #F59E0B 100%);
    color: #78350F;
    border: 4px solid #FFFFFF;
    border-radius: 999px;
    padding: 10px 26px;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    pointer-events: none;
    animation: popIn 0.3s var(--ease-bounce) both;
}

.st-summary__sticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FEF3C7;
    border: 3px solid #F59E0B;
    color: #92400E;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 0 #D97706;
}

.st-summary__mission {
    background: #EFF6FF;
    border: 2px dashed #60A5FA;
    color: #1E3A8A;
    border-radius: 20px;
    padding: 0.85rem 1.15rem;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0.4rem auto 1rem;
    max-width: 520px;
}

/* iPad Portrait (768x1024 / 768x954) Fine-Tuning for Magnified Stage & Parent Tracker */
@media (max-width: 860px) and (min-width: 680px) {
    .st-split-workspace--kid {
        grid-template-columns: 236px 1fr !important;
        max-height: 500px !important;
    }
    .st-teacher-video-card--kid {
        max-width: 176px !important;
        max-height: 176px !important;
    }
    .st-prop-main-img--giant {
        width: 245px !important;
        height: 220px !important;
    }
    .st-warmup-choice-btn {
        flex: 0 1 195px;
        min-height: 190px;
    }
    .st-warmup-choice-img {
        width: 145px !important;
        height: 145px !important;
    }
}

@media (max-width: 679px) {
    .st-split-workspace--kid {
        grid-template-columns: 1fr !important;
        max-height: none !important;
    }
    .st-warmup-choice-img {
        width: 120px !important;
        height: 120px !important;
    }
}





