/* Shared scene tokens respond to the app's existing day/night theme. */
html[data-design="2026"] body{isolation:isolate;background:var(--bg)}
.appWorld{display:none}
html[data-design="2026"] .appWorld{display:block;position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 100% 15%,color-mix(in srgb,var(--scene-roof) 16%,transparent),transparent 65%),var(--bg)}
.appWorld .worldRiver{position:absolute;inset:0;width:100%;height:100%;opacity:.3}
.appWorld .mapDetail{position:absolute;display:block;opacity:.35}
.appWorld .mapDetail svg{width:100%;height:auto;display:block}
.appWorld .mapPalmOne{width:100px;left:-25px;top:22%;transform:rotate(-8deg)}
.appWorld .mapPalmTwo{width:115px;right:-36px;bottom:7%;transform:scaleX(-1)}
.appWorld .mapLanterns{width:92px;right:-8px;top:-12px;opacity:.24}
.appWorld .mapLotus{width:90px;left:-23px;bottom:15%;opacity:.3}
.appWorld .mapBoat{width:110px;right:-25px;top:67%;transform:rotate(-8deg)}
.appWorld .mapCloud{width:90px;left:13%;top:42%;opacity:.1}
html[data-design="2026"] body .workspace,html[data-design="2026"] .pathHome .workspace{background:transparent}
html[data-design="2026"] body .workspace>header{background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(18px);border-color:color-mix(in srgb,var(--border) 45%,transparent)}
html[data-design="2026"] .pathSectionBanner:before{background:transparent}
html[data-design="2026"] #sidebar{background:color-mix(in srgb,var(--surface) 80%,transparent);backdrop-filter:blur(20px);border-color:color-mix(in srgb,var(--border) 65%,transparent)}
html[data-design="2026"] :is(.card,.hubRailCard,.badgeSection,.socialPanel,.profileHero){background:color-mix(in srgb,var(--surface) 92%,transparent)}
html[data-design="2026"] #modal{background:radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--scene-water) 12%,transparent),transparent 70%),var(--surface)}
html[data-design="2026"][data-theme="light"] .appWorld .worldRiver{opacity:.32}
@media(min-width:761px){.appWorld .worldRiver{width:75%;left:25%}.appWorld .mapPalmOne{width:160px;left:21%}.appWorld .mapPalmTwo{width:180px;right:-30px}.appWorld .mapLotus{left:28%;width:110px}.appWorld .mapLanterns{width:130px;right:4%}}
/* Every primary tab shares the same compact mobile app bar. */
@media(max-width:760px){
 html[data-design="2026"] body .workspace>header{position:fixed;inset:0 0 auto;width:100%;height:auto;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:calc(8px + env(safe-area-inset-top)) 20px 7px!important;z-index:30}
 html[data-design="2026"] body .workspace>header>.breadcrumb{display:none!important}
 html[data-design="2026"] body .workspace>header>.stats{display:flex;width:100%;min-height:54px!important;align-items:center;justify-content:space-between;gap:8px!important}
 html[data-design="2026"] body .stats :is(.avatar,#themeToggle,.mobileSettings,.mobilePreviewButton),html[data-design="2026"] body .stats>[title="Experiência"]{display:none!important}
 html[data-design="2026"] body .stats .compactLanguage{margin:0!important;order:-1;max-width:none}
 html[data-design="2026"] body .stats .languageSwitch{min-width:55px;gap:8px;padding:7px 10px!important}
 html[data-design="2026"] body .stats .languageSwitch strong{display:none}
 html[data-design="2026"] body .stats [role="button"]:has(#streak){display:inline-flex!important;min-height:44px;font-size:17px;gap:8px;padding:7px 12px!important}
 html[data-design="2026"] body .stats [role="button"]:has(#streak) em{display:none}
 html[data-design="2026"] body .stats .wallet{font-size:17px;min-height:44px;gap:8px;padding:7px 12px!important}
 html[data-design="2026"] body .stats .pathMissionButton{width:44px;height:44px;flex:none}
 html[data-design="2026"] body #main{padding-top:calc(var(--path-dock-height,62px) + 20px)!important;padding-bottom:125px!important}
 html[data-design="2026"] body.pathHome #main{padding-top:calc(var(--path-dock-height,167px) + 7px)!important}
 html[data-design="2026"] body .workspace>footer{padding-bottom:110px}
 html[data-design="2026"] .appWorld{inset:0}
 html:has(body) {scrollbar-width:none}
 html::-webkit-scrollbar{display:none}
}
@media(max-width:360px){html[data-design="2026"] body .workspace>header{padding-left:16px!important;padding-right:16px!important}}

/* The section belongs to the map; only the compact utility bar stays fixed. */
html[data-design="2026"] .pathHome .cleanJourney>.pathSectionBanner{position:relative;top:auto;z-index:2;margin:0 0 16px;isolation:auto}
html[data-design="2026"] body .workspace>header{background:color-mix(in srgb,var(--bg) 72%,transparent)}
html[data-design="2026"] .pathGuide{margin:10px;border-radius:16px;min-width:44px;background:color-mix(in srgb,#fff 15%,transparent)}
html[data-design="2026"] .pathSectionBanner{grid-template-columns:minmax(0,1fr) 70px}
html[data-design="2026"] :is(.pathSectionSelect,.pathGuide,.pathMissionButton,.languageSwitch,.wallet):active{transform:scale(.97);filter:brightness(1.08)}
@media(max-width:760px){
 html[data-design="2026"] body.pathHome #main{padding-top:calc(var(--path-dock-height,69px) + 12px)!important}
 html[data-design="2026"] .pathHome .cleanJourney>.pathSectionBanner{min-height:92px;border-radius:20px}
 html[data-design="2026"] .pathSectionSelect{padding:16px 18px}
 html[data-design="2026"] .pathSectionSelect h1{font-size:22px}
}
/* Transparent app-bar surround, opaque indicator interiors. */
html[data-design="2026"] body .workspace>header{background:color-mix(in srgb,var(--bg) 12%,transparent);backdrop-filter:blur(5px);border-color:transparent}
html[data-design="2026"] body .workspace>header .livingTopBar :is(.languageSwitch,#wallet,[role="button"]:has(#streak),.pathMissionButton){background:var(--surface2)!important;opacity:1}
/* Motion follows scroll direction, without an entrance animation. */
html[data-design="2026"] .cleanJourney>.pathSectionBanner{transform-origin:50% 0;transform:translateY(var(--section-scroll-y,0px)) rotate(var(--section-scroll-angle,0deg))}
@media(prefers-reduced-motion:reduce){html[data-design="2026"] .cleanJourney>.pathSectionBanner{transform:none}}
/* Destination and section actions need readable surfaces over the scenery. */
html[data-design="2026"] .cleanJourney>.travelArrival{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:18px 16px;margin:22px 0 12px;box-shadow:0 5px 18px #062c3315;min-height:108px}
html[data-design="2026"] .travelArrival .arrivalCopy strong{color:var(--text);font-size:20px}
html[data-design="2026"] .travelArrival .arrivalCopy>span{color:var(--sub);font-size:12px;line-height:1.5}
html[data-design="2026"] .travelArrival .arrivalCopy small{color:var(--accent);font-size:10px;letter-spacing:1px}
html[data-design="2026"] .travelArrival .arrivalSeal{background:var(--surface2);color:var(--green);width:36px;height:36px}
html[data-design="2026"] .cleanJourney>.pathEnd{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:16px;gap:12px;justify-content:space-between;flex-wrap:wrap}
html[data-design="2026"] .pathEnd>span{color:var(--sub);font-size:12px}
html[data-design="2026"] .pathEnd .secondary{background:var(--surface2);color:var(--text);min-height:48px;flex:1;justify-content:center;white-space:normal;text-align:center}
/* Floating indicators: no full-width header panel in any app tab. */
html[data-design="2026"] body .workspace>header{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border:0!important;box-shadow:none!important}
/* Invite the next action with a small hop; keep locked exercises still. */
@media(prefers-reduced-motion:no-preference){
 html[data-design="2026"] .isCurrent>.trailNode{animation:currentExerciseHop 1.9s ease-in-out infinite;will-change:transform}
 html[data-design="2026"] .isCurrent>.trailNode:is(:hover,:focus-visible){animation-play-state:paused}
 html[data-design="2026"] .isCurrent>.trailNode:active{animation:none;transform:translateY(2px)}
 .changAdventure:not(.chang-celebrate) .changCharacter{animation:changHappySway 3.2s ease-in-out infinite}
 .changAdventure:not(.chang-celebrate) .changGround{animation:changHappyShadow 3.2s ease-in-out infinite}
 .chang-wave .changHead{animation:changFriendlyNod 3.2s ease-in-out infinite}
 .chang-wave .changWaveArm{animation:changHello 2.8s ease-in-out infinite}
 .chang-wave .changTrunk{animation:changTrunkWave 3.2s ease-in-out infinite}
 .changAdventure .changEarLeft{animation-duration:3.8s}
 .changAdventure .changEarRight{animation-duration:3.8s}
}
@keyframes currentExerciseHop{0%,42%,100%{transform:translateY(0)}16%{transform:translateY(-10px)}28%{transform:translateY(0)}35%{transform:translateY(-4px)}}
@keyframes changHappySway{0%,100%{transform:translateY(0) rotate(-2deg)}35%{transform:translateY(-6px) rotate(2.5deg)}65%{transform:translateY(-2px) rotate(-1deg)}}
@keyframes changHappyShadow{0%,100%{transform:scaleX(1);opacity:.16}35%{transform:scaleX(.86);opacity:.1}65%{transform:scaleX(.94);opacity:.13}}
@keyframes changFriendlyNod{0%,100%{transform:rotate(-3deg)}40%{transform:rotate(4deg)}70%{transform:rotate(-1deg)}}
/* Chang is a real button, with a stable hit area and a Thai speech bubble. */
.pathHome button.trailChang{pointer-events:auto;border:0;padding:0;background:transparent;cursor:pointer;z-index:4;touch-action:manipulation;color:var(--text);overflow:visible}
button.trailChang .changAdventure{transform-origin:50% 88%}
button.trailChang:focus-visible{outline:3px solid var(--green);outline-offset:4px;border-radius:24px}
.changSpeech{position:absolute;bottom:calc(100% - 12px);right:0;width:max-content;max-width:210px;min-width:120px;padding:14px 16px;border-radius:18px 18px 5px 18px;background:var(--surface);border:1px solid var(--green);box-shadow:0 8px 24px #061f3440;color:var(--text);text-align:center;pointer-events:none;line-height:1.4}
.changSpeech>.thai{display:block;font-size:22px;line-height:1.5;overflow-wrap:anywhere}
.changSpeech>small{display:block;font-size:12px;color:var(--sub);margin-top:5px;max-width:175px;white-space:normal}
/* The hit target stays still while the illustration reacts. */
.pathHome button.trailChang{aspect-ratio:280/260}
button.trailChang .changAdventure{pointer-events:none}
.trailStop>.changSpeech{bottom:calc(50% + 60px);right:-4px;width:192px;min-width:0;max-width:calc(100vw - 56px);padding:14px 16px 16px;border-radius:22px 22px 6px 22px;background:#e5f6ec;color:#17473f;border:1px solid #f3fff8;box-shadow:0 7px 0 #568f7c30,0 12px 28px #021b3240;text-align:left;z-index:6;pointer-events:none;line-height:1.35}
.changSpeech:after{content:'';position:absolute;right:22px;bottom:-8px;width:14px;height:14px;background:#e5f6ec;transform:rotate(45deg);border-radius:0 0 4px 0}
.changSpeechHead{display:flex;align-items:center;justify-content:space-between;color:#477c6e;font-size:11px;font-weight:750;margin-bottom:9px}
.changSpeechHead .uiIcon{width:16px;height:16px}
.changSpeechThai{display:block;font-family:'Noto Sans Thai',sans-serif;font-size:24px;font-weight:650;line-height:1.6;overflow-wrap:anywhere}
.changSpeechReading{display:block;color:#547c70;font-size:11px;margin-top:2px;line-height:1.5}
.changSpeechTranslation{display:block;border-top:1px solid #bad7c9;padding-top:9px;margin-top:9px;color:#234f44;font-size:13px;font-weight:650;line-height:1.5}
.changSpeechTrumpet .changSpeechThai{font-family:Outfit,sans-serif;font-size:28px;letter-spacing:.4px}
@media(prefers-reduced-motion:no-preference){.changSpeech{animation:changSpeechIn .2s ease-out}}
@keyframes changSpeechIn{from{opacity:0;transform:translateY(5px) scale(.96)}to{opacity:1;transform:none}}

/* Compact, brief feedback for a tap on Chang. */
.trailStop>.changSpeech{width:158px;padding:10px 12px 12px;border-radius:17px 17px 5px 17px}
.changSpeechHead{font-size:10px;margin-bottom:4px}
.changSpeechHead .uiIcon{width:13px;height:13px}
.changSpeechThai{font-size:20px;line-height:1.4}
.changSpeechReading{font-size:10px;margin-top:1px;line-height:1.4}
.changSpeechTranslation{padding-top:6px;margin-top:6px;font-size:11px;line-height:1.35}
.changSpeechTrumpet .changSpeechThai{font-size:23px}
/* Quiet dismiss controls, with the same comfortable touch targets. */
html[data-design="2026"] :is(.close,.peekClose){color:color-mix(in srgb,var(--sub) 50%,transparent);background:transparent;box-shadow:none;border:0}
html[data-design="2026"] .pathPopover .peekClose{color:color-mix(in srgb,var(--sub) 50%,transparent);width:44px;height:44px}
html[data-design="2026"] :is(.close,.peekClose):is(:hover,:focus-visible){color:var(--text);background:color-mix(in srgb,var(--surface2) 60%,transparent)}
/* A single phrase takes priority; optional explanations stay folded away. */
html[data-design="2026"] .focusLesson:has(.focusStudy) .focusHead{padding-bottom:14px;margin-bottom:0}
html[data-design="2026"] .focusStudy{padding:8px 0 18px;scrollbar-width:none}
html[data-design="2026"] .focusStudy::-webkit-scrollbar{display:none}
html[data-design="2026"] .focusStudy .lessonScene{display:block;margin:8px 0 0;padding:0;background:transparent;border:0;min-height:0;text-align:center}
html[data-design="2026"] .focusStudy .lessonScene>span,html[data-design="2026"] .focusStudy .lessonScene small,html[data-design="2026"] .focusStudy .lessonScene>button{display:none}
html[data-design="2026"] .focusStudy .lessonScene strong{font-size:14px;font-weight:500;color:var(--sub)}
html[data-design="2026"] .focusStudy .focusPhrase{background:transparent;border:0;border-radius:0;box-shadow:none;margin:18px 0 4px;padding:28px 8px 14px;text-align:center}
html[data-design="2026"] .focusStudy .focusPhrase>.thai{font-size:clamp(36px,11vw,52px);line-height:1.6;margin:0 0 14px}
html[data-design="2026"] .focusStudy .reading{background:transparent;border:0;padding:0;margin:0;font-size:20px;line-height:1.6;color:#cbb6da}
html[data-design="2026"][data-theme="light"] .focusStudy .reading{color:#86628d}
html[data-design="2026"] .focusStudy .reading>span{display:none}
html[data-design="2026"] .focusStudy .translation{font-size:21px;line-height:1.5;margin:16px 0 24px;font-weight:600}
html[data-design="2026"] .focusStudy .audioControls{gap:10px;justify-content:center;margin:0}
html[data-design="2026"] .focusStudy .audioBtn{border:1px solid var(--border);box-shadow:none;background:var(--surface2);min-height:48px;padding:11px 18px;border-radius:16px;font-size:12px}
html[data-design="2026"] .focusStudy .audioBtn.slow{background:transparent;color:var(--sub)}
html[data-design="2026"] .lessonHelp{border:0;border-top:1px solid color-mix(in srgb,var(--border) 60%,transparent);margin:22px 4px 0;padding:8px 0;color:var(--sub)}
html[data-design="2026"] .lessonHelp>summary{font-size:12px;font-weight:500;padding:12px 0;cursor:pointer;text-align:center;list-style:none}
html[data-design="2026"] .lessonHelp>summary:after{content:' +';color:var(--green)}
html[data-design="2026"] .lessonHelp[open]>summary:after{content:' −'}
html[data-design="2026"] .lessonHelp p{font-size:12px;line-height:1.7}
html[data-design="2026"] .lessonHelp :is(.readingHelp,.pronunciationHelp){border:0;box-shadow:none;background:transparent;border-radius:0;font-size:12px;text-align:left;padding:10px 0;min-height:44px}
html[data-design="2026"] .focusLesson:has(.focusStudy)>.modalfoot{border:0}
html[data-design="2026"] .focusLesson:has(.focusStudy)>.modalfoot>small{display:none}
/* A lighter lesson header: dismiss, phrase count and a thin progress line. */
html[data-design="2026"] .focusLesson .focusHead{grid-template-columns:36px minmax(0,1fr);gap:14px;padding:8px 0 16px}
html[data-design="2026"] .focusHead .sessionTheme{display:none}
html[data-design="2026"] .focusHead .focusProgressLabel{font-size:11px;letter-spacing:0;text-transform:none;align-items:center;margin-bottom:8px}
html[data-design="2026"] .focusHead .focusProgressLabel>span{font-size:11px;letter-spacing:0;font-weight:500;text-transform:none;color:var(--sub)}
html[data-design="2026"] .focusHead .focusProgressLabel>small{font-size:11px;font-weight:500;color:var(--sub)}
html[data-design="2026"] .focusHead .bar{height:4px;background:color-mix(in srgb,var(--border) 55%,transparent)}
html[data-design="2026"] .focusHead .close{background:transparent;width:36px;height:36px;min-width:36px;min-height:36px}
html[data-design="2026"] .focusLesson>.modalfoot>.listeningGateStatus{display:block!important;font-size:11px;color:var(--sub);text-align:center;margin-bottom:8px}
/* Compact exercise choices; scrolling stays available without a visible track. */
#modal,#modalBody,#modal .modalinner,#modal .exerciseArea,#modal .options{scrollbar-width:none;-ms-overflow-style:none}
#modal::-webkit-scrollbar,#modalBody::-webkit-scrollbar,#modal .modalinner::-webkit-scrollbar,#modal .exerciseArea::-webkit-scrollbar,#modal .options::-webkit-scrollbar{display:none;width:0;height:0}
html[data-design="2026"] .focusLesson .options{gap:10px;margin:20px 0 12px}
html[data-design="2026"] .focusLesson .choiceRow{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:8px;align-items:center}
html[data-design="2026"] .focusLesson .option{min-height:78px;border:1px solid var(--border);box-shadow:none;border-radius:17px;padding:12px;gap:10px;background:var(--surface)}
html[data-design="2026"] .focusLesson .choiceNumber{width:22px;height:26px;font-size:10px;border-radius:7px;flex:none;background:color-mix(in srgb,var(--bg) 45%,transparent);color:var(--muted)}
html[data-design="2026"] .focusLesson .choiceContent{min-width:0}
html[data-design="2026"] .focusLesson .choiceContent>.thai{font-size:23px;line-height:1.5;overflow-wrap:anywhere}
html[data-design="2026"] .focusLesson .choiceContent .reading{background:transparent;border:0;padding:0;margin:3px 0 0;font-size:13px;line-height:1.5}
html[data-design="2026"] .focusLesson .choiceContent .reading>span{display:none}
html[data-design="2026"] .focusLesson .choiceAudio{width:40px;height:44px;min-width:40px;min-height:44px;border:1px solid var(--border);border-radius:13px;box-shadow:none;padding:9px;background:transparent}
html[data-design="2026"] .focusLesson .choiceAudio .uiIcon{width:20px;height:20px}
html[data-design="2026"] .focusLesson .exerciseArea>h2{font-size:24px;line-height:1.35}
@media(max-width:360px){html[data-design="2026"] .focusLesson .choiceContent>.thai{font-size:21px}}
/* Thai streets sit quietly behind the learning interface. */
.thaiStreetCorner{position:absolute;left:-22px;bottom:9%;width:240px;opacity:.22;pointer-events:none}
.thaiStreetCorner svg{display:block;width:100%;height:auto}
html[data-design="2026"][data-theme="light"] .thaiStreetCorner{opacity:.3}
html[data-design="2026"] .pathHome .trailChang.changOnLeft{left:-6px!important;right:auto!important}
.trailStop:has(.changOnLeft)>.changSpeech{left:-4px;right:auto;border-radius:22px 22px 22px 6px}
.trailStop:has(.changOnLeft)>.changSpeech:after{left:22px;right:auto}
@media(min-width:761px){.thaiStreetCorner{width:320px;left:24%;bottom:5%}}
/* Match the modal's existing ID scope so these layout rules take precedence. */
html[data-design="2026"] #modal.lessonMode .focusHead{grid-template-columns:36px minmax(0,1fr);gap:14px;margin:0 auto 8px;padding:8px 0 16px}
html[data-design="2026"] #modal.lessonMode .focusHead .sessionTheme{display:none}
html[data-design="2026"] #modal.lessonMode .focusHead .bar{height:4px}
html[data-design="2026"] #modal.lessonMode .focusHead .close{width:36px;height:36px;min-width:36px;min-height:36px;background:transparent}
html[data-design="2026"] #modal .focusLesson .option{min-height:78px;padding:12px;box-shadow:none}
html[data-design="2026"] #modal .choiceRow{align-items:center;grid-template-columns:minmax(0,1fr) 40px}
html[data-design="2026"] #modal .choiceAudio{width:40px;min-width:40px;min-height:44px;flex-basis:40px;padding:9px}
html[data-design="2026"] #modal .choiceContent>.reading{font-size:13px}
/* Web content owns the iPhone safe areas; no separate native top strip. */
html[data-design="2026"] #modal.lessonMode .focusLesson{padding-top:calc(12px + env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom)}
@media(prefers-reduced-motion:no-preference){.changSpeech[data-speech="started"] .changSpeechHead>.uiIcon{animation:changVoicePulse .6s ease-in-out infinite alternate}}
@keyframes changVoicePulse{from{opacity:.45;transform:scale(.9)}to{opacity:1;transform:scale(1.1)}}
/* Give traveling Chang a separate landing space, clear of exercise hit targets. */
html[data-design="2026"] .pathHome .trailStop.changHasTravelStop{padding-bottom:145px}
html[data-design="2026"] .pathHome .changHasTravelStop>.trailChang{top:110px!important}
.changHasTravelStop>.changSpeech{bottom:auto;top:8px}
/* Answer feedback: a calm correction and a small, bright reward. */
html[data-design="2026"] #modal.lessonMode .modalfoot.focusFeedback{--result-accent:#50dfba;--result-wash:#153f3b;display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:16px 16px max(16px,env(safe-area-inset-bottom));border:1px solid color-mix(in srgb,var(--result-accent) 24%,transparent);border-radius:22px;background:var(--result-wash);box-shadow:none;margin-bottom:6px;max-height:55%}
html[data-design="2026"] #modal.lessonMode .modalfoot.focusFeedback[data-result="error"]{--result-accent:#ffb39f;--result-wash:#3b3031}
html[data-design="2026"][data-theme="light"] #modal.lessonMode .modalfoot.focusFeedback{--result-accent:#10654e;--result-wash:#e4f6ed}
html[data-design="2026"][data-theme="light"] #modal.lessonMode .modalfoot.focusFeedback[data-result="error"]{--result-accent:#a3422f;--result-wash:#fff0e8}
html[data-design="2026"] #modal .answerResult{width:100%;text-align:left;color:var(--text);scrollbar-width:none}
#modal .resultHeading{display:flex;align-items:center;gap:11px}
#modal .resultSymbol{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:50%;color:var(--result-accent);background:color-mix(in srgb,var(--result-accent) 13%,transparent)}
#modal .resultSymbol svg{width:24px;height:24px}
#modal .resultHeading strong{display:block;font-family:Outfit,'Noto Sans Thai',sans-serif;font-size:20px;line-height:1.25;color:var(--result-accent);font-weight:650}
#modal .resultHeading small{display:block;font-size:11px;line-height:1.5;color:var(--sub);margin-top:3px}
#modal .resultPhrase{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center;margin:13px 0 0;padding:12px 0 0;border-top:1px solid color-mix(in srgb,var(--result-accent) 15%,transparent)}
#modal .resultPhrase>.thai{font-size:24px;line-height:1.5;overflow-wrap:anywhere}
#modal .resultMeaning{grid-column:1;font-size:13px;line-height:1.5;color:var(--sub);margin-top:2px}
html[data-design="2026"] #modal .resultPhrase .feedbackAudio{grid-column:2;grid-row:1 / 3;display:flex;align-items:center;gap:5px;min-height:44px;padding:8px 10px;margin:0;border:1px solid color-mix(in srgb,var(--result-accent) 28%,transparent);border-radius:12px;background:transparent;color:var(--result-accent);font-size:12px;font-weight:600}
#modal .answerResult .answerExplanation{margin:10px 0 0;border:0;background:transparent;font-size:11px}
#modal .answerResult .answerExplanation summary{min-height:32px;color:var(--sub);padding:5px 0}
#modal .answerResult .answerExplanation p{font-size:12px;margin:6px 0}
html[data-design="2026"] #modal.lessonMode .modalfoot.focusFeedback>.primary{width:100%;min-height:48px;border:0;box-shadow:none;border-radius:14px;background:var(--result-accent);color:#123c34;text-transform:none;font-size:15px}
html[data-design="2026"] #modal.lessonMode .modalfoot.focusFeedback[data-result="error"]>.primary{color:#432820}
html[data-design="2026"][data-theme="light"] #modal.lessonMode .modalfoot.focusFeedback>.primary{color:white}
@media(max-width:360px){#modal .resultHeading strong{font-size:18px}#modal .resultPhrase>.thai{font-size:22px}}
/* A tidy top bar, with progress that stays legible on a phone. */
html[data-design="2026"] #modal.lessonMode .focusHead{gap:12px;padding:6px 0 18px;margin-bottom:10px}
html[data-design="2026"] #modal.lessonMode .focusHead .close{width:36px;height:36px;min-width:36px;min-height:36px;border:1px solid color-mix(in srgb,var(--sub) 16%,transparent);border-radius:50%;background:color-mix(in srgb,var(--surface2) 60%,transparent);color:var(--sub);opacity:.7;padding:9px}
html[data-design="2026"] #modal .focusProgressLabel{margin-bottom:9px;line-height:1.5}
html[data-design="2026"] #modal .focusProgressLabel>span{font-family:Outfit,sans-serif;font-size:14px;letter-spacing:0;font-weight:600;color:var(--text);text-transform:none}
html[data-design="2026"] #modal .focusProgressLabel>small{font-size:10px;font-variant-numeric:tabular-nums;line-height:1.5;border:1px solid var(--border);padding:2px 8px;border-radius:20px;color:var(--sub)}
html[data-design="2026"] #modal.lessonMode .focusHead .bar{height:6px;border-radius:10px;background:color-mix(in srgb,var(--sub) 18%,transparent);overflow:hidden}
html[data-design="2026"] #modal.lessonMode .focusHead .bar>div{height:100%;border-radius:10px;background:#4ad8b4;transition:width .3s ease}
@media(max-width:760px){
 html[data-design="2026"] body .workspace>header>.stats{gap:10px!important;min-height:52px!important}
 html[data-design="2026"] body .stats :is(.languageSwitch,.wallet,.pathMissionButton),html[data-design="2026"] body .stats [role="button"]:has(#streak){min-height:44px;border-radius:15px!important;border:1px solid color-mix(in srgb,var(--sub) 14%,transparent)!important;background:var(--surface2)!important;box-shadow:0 2px 0 color-mix(in srgb,var(--bg) 30%,transparent);line-height:1;font-variant-numeric:tabular-nums}
 html[data-design="2026"] body .stats .pathMissionButton{height:44px;width:44px;padding:11px}
}
@media(prefers-reduced-motion:reduce){html[data-design="2026"] #modal.lessonMode .focusHead .bar>div{transition:none}}
/* A teacher speaks from the bubble; learning controls stay still. */
html[data-design="2026"] .mamaTeacher{display:flex;align-items:center;gap:10px;margin:6px 0 -8px;padding:0 8px;position:relative;z-index:1}
.mamaPortrait{width:100px;flex:none;align-self:flex-end}
.mamaPortrait svg{display:block;width:100%;height:auto}
.mamaPortrait .changTravelPatch,.mamaPortrait .changSpark{display:none}
.mamaIntro{display:grid;gap:4px;padding-bottom:13px}
.mamaIntro strong{font-family:Outfit,sans-serif;font-size:16px;font-weight:600;color:var(--text)}
.mamaIntro span{font-size:11px;line-height:1.5;color:var(--sub);max-width:190px}
html[data-design="2026"] .focusStudy .focusPhrase.mamaSpeechBubble{position:relative;border:1px solid color-mix(in srgb,#bbb1e3 30%,var(--border));border-radius:8px 24px 24px 24px;padding:24px 18px;margin:0;background:var(--surface)}
html[data-design="2026"] .mamaSpeechBubble:before{content:'';position:absolute;left:38px;top:-8px;width:14px;height:14px;background:var(--surface);border-left:1px solid color-mix(in srgb,#bbb1e3 30%,var(--border));border-top:1px solid color-mix(in srgb,#bbb1e3 30%,var(--border));transform:rotate(45deg)}
html[data-design="2026"] .focusStudy:has(.mamaTeacher) .lessonScene{margin-bottom:8px}
@media(prefers-reduced-motion:no-preference){
 .mamaTeacher .changHead,.mamaTeacher .changTrunk,.mamaTeacher .changLook{animation:none}
 .mamaTeacher.isSpeaking .changHead{animation:mamaTalking .32s ease-in-out infinite alternate}
 .mamaTeacher.isSpeaking .changTrunk{animation:mamaTrunk .48s ease-in-out infinite alternate}
 .routeOpening{animation:routeUnfold 1.6s cubic-bezier(.22,.6,.35,1) both}
 .worldRiver{transform-origin:70% 50%;animation:riverSway 14s ease-in-out infinite alternate;will-change:transform}
 .worldRiver>path:nth-child(2){animation:riverCurrent 12s linear infinite;stroke-linecap:round;opacity:.35}
}
@keyframes mamaTalking{from{transform:rotate(-2deg) translateY(0)}to{transform:rotate(2deg) translateY(-2px)}}
@keyframes mamaTrunk{from{transform:rotate(-4deg)}to{transform:rotate(5deg)}}
@keyframes routeUnfold{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes riverSway{from{transform:translateX(-3px) scaleX(1.015)}to{transform:translateX(4px) scaleX(.985)}}
@keyframes riverCurrent{to{stroke-dashoffset:-156}}
/* Mama sits on the phrase block, with a small speaking movement. */
html[data-design="2026"] .mamaTeacher{margin:0 0 -15px;padding:0 4px;align-items:center;gap:0}
html[data-design="2026"] .mamaPortrait{width:156px;margin-left:-10px}
html[data-design="2026"] .mamaIntro{padding-bottom:20px}
html[data-design="2026"] .mamaIntro span{max-width:160px}
.mamaMouth{transform-box:view-box;transform-origin:121px 126px;transform:scaleY(.3)}
@media(prefers-reduced-motion:no-preference){.mamaTeacher.isSpeaking .mamaMouth{animation:mamaMouth .34s ease-in-out infinite}}
@keyframes mamaMouth{0%,100%{transform:scaleY(.25)}25%{transform:scaleY(1)}50%{transform:scaleY(.45)}75%{transform:scaleY(.85)}}
/* Compact lesson title and progress, without a separate close-button panel. */
html[data-design="2026"] #modal.lessonMode .focusHead{padding:2px 0 10px;margin-bottom:0;gap:10px}
html[data-design="2026"] #modal.lessonMode .focusHead .close{border:0;background:transparent;opacity:.5}
html[data-design="2026"] #modal .focusProgressLabel>span{font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-design="2026"] #modal .focusProgressLabel>small{border:0;padding:0;font-size:11px}
html[data-design="2026"] #modal.lessonMode .focusHead .bar{height:5px}
html[data-design="2026"] #modal .focusStudy{padding-top:0}
/* Playing feedback stays inside the button, with no clipped outside ring. */
html[data-design="2026"] #modal .playing{outline:none!important;box-shadow:none!important;animation:none}
html[data-design="2026"] #modal .audioBtn.playing{border-color:var(--green);background:color-mix(in srgb,var(--green) 12%,var(--surface));color:var(--green)}
html[data-design="2026"] #modal .audioBtn:focus:not(:focus-visible){outline:none}
@media(prefers-reduced-motion:no-preference){#modal .playing>.uiIcon{animation:changVoicePulse .45s ease-in-out infinite alternate}}
.mamaCoaching{display:grid;gap:14px;padding:10px 0}
.coachStep strong{font-size:13px;font-weight:600;color:var(--text)}
#modal .coachStep p{font-size:12px;line-height:1.65;margin:5px 0 8px}
#modal .coachStep .secondary{display:inline-flex;align-items:center;gap:7px;font-size:12px;min-height:44px;padding:9px 13px;border-radius:12px}
.coachStep .uiIcon{width:18px;height:18px}
.politeExample{display:grid;grid-template-columns:50px 1fr;gap:2px 8px;align-items:center;margin:10px 0}
.politeExample b{grid-row:1 / 3;font-size:22px;color:var(--text);font-weight:500}
.politeExample small{font-size:11px;color:var(--sub)}
.mistakeRecap{text-align:left;margin:20px 0;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}
.mistakeRecap>h3{font-size:18px}.mistakeRecap>p{font-size:12px;color:var(--sub)}
.recapPhrase{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--border)}
.recapPhrase .thai{font-size:21px;font-weight:500}.recapPhrase small{display:block;font-size:12px;color:var(--sub);margin-top:3px}
.recapPhrase .feedbackAudio{flex:none;min-width:44px;min-height:44px;margin:0;border-radius:12px}
.mistakeRecap>.secondary{width:100%;margin-top:12px;min-height:48px;font-size:13px}
/* Centered lesson preview, above a soft dimming layer. */
.pathBackdrop{position:fixed;inset:0;z-index:100;background:#041b24aa;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
body:has(.pathPopover){overflow:hidden}
html[data-design="2026"] .pathPopover{z-index:101;outline:none!important}
html[data-design="2026"] .pathPopover:before{display:none}
html[data-design="2026"] .pathPopover .pathPeek{padding:28px 22px 22px;border:1px solid var(--border);border-radius:24px;background:var(--surface);box-shadow:0 24px 70px #0005;color:var(--text)}
html[data-design="2026"] .pathPopover .pathPeek>small{display:block;font-size:11px;color:var(--sub);padding-right:32px}
html[data-design="2026"] .pathPopover .pathPeek h2{font-size:27px;line-height:1.2;margin:13px 0 8px;letter-spacing:-.4px}
html[data-design="2026"] .pathPopover .pathPeek>p{font-size:14px;color:var(--sub);line-height:1.6;margin:8px 0 22px}
html[data-design="2026"] .pathPopover .peekClose{position:absolute;top:12px;right:12px;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;border:0;background:var(--surface2);color:var(--sub);opacity:.65;padding:11px}
html[data-design="2026"] .pathPopover .peekClose .uiIcon{width:18px;height:18px}
html[data-design="2026"] .pathPopover .primary{width:100%;min-height:50px;border:0;border-radius:14px;box-shadow:none;font-size:14px;background:#4ad8b4;color:#123b32}
@media(prefers-reduced-motion:no-preference){.pathBackdrop{animation:backdropArrives .24s ease-out both}}
@keyframes backdropArrives{from{opacity:0;backdrop-filter:blur(0)}to{opacity:1;backdrop-filter:blur(3px)}}
html[data-design="2026"] #modal .focusPhrase>.thai{margin-bottom:6px}
html[data-design="2026"] #modal .spokenWord{font:inherit;line-height:1.65;color:inherit;display:inline;padding:0 2px 3px;margin:0 3px 4px;border:0;border-bottom:2px dashed color-mix(in srgb,var(--green) 45%,transparent);border-radius:0;background:transparent;box-shadow:none;cursor:pointer;min-height:44px;vertical-align:baseline}
html[data-design="2026"] #modal .spokenWord.playing{color:#58e0bb;border-bottom-style:solid;border-bottom-color:#58e0bb;background:transparent}
html[data-design="2026"] #modal .wordTapHint{display:block;font-size:10px;line-height:1.5;color:var(--sub);margin:0 0 18px;opacity:.8}
html[data-design="2026"] #modal .spokenWord:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:4px}
/* Only the active playback speed gets an audio accent. */
html[data-design="2026"] #modal .focusStudy .audioBtn{color:var(--sub);background:transparent;border:1px solid var(--border);box-shadow:none}
html[data-design="2026"] #modal .focusStudy .audioBtn.playing{color:#52dfba;background:color-mix(in srgb,#52dfba 10%,var(--surface));border-color:color-mix(in srgb,#52dfba 65%,var(--border));box-shadow:none;outline:none!important}
/* A gentle pause character and a useful end-of-activity recap. */
html[data-design="2026"] #modal .pauseElephant{width:160px;height:150px;margin:0 auto 10px;overflow:visible}
#modal .pauseElephant svg{width:100%;height:100%}
#modal .pauseElephant .changSpark,#modal .pauseElephant .changWaveArm{display:none}
#modal .pauseElephant .changHead,#modal .pauseElephant .changTrunk{animation:none}
#modal .recapCelebration{display:flex;align-items:center;gap:9px;color:var(--green);margin-bottom:17px}
#modal .recapCelebration>.uiIcon{width:25px;height:25px;flex:none;color:#efc579}
#modal .recapCelebration h3{font-size:19px;line-height:1.3}
.recapStats{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:8px;margin:0 0 20px;padding-bottom:18px;border-bottom:1px solid var(--border)}
.recapStats>div{min-width:0}.recapStats strong{display:block;font-family:Outfit,sans-serif;font-size:22px;line-height:1.3;font-weight:600;color:var(--text)}
.recapStats small{display:block;font-size:11px;line-height:1.5;color:var(--sub);margin-top:5px}
@media(prefers-reduced-motion:no-preference){.changTears .tearLeft{animation:changTear 1.6s ease-in infinite}.changTears .tearRight{animation:changTear 1.6s .6s ease-in infinite}}
@keyframes changTear{0%{opacity:0;transform:translateY(-3px)}20%{opacity:.9}100%{opacity:0;transform:translateY(18px)}}
/* A stable word anchor makes the changing contexts easy to recognise. */
.contextWordAnchor{display:flex;align-items:center;gap:12px;padding:10px 0 8px;margin-bottom:2px}
.contextWordAnchor>button{display:flex;align-items:center;gap:8px;padding:8px 12px;min-height:48px;border:1px solid color-mix(in srgb,#efc579 35%,var(--border));border-radius:14px;background:color-mix(in srgb,#efc579 8%,var(--surface));color:#efc579}
.contextWordAnchor .thai{font-size:25px;line-height:1.5}.contextWordAnchor .uiIcon{width:17px;height:17px}
.contextWordAnchor strong{font-size:14px;font-weight:600;color:var(--text)}.contextWordAnchor small{display:block;font-size:10px;line-height:1.5;color:var(--sub);margin-top:4px}
html[data-design="2026"] #modal .spokenWord.focusWord{color:#efc579;border-bottom-color:#efc579;border-bottom-style:solid}
html[data-design="2026"] #modal .spokenWord.focusWord.playing{color:#52dfba;border-bottom-color:#52dfba}
.contextPracticeLabel{display:block;color:var(--sub);font-size:11px;line-height:1.6;margin:-4px 0 14px}
html[data-theme="light"] .contextWordAnchor>button,html[data-theme="light"] #modal .spokenWord.focusWord{color:#8a5914}

/* The section stays with the indicators while the route scrolls below it. */
html[data-design="2026"] body.pathHome .workspace>header>.pathSectionBanner{position:relative;top:auto;transform:none;z-index:auto;margin:0 auto;isolation:isolate}
html[data-design="2026"] body.pathHome .trailStop{scroll-margin-top:calc(var(--path-dock-height,180px) + 24px)}
@media(max-width:760px){html[data-design="2026"] body.pathHome .workspace>header>.pathSectionBanner{min-height:92px;border-radius:20px;max-width:420px}}
