:root {
  --font-body: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #493642;
  --muted: #8c7180;
  --pink: #ef7fa6;
  --pink-dark: #d95688;
  --pink-soft: #ffe3ed;
  --pink-pale: #fff4f8;
  --cream: #fffaf4;
  --yellow: #ffd979;
  --mint: #a8dfc9;
  --lavender: #cfc2ee;
  --blue: #99cfe4;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(170, 93, 125, .14);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 217, 121, .24), transparent 24%),
    radial-gradient(circle at 36% 100%, rgba(207, 194, 238, .24), transparent 28%),
    var(--pink-pale);
  font-family: var(--font-body);
  font-weight: 500;
}
button, input, textarea, select { font-family: var(--font-body); font-size: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 4px solid rgba(239, 127, 166, .27);
  outline-offset: 2px;
}

.sparkles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; color: #e999b8; }
.sparkles span { position: absolute; opacity: .45; font-size: 25px; }
.sparkles span:nth-child(1) { left: 22%; top: 8%; }
.sparkles span:nth-child(2) { right: 6%; top: 18%; }
.sparkles span:nth-child(3) { left: 7%; bottom: 9%; }
.sparkles span:nth-child(4) { right: 20%; bottom: 12%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 20px 22px;
  display: flex; flex-direction: column; gap: 34px;
  background: rgba(255,255,255,.78); border-right: 1px solid rgba(224, 168, 190, .28);
  backdrop-filter: blur(20px);
}
.brand { display: flex; gap: 12px; align-items: center; border: 0; background: none; text-align: left; cursor: pointer; padding: 0; }
.brand-mark {
  width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 17px 17px 21px 14px; transform: rotate(-3deg);
  background: linear-gradient(145deg, #ff9dbd, #e86c9b); color: white;
  font: 800 23px/1 var(--font-display); box-shadow: 0 8px 18px rgba(217, 86, 136, .24);
}
.brand strong { display: block; font: 800 22px/1.05 var(--font-display); }
.brand small, .profile-chip small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.main-nav { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; padding: 13px 15px; border-radius: 16px; text-align: left; font-weight: 800; cursor: pointer; }
.nav-item span { display: inline-grid; width: 28px; font-size: 20px; }
.nav-item:hover { background: #fff2f7; }
.nav-item.active { background: var(--pink-soft); color: var(--pink-dark); }
.profile-chip { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 20px; background: var(--cream); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font: 800 20px/1 var(--font-display); }

#app { width: 100%; max-width: 1230px; padding: 42px clamp(26px, 5vw, 72px) 70px; margin: 0 auto; }
.page-enter { animation: pageIn .34s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(9px); } }
.eyebrow { margin: 0 0 5px; color: var(--pink-dark); font-weight: 900; font-size: 13px; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-display); margin-top: 0; line-height: 1.14; letter-spacing: -.02em; }
h1 { margin-bottom: 12px; font-size: clamp(38px, 5vw, 62px); }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: 23px; }
.lead { max-width: 690px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 30px; }
.date-pill { padding: 9px 15px; border-radius: 99px; background: white; box-shadow: var(--shadow); color: var(--muted); font-weight: 800; white-space: nowrap; }

.hero-card { position: relative; overflow: hidden; padding: clamp(25px, 4vw, 46px); border-radius: 36px; background: linear-gradient(135deg, #f8aec6, #f196b8 56%, #e584ab); color: #fff; box-shadow: 0 24px 50px rgba(198, 93, 137, .22); }
.hero-card::after { content: ""; position: absolute; width: 230px; height: 230px; right: -70px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.16); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr .8fr; align-items: center; gap: 28px; }
.hero-card .eyebrow { color: #fff8db; }
.hero-card h2 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 50px); }
.hero-card p { max-width: 620px; margin: 0 0 22px; color: #fff8fb; line-height: 1.6; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hero-tags span { padding: 6px 11px; border-radius: 99px; background: rgba(255,255,255,.18); font-weight: 800; font-size: 13px; }
.hero-art { position: relative; width: min(300px, 100%); aspect-ratio: 1.25; margin: auto; }
.hero-art .hero-main-sticker { position: absolute; inset: 0 auto auto 0; width: 240px; height: 145px; background-size: 990px 330px; filter: drop-shadow(0 16px 18px rgba(121, 48, 78, .2)); }
.hero-art .hero-heart { position: absolute; width: 105px; right: -4px; bottom: -14px; transform: rotate(10deg); animation: stickerFloat 3.2s ease-in-out infinite; }
.mascot {
  width: min(220px, 100%); aspect-ratio: 1; margin: auto; border: 8px solid rgba(255,255,255,.35); border-radius: 50%;
  display: grid; place-items: center; background: #fff2c9; box-shadow: inset 0 -14px 0 rgba(255, 217, 121, .32); color: var(--ink); font-size: 76px;
}
.mascot::after { content: "10"; position: absolute; font: 800 27px/1 var(--font-display); color: var(--pink-dark); transform: translateY(5px); }
.primary, .secondary, .soft-button, .answer-button { border: 0; border-radius: 16px; cursor: pointer; font-weight: 800; line-height: 1.25; letter-spacing: 0; transition: transform .17s ease, box-shadow .17s ease; }
.primary:hover, .secondary:hover, .soft-button:hover, .answer-button:hover { transform: translateY(-2px); }
.primary { padding: 13px 21px; background: white; color: var(--pink-dark); box-shadow: 0 10px 20px rgba(132, 60, 89, .16); }
.primary.pink { background: var(--pink-dark); color: white; }
.secondary { padding: 13px 20px; background: #fff1f6; color: var(--pink-dark); }
.soft-button { padding: 10px 15px; background: #f7eef2; color: var(--ink); }
.primary:disabled, .secondary:disabled, .soft-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.section-title { display: flex; justify-content: space-between; align-items: end; margin: 34px 0 16px; }
.section-title h2 { margin: 0; }
.section-title p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card, .panel { background: rgba(255,255,255,.88); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.85); }
.stat-card { padding: 20px; border-radius: 22px; }
.stat-card .stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--pink-soft); font-size: 21px; }
.stat-card strong { display: block; margin-top: 13px; font: 800 30px/1 var(--font-display); }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.panel { padding: 24px; border-radius: var(--radius); }
.lesson-list-card { display: flex; align-items: center; gap: 17px; }
.lesson-number { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 19px; background: var(--pink-soft); color: var(--pink-dark); font: 800 25px/1 var(--font-display); }
.lesson-list-card h3 { margin: 0 0 4px; }
.lesson-list-card p { margin: 0; color: var(--muted); }
.lesson-list-card .primary { margin-left: auto; background: var(--pink-dark); color: #fff; }
.lesson-list { display: grid; gap: 18px; margin-bottom: 38px; }
.lesson-two-hero { background: linear-gradient(135deg, #f3a4c3, #e98eb6 52%, #d77fac); }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.lesson-workspace { min-height: 610px; }
.lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.step-count { color: var(--muted); font-weight: 800; font-size: 13px; }
.progress-track { height: 10px; flex: 1; background: #f5e4eb; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #f4a7c0, #e56696); border-radius: inherit; transition: width .35s ease; }
.activity-title { margin-bottom: 8px; }
.activity-copy { color: var(--muted); line-height: 1.65; }
.parent-prompt { margin: 18px 0; padding: 14px 17px; border-radius: 17px; background: #fff6d9; color: #7a5c18; }
.parent-prompt strong { display: block; margin-bottom: 2px; }
.lesson-stage { min-height: 300px; margin: 20px 0; padding: 24px; display: grid; place-items: center; border-radius: 25px; background: linear-gradient(145deg, #fff8fb, #fff); border: 2px dashed #f2c5d5; }
.lesson-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lesson-actions .next { margin-left: auto; }
.activity-heading { min-height: 82px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.activity-heading > div { min-width: 0; }
.activity-heading .sticker-sprite { flex: 0 0 auto; margin: -13px -6px 0 0; }
.side-panel { position: sticky; top: 28px; }
.side-panel h3 { margin-bottom: 13px; }
.goal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.goal-list li { display: flex; gap: 9px; color: var(--muted); line-height: 1.4; }
.goal-list li::before { content: "♡"; color: var(--pink-dark); font-weight: 900; }
.autosave { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1e2e8; color: #6d9b85; font-size: 12px; font-weight: 800; }

.sticker-sprite {
  display: inline-block;
  width: 122px;
  aspect-ratio: 1.5;
  background-image: url("assets/stickers/min-sticker-sheet.png");
  background-repeat: no-repeat;
  background-size: 400% 200%;
  filter: drop-shadow(0 8px 9px rgba(109, 57, 78, .13));
}
.sticker-hat { background-position: 0 0; }
.sticker-smile { background-position: 33.333% 0; }
.sticker-party { background-position: 66.667% 0; }
.sticker-baby { background-position: 100% 0; }
.sticker-towel { background-position: 0 100%; }
.sticker-min { background-position: 33.333% 100%; }
.sticker-heart { background-position: 66.667% 100%; }
.sticker-pout { background-position: 100% 100%; }
.hero-art .hero-main-sticker.sticker-hat { background-position: 0 0; }
.hero-art .hero-main-sticker.sticker-smile { background-position: -245px 0; }
.hero-art .hero-main-sticker.sticker-party { background-position: -495px 0; }
.hero-art .hero-main-sticker.sticker-baby { background-position: -745px 0; }
@keyframes stickerFloat { 50% { transform: translateY(-7px) rotate(6deg); } }

.intro-stage { align-content: center; gap: 22px; }
.intro-cards { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.intro-cards.two-columns { grid-template-columns: 1fr 1fr; }
.mini-info { display: flex; align-items: flex-start; gap: 10px; padding: 16px; border-radius: 18px; background: white; border: 1px solid #f2dfe7; }
.mini-info > span { font-size: 24px; }
.mini-info strong { display: block; margin-bottom: 3px; }
.mini-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.bond-preview { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.bond-preview span { padding: 8px 12px; border-radius: 99px; background: var(--pink-soft); color: var(--pink-dark); font-weight: 800; }
.bond-gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; padding: 16px; border-radius: 22px; background: white; border: 1px solid #f2dfe7; }
.bond-gallery > div { display: grid; justify-items: center; gap: 7px; color: var(--pink-dark); font-size: 12px; }
.mini-ten-frame { display: grid; grid-template-columns: repeat(5, 20px); gap: 2px; padding: 3px; border-radius: 8px; background: #dda5ba; }
.mini-cell { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; background: white; }
.mini-cell .counter-dot { width: 14px; height: 14px; box-shadow: none; }
.criteria { margin: 18px 0; padding: 15px 18px; border-radius: 17px; background: #edf8f3; color: #4d7965; }
.criteria p { margin: 3px 0 0; line-height: 1.5; }

.lego-stage { text-align: center; align-content: center; }
.object-stage { text-align: center; align-content: center; }
.object-pieces { min-height: 56px; display: flex; justify-content: center; align-items: end; flex-wrap: wrap; gap: 7px; }
.lego-visual { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.lego-piece { width: 40px; height: 52px; position: relative; border-radius: 7px; box-shadow: inset 0 -7px 0 rgba(0,0,0,.08); }
.lego-piece::before { content: ""; position: absolute; width: 21px; height: 8px; left: 9px; top: -7px; border-radius: 5px 5px 0 0; background: inherit; }
.lego-piece.pink { background: #ef86aa; }
.lego-piece.blue { background: #80cbe1; }
.pair-counter { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 18px; }
.pair-counter strong { min-width: 54px; font: 800 38px/1 var(--font-display); color: var(--pink-dark); }
.pair-counter .soft-button { min-width: 46px; font-size: 25px; }
.check-row { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 15px; border-radius: 15px; background: #fff8da; color: #755c1f; font-weight: 700; cursor: pointer; }
.check-row input { width: 19px; height: 19px; accent-color: var(--pink-dark); }
.question-callout { margin: 16px 0; padding: 16px 18px; border-left: 4px solid var(--pink); border-radius: 0 17px 17px 0; background: #fff3f7; }
.question-callout ul { margin: 6px 0 0; padding-left: 21px; color: var(--muted); }
.question-callout li + li { margin-top: 4px; }
.question-callout p { margin: 6px 0 0; }
.question-callout ol { margin: 8px 0 0; padding-left: 23px; color: var(--muted); }
.question-callout ol li + li { margin-top: 6px; }

.make-ten-preview { display: grid; justify-items: center; gap: 12px; text-align: center; }
.make-ten-preview p { margin: 0; color: var(--muted); }
.result-pill { background: #edf8f3; border-color: #a8d9c1; color: #347458; }
.warmup-stage { grid-template-columns: auto minmax(230px, 1fr); align-items: center; gap: 32px; }
.warmup-question { width: 100%; text-align: center; }
.number-choices { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.number-choices.wide { margin-top: 13px; }
.answer-button.compact { min-width: 58px; min-height: 52px; padding: 9px 13px; font-size: 18px; }
.double-frame-scene { width: 100%; display: grid; grid-template-columns: auto 42px minmax(220px, 1fr); align-items: center; justify-content: center; gap: 18px; }
.transfer-stage .double-frame-scene { grid-template-columns: auto 28px auto; gap: 10px; }
.transfer-stage .ten-frame { grid-template-columns: repeat(5, 42px); gap: 5px; padding: 7px; border-radius: 17px; }
.transfer-stage .ten-cell { width: 42px; height: 42px; border-radius: 10px; }
.transfer-stage .counter-dot { width: 31px; height: 31px; }
.double-frame-scene > div { min-width: 0; }
.frame-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 900; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.transfer-arrow { color: var(--pink-dark); font-size: 34px; font-weight: 900; text-align: center; }
.blue-pool { min-height: 160px; padding: 22px; display: flex; align-content: center; justify-content: center; flex-wrap: wrap; gap: 10px; border: 2px dashed #abd9e7; border-radius: 24px; background: #f0fbff; }
.loose-counter { width: 50px; height: 50px; border: 0; border-radius: 50%; background: #78c8e1; box-shadow: inset 0 -6px 0 rgba(0,0,0,.08), 0 8px 15px rgba(72,145,170,.18); cursor: pointer; transition: transform .16s ease; }
.loose-counter:hover { transform: translateY(-4px) scale(1.04); }
.transfer-stage { gap: 18px; }
.transfer-status { text-align: center; }
.transfer-status .soft-button { margin-top: 10px; }
.success-strip { margin-top: 10px; padding: 11px 15px; border-radius: 14px; background: #e8f7ef; color: #39765b; font-weight: 900; }
.second-frame { background: #b5ddea; box-shadow: 0 12px 22px rgba(72,145,170,.14); }
.bond-stage { grid-template-columns: 180px minmax(220px, 1fr); gap: 34px; }
.number-bond { width: 150px; min-height: 150px; position: relative; display: grid; grid-template-rows: auto 58px auto; justify-items: center; }
.number-bond > strong { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--pink-soft); color: var(--pink-dark); font: 900 29px/1 var(--font-display); }
.number-bond > div { width: 100%; display: flex; justify-content: space-between; }
.number-bond > div b { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e7f6fb; color: #2c86a5; font: 900 26px/1 var(--font-display); }
.bond-lines { width: 100px; height: 58px; position: relative; }
.bond-lines::before, .bond-lines::after { content: ""; position: absolute; width: 72px; height: 3px; left: 50%; top: 2px; border-radius: 99px; background: #e4aec2; transform-origin: 0 50%; }
.bond-lines::before { transform: rotate(140deg); }
.bond-lines::after { transform: rotate(40deg); }
.equation-ladder { display: grid; gap: 7px; width: 100%; }
.equation-ladder p { margin: 0; padding: 10px 14px; border-radius: 14px; background: white; border: 1px solid #f1dce4; font: 800 24px/1.2 var(--font-display); }
.equation-ladder .ladder-result { background: #e8f7ef; border-color: #b8dfcb; color: #39765b; }
.guided-question-card { margin: 16px 0; padding: 18px; border-radius: 19px; background: #fff7fa; border: 1px solid #efd4df; text-align: center; }
.guided-practice-stage { grid-template-columns: auto minmax(300px, 1fr); align-items: center; gap: 28px; }
.guided-steps { width: 100%; display: grid; gap: 10px; }
.guided-answer-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: white; border: 1px solid #f1dce4; }
.guided-answer-row > span { font-weight: 800; }
.independent-list { display: grid; gap: 12px; margin: 18px 0; }
.step-problem { padding: 17px; border-radius: 20px; background: white; border: 1px solid #eed9e1; }
.step-problem > strong { display: block; margin-bottom: 11px; font: 800 23px/1.2 var(--font-display); }
.step-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.step-inputs label { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 9px 11px; border-radius: 13px; background: #fff7fa; font-size: 13px; font-weight: 800; }
.step-inputs input, .exit-step-inputs input { width: 56px; padding: 6px; border: 2px solid #efbfd0; border-radius: 10px; text-align: center; color: var(--ink); font-weight: 900; }
.problem-feedback { margin-top: 10px; color: var(--pink-dark); font-size: 13px; font-weight: 800; }
.word-problem { margin: 17px 0; padding: 18px; border-radius: 20px; background: #fff6d9; color: #725717; text-align: center; }
.strategy-compare { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.strategy-compare article { padding: 17px; border-radius: 20px; background: white; border: 1px solid #efdce4; }
.strategy-compare article > strong { display: block; margin: -25px 0 14px 42px; }
.counting-path { display: flex; flex-wrap: wrap; gap: 5px; }
.counting-path b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--pink-soft); color: var(--pink-dark); }
.strategy-compare p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.exit-make-ten { grid-template-columns: auto minmax(280px, 1fr); align-items: center; gap: 30px; }
.exit-make-ten .ten-frame { grid-template-columns: repeat(5, 42px); gap: 5px; padding: 7px; border-radius: 17px; }
.exit-make-ten .ten-cell { width: 42px; height: 42px; border-radius: 10px; }
.exit-make-ten .counter-dot { width: 31px; height: 31px; }
.exit-step-inputs { width: 100%; display: grid; gap: 10px; }
.exit-step-inputs label { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 12px 14px; border-radius: 15px; background: white; border: 1px solid #f0dce4; font-weight: 800; }
.exit-criteria { display: grid; gap: 9px; margin: 16px 0; }

.guided-stage, .rule-stage { grid-template-columns: auto minmax(190px, 1fr); align-items: center; gap: 28px; }
.rule-explorer { grid-template-columns: auto minmax(240px, 1fr); align-items: center; gap: 36px; }
.guided-cell { padding: 0; border: 0; cursor: pointer; }
.guided-cell:nth-child(-n+2) { cursor: default; }
.empty-cell { border: 2px dashed #dfb9c8; background: #fff; }
.rule-stage .ten-frame { flex: 0 0 auto; }
.ten-frame.vertical { grid-template-columns: repeat(2, 62px); }
.rule-toggle.selected { background: var(--pink-soft); color: var(--pink-dark); outline: 2px solid var(--pink); }
.section-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.section-divider::before, .section-divider::after { content: ""; height: 1px; flex: 1; background: #efdbe3; }
.strategy-grid.three { grid-template-columns: repeat(3, 1fr); }
.help-box { margin: 17px 0; padding: 14px 17px; border-radius: 17px; background: #fff5f8; border: 1px solid #efd5df; }
.help-box summary { cursor: pointer; color: var(--pink-dark); font-weight: 800; }
.help-box ul { margin: 11px 0 0; padding-left: 21px; color: var(--muted); }
.help-box li + li { margin-top: 7px; }

.thinking-stage { align-content: center; gap: 18px; }
.thinking-prompts { width: min(680px, 100%); display: grid; gap: 9px; }
.thinking-card { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 16px; border-radius: 19px; background: white; border: 1px solid #f1dce4; text-align: left; }
.thinking-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--pink-soft); color: var(--pink-dark); font-weight: 900; }
.thinking-card-body { min-width: 0; }
.thinking-label { display: block; margin: 2px 0 10px; color: var(--ink); font-size: 15px; }
.equation-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.equation-pill, .group-pill { padding: 8px 11px; border-radius: 13px; background: #fff8fb; border: 1px solid #f0cfdb; font: 800 20px/1.15 var(--font-display); white-space: nowrap; }
.red-number { color: #e05678; }
.blue-number { color: #319abf; }
.group-pill { font-size: 16px; }
.red-group { background: #ffe8ee; border-color: #efafc0; color: #c9476b; }
.blue-group { background: #e7f6fb; border-color: #a8dbe9; color: #2c86a5; }
.question-group { border-style: dashed; color: var(--muted); }
.flow-arrow { color: var(--pink-dark); font-size: 23px; font-weight: 900; }
.thinking-question { margin: 11px 0 2px; font-weight: 800; color: var(--ink); }
.thinking-card small { color: var(--muted); }
.strategy-box { width: min(680px, 100%); }
.strategy-box > strong { display: block; margin-bottom: 9px; }
.strategy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.answer-button.strategy { min-height: 54px; padding: 9px; font-size: 15px; }
.mastery-summary { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mastery-summary span { padding: 7px 11px; border-radius: 99px; background: var(--pink-soft); color: var(--pink-dark); font-size: 12px; font-weight: 800; }
.celebration-sticker { width: 170px; margin-bottom: -8px; }
.parent-journal { position: relative; overflow: hidden; padding-right: 150px; }
.family-sticker { position: absolute; right: -20px; bottom: -18px; width: 180px; height: 200px; background: url("assets/stickers/family-sticker.png") center bottom / contain no-repeat; opacity: .95; pointer-events: none; }

.ten-frame-wrap { text-align: center; }
.ten-frame { display: grid; grid-template-columns: repeat(5, 62px); gap: 6px; padding: 8px; border-radius: 20px; background: #dba0b6; box-shadow: 0 12px 22px rgba(185, 109, 139, .15); }
.ten-cell { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 13px; background: white; }
.counter-dot { width: 43px; height: 43px; border-radius: 50%; box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.counter-dot.red { background: #f1789f; }
.counter-dot.blue { background: #78c8e1; }
.equation { margin: 18px 0 5px; font: 800 34px/1.2 var(--font-display); }
.frame-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.question-stack { width: min(570px, 100%); display: grid; gap: 11px; }
.exercise-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.answer-note { padding: 14px 16px; border-radius: 16px; background: #edf8f3; color: #4e7c67; line-height: 1.5; }
.answer-note p { margin: 4px 0 0; }
.math-row { display: grid; grid-template-columns: 1fr 92px 140px; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 17px; background: white; border: 1px solid #f2dde5; }
.math-row label { font: 800 25px/1.2 var(--font-display); }
.math-row input { width: 82px; padding: 7px 10px; text-align: center; border: 2px solid #eebbcf; border-radius: 13px; font: 800 22px/1.2 var(--font-display); color: var(--ink); }
.mark { color: var(--muted); font-size: 13px; font-weight: 800; }
.mark.correct { color: #4d9b77; }
.mark.wrong { color: #d75d72; }
.feedback { min-height: 27px; margin: 14px 0 0; color: var(--pink-dark); font-weight: 900; text-align: center; }
.answer-grid { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 12px; width: min(560px, 100%); }
.answer-button { min-height: 82px; padding: 13px; background: white; border: 2px solid #f0c5d5; font: 800 24px/1.2 var(--font-display); }
.answer-button.selected { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-dark); }
.answer-button.correct { background: #e3f5ec; border-color: #79c5a2; color: #337458; }
.answer-button.wrong { background: #ffeaee; border-color: #eaa0af; color: #a7465a; }
.celebration { text-align: center; }
.celebration-icon { font-size: 78px; animation: bounce .8s ease both; }
@keyframes bounce { 40% { transform: translateY(-12px) rotate(-4deg); } }
.score-ring { width: 140px; height: 140px; margin: 18px auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--pink) var(--score), #f5e5eb 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: white; }
.score-ring strong { position: relative; font: 800 31px/1 var(--font-display); }

.report-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
.big-score { display: flex; align-items: center; gap: 20px; }
.stars { color: #f2bb35; font-size: 25px; letter-spacing: 3px; }
.history-list { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #f2e4e9; }
.history-item:last-child { border-bottom: 0; }
.history-item small { color: var(--muted); }
.score-badge { min-width: 58px; padding: 7px 10px; border-radius: 99px; background: var(--pink-soft); color: var(--pink-dark); text-align: center; font-weight: 900; }
.empty-state { padding: 34px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { font-size: 50px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 900; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; border: 2px solid #f0dce4; border-radius: 14px; padding: 11px 13px; background: #fffafc; color: var(--ink); }
.field textarea { min-height: 118px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.tip { padding: 16px; border-radius: 18px; background: #edf8f3; color: #4e7c67; line-height: 1.55; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; padding: 12px 17px; border-radius: 14px; background: #45313d; color: white; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s ease; font-weight: 800; }
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-nav { display: none; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  #app { padding: 30px 22px 100px; }
  .mobile-nav { position: fixed; z-index: 10; left: 12px; right: 12px; bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 12px 35px rgba(124, 63, 88, .18); backdrop-filter: blur(18px); }
  .mobile-nav button { border: 0; background: transparent; display: grid; gap: 1px; place-items: center; padding: 6px; border-radius: 14px; color: var(--muted); }
  .mobile-nav button span { font-size: 20px; }
  .mobile-nav button small { font-size: 10px; font-weight: 900; }
  .mobile-nav button.active { background: var(--pink-soft); color: var(--pink-dark); }
  .lesson-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}

@media (max-width: 680px) {
  h1 { font-size: 40px; }
  .page-head { display: block; }
  .date-pill { display: inline-block; margin-top: 15px; }
  .hero-grid { grid-template-columns: 1fr; }
  .mascot, .hero-art { display: none; }
  .stats-grid, .report-grid { grid-template-columns: 1fr; }
  .lesson-list-card { align-items: flex-start; flex-wrap: wrap; }
  .lesson-list-card .primary { margin-left: 74px; }
  .ten-frame { grid-template-columns: repeat(5, minmax(42px, 54px)); }
  .ten-cell { width: auto; height: auto; aspect-ratio: 1; }
  .counter-dot { width: 72%; height: 72%; }
  .math-row { grid-template-columns: 1fr 78px; }
  .math-row .mark { grid-column: 1 / -1; }
  .answer-grid { grid-template-columns: 1fr; }
  .intro-cards, .intro-cards.two-columns { grid-template-columns: 1fr; }
  .bond-gallery { grid-template-columns: repeat(5, 110px); overflow-x: auto; justify-content: start; }
  .guided-stage, .rule-stage, .rule-explorer { grid-template-columns: 1fr; }
  .warmup-stage, .bond-stage, .guided-practice-stage, .exit-make-ten { grid-template-columns: 1fr; }
  .double-frame-scene { grid-template-columns: 1fr; justify-items: center; }
  .double-frame-scene .transfer-arrow { transform: rotate(90deg); }
  .blue-pool { width: min(330px, 100%); }
  .step-inputs, .strategy-compare { grid-template-columns: 1fr; }
  .guided-answer-row { grid-template-columns: 1fr; }
  .number-choices { justify-content: flex-start; }
  .ten-frame.vertical { grid-template-columns: repeat(2, minmax(48px, 58px)); }
  .strategy-grid { grid-template-columns: 1fr; }
  .strategy-grid.three { grid-template-columns: 1fr; }
  .activity-heading .sticker-sprite { width: 96px; margin-right: -10px; }
  .parent-journal { padding-right: 24px; padding-bottom: 185px; }
  .family-sticker { right: 50%; transform: translateX(50%); width: 170px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .lesson-workspace { padding: 18px; }
  .lesson-stage { padding: 16px 9px; }
  .lesson-actions .next { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
