/* Content stays in normal document flow when zoom changes the available space. */
html{height:auto;min-height:100%;overflow-x:clip}body{height:auto;min-height:100dvh;overflow:auto}
header{height:auto;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:10px 18px 0;gap:12px}
.header-main{height:auto;min-height:0;display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:100%}
.header-main .brand.brand-logo{width:320px!important;max-width:100%;height:80px;flex:0 1 320px;min-width:0;margin-right:auto}
.brand.brand-logo img{width:320px!important;height:auto!important;max-width:none;top:-23px!important;left:0}
.header-main .header-controls{height:auto;min-width:0;flex-wrap:wrap;order:5;width:100%;margin:0;gap:14px;padding:0 0 4px}
.header-main>button{white-space:normal;flex:0 1 auto;min-width:0;max-width:100%;overflow-wrap:anywhere}
.course-menu{height:auto;min-height:0;display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;margin:0;width:100%}
.course-menu button{flex:0 1 auto;min-width:0;max-width:100%;white-space:normal;padding:13px 20px}
.course-menu .note{flex:1 1 220px;align-self:center;margin:4px 0 10px;font-size:14px;overflow-wrap:anywhere}
.workspace{height:auto;min-height:0;display:grid;grid-template-columns:250px minmax(0,1fr);align-items:start;padding:18px;gap:16px;width:100%;max-width:1700px;margin:0 auto}
.workspace .lesson-sidebar{height:auto;min-width:0;min-height:0;overflow:visible;max-height:none}
.workspace .layout{width:100%;min-width:0;min-height:0;height:auto}
.workspace .practice-panel{height:auto;min-height:0;min-width:0;overflow:visible;padding:20px;display:flex;flex-direction:column;gap:14px}
.drill-heading{min-width:0;flex-wrap:wrap;max-width:100%;overflow-wrap:anywhere}.drill-heading h2{max-width:100%;overflow-wrap:anywhere;font-size:clamp(21px,2.1vw,25px)}
.steps{height:auto;display:flex;flex-wrap:wrap;flex-shrink:0;gap:10px;max-width:100%}.drill-choice{flex:1 1 170px;min-width:0;white-space:normal;overflow-wrap:anywhere}
.dialogue-controls,.preview-controls{height:auto;flex-wrap:wrap;min-width:0;max-width:100%;gap:12px 18px}.preview-controls label{white-space:normal;max-width:100%;align-items:center;line-height:1.5}.preview-controls label input{margin:0;flex-shrink:0}
.practice-area{height:auto;flex:0 0 auto;min-height:320px;min-width:0;max-width:100%;overflow:hidden;display:flex;flex-direction:column}
.practice-topline{flex-wrap:wrap;align-items:flex-start;min-width:0}.practice-instructions{flex:1 1 210px;min-width:0}.next-letter-guide{margin-left:auto;flex:0 0 auto;max-width:100%;flex-wrap:wrap}
.practice-area .target.dialogue-target,.practice-area .target{height:auto;min-height:0;max-height:none;flex:0 0 auto;overflow:visible;max-width:100%;overflow-wrap:anywhere}
.dialogue-turn{min-width:0;gap:12px;align-items:baseline}.dialogue-words{min-width:0;white-space:normal;overflow-wrap:anywhere}.target .dialogue-speaker{flex:0 0 auto;width:auto;max-width:32%;white-space:normal;overflow-wrap:anywhere}
.practice-area .start-overlay{max-width:calc(100% - 24px);white-space:normal;line-height:1.5;text-align:center}.practice-area .start-overlay:active:not(:disabled){transform:translate(-50%,-35%)}
.audio-only .listen-only-input{position:static!important;flex:none;height:auto!important;min-height:220px;margin:0!important;max-width:100%;overflow-wrap:anywhere}
.guidance-row{height:auto;min-width:0;max-width:100%;flex:0 0 auto}.keyboard-column,.keyboard{min-width:0;max-width:100%}.row{min-width:0;max-width:100%}.key{min-width:0;overflow:hidden}.key.space,.shift-key{min-width:0}.keyboard-note{overflow-wrap:anywhere}
.bottom-bar{height:auto;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:14px;max-width:100%}.bottom-bar .actions,.actions{float:none;margin-left:0;display:flex;flex-wrap:wrap;gap:8px;max-width:100%;min-width:0}.bottom-bar .actions{margin-left:auto}.actions button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}.lesson-progress{flex:0 1 auto;min-width:0}.lesson-progress span{overflow-wrap:anywhere}
.entry-screen{height:auto;min-width:0;width:100%;max-width:1050px}.entry-screen .panel{min-width:0;overflow-wrap:anywhere}.entry-screen h1{overflow-wrap:anywhere}.check-parts{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}.check-parts article{min-width:0}.entry-screen .actions{float:none;margin-left:0;flex-wrap:wrap}
dialog{box-sizing:border-box;max-width:calc(100% - 24px);max-height:90dvh;overflow:auto;overflow-wrap:anywhere}dialog .dialog-head,.guide-heading{flex-wrap:wrap;min-width:0}dialog h2,dialog h3{min-width:0;overflow-wrap:anywhere}.dialog-head button{max-width:100%;white-space:normal}.rank-tabs{flex-wrap:wrap}.belt-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}.belt-art,.belt-explanation{min-width:0}.belt-order{grid-template-columns:repeat(2,minmax(0,1fr))}.belt-order li{min-width:0}.response-question{min-width:0}.name-form input,textarea{max-width:100%;min-width:0}
#typing-workspace{height:calc(100dvh - var(--header-height,180px));min-height:780px;max-width:100%;margin:0;padding:0}#typing-frame{width:100%;height:100%;min-height:780px;display:block;border:0}
body.typing-course-view header{height:auto;min-height:0;padding-bottom:10px;flex-direction:row;flex-wrap:wrap}body.typing-course-view .workspace{height:auto;align-items:start}body.typing-course-view .practice-area .target{white-space:pre-wrap;min-height:200px}body.typing-course-view .guidance-row{grid-template-columns:minmax(0,1fr) 190px}body.typing-course-view .practice-panel{overflow:visible}body.typing-course-view .stats{flex-wrap:wrap;gap:16px;min-width:0}body.typing-course-view .actions{margin-left:0}
@media(max-width:1050px){.workspace{grid-template-columns:215px minmax(0,1fr);gap:12px;padding:14px}.workspace .practice-panel{padding:16px}.lesson-sidebar{padding:18px 12px}.bottom-bar .actions{margin-left:0}.belt-layout{grid-template-columns:1fr}.practice-topline{padding:12px}.steps{gap:8px}.drill-choice{flex-basis:150px}}
@media(max-width:800px){header{padding:10px 12px 0}.workspace{grid-template-columns:minmax(0,1fr);padding:12px;gap:14px}.lesson-sidebar .lesson-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.lesson-menu button{min-width:0;white-space:normal;overflow-wrap:anywhere}.lesson-brief{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.lesson-brief p{flex:1 1 190px;min-width:0}.lesson-brief button{width:auto;max-width:100%;flex:0 1 auto}.practice-area{min-height:320px}.course-menu button{flex:1 1 160px}.header-main .preview-tag{display:none}body.typing-course-view .guidance-row{grid-template-columns:minmax(0,1fr)}body.typing-course-view .hand-guidance{flex-wrap:wrap;max-width:100%}}
@media(max-width:550px){header{padding:8px 10px 0;gap:10px}.header-main .brand.brand-logo{width:270px!important;flex-basis:270px;height:70px}.brand.brand-logo img{width:270px!important;top:-19px!important}.header-main>button{flex:1 1 130px;font-size:14px;padding:10px}.header-main .header-controls{gap:10px}.header-controls .text-size-controls{flex-wrap:wrap;max-width:100%}.sound-option{flex-wrap:wrap}.course-menu button{flex:1 1 125px;padding:12px 8px;font-size:15px}.course-menu .note{flex-basis:100%;margin-left:0}.workspace{padding:10px}.workspace .practice-panel{padding:12px}.lesson-sidebar .lesson-menu{grid-template-columns:minmax(0,1fr)}.lesson-brief{display:block}.lesson-brief button{width:100%;margin-top:10px}.steps{flex-wrap:wrap}.drill-choice{flex:1 1 120px}.practice-area .target.dialogue-target{padding:8px 10px 16px}.target .dialogue-speaker{max-width:30%}.dialogue-turn{gap:8px}.bottom-bar .actions{display:flex;flex-wrap:wrap;width:100%;margin-left:0}.bottom-bar .actions button{flex:1 1 130px}.check-parts{grid-template-columns:minmax(0,1fr)}.entry-screen h1{font-size:23px}.entry-screen .panel{padding:18px}.belt-order{grid-template-columns:minmax(0,1fr)}dialog{padding:16px}dialog h2{font-size:20px}.key-vowel{font-size:12px}.key-mark{font-size:12px}.key{font-size:19px}.shift-key{flex-basis:50px;font-size:12px}.key.space{font-size:12px}}
@media(max-width:320px){.header-main .brand.brand-logo{flex-basis:230px;width:230px!important;height:60px}.brand.brand-logo img{width:230px!important;top:-16px!important}.workspace{padding:6px}.workspace .practice-panel{padding:8px}.key{font-size:16px}.key-vowel,.key-mark{display:none}.entry-screen h1{font-size:20px}}
