:root{font-family:ui-rounded,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#563277;background:#e9dff4;font-size:17px;--pink:#ec6494;--purple:#8a61b6}*{box-sizing:border-box}body{margin:0}button,input,a{touch-action:manipulation}button{font:inherit;color:inherit;border:0;cursor:pointer;font-weight:650;min-height:48px}button:disabled{cursor:default;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible{outline:4px solid #8152ad;outline-offset:5px}button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#app{position:relative;width:100%;max-width:1600px;height:100svh;min-height:680px;margin:auto;isolation:isolate;background:#e9dcf8 url('./assets/classroom.png') center/cover no-repeat;overflow:hidden}header{position:absolute;inset:0 0 auto;z-index:5;padding:28px 36px;display:flex;align-items:center;justify-content:space-between}.wordmark{font-size:36px;font-weight:900;letter-spacing:-1.5px;color:#63318a;text-decoration:none;text-shadow:0 2px white}.wordmark small{display:block;font-size:14px;letter-spacing:3px;margin-top:1px}.header-actions{display:flex;gap:12px;align-items:center}.header-actions button{border:2px solid white;background:#fff9;border-radius:50%;width:48px;height:48px;font-size:25px;box-shadow:0 3px 0 #9777b41a}.header-actions .parent-button{width:auto;border-radius:30px;padding:0 20px;font-size:16px}.home-greeting{position:absolute;left:15%;top:30%;background:#fffef9;border:3px solid white;border-radius:25px 25px 8px 25px;padding:18px 25px;font-size:21px;font-weight:700;box-shadow:0 12px 24px #70519112}.home-content{position:absolute;right:6%;top:23%;width:39%;max-width:540px}.course-card{background:#fffdf8ed;border:3px solid white;border-radius:36px;padding:32px;box-shadow:0 10px 0 #b199d228,0 18px 40px #74529714}.eyebrow{display:inline-block;color:#e55087;background:#ffe2ee;padding:7px 17px;border-radius:30px;font-weight:750;font-size:16px}.course-card h1{font-size:clamp(35px,4vw,56px);margin:18px 0 2px;letter-spacing:2px}.course-card p{color:#9a7aae;font-size:23px;margin:0 0 24px}.home-progress{height:8px;background:#eae3ef;border-radius:12px;margin-bottom:25px;overflow:hidden}.home-progress i{display:block;width:0;height:100%;background:#f58faf;border-radius:12px}.primary{width:100%;border:2px solid #ffffff80;border-radius:25px;background:linear-gradient(165deg,#ff9abd,#ed5c92);color:white;padding:17px 20px;font-size:22px;box-shadow:inset 0 3px 4px #ffffff75,0 5px 0 #cc4e7f2b}.primary span{margin-right:12px}.call-card{margin-top:20px;display:flex;align-items:center;text-align:left;gap:15px;width:100%;background:#fffdf9e8;border:3px solid white;border-radius:27px;padding:12px 20px;box-shadow:0 6px 0 #b29bcc20}.call-card .asset-icon{width:68px;height:68px}.call-card strong{font-size:21px}.call-card small{display:block;font-size:14px;color:#9a80a7;margin-top:7px}.text-button{background:transparent;font-size:14px;color:#886798;padding:16px}.lesson-top{position:absolute;top:36px;left:50%;transform:translateX(-50%);text-align:center;font-size:16px;font-weight:700}#progress-dots{display:flex;justify-content:center;gap:7px;margin-top:12px}#progress-dots i{width:7px;height:7px;border-radius:8px;background:#fff9}#progress-dots .current{background:#ed79a5;width:23px}#progress-dots .past{background:#bc9ed9}#pet{position:absolute;left:6%;top:40%;width:36%;height:44%;border-radius:45%;background:transparent}.name-pill{position:absolute;left:18%;bottom:9%;font-size:15px;font-weight:700;background:#ffffffbc;padding:8px 18px;border-radius:30px}.teaching-space{position:absolute;top:22%;left:51%;right:6%;bottom:245px;display:flex;align-items:center;flex-direction:column;justify-content:center}.speech{width:100%;background:#fffdf9f5;border:3px solid white;border-radius:34px 34px 34px 9px;padding:24px 28px;box-shadow:0 8px 0 #c4b0dc24,0 16px 30px #8162a00f;text-align:left}#speaker{font-size:15px;color:#a387b3;display:block;margin-bottom:10px}#english{font-size:clamp(25px,3vw,40px);font-weight:750;line-height:1.4;margin:0;overflow-wrap:anywhere}#translation{font-size:17px;color:#91769f;line-height:1.6;margin:12px 0 0}#interaction{width:100%}#feedback{margin:13px 0 0;line-height:1.5;font-size:15px;text-align:center;color:#78588a;max-width:100%}#feedback:empty{display:none}.next-button{position:absolute;right:0;bottom:-58px;display:flex;gap:10px;align-items:center;background:#fff9;border:2px solid white;border-radius:30px;padding:10px 20px;color:#996abc}.next-button small{font-size:15px}.next-button span{font-size:22px}.voice-dock{position:absolute;left:51%;right:6%;bottom:32px;text-align:center}.turn-state{display:flex;justify-content:center;align-items:center;gap:12px;margin-bottom:14px;font-size:17px;color:#7d598f;min-height:25px}.dock-buttons{display:flex;justify-content:center;align-items:center;gap:28px;padding:0 12px}.dock-buttons button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;transition:box-shadow .2s,background .2s}.dock-side{background:#fffc;border:3px solid white;border-radius:28px;width:86px;height:100px;box-shadow:0 5px 0 #b19dc232,inset 0 2px 6px white}.dock-buttons small{font-size:14px;font-weight:650}.mic{width:122px;height:132px;border:4px solid #fff;border-radius:38px;background:linear-gradient(160deg,#fff4fa,#fdd2e4);box-shadow:inset 0 3px 8px white,0 7px 0 #d780a42e,0 10px 25px #e88dad22;color:#b64979}.asset-icon{display:block;width:62px;height:62px;background-image:url('./assets/speech-icons.png');background-size:300% 100%;background-repeat:no-repeat;pointer-events:none}.asset-icon.speaker{background-position:0 50%}.asset-icon.microphone{background-position:50% 50%}.asset-icon.bulb{background-position:100% 50%}.mic .asset-icon{width:84px;height:84px}.sound-bars{display:flex;align-items:center;gap:3px;height:22px}.sound-bars i{display:block;width:4px;height:6px;background:#b995ce;border-radius:5px}.sound-bars i:nth-child(2),.sound-bars i:nth-child(4){height:12px}.sound-bars i:nth-child(3){height:18px}.stop-symbol{display:none;width:30px;height:30px;border-radius:8px;background:#d95887;margin:25px}.mic.listening .asset-icon{display:none}.mic.listening .stop-symbol{display:block}.cue{box-shadow:0 0 0 5px #fff9,0 0 0 10px #f7cc765c,0 12px 25px #bf8bc02b!important;animation:glow 2s ease-in-out infinite}.choice.cue{animation:none;box-shadow:0 0 0 3px #ffe7a8!important}.choices{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.choice{background:#fff;border:4px solid white;border-radius:23px;padding:7px;box-shadow:0 5px 0 #bba5d129;overflow:hidden}.scene-thumb{display:block;height:125px;width:100%;border-radius:15px;background:url('./assets/greeting-scenes.png') left center/200% auto no-repeat}.scene-thumb.leave{background-position:right center}.choice>span:not(.scene-thumb){font-size:17px;display:block;padding:7px}.choice:has(.scene-thumb)>span:not(.scene-thumb){display:none}.choice.correct{border-color:#a0d8b7;box-shadow:0 0 0 3px #def4e7}.choice.retry{animation:nudge .3s ease-in-out 2}.move-counter{text-align:center;font-size:38px;margin:20px 0 12px;font-variant-numeric:tabular-nums}.move-controls{display:flex;gap:12px;justify-content:center}.move-controls button{border-radius:22px;background:#fffc;padding:12px 20px}.record-controls{display:none}audio{width:100%;margin-top:20px}#interaction details{display:none}#interaction details.parent-visible{display:block;background:#fff;border-radius:18px;padding:16px;margin-top:10px}.form-row{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}input,select{font:inherit;border:2px solid #e2d4ed;border-radius:12px;padding:10px;min-width:0}input{flex:1}dialog{border:0;border-radius:30px;background:#fffdfb;color:#563277;width:min(700px,92%);max-height:85svh;padding:32px;box-shadow:0 20px 100px #442b5950}dialog::backdrop{background:#3e285c66}dialog p{line-height:1.7}dialog button{border-radius:16px;padding:12px 18px;background:#f3eaf9}dialog .close{float:right;background:transparent;font-size:30px;padding:0;width:48px}dialog a{color:#8d4baf}dialog table{border-collapse:collapse;width:100%;font-size:15px}dialog th,dialog td{padding:12px 6px;text-align:left;border-bottom:1px solid #eee4f3}#result{position:absolute;left:48%;right:5%;top:22%;background:#fffdf6f2;border:3px solid white;border-radius:35px;padding:32px}#result p{line-height:1.7}#result h1{font-size:36px}.stats{display:flex;gap:20px;margin:25px 0}.stats b{display:block;font-size:32px;color:#e96596}.stats span{font-size:14px}.status-chip{background:#f4e9fb;border-radius:15px;padding:12px}#classroom[data-voice=speaking] .sound-bars i,#classroom[data-voice=listening] .sound-bars i{animation:wave .8s ease-in-out infinite alternate}#classroom[data-voice=listening] .sound-bars i{background:#eb709e}#classroom[data-voice=thinking] .sound-bars i{animation:wave 1.5s ease-in-out infinite alternate}#classroom .sound-bars i:nth-child(2){animation-delay:.2s}#classroom .sound-bars i:nth-child(3){animation-delay:.4s}#classroom .sound-bars i:nth-child(4){animation-delay:.6s}@keyframes wave{to{transform:scaleY(.45)}}@keyframes glow{50%{filter:brightness(1.045)}}@keyframes nudge{50%{transform:translateX(4px)}}@media(min-aspect-ratio:16/10){#app{background-size:100% 100%}.teaching-space{top:20%;bottom:240px}.home-content{top:19%;}.home-greeting{top:28%}}@media(max-width:850px){header{padding:22px}.wordmark{font-size:29px}.home-content{right:4%;width:45%}.course-card{padding:23px}.home-greeting{left:8%;font-size:18px}.teaching-space,.voice-dock{left:48%;right:4%}.speech{padding:22px}.dock-buttons{gap:18px}.lesson-top{left:50%;font-size:14px}.lesson-top #chapter-title{display:none}}@media(max-width:580px){#app{height:auto;min-height:100svh;background-position:28% center;background-attachment:fixed;overflow:visible}header{position:relative;padding:18px}.wordmark{font-size:27px}.header-actions{gap:5px}.header-actions button{width:42px;height:42px;min-height:42px}.header-actions .parent-button{padding:0 12px}.home-content{position:relative;top:auto;right:auto;width:auto;margin:250px 18px 24px}.home-greeting{top:145px;left:20px}.home-content h1{font-size:36px}#classroom{min-height:780px}.lesson-top{top:100px}.teaching-space{top:150px;left:20px;right:20px;bottom:auto;min-height:300px;justify-content:start}.speech{background:#fffef9ed}.voice-dock{position:relative;left:auto;right:auto;bottom:auto;padding-top:560px;padding-bottom:35px}.name-pill{display:none}#pet{top:400px;left:4%;height:175px;width:30%}.next-button{bottom:-65px}.scene-thumb{height:110px}#result{position:relative;left:auto;right:auto;top:auto;margin:190px 18px 30px}.choices{gap:12px}#english{font-size:27px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.speech[data-source=lesson]::after{content:'课堂示范';display:inline-block;margin-top:12px;color:#a084ad;font-size:13px}.speech[data-source=doubao]::after{content:none}

/* A generous conversation surface; activity cards stay inside its own right lane. */
.teaching-space{left:43%;right:4%;top:19%;bottom:230px;justify-content:flex-start;gap:12px;overflow-y:auto;overflow-x:hidden;padding:8px 10px 68px;scrollbar-width:thin}
.speech{min-height:160px;padding:25px 30px;border-radius:32px 32px 32px 10px;flex-shrink:0}
#english{font-size:clamp(25px,2.8vw,36px);line-height:1.55}
#feedback{align-self:stretch;text-align:left;background:#ffffffb8;border-radius:18px;padding:12px 18px;margin:0}
.voice-dock{left:43%;right:4%;bottom:24px}.turn-state{font-size:15px;min-height:40px;margin-bottom:20px}
.next-button{position:relative;align-self:flex-end;bottom:auto;right:auto;flex-shrink:0}
.choices{margin-top:0;gap:14px}.scene-thumb{height:106px}
.mic{width:118px;height:118px;border-radius:50%;isolation:isolate;--voice-level:0}
.mic .asset-icon{width:68px;height:68px}.mic .stop-symbol{width:23px;height:23px;border-radius:6px;margin:17px}.mic small{font-size:14px}
.mic::before,.mic::after{content:'';position:absolute;pointer-events:none;border-radius:50%;opacity:0;z-index:-1;transition:opacity .2s}
.mic::before{inset:-11px;border:3px solid #f2a6c6}
.mic::after{inset:-16px;border:3px solid transparent;border-top-color:#db5796;border-right-color:#c0a0dc}
.mic[data-capture=listening]::after,.mic.listening::after{opacity:1;animation:mic-orbit 2.6s linear infinite}
.mic[data-capture=listening]::before,.mic.listening::before{opacity:.7;transform:scale(calc(1 + var(--voice-level)*.13));border-color:#ee84b2;box-shadow:0 0 calc(8px + var(--voice-level)*16px) #f490c366}
.mic[data-capture=requesting]::after,.mic[data-capture=recognizing]::after,#classroom[data-voice=thinking] .mic::after{opacity:1;border-top-color:#8e6eb9;border-right-color:transparent;animation:mic-orbit 1.4s linear infinite}
.mic[data-capture=requesting],.mic[data-capture=recognizing]{background:#eee5fb;color:#715498}
.mic.listening{background:linear-gradient(155deg,#ffe1ef,#f9bbd7);box-shadow:0 6px 18px #d97ca039}
.koko-stage{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#app{background-image:url('./assets/classroom-motion-v1.png')}
#pet.koko-stage{top:auto;left:2%;bottom:12%;width:min(40%,55svh);height:auto;aspect-ratio:1;max-width:540px;padding:0;z-index:3;border:0;border-radius:42%;background:transparent;isolation:isolate;overflow:visible;min-height:0;--koko-level:0}
.koko-stage canvas{display:block;width:100%;height:100%;position:relative;z-index:1;pointer-events:none;transform-origin:61% 96%;animation:koko-breathe 4.8s ease-in-out infinite;filter:drop-shadow(0 4px 3px #bf769518)}
.koko-shadow{position:absolute;left:13%;right:12%;bottom:1.5%;height:5%;border-radius:50%;background:#bd76a226;filter:blur(6px);pointer-events:none}
.koko-stage[data-motion=listening] canvas{animation:koko-listen 3.4s ease-in-out infinite}
.koko-stage[data-motion=thinking] canvas,.koko-stage[data-motion=requesting] canvas{animation:koko-think 3s ease-in-out infinite}
.koko-stage[data-motion=speaking] canvas{animation:koko-talk 1.8s ease-in-out infinite}
.koko-stage[data-reaction=happy] canvas{animation:koko-greet 1.2s ease-in-out 2}
.koko-stage[data-motion=paused] canvas{animation-play-state:paused}
#app[data-screen=home] .koko-stage{bottom:12%}
#app[data-screen=result] .koko-stage{bottom:12%}
.home-greeting{top:22%;max-width:32%}
.name-pill{left:18%;bottom:8%;z-index:4;pointer-events:none}
@keyframes koko-breathe{0%,100%{transform:scale(1,1) rotate(-.25deg)}50%{transform:scale(1.006,1.014) rotate(.3deg)}}
@keyframes koko-listen{0%,100%{transform:rotate(-.6deg) scale(1,1)}45%,65%{transform:rotate(.7deg) scale(1.004,1.009)}}
@keyframes koko-think{0%,100%{transform:rotate(-.8deg)}50%{transform:rotate(.5deg) translateY(-2px)}}
@keyframes koko-talk{0%,100%{transform:translateY(0) rotate(-.3deg)}45%{transform:translateY(-3px) rotate(.35deg)}}
@keyframes koko-greet{0%,100%{transform:rotate(0)}28%{transform:rotate(-1.4deg) translateY(-3px)}65%{transform:rotate(1.2deg) translateY(-2px)}}
@media(max-width:850px){#pet.koko-stage{left:1%;width:min(40%,55svh)}}
@media(max-width:580px){
 #pet.koko-stage,#app[data-screen=home] #pet.koko-stage,#app[data-screen=result] #pet.koko-stage{top:105px;bottom:auto;left:4%;width:220px;max-width:57%;height:auto}
 #app[data-screen=lesson] #pet.koko-stage{top:90px;left:8%;width:170px;max-width:44%}
 #app[data-screen=home] #pet.koko-stage{width:190px;max-width:49%}
 .home-greeting{left:auto;right:18px;top:135px;max-width:44%;padding:12px;font-size:16px}
 .home-content{margin-top:250px}
 .teaching-space{top:285px;min-height:0;max-height:none}
 .voice-dock{padding-top:610px}
}
#skip{display:none}.dialogue-cards-caption{font-size:15px;color:#836293;margin:5px 0 10px}.conversation-choice{border-radius:24px;min-height:105px;background:#fffafee8;border:3px solid white;padding:15px;box-shadow:0 5px 0 #bba5d122}.conversation-choice span{display:block;font-size:32px;margin-bottom:8px}.conversation-choice small{font-size:16px}.conversation-choice.selected{border-color:#bdadd8;background:#f2eafb}
@keyframes mic-orbit{to{transform:rotate(360deg)}}
@media(max-width:850px) and (min-width:581px){.teaching-space,.voice-dock{left:42%;right:3%}.teaching-space{top:18%}.speech{padding:20px}.dock-buttons{gap:24px}}
@media(max-width:580px){.teaching-space{top:285px;left:14px;right:14px;bottom:auto;max-height:350px;padding:5px 6px 20px}.speech{min-height:160px;padding:20px}.voice-dock{left:auto;right:auto;padding-top:580px;bottom:auto}.mic{width:112px;height:112px}.choices{gap:10px}.next-button{bottom:auto}.scene-thumb{height:88px}}
#resume{display:block;width:100%;margin-top:12px;border:2px solid #eadcf3;border-radius:25px;background:#fff7;color:#805b97;padding:13px 20px}
.connection-status{font-size:14px;line-height:1.5;background:#fffdf5ec;border:1px solid #dfd1e8;border-radius:14px;padding:10px 14px;margin:10px 0;color:#654777}
#conversation-status{align-self:stretch;margin:0;flex-shrink:0;position:sticky;top:0;z-index:4}
.send-turn{min-height:48px;padding:12px 20px!important;border-radius:16px;font-size:16px;flex-shrink:0}
#draft-status{font-size:14px;line-height:1.5;margin:8px 0;color:#654777}
#cancel-turn{min-height:48px;padding:10px 16px}
.course-card p.fixed-note{font-size:14px;line-height:1.5;margin:12px 0 18px;color:#654777}
.file-check{display:block;margin:12px 0 0;font-size:14px;line-height:1.5;color:#654777}.file-check input{display:block;width:100%;margin-top:6px;font-size:14px;min-height:48px}
.speech[data-reply-source=fixed]::after{content:'本机固定规则回应 · 不是模型自由聊天';display:block;margin-top:10px;font-size:13px;color:#77578a}
.speech[data-reply-source=doubao]::after{content:'模型文字回复';display:block;margin-top:10px;font-size:13px;color:#77578a}
.speech[data-reply-source=lesson]::after{content:'固定课堂示范 · 未由模型判断';display:block;margin-top:10px;font-size:13px;color:#77578a}
@media(max-width:580px){#interaction .form-row{flex-direction:column}#answer-input{width:100%}.send-turn{width:100%}}
/* Keep the confirmation row above the software keyboard. Pinch zoom does not
   activate this layout; it is tied to an editing focus and visual viewport. */
#app[data-keyboard=open]{height:var(--keyboard-height);min-height:0}
#app[data-keyboard=open] header{padding:10px 22px}
#app[data-keyboard=open] .wordmark{font-size:25px}
#app[data-keyboard=open] .header-actions button{width:40px;height:40px;min-height:40px}
#app[data-keyboard=open] .header-actions .parent-button{width:auto;font-size:14px}
#app[data-keyboard=open] .lesson-top{display:none}
#app[data-keyboard=open] .teaching-space{top:70px;bottom:10px;max-height:none;padding-bottom:20px}
#app[data-keyboard=open] .voice-dock{display:none}
#app[data-keyboard=open] .speech{min-height:0;padding:15px 20px}
#app[data-keyboard=open] #english{font-size:24px;line-height:1.4}
#app[data-keyboard=open] .name-pill{display:none}
#app[data-keyboard=open] #interaction details.parent-visible{padding:10px}
#app[data-keyboard=open] .form-row{margin:10px 0;gap:8px}
#app[data-keyboard=open] #answer-input{font-size:16px;width:100%;flex-basis:100%}
#app[data-keyboard=open] .send-turn{width:auto;flex:1}
#app[data-keyboard=open] #dismiss-keyboard{min-height:48px;padding:10px}
#app[data-keyboard=open] #draft-status{margin:5px 0}
@media(max-width:580px){#app[data-keyboard=open] .teaching-space{top:75px;left:10px;right:10px}#app[data-keyboard=open] #pet{display:none}#app[data-keyboard=open] .form-row{flex-direction:row}}
.more-practice{margin-top:10px;font-size:14px}.more-practice summary,.life-hints summary{cursor:pointer;min-height:44px;padding:10px 0}
@media(min-width:581px){.home-content{max-height:calc(81% - 16px);overflow-y:auto;padding:0 6px 12px;scrollbar-width:thin}}
#life-resume{width:100%;border:2px solid #eadcf3;border-radius:20px;background:#fff7;padding:12px;margin-top:10px}
.life-instructions{font-size:17px;line-height:1.6;margin:0 0 12px;color:#654777}
.life-play{background:#fffaf3ed;border:2px solid white;border-radius:24px;padding:18px;margin-top:12px}
.life-objects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.life-object{background:#fff;border:3px solid #eadcf0;border-radius:20px;min-height:140px;padding:8px;color:#654777}
.life-object img{display:block;width:100%;height:100px;object-fit:contain}.life-object span{font-size:15px}
.life-object.selected{border-color:#df80ac;background:#fff1f7;box-shadow:0 0 0 2px #ffe3ed}
.life-play .choice.selected{border-color:#df80ac;background:#fff1f7}
.life-play .choice:has(.scene-thumb)>span:not(.scene-thumb){display:block;font-size:15px}
#life-phrase{font-size:23px;font-weight:750;line-height:1.5;margin:8px 0;color:#654777}
.life-hints{display:block!important;margin:12px 0;background:#f4edf8;border-radius:16px;padding:6px 14px}
.life-attempt{width:100%;background:#e9dbf7;border:2px solid white;border-radius:18px;min-height:52px;padding:12px 14px;font-size:16px}
.life-bag{font-size:14px;margin:12px 0 0;padding:10px;background:#fff2cd;border-radius:12px}
.life-modes{display:flex;gap:8px}.life-modes button{border:2px solid #d8c6e4;border-radius:14px;padding:10px;flex:1}.life-modes button[aria-pressed=true]{background:#efe1fa}
.speech[data-reply-source=life-fixed]::after{content:'课程预设回应 · 文字匹配不是发音评分';display:block;margin-top:10px;font-size:13px;color:#77578a}
.speech[data-reply-source=life-demo]::after{content:'按选择示范回应 · 未验证开口或发音';display:block;margin-top:10px;font-size:13px;color:#77578a}
.speech[data-reply-source=life-hint]::after{content:'本轮一句示范 · 可跟读或由家长陪着说';display:block;margin-top:10px;font-size:13px;color:#77578a}
#app[data-lesson=life] .teaching-space{top:15%;bottom:210px}
#app[data-lesson=life] .speech{min-height:104px;padding:14px 22px}
#app[data-lesson=life] #speaker{margin-bottom:5px}
#app[data-lesson=life] #english{font-size:clamp(25px,2.3vw,30px);line-height:1.4}
@media(max-width:850px){.life-object{min-height:110px}.life-object img{height:75px}}
@media(max-width:580px){.life-play{padding:12px}.life-objects{gap:6px}.life-object img{height:65px}.life-object span{font-size:13px}#app[data-lesson=life] .teaching-space{top:285px;bottom:auto;max-height:440px}}
#app[data-keyboard=open][data-lesson=life] .teaching-space{bottom:10px}

/* Children speak and choose pictures. Editing and technical diagnostics are
   revealed only by the header's parent entry. Keep the right lane scrollable. */
#app:not([data-parent-aid=true]) #feedback{display:none}
#app:not([data-parent-aid=true]) .speech::after{display:none}
#home .fixed-note,#home #connection-status,#home #call-status{display:none}
#app[data-lesson=life] .life-play{padding:14px;margin-top:0}
#app[data-lesson=life] .life-instructions{font-size:20px;margin:0 0 12px}
#app[data-lesson=life] .speech{min-height:100px}
#app[data-lesson=life] .life-object span{font-size:19px}
#app[data-lesson=life] #speaker{font-size:14px}
#app[data-lesson=life] .name-pill{font-size:14px}
#app[data-lesson=life] .teaching-space{gap:14px}
#app[data-parent-aid=true] #interaction details.parent-visible .life-modes,
#app[data-parent-aid=true] #interaction details.parent-visible .life-hints{margin-top:12px}
#return-to-child{width:100%;border:1px solid #ddcdea;border-radius:14px;margin:8px 0}
#app[data-lesson=life] .life-play:has(.life-instructions):not(:has(.life-objects,.choices,.primary)){background:transparent;border:0;padding:0}

/* Both sides of a turn remain visible; the microphone stays in its dock. */
#conversation-log{width:100%;display:flex;flex-direction:column;gap:12px;flex-shrink:0}
#conversation-log:empty{display:none}
#app[data-threaded=true] #speech{display:none}
.conversation-message{width:88%;max-width:100%;border:2px solid #fff;border-radius:24px 24px 24px 8px;padding:14px 20px;background:#fffdf8f5;box-shadow:0 4px 0 #b8a4cf18}
.conversation-message.user{align-self:flex-end;border-radius:24px 24px 8px 24px;background:#ffe9f4f2}
.conversation-speaker{display:block;font-size:13px;color:#94729f;margin-bottom:5px}
.conversation-message p{margin:0;font-size:clamp(21px,2.2vw,28px);font-weight:650;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}
.conversation-message[data-state=pending] p{color:#9878aa;letter-spacing:3px}
.conversation-message[data-source=unavailable] p,.conversation-message[data-source=cancelled] p{font-size:18px;font-weight:500}
@media(max-width:850px){.conversation-message{width:94%;padding:12px 16px}}
@media(max-width:580px){.conversation-message p{font-size:21px}}

.first-card .home-progress{margin:18px 0 8px}.first-card small{font-size:14px;color:#76588b}
#first-resume{width:100%;border:2px solid #eadcf3;border-radius:20px;background:#fff7;padding:12px;margin-top:10px}
.course-card .first-parent-note{font-size:14px;line-height:1.6;margin:10px 0;color:#654777}
.other-courses{background:#fffdf7dd;border-radius:20px;padding:8px 14px;margin-top:14px}
.other-courses .course-card{padding:18px}.other-courses h1{font-size:27px}
.first-cue{font-size:20px;font-weight:650;margin:4px 0 12px;color:#654777}
#app[data-lesson=first] .teaching-space{top:17%;bottom:215px}
#app[data-lesson=first] .scene-thumb{height:115px}
#app[data-lesson=first] .choice{min-width:0;flex:1}
#app[data-lesson=first] #interaction audio{width:100%;margin:14px 0;min-height:48px}
#app[data-lesson=first] .record-controls button{width:100%;border:3px solid white;border-radius:24px;background:#fbd3e5;padding:14px;font-size:22px}
#app[data-lesson=first] #first-record-skip{display:block;width:100%;min-height:48px}
#app[data-lesson=first] #interaction details:not(.parent-visible){display:none}
#app[data-keyboard=open][data-lesson=first] .teaching-space{top:75px;bottom:10px}
@media(max-width:580px){
 #app[data-screen=lesson]{height:100svh;min-height:560px}
 #classroom{min-height:0}
 #app[data-screen=lesson] header{padding:12px 16px}
 #app[data-screen=lesson] .wordmark{font-size:25px}
 #app[data-screen=lesson] .wordmark small{font-size:11px}
 #app[data-screen=lesson] .header-actions{gap:6px}
 #app[data-screen=lesson] .header-actions .parent-button{padding:0 12px}
 #app[data-screen=lesson] .lesson-top{top:85px;left:auto;right:12px;transform:none;max-width:53%}
 #app[data-screen=lesson] #pet.koko-stage{top:90px;left:5%;width:125px;max-width:34%}
 #app[data-screen=lesson] .teaching-space,#app[data-lesson=first] .teaching-space,#app[data-lesson=life] .teaching-space{top:225px;bottom:174px;min-height:0;max-height:none;padding:6px 6px 16px}
 #app[data-screen=lesson] .voice-dock{position:absolute;left:12px;right:12px;bottom:12px;padding:0}
 #app[data-screen=lesson] .turn-state{min-height:20px;margin:0 0 8px;font-size:14px}
 #app[data-screen=lesson] .dock-buttons{gap:20px}
 #app[data-screen=lesson] .mic{width:96px;height:104px;border-radius:30px}
 #app[data-screen=lesson] .dock-side{width:72px;height:90px}
 #app[data-lesson=first] .scene-thumb{height:85px}
 #app[data-screen=result] #result{margin-top:275px}
 #app[data-keyboard=open][data-screen=lesson] .teaching-space{top:75px;bottom:10px}
 #app[data-keyboard=open][data-screen=lesson] .voice-dock{display:none}
}
.first-welcome{display:flex;justify-content:center;padding:8px 0 14px}
.chat-topics{display:flex;justify-content:center;gap:16px;margin:18px 0}.chat-topic{width:88px;height:88px;border:3px solid white;border-radius:26px;background:#fff8ed;font-size:46px;box-shadow:0 4px 0 #c6a6cb22}
#home .call-card{background:#fffaf2;border:3px solid white}.call-card strong{color:#69408b}
#home .call-card #call-status{display:block;margin-top:6px;font-size:14px;line-height:1.45;color:#765783}
.welcome-wave{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:152px;min-height:152px;background:#fff4e9;border:3px solid white;border-radius:42px;box-shadow:0 5px 0 #d8b3a726}
.welcome-wave>span{font-size:68px;line-height:1.15}.welcome-wave small{font-size:18px}
.first-door{display:flex;flex-direction:column;align-items:center;gap:12px;margin:8px auto 18px;padding:18px 30px;background:#fffaf1;border:3px solid white;border-radius:30px;box-shadow:0 5px 0 #ccb6d22b}
.first-door small{font-size:18px}.door-picture{position:relative;display:block;width:92px;height:112px;border:6px solid #c48a67;border-radius:28px 28px 4px 4px;background:linear-gradient(90deg,#f4c397,#ffe0b9);box-shadow:inset 0 0 0 5px #f9d3ad}
.door-picture::after{content:'';position:absolute;right:10px;top:61px;width:12px;height:12px;border-radius:50%;background:#cc9255;box-shadow:0 2px 0 #a9744926}
@media(max-width:580px){.welcome-wave{width:132px;min-height:132px}.welcome-wave>span{font-size:56px}.first-door{padding:12px 26px}.door-picture{width:76px;height:94px}.door-picture::after{top:49px}}
