:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --surface: #fffefa;
  --ink: #18221f;
  --muted: #5d6761;
  --line: #d9ded4;
  --accent: #c7432c;
  --accent-soft: #fbe5dc;
  --green: #347057;
  --green-soft: #e8f0df;
  --blue: #4256b7;
  --blue-soft: #e7ebfa;
  --star: #e3a52d;
  --star-empty: #e4e3dc;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  font-synthesis: none;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
button:active:not(:disabled) { filter: brightness(.94); }
[hidden] { display: none !important; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
h1, .hero h1, .modal h2 { font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-weight: 500; letter-spacing: -.045em; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 20; padding: 14px 20px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { max-width: 1440px; margin: 0 auto; padding: 0 58px; }
.topbar { height: 102px; display: flex; align-items: center; gap: 50px; border-bottom: 1px solid var(--line); }
.brand { border: 0; background: none; display: inline-flex; align-items: center; gap: 10px; padding: 0; white-space: nowrap; }
.brand > svg { width: 25px; height: 34px; fill: var(--accent); }
.brand > span { display: flex; flex-direction: column; align-items: flex-start; font-size: 28px; font-weight: 850; letter-spacing: -.07em; line-height: .91; }
.brand-light { font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-top: 6px; }
.topbar nav { display: flex; gap: 30px; align-self: stretch; }
.nav-link { border: 0; border-bottom: 2px solid transparent; background: none; padding: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--ink); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 25px; }
.prototype-label { font-size: 11px; color: var(--muted); }
.total-stars { display: flex; align-items: center; gap: 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-stars svg { color: #9c6b12; fill: #f3c465; width: 21px; }
.total-denominator { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: -5px; }
.profile-dot { width: 36px; height: 36px; display: grid; place-items: center; background: #e4e9df; border: 1px solid #cbd3c5; border-radius: 50%; font-size: 12px; font-weight: 600; }
main:focus { outline: none; }
.hero { min-height: 447px; padding: 48px 0 44px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 60px; }
.hello-line { font-size: 13px; font-weight: 600; margin-bottom: 15px; color: var(--green); }
.hero h1 { font-size: clamp(46px, 4.9vw, 69px); line-height: 1.04; margin-bottom: 20px; }
.hero-description { color: var(--muted); max-width: 410px; font-size: 15px; line-height: 1.65; }
.button { min-height: 46px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; transition: background .18s, border-color .18s, box-shadow .18s; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: #ab3927; box-shadow: 0 3px 0 #912b1c; }
.button.secondary { background: var(--surface); border-color: #bfc8bc; }
.button.secondary:hover:not(:disabled) { background: var(--green-soft); }
.hero .button { margin-top: 24px; }
.hero-footnote { color: var(--muted); font-size: 11px; margin-top: 13px; }
.hero-world { position: relative; height: 330px; min-width: 0; display: grid; place-items: center; }
.world-core { width: 290px; height: 270px; z-index: 1; transform: rotate(-5deg); }
.world-orbit { position: absolute; width: 310px; height: 250px; border: 1px dashed #c6cfba; border-radius: 50%; transform: rotate(-32deg); }
.orbit-two { width: 410px; height: 210px; transform: rotate(26deg); border-color: #d7caba; }
.floating-card { z-index: 2; position: absolute; background: var(--surface); box-shadow: 0 5px 20px #3d41240a; border: 1px solid #d9d9ca; border-radius: 10px; }
.card-equation { top: 8px; left: 12px; width: 174px; padding: 15px 18px; transform: rotate(-8deg); font: 22px/1.5 Georgia, serif; }
.card-equation b { color: var(--green); font-weight: 500; }
.equation-dots { display: flex; gap: 4px; margin-bottom: 10px; }
.equation-dots i { width: 5px; height: 5px; background: #d4d8cb; border-radius: 50%; }
.card-stars { bottom: 13px; right: 0; display: flex; align-items: center; gap: 10px; padding: 13px 17px; transform: rotate(5deg); font-size: 12px; font-weight: 600; }
.card-stars svg { width: 27px; height: 27px; fill: #edb94c; }
.orbit-spark { position: absolute; width: 12px; height: 12px; background: #e8a387; transform: rotate(45deg); border-radius: 2px; }
.spark-one { right: 20px; top: 44px; }
.spark-two { left: 60px; bottom: 42px; width: 8px; height: 8px; background: #70a487; }
.spark-three { right: 75px; top: 18px; width: 5px; height: 5px; background: #5a72d6; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.045em; font-weight: 650; }
.section-heading p { font-size: 12px; margin-top: 5px; color: var(--muted); }
.subject-section > .section-heading { align-items: baseline; }
.subjects { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.subject { text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; min-height: 95px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.subject.active { border-color: #94a990; background: #f0f4e9; }
.subject-symbol { width: 48px; height: 48px; background: #e1eacb; color: #39543a; border-radius: 12px; font: 36px/1 Georgia,serif; display: grid; place-items: center; flex-shrink: 0; }
.subject-symbol svg { width: 27px; height: 27px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.science-symbol { color: #6e668e; background: #ece6f2; }
.language-symbol { color: #a76543; background: #f4e6d8; font-size: 22px; }
.subject strong { font-size: 14px; font-weight: 650; }
.subject small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.subject-status { margin-left: auto; font-size: 9px; white-space: nowrap; padding: 4px 6px; background: #edf0e9; border-radius: 4px; color: var(--muted); }
.active .subject-status { color: #3c633a; background: #e1eacb; }
.quest-section { padding: 42px 0 36px; }
.quiet-chip { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 5px 9px; border-radius: 5px; white-space: nowrap; }
.quest-map { position: relative; padding-top: 14px; }
.quest-route { position: absolute; top: 4px; left: 0; width: 100%; height: 215px; overflow: visible; pointer-events: none; }
.quest-route path { fill: none; stroke: #c8d0be; stroke-width: 2; stroke-dasharray: 6 8; }
.quest-grid { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 23px; }
.quest-card { position: relative; border: 1px solid #d6ddcf; background: var(--surface); border-radius: 12px; padding: 18px; text-align: left; transition: border-color .2s, box-shadow .2s; min-height: 213px; }
.quest-card:hover { border-color: #7a9676; box-shadow: 0 5px 0 #dfe6d5; }
.quest-card:nth-child(2), .quest-card:nth-child(4) { margin-top: 24px; margin-bottom: -24px; }
.quest-number { position: absolute; top: -13px; right: 16px; background: var(--paper); border: 1px solid #cbd5c0; border-radius: 50%; width: 25px; height: 25px; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.quest-art { width: 59px; height: 59px; display: grid; place-items: center; background: #eef3e6; border-radius: 12px; margin-bottom: 13px; }
.quest-art svg { width: 43px; height: 43px; }
.quest-card:nth-child(2) .quest-art { background: #f9e5d8; }
.quest-card:nth-child(3) .quest-art { background: #e8e9f9; }
.quest-card:nth-child(4) .quest-art { background: #f7eed6; }
.quest-card h3 { font-size: 15px; letter-spacing: -.025em; font-weight: 650; }
.quest-card p { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.quest-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #e8e9e0; }
.quest-card-footer > span { font-size: 9px; color: var(--muted); }
.stars { display: flex; align-items: center; gap: 4px; }
.stars svg { width: 19px; height: 19px; fill: var(--star-empty); }
.stars svg.earned { fill: #e7ac35; }
.tutor-section { margin-top: 30px; padding: 16px 0 33px; }
.tutor-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.tutor-option { display: grid; grid-template-columns: 62px 1fr 18px; align-items: center; gap: 10px; min-height: 90px; text-align: left; background: transparent; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.tutor-option[aria-pressed=true] { background: #f0f3e9; border-color: #82967c; }
.tutor-option:hover { border-color: #8a9d83; }
.tutor-option strong { display: block; font-size: 13px; }
.tutor-option small { color: var(--muted); font-size: 10px; }
.selection-check { width: 17px; height: 17px; border: 1px solid #adbba6; border-radius: 50%; display: grid; place-items: center; }
.selection-check svg { width: 11px; height: 11px; stroke: white; fill: none; stroke-width: 2; opacity: 0; }
[aria-pressed=true] .selection-check { background: #4e7147; border-color: #4e7147; }
[aria-pressed=true] .selection-check svg { opacity: 1; }
.tutor-mini { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; background: #e4e9dd; }
.tutor-mini > svg { width: 100%; height: 100%; }
.alex-stamp { width: 100%; height: 100%; background-image: url('./assets/alex-photo-atlas.png'); background-size: 300% 200%; background-position: left top; border-radius: inherit; }
.deployment-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; margin-top: 22px; border: 1px solid #bfcbb5; border-left: 4px solid var(--green); border-radius: 8px; background: var(--green-soft); }
.deployment-notice strong { display: block; font-size: 14px; }
.deployment-notice p { max-width: 66ch; margin-top: 4px; font-size: 13px; color: #3d5544; }
.deployment-links { display: flex; flex-wrap: wrap; gap: 4px 18px; flex-shrink: 0; max-width: 230px; }
.deployment-notice a, .feature-note a { color: #264d3a; font-weight: 650; text-underline-offset: 3px; }
.deployment-links a { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; }
.deployment-notice.compact { padding: 11px 16px; }
.feature-note { font-size: 13px; color: var(--muted); margin: -8px 0 18px; max-width: 90ch; }
@media (max-width: 760px) {
  .deployment-notice { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 16px; }
  .deployment-links { max-width: 100%; gap: 4px 18px; }
}
.home-footer { border-top: 1px solid var(--line); padding: 23px 0 30px; display: flex; justify-content: space-between; gap: 50px; color: var(--muted); font-size: 10px; }
.home-footer p:first-child { max-width: 580px; }
.home-footer p:last-child { white-space: nowrap; }
.how-it-works { padding: 32px 0 36px; border-top: 1px solid var(--line); scroll-margin-top: 25px; }
.how-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 35px; }
.how-grid article { position: relative; padding-left: 38px; }
.how-number { position: absolute; left: 0; top: 0; width: 25px; height: 25px; border: 1px solid #b9c6ad; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: var(--green); }
.how-grid h3 { font-size: 15px; margin: 1px 0 10px; font-weight: 650; }
.how-grid p { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.how-grid .quiet-chip { display: inline-block; white-space: normal; }
.roadmap-section { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; padding: 30px; background: #edf0e6; border-radius: 12px; margin: 0 0 35px; scroll-margin-top: 25px; }
.roadmap-title h2 { font-size: 23px; line-height: 1.4; letter-spacing: -.04em; font-weight: 600; }
.roadmap-title p { font-size: 12px; margin-top: 12px; color: var(--muted); }
.roadmap-section ul { margin: 0; padding-left: 18px; color: #485c43; font-size: 13px; line-height: 1.8; }
.roadmap-section li + li { margin-top: 8px; }
.notice { font-size: 14px; padding: 20px 0; color: var(--muted); }
.lesson-heading { padding: 29px 0 24px; display: flex; align-items: center; gap: 24px; }
.back-button { display: flex; align-items: center; gap: 4px; border: 0; background: none; padding: 8px 0; font-size: 12px; color: var(--muted); }
.back-button .icon { width: 17px; }
.quest-heading { border-left: 1px solid var(--line); padding-left: 24px; }
.quest-heading p { font-size: 10px; color: var(--muted); }
.quest-heading h1 { font-family: inherit; font-size: 25px; font-weight: 650; letter-spacing: -.045em; margin-top: 3px; }
.lesson-score { margin-left: auto; text-align: right; }
.lesson-score .stars { justify-content: flex-end; }
.lesson-score .stars svg { width: 26px; height: 26px; }
.lesson-score > span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 26px; align-items: start; padding-bottom: 40px; }
.lesson-board { border: 1px solid #d9ded1; border-radius: 14px; background: var(--surface); padding: 25px 29px 19px; min-width: 0; }
.board-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; }
#practice-mode { color: var(--green); font-size: 10px; }
.lesson-board h2 { font-size: 23px; letter-spacing: -.04em; line-height: 1.3; font-weight: 650; }
.question-prompt { margin-top: 11px; font-size: 17px; max-width: 680px; line-height: 1.65; }
.visual-stage { position: relative; height: 292px; border-radius: 10px; margin: 23px 0; background: #f4f6ed; overflow: hidden; border: 1px solid #e4e8dc; }
#pond-canvas { width: 100%; height: 100%; display: block; }
.math-visual { position: absolute; inset: 20px 20px 46px; display: grid; place-items: center; }
.math-visual > svg { width: 100%; height: 100%; max-width: 580px; }
.visual-caption { position: absolute; bottom: 10px; left: 14px; right: 14px; text-align: center; font-size: 11px; color: #4b5e49; pointer-events: none; }
.answer-form label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.answer-entry { display: flex; gap: 10px; }
.answer-entry input { min-width: 0; flex: 1; border: 1px solid #bfc9b8; padding: 12px 15px; border-radius: 8px; background: #fff; font-size: 16px; color: var(--ink); }
.answer-entry input::placeholder { font-family: 'Avenir Next','Segoe UI',sans-serif; font-size: 13px; color: #687368; }
.answer-actions { margin-top: 12px; display: flex; align-items: center; gap: 25px; min-height: 40px; flex-wrap: wrap; }
.text-button { border: 0; background: none; padding: 8px 0; font-size: 11px; color: #4f6152; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; }
.text-button:hover:not(:disabled) { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.text-button .icon { width: 17px; height: 17px; }
.next-button { background: var(--green); color: white; margin-left: auto; }
.next-button:hover { background: #285a44; }
.question-note { color: var(--muted); font-size: 10px; line-height: 1.6; margin-top: 10px; }
.answer-feedback { font-size: 13px; line-height: 1.65; padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; background: #edf3e5; border: 1px solid #d4e2c7; }
.answer-feedback[data-result=incorrect] { background: #fbede4; border-color: #eac9b9; }
.answer-feedback[data-result=uncertain], .answer-feedback[data-result=hint] { background: #f6f1df; border-color: #ded2a8; }
.answer-feedback strong { display: block; margin-bottom: 4px; }
.answer-feedback p { color: #43513f; }
.inline-error { color: #9e2d23; font-size: 12px; background: #fff0e9; border: 1px solid #efc0b2; border-radius: 6px; padding: 11px 13px; margin-top: 14px; }
.tutor-aside { min-width: 0; }
.active-tutor-card { background: #eaf0e0; border: 1px solid #d4dec9; border-radius: 14px; padding: 17px 20px; }
.tutor-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.live-indicator { font-size: 9px; color: #44633c; display: inline-flex; align-items: center; gap: 6px; }
.live-indicator::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #709a5c; }
.live-indicator.connected::before { background: #258941; box-shadow: 0 0 0 3px #b7d9a9; }
.text-button.small { font-size: 9px; min-height: 32px; }
.active-avatar { width: 166px; height: 171px; margin: 6px auto 4px; position: relative; overflow: hidden; }
.active-avatar > svg { width: 100%; height: 100%; }
.active-avatar .alex-stamp { width: 118px; height: 144px; margin: 18px auto; border-radius: 60px 60px 15px 15px; background-size: 300% 200%; }
.active-tutor-name { display: flex; gap: 9px; align-items: baseline; justify-content: center; }
.active-tutor-name h2 { font-size: 19px; letter-spacing: -.04em; }
.active-tutor-name span { font-size: 9px; color: #57694c; }
.tutor-caption { font-size: 12px; line-height: 1.75; color: #3f533a; margin: 16px 0; padding: 15px; background: #f8fbf2; border: 1px solid #d9e2ce; border-radius: 9px; max-height: 270px; overflow-y: auto; white-space: pre-line; }
.connect-button { width: 100%; min-height: 40px; font-size: 11px; }
.live-status { font-size: 9px; color: #52664a; line-height: 1.7; margin-top: 10px; text-align: center; }
.media-controls { display: flex; justify-content: center; gap: 12px; }
.icon-button { border: 1px solid #bbc9b0; background: #fffdf8; min-width: 42px; min-height: 42px; border-radius: 9px; display: grid; place-items: center; padding: 8px; }
.icon-button .icon { width: 19px; height: 19px; }
.icon-button[aria-pressed=true] { background: var(--green); border-color: var(--green); color: white; }
.goal-card { display: flex; align-items: flex-start; gap: 12px; padding: 23px 8px; }
.goal-icon { width: 30px; height: 30px; background: #faedcf; color: #aa7419; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.goal-icon svg { width: 18px; height: 18px; }
.goal-card h3 { font-size: 11px; font-weight: 650; margin: 2px 0 5px; }
.goal-card p { font-size: 10px; color: var(--muted); line-height: 1.7; }
.heard { font-size: 10px; margin-top: 10px; color: #506147; }
.camera-preview { margin-top: 14px; position: relative; border-radius: 7px; overflow: hidden; }
.camera-preview video { width: 100%; display: block; }
.camera-preview span { position: absolute; bottom: 5px; left: 5px; background: #18221fd9; color: white; padding: 2px 6px; border-radius: 3px; font-size: 9px; }
.modal { width: min(460px, calc(100% - 32px)); border: 1px solid #cbd2c4; border-radius: 17px; background: var(--paper); color: var(--ink); padding: 36px; box-shadow: 0 25px 90px #14271f25; max-height: calc(100dvh - 40px); overflow: auto; }
.modal::backdrop { background: #1d2a236b; backdrop-filter: blur(4px); }
.modal-close { position: absolute; right: 14px; top: 14px; min-width: 34px; min-height: 34px; border: 0; background: transparent; font-size: 24px; color: var(--muted); padding: 0; }
.modal h2 { font-size: 33px; line-height: 1.12; margin: 10px 0 16px; }
.modal > p:not(.modal-kicker) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.modal-kicker { font-size: 11px; color: var(--green); font-weight: 600; }
.preview-icon { width: 70px; height: 70px; border-radius: 14px; display: grid; place-items: center; background: #e9efdd; margin-bottom: 20px; }
.preview-icon svg { width: 50px; height: 50px; }
.preview-detail { margin-top: 12px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; margin-top: 24px; cursor: pointer; }
.consent-label input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); flex-shrink: 0; }
.modal > p.privacy-note { font-size: 10px; line-height: 1.7; margin: 13px 0 22px; }
.full-width { width: 100%; }
.cloud-mark { width: 50px; height: 50px; background: var(--accent-soft); color: var(--accent); border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.cloud-mark svg { width: 30px; height: 30px; }
.tutor-modal { width: min(650px, calc(100% - 32px)); }
.tutor-modal .tutor-grid { grid-template-columns: 1fr 1fr; margin-top: 24px; }
.tutor-modal .tutor-option { min-width: 0; }
.complete-modal { text-align: center; }
.large-stars { justify-content: center; gap: 13px; margin: 22px 0; }
.large-stars svg { width: 54px; height: 54px; }
.complete-modal .primary { margin-top: 23px; }
.avatar-mouth { transform-origin: center; transform-box: fill-box; }
.active-avatar.speaking .avatar-mouth { animation: talk .22s ease-in-out infinite alternate; }
.active-avatar.speaking .avatar-head { animation: nod 1.7s ease-in-out infinite; transform-origin: 50% 65%; }
.avatar-eyes { transform-origin: center; transform-box: fill-box; }
.active-avatar:not(.motion-paused) .avatar-eyes { animation: blink 6s infinite; }
@keyframes talk { from { transform: scaleY(.55); } to { transform: scaleY(1.5); } }
@keyframes nod { 50% { transform: rotate(2deg) translateY(2px); } }
@keyframes blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }
@media (min-width: 1500px) { .hero { min-height: 490px; } }
@media (max-width: 1100px) {
  .app-shell { padding: 0 32px; }
  .topbar { gap: 35px; }
  .topbar-end { gap: 18px; }
  .hero { gap: 25px; }
  .hero-world { height: 310px; }
  .card-equation { left: 0; width: 150px; font-size: 20px; }
  .orbit-two { width: 330px; }
  .subject { padding: 13px; gap: 9px; }
  .subject-symbol { width: 39px; height: 43px; }
  .subject-status { display: none; }
  .unavailable .subject-status { display: block; font-size: 8px; padding: 3px; }
  .subject small { font-size: 9px; }
  .tutor-option { grid-template-columns: 45px 1fr 15px; padding: 8px; gap: 7px; }
  .tutor-mini { width: 45px; height: 45px; }
  .tutor-option small { font-size: 8px; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; }
  .lesson-board { padding: 23px; }
  .active-tutor-card { padding: 15px; }
  .answer-entry { flex-wrap: wrap; }
  .answer-entry input { flex-basis: 60%; }
  .answer-entry .primary { flex: 1; }
}
@media (max-width: 800px) {
  .topbar { height: 82px; gap: 28px; }
  .topbar nav { gap: 20px; }
  .prototype-label { display: none; }
  .hero { grid-template-columns: 1.1fr 1fr; gap: 10px; min-height: 380px; padding: 38px 0; }
  .hero h1 { font-size: 47px; }
  .hero-description { font-size: 13px; }
  .hello-line { font-size: 11px; }
  .hero-world { height: 280px; }
  .world-core { width: 230px; height: 220px; }
  .world-orbit { width: 230px; height: 200px; }
  .orbit-two { width: 265px; height: 170px; }
  .card-equation { width: 123px; padding: 10px; top: 0; left: -5px; font-size: 17px; }
  .card-stars { right: -2px; bottom: 12px; padding: 10px; font-size: 9px; }
  .card-stars svg { width: 20px; height: 20px; }
  .subject-section > .section-heading { display: block; }
  .section-heading h2 { font-size: 20px; }
  .subjects { gap: 10px; }
  .subject { padding: 12px; display: grid; grid-template-columns: 37px 1fr; gap: 8px; }
  .subject-symbol { width: 37px; height: 40px; }
  .subject strong { font-size: 12px; }
  .subject .subject-status { grid-column: 2; justify-self: start; margin: 0; display: block; }
  .subject small { display: none; }
  .quest-grid { gap: 13px; }
  .quest-card { padding: 14px; min-height: 220px; }
  .quest-card h3 { font-size: 13px; }
  .quest-card p { font-size: 10px; }
  .quest-card-footer { flex-wrap: wrap; }
  .tutor-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tutor-option { grid-template-columns: 55px 1fr 20px; padding: 10px 14px; }
  .tutor-mini { width: 55px; height: 55px; }
  .tutor-option small { font-size: 10px; }
  .home-footer { gap: 25px; }
  .home-footer p:last-child { display: none; }
  .lesson-heading { gap: 15px; }
  .quest-heading { padding-left: 15px; }
  .quest-heading h1 { font-size: 21px; }
  .lesson-layout { grid-template-columns: minmax(0,1fr) 200px; gap: 14px; }
  .lesson-board { padding: 18px; }
  .question-prompt { font-size: 16px; }
  .lesson-board h2 { font-size: 20px; }
  .active-tutor-card { padding: 12px; }
  .active-avatar { width: 140px; height: 144px; }
  .tutor-topline { flex-wrap: wrap; gap: 0; }
  .tutor-caption { padding: 12px; font-size: 11px; }
  .active-tutor-name { display: block; text-align: center; }
  .active-tutor-name span { display: block; margin-top: 2px; }
  .goal-card { padding: 18px 2px; gap: 8px; }
  .goal-card p { font-size: 9px; }
  .visual-stage { height: 260px; }
  .answer-actions { gap: 14px; }
  .next-button { margin-left: 0; }
  .lesson-score > span { max-width: 110px; }
}
@media (max-width: 600px) {
  .app-shell { padding: 0 20px; }
  .topbar { height: 76px; gap: 18px; }
  .brand > span { font-size: 24px; }
  .brand > svg { width: 22px; height: 29px; }
  .brand-light { font-size: 10px; }
  .topbar nav { margin-left: auto; gap: 15px; }
  .nav-link { font-size: 12px; }
  .topbar-end { margin-left: 0; gap: 0; }
  .profile-dot { display: none; }
  .total-stars { gap: 4px; font-size: 12px; }
  .total-denominator { display: none; }
  .total-stars svg { width: 17px; }
  .hero { display: block; padding-top: 31px; min-height: 0; }
  .hero h1 { font-size: 51px; line-height: 1.04; margin-bottom: 18px; }
  .hero-description { font-size: 14px; max-width: 370px; }
  .hero-world { display: none; }
  .hero-footnote { font-size: 10px; }
  .hero .button { margin-top: 21px; }
  .subject-section > .section-heading { margin-bottom: 17px; }
  .subjects { grid-template-columns: 1fr; gap: 9px; }
  .subject { display: flex; padding: 11px 14px; min-height: 72px; gap: 12px; }
  .subject-symbol { width: 44px; height: 44px; }
  .subject strong { font-size: 13px; }
  .subject small { display: block; font-size: 10px; }
  .subject .subject-status { margin-left: auto; font-size: 9px; }
  .section-heading { align-items: flex-start; gap: 14px; }
  .section-heading p { font-size: 11px; max-width: 240px; line-height: 1.7; }
  .quest-section { padding: 30px 0 19px; }
  .quest-section .quiet-chip { display: none; }
  .quest-map { padding-top: 0; }
  .quest-route { display: none; }
  .quest-grid { grid-template-columns: 1fr 1fr; gap: 23px 12px; }
  .quest-card { min-height: 220px; padding: 16px; }
  .quest-card:nth-child(2), .quest-card:nth-child(4) { margin: 0; }
  .quest-card h3 { font-size: 14px; }
  .quest-art { width: 55px; height: 55px; }
  .quest-card p { font-size: 10px; }
  .tutor-section { margin-top: 18px; }
  .tutor-section .quiet-chip { display: none; }
  .tutor-grid { gap: 10px; }
  .tutor-option { grid-template-columns: 43px 1fr; gap: 8px; padding: 11px; min-height: 82px; }
  .tutor-mini { width: 43px; height: 43px; }
  .tutor-option strong { font-size: 12px; }
  .tutor-option small { font-size: 9px; }
  .selection-check { display: none; }
  .home-footer { font-size: 9px; padding-top: 20px; }
  .how-grid { grid-template-columns: 1fr; gap: 25px; }
  .how-grid h3 { font-size: 16px; }
  .how-grid p { font-size: 14px; margin-bottom: 12px; }
  .roadmap-section { grid-template-columns: 1fr; gap: 20px; padding: 23px; }
  .roadmap-section ul { font-size: 14px; }
  .lesson-heading { flex-wrap: wrap; gap: 12px; padding: 20px 0; }
  .back-button { font-size: 11px; }
  .quest-heading { border: 0; padding: 0; flex: 1; }
  .quest-heading p { font-size: 9px; }
  .quest-heading h1 { font-size: 20px; }
  .lesson-score { display: flex; align-items: center; justify-content: space-between; width: 100%; border-top: 1px solid var(--line); padding-top: 13px; }
  .lesson-score .stars svg { width: 23px; height: 23px; }
  .lesson-score > span { max-width: none; font-size: 10px; margin: 0; }
  .lesson-layout { display: flex; flex-direction: column; gap: 18px; }
  .lesson-board { padding: 20px 16px 17px; width: 100%; }
  .question-prompt { font-size: 17px; line-height: 1.65; }
  .visual-stage { height: 252px; margin: 20px 0; }
  .visual-caption { font-size: 10px; }
  .answer-entry { display: grid; grid-template-columns: 1fr; }
  .answer-entry input { min-height: 49px; width: 100%; }
  .answer-entry .primary { min-height: 46px; }
  .answer-actions { gap: 20px; }
  .answer-actions .text-button { min-height: 44px; }
  .answer-actions .next-button { width: 100%; }
  .question-note { font-size: 10px; }
  .tutor-aside { width: 100%; }
  .active-tutor-card { display: grid; grid-template-columns: 104px 1fr; gap: 0 15px; padding: 16px; align-items: start; }
  .tutor-topline { grid-column: 1/-1; flex-wrap: nowrap; margin-bottom: 4px; }
  .active-avatar { grid-column: 1; grid-row: 2/4; width: 104px; height: 118px; margin: 0; }
  .active-avatar .alex-stamp { width: 90px; height: 110px; margin: 0 auto; }
  .active-tutor-name { grid-column: 2; text-align: left; margin-top: 8px; }
  .active-tutor-name h2 { font-size: 17px; }
  .tutor-caption { grid-column: 2; margin: 12px 0; font-size: 11px; padding: 10px; max-height: none; }
  .live-controls, .live-status, .heard, .camera-preview { grid-column: 1/-1; }
  .live-controls { margin-top: 9px; }
  .live-status { font-size: 10px; }
  .goal-card { padding: 16px 2px 0; }
  .goal-card p { font-size: 10px; }
  .modal { padding: 31px 25px 27px; }
  .modal h2 { font-size: 31px; }
  .modal > p:not(.modal-kicker) { font-size: 13px; }
  .tutor-modal .tutor-grid { grid-template-columns: 1fr; }
  .tutor-modal .tutor-option { grid-template-columns: 55px 1fr 20px; }
  .tutor-modal .selection-check { display: grid; }
}
/* Keep essential interface labels readable at demo and phone sizes. */
.prototype-label, .hero-footnote, .section-heading p, .subject small, .subject-status,
.unavailable .subject-status, .quiet-chip, .quest-card p, .quest-card-footer > span,
.quest-number, .tutor-option small, .home-footer, .quest-heading p, .lesson-score > span,
#practice-mode, .visual-caption, .answer-form label, .text-button, .question-note,
.live-indicator, .text-button.small, .active-tutor-name span, .live-status, .goal-card h3,
.goal-card p, .heard, .camera-preview span, .modal-kicker, .modal > p.privacy-note { font-size: 12px; }
.tutor-caption { font-size: 13px; }
.subject { flex-wrap: wrap; }
.subject-status { margin-left: 0; }
.subject.active .subject-status { margin-left: auto; }
.tutor-option { grid-template-columns: 52px minmax(0,1fr) 17px; }
.tutor-option small { display: block; line-height: 1.4; margin-top: 3px; }
.tutor-mini { width: 52px; height: 52px; }
.connect-button { font-size: 12px; }
@media (max-width: 600px) {
  .hero-description, .how-grid p, .roadmap-section ul { font-size: 16px; }
  .subject { flex-wrap: nowrap; }
  .subject .subject-status { font-size: 11px; }
  .tutor-option { grid-template-columns: 40px minmax(0,1fr); }
  .tutor-option small { font-size: 11px; }
  .tutor-mini { width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .app-shell { padding: 0 16px; }
  .topbar { gap: 12px; }
  .nav-link { font-size: 11px; }
  .topbar nav { gap: 12px; }
  .hero h1 { font-size: 45px; }
  .quest-card { padding: 13px; }
  .quest-heading h1 { font-size: 18px; }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .topbar { height: 72px; }
  .lesson-heading { padding: 8px 0 12px; }
  .quest-heading h1 { font-size: 22px; line-height: 1.3; }
  .quest-heading p { line-height: 1.3; }
  .lesson-board { padding: 16px 20px; }
  .board-topline { margin-bottom: 8px; }
  .lesson-board > h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .question-prompt { margin-top: 0; font-size: 16px; line-height: 1.5; }
  .visual-stage { height: 200px; margin: 12px 0; }
  .answer-form label { margin-bottom: 6px; }
  .answer-actions { margin-top: 4px; }
  .question-note { margin-top: 4px; line-height: 1.5; }
  .active-avatar { width: 145px; height: 150px; }
  .tutor-caption { margin: 12px 0; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
