:root {
  --ink: #253047;
  --muted: #718096;
  --line: #e8e9f1;
  --paper: #ffffff;
  --lavender: #7869d8;
  --lavender-dark: #5545ba;
  --lavender-pale: #f0eeff;
  --mint: #dff6ea;
  --peach: #fff0e1;
  --sky: #e6f4ff;
  --danger: #d85167;
  font-family: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #faf9ff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 8% 0%, #f5f1ff 0 22%, transparent 40%), #faf9ff; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #b9afff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.planet { max-width: 960px; min-height: 100vh; margin: 0 auto; padding: 24px 20px 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.topbar-actions { display: flex; align-items: center; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--lavender); color: white; border-radius: 14px; box-shadow: 0 7px 16px #7869d83d; }
.plain-button, .icon-button { color: var(--muted); background: transparent; border-radius: 12px; padding: 9px 11px; font-weight: 650; }
.plain-button:hover { color: var(--lavender-dark); background: var(--lavender-pale); }
.icon-button { font-size: 19px; padding: 7px 9px; }

.hero { position: relative; overflow: hidden; padding: 33px; border-radius: 28px; color: white; background: linear-gradient(135deg, #7767db, #a07ee0); box-shadow: 0 15px 40px #7767db2b; }
.hero::after { content: "✦"; position: absolute; right: 34px; top: 18px; font-size: 92px; opacity: .14; }
.eyebrow { display: inline-block; padding: 5px 10px; border-radius: 99px; background: #ffffff24; font-size: 13px; font-weight: 650; }
.hero h1 { position: relative; max-width: 560px; margin: 14px 0 9px; font-size: clamp(28px, 5vw, 43px); line-height: 1.18; letter-spacing: -.06em; }
.hero p { position: relative; max-width: 520px; margin: 0; opacity: .9; line-height: 1.7; }
.hero .teacher-note { position: relative; width: fit-content; margin: 22px 0 0; padding: 9px 13px; border-radius: 14px; background: #fffdf8; color: #6256a8; font-size: 14px; font-weight: 650; }

.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 32px 2px 15px; }
.section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.subject-card { min-height: 184px; padding: 19px; text-align: left; border: 1px solid #eeeef5; border-radius: 23px; background: white; color: var(--ink); transition: transform .16s ease, box-shadow .16s ease; }
.subject-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px #35306013; }
.subject-card .subject-icon { font-size: 32px; }
.subject-card h3 { margin: 25px 0 5px; font-size: 18px; }
.subject-card p { min-height: 38px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.subject-card small { display: block; margin-top: 13px; color: var(--lavender-dark); font-weight: 750; }
.subject-card.math { background: #eef5ff; }.subject-card.chinese { background: #fff4e9; }.subject-card.english { background: #ecfaf3; }.subject-card.explore { background: #f4efff; }

.progress-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin-top: 24px; padding: 17px 20px; border: 1px solid var(--line); background: white; border-radius: 20px; }
.progress-strip b { display: block; font-size: 15px; }.progress-strip span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }.progress-number { color: var(--lavender-dark); font-weight: 800; }

.onboarding { max-width: 630px; margin: 5vh auto; padding: 34px; border-radius: 28px; background: white; box-shadow: 0 20px 55px #2d28661a; }
.onboarding .brand { margin-bottom: 30px; }
.onboarding h1 { margin: 0; font-size: 30px; letter-spacing: -.05em; }.onboarding > p { color: var(--muted); line-height: 1.7; }
.experience-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.experience-card { width: min(100%, 620px); padding: 36px; border: 1px solid #e3e1f0; border-radius: 28px; background: #fff; box-shadow: 0 20px 55px #2d28661a; }
.experience-card .brand { margin-bottom: 28px; }
.experience-card h1 { margin: 12px 0 10px; font-size: clamp(27px, 5vw, 36px); line-height: 1.22; letter-spacing: -.05em; }
.experience-card > p { margin: 0; color: var(--muted); line-height: 1.7; }
.experience-summary { display: flex; align-items: center; gap: 14px; margin: 24px 0; padding: 16px; border: 1px solid #e6e3f3; border-radius: 18px; background: #faf9ff; }
.experience-avatar { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #eeeaff; font-size: 26px; }
.experience-summary b, .experience-summary small { display: block; }
.experience-summary small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.experience-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.experience-actions button { min-height: 48px; }
.experience-note { display: block; margin-top: 16px; color: #756f82; line-height: 1.55; text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 25px 0; }.form-grid .wide { grid-column: span 2; }
label { display: grid; gap: 7px; color: #4d5770; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; line-height: 1.4; }.data-notice-link { display: block; width: fit-content; margin: 11px auto 0; font-size: 13px; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #dfe1ec; border-radius: 13px; color: var(--ink); background: #fff; }
textarea { min-height: 46px; resize: none; line-height: 1.5; }
.avatar-picks { display: flex; gap: 8px; }.avatar-pick { width: 41px; height: 41px; border-radius: 50%; background: #f3f0ff; font-size: 21px; }.avatar-pick.selected { background: var(--lavender); box-shadow: 0 0 0 3px #dcd8ff; }
.primary { padding: 13px 18px; border-radius: 14px; background: var(--lavender); color: white; box-shadow: 0 8px 17px #7869d83b; font-weight: 800; }.primary:hover { background: var(--lavender-dark); }.primary:disabled { cursor: wait; opacity: .62; }
.secondary { padding: 11px 14px; border: 1px solid #dcd9f7; border-radius: 13px; color: var(--lavender-dark); background: var(--lavender-pale); font-weight: 750; }.secondary:hover { background: #e7e3ff; }
.danger { background: #fff0f2; color: var(--danger); border: 1px solid #ffd5dc; }

.setup { max-width: 700px; margin: 3vh auto; padding: 30px; border: 1px solid #ebebf2; border-radius: 28px; background: white; }.setup h1 { margin: 8px 0 6px; letter-spacing: -.05em; }.setup p { color: var(--muted); line-height: 1.65; }
.choice-list { display: grid; gap: 11px; margin: 25px 0; }.choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid #e5e4ee; border-radius: 16px; text-align: left; background: white; }.choice.selected { border-color: #b8afff; background: #f7f5ff; }.choice b { display: block; }.choice small { display: block; margin-top: 3px; color: var(--muted); }.check { color: var(--lavender); font-size: 20px; }

.math-kicker { color: #5545ba; background: var(--lavender-pale); }.math-pilot-page { max-width: 760px; }.math-pilot { margin: 20px auto 14px; padding: 26px; border: 1px solid #e6e1ff; border-radius: 25px; background: linear-gradient(145deg, #fff, #faf8ff); box-shadow: 0 13px 32px #584ca80d; }.math-pilot-kicker { display: inline-block; padding: 6px 10px; border-radius: 99px; color: #5645a7; background: #eeeaff; font-size: 13px; font-weight: 800; }.math-pilot h2 { max-width: 610px; margin: 14px 0 7px; font-size: clamp(22px, 4vw, 30px); line-height: 1.45; letter-spacing: -.04em; }.math-pilot-note { margin: 0 0 19px; color: var(--muted); line-height: 1.65; }.math-choice-list { display: grid; gap: 10px; }.math-choice { width: 100%; padding: 15px 16px; border: 1px solid #e1dff0; border-radius: 16px; color: #3d3b54; background: #fff; text-align: left; font-weight: 750; }.math-choice:hover { border-color: var(--lavender); color: var(--lavender-dark); background: #faf9ff; }.math-answer-form { display: grid; gap: 10px; }.math-answer-form label { color: #4a4569; }.math-answer-form textarea { min-height: 104px; resize: vertical; }.math-answer-form .primary { width: fit-content; }.math-feedback, .math-backfill { margin: 14px 0; padding: 12px 14px; border-radius: 14px; line-height: 1.6; }.math-feedback { color: #514487; background: #f0edff; }.math-backfill { color: #6c5127; background: #fff5df; border: 1px solid #f7dfad; }.math-hint { margin-top: 16px; border-top: 1px solid #ebe9f4; color: #5e5491; }.math-hint summary { padding: 13px 0 2px; cursor: pointer; font-weight: 800; }.math-hint p { margin: 9px 0 0; color: var(--muted); line-height: 1.6; }.math-evidence { margin: 0 auto; padding: 18px 21px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }.math-evidence h2 { margin: 0; font-size: 17px; }.math-evidence p { margin: 5px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }.math-evidence ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px 15px; margin: 0; padding: 0; list-style: none; }.math-evidence li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0eff6; font-size: 13px; }.math-evidence li span { color: var(--muted); }.math-evidence li b { color: #5d4fb0; }

.math-complete-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }.math-complete-actions span { color: var(--muted); font-size: 13px; }

.chat-page { display: flex; flex-direction: column; min-height: calc(100vh - 48px); }
.chat-header { display: flex; align-items: center; gap: 10px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }.chat-heading { flex: 1; }.chat-heading h1 { margin: 0; font-size: 19px; letter-spacing: -.04em; }.chat-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }.round-progress { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lavender) calc(var(--progress) * 1%), #eeeef5 0); color: var(--lavender-dark); font-size: 12px; font-weight: 800; }.round-progress::before { content: ""; position: absolute; width: 32px; height: 32px; border-radius: 50%; background: #faf9ff; }.round-progress span { position: relative; }
.quiet-tip { margin: 16px auto 6px; padding: 7px 12px; border-radius: 99px; color: #6b5bb9; background: var(--lavender-pale); font-size: 12px; }
.messages { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 13px 0 128px; }.message { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; }.message.user { justify-content: flex-end; }.teacher-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--lavender); color: white; }.bubble { max-width: min(84%, 520px); padding: 12px 14px; border-radius: 17px; background: white; box-shadow: 0 4px 16px #3932600a; line-height: 1.7; white-space: pre-wrap; font-size: 15px; }.message.teacher .bubble { border-top-left-radius: 5px; }.message.user .bubble { border-top-right-radius: 5px; color: #fff; background: #7667d5; }.message.error .bubble { color: #a04352; background: #fff1f3; }.typing .bubble { color: var(--muted); font-size: 14px; }
.audio-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #ecebfa; color: var(--lavender-dark); font-size: 12px; font-weight: 800; }.audio-line button { padding: 5px 8px; border-radius: 8px; color: inherit; background: var(--lavender-pale); }
.chat-composer { position: fixed; z-index: 4; right: 0; bottom: 0; left: 0; padding: 13px 20px 18px; background: linear-gradient(transparent, #faf9ff 22%); }.composer-inner { display: flex; align-items: end; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px; border: 1px solid #dfddea; border-radius: 20px; background: white; box-shadow: 0 9px 28px #3a32621a; }.composer-inner textarea { border: 0; padding: 7px 5px; min-height: 40px; max-height: 132px; overflow-y: auto; }.mic.active { color: #fff; background: #e95c73; }.send { width: 40px; height: 40px; border-radius: 13px; color: white; background: var(--lavender); font-size: 18px; }.quick-actions { display: flex; gap: 7px; max-width: 760px; margin: 0 auto 7px; overflow-x: auto; }.quick-actions button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid #e3e0f5; border-radius: 99px; color: #6657b0; background: #fff; font-size: 12px; font-weight: 700; }.quick-actions .home-quick-action { color: #fff; border-color: var(--lavender); background: var(--lavender); }.pause-notice { max-width: 760px; margin: 10px auto 0; padding: 9px 12px; border: 1px solid #ded9fb; border-radius: 13px; color: #54459f; background: #f2efff; font-size: 13px; }
.math-chat-page .messages { padding-bottom: 18px; }.math-chat-page .math-evidence { width: 100%; max-width: 720px; margin: 0 auto 146px; }.chat-backfill { width: 100%; max-width: 720px; margin: 0 auto 13px; }.math-finish { display: grid; gap: 6px; max-width: 720px; margin: 0 auto; padding: 15px 16px; border: 1px solid #ded9fb; border-radius: 18px; color: #514487; background: #fff; }.math-finish span { color: var(--muted); font-size: 13px; line-height: 1.55; }.math-finish .secondary { width: fit-content; margin-top: 4px; }.math-chat-page .send { width: auto; min-width: 68px; padding: 0 14px; font-size: 14px; font-weight: 800; }

.explore-wrap { max-width: 720px; margin: 0 auto; }.explore-hero { padding: 28px; border-radius: 25px; color: #fff; background: linear-gradient(135deg,#4d79d9,#9474d8); }.explore-hero h1 { margin: 8px 0; letter-spacing: -.05em; }.explore-hero p { margin: 0; opacity: .9; line-height: 1.65; }.explore-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }.explore-tools button { padding: 14px 10px; border-radius: 16px; color: #4e57a0; background: white; border: 1px solid #e2e4f6; font-weight: 800; }.explore-tools button span { display: block; font-size: 23px; margin-bottom: 5px; }.work-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }.work { overflow: hidden; border: 1px solid #e7e7ef; border-radius: 17px; background: white; }.work img { width: 100%; height: 150px; object-fit: cover; display: block; }.work-text { padding: 13px; }.work-text b { display: block; }.work-text small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }.work-actions { display: flex; gap: 8px; margin-top: 10px; }.work-actions button { color: var(--lavender-dark); background: var(--lavender-pale); padding: 6px 8px; border-radius: 9px; font-size: 12px; font-weight: 700; }

.parent-page { max-width: 760px; margin: 0 auto; }.parent-card { margin: 14px 0; padding: 21px; border: 1px solid #e8e8f0; border-radius: 21px; background: white; }.parent-card h2 { margin: 0 0 6px; font-size: 18px; }.parent-card > p { color: var(--muted); line-height: 1.6; }.mastery-list { display: grid; gap: 9px; }.mastery-row { display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f5; }.mastery-row:last-child { border: 0; }.mastery-row small { color: var(--muted); }.state { padding: 5px 8px; border-radius: 99px; font-size: 12px; font-weight: 750; }.state.new { color: #6a5bac; background: #f0edff; }.state.learning { color: #287d58; background: #e6f8ef; }.state.solid { color: #a66b26; background: #fff3df; }.parent-actions { display: flex; flex-wrap: wrap; gap: 9px; }.chat-log { max-height: 350px; overflow: auto; padding: 12px; border-radius: 13px; background: #fafaff; }.chat-log p { margin: 9px 0; line-height: 1.55; }.chat-log b { color: var(--lavender-dark); }
.empty { padding: 22px; color: var(--muted); text-align: center; background: #fafaff; border-radius: 16px; }.toast { position: fixed; z-index: 20; right: 18px; bottom: 20px; max-width: 340px; padding: 11px 14px; border-radius: 13px; color: #fff; background: #33304d; box-shadow: 0 10px 25px #201c4436; opacity: 0; pointer-events: none; transform: translateY(9px); transition: .18s; }.toast.show { opacity: 1; transform: translateY(0); }
.voice-consent-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: #25213c73; }.voice-consent-dialog { width: min(100%, 430px); padding: 24px; border: 1px solid #e1dcff; border-radius: 22px; background: #fff; box-shadow: 0 18px 52px #241d4c42; }.voice-consent-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 13px; border-radius: 14px; background: var(--lavender-pale); font-size: 21px; }.voice-consent-dialog h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }.voice-consent-dialog p { margin: 10px 0 0; color: #505b72; font-size: 14px; line-height: 1.65; }.voice-consent-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

@media (max-width: 720px) { .planet { padding: 17px 14px 34px; }.hero { padding: 26px 22px; }.subject-grid { grid-template-columns: repeat(2,1fr); }.subject-card { min-height: 160px; }.subject-card h3 { margin-top: 17px; }.onboarding { margin: 0; padding: 26px 20px; min-height: 100vh; border-radius: 0; }.experience-gate { padding: 0; }.experience-card { min-height: 100vh; padding: 28px 20px; border: 0; border-radius: 0; }.experience-actions { grid-template-columns: 1fr; }.setup { margin: 0; padding: 24px 20px; border: 0; border-radius: 0; }.form-grid { grid-template-columns: 1fr; }.form-grid .wide { grid-column: span 1; }.bubble { max-width: 87%; }.chat-composer { padding: 10px 12px 14px; }.explore-tools { grid-template-columns: 1fr; }.work-grid { grid-template-columns: 1fr; }.math-pilot { padding: 21px 17px; }.math-evidence ul { grid-template-columns: 1fr; }.topbar { margin-bottom: 18px; }.voice-consent-actions { justify-content: stretch; }.voice-consent-actions button { flex: 1 1 150px; } }
