*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:system-ui,-apple-system,"Microsoft JhengHei",sans-serif;color:#283d3b}button,input{font:inherit}button{cursor:pointer;min-height:48px;border:0;border-radius:14px;padding:10px 18px;color:inherit;background:#fffdf5}button:focus-visible,input:focus-visible{outline:3px solid #327875;outline-offset:3px}button:disabled{opacity:.5;cursor:default}button:hover:not(:disabled){filter:brightness(.97)}body{background:#f8f7f1}.app{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}header{display:flex;align-items:center;gap:12px;padding:12px 26px;background:#fffcf5;border-bottom:1px solid #e4e8db;flex:none;z-index:2}.brand{font-size:23px;font-weight:850;letter-spacing:2px;color:#316459;text-decoration:none;white-space:nowrap}.brand span{font-weight:500;letter-spacing:0;font-size:14px;margin-left:12px;color:#78837b}.spacer{flex:1}header button{background:transparent;font-size:15px;border:1px solid #dde2d2}.scene{position:relative;flex:1;min-height:0;overflow:hidden;background:#edf3e9}.park{position:absolute;inset:0;pointer-events:none;overflow:hidden}.sun{position:absolute;width:95px;height:95px;right:18%;top:38px;border-radius:50%;background:#fff5cc;opacity:.65}.hill{position:absolute;bottom:15%;width:100%;height:36%;border-radius:50%;background:#dbe8d0}.h1{left:-45%}.h2{right:-48%;background:#d4e3cc}.path{position:absolute;bottom:-70px;left:10%;width:80%;height:42%;border-radius:50%;background:#e7e4cf}.tree{position:absolute;width:155px;height:180px;border-radius:48%;background:#c8d9b6;opacity:.55;bottom:30%}.tree:after{content:"";position:absolute;left:48%;top:85%;height:130px;width:13px;background:#bfc9a9}.t1{left:-55px}.t2{right:-35px;transform:scale(.8)}.swing{position:absolute;left:8%;bottom:22%;width:175px;height:190px;border:7px solid #b3cbb7;border-bottom:0;border-radius:35px 35px 0 0;opacity:.4}.swing i{position:absolute;left:32%;top:0;height:130px;width:38%;border-left:3px solid #93ad97;border-right:3px solid #93ad97}.swing b{position:absolute;left:29%;top:130px;width:44%;height:9px;background:#98b39b;border-radius:4px}.sceneHeading{position:absolute;top:22px;left:0;right:0;text-align:center;z-index:1}.sceneHeading small{font-size:13px;color:#7c897a;letter-spacing:2px}h1{font-size:24px;font-weight:600;margin:5px 0}.actors{height:100%;position:relative;display:grid;grid-template-columns:1fr 1.7fr 1fr;align-items:end;gap:0;padding:95px 5% 68px}.person{position:relative;display:flex;flex-direction:column;align-items:center;min-height:0;z-index:1}.sprite{position:relative;width:min(24vw,270px);height:min(43vh,375px);background-image:var(--sheet);background-size:400% 200%;background-position:var(--x,0%) var(--y,0%);background-repeat:no-repeat;aspect-ratio:var(--ratio,.75);height:auto;max-height:49vh;transform-origin:center 95%;transition:filter .2s}.student{--sheet:url("assets/student-sheet.png")}.npc{--sheet:url("assets/npc-sheet.png")}.personHalo{position:absolute;inset:28% -5% 8%;border-radius:50%;opacity:0;background:radial-gradient(ellipse,#f8efb488,transparent 70%);transition:opacity .2s}.person.active .personHalo{opacity:1}.person.active .sprite{animation:oneNod .65s ease-out}.name{margin-top:10px;background:#fffef4e8;border:1px solid #dbe1ce;border-radius:24px;padding:7px 24px;font-size:19px;font-weight:700}.name span{font-weight:500;font-size:15px;margin-left:9px}.mood{font-size:14px;color:#68776c;min-height:24px;margin-top:7px}.conversation{align-self:center;position:relative;text-align:center;z-index:2;padding:10px 0 35px}.turn{font-size:14px;color:#5d7567;min-height:24px;margin-bottom:12px}.bubble{background:#fffcf5;border:1px solid #dbe2cc;border-radius:28px;padding:25px 28px;box-shadow:0 8px 28px #526a4c09;position:relative}.bubble:after{content:"";position:absolute;right:-10px;top:45%;width:20px;height:20px;background:#fffcf5;border-top:1px solid #dbe2cc;border-right:1px solid #dbe2cc;transform:rotate(45deg)}.bubble.mine:after{left:-10px;right:auto;border:0;border-left:1px solid #dbe2cc;border-bottom:1px solid #dbe2cc}.bubble small{font-size:13px;color:#7b8273}.bubble p{font-size:clamp(21px,2.5vw,32px);line-height:1.65;margin:12px 0 18px;overflow-wrap:anywhere}#replay{font-size:14px;background:#edf1e3;min-height:42px;padding:8px 15px}.primary{background:#356d5f;color:#fff;font-weight:600}#start{margin-top:22px}.stageBottom{position:absolute;bottom:12px;left:24px;right:24px;display:flex;align-items:center;justify-content:space-between;gap:14px}.stageBottom button{background:#fffdf5aa;font-size:14px;min-height:44px}#live{font-size:14px;text-align:center;color:#546e60;flex:1}.composer{display:flex;align-items:center;gap:12px;padding:16px 26px max(16px,env(safe-area-inset-bottom));background:#fffdf7;border-top:1px solid #dce4d4;flex:none}.inputLabel{flex:1;min-width:0}input{width:100%;min-height:54px;padding:14px 18px;border-radius:15px;border:1px solid #dce2d3;background:#f5f7ee;font-size:18px;color:inherit}.help{background:#e9eedc;white-space:nowrap}#micBtn{font-size:22px;background:#f0f1e6}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}dialog{position:fixed;inset:0 0 0 auto;margin:0;padding:24px;width:min(480px,95vw);max-width:95vw;height:100vh;height:100dvh;max-height:100%;border:0;background:#fffcf5;box-shadow:-10px 0 60px #294c3a20;overflow:auto}dialog::backdrop{background:#2d43384d}.drawerTop{position:sticky;top:-24px;display:flex;align-items:center;justify-content:space-between;background:#fffcf5;z-index:3;padding:12px 0}.drawerTop h2{font-size:22px;margin:0}.drawerTop button{font-size:20px}#drawerBody{font-size:17px;line-height:1.7;padding-bottom:30px}#drawerBody p{margin:14px 0}.choice{display:block;width:100%;text-align:left;padding:16px;background:#edf1e3;border:1px solid #dbe1cc;margin:12px 0;font-size:20px;line-height:1.6}.choiceTools{display:flex;gap:8px;margin-bottom:22px}.choiceTools button{flex:1;font-size:15px;padding:8px;background:#e9eedc}.choiceTools button[aria-pressed=true]{outline:2px solid #4c8068}.choiceRow{background:#f1f4e8;border:1px solid #dbe1cc;border-radius:18px;padding:10px;margin:12px 0}.choiceRow .choice{margin:0;background:transparent;border:0;padding:6px}.choiceRow .listen{font-size:14px;min-height:44px;background:#e2e9d6}.drawerActions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.drawerActions button{background:#e9eedc}.quietNotice{padding:12px;border-radius:12px;background:#edf1e3}.log{padding:12px 0;border-bottom:1px solid #e0e5d6}.log small{font-size:12px;color:#6e7c6f}.log p{margin:4px 0!important;font-size:18px}.teacherInfo{font-size:15px;color:#617464}.moodPicker{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.moodPicker button{padding:8px;font-size:14px;border:1px solid #dce3d1}.moodPicker button[aria-pressed=true]{background:#dce9cb}#outcome{margin-top:16px;color:#35634b;font-size:17px}#outcome button{margin:10px 5px;background:#e2ead6;font-size:15px}.avatarPop{animation:oneNod .6s ease-out}@keyframes oneNod{0%,100%{transform:translateY(0)}45%{transform:translateY(-5px)}}body.still *{animation:none!important;transition:none!important}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media(max-height:700px){header{padding:8px 20px}.sceneHeading{top:10px}.sceneHeading h1{font-size:20px}.actors{padding-top:60px;padding-bottom:50px}.sprite{width:min(21vw,210px);max-height:43vh}.conversation{padding-bottom:0}.bubble{padding:14px 22px}.bubble p{font-size:24px;margin:8px 0}.composer{padding:10px 20px}.mood{margin-top:3px}.stageBottom{bottom:5px}}@media(max-width:700px){header{padding:8px 12px;gap:6px}.brand{font-size:18px}.brand span{display:none}header button{padding:8px 10px;font-size:14px}.actors{grid-template-columns:1fr 1fr;padding:170px 4% 64px;align-items:end}.conversation{position:absolute;top:65px;left:8%;right:8%;padding:0}.bubble{padding:12px 18px}.bubble p{font-size:22px;margin:6px 0}.bubble:after{display:none}.sprite{width:min(39vw,225px);max-height:42vh}.person.npc{grid-column:2}.person.student{grid-column:1}.sceneHeading h1{font-size:19px}.sceneHeading small{display:none}.turn{margin-bottom:5px;font-size:13px}.name{font-size:16px;padding:5px 18px}.mood{font-size:12px}.composer{padding:10px;gap:7px}.composer button{padding:8px 10px}.help{font-size:14px}input{font-size:16px;padding:10px}.stageBottom{left:10px;right:10px}.stageBottom button{font-size:12px;padding:6px 10px}#live{font-size:12px}}@media(max-width:700px) and (max-height:720px){.sprite{width:30vw}.actors{padding-bottom:58px}.conversation{top:48px}.bubble p{font-size:20px}.sceneHeading{top:8px}.turn{min-height:18px}}

.sprite{width:auto;height:min(48vh,365px);max-height:none}
.npc{--ratio:1.0}
.student{--ratio:1.0}
@media(max-height:700px){.sprite{width:auto;height:40vh}}@media(max-width:700px){.sprite{width:auto;height:36vh}}@media(max-width:700px) and (max-height:720px){.sprite{height:30vh}}
.actors{grid-template-columns:minmax(0,1fr) minmax(0,1.7fr) minmax(0,1fr)}.person{min-width:0}@media(max-width:700px){.actors{grid-template-columns:repeat(2,minmax(0,1fr))}.sprite{height:31vh}}@media(max-width:700px) and (max-height:720px){.sprite{height:25vh}}
.storyCard{position:absolute;left:24px;top:20px;z-index:3;display:flex;align-items:center;gap:12px;width:218px;padding:8px;text-align:left;background:#fffdf5e8;border:1px solid #d7dfcb;border-radius:18px;box-shadow:0 3px 12px #536a4810}.storyCard img{display:block;width:84px;height:84px;object-fit:cover;border-radius:12px}.storyCard span{display:flex;flex-direction:column;gap:6px;min-width:0}.storyCard small{font-size:12px;font-weight:400;color:#7b8777}.storyCard strong{font-size:17px;font-weight:600}.storyCard em{font-size:11px;color:#778570;font-style:normal;line-height:1.5}.storySlide{display:block;width:100%;max-height:52vh;object-fit:contain;border-radius:18px;background:#edf3e4}.storyCaption{text-align:center;font-size:22px;margin:14px 0!important}.storyNav{display:flex;align-items:center;justify-content:space-between;gap:10px}.storyNav button{background:#e9eedc;font-size:15px;padding:10px 14px}.storyNav span{font-size:15px;white-space:nowrap}.storyDots{display:flex;gap:8px;justify-content:center;margin:16px 0}.storyDots button{min-height:44px;background:transparent;border:1px solid #d8e1cc;padding:7px 10px;font-size:14px}.storyDots [aria-pressed=true]{background:#dfead0;border-color:#6d9275}.storyBack{display:block;width:100%;margin-top:14px;background:#356d5f;color:#fff;font-size:18px}@media(max-height:650px){.storyCard{left:18px;top:12px;width:174px;gap:8px;padding:6px}.storyCard img{width:64px;height:64px}.storyCard strong{font-size:15px}.storyCard small{font-size:11px}.storyCard em{font-size:10px}.storySlide{max-height:44vh}.storyCaption{font-size:19px}}@media(max-width:700px){.storyCard{left:12px;top:10px;width:64px;min-height:64px;padding:5px;display:block}.storyCard img{width:52px;height:52px;border-radius:9px}.storyCard span{display:none}.storySlide{max-height:48vh}}
.goalSummary{padding:12px;background:#edf2e2;border-radius:12px;font-size:16px}.goalCard{padding:16px 0;border-bottom:1px solid #dce4d2}.goalCard h3{font-size:20px;margin:4px 0 10px}.goalBadge{display:inline-block;margin:4px 0!important;padding:5px 10px;border-radius:9px;background:#edf0e5;color:#566b53;font-size:14px}.goalBadge.observed{background:#d8ead9;color:#2d6741}.goalCriterion{font-size:16px}.goalEvidence{font-size:17px;padding:12px;background:#f0f3e7;border-radius:12px}.goalReview summary,.otherGoals>summary{min-height:44px;cursor:pointer;padding:8px 0;font-size:16px}.goalReview label{display:block;margin:10px 0;font-size:15px}.goalReview select,.goalReview textarea{display:block;width:100%;padding:10px;min-height:46px;font:inherit;color:inherit;border:1px solid #cad7be;border-radius:10px;background:#fffef8;margin-top:5px}.goalReview button{background:#e2ead7}.otherGoals{margin-top:18px}#quietBtn .voiceIcon{display:inline-block}@media(max-width:700px){#goalsBtn{min-width:44px;padding:8px}#goalsBtn span,.voiceText{display:none}#quietBtn{min-width:44px;padding:8px}header{gap:5px}}
@media(max-width:700px){.conversation #outcome{display:none!important}}

/* Inline phrase scaffold keeps both characters in view without a modal backdrop. */
.inlineHelp[hidden]{display:none}.inlineHelp{flex:none;max-height:42vh;overflow:auto;overscroll-behavior:contain;background:#fffdf7;border-top:1px solid #dce4d4;padding:8px max(20px,calc((100% - 1100px)/2)) 12px;scrollbar-gutter:stable}
.inlineHelpTop{display:flex;align-items:center;justify-content:space-between;gap:12px}.inlineHelpTop h2{font-size:17px;margin:0}.inlineHelpTop button{min-height:44px;padding:6px 12px;background:transparent;font-size:15px}
.inlineHelp .choiceTools{margin:0;gap:8px}.inlineHelp .choiceTools button{flex:none;min-height:44px;padding:6px 18px}.inlineHelp .choiceRow{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;margin:6px 0;padding:6px 12px;border-radius:12px;background:#f3f5ec}.inlineHelp .choiceRow>.teacherInfo{display:none}.inlineHelp .choice{font-size:18px;line-height:1.45;min-height:48px;padding:6px 8px}.inlineHelp .listen{white-space:nowrap}.inlineHelp summary{min-height:44px;padding:10px;font-size:15px;cursor:pointer}.inlineHelp .drawerActions{margin:4px 0}.helpOpen .sprite{height:min(25vh,210px)}.helpOpen .actors{padding:70px 4% 48px}.helpOpen .conversation{padding:0}.helpOpen .bubble{padding:12px 18px}.helpOpen .bubble p{font-size:clamp(19px,2vw,25px);margin:6px 0;line-height:1.4}.helpOpen .turn{margin-bottom:4px}.helpOpen .mood{display:none}.helpOpen .storyCard{width:64px;min-height:64px;padding:5px;left:12px;top:10px}.helpOpen .storyCard img{width:52px;height:52px}.helpOpen .storyCard span{display:none}.helpOpen .sceneHeading{top:8px}.helpOpen .sceneHeading small{display:none}.helpOpen .sceneHeading h1{font-size:18px}.helpOpen #outcome{display:none}
@media(max-width:700px){.inlineHelp{padding:6px 10px 10px;max-height:38vh}.inlineHelp .choice{font-size:16px}.inlineHelp .choiceTools button{padding:6px 12px}.inlineHelp .listen{font-size:0;padding:8px 12px}.inlineHelp .listen:after{content:'🔊';font-size:20px}.helpOpen .actors{padding:145px 4% 44px}.helpOpen .conversation{top:35px;left:15%;right:15%}.helpOpen .bubble p{font-size:17px}.helpOpen .sprite{height:17vh}.helpOpen .name{margin-top:0;font-size:14px;padding:3px 12px}.helpOpen .stageBottom{bottom:3px}.helpOpen #live{display:none}.helpOpen .turn{display:none}.helpOpen #replay{min-height:34px;padding:4px 10px}}
@media(max-height:550px){.inlineHelp{max-height:42vh}.helpOpen .sprite{height:22vh}.helpOpen .actors{padding-top:36px}.helpOpen .sceneHeading{display:none}.helpOpen .bubble p{font-size:18px}.helpOpen .stageBottom{display:none}}


.sceneCue{background:transparent;font-size:14px;text-align:left;padding:6px 8px;min-height:44px;display:block;width:100%}

.inlineHelp .choiceTools{flex-wrap:wrap}.inlineHelp .choiceTools .sceneCue{font-size:14px;padding:6px 10px;min-width:90px;background:transparent;flex:1}


#studyPanel{display:none}.studyMode #studyPanel{display:block;flex:1;min-height:0;overflow:auto;padding:18px 24px;background:#f4f6ed}.studyMode .scene,.studyMode .composer,.studyMode #helpPanel,.studyMode #practiceTurn{display:none!important}.studyMode #sceneBtn{display:none}.studyTop{display:flex;align-items:center;gap:16px;max-width:1200px;margin:auto}.studyTop h1{font-size:22px}.studyTop .teacherInfo{flex:1}.studyTop button{border:1px solid #dbe2cc}.studyGrid{display:grid;grid-template-columns:minmax(220px,.95fr) minmax(0,1.2fr);gap:24px;max-width:1200px;margin:12px auto}.studyGrid figure{margin:0;align-self:start;text-align:center;position:sticky;top:0}.studyGrid figure img{width:100%;max-height:60vh;object-fit:contain;border-radius:20px;display:block;background:#e9eddf}.studyGrid figcaption{font-size:14px;color:#617464;margin-top:8px}.studyWork{background:#fffdf7;padding:20px;border-radius:20px;border:1px solid #dde4d3}.studyWork h2{font-size:clamp(22px,2.3vw,28px);line-height:1.5;margin:0 0 12px}.studyTools{display:flex;gap:8px;flex-wrap:wrap}.studyTools button{background:#e8efdd;font-size:16px}.studyHint{padding:12px;background:#fff6cf;border-radius:12px;font-size:17px;line-height:1.7}.studyForm{display:flex;gap:8px;margin:16px 0 10px}.studyForm input{min-width:0;flex:1;font-size:17px}.studyForm button{white-space:nowrap}.studyChoice{display:flex;gap:8px;margin:8px 0}.studyChoice button{background:#edf1e4;text-align:left;line-height:1.5;font-size:18px;flex:1}.studyChoice .studyListen{flex:none;min-width:48px;text-align:center}.studyFeedback{font-size:18px;line-height:1.7;white-space:pre-wrap}.studyModels{border-top:1px solid #dbe2cc;padding-top:10px}.studyModels button{display:block;width:100%;text-align:left;margin:8px 0;background:#e6eedb;line-height:1.6;font-size:17px}.studyNav{max-width:1200px;display:flex;flex-wrap:wrap;gap:12px;margin:16px auto}.studyNav button{border:1px solid #d8e0ca}.studyNote{max-width:1200px;margin:12px auto;font-size:14px;color:#617464;line-height:1.6}.modeOption{display:block;width:100%;text-align:left;background:#edf2e3;font-size:19px;margin:10px 0;min-height:54px}.modeOption[aria-pressed=true]{outline:2px solid #527963}
@media(max-width:700px){#modeBtn{min-width:44px;padding:8px}#modeBtn span{display:none}header #sceneBtn{display:none}.studyMode #studyPanel{padding:12px}.studyTop{gap:8px;flex-wrap:wrap}.studyTop h1{font-size:19px;margin:0}.studyTop .teacherInfo{font-size:13px}.studyTop button{font-size:13px;padding:8px}.studyGrid{grid-template-columns:1fr;gap:12px}.studyGrid figure{position:static}.studyGrid figure img{max-height:32vh}.studyWork{padding:14px}.studyWork h2{font-size:22px}.studyForm input{font-size:16px}.studyChoice button{font-size:17px}.studyNav{gap:8px}.studyNav button{font-size:14px;padding:8px 12px}}

.inlineHelp .choiceRow[hidden],.starterPanel[hidden]{display:none}.inlineHelp .choiceTools .starterToggle{background:#fff3cc;font-size:14px;min-height:44px}.starterPanel{padding:4px 0 8px}.starterChip{background:#e6eedb;border:1px solid #cddbc3;min-height:50px;display:inline-block;margin:4px 8px 4px 0;font-size:18px;padding:10px 16px}.starterPanel .teacherInfo{margin:8px 0;font-size:15px;line-height:1.5}

.starterEntry{background:#fff1c9;white-space:nowrap}.composer button[aria-expanded=true]{outline:2px solid #537b62}
@media(max-width:700px){.composer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px 64px;gap:6px}.composer #starterBtn{grid-column:1/3;grid-row:1}.composer #helpBtn{grid-column:3/5;grid-row:1}.composer .inputLabel{grid-column:1/3;grid-row:2}.composer #micBtn{grid-column:3;grid-row:2}.composer #send{grid-column:4;grid-row:2}.composer input{min-height:48px}.helpOpen .sprite{height:15vh}.helpOpen .actors{padding-bottom:42px}}
#micBtn.listening,.studyMic.listening{background:#a94e42!important;color:white;outline:3px solid #eec5b5}.studyMic{min-width:48px!important;font-size:22px!important;padding:8px!important}

.roleVoiceSettings{padding:12px 0}.roleVoiceSettings summary{min-height:46px;cursor:pointer}.roleVoiceSettings label{display:block;margin:12px 0;font-size:16px}.roleVoiceSettings select{font:inherit;display:block;width:100%;min-height:46px;margin:6px 0;background:#fffdf5;border:1px solid #cad6c1;border-radius:10px}.roleVoiceSettings p{font-size:14px;line-height:1.6}


.studyChoice button:first-child{display:flex;align-items:center;gap:12px}.studyChoiceEmoji{font-size:28px;line-height:1;flex:none;min-width:32px;text-align:center}

/* Keep the heading, stage and footer in document flow so the composer cannot cover them. */
.scene{display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.scene .sceneHeading{position:relative;top:auto;left:auto;right:auto;flex:none;margin:10px 0 0;text-align:center}
.scene .actors{height:auto;min-height:0;flex:1 0 auto;align-items:center;padding:12px 5% 16px}
.scene .conversation{position:relative;top:auto;left:auto;right:auto;align-self:center;padding:0;min-width:0}
.scene .bubble{padding:18px 22px;max-height:46vh;overflow-y:auto}
.scene .bubble p{font-size:clamp(22px,2.2vw,30px);line-height:1.5;margin:10px 0}
.scene .turn:empty{display:none}.scene #start{margin-top:14px;min-height:48px}
.scene .sprite{height:min(38vh,310px)}
.scene .stageBottom{position:relative;left:auto;right:auto;bottom:auto;flex:none;min-height:52px;padding:6px 14px}
.scene .name{margin-top:6px}.scene .mood{margin-top:4px}
.helpOpen .scene .actors{padding:8px 4%}.helpOpen .scene .sprite{height:min(16vh,120px)}
.helpOpen .scene .bubble{padding:10px 16px;max-height:24vh}.helpOpen .scene .bubble p{font-size:20px;line-height:1.4;margin:6px 0}
.helpOpen .scene .sceneHeading{display:none}.helpOpen .scene .stageBottom{min-height:44px;padding:2px 10px}
@media(max-height:700px){.scene .sceneHeading{margin-top:6px}.sceneHeading small{display:none}.scene .actors{padding:8px 4%}.scene .sprite{height:min(29vh,220px)}.scene .bubble{padding:12px 18px}.scene .bubble p{font-size:22px;line-height:1.4;margin:8px 0}.scene .stageBottom{min-height:48px;padding:3px 12px}.scene #start{margin-top:10px}}
@media(max-width:700px){.scene .actors{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'conversation conversation' 'student npc';gap:10px;padding:8px 4%}.scene .conversation{grid-area:conversation;position:relative;top:auto;left:auto;right:auto}.scene .student{grid-area:student}.scene .npc{grid-area:npc}.scene .sprite{height:min(19vh,150px)}.scene .bubble{max-height:29vh;padding:12px 16px}.scene .bubble p{font-size:21px}.scene .name{font-size:16px;padding:5px 16px}.scene .mood{font-size:12px}.scene .stageBottom{padding:4px 10px;min-height:46px}.helpOpen .scene .sprite{height:min(10vh,72px)}.helpOpen .scene .bubble{max-height:17vh}.helpOpen .scene .actors{gap:5px}.helpOpen .scene .bubble p{font-size:18px}}

/* The start action stays outside the scrollable actor area at every viewport height. */
.scene{overflow:hidden}.scene .actors{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;min-height:0}
.stageCenter{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px}.stageCenter #live:empty{display:none}
.scene .stageBottom #start{margin:0 auto;min-height:48px;flex:none}
.scene .sprite{height:max(60px,min(38vh,calc(var(--actor-height,400px) - 90px),310px))}
.scene .bubble{max-height:max(80px,calc(var(--actor-height,400px) - 48px))}
.helpOpen .scene .sprite{height:max(50px,min(16vh,calc(var(--actor-height,200px) - 55px),120px))}
@media(max-height:550px){.scene .turn{display:none}.scene .bubble{padding:8px 14px;max-height:max(72px,calc(var(--actor-height,220px) - 12px))}.scene .bubble p{font-size:20px;line-height:1.35;margin:6px 0}.scene .sceneHeading h1{font-size:18px}.scene .stageBottom{min-height:48px}.scene .name{font-size:16px;padding:4px 14px}.scene .mood{font-size:12px;min-height:18px}}
@media(max-width:700px){.scene .sprite{height:max(60px,min(19vh,calc(var(--actor-height,400px) - 320px),150px))}.scene .bubble{max-height:29vh}.helpOpen .scene .sprite{height:min(10vh,72px)}.helpOpen .scene .bubble{max-height:17vh}.stageCenter{gap:4px}.scene .stageBottom #start{font-size:16px;padding:8px 12px}.scene .stageBottom #live{font-size:12px}}

.scene .stageBottom #start{background:#356d5f;color:#fff;font-weight:700}

@media(max-height:550px){.scene .bubble small{display:none}.scene .bubble{max-height:max(72px,var(--actor-height,220px))}}

.studyOralGuide{font-size:19px;font-weight:700;color:#244b3e;line-height:1.6}.studyOralRow{display:flex;gap:10px;align-items:center;margin:10px 0}.studyOralRow .studyMic{flex:none;width:64px;min-height:58px;background:#d5eadb}.studyOralRow input{flex:1;min-width:0;font:inherit;padding:12px;border:1px solid #cbd8c9;border-radius:12px}.studyModels button:not(.studyMic){min-height:52px}.studyTeacherSkip{align-self:center;padding:8px}.studyTeacherSkip summary{cursor:pointer}.studyTeacherSkip button{display:block;margin:8px 0}.studyNav button:disabled{opacity:.5;cursor:not-allowed}
