:root {
    --cream: #fff7e6;
    --cream-2: #fffaf0;
    --cream-3: #fff8e2;
    --yellow: #f8c84e;
    --yellow-soft: #fff2b8;
    --blue: #2f78d0;
    --blue-soft: #dff0ff;
    --green: #33b889;
    --green-soft: #dff8ec;
    --orange: #f28a2e;
    --orange-soft: #ffebd8;
    --pink-soft: #ffe6ef;
    --red: #e86666;
    --ink: #2d4565;
    --muted: #6f7e90;
    --line: #eadfca;
    --white: #ffffff;
    --shadow: none;
    --shadow-soft: none;
    --radius-xl: 40px;
    --radius-lg: 30px;
    --radius: 22px;
    --radius-sm: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Nunito", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.62) 0, rgba(255,255,255,0) 30%),
        radial-gradient(circle at bottom right, rgba(255,238,177,.42) 0, rgba(255,238,177,0) 24%),
        #fff7e6;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.c-blue { color: var(--blue); }
.c-orange { color: var(--orange); }
.c-green { color: var(--green); }

.site-header {
    position: relative;
    z-index: 10;
    padding: 12px 18px 0;
    background: transparent;
}
.header-shell {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.brand { display: inline-flex; flex-direction: column; gap: 3px; }
.brand-image img {
    width: auto;
    height: auto;
    max-width: 260px;
    filter: drop-shadow(0 6px 18px rgba(62, 92, 131, .08));
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    backdrop-filter: blur(14px);
    border: 0;
    box-shadow: none;
}
.site-nav a {
    font-weight: 800;
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 999px;
}
.site-nav a.active {
    color: var(--orange);
    position: relative;
}
.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 3px;
    border-radius: 999px;
    background: var(--orange);
}
.site-nav a:hover { background: rgba(255, 255, 255, .42); }
.nav-cta {
    margin-left: 8px;
    background: var(--orange);
    color: var(--white) !important;
    box-shadow: 0 10px 20px rgba(242, 138, 46, .3);
    min-height: 46px;
    display: inline-flex;
    align-items: center;
}
.nav-toggle {
    display: none;
    background: rgba(251, 247, 239, .9);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 18px;
    box-shadow: var(--shadow-soft);
}

main {
    min-height: 70vh;
    padding-top: 18px;
}
.section, .page-hero, .activity-detail, .hero-banner { max-width: 1260px; margin-inline: auto; }
.section { padding: 28px 18px 48px; }
.home-section { padding-top: 20px; }
.no-top { padding-top: 8px; }
.narrow { max-width: 940px; }
.text-link { color: var(--blue); font-weight: 900; }
.text-link:hover { color: var(--orange); }

.hero-banner {
    position: relative;
    padding: 0 18px 28px;
}
.hero-banner-image {
    width: 100%;
    height: auto;
    border-radius: 42px;
    box-shadow: var(--shadow);
}
.hero-copy-overlay {
    position: absolute;
    left: clamp(40px, 6vw, 92px);
    top: 50%;
    transform: translateY(-50%);
    max-width: min(46%, 560px);
}
.hero-copy-overlay h1 {
    font-family: "Baloo 2", cursive;
    font-size: clamp(50px, 5vw, 84px);
    line-height: .94;
    margin: 12px 0 16px;
    text-shadow: 0 2px 0 rgba(255,255,255,.45);
}
.hero-copy-overlay p {
    max-width: 520px;
    font-size: clamp(18px, 1.65vw, 20px);
    color: #4e5f73;
    margin-bottom: 18px;
    text-shadow: 0 2px 0 rgba(255,255,255,.4);
}
.hero-pill, .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 245, 202, .94);
    color: #926619;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(236,192,72,.2), 0 8px 16px rgba(236,192,72,.15);
}
.hero-actions, .detail-actions, .check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
}
.btn.primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(242, 138, 46, .28);
}
.btn.secondary-outline {
    background: rgba(255,255,255,.72);
    border: 2px solid #94beff;
    color: var(--blue);
    backdrop-filter: blur(10px);
}
.btn.ghost {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn.full { width: 100%; }
.btn.big { min-width: 260px; }

.section-title { margin-bottom: 18px; }
.section-title.center { text-align: center; }
.section-title.between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
h1, h2, h3, h4 {
    font-family: "Baloo 2", cursive;
    line-height: 1.08;
    margin: 0 0 12px;
}
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0 0 14px; color: var(--muted); }

.icon-card-grid, .benefit-grid, .activity-grid, .level-grid, .stat-grid {
    display: grid;
    gap: 18px;
}
.icon-card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.icon-card, .benefit-card, .activity-card, .soft-panel, .level-hero-card, .login-card, .admin-panel, .stat-card, .detail-preview, .instruction-box, .media-box, .about-card {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(234,223,202,.92);
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
}
.icon-card {
    padding: 18px 14px;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease;
}
.icon-card:hover, .activity-card:hover, .level-hero-card:hover, .benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.icon-card-icon {
    width: 118px;
    height: 118px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 40px;
    border-radius: 26px;
    background: transparent;
    overflow: hidden;
}
.icon-card-icon.has-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.icon-card-icon:not(.has-image) span {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 26px;
    background: linear-gradient(180deg, #fff9ec, #ffffff);
}
.icon-card h3 { font-size: 22px; margin-bottom: 6px; }
.icon-card p { font-size: 14px; line-height: 1.45; }

.home-level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.level-hero-card {
    padding: 18px;
    display: grid;
    grid-template-columns: 86px 1fr 42px;
    align-items: center;
    gap: 12px;
    min-height: 160px;
}
.level-hero-card.toddler { background: linear-gradient(180deg, #fff8dd, #fffef6); }
.level-hero-card.nursery { background: linear-gradient(180deg, #e8fff0, #fbfffd); }
.level-hero-card.k1 { background: linear-gradient(180deg, #e7f4ff, #fcfeff); }
.level-hero-card.k2 { background: linear-gradient(180deg, #ffeaf1, #fffdfd); }
.level-emoji {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 44px;
    background: rgba(255,255,255,.86);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
}
.level-hero-card strong {
    display: block;
    font-size: 32px;
    color: var(--orange);
    font-family: "Baloo 2", cursive;
}
.level-hero-card.nursery strong { color: var(--green); }
.level-hero-card.k1 strong { color: var(--blue); }
.level-hero-card.k2 strong { color: var(--red); }
.level-hero-card span {
    display: block;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 6px;
}
.level-hero-card p { font-size: 14px; margin: 0; }
.circle-arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.92);
    color: var(--ink);
    font-weight: 900;
}

.activity-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.worksheet-grid-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.activity-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.activity-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(180deg, #fff9ec, #fafafa);
}
.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.activity-icon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 6px 12px rgba(45,69,101,.12);
    font-size: 22px;
}
.activity-body { padding: 16px; }
.activity-body h3 { font-size: 24px; margin-bottom: 8px; }
.activity-body p { font-size: 14px; min-height: 44px; }
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
}
.badge.pale {
    background: #eef7ff;
    color: var(--blue);
}
.card-link { color: var(--blue); font-weight: 900; }
.card-link:hover { color: var(--orange); }

.why-section { padding-top: 10px; }
.benefit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.benefit-card { padding: 22px 18px; text-align: center; }
.benefit-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    background: linear-gradient(180deg, #fffaf0, #ffffff);
    font-size: 34px;
}
.benefit-card h3 { font-size: 22px; }
.benefit-card p { font-size: 14px; }

.cta-section-wrap { padding-top: 8px; }
.cta-banner {
    background: linear-gradient(180deg, #fff1b7, #ffe485);
    border-radius: 32px;
    border: 1px solid rgba(236,199,89,.45);
    box-shadow: var(--shadow-soft);
    padding: 24px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
}
.cta-mascot {
    width: 90px;
    height: 90px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 52px;
    background: rgba(255,255,255,.45);
}
.cta-banner p { margin-bottom: 0; }

.page-hero {
    margin-top: 18px;
    padding: 34px 28px;
    border-radius: 38px;
    background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.74));
    border: 1px solid rgba(234,223,202,.88);
    box-shadow: var(--shadow-soft);
}
.page-hero.playful {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}
.page-hero h1 { font-size: clamp(38px, 5vw, 64px); margin-top: 10px; }
.page-hero-aside {
    min-width: 220px;
    min-height: 120px;
    display: grid;
    place-items: center;
    font-size: 38px;
    border-radius: 30px;
    background: linear-gradient(180deg, #eaf6ff, #ffffff);
    border: 1px dashed #b8d8ff;
    color: var(--blue);
}
.soft-panel { padding: 18px; }
.filter-bar {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr) auto;
    gap: 12px;
    margin-bottom: 24px;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    background: var(--white);
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(47,120,208,.14);
    border-color: var(--blue);
}
label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 900;
}
.empty-state {
    padding: 40px;
    border-radius: 28px;
    background: rgba(255,255,255,.9);
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
}
.activity-detail {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 26px;
    padding: 24px 18px 48px;
}
.detail-main {
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(234,223,202,.92);
    border-radius: 34px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
}
.detail-main h1 { font-size: clamp(38px, 5vw, 64px); margin-top: 12px; }
.lead-text { font-size: 18px; }
.detail-preview {
    align-self: start;
    position: sticky;
    top: 110px;
    overflow: hidden;
}
.preview-card-top {
    padding: 20px;
    background: linear-gradient(180deg, #fffaf0, #ffffff);
}
.preview-card-top img {
    border-radius: 20px;
    width: 100%;
    background: var(--cream);
}
.preview-card-bottom { padding: 22px; }
.instruction-box, .media-box { padding: 20px; margin-top: 18px; }
audio { width: 100%; }
.rich-text { color: var(--muted); margin-bottom: 18px; }
.about-stack { display: grid; gap: 18px; }
.about-card { padding: 24px; }

.site-footer { padding: 18px; }
.footer-shell {
    max-width: 1260px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,251,255,.82));
    border: 1px solid rgba(234,223,202,.92);
    box-shadow: var(--shadow-soft);
    border-radius: 34px 34px 0 0;
    padding: 28px;
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr .8fr;
    gap: 20px;
}
.footer-brand img { max-width: 220px; }
.footer-col h4 { margin-bottom: 12px; font-size: 24px; }
.footer-col a, .footer-col span, .footer-brand-block p {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}
.footer-mascot { font-size: 44px; margin-top: 8px; }
.footer-bottom {
    max-width: 1260px;
    margin: 0 auto;
    padding: 10px 18px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.social-row { display: grid; gap: 8px; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(460px, 100%);
    padding: 28px;
}
.center-brand { justify-content: center; margin-bottom: 18px; }
.muted { font-size: 13px; color: var(--muted); margin-top: 12px; }
.alert {
    padding: 13px 15px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: 800;
}
.alert-success { background: #e2f8ed; color: #16724a; }
.alert-error { background: #ffe4e4; color: #b63c3c; }

.admin-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: #f8f4eb;
}
.admin-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #27405e, #2f5177);
    padding: 20px;
    color: var(--white);
}
.admin-brand { color: var(--white); margin-bottom: 22px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a {
    color: rgba(255,255,255,.82);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 800;
}
.admin-sidebar a.active, .admin-sidebar a:hover {
    background: rgba(255,255,255,.12);
    color: var(--white);
}
.admin-main { padding: 28px; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.admin-topbar h1 { font-size: 40px; }
.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}
.stat-card { padding: 22px; }
.stat-card span { display: block; color: var(--muted); font-weight: 800; }
.stat-card strong { display: block; font-size: 34px; margin-top: 6px; }
.admin-panel { padding: 22px; margin-bottom: 22px; }
.admin-grid.two {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 22px;
}
.form-panel.wide { max-width: 980px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid #ece3d1;
    vertical-align: top;
}
.admin-table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.actions form { margin: 0; }
.link-button, .link-danger {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 900;
    color: var(--blue);
}
.link-danger { color: var(--red); }
.check-line { display: inline-flex; align-items: center; gap: 8px; }
.check-line input { width: auto; }

@media (max-width: 1200px) {
    .icon-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .worksheet-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-copy-overlay { max-width: min(48%, 500px); }
}

@media (max-width: 980px) {
    .page-hero.playful, .activity-detail, .admin-body, .admin-grid.two { grid-template-columns: 1fr; }
    .activity-grid, .benefit-grid, .home-level-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .cta-banner, .footer-shell { grid-template-columns: 1fr; }
    .detail-preview { position: static; }
    .admin-sidebar { position: relative; min-height: auto; }
    .hero-copy-overlay {
        left: 40px;
        max-width: 54%;
    }
    .hero-copy-overlay h1 { font-size: clamp(40px, 5vw, 58px); }
    .hero-copy-overlay p { font-size: 17px; }
}

@media (max-width: 820px) {
    .hero-banner {
        display: grid;
        gap: 16px;
    }
    .hero-copy-overlay {
        position: static;
        transform: none;
        max-width: none;
        padding: 18px 20px;
        margin-top: -6px;
        background: rgba(255,255,255,.62);
        border: 1px solid rgba(234,223,202,.8);
        border-radius: 28px;
        box-shadow: var(--shadow-soft);
    }
}

@media (max-width: 720px) {
    .site-header { padding: 10px 12px 0; }
    .header-shell { align-items: center; }
    .brand-image img { max-width: 190px; }
    .nav-toggle { display: inline-block; }
    .site-nav {
        display: none;
        position: absolute;
        left: 12px;
        right: 12px;
        top: 74px;
        padding: 14px;
        background: rgba(255,255,255,.96);
        border-radius: 24px;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }
    .site-nav.open { display: flex; }
    main { padding-top: 12px; }
    .hero-banner { padding: 0 12px 24px; }
    .hero-banner-image { border-radius: 26px; }
    .hero-copy-overlay h1 { font-size: clamp(38px, 10vw, 56px); }
    .icon-card-grid, .activity-grid, .worksheet-grid-home, .benefit-grid, .home-level-grid, .stat-grid, .form-grid, .filter-bar {
        grid-template-columns: 1fr;
    }
    .section-title.between, .site-footer, .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-hero { border-radius: 28px; }
    .page-hero-aside { min-width: 0; min-height: 80px; }
    .admin-main { padding: 18px; }
    .detail-main, .detail-preview { border-radius: 24px; }
}

@media print {
    body * { visibility: hidden; }
    #activityPrintable, #activityPrintable * { visibility: visible; }
    #activityPrintable {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: 0;
    }
}


/* v7: flat design update - no shadows on boxes/buttons and no button gradients */
*, *::before, *::after {
    box-shadow: none !important;
}
.btn.primary,
.nav-cta {
    background: var(--orange) !important;
    box-shadow: none !important;
}
.btn.primary:hover,
.nav-cta:hover {
    background: #e97816 !important;
}
.btn.secondary-outline {
    box-shadow: none !important;
}


/* Age level image cards */
.level-hero-card {
    grid-template-columns: 124px 1fr 42px;
    min-height: 178px;
}
.level-image {
    width: 124px;
    height: 124px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: transparent;
}
.level-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.level-image span {
    font-size: 44px;
}
.level-copy strong,
.level-copy span {
    display: block;
}
@media (max-width: 720px) {
    .level-hero-card {
        grid-template-columns: 112px 1fr 38px;
        min-height: 154px;
    }
    .level-image {
        width: 112px;
        height: 112px;
    }
}


/* Age level cards simplified like mockup */
.level-hero-card {
    min-height: 146px;
    padding: 14px 16px;
    gap: 10px;
    align-items: center;
}
.level-copy strong {
    margin-bottom: 2px;
    line-height: 1;
}
.level-copy span {
    margin-bottom: 0;
    font-size: 14px;
    color: #5f6e80;
}
@media (max-width: 720px) {
    .level-hero-card {
        min-height: 138px;
    }
}
