.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.lab-label,.brand small{display:none}
.compact-options{border-top:1px solid var(--line);padding:12px 0;margin:8px 0}
.compact-options>summary{cursor:pointer;font-size:14px;color:#31525d;min-height:24px}
.compact-options[open]>summary{margin-bottom:12px}
#session-options{display:flex;flex-direction:column;gap:8px}
#session-options>.metronome{order:-1;margin-top:0}
#session-options>#restart{align-self:flex-start;margin-top:12px}
[data-screen=settings] #session-options>#restart{display:none}
#startup-timing{font-size:13px;line-height:1.6;color:var(--muted)}
#score-info{display:none}
[data-screen=practice] .flow-title,[data-screen=practice] .target-strip{display:none}
#focus-hide{display:none}
.intro-help{position:fixed;z-index:30;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:42px;height:42px;padding:9px;border-radius:50%;background:#fff;box-shadow:0 3px 12px #17374926;color:#166e74}
.intro-help svg{width:21px;height:21px}
.topbar .header-end{margin-right:56px}
#intro-dialog{width:min(560px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:26px 30px;color:#142d3b}
.intro-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#117b85;font-size:13px;font-weight:700}
#intro-title{font-size:25px;margin:8px 0 6px;color:#132f42}
#intro-summary{font-size:15px;margin:0 0 22px;color:#455f6c}
#intro-dialog h3{margin:0 0 10px;font-size:15px;color:#183d4c}
#intro-dialog ol{margin:0;padding:0;list-style:none;counter-reset:guide}
#intro-dialog li{display:flex;align-items:baseline;gap:12px;padding:11px 0;border-top:1px solid #e0eaed;counter-increment:guide}
#intro-dialog li::before{content:counter(guide,decimal-leading-zero);color:#13848f;font-weight:800;flex:none}
#intro-dialog .intro-note{margin:14px 0 12px;color:#596e76;font-size:13px}
.intro-choice{display:flex;align-items:center;gap:9px;margin:18px 0 0;color:#314a57;font-size:14px;cursor:pointer}
.intro-choice input{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--teal);flex:none}
.intro-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.intro-actions button{min-height:42px;padding:9px 17px;font-size:14px}
@media(max-width:520px){#intro-dialog{padding:18px 20px}#intro-title{font-size:21px}.intro-actions button{flex:1}.topbar .header-end{margin-right:42px;gap:8px}.topbar .brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
#built-in-library{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:18px}
#built-in-library h3{font-size:17px;line-height:1.4;margin:0 0 14px;color:#203137}
#built-in-library label{display:block;margin-top:10px}
#built-in-library [hidden]{display:none}
#built-in-library select{width:100%;min-width:0}
#library-load{margin-top:14px}
#library-status{font-size:13px;line-height:1.5;color:var(--muted);min-height:20px;margin:9px 0 0;overflow-wrap:anywhere}
#score-import-open{margin-top:8px}
#score-import-dialog{width:min(960px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:16px}
#score-import-dialog .dialog-heading{margin-bottom:12px}
#score-import-dialog iframe{display:block;border:0;width:100%;height:72dvh;min-height:200px}
.flow-heading{display:flex;align-items:center;gap:16px;margin:0 0 16px;min-width:0}
.flow-heading #flow-back{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 12px;white-space:nowrap;flex:none}
.flow-heading #flow-back[hidden]{display:none}
.flow-heading #flow-back svg{width:18px;height:18px;flex:none}
.flow-title{flex:1;min-width:0}.flow-title>span{display:block;font-size:12px;color:var(--teal);margin-bottom:5px}.flow-title h1{margin:0;font-size:26px;overflow-wrap:anywhere}
.flow-track{height:4px;background:#dde9e9;margin-bottom:24px}.flow-track>span{display:block;height:100%;width:33.333%;background:var(--teal)}
#preparation{padding:20px 24px;margin:-4px 0 24px;background:#edf7f7;border-top:3px solid var(--teal);color:#16343b}
#preparation[hidden]{display:none}
[data-screen=practice] #preparation:not([hidden]){position:fixed;z-index:46;top:20dvh;left:12px;right:12px;margin:0 auto;width:calc(100% - 24px);max-width:560px;max-height:65dvh;overflow:auto;box-sizing:border-box;box-shadow:0 4px 18px #18343b24}
#preparation h2{margin:0 0 8px;font-size:18px;line-height:1.35}
#preparation p{margin:0 0 14px;font-size:15px;line-height:1.45;color:#365960;font-variant-numeric:tabular-nums}
#preparation .preparation-hint{font-size:13px;color:#4c6970}
#model-download-progress{display:block;width:100%;height:12px;accent-color:var(--teal)}
#preparation-cancel{margin-top:14px;min-height:40px}
[data-screen=settings] .flow-track>span{width:66.666%}[data-screen=practice] .flow-track{display:none}
#practice-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:100%}
#practice-toolbar>button{min-height:44px}#practice-toolbar>button span{overflow-wrap:anywhere}
.feedback-bar{flex-direction:row;flex-wrap:wrap;gap:8px 16px}.feedback-bar #feedback{flex:1;min-width:120px}#skip-counts{font-size:12px;color:var(--muted)}
#feedback[data-tone=wrong]{color:#9d302b;background:#fff1ef;border-left:3px solid #c3473d;border-radius:4px;padding:8px 10px;font-weight:600;line-height:1.45}
@media(max-width:900px){.feedback-bar .heard{margin-left:auto}}
[data-screen=score] #practice-toolbar,[data-screen=score] #setup-host,[data-screen=settings] #score-options,[data-screen=practice] .settings{display:none}
[data-screen=settings] #practice-toolbar>button:not(#start){display:none}
.settings{display:block;padding:0}.settings label:first-child{margin-top:0}
.practice{border:0;border-radius:0;background:white}.practice-heading{border-bottom:1px solid var(--line)}
.workspace{align-items:start;gap:28px}
[data-screen=practice] .workspace{display:block}
.score-scroll{height:min(56dvh,680px);max-height:none;min-height:240px;overscroll-behavior:contain;overflow-anchor:none}
[data-screen=practice] .score-scroll{height:calc(100dvh - 360px);min-height:240px;max-height:900px}
[data-screen=score] .target-strip,[data-screen=settings] .target-strip,[data-screen=score] #progress,[data-screen=settings] #progress,[data-screen=score] .feedback-bar,[data-screen=settings] .feedback-bar,[data-screen=score] .keyboard-wrap,[data-screen=settings] .keyboard-wrap{display:none}
[data-screen=practice] .keyboard-wrap{display:none}
.history{margin-top:24px;padding-top:16px}.history>summary{cursor:pointer;font-size:14px;font-weight:600;padding:8px 0}.history>summary span:last-child{color:var(--muted);font-weight:400;margin-left:8px}.history[open]>summary{margin-bottom:12px}
[data-active=true] .history{display:none}
#settings-dialog{width:min(420px,calc(100% - 24px));padding:20px;max-height:calc(100dvh - 32px)}
#session-options>label:first-child{margin-top:16px}#settings-dialog .dialog-heading{position:sticky;top:-20px;background:white;padding:8px 0;z-index:1}
#settings-dialog .metronome{margin-top:18px}.flow-title h1:focus{outline:none}
#result-dialog{width:min(640px,calc(100% - 28px));padding:28px;max-height:calc(100dvh - 28px)}
#result-dialog .dialog-heading{color:var(--teal);font-weight:600;margin-bottom:20px}
#result-title{font-size:26px;line-height:1.35;margin:0 0 10px;outline:none;overflow-wrap:anywhere}
#result-message{font-size:16px;color:#203137;margin:0 0 22px}#result-score{overflow-wrap:anywhere;margin:0 0 20px}
.result-counts{display:flex;flex-wrap:wrap;gap:20px;margin:0;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.result-counts>div{flex:1;min-width:120px}.result-counts dt{font-size:13px;color:var(--muted);line-height:1.5}.result-counts dd{font-size:30px;font-weight:600;color:var(--teal);margin:6px 0 0;font-variant-numeric:tabular-nums}
#result-review{border-top:1px solid var(--line);margin-top:16px;padding-top:16px}#result-review h3{font-size:15px;margin:0 0 6px;color:#1d4e58}#result-review p{margin:0 0 8px}#result-review ul{margin:8px 0 0;padding-left:20px;font-size:13px;line-height:1.6;color:#455861}#result-review li+li{margin-top:4px}
#result-save{min-height:20px}.result-actions,.result-secondary{display:flex;gap:12px;flex-wrap:wrap}.result-actions{margin-top:22px}.result-actions>button{flex:1;min-width:140px;min-height:46px}.result-secondary{margin-top:16px}.result-secondary>button{font-size:13px}
@media(max-width:1180px){[data-screen=practice] .flow-heading{flex-wrap:wrap}[data-screen=practice] #practice-toolbar{width:100%;justify-content:flex-start}}
@media(max-width:1039px){.workspace{grid-template-columns:230px minmax(0,1fr)}main{padding:20px}.flow-title h1{font-size:23px}.score-scroll{padding:10px 6px}}
@media(max-width:640px){
 .topbar{padding:10px 14px;min-height:62px}.brand small{display:none}main{padding:14px}.flow-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin-bottom:12px}.flow-title{grid-column:1/-1;grid-row:1}.flow-title h1{font-size:21px}.flow-heading #flow-back{grid-column:1;grid-row:2;justify-self:start;min-height:40px;padding:7px 9px;font-size:12px}.flow-heading #flow-next{grid-column:2;grid-row:2}.flow-heading #practice-toolbar{grid-column:2;grid-row:2;justify-self:end}
 .flow-track{margin-bottom:18px}.workspace{display:flex;gap:20px}.settings{width:100%;display:block}.score-scroll{min-height:220px;height:44dvh}
 #preparation{padding:16px;margin:-2px 0 18px}
 [data-screen=practice] .topbar{display:none}[data-screen=practice] .flow-title>span{display:none}[data-screen=practice] .flow-title h1{font-size:19px}
 [data-screen=practice] #practice-toolbar{display:grid;grid-column:1/-1;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:52px;width:100%;gap:6px}[data-screen=practice] #practice-toolbar>button{min-width:0;padding:8px 6px;font-size:12px;gap:5px;height:100%}
 #result-dialog{padding:20px}#result-title{font-size:23px}.result-counts{gap:14px}.result-counts>div{min-width:100px}#result-open{font-size:12px;padding:6px}.practice-heading{flex-wrap:wrap}
 [data-screen=practice] .practice-heading{padding:10px 12px}[data-screen=practice] .practice-heading h2{font-size:15px}[data-screen=practice] .practice-heading p{font-size:11px}
 [data-screen=practice] .target-strip{padding:10px 12px}[data-screen=practice] .target strong{font-size:20px}
 [data-screen=practice] .score-scroll{height:calc(100dvh - 290px);min-height:210px}
 .feedback-bar{font-size:12px;min-height:58px;padding:10px 12px}
}
@media(max-height:600px) and (orientation:landscape){[data-screen=practice] .topbar{display:none}}
[data-screen=practice] main{height:calc(100dvh - 80px);min-height:0;display:flex;flex-direction:column}
[data-screen=practice] .flow-heading{flex-shrink:0}
[data-screen=practice] .workspace{flex:1;min-height:0}
[data-screen=practice] .practice{height:100%;min-height:0;display:flex;flex-direction:column}
[data-screen=practice] .practice-heading,[data-screen=practice] .target-strip,[data-screen=practice] #progress,[data-screen=practice] .feedback-bar{flex-shrink:0}
[data-screen=practice] .score-scroll{flex:1;min-height:0;height:auto;max-height:none}
@media(max-width:640px),(max-height:600px) and (orientation:landscape){
 body[data-screen=practice]{overflow:hidden}
 [data-screen=practice] main{height:100dvh;min-height:0;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overflow:hidden}
 [data-screen=practice] #notice{max-height:20dvh;overflow:auto;flex-shrink:0}
}
@media(max-width:640px){
 [data-screen=practice] .flow-title{padding-right:48px}
 [data-screen=practice] #practice-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) repeat(3,40px);grid-auto-rows:42px;gap:4px}
 [data-screen=practice] #practice-toolbar>button{padding:5px;font-size:11px}
 [data-screen=practice] #stop span,[data-screen=practice] #restart span,[data-screen=practice] #settings-open span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 [data-screen=practice] .practice-heading>div:first-child{flex:1}
 [data-screen=practice] #score-info{display:none}
}
@media(max-height:600px) and (orientation:landscape){
 [data-screen=practice] .intro-help{width:36px;height:36px;padding:7px;top:10px;right:max(12px,env(safe-area-inset-right))}
 [data-screen=practice] .flow-heading{display:flex;flex-wrap:nowrap;gap:8px;margin-bottom:6px;padding-right:46px;min-height:42px}
 [data-screen=practice] .flow-title{display:none}
 [data-screen=practice] .flow-heading #flow-back{width:40px;height:40px;min-height:40px;padding:8px}
 [data-screen=practice] #practice-toolbar{display:flex;width:auto;flex:1;min-width:0;flex-wrap:nowrap;justify-content:flex-end;gap:6px}
 [data-screen=practice] #practice-toolbar>button{width:42px;height:40px;min-height:40px;padding:8px;flex:none;font-size:13px}
 [data-screen=practice] #practice-toolbar>#start,[data-screen=practice] #practice-toolbar>#skip{width:auto}
 [data-screen=practice] #flow-back span,[data-screen=practice] #stop span,[data-screen=practice] #restart span,[data-screen=practice] #settings-open span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 [data-screen=practice] .practice{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 3px minmax(0,1fr) auto}
 [data-screen=practice] .practice-heading{grid-column:2;grid-row:1;padding:6px 8px;border:0;align-items:center}
 [data-screen=practice] .practice-heading>div:first-child{display:none}
 [data-screen=practice] .badge{max-width:none;font-size:11px;padding:4px 6px}
 [data-screen=practice] .target-strip{grid-column:1;grid-row:1;padding:6px 8px;border:0;gap:12px;align-items:center}
 [data-screen=practice] .target>span{display:none}
 [data-screen=practice] .target strong{font-size:17px;min-height:0}
 [data-screen=practice] .target-position{flex-direction:row;gap:10px;font-size:12px}
 [data-screen=practice] #progress{grid-column:1/-1;grid-row:2}
 [data-screen=practice] .score-scroll{grid-column:1/-1;grid-row:3;padding:4px 6px}
 [data-screen=practice] .feedback-bar{grid-column:1/-1;grid-row:4;min-height:30px;padding:4px 8px;gap:6px 12px;flex-direction:row;align-items:center;font-size:12px}
 [data-screen=practice] .feedback-bar #feedback{min-width:0}
 [data-screen=practice] .feedback-bar button{min-height:28px;padding:3px 6px;font-size:11px}
}

/* Overlay controls never resize or reflow the score while a student is playing. */
body[data-score-focus=true]{overflow:hidden;background:#fff}
[data-score-focus=true] .topbar,[data-score-focus=true] .flow-title,[data-score-focus=true] .practice-heading,[data-score-focus=true] .target-strip,[data-score-focus=true] #progress{display:none}
[data-score-focus=true] main{height:100dvh;min-height:0;padding:env(safe-area-inset-top) max(6px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px,env(safe-area-inset-left));overflow:hidden}
[data-score-focus=true] .workspace,[data-score-focus=true] .practice{display:block;height:100%;min-height:0}
[data-score-focus=true] .score-scroll{height:100%;min-height:0;max-height:none;padding:6px;touch-action:pan-x pan-y;outline-offset:-3px}
[data-score-focus=true] .flow-heading{position:fixed;z-index:40;top:0;left:0;right:0;display:grid;grid-template-columns:1fr auto;gap:6px;margin:0;padding:max(6px,env(safe-area-inset-top)) calc(max(6px,env(safe-area-inset-right)) + 50px) 8px max(6px,env(safe-area-inset-left));background:#fffffff5;box-shadow:0 3px 12px #18343b20;min-height:0}
[data-score-focus=true] .flow-heading #flow-back{grid-column:1;grid-row:1;justify-self:start;width:44px;height:44px;min-height:44px;padding:10px}
[data-score-focus=true] #flow-back span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
[data-score-focus=true] #focus-hide{display:inline-flex;grid-column:2;grid-row:1;width:44px;height:44px;min-height:44px;padding:10px}
[data-score-focus=true] .flow-heading #practice-toolbar{display:flex;grid-column:1/-1;grid-row:2;width:calc(100% + 50px);max-width:none;justify-self:start;gap:6px;justify-content:space-between;flex-wrap:nowrap}
[data-score-focus=true] #practice-toolbar>button span{overflow-wrap:normal}
[data-score-focus=true] #practice-toolbar>button{flex:none;min-width:0;width:44px;height:44px;min-height:44px;padding:7px;font-size:12px}
[data-score-focus=true] #practice-toolbar>#start{flex:1;width:auto}
[data-score-focus=true] #practice-toolbar>#skip{flex:1.4;width:auto}
[data-score-focus=true] #stop span,[data-score-focus=true] #restart span,[data-score-focus=true] #settings-open span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
[data-score-focus=true] .intro-help{z-index:42;top:max(6px,env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right));width:44px;height:44px;padding:10px}
[data-score-focus=true] .feedback-bar{position:fixed;z-index:40;bottom:0;left:0;right:0;min-height:44px;padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#fffffff5;box-shadow:0 -2px 12px #18343b16;font-size:12px;max-height:30dvh;overflow:auto}
[data-score-focus=true][data-active=false] .practice-heading{display:flex;position:fixed;z-index:40;bottom:calc(80px + env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));padding:6px;background:#fff;border:1px solid var(--line);gap:8px}
[data-score-focus=true][data-active=false] .practice-heading>div:first-child{display:none}
[data-score-focus=true] #notice:not([hidden]){position:fixed;z-index:45;top:120px;left:12px;right:12px;max-height:30dvh;overflow:auto}
[data-score-focus=true] .flow-heading,[data-score-focus=true] .feedback-bar,[data-score-focus=true] .intro-help{transition:opacity .18s,transform .18s,visibility .18s}
[data-score-focus=true][data-controls-visible=false] .flow-heading,[data-score-focus=true][data-controls-visible=false] .intro-help{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-100%)}
[data-score-focus=true][data-controls-visible=false] .feedback-bar{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(100%)}
@media(orientation:landscape){
 [data-score-focus=true] .flow-heading{display:flex;align-items:center}
 [data-score-focus=true] .flow-heading #practice-toolbar{flex:1;width:auto;justify-content:flex-end}
 [data-score-focus=true] #practice-toolbar>button{flex:none;width:44px}
 [data-score-focus=true] #practice-toolbar>#start,[data-score-focus=true] #practice-toolbar>#skip{flex:none;width:auto}
 [data-score-focus=true] #focus-hide{order:3;flex:none}
 [data-score-focus=true] #notice:not([hidden]){top:64px}
}
@media(prefers-reduced-motion:reduce){[data-score-focus=true] .flow-heading,[data-score-focus=true] .feedback-bar,[data-score-focus=true] .intro-help{transition:none}}
