.grammar-adaptive-app[data-viewport-fit],.grammar-sentence-app[data-viewport-fit],[data-reading-root][data-viewport-fit]{box-sizing:border-box;height:var(--lesson-available-height)!important;max-height:var(--lesson-available-height)!important;min-height:0!important;min-width:0}
/* Grammar/reading layout; protected modules activate only for detected viewport overflow. */
[data-viewport-fit] .learning-main-canvas>.flex-1{min-height:0!important;min-width:0}
[data-viewport-fit] .learning-footer-controls{flex-shrink:0!important;flex-flow:row wrap!important;justify-content:center!important;gap:6px!important;margin-top:6px!important;padding:6px 0 0!important;min-width:0}
[data-viewport-fit] .learning-footer-controls>div{min-width:0;max-width:100%}
[data-viewport-fit] .learning-footer-controls .scrollbar-none{flex-wrap:wrap!important;justify-content:center;white-space:normal!important;overflow:visible!important}
[data-viewport-fit] #spelling-practice{gap:4px!important;padding-block:2px!important;min-height:0!important;overflow:visible!important}
[data-viewport-fit] #spelling-practice>div[style*="translateY"]:not([data-viewport-keyboard]){transform:translateY(var(--spelling-content-descent,0px))!important}
[data-viewport-fit] #spelling-practice>div:has(>div button){min-width:0}
[data-viewport-fit] [data-viewport-keyboard]{zoom:var(--lesson-keyboard-zoom,1);transform:translateY(var(--spelling-keyboard-descent,0px)) scale(.891)!important;transform-origin:center top!important;margin-block:2px!important;padding-block:0!important;flex-shrink:0}
[data-viewport-fit] #sentence-game{min-height:0!important;height:auto!important;max-height:none!important;padding-block:6px!important;margin-block:0!important}
[data-viewport-fit] .grammar-stage-shell{min-height:0!important;overflow:hidden!important}
[data-viewport-fit] .grammar-stage-shell>div:has(#spelling-practice){min-height:0!important;flex:1 1 0%!important;padding:0 28px 6px!important}
[data-viewport-fit] .ga-answer-footer{min-height:40px!important;padding-block:5px!important}
[data-viewport-fit] .ga-choice-stage:not(.ga-choice-shared){gap:clamp(8px,2vh,24px);padding-block:6px}
[data-viewport-fit] .ga-options{flex-wrap:wrap}
@media(max-height:620px){[data-viewport-fit] .learning-footer-controls button{padding-block:4px!important}[data-viewport-fit] .ga-cue{margin:0!important}[data-viewport-fit] .grammar-toolbar{padding-block:4px!important}[data-viewport-fit] #spelling-practice>.h-12{height:30px!important}}

/* Protected modules: activated only after detecting viewport overflow. */
[data-viewport-fit]>.grammar-toolbar,[data-viewport-fit]>.rd-header,[data-viewport-fit]>.rd-footer{flex-shrink:0;flex-wrap:wrap;min-height:0}
@media(max-height:620px){[data-viewport-fit] .ga-home-card{min-height:90px;padding:12px 18px}[data-viewport-fit] .ga-center{padding-bottom:14px;gap:10px}[data-viewport-fit] .ga-list-page{padding-bottom:12px}[data-viewport-fit] .ga-home-grid{min-height:0}}

/* Compact only the navigation shell on short screens; lesson artwork stays intact. */
@media(max-height:760px){
 .portal-dashboard[data-center="portal"]{min-height:0;align-items:center;padding:12px 24px 64px!important}
 .portal-dashboard[data-center="portal"] .portal-welcome{margin-bottom:12px;min-height:0}
 .portal-dashboard[data-center="portal"] .portal-space{height:80px;transform:scale(.65);transform-origin:right center}
 .portal-dashboard[data-center="portal"] .portal-modules{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .portal-dashboard[data-center="portal"] .portal-module{min-height:108px;padding:12px 16px}
 .portal-dashboard[data-center="portal"] .portal-module-bottom{margin-top:10px}
 .portal-dashboard[data-center="portal"] .portal-module-symbol{font-size:28px}
 .portal-dashboard[data-center="portal"] .portal-module h3{font-size:22px}
 .portal-dashboard[data-center="vocabulary"]{padding:12px 24px 64px!important;min-height:0}
 .portal-dashboard[data-center="vocabulary"] .word-center-grid{gap:12px}
 .portal-dashboard[data-center="vocabulary"] .word-center-card{min-height:68px;padding:12px}
 .student-course-main{min-height:0;padding-block:10px!important}
 .student-course-shell{margin-top:0!important;padding-block:0!important}
 .student-course-intro{margin-bottom:10px!important}
 .student-course-intro h2{font-size:26px!important}
 .student-course-picker{padding:14px!important}
 .student-course-picker-grid{grid-template-columns:minmax(180px,1fr) 150px minmax(120px,1fr)!important;gap:12px!important}
 .student-course-picker-grid>[aria-label="选择册次"]{grid-column:auto!important}
 .student-course-book{width:80px!important}
 .student-course-book>button{min-height:0!important;height:100px!important;padding:8px!important}
 .student-course-book>button strong{font-size:20px!important}
 .student-course-units{padding-top:10px!important}
}
[data-viewport-frame]{overflow:hidden!important;padding-block:4px!important}
[data-viewport-frame]>section:has([data-viewport-art]){height:100%;min-height:0!important;position:relative}
[data-viewport-art]{flex:none!important;width:var(--viewport-art-width)!important;height:var(--viewport-art-height)!important;min-height:var(--viewport-art-height)!important;max-height:none!important;transform:scale(var(--viewport-art-scale));transform-origin:center center}

@media(max-height:620px){.portal-dashboard[data-center="vocabulary"] .word-center{padding:16px}.portal-dashboard[data-center="vocabulary"] .word-center-heading{margin-bottom:12px}}

@media(max-height:760px){.phonetic-pretest-shell>main:has(.phonetic-hub-home){padding:12px!important}.phonetic-hub-home .phonetic-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.phonetic-pretest-shell .phonetic-hub-card{min-height:76px;padding:12px}.phonetic-hub-intro{margin-block:4px!important}.phonetic-hub-intro img{max-height:80px;object-fit:contain}.phonetic-hub-heading{margin-bottom:8px!important}}

[data-viewport-quiz]{zoom:var(--viewport-quiz-scale);margin-inline:auto}

@media(max-height:760px){
 .student-course-page{height:100dvh;min-height:0!important;overflow:hidden}
 .student-course-main{padding-bottom:58px!important}
 .student-course-shell{height:100%;min-height:0;display:flex;flex-direction:column}
 .student-course-picker{flex:1;min-height:0;display:flex}
 .student-course-picker-grid{flex:1;min-height:0;grid-template-rows:auto minmax(0,1fr) auto}
 .student-course-book{width:112px!important}
 .student-course-book>button{height:90px!important}
 .student-course-units{min-height:0;display:flex;flex-direction:column}
 .student-course-unit-groups{min-height:0;flex:1;overflow:auto}
 .student-course-picker-grid>.mt-4{margin-top:0!important}
 .student-course-unit-grid>button{padding:8px!important}
}

@media(max-height:760px){
 .student-course-page .student-course-main{padding-bottom:10px!important}
 .student-course-page .student-course-shell{overflow:hidden}
 .student-course-page .student-course-picker-grid{grid-template-rows:auto minmax(0,1fr)}
 .student-course-page .student-course-units{min-height:0!important;height:100%;overflow:hidden}
 .student-course-page .student-course-book{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;width:100%!important;gap:4px 10px}
 .student-course-page .student-course-book>button{grid-row:1/3;width:84px}
 .student-course-page .student-course-book>span{min-width:0}
 .student-course-page .student-course-shell>.mt-4{flex-shrink:0;margin-top:10px!important}
 .phonetic-pretest-shell .phonetic-hub-home{padding-bottom:0!important}
 .phonetic-pretest-shell .phonetic-hub-grid{padding-bottom:0!important}
}

@media(max-height:620px){.student-course-page .student-course-picker{padding:10px!important}.student-course-page .student-course-picker-grid{gap:8px!important}.student-course-page .student-course-units{padding-top:6px!important}.student-course-page .student-course-units>div:first-child{margin-bottom:4px!important}}

[data-viewport-frame]>section:has([data-viewport-art]){height:var(--viewport-frame-height,100%)}

@media(max-height:760px){
 .cover-login{height:100dvh;min-height:0!important;padding:12px 24px 70px!important}
 .cover-story{min-height:0!important;padding:24px!important}
 .cover-feature-grid{margin-top:16px;gap:10px}
 .cover-feature{padding:10px 12px}
 .cover-companion.cover-story-heading{margin-top:12px;min-height:0;padding-block:8px}
 .cover-form-side{padding:18px 24px!important}
 .cover-form-card>div{margin-bottom:12px}
}

@media(max-height:620px){[role="dialog"][aria-labelledby="registration-title"]{padding:16px!important}[role="dialog"][aria-labelledby="registration-title"]>.mb-6{margin-bottom:12px!important}[role="dialog"][aria-labelledby="registration-title"] form>*+*{margin-top:10px!important}}

/* Preserve the approved word lesson as a single proportional canvas. */
.learning-page-layer[data-word-fit]{height:var(--lesson-available-height)!important;min-height:0!important;max-height:var(--lesson-available-height)!important;padding:0!important;overflow:hidden!important;position:relative}
[data-word-frame]{position:relative!important;width:100%!important;height:100%!important;min-height:0!important;overflow:visible!important}
.learning-page-layer[data-word-fit][data-word-frame]{overflow:hidden!important}
[data-word-art]{position:absolute!important;left:50%!important;top:50%!important;flex:none!important;width:var(--word-art-width)!important;max-width:none!important;height:var(--word-art-height)!important;min-height:var(--word-art-height)!important;max-height:none!important;margin:0!important;transform:translate(-50%,-50%) scale(var(--word-art-scale))!important;transform-origin:center center!important}

/* Layout measurements must not sample an in-flight size transition. */
.learning-page-layer,.learning-page-layer .learning-main-canvas{transition-property:background-color,border-color,box-shadow!important}

.learning-fullscreen-layer{transition-property:background-color,border-color,box-shadow!important}

[data-word-art]{min-width:0!important;box-sizing:border-box}

.learning-page-layer[data-word-fit] [data-keyboard-scale="0.891"]{transform:translateY(calc(-36px + var(--spelling-keyboard-descent,0px))) scale(.891)!important;transform-origin:center top!important}

[data-word-frame]:fullscreen{height:100dvh!important;padding:0!important}
[data-word-frame]:fullscreen>[data-word-art]{top:calc(48px + var(--word-art-height) * var(--word-art-scale) / 2)!important}

/* Keep lesson controls readable after fitting a short viewport. */
[data-word-art] .learning-footer-controls button{font-size:max(12px,calc(11px / var(--word-art-scale)))!important;min-height:calc(24px / var(--word-art-scale));padding-inline:max(6px,calc(5px / var(--word-art-scale)))!important}
[data-word-art] .learning-footer-controls{flex-shrink:0!important;min-width:0;max-width:100%}
[data-word-art] .learning-footer-controls .scrollbar-none{flex-wrap:wrap!important;justify-content:center;white-space:normal!important}

/* Grammar must reserve separate space for cue, answer, reset and keyboard. */
.grammar-adaptive-app[data-viewport-fit] .gsp-translation{transform:none!important;flex-shrink:0}
.grammar-adaptive-app[data-viewport-fit] .gsp-input-area{justify-content:center;flex-shrink:0;gap:clamp(14px,2.4vh,26px);padding-block:6px}
.grammar-adaptive-app[data-viewport-fit] #spelling-practice .gsp-keyboard[data-keyboard-scale]{transform:none!important;margin-top:8px!important}
@media(max-height:620px){.grammar-adaptive-app[data-viewport-fit] #spelling-practice .gsp-keyboard[data-keyboard-scale]{zoom:.72!important;height:calc(var(--gsp-keyboard-height,180px) / .72)!important}.grammar-adaptive-app[data-viewport-fit] .gsp-input-area{gap:14px;padding-block:4px}}

/* Fullscreen uses the viewport; only live feedback needs a footer. */
.grammar-adaptive-app.ga-full[data-viewport-fit]{height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:0!important;border-radius:0!important}
.grammar-adaptive-app.ga-full[data-viewport-fit] .ga-answer-footer:has(>span:only-child){display:none!important}
.grammar-adaptive-app.ga-full[data-viewport-fit] .ga-exercise{margin:0!important;padding-block:4px!important}
.grammar-adaptive-app.ga-full[data-viewport-fit] #spelling-practice.gsp-stage{padding-bottom:36px!important}
.grammar-adaptive-app.ga-full:has(.ga-exercise){background:var(--grammar-canvas-bg,#060d18)!important;color:var(--grammar-canvas-ink,#fff)!important}
.grammar-adaptive-app.ga-full:has(.ga-exercise)>.grammar-toolbar,
.grammar-adaptive-app:has(.ga-exercise)>.ga-answer-footer{background:var(--grammar-canvas-bg,#060d18)!important;color:var(--grammar-canvas-ink,#fff)!important;border:0!important;box-shadow:none!important}
.grammar-adaptive-app.ga-full:has(.ga-exercise)>.grammar-toolbar{min-height:40px!important;padding:4px 12px!important;margin:0!important;flex-shrink:0}
.grammar-adaptive-app.ga-full:has(.ga-exercise)>.grammar-toolbar .grammar-tool-button{background:rgba(30,85,105,.35)!important;color:#e6fff9!important;border:1px solid #78e5d14d!important;box-shadow:inset 0 1px #ffffff24,0 2px 8px #0003!important}
.grammar-adaptive-app .ga-exercise[data-wrong=true]{display:flex;flex-direction:column;min-height:0}
.grammar-adaptive-app .ga-exercise[data-wrong=true]>.ga-choice-stage{flex:1;min-height:0;gap:clamp(10px,2vh,24px);padding-block:6px}
.grammar-adaptive-app .ga-exercise[data-wrong=true]:has(.ga-help-auto) .gsp-keyboard{display:none!important}
.grammar-adaptive-app .ga-exercise[data-wrong=true]>.ga-spelling-stage{flex:1;min-height:0}
.grammar-adaptive-app .ga-help.ga-help-auto{position:relative;inset:auto;flex-shrink:0;align-self:center;width:min(900px,calc(100% - 32px));max-height:32%;margin:4px 0;padding:8px 14px;border-color:#6ee7b74d;background:var(--grammar-canvas-bg,#060d18);box-shadow:none;box-sizing:border-box}
.grammar-adaptive-app .ga-help-auto .ga-comparison{display:none}
.grammar-adaptive-app .ga-help-auto .ga-help-heading strong{font-size:14px}
.grammar-adaptive-app .ga-help-auto p{font-size:clamp(16px,2.6vh,20px);line-height:1.45;margin:5px 0}
.grammar-adaptive-app .ga-help-auto .ga-help-actions{font-size:13px}
.grammar-adaptive-app .ga-answer-footer:has([data-diagnostic-feedback]){min-height:0!important;padding:4px 16px 8px!important;flex-shrink:0}
.grammar-adaptive-app [data-diagnostic-feedback]{display:flex!important;flex-direction:row!important;justify-content:center;align-items:center;gap:12px!important;flex-wrap:wrap}
.grammar-adaptive-app .ga-choice-shared .ga-floating-option[data-answer-feedback=wrong]{background:#7f1d1d44!important;box-shadow:0 0 14px #ef444440!important}
.grammar-adaptive-app .ga-choice-shared .ga-floating-option[data-answer-feedback=correct]{background:#065f464d!important;color:#86efac!important;border:2px solid #4ade80!important;box-shadow:0 0 22px #34d39955!important}
/* Grammar exercise toolbar floats over the canvas instead of reserving a strip. */
html body .grammar-adaptive-app:has(>.ga-exercise){position:relative;background:var(--grammar-canvas-bg,#010205)!important;color:var(--grammar-canvas-ink,#fff)!important;padding:0!important;overflow:hidden}
html body .grammar-adaptive-app.ga-full:has(>.ga-exercise){position:fixed}
html body .grammar-adaptive-app:has(>.ga-exercise)>.grammar-toolbar{position:absolute!important;inset:0 0 auto 0;z-index:70;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--grammar-canvas-ink,#fff)!important;padding:4px 12px!important;margin:0!important;min-height:40px!important;pointer-events:none}
html body .grammar-adaptive-app:has(>.ga-exercise)>.grammar-toolbar>*{pointer-events:auto}
html body .grammar-adaptive-app:has(>.ga-exercise)>.grammar-toolbar button{background:rgba(15,55,65,.6)!important;border:1px solid #78e5d14d!important;color:#e6fff9!important;box-shadow:inset 0 1px #ffffff24,0 2px 8px #0003!important}
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise{padding:52px clamp(12px,3vw,42px) 8px!important;margin:0!important;flex:1;min-height:0}
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{flex:1;min-height:0;display:flex;justify-content:space-evenly!important;gap:clamp(20px,4.5vh,60px)!important;padding:10px 0!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{max-width:1100px;margin-top:0!important;gap:clamp(16px,3vw,40px)}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options button{padding:12px 16px}
html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto)>.ga-choice-stage.ga-choice-shared{gap:14px!important;padding-block:4px!important}
@media(max-height:540px){html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise{padding-top:48px!important}html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{gap:18px!important;padding-block:4px!important}html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options button{padding-block:8px}}
/* Keep the first line near the toolbar; use spare height between learning rows. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{justify-content:flex-start!important;gap:clamp(26px,7vh,84px)!important;padding-top:clamp(12px,2vh,24px)!important;padding-bottom:8px!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{margin-top:clamp(4px,2vh,22px)!important}
@media(max-height:540px){html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{gap:26px!important;padding-top:10px!important}html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{margin-top:6px!important}}
html body .grammar-adaptive-app[data-viewport-fit][data-viewport-fit]>.ga-exercise{padding:52px clamp(12px,3vw,42px) 8px!important}
@media(max-height:540px){html body .grammar-adaptive-app[data-viewport-fit][data-viewport-fit]>.ga-exercise{padding-top:48px!important}}
/* Distribute choice content across the available canvas, without an idle footer. */
html body .grammar-adaptive-app>.ga-answer-footer:has(>span:only-child){display:none!important}
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{display:grid!important;grid-template-rows:minmax(min-content,.8fr) minmax(min-content,1fr) minmax(min-content,1.2fr);align-items:center;justify-items:center;justify-content:stretch!important;gap:clamp(18px,3vh,36px)!important;padding:10px 0!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{margin-top:0!important}
html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto)>.ga-choice-stage.ga-choice-shared{gap:12px!important}
/* Spelling feedback moves with the lifted keyboard; its empty area must not intercept keys. */
.learning-page-layer #spelling-practice:not(.gsp-stage)>.h-12{position:relative;transform:translateY(-36px)!important;pointer-events:none;z-index:21}
.learning-page-layer #spelling-practice:not(.gsp-stage)>.h-12 button{pointer-events:auto}
.learning-page-layer #spelling-practice:not(.gsp-stage)>[data-keyboard-scale]{position:relative;z-index:20;isolation:isolate}
/* Grammar uses the word sentence exercise's text roles and compact content grouping. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{display:flex!important;flex-direction:column;justify-content:center!important;gap:clamp(18px,3vh,32px)!important;padding:8px 0!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{margin-top:4px!important;max-width:896px;gap:clamp(12px,2vw,24px)}
html body .grammar-adaptive-app .ga-choice-translation,html body .grammar-adaptive-app .gsp-translation{color:var(--color-cyan-300,#67e8f9)!important;font-family:ui-sans-serif,system-ui,'Microsoft YaHei',sans-serif;font-weight:900;letter-spacing:.1em;line-height:1.5;text-shadow:0 4px 12px #000c}
html body .grammar-adaptive-app .ga-choice-sentence,html body .grammar-adaptive-app .ga-floating-option,html body .grammar-adaptive-app .gsp-sentence{font-family:ui-sans-serif,system-ui,sans-serif!important;font-weight:700;color:var(--color-emerald-300,#6ee7b7);filter:none;text-shadow:none;line-height:1.5}
html body .grammar-adaptive-app .gsp-input-area{gap:clamp(18px,3vh,32px)!important;justify-content:center!important}
html body .grammar-adaptive-app #spelling-practice.gsp-stage{gap:12px}
html body .grammar-adaptive-app #spelling-practice .gsp-keyboard[data-keyboard-scale]{width:min(100%,896px)!important;z-index:20}
.learning-page-layer #spelling-practice:not(.gsp-stage)>[data-keyboard-scale]{min-height:240px!important}
.learning-page-layer #spelling-practice:not(.gsp-stage):has([data-sentence-letter]){overflow:visible}

.learning-page-layer #spelling-practice:not(.gsp-stage)>[data-spelling-content]{transform:translateY(var(--spelling-content-descent,0px))!important;padding-bottom:36px;box-sizing:border-box}
/* Sentence cues share the spelling stage; options use the independent completed-word role. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{gap:12px!important;padding:0!important}
html body .grammar-adaptive-app .ga-choice-copy{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:clamp(18px,3vh,32px)}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{flex:0 0 auto;min-height:180px;align-items:center;margin:0!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-option{font-weight:900;letter-spacing:-.025em;color:var(--color-emerald-300,#6ee7b7);text-shadow:none;filter:drop-shadow(0 4px 16px rgba(16,185,129,.35))}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-option[data-answer-feedback=correct]{color:var(--color-emerald-300,#6ee7b7)!important}
@media(max-height:620px){html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{min-height:125px}}
.grammar-legacy .fullscreen-notice{display:none!important}
/* Midpoint spacing: roomy at desktop sizes, compact enough for short screens. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{justify-content:center!important;gap:clamp(28px,5vh,56px)!important}
html body .grammar-adaptive-app .ga-choice-copy{flex:0 0 auto;gap:clamp(28px,5vh,56px)}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{min-height:0}
@media(max-height:540px){html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared,html body .grammar-adaptive-app .ga-choice-copy{gap:24px!important}}

/* Keep cues separated, and reserve visible feedback space on compact displays. */
html body .grammar-adaptive-app .gsp-input-area{gap:clamp(26px,4vh,40px)!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{max-width:1100px}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options button{line-height:1.2;overflow-wrap:normal;word-break:normal;padding-inline:10px}
html body .grammar-adaptive-app .ga-answer-word{color:var(--color-emerald-300,#6ee7b7)!important;font-weight:800}
html body .grammar-adaptive-app .ga-help.ga-help-auto{max-height:38%;overflow:auto}
html body .grammar-adaptive-app .ga-explanation-answer{margin:4px 0}
html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto) .ga-choice-copy,html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto)>.ga-choice-stage.ga-choice-shared{gap:16px!important}
/* Match the released spelling typography, without changing vocabulary screens. */
html body .grammar-adaptive-app .ga-choice-translation,html body .grammar-adaptive-app .gsp-translation{font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;letter-spacing:.1em!important;color:var(--color-cyan-300,#67e8f9)!important}
html body .grammar-adaptive-app .ga-choice-sentence,html body .grammar-adaptive-app .gsp-sentence{font-family:'Playfair Display',ui-serif,Georgia,serif!important;font-weight:700!important;line-height:1!important;color:var(--color-emerald-300,#6ee7b7)!important}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-option{font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;font-weight:900!important;letter-spacing:-.025em!important;line-height:1.5!important}
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{justify-content:flex-start!important;padding-top:clamp(12px,2vh,24px)!important;gap:clamp(28px,5vh,48px)!important}
html body .grammar-adaptive-app .ga-choice-copy{gap:clamp(28px,5vh,42px)!important}
html body .grammar-adaptive-app>.ga-answer-footer:has([data-diagnostic-feedback]){display:none!important}
/* Choice spacing between the compact and previously over-spread layouts. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{gap:clamp(32px,6vh,64px)!important}
html body .grammar-adaptive-app .ga-choice-copy{gap:clamp(32px,6vh,56px)!important}
@media(max-height:540px){html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared,html body .grammar-adaptive-app .ga-choice-copy{gap:28px!important}}
/* Center the choice group in the usable canvas instead of stacking at its top. */
html body .grammar-adaptive-app[data-viewport-fit]>.ga-exercise>.ga-choice-stage.ga-choice-shared{justify-content:center!important;padding:0 0 clamp(16px,4vh,40px)!important;box-sizing:border-box}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{max-width:1000px;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(18px,3vw,36px)}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options button{padding:6px 14px;min-height:0;border-radius:16px;background:rgba(110,231,183,.025);box-shadow:inset 0 1px #ffffff12,0 4px 12px #0002;line-height:1.2!important}
html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto)>.ga-choice-stage.ga-choice-shared{padding-bottom:0!important}
/* Choice answers follow the sentence setting, per the updated display rule. */
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-option{font-family:'Playfair Display',ui-serif,Georgia,serif!important;font-weight:700!important;letter-spacing:normal!important;line-height:1.2!important}
/* Fine positioning uses each element's own size so settings remain proportional. */
html body .grammar-adaptive-app .ga-choice-translation,html body .grammar-adaptive-app .gsp-translation{position:relative;top:-1em}
html body .grammar-adaptive-app .ga-choice-shared .ga-floating-options{position:relative;top:0;transform:translateY(50%)}
html body .grammar-adaptive-app .ga-help.ga-help-auto{margin-top:16px}
/* Fill page: preserve Chinese position; move only the English sentence by its own font size. */
html body .grammar-adaptive-app .gsp-translation{top:0}
html body .grammar-adaptive-app .gsp-sentence{position:relative;top:1em}
/* Final fine adjustment: preserve answer boxes while reducing their label by one size. */
html body .grammar-adaptive-app .ga-choice-translation{top:-1.5em}
html body .grammar-adaptive-app .gsp-translation{top:0;transform:translateY(-100%)!important}
html body .grammar-adaptive-app #spelling-practice .gsp-keyboard[data-keyboard-scale]{position:relative;top:calc(-1 * var(--gsp-row-step,44px))}
@media(max-height:620px){html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto) .ga-choice-translation{top:0}}
/* Move cue text independently; choice options and fill English retain their positions. */
html body .grammar-adaptive-app .ga-choice-copy{position:relative;top:-1ex}
html body .grammar-adaptive-app .gsp-translation{transform:translateY(calc(-100% - var(--gsp-key-height,36px)))!important}
html body .grammar-adaptive-app #spelling-practice .gsp-keyboard[data-keyboard-scale]{top:calc(-1 * (var(--gsp-row-step,44px) + var(--gsp-key-height,36px)))}
@media(max-height:620px){html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto) .ga-choice-copy{top:0}html body .grammar-adaptive-app .ga-exercise:has(.ga-help-auto) .ga-floating-options{transform:none}}
/* Lift both assessment explanation panels by half their rendered height. */
html body .grammar-adaptive-app .ga-exercise>.ga-help{transform:translateY(-50%)}
html body .grammar-adaptive-app .gsp-translation{top:-1em}
html body .grammar-adaptive-app .ga-exercise>.ga-help{transform:translateY(calc(-1 * var(--safe-help-lift,0px)))}
