/* One footer, shared by the page and its active dialog. */
html{scroll-padding-bottom:calc(var(--keyboard-dock-height,100px) + 14px)}
body.has-keyboard-footer{padding-bottom:var(--keyboard-extra-space,44px)}
.keyboard-dock.audio-dock,.keyboard-dock.study-player,.keyboard-dock.foundation-player{display:block;height:auto;padding-top:10px;padding-bottom:0}
.keyboard-transport-row{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;min-width:0}
.keyboard-footer{display:flex;align-items:center;gap:14px;min-width:0;padding:6px 0;margin-top:8px;border-top:1px solid #d2d8c8;color:#294b42;font:14px/1.4 var(--sans,system-ui,sans-serif);background:#fffef8;box-sizing:border-box;flex:0 0 auto}
.keyboard-footer kbd,.keyboard-help kbd{font:500 12px/1.35 system-ui,sans-serif;display:inline-block;white-space:nowrap;border:1px solid #c9cfbf;border-bottom-width:2px;border-radius:4px;background:#f6f6ef;color:#28443c;padding:2px 5px;box-sizing:border-box}
.keyboard-target{display:flex;align-items:center;gap:7px;margin:0!important;flex-shrink:0;font:inherit!important}.keyboard-target>span{font-size:12px;color:#617368}
.keyboard-target select{font:600 14px/1.3 var(--sans,system-ui,sans-serif);color:#204c3e;background:#edf2e0;border:1px solid #a5b69b;border-radius:5px;padding:5px 20px 5px 7px;min-height:30px;width:133px;max-width:180px;cursor:pointer}
.keyboard-position{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px;color:#496157}
.keyboard-hints{display:flex;align-items:center;gap:15px;min-width:0;flex:1;white-space:nowrap;overflow:hidden;font-size:13px}.keyboard-hints>span{display:inline-flex;align-items:center;gap:5px}.keyboard-hints .keyboard-message{white-space:normal;font-weight:600}
.keyboard-footer .keyboard-help-button{display:flex;align-items:center;gap:7px;flex-shrink:0;margin-left:auto;font:inherit;padding:4px 7px;min-height:30px;color:#204c3e;background:transparent;border:1px solid transparent;border-radius:4px;cursor:pointer}.keyboard-help-button:hover{background:#edf2e0;border-color:#c2ceba}
.keyboard-footer :focus-visible,.keyboard-help :focus-visible,[data-music-workspace]:focus-visible{outline:2px solid #245643;outline-offset:3px}
.keyboard-dialog-footer{position:sticky;bottom:-20px;margin:16px -20px -20px;padding:10px 20px;z-index:2;background:#fffef8f5;backdrop-filter:blur(12px);box-shadow:0 -5px 12px #fffef8}
.keyboard-standalone{position:fixed;bottom:0;left:0;right:0;z-index:30;padding:8px 20px}
#keyboard-help{width:min(720px,calc(100vw - 28px));max-width:720px;max-height:min(820px,calc(100dvh - 32px));padding:0;overflow:hidden;border:1px solid #a2b09a;border-radius:12px;background:#fffef8;color:#233e34;box-shadow:0 18px 70px #10271a33;box-sizing:border-box}
#keyboard-help[open]{display:flex;flex-direction:column}#keyboard-help::backdrop{background:#172b2470}
.keyboard-help-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px 26px 16px}.keyboard-help-head h2{font:600 24px/1.25 var(--sans,system-ui,sans-serif);margin:0;color:#203e32}.keyboard-help-head p{font:14px/1.45 var(--sans,system-ui,sans-serif);margin:7px 0 0;color:#536b5d}
.keyboard-help-head button{display:flex;align-items:center;gap:8px;padding:6px 8px;border:0;border-radius:5px;background:transparent;color:#355248;font:14px var(--sans,system-ui,sans-serif);cursor:pointer}
.keyboard-help-tools{padding:0 26px 16px;border-bottom:1px solid #d9dece}.keyboard-search{display:block}.keyboard-search input{display:block;width:100%;font:16px var(--sans,system-ui,sans-serif);padding:11px 13px;border:1px solid #acbba1;border-radius:6px;background:white;color:#233e34;box-sizing:border-box}.keyboard-help-filters{display:flex;gap:8px;margin-top:12px}.keyboard-help-filters button{font:14px var(--sans,system-ui,sans-serif);padding:6px 10px;border:1px solid transparent;border-radius:5px;background:transparent;color:#405c4d;cursor:pointer}.keyboard-help-filters button[aria-pressed=true]{background:#eaf0dd;border-color:#b6c5a5;color:#204b39;font-weight:600}
.keyboard-help-results{padding:6px 26px 18px;overflow-y:auto;overscroll-behavior:contain;min-height:80px;flex:1}.shortcut-group{margin:0 0 14px}.shortcut-group h3{font:600 15px var(--sans,system-ui,sans-serif);color:#536b5d;margin:22px 0 5px}.shortcut-group dl{margin:0}.shortcut-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:10px 0;border-bottom:1px solid #edf0e5;font:15px/1.4 var(--sans,system-ui,sans-serif)}.shortcut-row dt{min-width:0}.shortcut-row dt small{display:block;color:#607365;font-size:12px;line-height:1.45;margin-top:3px}.shortcut-row dd{margin:0;display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-shrink:0;max-width:48%;flex-wrap:wrap}.shortcut-combination{display:inline-flex;gap:3px;align-items:center}.shortcut-plus,.shortcut-or{font:11px system-ui;color:#748174}.shortcut-empty{font:15px/1.6 var(--sans,system-ui,sans-serif);padding:30px 0;text-align:center;color:#536b5d}
.keyboard-preferences{padding:13px 26px;border-top:1px solid #d9dece;background:#f7f8f1;font:14px/1.5 var(--sans,system-ui,sans-serif)}.keyboard-preferences summary{cursor:pointer;font-size:14px}.keyboard-preferences label{display:flex;align-items:center;gap:8px;margin:12px 0}.keyboard-preferences input{accent-color:#28533f}.keyboard-preferences p{font:13px/1.5 var(--sans,system-ui,sans-serif);color:#536b5d;margin:8px 0}
@media(max-width:1000px){.keyboard-position{display:none}.keyboard-hints{gap:10px}}
@media(max-width:650px){.keyboard-footer{display:grid;grid-template-columns:1fr auto;gap:5px 10px;padding:7px 0}.keyboard-target select{width:146px}.keyboard-help-button{grid-column:2;grid-row:1}.keyboard-hints{grid-column:1/-1;font-size:12px;gap:12px}.keyboard-footer kbd{font-size:11px;padding:1px 4px}.keyboard-hints>span:nth-child(n+3){display:none}.keyboard-dialog-footer{padding:8px 16px}.keyboard-standalone{padding:7px 14px}.keyboard-transport-row{gap:8px 12px}.keyboard-help-head{padding:18px 18px 12px}.keyboard-help-head h2{font-size:21px}.keyboard-help-tools{padding:0 18px 12px}.keyboard-help-results{padding:0 18px 14px}.keyboard-preferences{padding:12px 18px}.shortcut-row{font-size:14px;gap:10px}.shortcut-row dd{max-width:45%}}
.keyboard-note-selected .notehead,.keyboard-note-selected>ellipse{filter:drop-shadow(0 0 2px #60873c)}[data-keyboard-note]:focus{outline:none}[data-keyboard-note]:focus .note-halo,[data-keyboard-note]:focus .study-note-halo{stroke:#245643;stroke-width:2;fill:#e4edbf}[data-keyboard-note]:focus .notehead{filter:drop-shadow(0 0 3px #245643)}
[data-keyboard-context="browse"] .active-note .note-halo{stroke:transparent;fill:transparent}
.keyboard-beat-selected .notehead{filter:drop-shadow(0 0 4px #82984b)}
.keyboard-beat-selected .note-halo{fill:#e4edbc;stroke:#768a5f;stroke-width:1}
.singing-step:focus{outline:2px solid #285648;outline-offset:5px;border-radius:3px}

#comparison-reference-score svg{display:block;width:100%;height:auto}

[data-keyboard-context="browse"] .study-note.selected:not(.sounding) .study-note-halo{fill:transparent;stroke:transparent}
[data-keyboard-context="notes"] .study-note.selected:not(.keyboard-note-selected):not(.sounding) .study-note-halo{fill:transparent;stroke:transparent}
.keyboard-note-selected:not(.sounding) .study-note-halo{fill:#e4edbc;stroke:#285648;stroke-width:2}
.keyboard-footer .sr-only,.keyboard-help .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:650px){.keyboard-footer[data-context="notes"] .keyboard-hints>span:nth-child(3),.keyboard-footer[data-context="pitch"] .keyboard-hints>span:nth-child(3){display:inline-flex}.keyboard-footer[data-context="pitch"] .keyboard-hints>span:nth-child(2){display:none}}

.keyboard-footer [hidden]{display:none!important}
