/* One reading hierarchy: task → learning phrase → response → explanation → detail. */
:root{--type-page:clamp(26px,4.4vw,34px);--type-section:21px;--type-phrase:clamp(25px,4.6vw,34px);--type-body:16px;--type-label:13px;--type-meta:12px;--text-support:#667064;--text-detail:#727569;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;--space-7:48px}
body{font-size:var(--type-body);line-height:1.5}
.on-journey #app{height:var(--app-height,100dvh);max-height:var(--app-height,100dvh);overflow:clip}
h1,h2,h3{color:var(--ink);text-wrap:balance}
:is(.language-screen,.onboarding-screen,.plain-main,.completion-main) h1,.plain-main .fit-content>h1,.profile-screen .fit-content>h1{font-size:var(--type-page);font-weight:950;line-height:1.15;letter-spacing:-.035em}
.question-head h1{font-size:clamp(25px,3.8dvh,32px);font-weight:950;line-height:1.2;letter-spacing:-.03em}
.question-head{padding-top:12px;padding-bottom:14px}
.course-heading h1{font-size:var(--type-page)}
.eyebrow,.course-heading>small,.world-detail-intro small,.journey-copy>small{font-size:var(--type-meta);font-weight:850;line-height:1.4;letter-spacing:.09em;text-transform:uppercase;color:var(--text-detail)}
.profile-label,.companion-name-label,.name-form>label,.cloud-form>label{font-size:var(--type-label);font-weight:850;line-height:1.4;color:#62695d}
.name-input,.cloud-form input{font-weight:800;line-height:1.4}
.name-input::placeholder,.cloud-form input::placeholder{color:#85877d;font-weight:600;opacity:1}
.phrase-text strong{font-size:var(--type-phrase);font-weight:950;line-height:1.2;color:#304c3d}
.phrase-text p,.build-translation{font-size:var(--type-body);font-weight:650;line-height:1.5;color:var(--text-support)}
.choice-title{font-size:clamp(19px,2.5vw,23px);font-weight:900;line-height:1.3;letter-spacing:-.015em}
.choice-sub{font-size:14px;font-weight:650;line-height:1.4;color:var(--text-support)}
.answer-choice{padding-right:44px}
.choice-mark{width:24px;height:25px;right:11px;top:calc(50% - 12px);border:0;border-radius:8px;background:#f1f2eb;color:#737968;font-size:12px;font-weight:900;line-height:1}
.selected .choice-mark{background:#e2b12b;color:#fff;border:0}.is-correct .choice-mark{background:#619a74;color:white}
.picture-choices .choice-mark{top:10px;right:10px}
.button{font-size:18px;font-weight:950;line-height:1.3;letter-spacing:-.01em}
.text-button,.audio-button{font-size:14px;font-weight:850;line-height:1.35}
.button.secondary{font-weight:850}.button:disabled{opacity:1}
.lesson-controls .feedback-copy strong{font-size:18px;font-weight:950;line-height:1.3}
.lesson-controls .feedback-copy p{font-size:14px;font-weight:650;line-height:1.45;color:var(--text-support)}
.fit-stage.reading-stage{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:12px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.fit-stage.reading-stage>.fit-content{position:relative;left:auto;top:auto;transform:none;transform-origin:initial;min-height:min-content;padding-bottom:10px}
.reading-stage .lesson-scene{height:clamp(95px,16dvh,145px)!important;margin-bottom:16px}
.conversation-thread.practice-line{display:flex;flex-direction:column;gap:18px;margin:0 0 20px;font-size:inherit;text-align:left;line-height:1.5}
.conversation-turn{position:relative;display:flex;align-items:flex-start;gap:10px}
.dialogue-card{position:relative;width:100%;min-width:0;padding:17px 19px;border:1px solid #dce8d8;border-radius:23px 23px 23px 7px;background:#f0f6ec;text-align:left;margin:0 0 14px}
.dialogue-card.is-alternate{border-color:#ecd99e;background:#fff8dc;border-radius:23px 23px 7px 23px}
.conversation-turn .dialogue-card{margin:0;flex:1}
.dialogue-phrase{margin:0;font-size:var(--type-phrase);font-weight:950;line-height:1.25;letter-spacing:-.025em;color:#304c3d;overflow-wrap:anywhere}
.is-alternate .dialogue-phrase{color:#624d1c}
.dialogue-meaning{margin:6px 0 0;font-size:15px;font-weight:600;line-height:1.45;color:#697662}
.dialogue-audio{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.dialogue-audio .audio-button{min-height:39px;padding:8px 12px;border:1px solid #d8e4d0;background:#fff;color:#536c47;box-shadow:0 2px 0 #dae4d4;border-radius:12px;font-size:13px}
.is-alternate .dialogue-audio .audio-button{border-color:#ecdfa8;box-shadow:0 2px 0 #eddfa8;color:#816621}
.record-button{font-size:16px;font-weight:850}
.record-privacy,.recording-playback>span,.field-note,.example-note,.quiet-note,.cloud-note,.voice-disclosure{font-size:var(--type-meta);font-weight:650;line-height:1.5;color:var(--text-detail)}
.record-privacy{max-width:470px;margin:12px auto 0}
.reading-stage .record-privacy{margin-left:0;text-align:left}
.reading-stage .record-button{margin-top:2px}
.review-card h2,.parent-section>h2,.empty-practice h2{font-size:var(--type-section);font-weight:900;line-height:1.25}
.review-card small{font-size:var(--type-meta);font-weight:700;line-height:1.5;color:var(--text-support)}
.parent-row{font-size:15px;font-weight:650;line-height:1.45}.parent-row strong{font-size:15px;font-weight:850}
.parent-summary>span{font-size:var(--type-meta);font-weight:700;color:var(--text-support)}.parent-summary strong{font-size:29px;font-weight:950}
.screen-tabs>button{font-size:13px;font-weight:850}
.completion-main h1{margin-top:5px;margin-bottom:16px}.completion-art{max-height:190px;margin-bottom:12px}
.recap-word strong{font-size:20px;font-weight:900;line-height:1.3}.recap-word span{font-size:14px;font-weight:650;line-height:1.4;color:var(--text-support)}
.completion-stats .reward-chip>span{font-size:11px!important;font-weight:750;color:var(--text-support)}
.popup-bubble h2{font-size:23px;font-weight:950;line-height:1.2;letter-spacing:-.025em}
.popup-bubble>p,.popup-bubble .hint-copy,.popup-note{font-size:15px;font-weight:650;line-height:1.6;color:var(--text-support)}
.lesson-menu>button,.setting-row{font-size:15px;font-weight:800;line-height:1.4}
.voice-settings legend,.sound-previews legend{font-size:13px;font-weight:900;color:#64715d}
.sound-previews{padding:12px 0 16px;margin:0;border:0;border-bottom:1px solid #eceee5}
.sound-previews>div{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.sound-previews .text-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 8px;background:#f3f5ed;border-radius:12px;color:#60724f;font-size:12px}
.sound-previews .text-button:disabled{opacity:.45}.sound-previews .icon{width:19px;height:19px}
.journey-home .world-detail-intro h2{font-size:24px;font-weight:950;line-height:1.2}
.world-detail-intro>div>span{font-size:12px;font-weight:650;line-height:1.5;color:var(--text-support)}
.world-toolbar .world-back{font-size:13px;font-weight:850}.trail-key{font-size:10px;font-weight:750}
.world-lesson-map .reward-trail .journey-copy h2{font-size:20px;font-weight:950;line-height:1.2}
.world-lesson-map .reward-trail .journey-copy small{font-size:11px;font-weight:750;letter-spacing:.06em;color:var(--text-detail)}
.world-lesson-map .reward-trail .journey-copy .status-tag{font-size:11px;font-weight:850;line-height:1.35}
.destination-title{font-size:13px;font-weight:950;line-height:1.25}.destination-progress{font-size:10px;font-weight:750;line-height:1.3}
.bonus-description{font-size:16px;font-weight:650;line-height:1.5;color:var(--text-support)}.bonus-feedback{font-size:15px;font-weight:850}
.bonus-word strong{font-size:var(--type-phrase);font-weight:950;line-height:1.25}.bonus-options .answer-choice{font-size:20px;font-weight:850;line-height:1.35}
@media(max-width:440px){.question-head{padding-top:9px;padding-bottom:12px}.dialogue-card{padding:15px 16px}.dialogue-phrase{font-size:25px}.dialogue-meaning{font-size:14px}.conversation-thread.practice-line{gap:14px}.turn-number{flex-basis:23px;width:23px;height:24px;margin-top:15px}.learning-stat strong{font-size:26px}.learning-stat small{font-size:11px}.learning-stat.xp-stat strong{font-size:22px}.learning-stat{gap:5px}.world-lesson-map .reward-trail .journey-copy h2{font-size:18px}.destination-title{font-size:12px}.destination-progress{font-size:9px}}
.keyboard-open .question-head h1{font-size:24px}.keyboard-tight .question-head{display:none}
/* Give artwork real, fixed breathing room; decorate inside stable cards. */
.treasure-art{aspect-ratio:160/168;overflow:visible}
.chest-lid{transform-box:fill-box;transform-origin:50% 100%}
.big-treasure{aspect-ratio:160/168;overflow:visible;margin-top:18px;margin-bottom:18px}
.learning-stat{display:grid;grid-template-columns:34px minmax(0,1fr);justify-content:initial;overflow:visible}
.learning-stat>span:last-child{align-items:flex-start;min-width:0}
.learning-stat strong{font-variant-numeric:tabular-nums;white-space:nowrap}
.learning-stat .progress-art{width:100%;max-width:42px}
.lesson-controls .bottom-actions{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr);gap:14px;align-items:center;height:110px;min-height:110px}
.lesson-controls .bottom-actions>.check-button{width:100%;max-width:none;min-height:60px;font-size:17px;margin:0}
.lesson-controls .feedback-copy{width:100%;max-height:106px;overflow-y:auto;overscroll-behavior:contain;padding:4px 0}
.lesson-controls .hint-button{justify-self:start}
.audio-button>.icon{flex:0 0 22px;width:22px;height:22px;max-width:none;overflow:visible}
.audio-button{overflow:visible;flex-shrink:0}
.word-audio-controls,.dialogue-audio,.practice-audio{padding:2px 3px 4px;overflow:visible}
.xp-earned strong,.treasure-prize strong,.bonus-prize strong{font-variant-numeric:tabular-nums;min-width:2.5ch}
.autosave-note{border-top:1px solid #eceee5;margin-top:14px!important;padding-top:12px;font-size:12px!important}
/* One calm navigation row. The exercise title stays below it, never competes. */
.site-header.has-progress{display:flex;align-items:center;gap:18px;min-height:80px;padding-top:12px;padding-bottom:12px}
.site-header.has-progress>.learning-stats{flex:1;width:auto;max-width:300px;margin:0 auto;padding:0;gap:8px}
.site-header.has-progress .header-right{margin-left:0;flex:none;display:flex;align-items:center;gap:8px}
.lesson-progress{height:78px;min-height:78px;gap:10px;padding:8px 0;margin-bottom:4px}
.lesson-progress>.learning-stats{flex:0 0 270px;width:270px;max-width:270px;margin:0;padding:0;gap:8px}
.lesson-progress .learning-stat,.site-header.has-progress .learning-stat{min-height:54px;padding:7px 9px;border-radius:17px;gap:6px}
.lesson-progress .learning-stat strong,.site-header.has-progress .learning-stat strong{font-size:24px;line-height:1.1}
.lesson-progress .learning-stat small,.site-header.has-progress .learning-stat small{font-size:10px;line-height:1.2}
.lesson-progress .learning-stat.xp-stat strong,.site-header.has-progress .learning-stat.xp-stat strong{font-size:21px}
.lesson-progress .lesson-status-button{min-width:0;padding:5px 2px}
.lesson-progress>.lesson-back{margin:0}
.lesson-progress .lesson-menu-wrap{flex:none;width:48px;height:48px}
.lesson-progress .lesson-menu-button{width:48px;height:48px;min-width:48px;min-height:48px;padding:12px;border-radius:17px}
@media(max-width:699px){
 .site-header.has-progress{min-height:74px;gap:7px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px}
 .site-header.has-progress .brand-wordmark{display:none}
 .site-header.has-progress .brand{flex:0 0 32px;width:32px;margin:0}
 .site-header.has-progress .brand-symbol{width:32px;height:32px;min-width:32px}
 .site-header.has-progress .header-right{gap:6px}
 .site-header.has-progress .course-badge{gap:3px;padding:4px;border-radius:12px;min-height:40px}
 .site-header.has-progress .course-badge .language-symbol{width:19px;height:23px}
 .site-header.has-progress .course-badge>.icon-arrow{width:12px;height:15px}
 .site-header.has-progress .app-menu-button,.lesson-progress .lesson-menu-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border-radius:15px}
 .site-header.has-progress>.learning-stats,.lesson-progress>.learning-stats{display:grid;grid-template-columns:40px 70px 46px;gap:4px;flex:0 0 164px;width:164px;max-width:164px;margin:0 auto;padding:0}
 .lesson-progress .learning-stat,.site-header.has-progress .learning-stat{display:flex;justify-content:center;min-height:50px;height:50px;padding:6px 4px;border-radius:15px;gap:0}
 .lesson-progress .learning-stat>.progress-art,.site-header.has-progress .learning-stat>.progress-art{display:none}
 .lesson-progress .coin-stat,.site-header.has-progress .coin-stat{display:grid;grid-template-columns:16px minmax(0,1fr);gap:4px}
 .lesson-progress .coin-stat>.progress-art,.site-header.has-progress .coin-stat>.progress-art{display:grid;width:16px;height:26px}
 .lesson-progress .coin-stat .game-coin,.site-header.has-progress .coin-stat .game-coin{width:19px;height:21px;max-width:none;overflow:visible}
 .lesson-progress .learning-stat>span:last-child,.site-header.has-progress .learning-stat>span:last-child{align-items:center;justify-content:center;gap:2px}
 .lesson-progress .learning-stat strong,.site-header.has-progress .learning-stat strong{font-size:18px;line-height:1.1}
 .lesson-progress .learning-stat.xp-stat strong,.site-header.has-progress .learning-stat.xp-stat strong{font-size:16px}
 .lesson-progress .learning-stat small,.site-header.has-progress .learning-stat small{font-size:8px;line-height:1.2;white-space:nowrap}
 .play-main{padding-left:16px;padding-right:16px}
 .lesson-progress{height:70px;min-height:70px;gap:4px;padding:7px 0;margin-bottom:2px}
 .lesson-progress .lesson-back{flex:0 0 44px;width:44px;height:44px}
 .lesson-progress .lesson-menu-wrap{width:44px;height:44px}
 .lesson-progress .lesson-status-button{flex:1;min-width:0;gap:0}
}
@media(max-width:360px){.site-header.has-progress .course-badge{display:none}.site-header.has-progress{padding-left:12px;padding-right:12px}.play-main{padding-left:12px;padding-right:12px}.lesson-subject{font-size:11px}.lesson-position{font-size:0}.lesson-position:after{content:attr(data-step-position);font-size:10px}}
@media(max-width:440px){.learning-stat{grid-template-columns:28px minmax(0,1fr)}.learning-stat.xp-stat{grid-template-columns:22px minmax(0,1fr)}.learning-stat .progress-art{width:100%}.lesson-controls .bottom-actions{height:104px;min-height:104px}.lesson-controls .feedback-copy{max-height:100px}}
.keyboard-open .lesson-controls .bottom-actions{height:86px;min-height:86px}.keyboard-open .lesson-controls .feedback-copy{max-height:82px}
.keyboard-open .lesson-progress{height:64px;min-height:64px}.keyboard-tight .lesson-progress .learning-stats{display:none}
/* Group with proximity. Borders are reserved for choices and input states. */
.plain-main,.completion-main{padding-top:var(--space-5)}
.plain-main .fit-content>h1,.profile-screen .fit-content>h1{margin:0 0 var(--space-5)}
.profile-label{margin:var(--space-5) 0 var(--space-2)}
.companion-name-label{margin-bottom:var(--space-2)}
.profile-companion-name{margin-bottom:var(--space-5)}
.profile-character{padding:var(--space-2) 0 var(--space-4);margin-bottom:var(--space-4)}
.screen-actions{gap:var(--space-3);padding-top:var(--space-4)}
.question-head{padding-top:var(--space-3);padding-bottom:var(--space-4)}
.dialogue-card{padding:var(--space-4);border:0;box-shadow:none;margin-bottom:var(--space-4)}
.dialogue-label{margin-bottom:var(--space-2)}
.dialogue-meaning{margin-top:var(--space-2)}
.dialogue-audio{gap:var(--space-2);margin-top:var(--space-4)}
.conversation-thread.practice-line{gap:var(--space-5);margin-bottom:var(--space-5)}
.phrase-card{padding:var(--space-5);gap:var(--space-4);border:0;background:#f6f8f1;border-radius:24px;box-shadow:none}
.phrase-text p{margin-top:var(--space-2)}
.sound-guide{margin-top:var(--space-4)}
.screen-tabs{gap:var(--space-2);margin:var(--space-5) 0}
.parent-summary{gap:var(--space-3);margin:var(--space-5) 0 var(--space-6)}
.parent-section{margin:var(--space-6) 0}
.parent-section>h2{margin-bottom:var(--space-4)}
.parent-row{padding:var(--space-3) 0;gap:var(--space-3);border:0}
.review-card{border:0;padding:var(--space-5) 0;gap:var(--space-4);min-height:88px}
.review-card+.review-card{margin-top:var(--space-2)}
.popup-bubble{padding:var(--space-5)}
.popup-bubble>p{margin-top:var(--space-4)}
.setting-row{padding:var(--space-4) 0;border:0}
.voice-settings{margin-top:var(--space-5);border:0}
.sound-previews{border:0;padding:var(--space-3) 0 var(--space-5)}
.sound-previews>div{gap:var(--space-2);margin-top:var(--space-2)}
.cloud-form{gap:var(--space-2);margin-top:var(--space-5)}
.cloud-form label{margin-top:var(--space-4)}
.cloud-actions{gap:var(--space-3);margin-top:var(--space-5)}
.dialog-actions{gap:var(--space-3);padding-top:var(--space-5)}
.recap-list{margin:var(--space-5) 0}
.recap-word{border:0;padding:var(--space-3) 0}
.completion-main .reward-row{gap:var(--space-3);margin:var(--space-5) auto}
.world-detail-intro{padding:var(--space-5) var(--space-2);gap:var(--space-4)}
.language-grid{gap:var(--space-3)}
.bonus-modes{gap:var(--space-4);margin:var(--space-5) auto}
.bonus-options{gap:var(--space-3);margin:var(--space-5) 0}
.bonus-word{gap:var(--space-4);margin:var(--space-5) auto}
.keyboard-open .plain-main{padding-top:var(--space-2)}
.keyboard-open .profile-character{margin-bottom:0}
.keyboard-open .question-head{padding:var(--space-2) 0}
/* One control becomes one card; the close control never changes its anchor. */
.popup-bubble.popup-integrated,.popup-bubble.popup-integrated.modal{padding:0;overflow:hidden;border-radius:24px;background:#fff;will-change:clip-path,background-color}
.popup-integrated.menu-bubble{width:min(340px,calc(100vw - 24px))}
.popup-integrated>.popup-content{max-height:inherit;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:8px 24px 24px}
.popup-integrated>.popup-content>h2{min-height:calc(var(--popup-close-height,44px) - 8px);padding:0 calc(var(--popup-close-width,44px) + 8px) 0 0;margin:0 0 20px;font-size:23px;line-height:1.25;color:var(--ink);font-weight:950}
.popup-integrated>.popup-content>p{margin:16px 0 0;font-size:15px;line-height:1.6;color:var(--text-support)}
.popup-integrated>.popup-content>.button{width:100%;margin-top:20px}
.popup-integrated>.popup-content>.button+.button{margin-top:12px}
.popup-integrated>.popup-content .lesson-menu>button{padding:14px 0;min-height:54px;border-radius:12px}
.popup-integrated[data-side="above"]>.popup-content{padding-top:24px;padding-bottom:calc(var(--popup-close-height,44px) + 16px)}
.popup-integrated[data-side="above"]>.popup-content>h2{min-height:0;padding-right:0}
.popup-integrated>.popup-close,.popup-integrated>.modal-close{position:absolute;z-index:2;left:var(--popup-close-x);top:var(--popup-close-y);right:auto;bottom:auto;width:var(--popup-close-width,44px);height:var(--popup-close-height,44px);min-width:0;min-height:0;margin:0;padding:11px;border:0;border-radius:15px;background:#ffcf32;color:#26241e;box-shadow:inset 0 -3px 0 #d9ae20;transition:background .16s ease}
.popup-integrated>.popup-close>.icon,.popup-integrated>.modal-close>.icon{width:100%;height:100%;max-width:30px;max-height:30px;overflow:visible}
.popup-integrated>.popup-close:focus-visible,.popup-integrated>.modal-close:focus-visible{background:#ffe06a;box-shadow:inset 0 0 0 3px #26241e}
.popup-integrated .lesson-menu>button{animation:none}
@media(max-width:440px){.popup-integrated>.popup-content{padding-left:20px;padding-right:20px}.popup-integrated>.popup-content>h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.popup-bubble.popup-integrated{will-change:auto}.popup-integrated>.popup-close,.popup-integrated>.modal-close{transition:none}}
/* Keep the task in focus. Context is available from the progress icon. */
.lesson-progress .lesson-status-button{flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:6px;justify-content:center;border-radius:15px}
.lesson-status-button .progress-ring{width:32px;height:32px;flex:none}
.lesson-progress>.learning-stats{margin-left:auto}
.lesson-course{font-size:14px!important;line-height:1.6!important;margin:0!important}
.lesson-detail-position{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px;font-size:14px;color:var(--text-support);font-variant-numeric:tabular-nums}
.lesson-detail-position strong{font-size:20px;color:var(--ink)}
.lesson-status-popup .progress-track{margin:12px 0 24px}
.lesson-outline{display:flex;flex-direction:column;gap:16px;list-style:none;margin:0;padding:0}
.lesson-outline>li{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:12px;color:var(--text-support);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.lesson-outline>li.is-current{color:var(--ink);font-weight:950}
.outline-state{display:grid;place-items:center;width:18px;height:18px;margin-top:2px;border-radius:50%;background:#eef0e8}
.is-current>.outline-state{background:#ffcf32;box-shadow:inset 0 0 0 5px #fff0a4}
.outline-state.is-done{background:#e7f2e9;color:#548164}.outline-state .icon{width:13px;height:13px}
.popup-integrated[data-side="below"][data-close-edge="start"]>.popup-content{padding-top:calc(var(--popup-close-height,44px) + 16px)}
.popup-integrated[data-side="below"][data-close-edge="start"]>.popup-content>h2{padding-right:0;min-height:0}
.menu-companion{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.destination-title{display:block;-webkit-line-clamp:unset;line-clamp:unset;overflow:visible;white-space:normal;overflow-wrap:normal}
/* Fit artwork, not the game. The board always uses its entire content width. */
.fit-stage.game-stage{min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:12px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.fit-stage.game-stage>.fit-content{position:relative;left:auto;top:auto;width:100%;max-width:none;transform:none;transform-origin:initial;min-height:0;padding:8px 0 12px}
.game-stage :is(.answer-grid,.matching-grid,.memory-grid,.sentence-slots,.word-bank,.typing-game,.tracing-game,.listening-challenge,.speaking-controls){width:100%;max-width:none;min-width:0}
.game-stage .dialogue-card{width:100%;max-width:none}
.game-stage .choice-title,.game-stage .choice-sub,.game-stage .match-tile{overflow-wrap:anywhere;white-space:normal}
@media(max-width:699px){
 .play-main{max-width:none;width:100%;padding-left:12px;padding-right:12px}
 .lesson-progress{gap:6px}
 .lesson-progress>.learning-stats{flex:1 1 0;width:auto;max-width:none;min-width:0;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr) minmax(0,1fr);gap:4px;margin:0}
 .lesson-progress .lesson-status-button{flex-basis:44px;width:44px;padding:6px}
 .game-stage>.fit-content:has(>.lesson-scene){display:flow-root;grid-template-columns:none}
 .game-stage>.fit-content>.lesson-scene{float:none;width:100%;max-width:none;grid-column:auto;grid-row:auto;margin:0 0 20px}
 .game-stage>.fit-content>.lesson-scene~*{grid-column:auto}
 .game-stage .answer-grid{gap:12px}
}
@media(max-width:360px){.play-main{padding-left:8px;padding-right:8px}.lesson-progress{gap:4px}.lesson-progress .learning-stat strong{font-size:16px}.lesson-progress .learning-stat.xp-stat strong{font-size:15px}}
/* Hint is a small footer callout, not another navigation menu. */
.popup-bubble.hint-callout{width:min(310px,calc(100vw - 24px));padding:18px 20px;border-radius:20px;background:#fff6cc;box-shadow:0 10px 32px #6154261f;overflow:visible;will-change:opacity,transform}
.hint-callout>.hint-copy{margin:0;font-size:16px;font-weight:750;line-height:1.55;color:#594b28}
.hint-callout:after{content:'';position:absolute;left:calc(var(--popup-tip-x) - 6px);width:12px;height:12px;background:#fff6cc;transform:rotate(45deg);pointer-events:none}
.hint-callout[data-side="above"]:after{bottom:-5px}.hint-callout[data-side="below"]:after{top:-5px}
.hint-button[aria-expanded="true"]{background:#fff1b5;color:#6f581f}
/* Settings use three calm groups, one voice preview and one close control. */
.settings-body{display:flex;flex-direction:column;gap:24px;padding-top:4px}
.settings-body .voice-settings{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;margin:0;padding:0;border:0}
.settings-body .voice-settings>legend{margin:0 0 12px;padding:0;font-size:14px;font-weight:850;color:var(--text-support)}
.settings-body .voice-options{display:flex;gap:4px;margin:0;padding:4px;border-radius:15px;background:#f2f3ed}
.settings-body .voice-option{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:40px;padding:8px 12px;border:0;border-radius:12px;background:transparent;box-shadow:none;color:var(--text-support);font-size:15px;font-weight:850}
.settings-body .voice-option.selected{background:#ffdd62;color:#382f16;box-shadow:none}
.settings-body .voice-preview{display:grid;place-items:center;align-self:center;width:44px;height:44px;padding:11px;border-radius:50%;background:#fff6d5;color:#7e6426;box-shadow:none}
.settings-preferences{display:flex;flex-direction:column;gap:4px}
.preference-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:48px;padding:8px 0;background:transparent;text-align:left;font-size:16px;font-weight:850;color:var(--ink)}
.preference-row .toggle{flex:none}
.settings-body .sound-previews{border:0;padding:4px 0 0;margin:0}
.settings-body .sound-previews>div{display:flex;align-items:center;gap:20px;margin:0}
.settings-body .sound-previews .text-button{justify-content:flex-start;gap:6px;min-height:36px;padding:4px 0;border:0;border-radius:0;background:transparent;color:var(--text-support);font-size:13px;box-shadow:none}
.settings-links{display:flex;flex-direction:column;gap:16px}
.settings-links>a,.settings-links>.text-button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:32px;padding:0;margin:0;font-size:14px;font-weight:800;line-height:1.5;text-align:left;color:var(--text-support);background:transparent;text-decoration:none}
.settings-links .icon{width:16px;height:16px;flex:none;color:#8c926f}
.settings-body .save-status{margin:0;font-size:12px;line-height:1.5}
.settings-reset{align-self:flex-start;min-height:36px;padding:0;background:transparent;color:#ac4c40;font-size:14px;font-weight:850}
.parent-summary>span,.parent-summary>span:nth-child(2),.parent-summary>span:nth-child(3){background:#fff8dc;color:var(--text-support)}
.parent-row>.icon{flex:0 0 18px;width:18px;height:18px}
.journey-badge{border:0;background:#fff8dc;color:#897951}
.journey-badge>.icon{flex:0 0 18px;width:18px;height:18px}
@media(max-height:600px) and (max-width:699px){
 .language-screen .language-guide{height:64px;width:110px}
 .language-screen h1{font-size:24px;margin:4px 0 12px}
 .language-screen .language-grid{gap:8px;padding:4px 4px 8px}
 .language-screen .language-choice{min-height:56px}
}
/* Short phones keep profile fields and small settings groups in view. */
@media(max-height:700px) and (max-width:699px){
 .profile-screen,.parent-screen,.practice-screen{padding-top:12px}
 .profile-screen .fit-content>h1{font-size:24px;margin-bottom:12px}
 .profile-screen .profile-character{padding:4px 0 8px;margin-bottom:8px}
 .profile-screen .profile-character img{height:64px;width:88px}
 .profile-screen .profile-companion-name{margin-bottom:8px}
 .profile-screen .profile-label{margin-top:12px;margin-bottom:8px}
 .profile-screen .screen-actions{padding-top:12px}
 .modal.popup-integrated:has(.settings-body)>.popup-content{padding-bottom:20px}
 .modal.popup-integrated:has(.settings-body)>.popup-content>h2{margin-bottom:16px}
 .settings-body{gap:12px}
 .settings-body .voice-settings>legend{margin-bottom:8px}
 .settings-links{gap:8px}
 .settings-links>a,.settings-links>.text-button,.settings-body .sound-previews .text-button,.settings-reset{min-height:44px}
 .parent-screen .fit-content>h1{font-size:24px;margin:0 0 12px}
 .parent-screen .parent-summary{gap:8px;margin:0 0 16px}
 .parent-screen .parent-summary>span{gap:2px;padding:8px 4px}
 .parent-screen .parent-summary strong{font-size:26px}
 .parent-screen .screen-tabs{margin:0 0 16px}
 .parent-screen .parent-section{margin:0}
 .parent-screen .parent-section>h2{font-size:18px;margin:0 0 12px}
 .parent-screen .parent-row{min-height:36px;padding:8px 0;font-size:13px;line-height:1.3}
 .parent-screen .parent-row>strong{font-size:13px}
 .parent-screen .badge-grid{gap:8px}
 .parent-screen .journey-badge{min-height:56px;padding:10px 8px;gap:8px;font-size:11px}
 .parent-screen .save-status{margin:12px 0 0}
 .practice-screen .course-heading{margin-bottom:12px}
 .practice-screen .course-heading h1{font-size:24px}
 .practice-screen .review-card{min-height:60px;padding:10px 0;gap:12px}
 .practice-screen .review-card h2{font-size:16px}
 .practice-screen .review-card small{font-size:11px}
 .practice-screen .review-card+.review-card{margin-top:8px}
}
@media(prefers-reduced-motion:reduce){.lesson-mini-track>i{transition:none}}.reduced-motion .lesson-mini-track>i{transition:none}
/* A lesson fits one screen. Use the width for answers and reserve room for motion. */
:root{--content-wash:#fff8dc;--content-ink:#5e4b21}
.dialogue-card,.dialogue-card.is-alternate,.phrase-card{background:var(--content-wash);color:var(--content-ink);border:0;overflow:visible}
.dialogue-phrase,.is-alternate .dialogue-phrase,.phrase-text strong{color:#55431f}
.dialogue-meaning{color:#796b49}
.dialogue-audio .audio-button,.is-alternate .dialogue-audio .audio-button{background:#fffdf4;border-color:#eddfa8;box-shadow:0 2px 0 #eddfa8;color:#7c6223}
.match-tile.selected{background:#fff2bd;border-color:#e4bc46;box-shadow:0 3px 0 #d7b44e;color:#67511c}
.sound-guide-panel{background:#fff8dc;border-color:#f1e5b9;color:#786534}
.sound-guide summary,.sound-guide-panel>span,.sound-guide-panel>p:last-child:not(.sound-parts){color:#8a7137}
.sound-guide-panel .sound-parts b{color:#745b22;box-shadow:0 1px 0 #ebdfb9}
.lesson-panel,.fit-stage.game-stage,.fit-stage.game-stage.form-stage,.fit-stage.game-stage.reading-stage{overflow:visible}
.fit-stage.game-stage{scrollbar-width:none;scroll-padding:0;min-height:0}
.fit-stage.game-stage>.fit-content{padding:6px 0 8px;min-height:0;transform:none;width:100%}
.game-stage .lesson-scene,.game-stage.reading-stage .lesson-scene{height:var(--scene-height,180px)!important;margin:0 0 14px;transition:opacity .18s ease}
.game-stage.fit-art-hidden .lesson-scene{height:0!important;margin:0!important;opacity:0;pointer-events:none}
.question-head{padding:10px 0 12px}
.question-head h1{font-size:clamp(21px,3.3dvh,28px);line-height:1.18;letter-spacing:-.025em;text-wrap:pretty;overflow-wrap:break-word}
.game-stage .choice-title{font-size:clamp(16px,2.45dvh,20px);line-height:1.28;letter-spacing:-.01em;overflow-wrap:break-word;word-break:normal;hyphens:manual}
.game-stage .answer-choice{min-height:54px;padding:12px 38px 12px 16px;border-radius:17px}
.game-stage .choice-sub{font-size:13px;line-height:1.35;overflow-wrap:break-word}
.game-stage .answer-grid{gap:10px}
.game-stage .dialogue-card{padding:14px 16px;margin-bottom:12px;border-radius:20px 20px 20px 6px}
.game-stage .dialogue-card.is-alternate{border-radius:20px 20px 6px 20px}
.game-stage .dialogue-phrase,.game-stage .phrase-text strong{font-size:clamp(21px,3dvh,27px);line-height:1.22;overflow-wrap:break-word}
.game-stage .dialogue-meaning,.game-stage .phrase-text p{font-size:14px;line-height:1.4;margin-top:5px}
.game-stage .dialogue-audio{gap:8px;margin-top:10px;padding:2px 3px 3px}
.game-stage .dialogue-audio .audio-button{min-height:36px;padding:6px 10px;font-size:12px}
.game-stage .conversation-thread.practice-line{gap:12px;margin:0 0 12px}
.game-stage .conversation-turn .dialogue-card{margin:0}
.game-stage .phrase-card{padding:16px;gap:12px}
.game-stage .record-button{min-height:44px;padding:10px 12px;font-size:15px;background:#fff4c5;border-color:#ead896;box-shadow:0 3px 0 #dcca8b;color:#72591f}
.game-stage .record-button.recording{background:#ffe6dc;border-color:#d79c85;box-shadow:0 3px 0 #d7aa97;color:#a05e44}
.game-stage .record-privacy{font-size:11px;line-height:1.35;margin-top:8px}
.game-stage .build-translation{font-size:15px;line-height:1.4;margin:8px 0 12px}
.game-stage .sentence-slots{min-height:58px;padding:10px 0;margin-bottom:12px;gap:7px}
.game-stage .word-bank{gap:8px;padding:3px 0 5px}
.game-stage .sentence-token,.game-stage .word-token{min-height:42px;padding:9px 11px;font-size:16px;overflow-wrap:break-word;max-width:100%}
.game-stage .matching-grid{gap:10px}.game-stage .matching-column{gap:10px}
.game-stage .match-tile{min-height:52px;padding:10px 12px;font-size:16px;line-height:1.28;overflow-wrap:break-word}
.game-stage .match-tile>span{min-width:0}.game-stage .match-tile>.icon{flex:none}
.game-stage .picture-choices .answer-choice{min-height:120px;padding:10px}
.game-stage .picture-choices .choice-image{height:clamp(65px,13dvh,112px)}
.game-stage .sound-guide{margin-top:10px}
.lesson-controls{padding-top:10px;overflow:visible}
.lesson-controls .bottom-actions{height:88px;min-height:88px;gap:14px;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
.lesson-controls .bottom-actions>.check-button{font-size:16px;min-height:52px;padding:12px 14px;gap:8px}
.lesson-controls .check-button>.icon{flex:none}
.lesson-controls .feedback-copy{max-height:none;overflow:visible;padding:0}
.lesson-controls .feedback-copy strong{font-size:16px}.lesson-controls .feedback-copy p{font-size:12px;line-height:1.35}
.lesson-controls .answer-coins{font-size:16px}
.game-stage.fit-compact .lesson-scene{margin-bottom:10px}
.game-stage.fit-compact .answer-choice{min-height:48px;padding-top:10px;padding-bottom:10px}
.game-stage.fit-compact .dialogue-card{padding:12px 14px;margin-bottom:10px}
.game-stage.fit-compact .conversation-thread.practice-line{gap:10px;margin-bottom:10px}
.game-stage.fit-tight .choice-title,.game-stage.fit-minimal .choice-title{font-size:16px}
.game-stage.fit-tight .dialogue-phrase,.game-stage.fit-tight .phrase-text strong{font-size:21px}
.game-stage.fit-tight .dialogue-meaning{font-size:13px;margin-top:4px}
.game-stage.fit-tight .dialogue-audio{margin-top:6px;gap:6px}
.game-stage.fit-tight .dialogue-card{padding:10px 12px}
.game-stage.fit-tight .phrase-card{padding:12px;gap:8px}
.game-stage.fit-tight .answer-grid,.game-stage.fit-tight .matching-grid,.game-stage.fit-tight .matching-column{gap:8px}
.game-stage.fit-tight .match-tile{min-height:46px;font-size:15px;padding:8px 10px}
.game-stage.fit-tight .sound-guide-panel{padding:10px 12px}
.game-stage.fit-tight .trace-surface{height:132px}
.game-stage.fit-minimal .dialogue-phrase,.game-stage.fit-minimal .phrase-text strong{font-size:19px}
.game-stage.fit-minimal .dialogue-card{padding:8px 10px}
.game-stage.fit-minimal .conversation-thread.practice-line{gap:8px;margin-bottom:8px}
.game-stage.fit-minimal .dialogue-audio .audio-button{min-height:32px;padding:5px 8px}
.game-stage.fit-minimal .record-privacy{font-size:10px}
.game-stage.fit-minimal .sentence-token,.game-stage.fit-minimal .word-token{min-height:38px;font-size:15px;padding:7px 9px}
.game-stage.fit-minimal .memory-card{min-height:44px;padding:8px;font-size:15px}
.game-stage.fit-minimal .trace-surface{height:110px}
@media(max-width:699px){
 .play-main{padding-left:16px;padding-right:16px;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 .lesson-progress{height:64px;min-height:64px;padding:6px 0;margin-bottom:0;gap:6px}
 .lesson-progress .learning-stat{height:48px;min-height:48px}
 .game-stage .answer-grid:not(.picture-choices){grid-template-columns:minmax(0,1fr)}
 .game-stage>.fit-content>.lesson-scene{margin-bottom:14px}
 .question-head h1{font-size:clamp(20px,3.15dvh,26px)}
 .game-stage .choice-title{font-size:17px}
 .game-stage .phrase-card{flex-wrap:wrap;text-align:left;justify-content:flex-start}
 .game-stage .phrase-card .word-audio-controls{justify-content:flex-start;margin-top:0}
 .lesson-controls .bottom-actions{height:88px;min-height:88px}
}
@media(max-height:650px){.question-head{padding:7px 0 9px}.question-head h1{font-size:20px}.lesson-controls .bottom-actions{height:80px;min-height:80px}.lesson-controls{padding-top:6px}}
.keyboard-open .lesson-controls .bottom-actions{height:62px;min-height:62px}
@keyframes answer-pop{0%{transform:translateY(2px)}65%{transform:translateY(-2px)}100%{transform:translateY(0)}}
