:root{font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#163f50;background:#eff5f6;font-synthesis:none;--ink:#163f50;--muted:#6e8992;--orange:#df824e;--line:#d8e5e7}*{box-sizing:border-box}html{scrollbar-gutter:stable}body{margin:0;min-width:320px}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer;background:#fff;border:1px solid #d2e1e5;border-radius:11px;padding:10px 14px;color:var(--ink);font-weight:650}button:hover{background:#eaf2f3}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #dca249;outline-offset:3px}a{color:#386c7d}a:hover{text-decoration:underline}[hidden]{display:none!important}header{display:grid;grid-template-columns:minmax(0,1fr) max-content minmax(0,1fr);align-items:center;gap:18px;height:88px;padding:0 30px;background:#fff;border-block:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;min-width:0}.brand-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:13px;background:var(--ink);color:#eabd65;font-size:30px}.brand>div{min-width:0}.brand strong{display:block;letter-spacing:2px;font-size:19px;white-space:nowrap}.brand small{display:block;max-width:210px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px;color:var(--muted);font-size:12px}.mode-tabs{display:flex;gap:4px;padding:5px;background:#eff4f6;border-radius:15px;justify-self:center}.mode-tabs button{white-space:nowrap;border:0;background:none;font-size:13px}.mode-tabs .active{background:var(--ink);color:white}.tools{display:flex;justify-self:end;gap:7px}.tools button{font-size:12px;padding:9px 11px}.quiet{border-color:transparent;background:none;color:var(--muted)}main{max-width:1580px;margin:auto;padding:24px 30px}.journey{display:grid;grid-template-columns:minmax(0,1fr) 345px;align-items:center;gap:22px;min-height:66px;margin-bottom:18px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.4px;color:var(--muted);line-height:18px}h1{font-size:25px;line-height:1.3;margin:5px 0 0}h2{font-size:25px;line-height:1.35;margin:14px 0}h3{font-size:20px;margin:8px 0}.progress-wrap{text-align:right;font-size:12px;color:var(--muted)}#top-progress{display:flex;gap:6px;min-height:34px;align-items:center;margin-top:8px}.step{height:28px;flex:1;min-width:0;padding:0;border:2px solid transparent;border-radius:7px;color:#76929b;background:#e1ebee;font-size:11px}.step.done{background:#d8eee4;color:#3c806e}.step.current{border-color:var(--orange)}#top-progress i{height:6px;border-radius:4px;flex:1;background:#dbe7eb}#top-progress i.done{background:#70ad96}#top-progress i.current{background:#df9b64}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 375px;gap:20px;align-items:stretch}.scene-card,.lesson-card,.review-panel{border:1px solid var(--line);border-radius:23px;background:white;overflow:hidden;box-shadow:0 9px 24px #23485807}.scene-head{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:19px 23px;background:#fafdfb}.scene-head strong{font-size:13px}.scene-head span{font-size:11px;color:var(--muted)}#scene{min-height:390px;display:grid;align-items:center;background:#e3eeed}#scene svg{display:block;width:100%;height:auto;max-height:585px}.scene-caption{padding:15px 22px;background:#f8fbf8;color:#66848b;font-size:12px;min-height:53px;line-height:1.7}.lesson-card{padding:26px 25px 19px;display:flex;flex-direction:column}.chapter{display:inline-block;color:#ae7845;border:1px solid #ead7b5;background:#fff9ed;padding:5px 9px;border-radius:7px;font-size:12px}.english{font-size:19px;font-weight:650;line-height:1.75;margin:18px 0 10px}.chinese{font-size:14px;line-height:1.8;color:#708891;margin:9px 0 16px}.word{display:inline;font:inherit;color:#a96936;background:#fff6e8;border:0;border-bottom:2px solid #e2ad72;border-radius:3px;padding:0 2px;line-height:inherit}.word:hover{background:#ffe9cc}.word[data-audio-state=playing]{background:#e2f2e7;color:#2d7964}.word[data-audio-state=loading]{border-bottom-style:dotted}.word[data-audio-state=error]{border-bottom-color:#bb5e43}.tip{padding:11px 13px;background:#f0f6f7;border-left:3px solid #75a8ae;border-radius:3px 9px 9px 3px;font-size:13px;line-height:1.8;color:#507480}.audio-controls{display:flex;gap:8px;margin:17px 0 12px}.audio-controls button{font-size:12px;padding:10px}.audio-controls #repeat{flex:1;background:#eef5f6}.audio-controls [aria-pressed=true]{background:var(--ink);color:#fff}.playhead{display:flex;align-items:center;gap:8px;font-size:10px;color:#729099;margin-top:16px}.playhead progress{height:6px;accent-color:var(--orange);width:100%;min-width:25px}.playhead small{white-space:nowrap}.feedback{font-size:13px;line-height:1.8;min-height:25px;color:#6d8994;margin:8px 0}.feedback.good{padding:10px 12px;border-radius:8px;color:#2c806c;background:#edf7ef}.feedback.wrong{padding:10px 12px;border-radius:8px;color:#a57648;background:#fff5e5}#audio-status{font-size:11px;color:#7a9297;line-height:1.65;margin:0 0 8px}#actions{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:9px}.primary{background:var(--orange);color:#fff;border-color:var(--orange)}.primary:hover{background:#c97241}.secondary{display:flex;gap:7px}.secondary button{flex:1;font-size:12px;padding:9px 7px}.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:15px 0}.choice{padding:12px 8px;font-size:13px}.choice svg{width:65px;height:65px;display:block;margin:0 auto 7px}.choice.selected{border-color:#d49c58;background:#fff5df}.choice.correct{border-color:#77b196;background:#eaf7ee}.listen-header{display:flex;justify-content:space-between;align-items:center;gap:10px}.listen-icon{display:grid;place-items:center;width:59px;height:59px;border-radius:20px;background:#efb26a;color:white;font-size:29px}.hint-button{font-size:11px;border:0;padding:5px 0;text-align:left;background:none;color:#758c94}.hint{font-size:13px;line-height:1.75;border-radius:8px;background:#f1f5f6;padding:11px}.spelling-input{width:100%;font-size:22px;padding:13px;border:2px solid #d7e5e7;border-radius:11px;margin-top:14px;color:var(--ink);background:#fcfdfc}.spelling-input:disabled{background:#eef7ef}.task-progress{width:100%;height:6px;accent-color:#74ae96;margin:12px 0}.sequence{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:#f0f5f4;border-radius:9px;min-height:42px;font-size:12px;color:#557b81}.sequence span{background:#fff;border:1px solid #d4e5e4;border-radius:7px;padding:5px 8px}.sort-row{display:grid;grid-template-columns:minmax(55px,72px) repeat(var(--bins,2),minmax(0,1fr));align-items:center;gap:7px;margin-top:10px}.sort-row svg{width:50px;height:50px}.sort-row button{font-size:11px;padding:8px 4px}.sort-row .selected{background:#e5f3ef;border-color:#79a99d}.shop-row{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:8px;margin-top:11px;padding:9px;border:1px solid #dce8e8;border-radius:10px}.shop-row svg{width:47px;height:47px}.shop-row .row-controls{display:flex;align-items:center;gap:6px;margin-top:6px;flex-wrap:wrap}.shop-row button{font-size:11px;padding:5px 8px}.shop-row output{font-size:14px;min-width:15px;text-align:center}.shop-row small{font-size:11px;color:#6b838b}.privacy-note{font-size:10px;text-align:center;color:#9aadb2;margin:15px 0 0}.review-panel{padding:25px;background:#f8fbfa}.review-header{display:flex;justify-content:space-between;gap:20px;align-items:start}.review-header h2{margin-top:0;font-size:23px}.review-header p{font-size:13px;color:#7a8f95;line-height:1.7}.review-tools{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.review-tools button{font-size:11px;white-space:nowrap}.review-tools [aria-pressed=true]{background:#315b68;color:white}.review-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}.review-group{border:1px solid #d9e6e7;border-radius:16px;background:white;padding:19px}.review-group h3{font-size:18px;margin:0 0 15px}.review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.review-word{text-align:left;min-width:0;height:98px;padding:10px;border-color:#dde7e8}.review-word-top{display:flex;justify-content:space-between;align-items:center;gap:6px;min-height:31px}.review-word-top strong{overflow-wrap:anywhere;font-size:14px}.meaning{font-size:11px;line-height:1.6;color:#769298;display:block;margin-top:7px;min-height:30px}.mask{letter-spacing:3px;color:#8c9ca1;font-size:13px}.review-example{padding:12px;margin-top:14px;border-radius:9px;background:#eef5f1;font-size:13px;line-height:1.8;color:#496c6e}.review-example p{margin:0}.review-example small{font-size:11px;color:#7c969b}.word-audio-icon{display:inline-grid;place-items:center;width:20px;height:20px;flex:0 0 20px;font-size:15px;color:#729296}.word-audio-icon[data-state=playing]{animation:pulse .7s ease-in-out infinite alternate;color:#2f8970}.word-audio-icon[data-state=loading]{animation:spin 1s linear infinite;color:#b48a44}.word-audio-icon[data-state=error]{color:#bd704d}@keyframes pulse{to{transform:rotate(9deg) scale(1.15)}}@keyframes spin{to{transform:rotate(360deg)}}dialog{border:0;max-width:475px;width:calc(100% - 30px);padding:31px;border-radius:23px;color:var(--ink);box-shadow:0 22px 70px #163f5055}dialog::backdrop{background:#163f5066;backdrop-filter:blur(4px)}dialog p{font-size:15px;line-height:1.8;color:#6e8c94}dialog button{width:100%;margin-top:10px}dialog .eyebrow{font-size:11px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#boot-status{padding:18px;color:#856844;background:#fff5d7}#boot-retry{margin-left:12px}.progress-copy{font-size:11px;color:#759097}
@media(max-width:1120px){header{padding-inline:18px}.brand strong{font-size:17px}.brand small{font-size:10px}.mode-tabs button{font-size:12px;padding:11px 9px}main{padding:20px 18px}.workspace{grid-template-columns:minmax(0,1fr) 330px;gap:14px}.lesson-card{padding:22px 19px}.review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:950px){header{height:auto;min-height:82px;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:15px}.brand{grid-column:1;grid-row:1}.tools{grid-column:2;grid-row:1}.mode-tabs{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}.mode-tabs button{padding:10px 4px;font-size:12px}}
@media(max-width:820px){.journey{grid-template-columns:1fr;gap:12px;min-height:0}.journey>div:first-child{min-height:52px}.progress-wrap{text-align:left}.workspace{display:flex;flex-direction:column}.lesson-card{min-height:410px}.review-header{display:block}.review-tools{justify-content:flex-start}.review-groups{grid-template-columns:1fr}.review-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#scene{min-height:280px}h1{font-size:23px}}
@media(max-width:500px){main{padding:17px 10px}.brand strong{font-size:15px}.brand-icon{flex-basis:36px;height:36px}.brand small{max-width:150px;font-size:10px}.mode-tabs button{font-size:11px}.tools button{font-size:11px;padding:8px}.scene-head{padding:15px}.scene-head span{font-size:10px}.scene-caption{padding:12px 15px}h1{font-size:20px}.review-panel{padding:16px}.review-group{padding:15px 12px}.review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.review-header h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.word-audio-icon{animation:none!important}.word-audio-icon[data-state=playing]{border-bottom:2px solid #2f8970}}

.sort-item{display:flex;flex-direction:column;align-items:center;gap:4px}.sort-item small{font-size:11px;line-height:1.5;text-align:center;color:#68858a}

/* Ordinary expandable reference content is present in initial HTML. */
.course-about{margin:22px 0 14px;border:1px solid #d7e3e8;border-radius:12px;background:#f8fbfc;color:#496c7b;font-size:13px;line-height:1.8}.course-about>summary{padding:12px 16px;cursor:pointer;font-weight:650}.course-about>summary:focus-visible{outline:3px solid #dca249;outline-offset:3px;border-radius:10px}.course-about-body{padding:0 20px 18px;max-width:1120px}.course-about h2{font-size:20px}.course-about h3{font-size:16px;margin-top:20px}.course-about ol,.course-about ul{padding-left:23px}.course-vocabulary{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:8px 20px}.course-vocabulary>div{border-bottom:1px solid #e2eaee;padding:6px 0}.course-vocabulary dt{font-weight:700;color:#234b5f}.course-vocabulary dd{margin:0;color:#617e8b}@media(max-width:500px){.course-about-body{padding:0 14px 14px}.course-vocabulary{grid-template-columns:repeat(2,minmax(0,1fr));font-size:12px;gap:6px 12px}}

.storage-warning{margin:0 0 14px;padding:11px 14px;border:1px solid #dfc792;border-radius:10px;background:#fff5dc;color:#755722;font-size:13px;line-height:1.7}

.brand{color:inherit;text-decoration:none}.course-links{max-width:1580px;margin:0 auto;padding:0 30px 22px;text-align:right;font-size:12px;line-height:1.6}.course-links a{color:#355f72;text-decoration:none}.course-links a:hover{text-decoration:underline}@media(max-width:760px){.course-links{padding:0 15px 20px}}

@media(max-width:500px){.review-panel{padding:10px}.review-header{gap:10px}.review-header h2{font-size:19px;margin-bottom:6px}.review-header p{font-size:12px;line-height:1.55;margin:0}.review-tools{gap:6px;margin-top:10px}.review-tools button{min-height:44px;padding:8px 9px}.review-groups{gap:12px;margin-top:14px}.review-group{padding:11px 9px}.review-group h3{font-size:17px;margin-bottom:10px}.review-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.review-word{height:86px;min-height:86px;padding:6px 8px}.review-word-top{min-height:40px;gap:4px}.review-word-top strong{font-size:14px;line-height:20px;overflow-wrap:anywhere}.meaning{min-height:28px;margin-top:2px;font-size:11px;line-height:14px}.meaning.mask{font-size:13px;line-height:14px;min-height:28px}.review-example{margin-top:9px;padding:9px 10px;font-size:13px;line-height:1.6}}

.story-translation{display:contents}.story-translation>summary{display:none}
@media(max-width:600px){
 .workspace{gap:12px}.lesson-card{padding:14px;min-height:0}.scene-head{padding:11px 14px;gap:8px}.scene-head strong{font-size:12px}.scene-head span{font-size:10px}#scene{min-height:0}#scene svg{max-height:240px}.scene-caption{padding:9px 13px;min-height:0;font-size:11px}
 body[data-mode=story] #scene{height:190px}body[data-mode=story] #scene svg{height:190px;object-fit:contain}body[data-mode=story] .scene-caption{display:none}
 body[data-mode=story] .lesson-card #lesson{order:0}body[data-mode=story] #actions{order:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:0;padding-top:9px}body[data-mode=story] #actions>.secondary{grid-column:1/-1}body[data-mode=story] .lesson-card>.audio-controls{order:2}body[data-mode=story] #resume-audio{order:3}body[data-mode=story] #audio-status{order:4}body[data-mode=story] #feedback{order:5}body[data-mode=story] .privacy-note{order:6}
 .lesson-card h2{font-size:20px;margin:9px 0}.english{font-size:18px;line-height:1.55;margin:10px 0}.chapter{font-size:11px}.playhead{margin-top:8px}.audio-controls{margin:8px 0;gap:7px}.audio-controls button,#actions>button{min-height:44px}.feedback{margin:6px 0;min-height:0}.privacy-note{margin-top:10px}
 .story-translation{display:block;margin:5px 0}.story-translation>summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:#5f808b;font-size:12px;font-weight:600}.story-translation>summary::before{content:'▸';margin-right:6px}.story-translation[open]>summary::before{content:'▾'}.story-translation .chinese{margin-top:0;font-size:13px;line-height:1.65}
 body[data-mode=listen] .lesson-card,body[data-mode=spell] .lesson-card{order:-1}body[data-mode=listen] .scene-card,body[data-mode=spell] .scene-card{order:0}.spelling-input{font-size:21px;scroll-margin-block:18px}.choices{margin:10px 0}.review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.review-group{scroll-margin-top:12px}
}
@media(max-width:600px){.choices button,.sort-row button,.shop-row button,#check-spelling,.hint-button,.secondary button,#resume-audio{min-height:44px}}

@media(max-width:600px){body[data-mode=story] .scene-head{display:none}body[data-mode=story] #scene,body[data-mode=story] #scene svg{height:150px}body[data-mode=story] .lesson-card #lesson{display:contents}body[data-mode=story] #lesson>.chapter{align-self:flex-start}body[data-mode=story] #lesson>h2{margin:8px 0 0}body[data-mode=story] #lesson>.english{margin:6px 0 8px}body[data-mode=story] #lesson>.story-translation{order:3}body[data-mode=story] #lesson>.playhead{order:4}}

/* Vocabulary-first navigation: stable slots at every breakpoint. */
header nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}header nav button{white-space:nowrap;min-width:0;min-height:44px}
body[data-mode="review"] .workspace{display:none!important}
@media(max-width:600px){header nav{width:100%;overflow:visible}header nav button{font-size:13px;padding:10px 3px}.journey,.journey-bar{gap:8px}#mission-title{font-size:22px}#mode-label{font-size:12px}.review-header h2{font-size:17px}}

/* Entire English example is one native keyboard/touch button; no nested word controls. */
.sentence-audio{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:8px 0;border:0;border-radius:8px;background:transparent;text-align:left;font-weight:400;line-height:1.65;color:inherit;touch-action:manipulation}.sentence-audio:hover{background:#dfedeb}.sentence-audio .sentence-text{min-width:0;overflow-wrap:anywhere}.sentence-audio .sentence-audio-icon{flex:0 0 28px;align-self:center;text-align:center}.sentence-audio:focus-visible{outline:3px solid #dca249;outline-offset:3px}.sentence-audio[data-audio-state=playing]{color:#237461}.sentence-audio[data-audio-state=error]{color:#9b4e35}.sentence-error{display:block;color:#9b4e35;font-size:13px;line-height:1.6;margin-top:4px}.sentence-error[hidden]{display:none!important}@media(prefers-reduced-motion:reduce){.sentence-audio-icon{animation:none!important}}
.course-attribution{margin:18px 0 8px;text-align:center;color:#789097;font-size:11px;line-height:1.7}.course-attribution a{color:inherit}

.alignment-panel{margin:16px 0;padding:18px;border:1px solid #d4e4e6;border-radius:14px;background:#f6faf9}.alignment-panel p{line-height:1.7}.alignment-panel details{margin:12px 0}.alignment-panel summary{cursor:pointer;font-weight:650}.goal-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin-top:12px}.goal-list button{padding:12px;text-align:left;border:1px solid #c8dadd;border-radius:9px;background:white;color:#315b67}.word-scope{font-size:10px;color:#63818b;line-height:1.4}.sort-row{overflow-x:auto}.sort-item small{overflow-wrap:anywhere}.sort-row button{min-height:44px;min-width:65px}.top-progress{flex-wrap:wrap}@media(max-width:600px){.goal-list{grid-template-columns:1fr}.alignment-panel{padding:12px}}

.production-practice{margin-top:15px;padding:14px;border:1px dashed #95b2b8;border-radius:10px}.production-practice label{display:block;line-height:1.8;margin:8px 0}.production-practice input{width:18px;height:18px;vertical-align:middle}.production-practice small{display:block;margin-top:10px}
#top-progress{flex-wrap:wrap;gap:3px}#top-progress i{flex:0 0 6px;width:6px}.sort-row{display:flex;flex-wrap:wrap;overflow:visible;padding:8px 0;border-bottom:1px solid #e1e9ea}.sort-row .sort-item{width:100%;display:flex;align-items:center;gap:9px}.sort-row button{flex:1 1 28%;min-width:75px;overflow-wrap:anywhere}.sort-row .sort-item small{font-size:13px}
