/* Main Website Styles for MomSoftHand */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --border-color: #e0e0e0;
    /* App typography: one sans-serif family, two sizes (heading / body) */
    --font-app: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --fs-body: 1rem;
    --fs-heading: 1.625rem;
}

html {
    font-family: var(--font-app);
}

body {
    font-family: var(--font-app);
    font-size: var(--fs-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-size: var(--fs-heading);
    font-weight: bold;
    color: var(--white);
    margin: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav .nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 0;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    opacity: 0.9;
    border-bottom: 2px solid var(--white);
}

.header-auth-slot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.header-auth-btn {
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: #ffffff;
    color: #4338ca;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
}

.header-auth-btn--soft {
    background: #eef2ff;
}

.header-auth-cluster {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.header-auth-btn--membership {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.header-auth-btn--membership:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-membership {
    position: relative;
}

.header-membership-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: min(92vw, 320px);
    padding: 0.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    border: 1px solid #e2e8f0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.membership-option {
    display: block;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.membership-option--parents {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}

.membership-option--schools {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.membership-option:hover {
    filter: brightness(0.98);
}

.membership-option-title {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.membership-option-desc {
    display: block;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

/* --- Membership landing (IXL-inspired layout, MomSoftHand brand) --- */
html.mship-root {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html.mship-root {
        scroll-behavior: auto;
    }
}

.page-membership {
    background: var(--bg-light);
}

.page-membership .mship-main {
    min-height: 60vh;
}

.mship-hero {
    background: linear-gradient(
        125deg,
        var(--primary-color) 0%,
        #0d9488 38%,
        #14b8a6 62%,
        #06b6d4 100%
    );
    color: #fff;
    padding: 2.25rem 0 2.75rem;
    text-align: center;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.mship-hero-inner {
    max-width: 760px;
}

.mship-hero-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.92;
    margin-bottom: 0.5rem;
}

.mship-hero-title {
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
}

.mship-hero-sub {
    font-size: 1.05rem;
    line-height: 1.65;
    opacity: 0.96;
    margin: 0 0 1rem;
}

.mship-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mship-hero-tags span {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.mship-cards-section {
    padding: 2rem 0 1rem;
    margin-top: -1.25rem;
}

.mship-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .mship-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: stretch;
    }
}

.mship-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.35rem 1.35rem;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.mship-card--parents {
    border-top: 4px solid #10b981;
}

.mship-card--schools {
    border-top: 4px solid #3b82f6;
}

.mship-card-illu {
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.mship-card-illu svg {
    width: 140px;
    height: auto;
}

.mship-card-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.mship-card--parents .mship-card-title {
    color: #047857;
}

.mship-card--schools .mship-card-title {
    color: #1d4ed8;
}

.mship-card-lead {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
}

.mship-card-bullets {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mship-card-bullets li {
    margin-bottom: 0.35rem;
}

.mship-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.mship-card-actions--triple {
    flex-direction: column;
    align-items: stretch;
}

@media (min-width: 480px) {
    .mship-card-actions--triple {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mship-card-actions--triple .mship-btn {
        flex: 1 1 auto;
        min-width: 6.5rem;
    }
}

.mship-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity 0.15s, transform 0.15s;
}

.mship-btn:disabled,
.mship-btn[aria-disabled='true'] {
    cursor: not-allowed;
    opacity: 0.85;
}

.mship-btn--primary.mship-btn--parents {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: #047857;
}

.mship-btn--primary.mship-btn--schools {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: #1d4ed8;
}

.mship-btn--secondary.mship-btn--parents {
    background: #ecfdf5;
    color: #047857;
    border-color: #10b981;
}

.mship-btn--secondary.mship-btn--schools {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #3b82f6;
}

.mship-btn--ghost.mship-btn--parents-outline {
    background: #fff;
    color: #047857;
    border-color: #10b981;
}

.mship-btn--ghost.mship-btn--schools-outline {
    background: #fff;
    color: #1d4ed8;
    border-color: #3b82f6;
}

.mship-btn--ghost:hover:not(:disabled) {
    filter: brightness(0.97);
}

.mship-btn--ask {
    display: inline-flex;
    margin-top: 0.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
    text-decoration: none;
}

.mship-btn--ask:hover {
    filter: brightness(1.05);
}

.mship-ask-wrap {
    margin-top: 1rem;
}

.mship-card-note {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.75rem 0 0;
    line-height: 1.45;
}

/* Membership: single offering + monthly vs yearly billing */
.mship-simple-plan-section {
    padding: 2rem 0 2.25rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.mship-simple-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin: 0 0 0.75rem;
}

.mship-simple-lead {
    text-align: center;
    color: #475569;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.mship-billing-choice {
    max-width: 520px;
    margin: 0 auto 1rem;
}

.mship-billing-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: #334155;
    text-align: center;
    margin: 0 0 0.75rem;
}

.mship-billing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .mship-billing-options {
        grid-template-columns: 1fr;
    }
}

.mship-billing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mship-billing-card:hover {
    border-color: #cbd5e1;
}

.mship-billing-card:focus-within {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

.mship-billing-card:has(input:checked) {
    border-color: #14b8a6;
    background: #ecfdf5;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.15);
}

.mship-billing-card input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mship-billing-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
}

.mship-billing-hint {
    font-size: 0.82rem;
    color: #64748b;
}

.mship-simple-footnote {
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 auto;
    max-width: 560px;
    line-height: 1.45;
}

/* FAQ: bottom prompt to contact page */
.faq-contact-strip {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.faq-contact-strip-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.faq-contact-strip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-decoration: none;
    transition: filter 0.15s ease;
}

.faq-contact-strip-link:hover {
    filter: brightness(1.06);
}

/* Membership package comparison (shared parents + schools) */
.mship-packages-section {
    padding: 2rem 0 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.mship-packages-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin: 0 0 0.5rem;
}

.mship-packages-intro {
    text-align: center;
    color: #475569;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    line-height: 1.55;
    font-size: 0.95rem;
}

.mship-plan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mship-plan-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: #334155;
}

.mship-plan-toggle {
    display: inline-flex;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    background: #fff;
}

.mship-plan-pill {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.mship-plan-pill--active {
    background: #14b8a6;
    color: #fff;
}

.mship-plan-save {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ca8a04;
}

.mship-packages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 960px) {
    .mship-packages-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch;
    }
}

.mship-pkg {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 1.35rem 1.15rem 1.15rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
}

.mship-pkg--all {
    border-color: #a5b4fc;
}

.mship-pkg--combo {
    border-color: #5eead4;
}

.mship-pkg--single {
    border-color: #86efac;
}

.mship-pkg-ribbon {
    position: absolute;
    top: 12px;
    right: -6px;
    background: #fbbf24;
    color: #78350f;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.mship-pkg-head {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.75rem;
}

.mship-pkg--all .mship-pkg-head {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -1.35rem -1.15rem 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
}

.mship-pkg--all .mship-pkg-title,
.mship-pkg--all .mship-pkg-tagline {
    color: #fff;
}

.mship-pkg--combo .mship-pkg-head {
    background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
    margin: -1.35rem -1.15rem 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
}

.mship-pkg--combo .mship-pkg-title,
.mship-pkg--combo .mship-pkg-tagline {
    color: #fff;
}

.mship-pkg--single .mship-pkg-head {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    margin: -1.35rem -1.15rem 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
}

.mship-pkg--single .mship-pkg-title,
.mship-pkg--single .mship-pkg-tagline {
    color: #fff;
}

.mship-pkg-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.mship-pkg-tagline {
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.45;
    color: #475569;
}

.mship-pkg-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
}

.mship-pkg-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mship-pkg-list li:last-child {
    border-bottom: none;
}

.mship-pkg-fake-radio {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #16a34a;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.mship-pkg-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.mship-pkg-price-note {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.mship-pkg-soon {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
}

.mship-pkg-select {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: not-allowed;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #64748b;
}

.mship-pkg-select--filled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #5b21b6;
    opacity: 0.9;
}

.mship-payment-banner {
    margin: 1.5rem 0 0;
    padding: 1rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.mship-payment-inner {
    text-align: center;
    font-size: 0.95rem;
    color: #334155;
    max-width: 720px;
}

.mship-payment-inner strong {
    color: #0f172a;
}

.mship-badge-soon {
    display: inline-block;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.mship-detail-section {
    padding: 2rem 0;
}

.mship-detail-section--alt {
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.mship-detail-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.mship-detail-section p {
    max-width: 720px;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 1rem;
}

.auth-page {
    min-height: calc(100vh - 84px);
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.auth-card {
    width: min(94vw, 460px);
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.15rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
}

.auth-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.7rem;
}

.auth-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
    color: #334155;
}

.auth-form input {
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.55rem 0.6rem;
    font-size: 1rem;
}

.auth-links {
    margin: 0.55rem 0 0;
}

.auth-message {
    min-height: 1.2rem;
    margin: 0;
    color: #4338ca;
    font-weight: 700;
}

.generic-page-shell {
    min-height: calc(100vh - 84px);
    background:
        radial-gradient(circle at 12% 20%, rgba(250, 204, 21, 0.17) 0%, rgba(250, 204, 21, 0) 45%),
        radial-gradient(circle at 88% 22%, rgba(96, 165, 250, 0.15) 0%, rgba(96, 165, 250, 0) 42%),
        linear-gradient(160deg, #f8fbff 0%, #fff7ed 56%, #f0f9ff 100%);
    padding: 1.15rem 0 2rem;
}

.generic-page-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

.generic-page-hero {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 2px solid #dbeafe;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.generic-page-hero h2 {
    margin: 0;
    color: #4338ca;
}

.generic-page-hero p {
    margin: 0.45rem 0 0;
    color: #334155;
}

/* Login / auth split: form + story panel */
.auth-page-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: 1.25rem;
    align-items: stretch;
    margin-top: 0.25rem;
}

.auth-card--in-split {
    width: 100%;
    max-width: none;
}

.mission-vision-card {
    background: linear-gradient(155deg, #ffffff 0%, #f5f3ff 42%, #eff6ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: 16px;
    padding: 1.15rem 1.1rem 1.2rem;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mission-vision-kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7c3aed;
}

.mission-vision-title {
    margin: 0;
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    line-height: 1.35;
    color: #1e1b4b;
}

.mission-vision-block h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: #4338ca;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mission-vision-block p {
    margin: 0;
    line-height: 1.6;
    color: #334155;
    font-size: 0.95rem;
}

.mission-vision-quote {
    margin: 0;
    padding: 0.55rem 0 0.15rem 0.85rem;
    border-left: 4px solid #818cf8;
    font-style: italic;
    line-height: 1.6;
    color: #1e293b;
    font-size: 0.95rem;
}

.mission-vision-block--impact {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(244, 114, 182, 0.55);
    border-radius: 12px;
    padding: 0.7rem 0.75rem;
}

.mission-vision-note {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #db2777;
    white-space: nowrap;
}

.mission-vision-impact-text {
    margin: 0.4rem 0 0;
    line-height: 1.6;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
}

.mission-vision-bullets {
    margin: 0.15rem 0 0;
    padding: 0.65rem 0.75rem;
    list-style: none;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(99, 102, 241, 0.45);
    border-radius: 12px;
    display: grid;
    gap: 0.4rem;
}

.mission-vision-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #1e293b;
    font-weight: 600;
}

.mission-vision-bullets li span {
    flex-shrink: 0;
    line-height: 1.2;
}

@media (max-width: 900px) {
    .auth-page-split {
        grid-template-columns: 1fr;
    }
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.dashboard-page {
    max-width: 1120px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    display: grid;
    gap: 0.9rem;
}

.dashboard-panel {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.9rem;
}

.dashboard-muted {
    color: #6b7280;
}

.dashboard-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.dashboard-stat-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem;
    background: #f8fafc;
}

.dashboard-stat-card h3 {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
}

.dashboard-stat-card p {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    color: #312e81;
}

.dashboard-inline-panel {
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    padding: 0.65rem;
}

.drawing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.drawing-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.45rem;
    text-align: center;
    background: #f8fafc;
}

.drawing-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.drawing-card h4 {
    margin: 0.45rem 0 0.2rem;
    font-size: 0.9rem;
}

/* Right-side activity tracker: score + timer */
/* ── Activity sidebar — ALL cards live in the LEFT column ───────────────────
   How-to-play sits at the top; score/time/today stack below it.
   When the sidebar is visible (body.msh-sidebar-active), the main content
   shifts right so it fills the freed space all the way to the right edge. */

/* Sidebar width token — change one value to resize both columns */
:root {
    --msh-sidebar-w: 215px;
    --msh-sidebar-gap: 1rem;
}

/* ── Left-side helper panel ──────────────────────────────────────────────── */
.activity-howto-widget {
    position: fixed;
    left: 0.75rem;
    top: 5.5rem;           /* below the page header */
    transform: none;
    z-index: 1090;
    width: var(--msh-sidebar-w);
    background: #ffffff;
    border: 2px solid #dbeafe;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    pointer-events: none;
}

.activity-howto-widget--hidden {
    display: none;
}

.activity-howto-widget__title {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.96rem;
    font-weight: 900;
    text-align: center;
    padding: 0.55rem 0.4rem;
}

.activity-howto-widget__step {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f2937;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #eef2ff;
}

.activity-howto-widget__step:last-child {
    border-bottom: none;
}

.activity-howto-widget__emoji {
    flex: 0 0 auto;
    font-size: 1.08rem;
}

/* ── Score / timer / today panel — moved to LEFT column ─────────────────── */
.activity-progress-widget {
    position: fixed;
    left: 0.75rem;
    right: auto;
    top: auto;
    bottom: 1rem;
    transform: none;
    z-index: 1100;
    width: var(--msh-sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none;
}

.activity-progress-widget--hidden {
    display: none;
}

.activity-progress-widget__card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    text-align: center;
    overflow: hidden;
}

.activity-progress-widget__label {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.15;
    padding: 0.55rem 0.45rem;
}

.activity-progress-widget__value {
    color: #374151;
    font-weight: 900;
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    line-height: 1.05;
    padding: 0.45rem 0.35rem 0.3rem;
}

.activity-progress-widget__sub {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 0.35rem 0.45rem;
}

.activity-progress-widget__card:nth-child(2) .activity-progress-widget__label {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.activity-progress-widget__card--today .activity-progress-widget__label {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

/* ── Content expansion when sidebar is active ────────────────────────────── */
/* All activity pages use body.msh-sidebar-active to shift content right     */
body.msh-sidebar-active main {
    padding-left: calc(var(--msh-sidebar-w) + var(--msh-sidebar-gap) + 0.5rem);
}

/* Remove centred max-width caps so content fills the expanded area */
body.msh-sidebar-active .msh-activity-shell {
    max-width: none;
    margin-left: 0;
    margin-right: 1rem;
}

body.msh-sidebar-active .container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 1.25rem;
}

/* The english-skills card — remove any remaining auto-centering max-width */
body.msh-sidebar-active .english-skills-container,
body.msh-sidebar-active #skill-content.english-skills-container {
    max-width: none;
    margin-left: 0;
    margin-right: 1rem;
    width: calc(100% - 1rem);
    box-sizing: border-box;
}

/* ── Responsive: tablet (≤980px) ─────────────────────────────────────────── */
@media (max-width: 980px) {
    :root {
        --msh-sidebar-w: 175px;
        --msh-sidebar-gap: 0.75rem;
    }

    .activity-howto-widget__title {
        font-size: 0.83rem;
    }

    .activity-howto-widget__step {
        font-size: 0.78rem;
        padding: 0.42rem 0.45rem;
    }

    .activity-progress-widget__label {
        font-size: 0.88rem;
    }

    .activity-progress-widget__sub {
        font-size: 0.78rem;
    }
}

/* ── Responsive: mobile (≤768px) — sidebar collapses to bottom bar ───────── */
@media (max-width: 768px) {
    .activity-howto-widget {
        display: none;
    }

    .activity-progress-widget {
        position: fixed;
        top: auto;
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        flex-direction: row;
        gap: 0.35rem;
    }

    .activity-progress-widget__card {
        flex: 1 1 0;
    }

    .activity-progress-widget__label {
        font-size: 0.8rem;
        padding: 0.4rem 0.25rem;
    }

    .activity-progress-widget__value {
        font-size: clamp(1.3rem, 4.8vw, 1.7rem);
        padding-top: 0.35rem;
    }

    .activity-progress-widget__sub {
        font-size: 0.7rem;
        padding-bottom: 0.35rem;
    }

    body.msh-sidebar-active main {
        padding-left: 0;
    }

    body.msh-sidebar-active .msh-activity-shell {
        margin-right: 0;
    }

    body.msh-sidebar-active .english-skills-page--kids .container,
    body.msh-sidebar-active .msh-skill-play-section .container,
    body.msh-sidebar-active .activities-section .container {
        padding-right: 0;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-illustration {
    margin-bottom: 2rem;
}

.hero-kids-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.kid-illustration {
    font-size: 5rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.kid-illustration.kid-1 {
    animation-delay: 0s;
}

.kid-illustration.kid-2 {
    animation-delay: 0.5s;
}

.kid-illustration.kid-3 {
    animation-delay: 1s;
}

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

.hero h2,
.hero-title {
    font-size: var(--fs-heading);
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--white);
}

.hero-subtitle {
    font-size: var(--fs-body);
    margin-bottom: 0.75rem;
    opacity: 0.95;
    font-weight: 400;
}

.hero-description,
.hero-lead {
    font-size: var(--fs-body);
    margin-bottom: 0;
    opacity: 0.95;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero .btn-primary {
    margin-top: 1.75rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: var(--fs-body);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: var(--fs-heading);
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: var(--fs-heading);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    font-size: var(--fs-body);
}

/* Activities Preview */
.activities-preview {
    padding: 4rem 0;
    background: var(--bg-light);
}

.activity-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.activity-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.activity-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.activity-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.activity-illustration {
    font-size: 4rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

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

.activity-tracing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.activity-shapes {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.activity-matching {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.activity-numbers {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.activity-maze {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.activity-crossword {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.activity-content {
    padding: 2rem;
}

.activity-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.activity-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* FAQ / About (marketing pages) */
.faq-item-heading,
.about-panel-heading {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: var(--fs-heading);
    font-weight: 700;
}

.faq-item-heading {
    margin-bottom: 0.5rem;
}

/* Activities Page */
.activities-section {
    padding: 2rem 0 4rem;
}

.page-title {
    text-align: center;
    font-size: var(--fs-heading);
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.page-subtitle {
    text-align: center;
    font-size: var(--fs-body);
    color: var(--text-light);
    margin-bottom: 3rem;
}

.activity-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.activity-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
}

.activity-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.activity-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-color: var(--primary-color);
}

.tab-icon {
    font-size: 1.5rem;
}

.activity-content {
    display: none;
}

.activity-content.active {
    display: block;
}

.activity-header {
    text-align: center;
    margin-bottom: 2rem;
}

.activity-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tracing-container {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Tracing Activity - Navigation Controls */
.navigation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.nav-arrow-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-arrow-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.nav-arrow-btn:active {
    transform: scale(0.95);
}

.letter-display {
    text-align: center;
    min-width: 150px;
}

.letter-uppercase {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.letter-lowercase {
    font-size: 3rem;
    font-weight: bold;
    color: var(--secondary-color);
    line-height: 1;
    margin-top: 10px;
}

.number-display {
    text-align: center;
    min-width: 150px;
}

.number-big {
    font-size: 5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

/* Shapes Coloring Activity */
.shapes-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.color-picker-section {
    margin-bottom: 2rem;
    text-align: center;
}

.color-picker-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.color-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-option.active {
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.selected-color-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-top: 1rem;
}

.shapes-canvas-container {
    display: flex;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

#shapes-canvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    touch-action: none;
    max-width: 100%;
    height: auto;
}

/* Picture Matching Activity */
.matching-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.picture-display {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 15px;
}

.matching-pictures-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.matching-picture-item {
    width: 200px;
    background: white;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.matching-picture-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.matching-picture-emoji {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 10px;
}

.matching-picture-name {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

#matching-picture {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: block;
    background: white;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
}

.picture-name {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 1rem;
}

.letter-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.letter-option-btn {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.letter-option-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.letter-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.letter-option-btn.correct {
    background: #4caf50;
    animation: correctPulse 0.5s;
}

.letter-option-btn.incorrect {
    background: #f44336;
    animation: shake 0.5s;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback-message {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-message.correct {
    background: #e8f5e9;
    color: #2e7d32;
}

.feedback-message.incorrect {
    background: #ffebee;
    color: #c62828;
}

/* Picture Matching - Letter Navigation */
.letter-navigation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.letter-display-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 120px;
    text-align: center;
}

/* Numbers Quantity Activity */
.quantity-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.quantity-pictures-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 15px;
    min-height: 200px;
}

.quantity-picture-item {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-picture {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
}

/* Find the Way Puzzle */
.maze-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.maze-canvas-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #90EE90 0%, #98FB98 100%);
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #228B22;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#maze-canvas {
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
}

.maze-controls {
    text-align: center;
}

#maze-canvas {
    cursor: crosshair;
    touch-action: none;
}

.maze-feedback {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 50px;
}

#maze-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#maze-description {
    color: var(--text-light);
    font-size: 1rem;
}

.maze-controls .button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Number Matching Activity */
.number-match-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.number-match-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.number-match-display {
    text-align: center;
    min-width: 200px;
}

.number-match-label {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.number-match-pictures-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 15px;
    margin-bottom: 2rem;
    min-height: 200px;
}

.number-match-picture-item {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.number-match-picture-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
}

.number-match-picture-emoji {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: #f9f9f9;
    border-radius: 7px;
}

.number-match-options-container {
    text-align: center;
    margin-bottom: 2rem;
}

.number-match-options-container h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.number-match-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.number-match-option-btn {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.number-match-option-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.number-match-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.number-match-option-btn.correct {
    background: #4caf50;
    animation: correctPulse 0.5s;
}

.number-match-option-btn.incorrect {
    background: #f44336;
    animation: shake 0.5s;
}

/* Crossword Puzzle Activity */
.crossword-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.crossword-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.crossword-canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    background: transparent; /* User will add their own background image */
    padding: 20px;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* User can add background image like this:
.crossword-canvas-wrapper {
    background-image: url('path/to/your/background-image.jpg');
    background-size: cover;
    background-position: center;
}
*/

#crossword-canvas {
    background: transparent; /* User can add background image via CSS */
    border-radius: 10px;
    position: relative;
    z-index: 2;
}

.crossword-illustrations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.crossword-animal-illustration {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    transition: all 0.3s;
    min-width: 100px;
}

.crossword-animal-illustration.completed {
    background: #e8f5e9;
    border-color: #4caf50;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
}

.animal-emoji {
    font-size: 3.5rem;
    line-height: 1;
}

.animal-word {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crossword-animal-illustration.completed .animal-word {
    color: #2e7d32;
}

.crossword-clues {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.crossword-clues h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.crossword-clue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.clue-number {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 30px;
}

.clue-emoji {
    font-size: 2rem;
}

.clue-text {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.clue-reveal-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.clue-reveal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clue-reveal-btn:active {
    transform: translateY(0);
}

.crossword-feedback {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 50px;
}

.crossword-letter-selector {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.crossword-letter-selector h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.letter-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.letter-select-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.letter-select-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.letter-select-btn.active {
    background: #FF6B00;
    border-color: #FF4500;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.5);
}

.letter-select-btn.dragging {
    opacity: 0.5;
    transform: scale(0.9);
    cursor: grabbing;
}

#crossword-canvas {
    cursor: default;
}

#crossword-canvas.drag-over {
    cursor: copy;
    border: 3px dashed var(--primary-color);
}

/* Footer */
.main-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-size: var(--fs-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    font-size: var(--fs-body);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        padding: 1rem;
        display: none;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav .nav-link {
        display: block;
        padding: 1rem;
    }

    .header-auth-slot {
        display: none;
    }

    .generic-page-wrap {
        padding: 0 0.8rem;
    }

    .generic-page-hero {
        padding: 0.85rem 0.85rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-kids-illustration {
        gap: 15px;
    }

    .kid-illustration {
        font-size: 3.5rem;
    }

    .hero h2,
    .hero-title {
        font-size: var(--fs-heading);
    }

    .hero-subtitle,
    .hero-description,
    .hero-lead {
        font-size: var(--fs-body);
    }

    .activity-illustration {
        font-size: 3rem;
    }

    .section-title {
        font-size: var(--fs-heading);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .activity-tabs {
        flex-direction: column;
    }

    .activity-tab-btn {
        width: 100%;
        justify-content: center;
    }

    .navigation-controls {
        flex-direction: column;
        gap: 15px;
    }

    .letter-uppercase {
        font-size: 3rem;
    }

    .letter-lowercase {
        font-size: 2rem;
    }

    .number-big {
        font-size: 4rem;
    }

    .color-palette {
        gap: 10px;
    }

    .color-option {
        width: 50px;
        height: 50px;
    }

    .matching-picture-item {
        width: 150px;
    }

    .matching-picture-img,
    .matching-picture-emoji {
        height: 150px;
    }

    .letter-option-btn {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .quantity-picture-item {
        width: 100px;
        height: 100px;
    }

    .maze-arrow-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    #maze-canvas {
        max-width: 100%;
        height: auto;
    }

    .number-match-picture-item {
        width: 100px;
        height: 100px;
    }

    .number-match-option-btn {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .crossword-main {
        grid-template-columns: 1fr;
    }

    .crossword-canvas-wrapper {
        order: 2;
    }

    .crossword-clues {
        order: 1;
        max-height: 300px;
    }

    #crossword-canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Drawing & Coloring Activity Styles */
.drawing-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.drawing-main {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.drawing-canvas-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

#drawing-canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.current-sketch-name {
    margin-top: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
}

.drawing-controls {
    flex: 1;
    min-width: 300px;
}

.color-palette-section,
.sketch-selector-section {
    margin-bottom: 2rem;
}

.color-palette-section h3,
.sketch-selector-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.color-palette-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.color-btn.active {
    border-color: var(--primary-color);
    border-width: 4px;
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.sketch-selector-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sketch-select-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sketch-select-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sketch-select-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .drawing-main {
        flex-direction: column;
    }
    
    .drawing-canvas-wrapper {
        width: 100%;
    }
    
    #drawing-canvas {
        width: 100%;
        max-width: 500px;
    }
    
    .color-btn {
        width: 40px;
        height: 40px;
    }
    
    .sketch-select-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* New Homepage Styles - Age Selection and Subjects */

/* Hero Kids Container */
.hero-kids-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-kid {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-kid.kid-1 {
    animation-delay: 0s;
}

.hero-kid.kid-2 {
    animation-delay: 0.5s;
}

.hero-kid.kid-3 {
    animation-delay: 1s;
}

.hero-kid.kid-4 {
    animation-delay: 1.5s;
}

/* Age Navigation Section - Mega Menu Style */
.age-navigation-section {
    padding: 1rem 0 0 0;
    background: var(--white);
    position: relative;
    border-bottom: 2px solid var(--border-color);
}

.age-navigation-section .section-title {
    margin-bottom: 0.35rem;
}

.age-selection-lead {
    max-width: 52rem;
    margin: 0 auto 1.75rem;
    padding: 0 0.75rem;
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--text-light);
    text-align: center;
}

.age-selection-lead strong {
    color: var(--text-dark);
    font-weight: 600;
}

.age-nav-bar {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.46rem;
    background: transparent;
    border: none;
    padding: 0 0 0.35rem;
    margin: 0;
}

.age-nav-item {
    padding: 0.58rem 0.86rem;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    text-align: center;
    position: relative;
    flex: 1 1 127px;
    min-width: 127px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.29rem;
    background: #f5f5f5;
    border-radius: 9px;
    border: none;
    font-family: inherit;
    box-sizing: border-box;
}

.age-nav-item:hover,
.age-nav-item.active {
    background: var(--white);
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.age-nav-item:hover span:first-child,
.age-nav-item.active span:first-child {
    color: var(--primary-color);
}

.age-nav-item span:first-child {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--text-dark);
}

.age-nav-subtitle {
    font-size: var(--fs-body);
    line-height: 1.3;
    color: var(--text-light);
    font-weight: 400;
}

.age-nav-item-advanced {
    flex: 1 1 127px;
    min-width: 127px;
    max-width: 200px;
    border-left: 1px dashed rgba(0, 0, 0, 0.12);
}

.age-nav-item-advanced .age-nav-subtitle {
    color: #5c4a7a;
    font-weight: 500;
}

/* Mega Menu - Compact layout to fit on single screen */
.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-top: 2px solid var(--primary-color);
    z-index: 1000;
    padding: 1rem 0;
    margin-top: 0;
    top: 100%;
    animation: fadeIn 0.2s ease-in;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.age-navigation-section:hover .mega-menu {
    /* Keep menu visible when hovering over the section */
}

.mega-menu-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Full-width table layout (Ages 3-4) */
.mega-menu-content.mega-menu-table-layout {
    max-width: 96%;
    padding: 0 1.5rem;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.mega-menu-column {
    min-width: 0;
}

.mega-menu-subject-title {
    font-size: var(--fs-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mega-menu-icon {
    font-size: 1.5rem;
}


.mega-menu-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-category-item {
    margin-bottom: 0.4rem;
}

.category-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-play-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: var(--fs-body);
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.category-play-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mega-menu-category-item strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.mega-menu-skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-skills-list li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    padding-left: 0.5rem;
    text-decoration: none;
    list-style: none;
    border: none;
    outline: none;
}

.mega-menu-skills-list li:hover {
    color: var(--primary-color);
    padding-left: 1rem;
    text-decoration: none;
}

.mega-menu-skills-list {
    text-decoration: none;
}

.mega-menu-skills-list li::marker {
    display: none;
}

/* Mega Menu Table Layout (Ages 3-4, 4-5) - Kids-friendly */
.mega-menu-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.mega-menu-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
}

.mega-menu-table-row {
    transition: background 0.2s ease;
}

.mega-menu-row-even {
    background: linear-gradient(90deg, #f8f9ff 0%, #fefefe 50%, #ffffff 100%);
}

.mega-menu-row-odd {
    background: linear-gradient(90deg, #fff8f0 0%, #fefefe 50%, #ffffff 100%);
}

.mega-menu-table-row:hover .mega-menu-subject-cell {
    filter: brightness(0.98);
}

/* Subject-specific accent colors */
.mega-menu-table-row[data-subject="english"] .mega-menu-subject-cell { border-right-color: #4A90E2; }
.mega-menu-table-row[data-subject="english"] .mega-menu-subject-name { color: #2E7BD6; }
.mega-menu-table-row[data-subject="english"] { background: linear-gradient(90deg, rgba(74, 144, 226, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="math"] .mega-menu-subject-cell { border-right-color: #E87B35; }
.mega-menu-table-row[data-subject="math"] .mega-menu-subject-name { color: #D35400; }
.mega-menu-table-row[data-subject="math"] { background: linear-gradient(90deg, rgba(232, 123, 53, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="creative-arts"] .mega-menu-subject-cell { border-right-color: #9B59B6; }
.mega-menu-table-row[data-subject="creative-arts"] .mega-menu-subject-name { color: #7D3C98; }
.mega-menu-table-row[data-subject="creative-arts"] { background: linear-gradient(90deg, rgba(155, 89, 182, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="motor-skills"] .mega-menu-subject-cell { border-right-color: #27AE60; }
.mega-menu-table-row[data-subject="motor-skills"] .mega-menu-subject-name { color: #1E8449; }
.mega-menu-table-row[data-subject="motor-skills"] { background: linear-gradient(90deg, rgba(39, 174, 96, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="stories-reading"] .mega-menu-subject-cell { border-right-color: #16A085; }
.mega-menu-table-row[data-subject="stories-reading"] .mega-menu-subject-name { color: #0E6655; }
.mega-menu-table-row[data-subject="stories-reading"] { background: linear-gradient(90deg, rgba(22, 160, 133, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="cognitive-skills"] .mega-menu-subject-cell { border-right-color: #5C6BC0; }
.mega-menu-table-row[data-subject="cognitive-skills"] .mega-menu-subject-name { color: #3949AB; }
.mega-menu-table-row[data-subject="cognitive-skills"] { background: linear-gradient(90deg, rgba(92, 107, 192, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="science-basic"] .mega-menu-subject-cell { border-right-color: #3498DB; }
.mega-menu-table-row[data-subject="science-basic"] .mega-menu-subject-name { color: #2980B9; }
.mega-menu-table-row[data-subject="science-basic"] { background: linear-gradient(90deg, rgba(52, 152, 219, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="science"] .mega-menu-subject-cell { border-right-color: #1ABC9C; }
.mega-menu-table-row[data-subject="science"] .mega-menu-subject-name { color: #148F77; }
.mega-menu-table-row[data-subject="science"] { background: linear-gradient(90deg, rgba(26, 188, 156, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="social-studies"] .mega-menu-subject-cell { border-right-color: #8E44AD; }
.mega-menu-table-row[data-subject="social-studies"] .mega-menu-subject-name { color: #6C3483; }
.mega-menu-table-row[data-subject="social-studies"] { background: linear-gradient(90deg, rgba(142, 68, 173, 0.08) 0%, #fff 100%) !important; }

.mega-menu-table-row[data-subject="music-rhythm"] .mega-menu-subject-cell { border-right-color: #E84393; }
.mega-menu-table-row[data-subject="music-rhythm"] .mega-menu-subject-name { color: #C2185B; }
.mega-menu-table-row[data-subject="music-rhythm"] { background: linear-gradient(90deg, rgba(232, 67, 147, 0.08) 0%, #fff 100%) !important; }

/* Hover: accent glow per subject */
.mega-menu-table-row[data-subject="english"]:hover { background: linear-gradient(90deg, rgba(74, 144, 226, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="math"]:hover { background: linear-gradient(90deg, rgba(232, 123, 53, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="creative-arts"]:hover { background: linear-gradient(90deg, rgba(155, 89, 182, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="motor-skills"]:hover { background: linear-gradient(90deg, rgba(39, 174, 96, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="stories-reading"]:hover { background: linear-gradient(90deg, rgba(22, 160, 133, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="cognitive-skills"]:hover { background: linear-gradient(90deg, rgba(92, 107, 192, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="science-basic"]:hover { background: linear-gradient(90deg, rgba(52, 152, 219, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="science"]:hover { background: linear-gradient(90deg, rgba(26, 188, 156, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="social-studies"]:hover { background: linear-gradient(90deg, rgba(142, 68, 173, 0.14) 0%, #fff 100%) !important; }
.mega-menu-table-row[data-subject="music-rhythm"]:hover { background: linear-gradient(90deg, rgba(232, 67, 147, 0.14) 0%, #fff 100%) !important; }

/* Strong separation between subject rows */
.mega-menu-subject-cell {
    width: 180px;
    min-width: 180px;
    vertical-align: middle;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    border-right-width: 3px;
    border-right-style: solid;
}

.mega-menu-table-row:last-child .mega-menu-subject-cell,
.mega-menu-table-row:last-child .mega-menu-activities-cell {
    border-bottom: none;
}

.mega-menu-subject-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.mega-menu-subject-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.mega-menu-subject-name {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--primary-color);
}


.mega-menu-activities-cell {
    padding: 0.8rem 1rem;
    vertical-align: middle;
    border-bottom: 2px solid rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 0.6);
}

.mega-menu-activities-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.mega-menu-activity-card {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: var(--fs-body);
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.mega-menu-activity-card:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* Return-from-skill-play: fallback blue when enhance class not set (legacy) */
a.mega-menu-activity-card.msh-music-topic-poc-highlight {
    background: #3b82f6 !important;
    color: #fff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}
a.mega-menu-activity-card.msh-music-topic-poc-highlight .activity-card-text,
a.mega-menu-activity-card.msh-music-topic-poc-highlight .activity-play-btn {
    color: #fff !important;
}
a.mega-menu-activity-card.msh-music-topic-poc-highlight:hover {
    background: #2563eb !important;
    color: #fff !important;
    transform: translateY(-1px);
}

li.mega-menu-category-item.msh-music-topic-poc-highlight {
    background: #eff6ff;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #3b82f6;
}
li.mega-menu-category-item.msh-music-topic-poc-highlight strong {
    color: #1d4ed8;
}

/* Skill-play return (all ages/subjects): purple topic + pulse, same as topic pill hover */
@keyframes msh-skill-play-return-topic-pulse-glow {
    0%,
    100% {
        box-shadow:
            0 0 0 3px rgba(102, 126, 234, 0.65),
            0 4px 12px rgba(102, 126, 234, 0.35);
    }
    50% {
        box-shadow:
            0 0 0 9px rgba(102, 126, 234, 0.28),
            0 4px 16px rgba(118, 75, 162, 0.45);
    }
}

#mega-menu-content.msh-skill-play-return-enhance tr.mega-menu-table-row.msh-return-subject-row-highlight {
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.45);
}

#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row.msh-return-subject-row-highlight
    .mega-menu-subject-cell {
    background: rgba(102, 126, 234, 0.1) !important;
}

#mega-menu-content.msh-skill-play-return-enhance .mega-menu-column.msh-return-subject-row-highlight {
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.45);
    border-radius: 8px;
}

#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row
    a.mega-menu-activity-card.msh-music-topic-poc-highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row
    a.mega-menu-activity-card.msh-music-topic-poc-highlight
    .activity-card-text,
#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row
    a.mega-menu-activity-card.msh-music-topic-poc-highlight
    .activity-play-btn {
    color: #fff !important;
}

#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row
    a.mega-menu-activity-card.msh-music-topic-poc-highlight:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

#mega-menu-content.msh-skill-play-return-enhance li.mega-menu-category-item.msh-music-topic-poc-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.45);
}

#mega-menu-content.msh-skill-play-return-enhance
    li.mega-menu-category-item.msh-music-topic-poc-highlight
    strong {
    color: #5b21b6;
}

#mega-menu-content.msh-skill-play-return-enhance
    li.mega-menu-category-item.msh-music-topic-poc-highlight
    a.category-play-btn {
    color: #5b21b6;
    font-weight: 600;
}

#mega-menu-content.msh-skill-play-return-enhance
    tr.mega-menu-table-row
    a.mega-menu-activity-card.msh-music-topic-poc-highlight.msh-return-topic-pulse,
#mega-menu-content.msh-skill-play-return-enhance
    li.mega-menu-category-item.msh-music-topic-poc-highlight.msh-return-topic-pulse,
#mega-menu-content.msh-skill-play-return-enhance
    li.mega-menu-category-item.msh-music-topic-poc-highlight.msh-return-topic-pulse
    a.category-play-btn {
    animation: msh-skill-play-return-topic-pulse-glow 1.15s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    #mega-menu-content.msh-skill-play-return-enhance .msh-return-topic-pulse {
        animation: none;
    }
}

.activity-card-text {
    flex: 1;
    min-width: 0;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-play-btn {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.mega-menu-activity-card:hover .activity-play-btn {
    color: white;
}

.mega-menu-coming-soon {
    font-style: italic;
    color: var(--text-light);
    padding: 0.5rem 1rem;
}

/* Tablet: 2-3 activities per row */
@media (max-width: 1024px) {
    .mega-menu-content.mega-menu-table-layout {
        max-width: 98%;
        padding: 0 1rem;
    }
    .mega-menu-subject-cell {
        width: 140px;
        min-width: 140px;
    }
    .mega-menu-activities-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .mega-menu-activity-card {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    .activity-card-text {
        max-width: 100px;
    }
}

/* Mobile: stacked vertically */
@media (max-width: 768px) {
    .mega-menu-content.mega-menu-table-layout {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    .mega-menu-table-wrapper {
        overflow-x: visible;
    }
    .mega-menu-table {
        display: block;
    }
    .mega-menu-table-row {
        display: block;
        margin-bottom: 1rem;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.12);
        border: 1px solid rgba(102, 126, 234, 0.2);
    }
    .mega-menu-subject-cell,
    .mega-menu-activities-cell {
        display: block;
        width: 100%;
        min-width: 0;
        border-bottom: none;
        border-right: none;
        padding: 0.7rem 1rem;
    }
    .mega-menu-subject-cell {
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    }
    .mega-menu-activities-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .mega-menu-activity-card {
        font-size: 0.78rem;
        padding: 0.4rem 0.65rem;
    }
    .activity-card-text {
        max-width: 90px;
    }
}

/* Small mobile: 1 activity per row */
@media (max-width: 480px) {
    .mega-menu-activities-row {
        grid-template-columns: 1fr;
    }
}

/* Age Selection Section (Old - keeping for fallback) */
.age-selection-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.age-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.age-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.age-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    border-color: var(--primary-color);
}

.age-card[data-age="3-4"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.age-card[data-age="3-4"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.age-card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.age-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: inherit;
}

.age-description {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.age-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.stat-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.age-card[data-age="3-4"] .stat-item {
    background: rgba(255, 255, 255, 0.3);
}

.btn-age-select {
    width: 100%;
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.age-card[data-age="3-4"] .btn-age-select {
    background: var(--white);
    color: var(--primary-color);
}

.btn-age-select:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-age-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Age Content Section */
.age-content-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.age-header {
    text-align: center;
    margin-bottom: 3rem;
}

.back-to-ages {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.back-to-ages:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.age-title {
    font-size: var(--fs-heading);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.age-intro {
    font-size: var(--fs-body);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.subject-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.subject-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.subject-header h3 {
    font-size: var(--fs-heading);
    color: var(--primary-color);
    flex: 1;
    margin: 0;
}


/* Subject Content Wrapper - Single Column Layout (details panel removed) */
.subject-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 600px;
    margin-bottom: 2rem;
}

.categories-column {
    overflow-y: auto;
    max-height: 600px;
    padding-right: 1rem;
}

.categories-column::-webkit-scrollbar {
    width: 6px;
}

.categories-column::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.categories-column::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.categories-column::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Compact Category Items */
.categories-list-compact {
    margin-bottom: 1.5rem;
}

.category-item-compact {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-item-compact:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.category-item-compact.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--primary-color);
}

.category-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.category-arrow {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s;
}

.category-item-compact:hover .category-arrow {
    transform: translateX(5px);
}

.category-item-compact.active .category-arrow {
    transform: translateX(5px);
    color: var(--secondary-color);
}

/* Category Details Panel */
.category-details-panel {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    position: sticky;
    top: 2rem;
    max-height: 600px;
    overflow-y: auto;
}

.category-details-panel::-webkit-scrollbar {
    width: 6px;
}

.category-details-panel::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.category-details-panel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.details-panel-content {
    min-height: 200px;
}

.details-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    color: var(--text-light);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.details-placeholder p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.category-detail-content {
    display: none;
}

.category-detail-content.active {
    display: block;
}

.category-detail-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-detail-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-skills-list {
    list-style: none;
    padding: 0;
}

.category-skills-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Categories Section */
.categories-section {
    margin-bottom: 1.5rem;
}

.section-category-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

.section-category-title:first-child {
    margin-top: 0;
}

/* Categories List */
.categories-list {
    margin-bottom: 1.5rem;
}

.category-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all 0.3s;
}

.category-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.category-letter {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
    display: flex;
    align-items: flex-start;
}

.category-details {
    flex: 1;
}

.category-details h4 {
    font-size: var(--fs-heading);
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.category-details p {
    font-size: var(--fs-body);
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.btn-subject {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-subject:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--fs-heading);
    }

    .hero-kids-container {
        gap: 15px;
    }

    .hero-kid {
        font-size: 3rem;
    }

    .age-nav-bar {
        flex-direction: column;
    }

    .age-nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .age-nav-item:hover,
    .age-nav-item.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--border-color);
    }

    .mega-menu {
        position: relative;
        box-shadow: none;
        border-top: 1px solid var(--border-color);
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mega-menu-column {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.5rem;
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }

    .age-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .age-card {
        padding: 1.5rem;
    }

    .age-card-icon {
        font-size: 3rem;
    }

    .age-card h3 {
        font-size: 1.5rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .subject-card {
        padding: 1.5rem;
    }

    .subject-header {
        flex-wrap: wrap;
    }

    .subject-header h3 {
        font-size: var(--fs-heading);
    }

    .category-item {
        padding: 0.8rem;
    }

    .category-details h4 {
        font-size: var(--fs-heading);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--fs-heading);
    }

    .hero-kid {
        font-size: 2.5rem;
    }

    .age-cards {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: var(--fs-heading);
    }

    .age-title {
        font-size: var(--fs-heading);
    }
}

/* Responsive Design for Subject Content */
@media (max-width: 1024px) {
    .subject-content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-details-panel {
        position: relative;
        top: 0;
        max-height: 400px;
    }
    
    .categories-column {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .subject-card-expanded {
        padding: 1.5rem;
    }
    
    .category-item-compact {
        padding: 0.7rem 0.8rem;
    }
    
    .category-title {
        font-size: 0.9rem;
    }
    
    .category-details-panel {
        padding: 1.5rem;
    }
    
    .category-detail-title {
        font-size: 1.5rem;
    }
}

/* English Skills Styles */
.english-skills-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.skill-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.skill-category-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.skill-category-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.skill-item {
    background: var(--white);
    color: var(--text-dark);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    text-align: center;
}

.skill-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* English Skills — Ages 3–4 kid-friendly chrome */
.english-skills-page--kids {
    background: linear-gradient(165deg, #e8f4ff 0%, #fff5e6 35%, #ffe8f0 70%, #e6fff3 100%);
    padding-bottom: 3rem;
}

/* Creative Arts hub — soft purple / coral tint to match mega-menu arts colors */
.creative-arts-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #f3e8ff 0%, #ffecf4 32%, #fff9e6 65%, #e0f7fa 100%);
}

.creative-arts-skills-page--kids .english-skills-container {
    border-color: rgba(155, 89, 182, 0.42);
    box-shadow: 0 8px 28px rgba(155, 89, 182, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.creative-arts-skills-page--kids .english-skills-category-heading {
    color: #7c3aed;
}

/* Motor Skills hub — warm orange / peach (matches mega-menu motor tone) */
.motor-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #fff4e6 0%, #ffecd2 35%, #ffe8cc 70%, #e8f7ff 100%);
}

.motor-skills-page--kids .english-skills-container {
    border-color: rgba(234, 88, 12, 0.35);
    box-shadow: 0 8px 28px rgba(234, 88, 12, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.motor-skills-page--kids .motor-skills-category-heading,
.motor-skills-page--kids .english-skills-category-heading {
    color: #c2410c;
}

/* Stories & Reading hub — soft book / twilight tones */
.stories-reading-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #ede9fe 0%, #fce7f3 38%, #e0f2fe 72%, #fef9c3 100%);
}

.stories-reading-page--kids .english-skills-container {
    border-color: rgba(124, 58, 237, 0.32);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stories-reading-page--kids .stories-reading-category-heading,
.stories-reading-page--kids .english-skills-category-heading {
    color: #6d28d9;
}

/* Music & Rhythm hub — teal / coral / soft gold (reads “sound + motion” without clashing English blue) */
.music-rhythm-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #e0f7fa 0%, #fff4e6 34%, #ffe8f7 68%, #f3e8ff 100%);
}

.music-rhythm-skills-page--kids .english-skills-container {
    border-color: rgba(13, 148, 136, 0.38);
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.music-rhythm-skills-page--kids .english-skills-category-heading {
    color: #0f766e;
}

/* Science (multi-age hub) — cool blue / mint */
.science-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #e0f2fe 0%, #ecfdf5 35%, #fff7ed 70%, #eef2ff 100%);
}

.science-skills-page--kids .english-skills-container {
    border-color: rgba(2, 132, 199, 0.38);
    box-shadow: 0 8px 28px rgba(2, 132, 199, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.science-skills-page--kids .english-skills-category-heading {
    color: #0369a1;
}

/* Cognitive hub — soft violet / lime */
.cognitive-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #f5f3ff 0%, #ecfccb 38%, #fff1f2 72%, #e0f2fe 100%);
}

.cognitive-skills-page--kids .english-skills-container {
    border-color: rgba(109, 40, 217, 0.32);
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cognitive-skills-page--kids .english-skills-category-heading {
    color: #6d28d9;
}

/* Social Studies hub — sand / ocean */
.social-studies-skills-page--kids.english-skills-page--kids {
    background: linear-gradient(165deg, #fff7ed 0%, #e0f2fe 40%, #f0fdf4 75%, #fef9c3 100%);
}

.social-studies-skills-page--kids .english-skills-container {
    border-color: rgba(14, 116, 144, 0.35);
    box-shadow: 0 8px 28px rgba(14, 116, 144, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.social-studies-skills-page--kids .english-skills-category-heading {
    color: #0e7490;
}

.story-skill-page .story-progress {
    font-size: 0.88rem;
    color: #5b21b6;
    margin: 0 0 1rem;
    text-align: center;
}

.story-screen-title {
    text-align: center;
    color: #4c1d95;
    margin: 0 0 0.75rem;
    font-size: clamp(1.25rem, 3.5vw, 1.55rem);
}

.story-lead {
    text-align: center;
    color: #6b21a8;
    font-size: 1.02rem;
    line-height: 1.45;
    margin: 0 0 1rem;
}

.story-poem-block {
    font-family: inherit;
    font-size: 1.1rem;
    line-height: 1.55;
    white-space: pre-wrap;
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    border: 2px dashed rgba(124, 58, 237, 0.45);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
    color: #3b0764;
}

.story-part {
    font-size: 1.05rem;
    line-height: 1.55;
    color: #422006;
    max-width: 36rem;
    margin: 0 auto 0.85rem;
}

.story-part--big {
    font-size: 1.12rem;
    font-weight: 600;
}

.story-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin: 1rem 0;
}

.story-listen-btn {
    padding: 0.7rem 1.25rem;
    font-size: 0.98rem;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 4px 0 #5b21b6, 0 8px 18px rgba(99, 102, 241, 0.35);
    touch-action: manipulation;
}

.story-listen-btn:hover {
    transform: translateY(-2px);
}

.story-listen-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #5b21b6;
}

.story-listen-btn--ghost {
    background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
    color: #3b0764;
    box-shadow: 0 4px 0 #7c3aed;
}

.story-pic-grid,
.story-mc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    max-width: 520px;
    margin: 0 auto 1rem;
}

.story-pic-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.65rem;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    background: linear-gradient(180deg, #fefce8 0%, #fde68a 100%);
    cursor: pointer;
    font: inherit;
    touch-action: manipulation;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.story-pic-choice:hover {
    transform: scale(1.03);
    border-color: #a855f7;
}

.story-pic-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.story-pic-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #713f12;
}

.story-mc-choice {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid rgba(109, 40, 217, 0.35);
    background: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4c1d95;
    cursor: pointer;
    touch-action: manipulation;
}

.story-mc-choice:hover {
    border-color: #7c3aed;
    background: #faf5ff;
}

.story-feedback {
    text-align: center;
    font-weight: 800;
    min-height: 1.5rem;
    color: #b45309;
    margin: 0.5rem 0 0;
}

.story-nav {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.skill-item-hint {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a16207;
    opacity: 0.9;
}

.english-skills-page--kids .page-title.english-skills-kids-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: var(--fs-heading);
    color: #5c4033;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.english-skills-title-emoji {
    font-size: 1.5em;
    line-height: 1;
}

.english-skills-page--kids .english-skills-kids-subtitle {
    text-align: center;
    color: #7a5c4e;
    font-size: var(--fs-body);
    font-weight: 600;
}

.english-skills-page--kids .english-skills-container {
    background: rgba(255, 255, 255, 0.92);
    border: 3px solid rgba(255, 182, 193, 0.45);
    box-shadow: 0 8px 28px rgba(255, 140, 180, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Active game view: less outer padding so one-screen layouts fit without scroll */
#skill-content.english-skills-container {
    padding: 0.55rem 0.85rem 0.75rem;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
}

/*
 * Fixed “How to play” + score rails are viewport-positioned; inset the game card with margins
 * so the white panel (and Back / Next) stays between them. Gutters match widget CSS.
 * Below 769px: how-to is hidden and scores move to a bottom bar — no side gutters here.
 */
/* All sidebar cards are now on the LEFT only.
   main.msh-sidebar-active already adds padding-left for the sidebar.
   No right sidebar → no right gutter. Card fills all remaining width. */
@media (min-width: 981px) {
    #skill-content.english-skills-container {
        margin-left: 0;
        margin-right: 1rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }
}

@media (min-width: 769px) and (max-width: 980px) {
    #skill-content.english-skills-container {
        margin-left: 0;
        margin-right: 0.75rem;
        width: calc(100% - 0.75rem);
        box-sizing: border-box;
    }
}

#skill-content .english-skills-back-btn {
    margin-bottom: 0.5rem;
}

.english-skills-back-btn {
    margin-bottom: 1rem;
    padding: 0.65rem 1.35rem;
    background: linear-gradient(135deg, #6ec1ff 0%, #a78bfa 100%);
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 0 #5a8fc9, 0 6px 14px rgba(110, 193, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.english-skills-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #5a8fc9, 0 10px 20px rgba(110, 193, 255, 0.4);
}

.english-skills-back-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #5a8fc9;
}

/* Kid-friendly sound controls: pill shape, speaker + words (not icon-only). ~2× tap size vs original. */
.hear-round-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.hear-round-btn__icon {
    font-size: 1.45em;
    line-height: 1;
    flex-shrink: 0;
}

.hear-round-btn__icon--svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hear-round-btn__svg-icon {
    width: 1.15em;
    height: 1.15em;
    display: block;
}

.hear-round-btn__label {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.hear-round-btn--compact .hear-round-btn__icon {
    font-size: 1.25em;
}

.hear-round-btn--compact .hear-round-btn__label {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.play-sound-btn.hear-round-btn {
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.5rem;
    padding: 0.85rem 1.85rem;
    margin: 0.55rem 0;
}

.skill-page .play-sound-btn.hear-round-btn {
    margin: 0.35rem 0;
}

.skill-category-card--kids {
    background: linear-gradient(145deg, #ff9ecd 0%, #ffb88c 50%, #ffe66d 100%);
    border: 3px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 6px 0 rgba(214, 120, 168, 0.45), 0 10px 24px rgba(255, 158, 205, 0.35);
    padding: 1.25rem 1rem 1.5rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(244, 114, 182, 0.35);
}

.skill-category-card--with-sound {
    position: relative;
    padding-top: 2.35rem;
}

.category-card-sound-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.5rem;
    z-index: 2;
    appearance: none;
    font: inherit;
    line-height: 1;
    padding: 0.32rem 0.55rem 0.32rem 0.45rem;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(129, 140, 248, 0.35);
}

.category-card-sound-btn:hover {
    transform: scale(1.06);
}

.category-card-sound-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.category-card-sound-btn--plain {
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(180deg, #eef2ff, #fff);
}

.global-hear-again-wrap {
    text-align: center;
    margin: 0.4rem auto 0.9rem;
}

.global-hear-again-btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0.56rem 1.05rem;
    box-shadow: 0 3px 0 #4f46e5, 0 6px 12px rgba(99, 102, 241, 0.25);
    cursor: pointer;
    touch-action: manipulation;
}

.global-hear-again-btn:hover {
    transform: translateY(-1px);
}

.global-hear-again-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #4f46e5;
}

.global-hear-again-btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.35);
    outline-offset: 2px;
}

/* Guided pretend-practice steps (Fine Motor, etc.) */
.motor-guided-page .motor-guided-skill-label {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c2410c;
    margin: 0 0 0.5rem;
}

.motor-guided-page .motor-guided-emoji {
    font-size: clamp(3rem, 12vw, 4.5rem);
    line-height: 1;
    text-align: center;
    margin: 0.25rem 0 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.motor-guided-page .motor-guided-kid {
    font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    line-height: 1.45;
    color: #422006;
    margin: 0 0 1rem;
    text-align: center;
}

.motor-guided-page .motor-guided-grownup {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px dashed rgba(180, 83, 9, 0.35);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #713f12;
}

.motor-guided-page .motor-guided-grownup-label {
    font-weight: 800;
    display: block;
    margin-bottom: 0.35rem;
    color: #92400e;
}

.motor-guided-page .motor-guided-demo {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    padding: 0.85rem 0.85rem 0.9rem;
    margin: 0 0 1rem;
    text-align: center;
}

.motor-guided-page .motor-guided-demo-title {
    margin: 0 0 0.45rem;
    font-weight: 800;
    color: #3730a3;
    font-size: 0.98rem;
}

.motor-guided-page .motor-guided-demo-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 52px;
    margin-bottom: 0.4rem;
}

.motor-guided-page .motor-guided-demo-frame {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.motor-guided-page .motor-guided-demo-frame--a {
    animation: motorGuidePulseA 1.8s ease-in-out infinite;
}

.motor-guided-page .motor-guided-demo-frame--b {
    animation: motorGuidePulseB 1.8s ease-in-out infinite;
}

.motor-guided-page .motor-guided-demo-frame--c {
    animation: motorGuidePulseC 1.8s ease-in-out infinite;
}

.motor-guided-page .motor-guided-demo-line {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    color: #312e81;
}

.motor-guided-page .motor-guided-demo-speak-btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.45rem 0.95rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #4f46e5;
    touch-action: manipulation;
}

.motor-guided-page .motor-guided-demo-speak-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #4f46e5;
}

.motor-guided-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.motor-guided-celebrate-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
    box-shadow: 0 4px 0 #0f766e, 0 8px 18px rgba(20, 184, 166, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
}

.motor-guided-celebrate-btn:hover {
    transform: translateY(-2px);
}

.motor-guided-celebrate-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #0f766e;
}

@keyframes motorGuidePulseA {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.45; }
    20%, 45% { transform: translateY(-4px) scale(1.08); opacity: 1; }
    65% { opacity: 0.55; }
}

@keyframes motorGuidePulseB {
    0%, 22% { transform: translateY(0) scale(1); opacity: 0.45; }
    40%, 66% { transform: translateY(-4px) scale(1.08); opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes motorGuidePulseC {
    0%, 45% { transform: translateY(0) scale(1); opacity: 0.45; }
    62%, 88% { transform: translateY(-4px) scale(1.08); opacity: 1; }
    100% { opacity: 0.5; }
}

.skill-category-card--kids:nth-child(5n + 2) {
    background: linear-gradient(145deg, #7dd3fc 0%, #93c5fd 50%, #c4b5fd 100%);
    box-shadow: 0 6px 0 rgba(100, 150, 200, 0.45), 0 10px 24px rgba(125, 211, 252, 0.35);
}

.skill-category-card--kids:nth-child(5n + 3) {
    background: linear-gradient(145deg, #86efac 0%, #6ee7b7 50%, #5eead4 100%);
    box-shadow: 0 6px 0 rgba(60, 140, 120, 0.4), 0 10px 24px rgba(134, 239, 172, 0.35);
}

.skill-category-card--kids:nth-child(5n + 4) {
    background: linear-gradient(145deg, #fcd34d 0%, #fbbf24 50%, #fb923c 100%);
    box-shadow: 0 6px 0 rgba(200, 130, 40, 0.45), 0 10px 24px rgba(251, 191, 36, 0.35);
}

.skill-category-card--kids:nth-child(5n + 5) {
    background: linear-gradient(145deg, #d8b4fe 0%, #e879f9 50%, #f472b6 100%);
    box-shadow: 0 6px 0 rgba(160, 90, 160, 0.4), 0 10px 24px rgba(232, 121, 249, 0.3);
}

.category-card-emoji {
    display: block;
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 0.35rem;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12));
}

.skill-category-card--kids h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.category-card-hint {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.english-skills-category-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 1.55rem;
    color: #c026d3;
    margin-bottom: 0.25rem;
}

/* Category & skill hub only — no speaker on menu tiles (in-game hear buttons live under #skill-content). */
#category-selection .category-card-sound-btn,
#skills-list .skill-item-sound-btn,
#category-title .category-heading-sound-btn {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.category-heading-emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.category-heading-text {
    font-weight: 800;
}

.category-title-row-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.75rem;
    flex-wrap: wrap;
}

.category-heading-sound-btn {
    line-height: 1;
    padding: 0.4rem 0.75rem 0.4rem 0.6rem;
    border-radius: 999px;
    border: 3px solid rgba(192, 38, 211, 0.38);
    background: linear-gradient(180deg, #fdf4ff, #fff);
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(192, 38, 211, 0.25);
}

.category-heading-sound-btn:hover {
    border-color: #c026d3;
    transform: scale(1.05);
}

.category-heading-sound-btn:focus-visible {
    outline: 3px solid #d946ef;
    outline-offset: 2px;
}

.category-heading-sound-btn--45 {
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(180deg, #eef2ff, #fff);
}

.category-heading-text-45 {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-dark, #1e293b);
}

/* In-activity instruction replay: title on top, hear button centered below (compact vertical rhythm). */
.activity-title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    width: 100%;
}

.activity-title-row h2 {
    margin: 0;
    text-align: center;
    width: 100%;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
}

.activity-instruction-hear-btn {
    flex-shrink: 0;
    line-height: 1;
    padding: 0.4rem 1.15rem 0.4rem 0.95rem;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(180deg, #7c3aed 0%, var(--primary-color) 45%, #5b21b6 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 0 #4c1d95, 0 8px 20px rgba(79, 70, 229, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(129, 140, 248, 0.3);
}

.activity-instruction-hear-btn:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: #fff;
    transform: scale(1.04);
}

.activity-instruction-hear-btn:focus-visible {
    outline: 4px solid #818cf8;
    outline-offset: 3px;
}

.activity-instruction-hear-btn.hear-round-btn .hear-round-btn__icon {
    font-size: 1.35rem;
}

.activity-instruction-hear-btn.hear-round-btn .hear-round-btn__label {
    font-size: 1.05rem;
    font-weight: 800;
    color: inherit;
}

.english-skills-page--kids .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Motor Skills: keep skill choices at 3 per row to reduce long horizontal rows */
.motor-skills-page--kids .skills-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-item--kids {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 118px;
    padding: 1rem 0.85rem;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.06);
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(251, 191, 36, 0.35);
    user-select: none;
    -webkit-user-select: none;
    caret-color: transparent;
}

.skill-item--kids * {
    user-select: none;
    -webkit-user-select: none;
}

.skill-item--kids:focus {
    outline: none;
}

.skill-item--kids:focus-visible {
    outline: 3px solid #f472b6;
    outline-offset: 2px;
}

.skill-item--kids:nth-child(6n + 1) {
    background: linear-gradient(180deg, #fff0f5 0%, #ffd6e8 100%);
}
.skill-item--kids:nth-child(6n + 2) {
    background: linear-gradient(180deg, #ecfeff 0%, #c8f5ff 100%);
}
.skill-item--kids:nth-child(6n + 3) {
    background: linear-gradient(180deg, #f0fdf4 0%, #bbf7d0 100%);
}
.skill-item--kids:nth-child(6n + 4) {
    background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%);
}
.skill-item--kids:nth-child(6n + 5) {
    background: linear-gradient(180deg, #faf5ff 0%, #e9d5ff 100%);
}
.skill-item--kids:nth-child(6n + 6) {
    background: linear-gradient(180deg, #fef3c7 0%, #fcd34d 100%);
}

.skill-item--kids-with-sound {
    position: relative;
    padding-top: 2.35rem;
}

.skill-item-sound-btn {
    position: absolute;
    top: 0.4rem;
    right: 0.45rem;
    z-index: 2;
    appearance: none;
    font: inherit;
    line-height: 1;
    padding: 0.3rem 0.5rem 0.3rem 0.42rem;
    border-radius: 999px;
    border: 3px solid rgba(99, 102, 241, 0.45);
    background: linear-gradient(180deg, #eef2ff, #fff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(129, 140, 248, 0.35);
}

.skill-item-sound-btn:hover {
    border-color: #6366f1;
    transform: scale(1.06);
}

.skill-item-sound-btn:focus-visible {
    outline: 3px solid #818cf8;
    outline-offset: 2px;
}

.skill-item--menu-tile {
    position: relative;
    padding: 2.25rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.skill-item--menu-tile:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.skill-item--menu-tile h4 {
    margin: 0;
    font-size: 1rem;
    text-align: center;
}

.skill-item--kids:has(.skill-item-hint) {
    min-height: 138px;
    padding-bottom: 1.05rem;
}

.skill-item--kids:hover {
    border-color: #f472b6;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.25);
}

.skill-item-emoji {
    font-size: 2.25rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.skill-item--kids .skill-item-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #5b3a29;
    line-height: 1.35;
}

/* Motor hub — real <button> cards need the same look as div cards */
button.skill-item.skill-item--kids {
    appearance: none;
    font: inherit;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* Clicks land on the <button>, not child spans (fixes iOS / some WebKit tap targets). */
button.skill-item.skill-item--kids .skill-item-emoji,
button.skill-item.skill-item--kids .skill-item-title,
button.skill-item.skill-item--kids .skill-item-hint {
    pointer-events: none;
}

@media (max-width: 980px) {
    .motor-skills-page--kids .skills-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .motor-skills-page--kids .skills-list {
        grid-template-columns: 1fr;
    }
}

.skill-page {
    padding: 0.5rem 0.7rem 0.65rem;
    background: var(--white);
    border-radius: 10px;
    min-height: 0;
    /* Centre the card and cap its width — applies globally to all subjects/ages.
       Activities inside .msh-activity-shell stay at the shell's 760px constraint. */
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.skill-page:has(.count-match-container) {
    min-height: unset;
    padding: 0.5rem 0.7rem 0.65rem;
}

.skill-page h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.35rem;
    text-align: center;
    font-size: clamp(1.45rem, 3.8vw, 1.85rem);
    font-weight: 800;
}

/* Title + hear row: no extra h2 margin (flex gap handles spacing) */
.skill-page .activity-title-row h2 {
    margin-bottom: 0;
}

.skill-page:has(.count-match-container) h2 {
    margin-bottom: 0.5rem;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.6rem;
    margin: 0.45rem auto 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.letter-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.letter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.letter-btn.target-letter {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--primary-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Music & Rhythm pilot: emoji tap grid */
.skill-page--music-rhythm .music-rhythm-prompt {
    text-align: center;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    margin: 0.35rem 0 0.75rem;
    color: #0f766e;
}

.music-rhythm-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 420px;
    margin: 0.35rem auto 0.65rem;
}

.music-rhythm-choice {
    border: 3px solid rgba(15, 118, 110, 0.25);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
    padding: 0.35rem 0.25rem 0.45rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-rhythm-choice:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(13, 148, 136, 0.55);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.18);
}

.music-rhythm-choice:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.55);
    outline-offset: 3px;
}

.music-rhythm-choice-emoji {
    font-size: clamp(2.6rem, 10vw, 3.25rem);
    line-height: 1;
}

.music-rhythm-choice--correct {
    border-color: rgba(22, 163, 74, 0.55);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.music-rhythm-choice--pulse {
    animation: pulse 0.65s ease 1;
}

@media (max-width: 420px) {
    .music-rhythm-choice-grid {
        gap: 0.55rem;
        max-width: 100%;
    }

    .music-rhythm-choice {
        min-height: 84px;
        border-radius: 12px;
    }
}

/* Science / Cognitive / Social Studies pilot tap grids (same rhythm as Music pilot) */
.skill-page--science-tap .science-tap-prompt,
.skill-page--cognitive-tap .cognitive-tap-prompt,
.skill-page--social-tap .social-tap-prompt {
    text-align: center;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    margin: 0.35rem 0 0.75rem;
    color: #0369a1;
}

.skill-page--cognitive-tap .cognitive-tap-prompt {
    color: #6d28d9;
}

.skill-page--social-tap .social-tap-prompt {
    color: #0e7490;
}

/* Science uses a single-column (stacked) layout for larger tap targets */
.science-tap-choice-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 400px;
    margin: 0.35rem auto 0.65rem;
}

.cognitive-tap-choice-grid,
.social-tap-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 420px;
    margin: 0.35rem auto 0.65rem;
}

.science-tap-choice,
.cognitive-tap-choice,
.social-tap-choice {
    border: 3px solid rgba(3, 105, 161, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    padding: 0.35rem 0.25rem 0.45rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cognitive-tap-choice {
    border-color: rgba(109, 40, 217, 0.3);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.social-tap-choice {
    border-color: rgba(14, 116, 144, 0.32);
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
}

.science-tap-choice:hover,
.cognitive-tap-choice:hover,
.social-tap-choice:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(2, 132, 199, 0.55);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.16);
}

.cognitive-tap-choice:hover {
    border-color: rgba(109, 40, 217, 0.5);
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.14);
}

.social-tap-choice:hover {
    border-color: rgba(14, 116, 144, 0.5);
    box-shadow: 0 6px 18px rgba(14, 116, 144, 0.14);
}

.science-tap-choice:focus-visible,
.cognitive-tap-choice:focus-visible,
.social-tap-choice:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.55);
    outline-offset: 3px;
}

.science-tap-choice-emoji,
.cognitive-tap-choice-emoji,
.social-tap-choice-emoji {
    font-size: clamp(2.6rem, 10vw, 3.25rem);
    line-height: 1;
}

/* Science single-column: taller buttons, bigger emoji */
.science-tap-choice-grid .science-tap-choice {
    min-height: 100px;
    width: 100%;
    padding: 0.5rem 1rem;
}
.science-tap-choice-grid .science-tap-choice-emoji {
    font-size: clamp(3.5rem, 13vw, 5rem);
}

.science-tap-choice--correct {
    border-color: rgba(22, 163, 74, 0.55);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.cognitive-tap-choice--correct {
    border-color: rgba(22, 163, 74, 0.5);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.social-tap-choice--correct {
    border-color: rgba(22, 163, 74, 0.5);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.science-tap-choice--pulse,
.cognitive-tap-choice--pulse,
.social-tap-choice--pulse {
    animation: pulse 0.65s ease 1;
}

@media (max-width: 420px) {
    .science-tap-choice-grid {
        gap: 0.5rem;
        max-width: 100%;
    }

    .cognitive-tap-choice-grid,
    .social-tap-choice-grid {
        gap: 0.55rem;
        max-width: 100%;
    }

    .science-tap-choice,
    .cognitive-tap-choice,
    .social-tap-choice {
        min-height: 84px;
        border-radius: 12px;
    }
}

.match-container {
    text-align: center;
    padding: 0.25rem 0.5rem 0.35rem;
}

.match-container > p {
    margin: 0.2rem 0 0.35rem;
    font-size: 1rem;
}

.big-letter {
    font-size: clamp(3.5rem, 16vw, 5.25rem);
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.1rem 0 0.25rem;
    line-height: 1;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.65rem;
    margin: 0.5rem auto;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Match Big/Small (3–4 English): 7 choices in one row — aligns with Find the Letter width/rhythm */
.match-container .options-grid.options-grid--match-letters-seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    max-width: 600px;
    width: 100%;
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.match-container .options-grid.options-grid--match-letters-seven .option-btn {
    padding: 0.5rem 0.25rem;
    font-size: 1.35rem;
    min-height: 48px;
    box-sizing: border-box;
}

/* Listen and choose: 7 uppercase letters in one row (matches Find the Letter rhythm) */
.listen-container .options-grid.options-grid--listen-seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.listen-container .options-grid.options-grid--listen-seven .letter-option-btn {
    padding: 0.75rem 0.35rem;
    font-size: 1.5rem;
    min-height: 60px;
    box-sizing: border-box;
}

.skill-page--listen-choose .listen-choose-heading {
    margin-bottom: 0.5rem;
}

.listen-choose-lead {
    max-width: 36rem;
    margin: 0 auto 0.5rem;
    line-height: 1.5;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.listen-choose-prompt {
    margin-top: 0.5rem;
    font-weight: 600;
}

.listen-choose-hint {
    max-width: 34rem;
    margin: 0.35rem auto 0.75rem;
    line-height: 1.5;
    font-size: 0.98rem;
    color: #475569;
}

.option-btn, .letter-option-btn {
    padding: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover, .letter-option-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.listen-container {
    text-align: center;
    padding: 0.5rem 0.75rem 0.75rem;
}

.play-sound-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin: 0.85rem 0;
    transition: all 0.3s;
}

.play-sound-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.skill-page--beginning-sounds .beginning-sounds-title {
    margin-bottom: 0.5rem;
}

.beginning-sounds-lead {
    max-width: 36rem;
    margin: 0 auto 1rem;
    line-height: 1.5;
    font-size: 1.05rem;
}

.beginning-sounds-layout {
    text-align: center;
}

.beginning-sounds-picture {
    margin: 0.5rem auto 0.25rem;
    min-height: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beginning-sounds-emoji {
    font-size: 6rem;
    line-height: 1;
    user-select: none;
}

.sound-practice-container .options-grid.options-grid--beginning-sounds-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.sound-practice-container .options-grid.options-grid--beginning-sounds-five .letter-option-btn {
    padding: 0.75rem 0.35rem;
    font-size: 1.5rem;
    min-height: 56px;
    box-sizing: border-box;
}

.skill-page--beginning-sounds .play-sound-btn {
    margin: 1rem 0 1.25rem;
}

.sound-match-lead {
    max-width: 38rem;
    margin: 0 auto 1rem;
    line-height: 1.55;
    font-size: 1.02rem;
    text-align: center;
}

.sound-match-clue {
    margin: 0.5rem auto 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sound-match-clue-emoji {
    font-size: 5.5rem;
    line-height: 1;
    user-select: none;
}

.skill-page--sound-matching .sound-match-hear-btn {
    margin: 0.75rem 0 1rem;
}

.sound-match-task {
    font-size: 1.1rem;
    margin: 0.5rem 0 1rem;
    font-weight: 600;
}

.break-words-lead {
    max-width: 38rem;
    margin: 0 auto 1rem;
    line-height: 1.55;
    font-size: 1.02rem;
    text-align: center;
}

.break-word-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    margin: 1rem auto 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: 14px;
    border: 2px dashed rgba(99, 102, 241, 0.35);
    max-width: 22rem;
}

.break-slot {
    min-width: 3.25rem;
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    background: var(--white);
    border-radius: 10px;
    border: 3px solid var(--border-color);
}

.break-plus {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.break-rest {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-dark);
}

.sound-practice-container .options-grid.options-grid--break-apart {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.ending-sounds-lesson {
    max-width: 36rem;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    line-height: 1.55;
    font-size: 1.02rem;
}

.ending-sounds-lesson-title {
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.skill-page--ending-sounds .ending-anchor-row {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.ending-sounds-hear-wrap {
    text-align: center;
    margin: 0.35rem auto 0.75rem;
}

.ending-sounds-hear-wrap .ending-sounds-hear-again-btn {
    margin: 0.35rem 0 0.25rem;
}

/* Word families (odd one out) — demo + clearer task */
.skill-page--word-families .word-family-demo {
    max-width: 36rem;
    margin: 0 auto 1.2rem;
    padding: 1rem 1.1rem 1.05rem;
    border-radius: 16px;
    background: linear-gradient(165deg, #fffbf8, #f4f8ff);
    border: 2px dashed rgba(245, 158, 11, 0.45);
    text-align: center;
}

.word-family-demo-label {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #c2410c;
}

.word-family-demo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.65rem;
    margin: 0.35rem 0;
}

.word-family-demo-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.65rem 0.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(99, 102, 241, 0.22);
    min-width: 5.5rem;
}

.word-family-demo-card--odd {
    border-color: rgba(244, 63, 94, 0.45);
    animation: word-family-odd-nudge 1.35s ease-in-out infinite;
}

@keyframes word-family-odd-nudge {
    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }
    35% {
        transform: translateX(-3px) rotate(-1.5deg);
    }
    70% {
        transform: translateX(3px) rotate(1.5deg);
    }
}

.word-family-demo-split {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.wf-stem {
    color: #64748b;
}

.wf-rime--match {
    color: #4338ca;
    padding: 0.1rem 0.2rem;
    border-radius: 6px;
    animation: word-family-rime-glow 1.25s ease-in-out infinite;
}

.wf-rime--other {
    color: #e11d48;
    padding: 0.1rem 0.2rem;
    border-radius: 6px;
}

@keyframes word-family-rime-glow {
    0%,
    100% {
        background: transparent;
        transform: scale(1);
    }
    50% {
        background: rgba(129, 140, 248, 0.35);
        transform: scale(1.05);
    }
}

.word-family-demo-emoji {
    font-size: 1.85rem;
    line-height: 1;
}

.word-family-demo-w {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    text-transform: lowercase;
}

.word-family-demo-and {
    font-size: 0.95rem;
    font-weight: 700;
    color: #94a3b8;
}

.word-family-demo-same,
.word-family-demo-diff,
.word-family-demo-task-hint {
    margin: 0.45rem auto 0;
    max-width: 32rem;
    font-size: 0.96rem;
    line-height: 1.45;
    color: #334155;
}

.word-family-demo-diff {
    margin-top: 0.35rem;
}

.word-family-demo-task-hint {
    margin-top: 0.65rem;
    font-weight: 600;
    color: #1e293b;
}

.word-family-lead {
    max-width: 34rem;
    margin: 0 auto 0.5rem;
    line-height: 1.5;
    font-size: 1.03rem;
    color: var(--text-dark);
}

.word-family-hear-wrap {
    text-align: center;
    margin: 0.35rem 0 0.65rem;
}

.word-family-hear-wrap .word-family-hear-btn {
    margin: 0.25rem 0;
}

.word-family-prompt {
    font-weight: 600;
    margin: 0.35rem 0 1rem;
    line-height: 1.45;
}

.ending-slow-line,
.ending-task-line {
    margin: 0.5rem 0;
    line-height: 1.45;
}

/* Ending sounds — short animated demo (cat / hat) so kids see “same ending” */
.ending-sounds-demo {
    max-width: 32rem;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.1rem 1.15rem;
    border-radius: 16px;
    background: linear-gradient(165deg, #f8fafc, #eef2ff);
    border: 2px dashed rgba(99, 102, 241, 0.35);
    text-align: center;
}

.ending-demo-title {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4338ca;
}

.ending-demo-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.65rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
}

.ending-demo-word {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.ending-demo-stem {
    color: #64748b;
}

.ending-demo-rime {
    color: #4338ca;
    padding: 0.08rem 0.2rem;
    border-radius: 6px;
}

.ending-demo-rime--pulse {
    animation: ending-sounds-rime-pulse 1.25s ease-in-out infinite;
}

@keyframes ending-sounds-rime-pulse {
    0%,
    100% {
        background: transparent;
        transform: scale(1);
        box-shadow: none;
    }
    50% {
        background: rgba(129, 140, 248, 0.35);
        transform: scale(1.06);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }
}

.ending-demo-plus {
    font-size: 0.95rem;
    font-weight: 700;
    color: #94a3b8;
}

.ending-demo-caption {
    margin: 0.65rem 0 0;
    font-size: 0.98rem;
    line-height: 1.45;
    color: #475569;
}

.word-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
    margin: 0.5rem 0 0.65rem;
}

.word-option-btn {
    padding: 1.5rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.word-option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Clicks land on the <button>, not child spans (fixes some WebKit / mobile taps). */
button.word-option-btn .word-emoji,
button.word-option-btn .word-name {
    pointer-events: none;
}

.word-emoji {
    font-size: 3rem;
}

.word-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
}

/* English — blend activities: distinct layouts per skill */
.skill-page--blend-sounds-aural .blend-lead {
    font-size: 1.06rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 0 auto 0.75rem;
    max-width: 28rem;
}

.blend-sound-train {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.65rem;
    margin: 1.1rem 0 0.25rem;
}

.blend-sound-pill {
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    background: linear-gradient(155deg, #eef6ff, #fff5fb);
    border: 2px solid rgba(99, 102, 241, 0.38);
    font-weight: 800;
    font-size: 1.22rem;
    color: #312e81;
}

.blend-sound-plus,
.blend-sound-arrow {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.88;
}

.blend-hear-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    justify-content: center;
    margin: 0.45rem 0 0.65rem;
}

.blend-hear-row .blend-hear-btn {
    min-width: 13.5rem;
}

.skill-page--make-words-hear .make-words-lead {
    font-size: 1.06rem;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
}

.skill-page--make-words-hear .make-words-sub {
    font-size: 0.98rem;
    color: #475569;
    margin-bottom: 1rem;
}

.word-options--emoji-pick {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.word-option-btn--emoji-only {
    min-height: 8.5rem;
    justify-content: center;
    position: relative;
}

.word-option-btn--emoji-only .word-emoji--solo {
    font-size: 4.5rem;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skill-page--blend-letters-print .blend-print-lead {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.blend-print-chunks {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.25rem;
}

.blend-print-chunk {
    min-width: 5.75rem;
    padding: 1.15rem 1.4rem;
    border-radius: 18px;
    border: 3px dashed rgba(67, 56, 202, 0.42);
    background: linear-gradient(180deg, #fafbff, #f4f7ff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.blend-print-chunk small {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.blend-print-chunk--onset {
    font-size: 2.35rem;
    font-weight: 800;
    color: #4338ca;
    line-height: 1;
}

.blend-print-chunk--rime {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f766e;
    letter-spacing: 0.03em;
    line-height: 1;
}

.blend-print-mid {
    align-self: center;
    font-size: 2rem;
    font-weight: 800;
    color: #94a3b8;
}

.word-options--strip-print {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    gap: 0.85rem;
}

.blend-letters-hear-wrap {
    text-align: center;
    margin: 0.65rem auto 0.85rem;
}

.blend-letters-hear-wrap .blend-letters-hear-btn {
    margin: 0.25rem 0;
}

.skill-page--build-simple-merge .build-merge-caption {
    font-size: 1.02rem;
    margin: 0.75rem auto 1.1rem;
    max-width: 26rem;
    line-height: 1.45;
    color: #334155;
}

.blend-merge-visual {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin: 1rem 0;
}

.blend-merge-piece {
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.65rem;
    border: 3px solid #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
    box-shadow: 0 6px 0 #c7d2fe;
}

.blend-merge-join {
    font-size: 1.5rem;
    font-weight: 900;
    color: #818cf8;
}

.sound-practice-container {
    text-align: center;
    padding: 0.45rem 0.65rem 0.55rem;
}

.pattern-sequence-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 1.25rem 0;
}

.pattern-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: linear-gradient(160deg, #fff8fc, #eef6ff);
    border: 2px solid rgba(99, 102, 241, 0.22);
    min-width: 6.5rem;
    min-height: 7.5rem;
}

.pattern-tile .word-emoji {
    font-size: 3.25rem;
    line-height: 1.15;
}

.pattern-tile .pattern-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0.35rem;
}

.pattern-missing {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--accent-color);
    padding: 0.35rem 0.55rem 0.55rem;
    align-self: center;
}

.skill-page--sound-patterns .pattern-missing {
    animation: sound-pattern-q-glow 1.35s ease-in-out infinite;
}

@keyframes sound-pattern-q-glow {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.88;
    }
}

.sound-pattern-demo {
    max-width: 34rem;
    margin: 0 auto 1.15rem;
    padding: 0.9rem 1rem 1rem;
    border-radius: 16px;
    background: linear-gradient(165deg, #f8fafc, #fff7fb);
    border: 2px dashed rgba(236, 72, 153, 0.35);
    text-align: center;
}

.sound-pattern-demo-label {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #db2777;
}

.sound-pattern-demo-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.4rem;
    margin-bottom: 0.5rem;
}

.sound-pattern-demo-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.35rem 0.45rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(99, 102, 241, 0.2);
    font-size: 1.75rem;
    line-height: 1;
    animation: sound-pattern-demo-pop 2.4s ease-in-out infinite;
}

.sound-pattern-demo-chip small {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 0.15rem;
}

.sound-pattern-demo-chip:nth-child(1) {
    animation-delay: 0s;
}
.sound-pattern-demo-chip:nth-child(3) {
    animation-delay: 0.2s;
}
.sound-pattern-demo-chip:nth-child(5) {
    animation-delay: 0.4s;
}
.sound-pattern-demo-chip:nth-child(7) {
    animation-delay: 0.6s;
}

.sound-pattern-demo-sep {
    font-size: 1rem;
    font-weight: 800;
    color: #cbd5e1;
    animation: none;
}

.sound-pattern-demo-qchip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3.25rem;
    padding: 0.25rem 0.45rem;
    border-radius: 12px;
    background: rgba(253, 242, 248, 0.95);
    border: 2px solid rgba(236, 72, 153, 0.45);
    font-size: 1.65rem;
    font-weight: 900;
    color: #db2777;
    animation: sound-pattern-q-glow 1.35s ease-in-out infinite;
}

.sound-pattern-demo-hint {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.45;
    color: #475569;
}

.sound-pattern-lead {
    max-width: 32rem;
    margin: 0 auto 0.5rem;
    line-height: 1.5;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.sound-pattern-task {
    margin: 0.5rem 0 1rem;
    font-weight: 600;
}

@keyframes sound-pattern-demo-pop {
    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: none;
    }
    40% {
        transform: translateY(-4px) scale(1.04);
        box-shadow: 0 8px 16px rgba(99, 102, 241, 0.12);
    }
}

.vowel-long-caption {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.vowel-frame-display {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 1rem 0;
    color: #5b21b6;
}

.vowel-story-box .vowel-story-text {
    text-align: left;
    max-width: 28rem;
    margin: 0 auto 1rem;
    font-size: 1.15rem;
    line-height: 1.5;
}

.vowel-story-box .vowel-story-text p {
    margin: 0.5rem 0;
}

.letter-display.vowel-match-letter {
    font-size: clamp(3.25rem, 13vw, 4.75rem);
    margin: 0.2rem 0 0.35rem;
    line-height: 1;
}

.word-recognition-label {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4338ca;
    margin: 0.35rem 0;
    letter-spacing: 0.02em;
}

.word-puzzle-scramble {
    line-height: 1.3;
    word-break: break-word;
}

.reading-story + .reading-prompt {
    margin-top: 1rem;
}

.reading-prompt {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Single-column layout; “How to play” is only the global green floating tab (main.js). */
.reading-fun-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 'main';
    gap: 0.75rem 1rem;
    align-items: stretch;
    width: 100%;
    min-height: 0;
}

.reading-fun-main {
    grid-area: main;
    min-width: 0;
}

/* Shared body size: story, question, labels, and how-to text (title stays larger) */
.skill-page--reading-fun {
    --reading-fun-body-size: clamp(1.18rem, 2.4vw, 1.34rem);
    --reading-fun-title-size: clamp(1.72rem, 4.2vw, 2.15rem);
    padding-top: 0.2rem;
}

/* Title first (largest), Hear again directly under — purple pill, white label */
.reading-fun-title-block {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: -0.15rem auto 0.45rem;
    max-width: 40rem;
    width: 100%;
}

.reading-fun-title-block .reading-fun-title {
    margin: 0;
    text-align: center;
    width: 100%;
    font-size: var(--reading-fun-title-size);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

/* Learn with example + Hear again — equal width, same height */
.reading-fun-hear-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.65rem 0.85rem;
    width: 100%;
    max-width: 36rem;
}

.reading-fun-hear-row > .reading-fun-hear-btn--title,
.reading-fun-hear-row > .reading-fun-learn-example-btn {
    margin: 0;
    min-height: 2.85rem;
    flex: 1 1 12rem;
    min-width: 0;
    max-width: none;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.reading-fun-hear-row .reading-fun-learn-example-btn.hear-round-btn .hear-round-btn__label,
.reading-fun-hear-row .reading-fun-hear-btn--title.hear-round-btn .hear-round-btn__label {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

/* Top navigation bar: ← Skills on left, Show Me on right */
.msh-sp-top-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
/* Strip the bottom margin the back-btn normally has — inside top bar it's not needed */
.msh-sp-top-bar .english-skills-back-btn {
    margin-bottom: 0;
}
#msh-showme-slot {
    flex: 0 0 auto;
}
#msh-showme-slot .msh-learn-with-example-wrap {
    margin: 0;
}
/* Match Show Me pill exactly to ← Skills / Previous / Next size */
#msh-showme-slot .msh-learn-with-example-btn.hear-round-btn {
    min-height: unset;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    gap: 0.4rem;
    margin: 0;
}
#msh-showme-slot .msh-learn-with-example-btn.hear-round-btn .hear-round-btn__icon {
    font-size: 1em;
}
#msh-showme-slot .msh-learn-with-example-btn.hear-round-btn .hear-round-btn__label {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Word-clue row: word prompt side by side (button now in top bar, not here) */
.msh-clue-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.5rem auto 0.6rem;
    max-width: 36rem;
    width: 100%;
    padding: 0 0.25rem;
}
.msh-clue-row p,
.msh-clue-row h2 {
    margin: 0;
    flex: 1 1 auto;
    text-align: left;
}

/* When Show Me is inside .msh-clue-row, make it compact / inline */
.msh-clue-row .msh-learn-with-example-wrap {
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}
.msh-clue-row .msh-learn-with-example-btn.hear-round-btn {
    min-height: 2.2rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.88rem;
}
.msh-clue-row .msh-learn-with-example-btn.hear-round-btn .hear-round-btn__label {
    font-size: 0.88rem;
}

/* Show Me inside motor .activity-title-row — same compact style */
.activity-title-row .msh-learn-with-example-wrap {
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}
.activity-title-row .msh-learn-with-example-btn.hear-round-btn {
    min-height: 2.2rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.88rem;
}
.activity-title-row .msh-learn-with-example-btn.hear-round-btn .hear-round-btn__label {
    font-size: 0.88rem;
}

/* Injected “Learn with example” on skill pages that don’t use Reading Fun layout */
.msh-learn-with-example-wrap {
    margin: 0.4rem auto 0.75rem;
    text-align: center;
    width: 100%;
    max-width: 36rem;
}

.msh-learn-with-example-btn.hear-round-btn {
    min-height: 2.85rem;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6 !important;
    border: 3px solid rgba(91, 33, 182, 0.28);
    box-shadow: 0 4px 0 rgba(124, 58, 237, 0.2), 0 6px 14px rgba(124, 58, 237, 0.18);
}

.msh-learn-with-example-btn.hear-round-btn .hear-round-btn__label {
    font-size: 1.05rem;
    font-weight: 800;
}

/* Sentence: / Question: on the same row start as the text (label + content) */
.reading-fun-line-block {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.45rem 0.6rem;
    max-width: 32rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.reading-fun-line-block--question {
    margin-top: 0.95rem;
}

.reading-fun-label-prefix {
    flex: 0 0 auto;
    font-size: var(--reading-fun-body-size);
    font-weight: 400;
    line-height: 1.5;
    color: #1e293b;
    padding-top: 0.5rem;
}

.reading-fun-line-block--question .reading-fun-label-prefix {
    padding-top: 0.45rem;
}

.reading-fun-line-block .vowel-story-text,
.reading-fun-line-block .reading-prompt--kids {
    flex: 1 1 auto;
    min-width: 0;
}

.reading-fun-line-block--sentence:has(.vowel-story-text:empty) {
    display: none;
}

/* Grammar-style reading pages (e.g. Naming Words): one short hint */
.reading-fun-compact-hint {
    max-width: 36rem;
    margin: 0 auto 0.25rem;
    padding: 0.38rem 0.6rem;
    font-size: var(--reading-fun-body-size, clamp(1.18rem, 2.4vw, 1.34rem));
    line-height: 1.45;
    text-align: center;
    font-weight: 400;
    color: #334155;
    background: rgba(239, 246, 255, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.skill-page--reading-fun-compact .reading-fun-title-block {
    margin-bottom: 0.2rem;
}

.skill-page--reading-fun-compact .reading-fun-story-card {
    padding-top: 0.45rem;
    padding-bottom: 1rem;
}

.skill-page--reading-fun-compact .vowel-story-text:empty {
    display: none;
    margin: 0;
    padding: 0;
    min-height: 0;
}

.skill-page--reading-fun-compact .reading-fun-line-block--question {
    margin-top: 0.45rem;
}

/* Must override .play-sound-btn { color: white } — light bg + white text was unreadable; use purple + white */
.reading-fun-hear-btn--title.play-sound-btn.hear-round-btn {
    background: linear-gradient(180deg, #7c3aed 0%, var(--primary-color) 45%, #5b21b6 100%);
    color: #fff !important;
    border: 3px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 0 #4c1d95, 0 8px 20px rgba(79, 70, 229, 0.35);
    padding: 0.45rem 1.35rem 0.45rem 1.1rem;
    margin: 0;
    font-size: 1.05rem;
}

.reading-fun-hear-btn--title.play-sound-btn.hear-round-btn:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: #fff !important;
    transform: scale(1.04);
}

.reading-fun-hear-btn--title.play-sound-btn.hear-round-btn:focus-visible {
    outline: 3px solid #c4b5fd;
    outline-offset: 3px;
}

.reading-fun-hear-btn--title {
    flex-shrink: 0;
    line-height: 1;
    border-radius: 999px;
}

.reading-fun-hear-btn--title.hear-round-btn .hear-round-btn__icon {
    font-size: 1.35rem;
}

.reading-fun-hear-btn--title.hear-round-btn .hear-round-btn__label {
    font-size: 1.05rem;
    font-weight: 600;
    color: inherit;
}

.reading-fun-hear-wrap {
    text-align: center;
    margin: 0.35rem auto 0.55rem;
}

.reading-fun-hear-wrap--top {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.reading-fun-hear-wrap .reading-fun-hear-btn {
    margin: 0.25rem 0;
}

.reading-fun-hear-btn--large {
    font-size: 1.45rem;
    padding: 0.85rem 1.65rem;
}

.reading-fun-hear-btn--large.hear-round-btn .hear-round-btn__label {
    font-size: 1.45rem;
}

.reading-fun-hear-btn--in-card.hear-round-btn .hear-round-btn__label {
    font-size: 1.45rem;
}

.reading-fun-hear-wrap--in-card {
    margin: 0 auto 1rem;
    padding: 0.85rem 0.9rem;
    max-width: min(36rem, 100%);
    border-radius: 14px;
    background: linear-gradient(165deg, #fef3c7, #fef9c3);
    border: 2px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.12);
}

.reading-fun-hear-wrap--in-card .reading-fun-hear-btn--in-card {
    width: 100%;
    font-size: 1.45rem;
    font-weight: 800;
    padding: 0.75rem 1.1rem;
    margin: 0;
}

/* Title band → body: same simple line as footer nav (all skill pages) */
.skill-page--reading-fun .reading-fun-page-header {
    margin-bottom: 0;
}

.skill-page--reading-fun .reading-fun-page-body {
    margin-top: 0;
}

.skill-page--reading-fun .reading-fun-page-footer .skill-navigation {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
}

.skill-page--reading-fun .reading-fun-page-header::after,
.skill-page:not(.skill-page--reading-fun) > h2::after,
.skill-page:not(.skill-page--reading-fun) > .activity-title-row::after {
    content: '';
    display: block;
    width: 100%;
    max-width: min(40rem, 100%);
    margin: 0.4rem auto 0.7rem;
    border-top: 2px solid var(--border-color);
    pointer-events: none;
}

.skill-page:not(.skill-page--reading-fun) > h2::after {
    margin-top: 0.25rem;
}

.skill-page:not(.skill-page--reading-fun) > .activity-title-row::after {
    margin-top: 0.15rem;
    margin-bottom: 0.6rem;
}

.skill-page--reading-fun .reading-fun-story-card {
    padding-top: 1.05rem;
    padding-bottom: 1rem;
}

.skill-page--reading-fun .vowel-story-box .vowel-story-text {
    margin-bottom: 0.45rem;
}

.skill-page--reading-fun .reading-story--kids p {
    font-size: var(--reading-fun-body-size);
    line-height: 1.5;
    margin: 0.4rem 0;
    padding: 0.5rem 0.75rem;
    text-align: left;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.98));
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    font-weight: 400;
    color: #1e293b;
}

.skill-page--reading-fun .reading-fun-line-block .reading-story--kids p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.skill-page--reading-fun .reading-fun-line-block .reading-story--kids p:first-child {
    margin-top: 0;
}

.skill-page--reading-fun .reading-story--kids strong {
    font-weight: 500;
}

.skill-page--reading-fun .reading-prompt--kids {
    font-size: var(--reading-fun-body-size);
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.45rem 0.6rem;
    background: #fffbeb;
    border-radius: 10px;
    border: 2px solid rgba(245, 158, 11, 0.35);
    font-weight: 400;
}

.skill-page--reading-fun .reading-fun-line-block .reading-prompt--kids {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.skill-page--reading-fun .reading-prompt--kids strong {
    font-weight: 500;
}

.skill-page--reading-fun .word-options--reading-fun {
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.skill-page--reading-fun .word-options--reading-fun .word-option-btn {
    min-height: 7.85rem;
    padding: 0.75rem 0.65rem 0.85rem;
    justify-content: center;
}

.skill-page--reading-fun .word-options--reading-fun .word-option-btn .word-emoji {
    font-size: clamp(3.55rem, 8.25vw, 4.7rem);
    line-height: 1;
}

.skill-page--reading-fun .word-options--reading-fun .word-option-btn .word-name {
    font-size: var(--reading-fun-body-size);
    font-weight: 500;
}

.writing-sentence {
    font-size: 1.2rem;
    line-height: 1.45;
    margin: 0.5rem 0;
}

.picture-story-line {
    font-size: 1.75rem;
    letter-spacing: 0.15em;
    text-align: center;
    margin: 0.75rem 0;
}

.giggle-line {
    color: #5b21b6;
}

.sentence-rule-choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem auto 0;
    max-width: 32rem;
    text-align: left;
}

.sentence-rule-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(165deg, #fffafd, #f3f6ff);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sentence-rule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.15);
}

.sentence-rule-label {
    flex-shrink: 0;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 1.5rem;
}

.sentence-rule-text {
    font-size: 1.1rem;
    line-height: 1.45;
    color: var(--text-dark);
}

.grammar-name-sample {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4338ca;
    margin: 0.75rem 0;
}

.punctuation-line {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0.5rem 0 1rem;
    color: var(--text-dark);
}

.punctuation-mark-grid .punctuation-mark-btn {
    font-size: 2rem;
    font-weight: 800;
    min-width: 3.5rem;
    min-height: 3.5rem;
}

.syllable-chunk-line {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #5b21b6;
    margin: 0.75rem 0;
}

.same-syllable-choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.same-syllable-btn {
    min-width: 11rem;
    padding: 0.85rem 1.25rem;
}

.syllable-match-hint {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0.5rem 0 1rem;
}

/* Syllable Match — first-page animated “what is a syllable?” demo */
.skill-page--syllable-match-intro .sound-practice-container {
    padding-top: 0.25rem;
}

.syllable-demo {
    text-align: center;
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.75rem 0.85rem;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.syllable-demo__heading {
    margin: 0 0 0.35rem;
    font-size: clamp(1.15rem, 3.8vw, 1.35rem);
    font-weight: 800;
    color: #4338ca;
}

.syllable-demo__lead {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
    line-height: 1.45;
    color: var(--text-dark);
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.syllable-demo__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.65rem 1rem;
    margin: 0.5rem 0 0.35rem;
}

.syllable-demo-card {
    flex: 1 1 140px;
    max-width: 200px;
    padding: 0.5rem 0.45rem 0.55rem;
    background: var(--white);
    border-radius: 14px;
    border: 2px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.syllable-demo-card__emoji {
    font-size: 2rem;
    line-height: 1;
    display: block;
    margin-bottom: 0.35rem;
}

.syllable-demo-card__chunks {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.25rem;
    min-height: 2.5rem;
    margin: 0.25rem 0;
}

.syllable-demo-card__chunks--one .syllable-demo-beat {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
}

.syllable-demo-card__two .syllable-demo-beat--a {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
    animation-delay: 0s;
}

.syllable-demo-card__two .syllable-demo-beat--b {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
    animation-delay: 1.2s;
}

.syllable-demo-dot {
    font-weight: 800;
    color: #94a3b8;
    font-size: 1.25rem;
    user-select: none;
}

.syllable-demo-beat {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: #1e3a8a;
    background: linear-gradient(180deg, #eef2ff, #e0e7ff);
    border: 2px solid rgba(99, 102, 241, 0.35);
}

.syllable-demo-card__claps {
    display: block;
    font-size: 1.35rem;
    margin: 0.2rem 0;
    animation: syllableDemoClap 2.4s ease-in-out infinite;
}

.syllable-demo-card__two + .syllable-demo-card__claps {
    animation-delay: 0.15s;
}

.syllable-demo-card__caption {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.35;
}

.syllable-demo__practice-hint {
    margin: 0.55rem 0 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #334155;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

@keyframes syllableDemoPulse {
    0%,
    35%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        border-color: rgba(99, 102, 241, 0.35);
    }
    12% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2);
        border-color: rgba(99, 102, 241, 0.75);
    }
}

@keyframes syllableDemoClap {
    0%,
    35%,
    100% {
        transform: scale(1);
        opacity: 0.85;
    }
    12% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .syllable-demo-beat,
    .syllable-demo-card__claps {
        animation: none !important;
    }
}

.skill-page--syllable-clap-intro .sound-practice-container {
    padding-top: 0.25rem;
}

/* Compact “what are syllables?” reminder on every syllable game screen (except page-1 full demo) */
.skill-page--syllable-tipped .sound-practice-container {
    padding-top: 0.2rem;
}

.syllable-quick-tip {
    text-align: center;
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.5rem 0.5rem;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.07);
    border: 1px dashed rgba(99, 102, 241, 0.38);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.syllable-quick-tip__l1 {
    margin: 0 0 0.28rem;
    font-size: clamp(0.86rem, 2.6vw, 0.95rem);
    line-height: 1.4;
    color: var(--text-dark);
}

.syllable-quick-tip__l2 {
    margin: 0;
    font-size: clamp(0.82rem, 2.4vw, 0.9rem);
    line-height: 1.4;
    color: #475569;
}

.syllable-quick-tip__mini {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 0.55rem 1rem;
    margin-top: 0.4rem;
}

.syllable-quick-tip__mini-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.18rem 0.32rem;
}

.syllable-quick-tip__mini-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.syllable-quick-tip__beat {
    display: inline-block;
    padding: 0.1rem 0.38rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #1e3a8a;
    background: linear-gradient(180deg, #eef2ff, #e0e7ff);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.syllable-quick-tip__beat--solo {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
}

.syllable-quick-tip__mini-item--split .syllable-quick-tip__beat--a {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
    animation-delay: 0s;
}

.syllable-quick-tip__mini-item--split .syllable-quick-tip__beat--b {
    animation: syllableDemoPulse 2.4s ease-in-out infinite;
    animation-delay: 1.2s;
}

.syllable-quick-tip__dot {
    font-weight: 800;
    color: #94a3b8;
    font-size: 1rem;
    user-select: none;
}

.syllable-quick-tip__hands {
    font-size: 0.95rem;
    letter-spacing: -0.05em;
}

.syllable-quick-tip__num {
    font-weight: 800;
    color: #4338ca;
    font-size: 0.85rem;
    margin-left: 0.1rem;
}

@media (prefers-reduced-motion: reduce) {
    .syllable-quick-tip__beat--solo,
    .syllable-quick-tip__mini-item--split .syllable-quick-tip__beat--a,
    .syllable-quick-tip__mini-item--split .syllable-quick-tip__beat--b {
        animation: none !important;
    }
}

.syllable-clap-with-me-wrap {
    display: flex;
    justify-content: center;
    margin: 0.35rem 0 0.65rem;
}

.syllable-clap-with-me-btn.hear-round-btn {
    margin: 0.25rem 0;
}

.letter-display {
    font-size: clamp(3.5rem, 15vw, 5.5rem);
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.2rem 0 0.4rem;
    line-height: 1;
}

.abc-game-container {
    text-align: center;
    padding: 0.35rem 0.5rem 0.5rem;
}

.abc-sequence {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: clamp(2.25rem, 8vw, 3.25rem);
}

.abc-letter {
    font-weight: bold;
    color: var(--primary-color);
}

.abc-missing {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 5rem;
}

.skill-feedback {
    margin: 0.35rem 0;
    text-align: center;
    min-height: 0;
}

.skill-feedback:empty {
    margin: 0;
    padding: 0;
    display: none;
}

.feedback-correct {
    background: #d4edda;
    color: #155724;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    border: 2px solid #c3e6cb;
}

.feedback-incorrect {
    background: #f8d7da;
    color: #721c24;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    border: 2px solid #f5c6cb;
}

.skill-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 2px solid var(--border-color);
}

.skill-navigation button {
    padding: 0.65rem 1.25rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.skill-navigation button:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.skill-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skill-navigation span {
    font-weight: bold;
    color: var(--text-light);
}

/* Math Skills Specific Styles */
.number-display-container {
    text-align: center;
    padding: 2rem;
}

.big-number {
    font-size: 10rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 2rem 0;
    line-height: 1;
}

.number-game-container, .count-container {
    text-align: center;
    padding: 2rem;
}

.items-display, .pictures-grid, .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.item-box, .picture-item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.number-option-btn {
    padding: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
}

.number-option-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.number-sequence {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    font-size: 3rem;
    flex-wrap: wrap;
}

.sequence-number {
    font-weight: bold;
    color: var(--primary-color);
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    min-width: 80px;
    text-align: center;
}

.sequence-number.missing {
    color: var(--accent-color);
    font-size: 4rem;
    border: 3px dashed var(--accent-color);
}

.number-order-container, .count-forward-container, .count-backward-container {
    text-align: center;
    padding: 2rem;
}

.number-friends-container {
    text-align: center;
    padding: 2rem;
}

.friend-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    font-size: 3rem;
    flex-wrap: wrap;
}

.friend-box {
    padding: 1.5rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 10px;
    font-weight: bold;
    font-size: 2.5rem;
}

.friend-plus, .friend-equals {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
}

/* Shape Styles */
.shape-container, .find-shape-container {
    text-align: center;
    padding: 2rem;
}

.big-shape {
    font-size: 10rem;
    margin: 2rem 0;
}

.shapes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.shape-option-btn {
    padding: 1.5rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.shape-option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.shape-icon {
    font-size: 4rem;
}

.shape-icon-large {
    font-size: 8rem;
}

.shape-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-dark);
}

.shape-fun-container .big-shape {
    line-height: 1;
}

.shape-fun-prompt {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0 0.25rem;
}

.shape-fun-hint {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.shape-fun-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.shape-fun-actions .play-sound-btn {
    margin: 0;
}

.play-sound-btn--secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.play-sound-btn--secondary:hover {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Responsive Design for English Skills */
@media (max-width: 768px) {
    .alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.5rem;
    }
    
    .letter-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .big-letter, .letter-display {
        font-size: clamp(2.75rem, 12vw, 4rem);
        margin: 0.15rem 0;
    }
    
    .big-number {
        font-size: 6rem;
    }
    
    .big-shape {
        font-size: 6rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .match-container .options-grid.options-grid--match-letters-seven {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        max-width: 100%;
        gap: 0.5rem;
    }

    .match-container .options-grid.options-grid--match-letters-seven .option-btn {
        padding: 0.65rem 0.35rem;
        font-size: 1.25rem;
    }

    .listen-container .options-grid.options-grid--listen-seven {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        max-width: 100%;
        gap: 0.5rem;
    }

    .listen-container .options-grid.options-grid--listen-seven .letter-option-btn {
        padding: 0.65rem 0.35rem;
        font-size: 1.25rem;
    }

    .listen-choose-lead {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .sound-practice-container .options-grid.options-grid--beginning-sounds-five {
        max-width: 100%;
        gap: 0.45rem;
    }

    .sound-practice-container .options-grid.options-grid--beginning-sounds-five .letter-option-btn {
        padding: 0.55rem 0.2rem;
        font-size: 1.15rem;
        min-height: 48px;
    }

    .beginning-sounds-emoji {
        font-size: 4.5rem;
    }

    .beginning-sounds-lead {
        font-size: 0.92rem;
        padding: 0 0.5rem;
    }

    .sound-match-clue-emoji {
        font-size: 4.25rem;
    }

    .sound-match-lead,
    .break-words-lead {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .break-word-split {
        padding: 0.75rem 1rem;
    }

    .break-rest {
        font-size: 1.65rem;
    }

    .pattern-tile {
        min-width: 5rem;
        min-height: 6.25rem;
        padding: 0.6rem 0.75rem;
    }

    .pattern-tile .word-emoji {
        font-size: 2.6rem;
    }

    .pattern-tile .pattern-name {
        font-size: 0.95rem;
    }

    .pattern-missing {
        font-size: 2.5rem;
    }
    
    .word-options {
        grid-template-columns: 1fr;
    }
    
    .items-grid, .pictures-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .counting-groups {
        grid-template-columns: 1fr;
    }

    .counting-groups .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(60px, 100%), 1fr));
    }
    
    .item-box, .picture-item {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .number-option-btn {
        font-size: 2rem;
        padding: 1rem;
    }
}

/* Interactive Pattern and Sort Styles */
.pattern-container {
    text-align: center;
    padding: 2rem;
}

.pattern-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pattern-slot {
    width: 80px;
    height: 80px;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--white);
    transition: all 0.3s;
}

.pattern-slot.empty-slot {
    border: 3px dashed var(--accent-color);
    background: var(--bg-light);
    cursor: pointer;
}

.pattern-slot.empty-slot:hover {
    background: var(--accent-color);
    opacity: 0.3;
}

.pattern-slot.filled-slot {
    border-color: var(--primary-color);
    background: var(--white);
}

.pattern-container--pictures .pattern-display {
    gap: 0.65rem;
}

.pattern-container--pictures .pattern-slot,
.pattern-container--pictures .pattern-picture-option {
    font-size: 2.75rem;
    line-height: 1;
}

.color-options, .shape-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.color-option, .shape-option {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.color-option:hover, .shape-option:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.color-option:active, .shape-option:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.sequence-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.sequence-item {
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--white);
}

.sequence-item.question-mark {
    border: 3px dashed var(--accent-color);
    background: var(--bg-light);
    font-size: 4rem;
    color: var(--accent-color);
}

.next-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.next-option-btn {
    width: 100px;
    height: 100px;
    font-size: 3rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.next-option-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pattern-recognition-assoc {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

.assoc-intro {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.assoc-hero {
    font-size: clamp(4rem, 12vw, 6rem);
    line-height: 1.1;
    margin: 0.5rem 0 1rem;
}

.assoc-prompt {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
}

.assoc-hint {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.assoc-options .assoc-option-btn {
    font-size: 2.75rem;
    line-height: 1;
}

.pattern-builder {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pattern-builder-slot {
    width: 100px;
    height: 100px;
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    transition: all 0.3s;
}

.pattern-builder-slot:hover {
    border-color: var(--primary-color);
    background: var(--accent-color);
    opacity: 0.3;
}

.slot-number {
    font-size: 0.8rem;
    color: var(--text-light);
    position: absolute;
    top: 5px;
    left: 5px;
}

.builder-items {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.builder-item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.builder-item:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.builder-item:active {
    cursor: grabbing;
}

.check-pattern-btn, .check-sort-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 1rem 0;
    transition: all 0.3s;
}

.check-pattern-btn:hover, .check-sort-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Big or Small Styles */
.big-small-container {
    text-align: center;
    padding: 2rem;
}

.question-item {
    margin: 2rem 0;
}

.item-display {
    font-size: 8rem;
    margin: 1rem 0;
}

.sort-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sort-area {
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    background: var(--bg-light);
    min-height: 200px;
    transition: all 0.3s;
}

.sort-area.big-area {
    border-color: #FF6B6B;
}

.sort-area.small-area {
    border-color: #4ECDC4;
}

.sort-area.near-area {
    border-color: #22c55e;
    background: linear-gradient(180deg, #f0fdf4 0%, var(--bg-light) 100%);
}

.sort-area.far-area {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #eff6ff 0%, var(--bg-light) 100%);
}

.near-far-container .near-far-intro {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 0.5rem;
    line-height: 1.45;
}

.sort-area h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.sort-zone {
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    transition: all 0.3s;
}

.sort-area:hover .sort-zone {
    border-color: var(--primary-color);
    background: var(--white);
}

.draggable-item {
    width: 120px;
    height: 120px;
    font-size: 5rem;
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    transition: all 0.3s;
}

.draggable-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.draggable-item:active {
    cursor: grabbing;
}

/* More or Less Styles */
.more-less-container {
    text-align: center;
    padding: 2rem;
}

.comparison-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.more-less-container .comparison-display {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    gap: 0.5rem 1rem;
    margin: 1.5rem auto;
    max-width: 760px;
    flex-wrap: unset;
}

.number-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.more-less-container .number-group {
    width: 100%;
    max-width: 320px;
    gap: 0.75rem;
}

.number-count {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.more-less-container .number-count {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1;
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
}

.more-less-container .vs {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--text-light);
    padding: 0.35rem 0.5rem;
    align-self: center;
}

.more-less-container .items-display--more-less {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    max-width: 320px;
    min-height: 6rem;
    margin: 0 auto;
    padding: 0.75rem;
    box-sizing: border-box;
    background: rgba(249, 249, 249, 0.9);
    border-radius: 14px;
    border: 2px solid var(--border-color);
    grid-template-columns: unset;
}

.more-less-container .more-less-item.item-box {
    width: 3.75rem;
    height: 3.75rem;
    min-width: 3.75rem;
    min-height: 3.75rem;
    font-size: clamp(1.85rem, 5vw, 2.35rem);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
}

@media (max-width: 600px) {
    .more-less-container .comparison-display {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.comparison-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-btn {
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    border: 3px solid var(--primary-color);
    border-radius: 25px;
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.comparison-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.same-different-container {
    text-align: center;
    padding: 2rem;
}

.comparison-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-item {
    font-size: 8rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 15px;
}

/* Sort by Color Styles */
.sort-by-color-container {
    text-align: center;
    padding: 2rem;
}

.items-to-sort {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.sortable-item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.sortable-item:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.sortable-item:active {
    cursor: grabbing;
}

.color-sort-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.color-sort-area {
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    background: var(--bg-light);
    min-height: 150px;
}

.color-sort-area h4 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.color-sort-zone {
    min-height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    transition: all 0.3s;
}

.color-sort-area:hover .color-sort-zone {
    border-color: var(--primary-color);
    background: var(--white);
}

.sorted-item {
    font-size: 2rem;
    padding: 0.5rem;
}

.what-comes-next-container {
    text-align: center;
    padding: 2rem;
}

/* Additional Interactive Styles */
.counting-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.counting-group {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    background: var(--bg-light);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Inner grids must stay inside each column (global .items-grid uses max-width: 600px). */
.counting-groups .items-grid {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(min(72px, 100%), 1fr));
}

.countable-item {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.count-objects-container {
    text-align: center;
    padding: 2rem;
}

.items-to-drag {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.draggable-count-item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.draggable-count-item:hover {
    transform: scale(1.1);
}

.draggable-count-item:active {
    cursor: grabbing;
}

.counting-box {
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 400px;
    background: var(--bg-light);
}

.counted-items {
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.counted-item {
    font-size: 2rem;
    padding: 0.5rem;
}

.count-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 1rem;
}

/* Skill shell: allow tall activities (e.g. Count and Match) to scroll with the page */
#math-skill-content {
    overflow: visible;
    min-width: 0;
}

.count-match-container {
    text-align: center;
    padding: 0.75rem 0.5rem 1.25rem;
    max-width: 720px;
    margin: 0 auto;
    overflow: visible;
}

.count-match-drag-hint {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0.5rem 0 0.35rem;
}

.items-to-match, .draggable-items-group {
    margin: 0.85rem 0;
}

.items-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.items-group--draggable {
    cursor: grab;
    touch-action: none;
    border: 2px dashed rgba(102, 126, 234, 0.45);
}

.items-group--draggable:active {
    cursor: grabbing;
}

.match-item {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.numbers-to-match {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin: 0.85rem 0;
    flex-wrap: wrap;
}

.number-match-box {
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    background: var(--white);
    min-width: 120px;
}

.number-match-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.number-match-zone {
    min-height: 72px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.number-match-box:hover .number-match-zone {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.match-success {
    font-size: 3rem;
    color: var(--primary-color);
}

.click-count-container {
    text-align: center;
    padding: 2rem;
}

.clickable-items {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.clickable-item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.clickable-item:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.click-count-display {
    margin: 2rem 0;
    font-size: 1.5rem;
}

.check-click-count-btn {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s;
}

.check-click-count-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Creative Arts Drawing Styles */
.drawing-container, .draw-animal-container, .draw-shape-container, .draw-family-container {
    text-align: center;
    padding: 2rem;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.color-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.2);
    border-color: var(--primary-color);
}

.color-btn.active {
    border: 4px solid var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.drawing-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.clear-btn, .save-btn {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover, .save-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.follow-along-container {
    text-align: center;
    padding: 2rem;
}

/* Stacked tracing: gray guide underneath, transparent draw layer on top */
.trace-canvas-stack {
    position: relative;
    width: 100%;
    margin: 0 auto 0.75rem;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.trace-canvas-stack--md {
    max-width: 500px;
    aspect-ratio: 500 / 400;
}

.trace-canvas-stack--lg {
    max-width: 600px;
    aspect-ratio: 600 / 500;
}

.trace-guide-canvas,
.trace-draw-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.trace-guide-canvas {
    z-index: 1;
    pointer-events: none;
}

.trace-draw-canvas {
    z-index: 2;
    background: transparent;
    cursor: crosshair;
    touch-action: none;
}

.trace-draw-canvas--locked {
    cursor: wait;
    opacity: 0.94;
}

.skill-page--shape-lesson .shapes-kids-title,
.skill-page--shape-lesson h2 {
    text-align: center;
}

.shape-lesson-lead {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 0.75rem;
    font-size: 1.05rem;
    color: #4a3728;
    line-height: 1.5;
}

.shape-lesson-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 38rem;
    margin: 0 auto 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    border: 2px solid transparent;
}

.shape-lesson-banner--watch {
    background: linear-gradient(135deg, #e0f2fe 0%, #fce7f3 100%);
    border-color: rgba(56, 189, 248, 0.45);
    color: #0c4a6e;
}

.shape-lesson-banner--trace {
    background: linear-gradient(135deg, #ecfccb 0%, #fef9c3 100%);
    border-color: rgba(132, 204, 22, 0.5);
    color: #3f6212;
}

.shape-lesson-banner-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.shape-lesson-replay {
    display: block;
    margin: 0 auto 1rem;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0369a1;
    background: #fff;
    border: 2px dashed #7dd3fc;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.shape-lesson-replay:hover {
    background: #e0f2fe;
    transform: translateY(-1px);
}

/* Draw Your Family — preset chooser */
.skill-page--family-draw .family-draw-lead {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 0.85rem;
    font-size: 1.05rem;
    color: #4a3728;
    line-height: 1.5;
}

.family-preset-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    max-width: 44rem;
    margin: 0 auto 1.1rem;
}

.family-preset-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.55rem 0.75rem;
    min-width: 6.5rem;
    border-radius: 14px;
    border: 3px solid rgba(180, 190, 210, 0.65);
    background: linear-gradient(180deg, #fff 0%, #f3f6ff 100%);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: #3d2f24;
    line-height: 1.25;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.family-preset-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(110, 193, 255, 0.75);
    box-shadow: 0 6px 14px rgba(110, 193, 255, 0.2);
}

.family-preset-btn--active {
    border-color: #5b9bd5;
    background: linear-gradient(180deg, #e8f4ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.35), 0 4px 0 rgba(50, 100, 150, 0.2);
}

.family-preset-emoji {
    font-size: 1.35rem;
    line-height: 1;
}

.family-preset-label {
    text-align: center;
}

/* Creative Arts — Art Projects & mini activities (ages 3–4) */
.skill-page--art-mini .art-lead {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 1rem;
    font-size: 1.05rem;
    color: #4a3728;
    line-height: 1.5;
}

.creative-picture-prompt {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 0.75rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: #5c3d2e;
}

.make-patterns-wrap {
    padding: 0 0.5rem;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(var(--pattern-cols, 5), 1fr);
    gap: 0.4rem;
    max-width: 520px;
    margin: 0 auto 0.5rem;
}

.pattern-cell {
    aspect-ratio: 1;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    min-height: 2.75rem;
    transition: transform 0.12s ease;
}

.pattern-cell:hover {
    transform: scale(1.04);
    border-color: rgba(91, 155, 213, 0.6);
}

.mix-colors-play {
    text-align: center;
    padding: 0.5rem 1rem 1rem;
}

.mix-swatch-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.mix-swatch {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mix-plus {
    font-size: 2rem;
    font-weight: 800;
    color: #64748b;
}

.mix-reveal-btn {
    margin: 0.5rem auto;
    display: inline-block;
}

.mix-result {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.mix-result-swatch {
    width: 120px;
    height: 120px;
    margin: 0.75rem auto 0;
    border-radius: 16px;
    border: 3px solid rgba(0, 0, 0, 0.12);
}

.shape-art-wrap {
    text-align: center;
}

.shape-art-canvas {
    display: block;
    margin: 0 auto 0.75rem;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
}

.art-game-wrap {
    text-align: center;
    padding: 0.5rem;
}

.art-game-ask {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.art-game-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.25rem 0;
}

.art-game-choice {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 16px;
    border: 3px solid #c4dcf0;
    background: linear-gradient(180deg, #fff 0%, #f0f7ff 100%);
    cursor: pointer;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.art-game-choice:hover {
    transform: scale(1.06);
    border-color: var(--primary-color);
}

.show-art-wrap {
    text-align: center;
    padding: 0.5rem 1rem;
}

.show-art-celebrate {
    font-size: 2.75rem;
    margin: 1rem 0;
    letter-spacing: 0.2em;
}

.art-gallery-wrap {
    text-align: center;
}

.art-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    max-width: 560px;
    margin: 1rem auto;
}

.art-gallery-frame {
    background: linear-gradient(145deg, #fff8f0 0%, #ffe8f5 100%);
    border: 3px solid #e9d5ff;
    border-radius: 14px;
    padding: 1rem 0.5rem;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.art-gallery-frame-icon {
    font-size: 1.75rem;
}

.art-gallery-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b4b3e;
}

.creative-explore-taps {
    text-align: center;
    margin: 0.75rem 0;
}

.creative-explore-sparkle {
    min-height: 3rem;
    margin-top: 0.75rem;
}

.trace-hint {
    max-width: 36rem;
    margin: 0 auto 1rem;
    font-size: 0.95rem;
    color: #5c4033;
    line-height: 1.45;
    text-align: center;
}

.follow-along-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 1.25rem 0 0.5rem;
}

.follow-along-hint {
    max-width: 36rem;
    margin: 0.75rem auto 0;
    font-size: 0.95rem;
    color: #5c4033;
    line-height: 1.45;
}

.feedback-hint {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #ffc107;
}

.drawing-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.step-display, .your-drawing {
    text-align: center;
}

.next-step-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    margin: 1rem 0;
}

.animal-reference {
    margin: 1rem 0;
}

.animal-emoji {
    font-size: 6rem;
    margin: 1rem 0;
}

.color-shape-container, .color-by-number-container {
    text-align: center;
    padding: 2rem;
}

.number-colors {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.number-color-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.number-color-item .number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.arrange-container {
    text-align: center;
    padding: 2rem;
}

.arrange-slots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.arrange-slot {
    width: 100px;
    min-height: 100px;
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem;
    font-weight: bold;
    position: relative;
    transition: all 0.3s;
}

.arrange-slot .slot-idx {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
    line-height: 1;
}

.arrange-slot .slot-ch {
    font-size: 2.25rem;
    line-height: 1.1;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrange-slot:hover {
    border-color: var(--primary-color);
    background: var(--accent-color);
    opacity: 0.3;
}

.arrange-items {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.arrange-item {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
    font-weight: bold;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    background: var(--white);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.arrange-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.arrange-item:active {
    cursor: grabbing;
}

.arrange-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 1rem 0;
}

.check-arrange-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
}

.reset-arrange-btn {
    padding: 1rem 1.5rem;
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.reset-arrange-btn:hover {
    background: var(--bg-light);
}

@media (max-width: 768px) {
    .drawing-steps {
        grid-template-columns: 1fr;
    }
    
    .color-palette {
        gap: 0.3rem;
    }
    
    .color-btn {
        width: 40px;
        height: 40px;
    }
}

/* Motor Skills Styles */
.tracing-container {
    text-align: center;
    padding: 2rem;
}

.tracing-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.clear-btn, .check-btn {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover, .check-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.matching-game-container {
    text-align: center;
    padding: 2rem;
}

.target-item {
    margin: 2rem 0;
}

.item-display-large, .letter-display-large, .number-display-large, .shape-display-large, .color-display-large {
    font-size: 6rem;
    margin: 1rem 0;
}

.match-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.match-option-btn {
    padding: 2rem;
    background: var(--white);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-option-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.option-emoji {
    font-size: 4rem;
}

.option-name {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.sound-matching-container {
    text-align: center;
    padding: 0.5rem 0.75rem 1rem;
}

.memory-game-container {
    text-align: center;
    padding: 2rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: all 0.3s;
    position: relative;
}

.memory-card:hover {
    transform: scale(1.05);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back {
    background: var(--primary-color);
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
}

.card-front {
    background: var(--white);
    color: var(--text-dark);
}

.memory-score {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    color: var(--primary-color);
}

.sorting-container {
    text-align: center;
    padding: 2rem;
}

.items-to-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.sortable-item {
    font-size: 3rem;
    padding: 1rem;
    background: var(--white);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    cursor: grab;
    transition: all 0.3s;
    user-select: none;
}

.sortable-item .option-label {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-dark);
    font-weight: 700;
}

.sortable-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.sortable-item:active {
    cursor: grabbing;
}

.color-sort-areas, .size-sort-areas, .shape-sort-areas, .type-sort-areas, .hot-cold-sort-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.color-sort-area, .shape-sort-area, .type-sort-area {
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    background: var(--bg-light);
    min-height: 200px;
}

.color-sort-area h4, .shape-sort-area h4, .type-sort-area h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.color-sort-zone, .shape-sort-zone, .type-sort-zone {
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.sort-area {
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    background: var(--bg-light);
    min-height: 200px;
}

.sort-area h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.sort-zone {
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.sorted-item {
    font-size: 2rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 5px;
}

.check-sort-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 1rem 0;
    transition: all 0.3s;
}

.check-sort-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.shadow-matching-container {
    text-align: center;
    padding: 2rem;
}

.shadow-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.shadow-option-btn {
    padding: 2rem;
    background: var(--white);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 120px;
}

.shadow-option-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.shadow-display {
    font-size: 4rem;
}

.color-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.letter-option, .number-option {
    font-size: 3rem;
    font-weight: bold;
}

.shape-icon-large {
    font-size: 4rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@media (max-width: 768px) {
    .match-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .color-sort-areas, .size-sort-areas, .shape-sort-areas, .type-sort-areas {
        grid-template-columns: 1fr;
    }
}

.number-recognition-container {
    text-align: center;
    padding: 2rem;
}

.target-number-display {
    margin: 2rem 0;
}

.number-group-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.number-group-btn {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.number-group-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.number-group-btn.target {
    background: var(--accent-color);
    border-color: var(--primary-color);
}

.sequence-complete-container {
    text-align: center;
    padding: 2rem;
}

/* Measurement Fun (math-skills.js) */
.measure-compare {
    text-align: center;
    padding: 1rem 0.5rem 2rem;
    max-width: 640px;
    margin: 0 auto;
}

.measure-strips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    margin-top: 1rem;
}

.measure-strip-col {
    flex: 1 1 240px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.measure-strip-label {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.measure-strip-track {
    width: 100%;
    height: 32px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.measure-strip-inner {
    height: 100%;
    min-width: 0;
    transition: width 0.3s ease;
}

.measure-strip-fill {
    height: 100%;
    border-radius: 8px;
}

.measure-strip-fill--coral {
    background: linear-gradient(90deg, #ff7b7b, #ff9e9e);
}

.measure-strip-fill--sky {
    background: linear-gradient(90deg, #5b9eff, #7ec8ff);
}

.measure-choice-btn {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--primary-color);
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.measure-choice-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.measure-heavy-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.measure-heavy-card {
    border: 3px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem 1rem;
    background: var(--bg-light);
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.measure-heavy-emoji {
    font-size: 4.5rem;
    line-height: 1;
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.measure-caterpillar-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    margin-top: 1rem;
}

.measure-caterpillar-col {
    flex: 1 1 260px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.measure-caterpillar-track {
    padding: 0.5rem;
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    min-height: 3.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.measure-chain {
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.measure-blocks-wrap {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 1rem 0;
}

.measure-blocks-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: rgba(249, 249, 249, 0.9);
    border-radius: 14px;
    border: 2px solid var(--border-color);
}

.measure-block {
    font-size: 2rem;
    line-height: 1;
}

.measure-blocks-options {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.size-detective {
    text-align: center;
    padding: 1rem 0.5rem;
    max-width: 560px;
    margin: 0 auto;
}

.size-detective-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.size-detective-btn {
    width: 100px;
    height: 100px;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
    line-height: 1;
}

.size-detective-btn:hover {
    transform: scale(1.06);
    border-color: var(--primary-color);
}

/* Position & Space (math-skills.js) */
.position-scene {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

.position-box-scene {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
}

.position-box-frame {
    position: relative;
    width: 220px;
    height: 150px;
    border: 4px solid var(--primary-color);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.position-ball {
    position: absolute;
    font-size: 2.75rem;
    line-height: 1;
}

.position-ball--inside {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.position-ball--outside {
    right: -0.35rem;
    top: 40%;
    transform: translate(30%, -50%);
}

.position-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 1.25rem 0;
    min-height: 120px;
}

.position-stack--star-below {
    flex-direction: column-reverse;
}

.position-stack-item {
    font-size: 3.25rem;
    line-height: 1;
}

.position-lr-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin: 1.25rem 0;
    min-height: 100px;
}

.position-lr-row--flip {
    flex-direction: row-reverse;
}

.position-lr-item {
    font-size: 4rem;
    line-height: 1;
}

.position-fb-scene {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 130px;
    margin: 1.25rem 0;
}

.position-fb-house {
    font-size: 5rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.position-fb-tree {
    position: absolute;
    font-size: 4.25rem;
    line-height: 1;
    bottom: 0.25rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.position-fb-tree--front {
    left: calc(50% - 5.5rem);
    z-index: 2;
}

.position-fb-tree--behind {
    left: calc(50% - 1.5rem);
    z-index: 0;
    transform: scale(0.88);
    opacity: 0.88;
}

.position-two-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.position-choice-btn {
    padding: 0.65rem 1.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--primary-color);
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-choice-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.position-caption {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.position-word-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.position-word-btn {
    padding: 0.55rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: capitalize;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
}

.position-word-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.position-find-scene {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem auto;
    padding: 1rem;
    max-width: 360px;
    background: rgba(249, 249, 249, 0.95);
    border-radius: 14px;
    border: 2px solid var(--border-color);
}

.position-find--above {
    flex-direction: column;
}

.position-find--below {
    flex-direction: column;
}

.position-find--lr {
    flex-direction: row;
}

.position-find-item {
    font-size: 3rem;
    line-height: 1;
}

.position-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 280px;
    margin: 1rem auto 0;
}

.position-pick-btn {
    min-height: 76px;
    font-size: 2.35rem;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.position-pick-btn:hover {
    transform: scale(1.04);
    border-color: var(--primary-color);
}

/* Same and Different (math-skills.js) */
.same-diff-wrap {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

.same-diff-target {
    font-size: 5rem;
    line-height: 1.1;
    margin: 0.75rem 0 1rem;
    padding: 0.5rem;
    background: rgba(239, 246, 255, 0.9);
    border-radius: 16px;
    border: 3px dashed var(--primary-color);
}

.same-diff-pick-grid {
    max-width: 300px;
}

.same-diff-pick-grid--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 320px;
}

/* Longer & Shorter — three-strip compare */
.length-three-strips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.25rem;
    margin-top: 1rem;
}

.length-strip-col {
    flex: 1 1 140px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.measure-strip-track--tall {
    height: 36px;
}

.measure-hands-wrap .measure-hands-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: rgba(255, 251, 235, 0.95);
    border-radius: 14px;
    border: 2px solid var(--border-color);
}

.measure-hand {
    font-size: 2.25rem;
    line-height: 1;
}

/* One More / One Less (math-skills.js) */
.one-more-less-wrap {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

.one-more-less-items {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto !important;
    max-width: 100% !important;
    grid-template-columns: unset !important;
}

.one-more-less-items .item-box {
    width: 52px;
    height: 52px;
    font-size: 1.65rem;
    margin: 0;
}

/* Activity step save toast (all subjects; optional MSH_ACTIVITY_SUBMIT_URL / mshActivitySubmitToBackend) */
.msh-activity-submit-toast,
.msh-music-pilot-toast {
    position: fixed;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    max-width: min(92vw, 26rem);
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #0f172a;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    z-index: 10060;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.msh-activity-submit-toast.msh-activity-submit-toast--visible,
.msh-music-pilot-toast.msh-music-pilot-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Parent dashboard (menu + stats ribbon + notifications) --- */
.page-parent-dashboard {
    background: var(--bg-light);
}

body.dashboard-drawer-no-scroll {
    overflow: hidden;
}

.dashboard-site-header {
    z-index: 1000;
}

.dashboard-header-row {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.dashboard-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.dashboard-menu-toggle span {
    display: block;
    height: 2px;
    width: 20px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1px;
}

.dashboard-brand-compact {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
}

.dashboard-brand-icon svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.dashboard-stats-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 1 1 200px;
    min-width: 0;
}

.dashboard-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
    color: #fff;
}

.dashboard-stat-label {
    font-weight: 700;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-stat-value {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
}

.dashboard-stat-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.dashboard-stat-sub {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-top: 0.15rem;
}

.dashboard-mastery-bars {
    display: flex;
    gap: 3px;
    width: 100%;
    max-width: 72px;
    height: 6px;
    margin-top: 0.2rem;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.dashboard-mastery-bar {
    display: block;
    height: 100%;
    border-radius: 2px;
    min-width: 4px;
}

.dashboard-mastery-bar--gold {
    background: #fbbf24;
}

.dashboard-mastery-bar--green {
    background: #34d399;
}

.dashboard-mastery-bar--purple {
    background: #a78bfa;
}

.dashboard-header-row .dashboard-top-nav {
    flex: 1 1 auto;
    justify-content: center;
}

.dashboard-header-row .dashboard-header-auth {
    margin-left: auto;
}

.dashboard-mobile-nav-toggle {
    margin-left: 0;
}

.dashboard-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1090;
}

.dashboard-drawer-backdrop[hidden] {
    display: none;
}

.dashboard-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(88vw, 300px);
    height: 100%;
    background: #fff;
    z-index: 1100;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
}

.dashboard-drawer--open {
    transform: translateX(0);
}

.dashboard-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
}

.dashboard-drawer-title {
    font-weight: 800;
    font-size: 1.05rem;
}

.dashboard-drawer-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.dashboard-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.25rem;
    overflow-y: auto;
}

.dashboard-drawer-nav a {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.95rem;
}

.dashboard-drawer-nav a:hover {
    background: #f1f5f9;
}

.dashboard-shell {
    padding: 1rem 0 2rem;
}

.dashboard-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr 320px;
        align-items: start;
        gap: 1.5rem;
    }

    .dashboard-notifications-column {
        position: sticky;
        top: 5.5rem;
    }
}

.dashboard-main-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-panel--hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.06) 100%);
}

.dashboard-notifications-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1rem 0.85rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-notifications-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    color: #0f172a;
}

.dashboard-notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-notification-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.dashboard-notification-item:last-child {
    border-bottom: none;
}

.dashboard-notification-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4338ca;
    margin-bottom: 0.25rem;
}

.dashboard-notification-body {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #334155;
}

.dashboard-notification-time {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.dashboard-notifications-foot {
    font-size: 0.75rem;
    margin: 0.75rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
}

.dashboard-pending-list {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
}

.dashboard-login-meta p {
    margin: 0.35rem 0;
}

@media (max-width: 900px) {
    .dashboard-stats-ribbon {
        order: 10;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .dashboard-header-row .dashboard-top-nav {
        order: 11;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .dashboard-header-row .dashboard-header-auth {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-stat-chip {
        font-size: 0.68rem;
        padding: 0.3rem 0.45rem;
    }

    .dashboard-stat-value {
        font-size: 0.85rem;
    }

    /* Keep Sign out visible on dashboard (global rule hides .header-auth-slot on small screens) */
    .page-parent-dashboard .dashboard-header-auth.header-auth-slot {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.35rem;
        align-items: center;
    }
}

/* ============================================================
 * Help beacon pulse — "Learn with example" button animation
 * Triggered by mshTrackWrong() after 4+ wrong answers on a page
 * ============================================================ */
@keyframes mshHelpPulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7); }
    50%  { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}
.msh-learn-with-example-btn.msh-help-pulse,
.reading-fun-learn-example-btn.msh-help-pulse {
    animation: mshHelpPulse 0.72s ease-in-out 4;
    border-color: #7c3aed !important;
    color: #7c3aed !important;
}

/* ============================================================
 * Hear Again — suppressed on ALL shell-wrapped activity pages.
 * The "Learn with example" button already covers instruction
 * replay.  Showing both confuses children.
 * ============================================================ */
.msh-activity-shell .msh-activity-shell__hear-row,
.msh-activity-shell .global-hear-again-wrap,
.msh-activity-shell ~ * .global-hear-again-wrap,
.skill-page .global-hear-again-wrap {
    display: none !important;
}

/* ============================================================
   Math 3-4 / 4-5 — new activity layouts (v=20260726c)
   ============================================================ */

/* Same or Different — emoji symbol buttons (✅ / ❌) */
.same-diff-sym-btn {
    font-size: 3.5rem;
    min-width: 90px;
    min-height: 90px;
    border-radius: 50% !important;
    padding: 0 !important;
    border: 4px solid transparent !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.same-diff-sym-btn--same { border-color: #22c55e !important; background: #f0fdf4 !important; }
.same-diff-sym-btn--diff { border-color: #ef4444 !important; background: #fef2f2 !important; }
.same-diff-sym-btn:hover { transform: scale(1.12); }

/* Longer or Shorter? — object-labeled bars */
.longer-shorter-compare { text-align: center; max-width: 560px; margin: 0 auto; }
.longer-shorter-bars { display: flex; flex-direction: column; gap: 0.9rem; margin: 1.2rem 0; }
.longer-shorter-bar-row { display: flex; align-items: center; gap: 0.75rem; }
.longer-shorter-icon { font-size: 2rem; width: 2.4rem; flex-shrink: 0; text-align: center; }
.longer-shorter-track {
    flex: 1;
    height: 26px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}
.longer-shorter-fill { height: 100%; border-radius: 99px; transition: width 0.3s ease; }
.longer-shorter-fill--a { background: linear-gradient(90deg, #f97316, #fb923c); }
.longer-shorter-fill--b { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.longer-shorter-btns { display: flex; gap: 1.25rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }
.longer-shorter-btn {
    padding: 0.85rem 2.2rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 99px;
    border: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.longer-shorter-btn:hover { transform: scale(1.06); }
.longer-shorter-btn--longer { background: #d1fae5; border-color: #10b981; color: #065f46; }
.longer-shorter-btn--shorter { background: #fee2e2; border-color: #ef4444; color: #7f1d1d; }

/* Which is Shorter? — vertical tower bars */
.vert-strips-compare { text-align: center; max-width: 480px; margin: 0 auto; }
.vert-strips-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2.5rem;
    height: 160px;
    margin: 1.25rem auto;
}
.vert-strips-row--three { gap: 1.5rem; }
.vert-strip-col { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.vert-strip-bar {
    width: 52px;
    border-radius: 10px 10px 0 0;
    min-height: 12px;
}
.vert-strip-bar--coral { background: linear-gradient(to top, #f97316, #fdba74); }
.vert-strip-bar--sky   { background: linear-gradient(to top, #0ea5e9, #7dd3fc); }
.vert-strip-bar--lime  { background: linear-gradient(to top, #22c55e, #86efac); }
.vert-strip-btn { min-width: 52px; }

/* Sort by Length (4-item strip layout) */
.length-four-strips {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: 1rem auto;
    max-width: 500px;
}

/* Measure with Hands — object + scale display */
.measure-hands-activity {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}
.measure-hands-object-display {
    font-size: 5rem;
    line-height: 1;
    margin: 0.5rem 0;
}
.measure-hands-ruler-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
    margin: 0.5rem 0 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 251, 235, 0.95);
    border-top: 4px solid #f97316;
    border-bottom: 4px solid #f97316;
    border-radius: 8px;
}
.measure-hands-question { font-size: 1.1rem; margin: 0.5rem 0 1rem; }

/* =========================================================
   PHASE 1 — Age 3-4 Enrichment: Family, World Words, My World
   ========================================================= */

/* Social Studies 3-4 — My Family & Friends picture-tap */
.skill-page--family34-tap { text-align: center; padding: 12px 8px; }
.family34-question {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color, #7c3aed);
    margin: 12px 0 20px;
    line-height: 1.3;
}
.family34-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 440px;
    margin: 0 auto 16px;
}
.family34-btn {
    font-size: 4rem;
    line-height: 1;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    background: #f9f5ff;
    border: 3px solid #d8b4fe;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(124,58,237,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.family34-btn:hover,
.family34-btn:focus { transform: scale(1.08); box-shadow: 0 8px 20px rgba(124,58,237,0.22); outline: 3px solid var(--primary-color,#7c3aed); }
.family34-btn:active { transform: scale(0.96); }

/* English 3-4 — World Words picture-tap */
.skill-page--world-words { text-align: center; padding: 12px 8px; }
.world-words-prompt {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 10px 0 18px;
    color: #0e7490;
}
.world-words-prompt strong { color: #c026d3; font-size: 2rem; }
.world-words-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 440px;
    margin: 0 auto 16px;
}
.world-words-btn {
    font-size: 4rem;
    line-height: 1;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    background: #f0fdff;
    border: 3px solid #a5f3fc;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(14,116,144,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.world-words-btn:hover,
.world-words-btn:focus { transform: scale(1.08); box-shadow: 0 8px 20px rgba(14,116,144,0.22); outline: 3px solid #0e7490; }
.world-words-btn:active { transform: scale(0.96); }

/* Creative Arts — Draw a Face */
.skill-page--draw-face { text-align: center; padding: 12px 8px; }
.draw-face-step-badge {
    display: inline-block;
    background: var(--primary-color,#7c3aed);
    color: #fff;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.draw-face-done { font-size: 2.8rem; margin: 8px 0; min-height: 3.5rem; }
.draw-face-hint {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px;
    padding: 0 8px;
    line-height: 1.4;
}
.draw-face-canvas-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 12px;
    max-width: 520px;
}

/* Creative Arts — Draw My House */
.skill-page--draw-house { text-align: center; padding: 12px 8px; }
.draw-house-step-badge {
    display: inline-block;
    background: #f97316;
    color: #fff;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.draw-house-hint-box {
    font-size: 1.15rem;
    font-weight: 600;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 0 auto 14px;
    max-width: 520px;
    text-align: left;
    color: #7c2d12;
    line-height: 1.4;
}

/* Creative Arts — My Favourite Animal */
.skill-page--fav-animal { text-align: center; padding: 12px 8px; }

/* Creative Arts — Fingerprint Stamping */
.skill-page--fingerprint { text-align: center; padding: 12px 8px; }

/* Creative Arts — Rainbow Art */
.skill-page--rainbow-art { text-align: center; padding: 12px 8px; }
.rainbow-theme-card h3 { font-size: 1.5rem; color: #1f2937; }

/* Creative Arts — Make a Crown */
.skill-page--make-crown { text-align: center; padding: 12px 8px; }

/* ── Music — Tap-Along mechanic (Feel the Beat / Keep the Beat) ─────── */
.music-tapalong-wrap { text-align: center; padding: 0.5rem 0 1rem; }
.music-tapalong-emoji {
    font-size: 4rem;
    display: block;
    margin: 0 auto 0.6rem;
    transition: transform 0.12s;
}
@keyframes music-beat-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
.music-beat-pulse { animation: music-beat-pulse 0.75s ease-in-out infinite; }
.music-beat-tap { transform: scale(1.35) !important; }
.music-tapalong-hint {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}
.music-tapalong-btn {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.7rem 2.2rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(240, 147, 251, 0.45);
    transition: transform 0.1s;
    display: block;
    margin: 0 auto 0.6rem;
}
.music-tapalong-btn:active { transform: scale(0.94); }
.music-tap-counter { font-size: 1rem; color: #718096; font-weight: 600; }

/* ── Music — Slow or Fast mechanic ──────────────────────────────────── */
.music-slowfast-wrap { text-align: center; padding: 0.5rem 0 0.8rem; }
.music-sf-scene {
    background: #fffbeb;
    border-radius: 16px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    border: 2px solid #fcd34d;
}
.music-sf-animal { font-size: 3.5rem; display: block; margin-bottom: 0.3rem; }
.music-sf-text { font-size: 1.05rem; font-weight: 600; color: #78350f; }
.music-sf-question { font-size: 1.1rem; font-weight: 700; color: #1a202c; margin-bottom: 0.7rem; }
.music-sf-btns { display: flex; gap: 1rem; justify-content: center; }
.music-sf-btn {
    font-size: 1.35rem;
    font-weight: 800;
    border: 3px solid;
    border-radius: 18px;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    min-width: 110px;
    line-height: 1.4;
}
.music-sf-btn--slow { background: #e0f2fe; border-color: #38bdf8; color: #0c4a6e; }
.music-sf-btn--fast { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.music-sf-btn:hover, .music-sf-btn:focus { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.12); outline: none; }

/* ── Music — Beat Count mechanic (Beat Match) ────────────────────────── */
.music-beatcount-wrap { text-align: center; padding: 0.5rem 0 0.8rem; }
.music-bc-display {
    font-size: 2.8rem;
    letter-spacing: 0.3rem;
    background: #f0fff4;
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 2px solid #68d391;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.music-bc-question { font-size: 1.1rem; font-weight: 700; color: #1a202c; margin-bottom: 0.7rem; }
.music-bc-number-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    max-width: 280px;
    margin: 0 auto;
}
.music-bc-num-btn {
    font-size: 1.8rem;
    font-weight: 800;
    background: #ebf8ff;
    border: 3px solid #90cdf4;
    border-radius: 14px;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.12s;
    color: #2b6cb0;
}
.music-bc-num-btn:hover, .music-bc-num-btn:focus { transform: scale(1.12); border-color: #3182ce; outline: none; }

/* ── Music — Tempo Fun mechanic (3-choice) ───────────────────────────── */
.music-tempofun-wrap { text-align: center; padding: 0.5rem 0 0.8rem; }
.music-tf-scene {
    font-size: 1.2rem;
    font-weight: 700;
    background: #faf5ff;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.7rem;
    color: #44337a;
    border: 2px solid #d6bcfa;
}
.music-tf-question { font-size: 1rem; font-weight: 600; color: #2d3748; margin-bottom: 0.7rem; }
.music-tf-btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.music-tf-btn {
    font-size: 1.2rem;
    font-weight: 700;
    background: #f7fafc;
    border: 3px solid #cbd5e0;
    border-radius: 14px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: transform 0.12s;
    min-width: 90px;
}
.music-tf-btn:hover, .music-tf-btn:focus { transform: scale(1.08); border-color: #805ad5; outline: none; }

/* ── Music — Rhythm Pattern mechanic (Rhythm Time) ──────────────────── */
.music-rhythmpattern-wrap { text-align: center; padding: 0.5rem 0 0.8rem; }
.music-rp-label { font-size: 1rem; font-weight: 600; color: #4a5568; margin-bottom: 0.4rem; }
.music-rp-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 0.5rem;
    min-height: 60px;
}
.music-rp-beat {
    font-size: 2.2rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
}
.music-rp-beat--long { background: #fed7e2; color: #c53030; border: 2px solid #fc8181; font-size: 2rem; }
.music-rp-beat--short { background: #bee3f8; color: #2b6cb0; border: 2px solid #63b3ed; font-size: 1.4rem; }
.music-rp-hint { font-size: 0.95rem; color: #718096; margin-bottom: 0.8rem; }
.music-rp-tap-btn {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 0.65rem 2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
    transition: transform 0.1s;
    display: block;
    margin: 0 auto 0.5rem;
}
.music-rp-tap-btn:active { transform: scale(0.93); }
.music-rp-count { font-size: 0.95rem; color: #718096; font-weight: 600; }

/* ── Music — Keep the Beat mechanic (audio-guided tap) ───────────────── */
.music-keepbeat-wrap { text-align: center; padding: 0.5rem 0 1rem; }
.music-kb-emoji { font-size: 3.5rem; margin-bottom: 0.5rem; line-height: 1; }
.music-kb-dots { display: flex; gap: 0.65rem; justify-content: center; margin: 0.75rem auto 1rem; flex-wrap: wrap; max-width: 320px; }
.music-kb-dot {
    width: 2rem; height: 2rem; border-radius: 50%;
    background: #e2e8f0; border: 2px solid #cbd5e1;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    display: inline-block;
}
.music-kb-dot--active {
    background: #a855f7; border-color: #7c3aed;
    box-shadow: 0 0 10px rgba(168,85,247,0.6);
    transform: scale(1.2);
}
.music-kb-tap-btn { margin-bottom: 0.5rem; }

/* ── Music — Slow/Fast animated icons ────────────────────────────────── */
@keyframes music-sf-slow {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-4px); }
}
@keyframes music-sf-fast {
    0%, 100% { transform: scale(1) translateX(0); }
    25% { transform: scale(1.08) translateX(3px); }
    75% { transform: scale(1.08) translateX(-3px); }
}
.music-sf-icon { display: inline-block; font-size: 2rem; }
.music-sf-icon--slow { animation: music-sf-slow 1.6s ease-in-out infinite; }
.music-sf-icon--fast { animation: music-sf-fast 0.35s ease-in-out infinite; }

/* ── Music — Tempo Fun big emoji ─────────────────────────────────────── */
.music-tf-big-emoji {
    font-size: 5.5rem; text-align: center; line-height: 1;
    margin: 0.1rem auto 0.4rem; display: block;
}

/* ── World Discovery 3-4 picture-tap activities ─────────────────────── */
.skill-page--wd34-tap { padding: 1.2rem 1rem; text-align: center; }
.wd34-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0.5rem 0 1rem;
    min-height: 2.4rem;
    line-height: 1.35;
}
.wd34-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    max-width: 320px;
    margin: 0 auto 1rem;
}
.wd34-btn {
    font-size: 3.5rem;
    padding: 0.55rem 0.25rem;
    border-radius: 16px;
    border: 3px solid #bee3f8;
    background: #ebf8ff;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s, background 0.12s;
    line-height: 1.2;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wd34-btn:hover,
.wd34-btn:focus { transform: scale(1.08); border-color: #3182ce; outline: none; }
.wd34-btn--correct { border-color: #68d391; background: #f0fff4; }
/* Word-label options use smaller font so text fits the button */
.wd34-btn--word {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.4rem 0.3rem;
    line-height: 1.25;
    color: #1a365d;
}

/* ── SOCIAL STUDIES 4-5: picture-tap ────────────────────────── */
.skill-page--ss45-tap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ss45-question {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    text-align: center;
    padding: 0.5rem 1rem;
    max-width: 480px;
}
.ss45-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 340px;
}
.ss45-btn {
    font-size: 3rem;
    background: #fff;
    border: 3px solid #bee3f8;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s, background 0.12s;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.3rem;
}
.ss45-btn:hover,
.ss45-btn:focus { transform: scale(1.08); border-color: #3182ce; outline: none; }
.ss45-btn--correct { border-color: #68d391; background: #f0fff4; }

/* ── SOCIAL STUDIES 4-5: scenario-choice ─────────────────────── */
.skill-page--ss45-scenario { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ss45-scene {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    background: #ebf8ff;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    max-width: 500px;
    line-height: 1.5;
    border: 2px solid #bee3f8;
}
.ss45-choice-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 460px;
}
.ss45-choice-btn {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a365d;
    background: #fff;
    border: 3px solid #bee3f8;
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s, border-color 0.12s, background 0.12s;
    line-height: 1.35;
}
.ss45-choice-btn:hover,
.ss45-choice-btn:focus { transform: scale(1.02); border-color: #4299e1; background: #ebf8ff; outline: none; }

/* ── Life Skills Scenario Choice Engine ─────────────────── */
.ls-skill-page { max-width: 620px; margin: 0 auto; }

.ls-breadcrumb { font-size: 0.82rem; color: #888; margin-bottom: 0.75rem; }

.ls-scene-card {
    background: linear-gradient(135deg, #fffbf0, #fff3e0);
    border: 2px solid #ffe0b2;
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.1rem;
    text-align: center;
}
.ls-scene-emoji { font-size: 2.8rem; line-height: 1; margin-bottom: 0.55rem; }
.ls-scene-text  { font-size: 1.05rem; color: #333; margin: 0; line-height: 1.65; }

.ls-question {
    font-size: 1.15rem; font-weight: 700; color: #4a2f88;
    margin-bottom: 0.85rem; text-align: center;
}

.ls-choices-wrap { display: flex; flex-direction: column; gap: 0.55rem; }

.ls-choice-btn {
    display: flex; align-items: center; gap: 0.75rem;
    width: 100%; padding: 0.85rem 1rem;
    background: #fff; border: 2.5px solid #c8d6f0; border-radius: 14px;
    font-size: 1rem; cursor: pointer; text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.ls-choice-btn:hover:not(:disabled) {
    border-color: #7c3aed; background: #f8f4ff; transform: translateX(3px);
}
.ls-choice-btn:disabled { cursor: not-allowed; }

/* Coloured number circle (1 / 2 / 3) — replaces A / B / C */
.ls-choice-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%;
    color: #fff; font-size: 1rem; font-weight: 800; flex-shrink: 0; line-height: 1;
}
.ls-choice-text { flex: 1; font-size: 1rem; color: #2d3748; font-weight: 600; line-height: 1.4; }

.ls-feedback {
    margin-top: 0.9rem; padding: 0.85rem 1.1rem;
    border-radius: 12px; font-size: 1rem; line-height: 1.5;
    border-left: 4px solid transparent;
}

.ls-next-activity-btn { margin-top: 0.25rem; }
