/* Piano Pro: a compact workspace with persistent fullscreen access. */
html[data-chord-edition="piano"] #root>div{min-height:calc(calc(var(--studio-app-height, 100dvh) * 1) - 38px)!important}
html[data-chord-edition="piano"] #root header{position:relative!important;padding:8px 12px!important}
html[data-chord-edition="piano"] #root header>div{max-width:none!important;padding:0!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap;gap:8px!important;justify-content:flex-start!important;align-items:center}
html[data-chord-edition="piano"] #root header>div>div:first-child{margin-inline-end:auto;padding-left:220px!important}
html[data-chord-edition="piano"] #root header h1{font-size:21px!important;line-height:1.3!important}
html[data-chord-edition="piano"] #root header p{display:none!important}
html[data-chord-edition="piano"] #root header>div>div:last-child{width:100%;justify-content:flex-start;gap:8px!important}
html[data-chord-edition="piano"] .pro-fullscreen-button{position:fixed!important;top:12px!important;left:70px!important;right:auto!important;z-index:10001!important;width:146px;min-height:54px!important;padding:10px 12px!important;border:2px solid #63c9ef!important;border-radius:13px!important;background:#17415e!important;color:#f1fbff!important;font:800 16px/1.25 system-ui!important;box-shadow:0 0 0 4px #38bdf821,0 4px 12px #0003!important;white-space:nowrap}
html[data-chord-edition="piano"] .mtp-theme-header div:has(>#theme-picker-btn){position:fixed!important;top:12px!important;left:12px!important;right:auto!important;z-index:10002}
html[data-chord-edition="piano"] #theme-picker-btn{width:46px!important;height:46px!important}
html[data-chord-edition="piano"] #root main{padding:10px 16px!important;gap:8px!important;max-width:1500px!important;flex:0 0 auto!important}
html[data-chord-edition="piano"] #root main>div.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
html[data-chord-edition="piano"] #root main>div.grid>div{grid-column:auto!important;min-width:0;gap:8px!important}
html[data-chord-edition="piano"] #root main>div.grid>div:has(>#grand-staff-card)>div:not(#grand-staff-card){display:none!important}
html[data-chord-edition="piano"] .piano-dictionary-bar{margin:0!important;padding:0!important;min-height:28px}
html[data-chord-edition="piano"] #grand-staff-card,html[data-chord-edition="piano"] #piano-keyboard-widget{padding-top:36px!important;min-width:0;min-height:0!important}
html[data-chord-edition="piano"] .mtp-collapse-toggle{top:5px!important;width:28px!important;min-width:28px!important;height:26px!important;min-height:26px!important;font-size:20px!important}
html[data-chord-edition="piano"] #grand-staff-card>div:first-child{padding:6px 10px!important;gap:5px!important}
html[data-chord-edition="piano"] #grand-staff-card>div:nth-child(2){min-height:0!important;padding:6px!important;gap:4px!important}
html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(170px,calc(var(--studio-app-height, 100dvh) * 0.29),240px)!important;min-height:0!important}
html[data-chord-edition="piano"] #vexflow-staff-wrapper svg{height:100%!important;max-width:100%!important}
html[data-chord-edition="piano"] #grand-staff-card>div:nth-child(3){padding:6px 10px!important;gap:5px!important}
html[data-chord-edition="piano"] #piano-quick-chord{display:flex!important;flex-wrap:wrap;align-items:center!important;gap:5px!important;padding-top:5px!important}
html[data-chord-edition="piano"] #piano-quick-chord select{min-height:30px!important;height:30px!important;font-size:13px!important;padding:3px 6px!important}
html[data-chord-edition="piano"] #piano-quick-root{width:65px!important;flex:0 0 65px}
html[data-chord-edition="piano"] #piano-quick-quality{min-width:100px!important;flex:1;max-width:190px!important}
html[data-chord-edition="piano"] #piano-quick-voicing{max-width:180px!important}
html[data-chord-edition="piano"] #piano-quick-name{font-size:23px!important}
html[data-chord-edition="piano"] .quick-spelling button{height:28px!important;min-height:28px!important}
html[data-chord-edition="piano"] #piano-keyboard-widget{padding:36px 10px 10px!important}
html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(2){display:flex!important;flex-wrap:wrap;padding:6px!important;margin:6px 0!important;gap:5px!important}
html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(125px,calc(var(--studio-app-height, 100dvh) * 0.22),190px)!important}
html[data-chord-edition="piano"] #chord-analysis-card[data-mtp-collapsed="true"]{padding:6px 10px!important;min-height:40px!important}
html[data-chord-edition="piano"] #chord-analysis-card[data-mtp-collapsed="true"]::before{line-height:28px;font-size:14px}
html[data-chord-edition="piano"] #root footer{padding:6px!important;font-size:10px!important;margin-top:auto}
html[data-chord-edition="piano"] body>footer{margin:0!important;padding:6px!important;font-size:10px!important}
@media(max-width:649px){
 html[data-chord-edition="piano"] #root header{padding-top:74px!important}
 html[data-chord-edition="piano"] #root header>div>div:first-child{padding:0!important}
 html[data-chord-edition="piano"] #root header h1{font-size:18px!important}
 html[data-chord-edition="piano"] #root main{padding:6px!important}
 html[data-chord-edition="piano"] #root main>div.grid{grid-template-columns:1fr!important;gap:6px!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:160px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:100px!important}
 html[data-chord-edition="piano"] #root button:not(.pro-fullscreen-button):not(.music-term-star){min-height:28px}
 html[data-chord-edition="piano"] #root select{min-height:30px!important;font-size:13px!important}
}
@media(orientation:landscape) and (max-height:600px){
 html[data-chord-edition="piano"] #root header h1{font-size:16px!important}
 html[data-chord-edition="piano"] #root header>div>div:first-child{padding-left:220px!important}
 html[data-chord-edition="piano"] #root header>div>div:last-child{width:auto!important}
 html[data-chord-edition="piano"] .pro-mobile-settings{display:inline-flex!important;padding:4px 8px!important;min-height:30px!important}
 html[data-chord-edition="piano"] #root header [data-pro-settings-open=false]>:not(.pro-mobile-settings):not(.pro-fullscreen-button):not(:has(#theme-picker-btn)){display:none!important}
 html[data-chord-edition="piano"] #root header>div{gap:4px!important}
 html[data-chord-edition="piano"] #root button:not(.pro-fullscreen-button):not(.music-term-star){min-height:26px}
 html[data-chord-edition="piano"] #root select{min-height:28px!important;font-size:12px!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:130px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:100px!important}
 html[data-chord-edition="piano"] #piano-quick-chord::before{display:none}
 html[data-chord-edition="piano"] #grand-staff-card,html[data-chord-edition="piano"] #piano-keyboard-widget{padding-top:30px!important}
}
html[data-chord-edition="piano"] body{padding-top:0!important}
html[data-chord-edition="piano"] #root header>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;padding-left:220px!important}
html[data-chord-edition="piano"] #root header>div>div:first-child{padding:0!important;margin:0!important}
html[data-chord-edition="piano"] #root header>div>div:last-child{grid-column:1/-1}
html[data-chord-edition="piano"] #root header .piano-volume-knob-control{transform:scale(.75);transform-origin:center;max-height:48px}
html[data-chord-edition="piano"] #root header .compact-volume-host{padding:0!important;height:48px!important}
html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:180px!important}
html[data-chord-edition="piano"] #vexflow-staff-wrapper~div{margin-top:3px!important;padding-top:3px!important;font-size:10px!important;gap:3px!important;display:flex!important;flex-wrap:wrap;align-items:center;justify-content:center}
html[data-chord-edition="piano"] #vexflow-staff-wrapper~div>div{padding:3px 5px!important;margin:0!important;font-size:10px!important}
html[data-chord-edition="piano"] #root footer{line-height:16px!important}
@media(max-width:649px){
 html[data-chord-edition="piano"] #root header>div{display:flex!important;padding:0!important;gap:4px!important}
 html[data-chord-edition="piano"] #root header>div>div:first-child{width:100%}
 html[data-chord-edition="piano"] #root header>div>div:last-child{width:auto!important}
 html[data-chord-edition="piano"] #root header>div>div:nth-child(2) svg{width:18px!important;height:18px!important}
 html[data-chord-edition="piano"] #root header>div>div:nth-child(2) button{font-size:11px!important;padding:4px!important}
 html[data-chord-edition="piano"] #piano-scale-tab{padding:4px!important;font-size:12px}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:120px!important}
 html[data-chord-edition="piano"] #grand-staff-card>div:first-child>div:first-child{font-size:11px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child{font-size:10px!important;padding-bottom:4px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child *{font-size:10px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(2){margin:3px 0!important;padding:3px!important;gap:3px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(4){font-size:9px!important;margin-top:3px!important}
 html[data-chord-edition="piano"] #root footer{font-size:9px!important;line-height:13px!important}
}
@media(orientation:landscape) and (max-height:600px){
 html[data-chord-edition="piano"] #root header{padding:4px 8px!important}
 html[data-chord-edition="piano"] #root header>div{grid-template-columns:minmax(0,1fr) auto auto;gap:2px!important}
 html[data-chord-edition="piano"] #root header>div>div:first-child{padding:0!important}
 html[data-chord-edition="piano"] #root header>div>div:last-child{grid-column:1/-1;justify-content:flex-end}
 html[data-chord-edition="piano"] #root header>div>div:nth-child(2) svg{width:16px!important;height:16px!important}
 html[data-chord-edition="piano"] #root header>div>div:nth-child(2) button{font-size:10px!important;padding:3px!important}
 html[data-chord-edition="piano"] #piano-scale-tab{font-size:11px;padding:4px!important}
 html[data-chord-edition="piano"] #root main{padding:4px 8px!important;gap:4px!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:100px!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper~div{display:none!important}
 html[data-chord-edition="piano"] #grand-staff-card>div:first-child{padding:3px 6px!important}
 html[data-chord-edition="piano"] #piano-quick-chord select{height:26px!important;min-height:26px!important}
 html[data-chord-edition="piano"] #piano-quick-name{font-size:18px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child{font-size:10px!important;padding:0!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child *{font-size:10px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(2){margin:3px 0!important;padding:3px!important;font-size:10px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:80px!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(4){font-size:9px!important;margin-top:3px!important}
 html[data-chord-edition="piano"] #root footer{padding:3px!important;line-height:12px!important;font-size:8px!important}
}
.piano-panel-settings{display:none}
@media(max-width:649px),(orientation:landscape) and (max-height:600px){
 html[data-chord-edition="piano"] #root .piano-panel-settings{display:block;position:absolute;top:4px;right:8px;z-index:12;border:1px solid #7186a0;border-radius:7px;background:#24354b;color:white;font-size:11px;padding:3px 8px;min-height:26px}
 html[data-chord-edition="piano"] #grand-staff-card>div:first-child>div:first-child{display:none!important}
 html[data-chord-edition="piano"] #grand-staff-card:not(.piano-options-open)>div:first-child>div:nth-child(2),html[data-chord-edition="piano"] #piano-keyboard-widget:not(.piano-options-open)>div:nth-child(2){display:none!important}
 html[data-chord-edition="piano"] #grand-staff-card.piano-options-open>div:first-child>div:nth-child(2),html[data-chord-edition="piano"] #piano-keyboard-widget.piano-options-open>div:nth-child(2){position:absolute;top:32px;inset-inline:6px;z-index:20;display:flex!important;flex-wrap:wrap;padding:10px!important;border:1px solid #7186a0;border-radius:9px;background:#24354b;color:white;box-shadow:0 4px 15px #0008}
 html[data-chord-edition="piano"] #root #grand-staff-card #piano-quick-chord{display:flex!important;gap:4px!important;padding:0!important}
 html[data-chord-edition="piano"] #root #piano-quick-chord>select{flex:1 1 90px!important;max-width:none!important;width:0!important;min-width:0!important}
 html[data-chord-edition="piano"] #root #piano-quick-chord #piano-quick-root{flex:0 0 55px!important;width:55px!important}
 html[data-chord-edition="piano"] #root #piano-quick-chord #piano-quick-name{font-size:19px!important}
 html[data-chord-edition="piano"] #root #piano-quick-voicing{flex-basis:65%!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper~div{display:none!important}
 html[data-chord-edition="piano"] #grand-staff-card.piano-options-open #vexflow-staff-wrapper~div{display:flex!important}
 html[data-chord-edition="piano"] #root .piano-dictionary-bar{min-height:26px!important;height:26px!important}
 html[data-chord-edition="piano"] .piano-dictionary-bar button{padding:2px 8px!important;min-height:26px!important;font-size:11px!important}
 html[data-chord-edition="piano"] #root footer{display:none!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child>div:nth-child(2){gap:4px!important}
 html[data-chord-edition="piano"] #root #piano-keyboard-widget>div:first-child .music-term-star{width:18px!important;height:18px!important;min-height:18px!important;min-width:18px!important;font-size:11px!important}
}
@media(max-width:649px){html[data-chord-edition="piano"] #root header{padding-top:72px!important}html[data-chord-edition="piano"] #root header>div>div:last-child{position:absolute;top:74px;left:8px}html[data-chord-edition="piano"] #root header h1{font-size:16px!important}html[data-chord-edition="piano"] #root header>div>div:first-child>div:first-child{display:none}html[data-chord-edition="piano"] #root header>div>div:first-child{padding-left:100px!important}html[data-chord-edition="piano"] #root header>div>div:nth-child(2){margin-top:5px}html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child{gap:3px!important}html[data-chord-edition="piano"] #piano-keyboard-widget>div:first-child>div:nth-child(2){font-size:9px!important}}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:90px!important}html[data-chord-edition="piano"] #root header>div>div:last-child{position:absolute;left:230px;top:38px}html[data-chord-edition="piano"] #root header{min-height:70px}html[data-chord-edition="piano"] #root>div{min-height:calc(calc(var(--studio-app-height, 100dvh) * 1) - 29px)!important}}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:72px!important}html[data-chord-edition="piano"] #root header>div>div:first-child>div:first-child{display:none}}
@media(max-width:649px){html[data-chord-edition="piano"] #root #grand-staff-card,html[data-chord-edition="piano"] #root #piano-keyboard-widget{padding-top:30px!important}html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:100px!important}}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:64px!important}}
/* Use the available desktop height instead of the phone landscape scale. */
@media(min-width:1000px){
 html[data-chord-edition="piano"] #root main{max-width:none!important}
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(200px,calc(calc(var(--studio-app-height, 100dvh) * 1) - 560px),320px)!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(180px,calc(calc(var(--studio-app-height, 100dvh) * 1) - 500px),300px)!important}
}
@media(min-width:1000px) and (max-height:600px){
 html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(150px,calc(calc(var(--studio-app-height, 100dvh) * 1) - 340px),260px)!important}
 html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(140px,calc(calc(var(--studio-app-height, 100dvh) * 1) - 330px),250px)!important}
}
@media(min-width:1000px) and (min-height:601px){html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(180px,calc(calc(var(--studio-app-height, 100dvh) * 1) - 540px),265px)!important}}
/* Keyboard and analysis share the same panel position. */
.piano-panel-tabs{display:flex;gap:6px;order:-1;flex:none;padding:4px;border:1px solid #60738e;border-radius:11px;background:#172236}
.piano-panel-tabs button{flex:1;min-height:34px!important;padding:6px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:#cbd5e1;font:700 14px/1.3 system-ui;cursor:pointer}
.piano-panel-tabs button[aria-selected="true"]{background:#375d80;color:#fff;border-color:#72b6db}
.piano-panel-tabs button:focus-visible{outline:2px solid #9bddff;outline-offset:2px}
html[data-chord-edition="piano"] .piano-switching-panels>[data-piano-tab-active="false"]{display:none!important}
html[data-chord-edition="piano"] .piano-switching-panels>[data-piano-tab-active="true"]{display:block!important}
html[data-chord-edition="piano"] #chord-analysis-card{padding:12px!important;gap:6px!important}
html[data-chord-edition="piano"] #chord-analysis-card>div{margin-top:6px!important;padding-top:6px!important;gap:6px!important}
html[data-chord-edition="piano"] #piano-keyboard-widget{padding-top:12px!important}
@media(max-width:649px),(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #piano-keyboard-widget{padding-top:36px!important}.piano-panel-tabs button{min-height:28px!important;font-size:12px;padding:4px}.piano-panel-tabs{padding:2px;gap:3px}}
html[data-chord-edition="piano"] #chord-analysis-card>div:first-child{padding:0 0 6px!important;margin:0!important}
html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>div{grid-template-columns:repeat(auto-fit,minmax(58px,1fr))!important;gap:4px!important}
html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>div>div{padding:5px 2px!important;min-width:0}
html[data-chord-edition="piano"] #chord-analysis-card .music-term-star{min-width:18px!important;width:18px!important;min-height:18px!important;height:18px!important;padding:0!important;font-size:11px!important}
@media(max-width:649px),(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #chord-analysis-card>div:first-child>div:first-child>div:first-child{font-size:18px!important}html[data-chord-edition="piano"] #chord-analysis-card>div:first-child{font-size:11px!important}html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>div>div>div:last-child{font-size:9px!important;white-space:normal!important;line-height:12px}html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>h4{font-size:11px!important;margin-bottom:4px}.piano-analysis-full{margin-top:6px;padding:4px 8px}}
@media(orientation:landscape) and (max-height:600px){
 html[data-chord-edition="piano"] #chord-analysis-card{padding:7px!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:first-child>div:first-child>div:nth-child(2){display:none!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:first-child>div:first-child>div:first-child{font-size:13px!important;line-height:18px!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:first-child>div:first-child>div:first-child span{font-size:13px!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:first-child button{padding:2px 5px!important;font-size:10px!important;min-height:22px!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>div>div>div{font-size:10px!important;line-height:13px!important;margin:0!important}
 html[data-chord-edition="piano"] #chord-analysis-card>div:nth-child(2)>div>div{padding:3px 1px!important}
}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #chord-analysis-card{padding:4px!important}}
/* Reserve the home button's corner so it cannot cover the app title. */
html[data-chord-edition="piano"] #root header>div>div:first-child{padding-right:64px!important;box-sizing:border-box;min-width:0}
@media(max-width:649px){html[data-chord-edition="piano"] #root header>div>div:first-child{padding-right:0!important}}
.piano-studio-brand{display:flex;align-items:center;gap:7px;direction:ltr;justify-content:flex-end;color:var(--text-main,#eef4fc);font:800 17px/1.2 system-ui;white-space:nowrap}.piano-studio-brand img{width:29px;height:29px;object-fit:contain;flex:none}.piano-old-brand-icon{display:none!important}
@media(max-width:649px){.piano-studio-brand{font-size:14px;gap:5px}.piano-studio-brand img{width:24px;height:24px}}
/* Use the viewport as the workspace budget, including the studio lockup. */
html[data-chord-edition="piano"] #root>div{height:calc(var(--studio-app-height, 100dvh) * 1)!important;min-height:0!important;display:flex!important;flex-direction:column!important}
html[data-chord-edition="piano"] #root header{flex:none!important}
html[data-chord-edition="piano"] #root main{flex:1 1 0!important;min-height:0!important;width:100%!important;max-width:none!important;display:flex!important;flex-direction:column!important;padding:7px 12px!important}
html[data-chord-edition="piano"] #root main>div.grid{flex:1;min-height:0;align-items:stretch!important}
html[data-chord-edition="piano"] #root main>div.grid>div{min-height:0!important}
html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(110px,calc(var(--studio-app-height, 100dvh) * 0.24),210px)!important}
html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(95px,calc(var(--studio-app-height, 100dvh) * 0.18),165px)!important}
@media(min-width:650px){html[data-chord-edition="piano"] #root header h1{font-size:17px!important;line-height:1.2!important}.piano-studio-brand{font-size:15px}.piano-studio-brand img{width:25px;height:25px}}
@media(max-width:649px){html[data-chord-edition="piano"] #root main>div.grid{align-content:start!important}html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(90px,calc(var(--studio-app-height, 100dvh) * 0.17),145px)!important}html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(75px,calc(var(--studio-app-height, 100dvh) * 0.13),115px)!important}}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #root main{padding:4px 9px!important;gap:4px!important}html[data-chord-edition="piano"] #vexflow-staff-wrapper{height:clamp(75px,calc(var(--studio-app-height, 100dvh) * 0.24),135px)!important}html[data-chord-edition="piano"] #piano-keyboard-widget>div:nth-child(3){height:clamp(65px,calc(var(--studio-app-height, 100dvh) * 0.21),110px)!important}.piano-studio-brand{font-size:13px}.piano-studio-brand img{width:23px;height:23px}}
html[data-chord-edition="piano"] #root>div{height:calc(calc(var(--studio-app-height, 100dvh) * 1) - 38px)!important}
/* Keep the shortcut row inside the staff card instead of clipping its controls. */
html[data-chord-edition="piano"] #grand-staff-card{overflow:visible!important;flex-shrink:0!important}
html[data-chord-edition="piano"] #grand-staff-card>div:nth-child(3){min-height:44px!important;flex-shrink:0!important;padding:7px 12px!important;align-items:center!important;box-sizing:border-box;border-radius:0 0 15px 15px}
html[data-chord-edition="piano"] .piano-play-shortcuts{display:flex;align-items:center;gap:7px;min-height:30px;line-height:1.2}
html[data-chord-edition="piano"] .piano-play-shortcuts button{height:29px!important;min-height:29px!important;width:34px;line-height:1!important;padding:3px 7px!important;flex:none}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition="piano"] #grand-staff-card>div:nth-child(3){min-height:36px!important;padding:4px 8px!important}}
/* Consistent top controls and playback style beside the dictionary. */
html[data-chord-edition=piano] .pro-fullscreen-button{left:124px!important}
.piano-top-language{position:fixed!important;left:67px!important;top:15px!important;z-index:10002!important;min-width:43px!important;height:40px!important;padding:7px!important}
html[data-chord-edition=piano] #root header .piano-top-volume{position:fixed!important;top:10px!important;left:285px!important;z-index:10001!important;height:49px!important;padding:0 5px!important;background:var(--mtp-card,#1e293b)}
html[data-chord-edition=piano] #root header>div>div:first-child{padding-left:425px!important}
.piano-dictionary-bar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
html[data-chord-edition=piano] .piano-dictionary-bar #playback-style-select{display:block!important;min-height:32px!important;height:32px!important;max-width:240px;padding:4px 10px!important;border-radius:8px;border:1px solid #637791;background:#203249;color:#eef5ff;font-size:13px!important}
body[data-piano-scales=true] #root main{display:none!important}
html[data-chord-edition=piano] #piano-scale-learning:not([hidden]){flex:1;min-height:0;margin:8px 12px;padding:12px;width:calc(100% - 24px);max-width:none;display:flex;flex-direction:column;gap:8px}
#piano-scale-learning h2{font-size:22px;margin:0}#piano-scale-learning>p{margin:0;font-size:13px;line-height:1.4}#piano-scale-learning .scale-tools{gap:8px}#piano-scale-learning .scale-tools select,#piano-scale-learning .scale-tools button,#piano-scale-learning .scale-tools a{padding:6px 9px;font-size:13px}
#piano-scale-learning .scale-keyboard{flex:1;min-height:0;display:flex;align-items:center;margin:0;overflow:visible}html[data-chord-edition=piano] #piano-scale-learning .scale-keyboard svg{height:100%!important;max-height:260px!important;object-fit:contain}
html[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){flex:1;min-height:0;display:flex}
html[data-chord-edition=piano] #progression-studio-card{flex:1;min-height:0;padding:10px!important;gap:7px!important}
#progression-studio-card>div:first-child{padding-bottom:5px!important;gap:6px!important}#progression-studio-card>div:first-child p{display:none}
#progression-studio-card>div:nth-child(2){padding:7px!important;gap:7px!important}
.piano-progression-pages{display:flex;gap:7px;flex:none}.piano-progression-pages button{padding:5px 12px;border:1px solid #677990;border-radius:7px;background:#203249;color:white;font:600 12px system-ui}.piano-progression-pages button[aria-pressed=true]{background:#74529a;border-color:#bd98e2}
#progression-studio-card[data-section=chords] .piano-tempo-presets,#progression-studio-card[data-section=tempo] .piano-progression-chords,#progression-studio-card[data-section=tempo] .piano-progression-hint,#progression-studio-card[data-section=tempo] .piano-progression-save{display:none!important}
#progression-studio-card .piano-progression-chords{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:8px!important;min-height:0}
#progression-studio-card .piano-progression-chords>div{padding:8px!important;gap:6px!important}#progression-studio-card .piano-progression-chords select{padding:4px!important;min-height:27px!important;font-size:12px!important}
.piano-progression-save{display:flex;flex-wrap:wrap;gap:5px}.piano-progression-save button{padding:5px 9px!important;font-size:12px!important}.piano-progression-hint{font-size:10px!important}
@media(max-width:649px){html[data-chord-edition=piano] #root header>div>div:first-child{padding-left:0!important;padding-top:51px!important}.piano-top-language{top:14px!important}html[data-chord-edition=piano] #root header .piano-top-volume{left:auto!important;right:12px!important;top:65px!important}.piano-progression-pages button{font-size:10px;padding:4px 8px}#progression-studio-card .piano-progression-chords{grid-template-columns:repeat(2,minmax(0,1fr))!important}#progression-studio-card .piano-progression-chords>div{padding:5px!important}.piano-progression-hint{display:none!important}#piano-scale-learning .scale-tools{gap:5px}#piano-scale-learning .scale-tools select{max-width:160px}#piano-scale-learning .scale-tools label{font-size:11px}#piano-scale-learning>p{font-size:11px}}
@media(orientation:landscape) and (max-height:600px){html[data-chord-edition=piano] #root header>div>div:first-child{padding-left:420px!important}.piano-progression-pages button{padding:3px 9px;font-size:10px}#progression-studio-card .piano-progression-chords>div{padding:4px!important;gap:3px!important}#progression-studio-card .piano-progression-chords select{font-size:10px!important;min-height:22px!important}#progression-studio-card .piano-progression-chords{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))!important}.piano-progression-save button{font-size:10px!important;padding:3px 6px!important}#piano-scale-learning h2{font-size:18px}#piano-scale-learning .scale-tools select,#piano-scale-learning .scale-tools button,#piano-scale-learning .scale-tools a{font-size:11px;padding:4px}#piano-scale-learning .scale-keyboard svg{max-height:140px!important}}
html[data-chord-edition=piano] #root header>div{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto auto;gap:6px 10px!important}
html[data-chord-edition=piano] #root header>div>div:first-child{grid-column:1/-1;grid-row:1;width:100%;min-height:48px;justify-self:stretch;margin:0!important}
html[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){grid-column:1;grid-row:2;justify-self:start}
html[data-chord-edition=piano] #root header #piano-scale-tab{grid-column:2;grid-row:2;justify-self:start;align-self:center}
html[data-chord-edition=piano] #root header>div>div:last-child:not(:first-child){display:contents!important}
@media(max-width:649px){html[data-chord-edition=piano] #root header>div>div:first-child{padding-top:53px!important;padding-right:48px!important;min-height:99px}html[data-chord-edition=piano] #root header .piano-top-volume{top:58px!important;left:12px!important;right:auto!important}html[data-chord-edition=piano] #root header>div{gap:4px!important}}
@media(orientation:landscape) and (max-height:500px){html[data-chord-edition=piano] #vexflow-staff-wrapper{height:48px!important}html[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:50px!important}html[data-chord-edition=piano] #grand-staff-card{padding-top:27px!important}html[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){min-height:30px!important;padding:2px 7px!important}html[data-chord-edition=piano] #root header>div>div:first-child{min-height:43px}html[data-chord-edition=piano] #root header{padding-top:4px!important;padding-bottom:4px!important}}
html[data-chord-edition=piano] #root header .piano-studio-brand .music-term-star,html[data-chord-edition=piano] #root header h1 .music-term-star{display:none!important}
/* Chord editors must shrink to their own card, never to option-label width. */
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>*{min-width:0!important;max-width:100%;box-sizing:border-box}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child{display:grid!important;grid-template-columns:minmax(0,.7fr) minmax(0,1.5fr) 45px!important;gap:4px!important;width:100%;min-width:0;align-items:center;padding-top:7px!important;margin-top:5px!important}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords select{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}
@media(max-width:649px){html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child{grid-template-columns:minmax(0,1fr) 43px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords select:nth-child(2){grid-column:1/-1;grid-row:2}}
/* Three equal, independent top-level tabs, including scale learning. */
html[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){display:flex!important;gap:5px!important;flex-wrap:nowrap;grid-column:1/-1;justify-self:start;max-width:100%}
html[data-chord-edition=piano] #root header #piano-scale-tab{display:inline-flex!important;align-items:center;justify-content:center;align-self:stretch;padding:9px 14px!important;border:1px solid transparent;border-radius:10px;font:700 14px/1.3 inherit;color:#cbd5e1;white-space:nowrap;background:transparent}
html[data-chord-edition=piano] #root header #piano-scale-tab[aria-selected=true]{background:#347df1!important;color:#fff!important;box-shadow:0 3px 12px #2563eb40}
body[data-piano-scales=true] #tab-inspector-btn{background:transparent!important;color:#cbd5e1!important;box-shadow:none!important}
@media(max-width:649px){html[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){width:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px!important}html[data-chord-edition=piano] #root header #piano-scale-tab{font-size:11px!important;padding:7px 5px!important;grid-row:auto;grid-column:auto}html[data-chord-edition=piano] #root header #tab-inspector-btn,html[data-chord-edition=piano] #root header #tab-progressions-btn{font-size:11px!important;padding:7px 5px!important}}
/* Wide screens: put view tabs beside the brand in the first header row. */
@media(min-width:1100px){
html[data-chord-edition=piano] #root header>div{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:12px!important;min-height:56px;align-items:center!important}
html[data-chord-edition=piano] #root header>div>div:first-child{width:auto!important;min-height:48px;padding-left:0!important;padding-right:62px!important;flex:0 0 auto;margin:0!important}
html[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){flex:0 1 auto;margin-left:420px!important;margin-right:auto!important;max-width:calc(100% - 700px);min-width:0;gap:3px!important}
html[data-chord-edition=piano] #root header #tab-inspector-btn,html[data-chord-edition=piano] #root header #tab-progressions-btn,html[data-chord-edition=piano] #root header #piano-scale-tab{font-size:12px!important;padding:7px 9px!important;min-height:36px!important}
html[data-chord-edition=piano] #root header #tab-inspector-btn svg,html[data-chord-edition=piano] #root header #tab-progressions-btn svg{width:20px!important;height:20px!important}
.piano-studio-brand{font-size:15px}.piano-studio-brand img{width:25px;height:25px}
}
/* Reserve real space for card content before the explanatory/footer rows. */
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{flex-shrink:0!important;grid-auto-rows:minmax(130px,auto);min-height:130px!important}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div{display:grid!important;grid-template-rows:auto minmax(40px,1fr) auto;min-height:130px;gap:5px!important;align-content:stretch}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2){margin:0!important;align-self:center}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>span{font-size:21px!important;line-height:1.2!important}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>div{font-size:13px!important;line-height:1.4!important}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-hint{flex:none!important;clear:both;padding-top:5px;min-height:27px}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-save{flex:none!important;position:relative;clear:both;margin-top:0!important;padding-top:5px}
@media(max-height:650px){html[data-chord-edition=piano] #progression-studio-card{gap:4px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-hint{display:none!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{grid-auto-rows:minmax(115px,auto);min-height:115px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div{min-height:115px;padding:4px!important;gap:3px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-save{padding-top:2px}html[data-chord-edition=piano] #progression-studio-card .piano-progression-save button{min-height:24px!important;font-size:10px!important;padding:3px 6px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>span{font-size:18px!important}html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>div{font-size:11px!important}}
/* Numeric sliders increase physically to the right in both interface languages. */
html[data-chord-edition=piano] input[type=range]{direction:ltr!important;writing-mode:horizontal-tb!important}
/* Keep the explanation out of the dashed Add Chord cell. */
html[data-chord-edition=piano] #progression-studio-card .piano-progression-hint{position:static!important;inset:auto!important;width:100%;margin:0!important;align-self:stretch;flex-shrink:0!important;z-index:0}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>button{min-width:0;min-height:115px;height:100%;align-self:stretch;overflow:hidden}
html[data-chord-edition=piano] #progression-studio-card #playback-style-select{display:inline-block!important;min-width:145px;max-width:210px;height:34px!important;min-height:34px!important;padding:5px 9px!important;border:1px solid #637791;border-radius:8px;background:#203249;color:#eef5ff;font:13px system-ui}
/* Compact purple information controls throughout Piano Pro. */
html[data-chord-edition=piano] #root .music-term-star{display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box;width:20px!important;min-width:20px!important;max-width:20px!important;height:21px!important;min-height:21px!important;max-height:21px!important;padding:0!important;border-radius:5px!important;font-size:12px!important;line-height:1!important;flex:0 0 20px!important;vertical-align:middle}
html[data-chord-edition=piano] #root header .piano-studio-brand .music-term-star,html[data-chord-edition=piano] #root header h1 .music-term-star{display:none!important}
/* The floating degree toggle belongs only to the staff inspector. */
body[data-piano-scales=true] #mtc-degtoggle-fab,html[data-chord-edition=piano] body:has(#piano-progression-editor:not([hidden])) #mtc-degtoggle-fab{display:none!important}
#progression-studio-card .piano-rhythm-options{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:8px;padding:5px 10px;border:1px solid #9d7cbb;border-radius:8px;background:#49365f;color:#ead6ff;font:700 12px/1.3 system-ui;white-space:nowrap;cursor:pointer}
#progression-studio-card .piano-rhythm-options[aria-pressed=true]{background:#74529a;border-color:#c6a4e8}
.piano-click-volume{display:flex!important;align-items:center;gap:6px!important;margin-inline-start:8px;flex:none}.piano-native-click-volume{display:none!important}.piano-click-volume>span{font-size:10px!important;max-width:53px;white-space:normal;line-height:1.2}
.piano-click-knob{position:relative;width:43px;height:43px;flex:none;border-radius:50%;border:2px solid #d7aa45;background:radial-gradient(circle at 35% 25%,#53647a,#172334 75%);box-shadow:inset 0 0 0 3px #0c1320,0 2px 6px #0006;cursor:ns-resize;touch-action:none;user-select:none}.piano-click-knob i{position:absolute;left:calc(50% - 1px);top:4px;width:2px;height:10px;background:#ffd567;border-radius:2px;transform-origin:center 15px;transform:rotate(var(--knob-angle))}.piano-click-knob output{position:absolute;inset:0;display:grid;place-items:center;font:700 10px system-ui;color:#fff;pointer-events:none}.piano-click-knob:focus-visible{outline:2px solid #f4c764;outline-offset:3px}
html[data-chord-edition=piano] #progression-studio-card .piano-tempo-presets{display:flex;flex-direction:column!important;align-items:stretch!important;overflow:visible!important;min-width:0;gap:8px!important;flex:1}
.piano-tempo-presets>div:first-child:not(.piano-tempo-catalog){display:none!important}
.piano-tempo-note{margin:0;font-size:12px;color:#c4b5fd}.piano-tempo-catalog{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;width:100%;min-width:0}.piano-tempo-catalog button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px!important;border:1px solid #62758f;border-radius:9px;background:#203249;color:#eef5ff;min-width:0;cursor:pointer}.piano-tempo-catalog strong{font:700 13px system-ui}.piano-tempo-catalog span{font:11px system-ui;color:#c7b4e9}
@media(max-width:649px){.piano-tempo-catalog{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.piano-tempo-catalog button{padding:5px!important}.piano-tempo-catalog strong{font-size:11px}.piano-tempo-catalog span{font-size:10px}.piano-click-knob{width:36px;height:36px}.piano-click-knob i{transform-origin:center 12px}.piano-click-volume{margin-inline-start:4px}}
@media(orientation:landscape) and (max-height:600px){.piano-tempo-catalog{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.piano-tempo-catalog button{padding:3px!important;min-height:32px!important}.piano-tempo-catalog strong{font-size:10px}.piano-tempo-catalog span{font-size:9px}.piano-tempo-note{font-size:10px}.piano-click-knob{width:34px;height:34px}.piano-click-knob i{transform-origin:center 11px}}
html[data-chord-edition=piano] .piano-header-metronome{position:fixed;left:475px;top:7px;width:59px;height:59px;margin:0;border:1px solid #526077;z-index:10000;background:radial-gradient(circle,#080c12 62%,#202c3e);box-shadow:inset 0 0 9px #0008;direction:ltr}
.piano-header-metronome[hidden]{display:none!important}
.piano-header-metronome .pro-circle-beat{width:13px;height:13px;font-size:9px;box-shadow:none}.piano-header-metronome .pro-circle-hand{width:2px;left:calc(50% - 1px);height:40%;transition:transform .08s linear}.piano-header-metronome .pro-circle-beat.is-active{background:#f04d3d;color:white;box-shadow:0 0 7px #f04d3d}
@media(max-width:1099px){html[data-chord-edition=piano] .piano-header-metronome{left:440px;top:7px;width:53px;height:53px}}
@media(max-width:649px){html[data-chord-edition=piano] .piano-header-metronome{left:190px;top:60px;width:42px;height:42px}.piano-header-metronome .pro-circle-beat{width:10px;height:10px;font-size:7px}}
/* Do not let header-wide layout rules stretch the metronome into an ellipse. */
html[data-chord-edition=piano] #root header>.piano-header-metronome{display:block!important;width:59px!important;height:59px!important;min-width:59px!important;max-width:59px!important;min-height:59px!important;max-height:59px!important;aspect-ratio:1/1!important;box-sizing:border-box!important;border-radius:50%!important;padding:0!important;margin:0!important;flex:none!important}
@media(max-width:1099px){html[data-chord-edition=piano] #root header>.piano-header-metronome{width:53px!important;height:53px!important;min-width:53px!important;max-width:53px!important;min-height:53px!important;max-height:53px!important}}
@media(max-width:649px){html[data-chord-edition=piano] #root header>.piano-header-metronome{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;min-height:42px!important;max-height:42px!important}}
html[data-chord-edition=piano] #root header>.piano-header-metronome[hidden]{display:none!important}
.piano-header-metronome .pro-circle-hand{transition:none!important;will-change:transform}
/* Tap tempo is part of the persistent tempo controls, not a clipped second row. */
#progression-studio-card .piano-tempo-controls{display:flex!important;flex-wrap:wrap;align-items:center;gap:7px!important;min-width:0;overflow:visible}
#progression-studio-card .piano-tap-tempo{display:inline-flex!important;visibility:visible!important;opacity:1!important;align-items:center;justify-content:center;flex:none;white-space:nowrap;min-height:30px!important;height:auto!important;padding:5px 9px!important;font-size:11px!important}
html[data-chord-edition=piano] #progression-studio-card>div:nth-child(2){flex-shrink:0!important;overflow:visible!important;min-height:65px}

/* Landscape phones retain the piano desktop workspace; portrait stays unchanged. */
html.studio-phone-fit[data-chord-edition=piano] body{padding:0}
html.studio-phone-fit[data-chord-edition=piano] #root{flex:1;min-height:0}
html.studio-phone-fit[data-chord-edition=piano] #root>div{height:100%!important;min-height:0!important}
html.studio-phone-fit[data-chord-edition=piano] #root main{flex:1!important;min-height:0!important;height:auto!important;overflow:hidden}
html.studio-phone-fit[data-chord-edition=piano] #root header{flex:none;padding:5px 12px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;min-height:66px;padding-left:220px!important;gap:6px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header>div>div:first-child{width:auto!important;padding:0!important;min-height:0!important}
html.studio-phone-fit[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){margin:0!important;max-width:none!important;gap:3px!important;flex-wrap:nowrap!important}
html.studio-phone-fit[data-chord-edition=piano] #root header>div>div:last-child{grid-column:1/-1;width:auto!important}
html.studio-phone-fit[data-chord-edition=piano] #root main>div.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;min-height:0;gap:10px!important}
html.studio-phone-fit[data-chord-edition=piano] #vexflow-staff-wrapper{height:100%!important;min-height:120px!important;flex:1}
html.studio-phone-fit[data-chord-edition=piano] #piano-quick-chord{display:flex!important;flex-wrap:wrap;gap:5px!important}
html.studio-phone-fit[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:150px!important;min-height:110px!important}

/* Keep the header utilities and score footer inside the fitted landscape workspace. */
html.studio-phone-fit[data-chord-edition=piano] #mms-home-fab{position:fixed!important;top:7px!important;right:8px!important;left:auto!important;transform:none!important;z-index:10010}
html.studio-phone-fit[data-chord-edition=piano] #root{flex:1 1 0!important;height:0;min-height:0;overflow:hidden}
html.studio-phone-fit[data-chord-edition=piano] #root>div{height:100%!important;min-height:0!important;box-sizing:border-box}
html.studio-phone-fit[data-chord-edition=piano] #root header{position:relative!important;min-height:82px;box-sizing:border-box}
html.studio-phone-fit[data-chord-edition=piano] #root header>div{min-height:72px;grid-template-columns:minmax(0,1fr) auto!important;padding-left:220px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header>div>div:last-child{position:absolute;top:43px;left:230px;right:auto;width:auto!important;max-width:calc(100% - 250px);margin:0;z-index:10005}
html.studio-phone-fit[data-chord-edition=piano] #root header>div>div:last-child[data-pro-settings-open=true]{top:78px;left:220px;width:500px!important;max-height:400px;overflow:auto;padding:12px;border:1px solid #94a3b8;border-radius:12px;background:#1f2937;box-shadow:0 8px 25px #0008}
html.studio-phone-fit[data-chord-edition=piano] #root header .pro-mobile-settings{display:inline-flex!important;min-height:34px!important;font-size:14px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open=false]>:not(.pro-mobile-settings):not(.pro-fullscreen-button):not(:has(#theme-picker-btn)){display:none!important}
html.studio-phone-fit[data-chord-edition=piano] #root main{padding:6px 10px!important}
html.studio-phone-fit[data-chord-edition=piano] #grand-staff-card{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden}
html.studio-phone-fit[data-chord-edition=piano] #grand-staff-card>div:first-child,html.studio-phone-fit[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){flex:none!important}
html.studio-phone-fit[data-chord-edition=piano] #grand-staff-card>div:nth-child(2){flex:1 1 0!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden;padding:4px!important}
html.studio-phone-fit[data-chord-edition=piano] #vexflow-staff-wrapper{height:0!important;min-height:0!important;flex:1 1 0!important;width:100%;overflow:hidden}
html.studio-phone-fit[data-chord-edition=piano] #vexflow-staff-wrapper svg{width:100%!important;height:100%!important;max-height:100%!important}
html.studio-phone-fit[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){min-height:52px;flex-wrap:wrap;box-sizing:border-box}

html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open]{position:absolute!important;left:220px!important;right:auto!important;top:44px!important;width:auto!important;max-width:calc(100% - 240px)!important;min-height:0;z-index:10005}
html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open=true]{top:78px!important;width:500px!important;display:flex!important;flex-wrap:wrap!important;gap:12px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open=true]>select{display:block!important;min-width:200px;min-height:42px!important;font-size:16px!important}
html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open=true] .piano-top-volume{position:static!important;display:flex!important;min-height:42px;flex:none}
html.studio-phone-fit[data-chord-edition=piano] #root header [data-pro-settings-open]>.pro-mobile-settings{width:auto!important;flex:none;max-width:100%;padding:6px 12px!important}

html.studio-phone-fit[data-chord-edition=piano] #mms-home-fab{top:12px!important;right:12px!important;width:46px!important;height:46px!important;box-sizing:border-box}
html.studio-phone-fit[data-chord-edition=piano] .piano-studio-brand{right:74px!important;max-width:calc(100% - 300px);white-space:nowrap}
html.studio-phone-fit[data-chord-edition=piano] #root header h1{padding-inline-end:64px!important}

html[data-chord-edition=piano] #root .piano-header-metronome.piano-inline-metronome{position:relative!important;inset:auto!important;transform:none!important;width:64px!important;height:64px!important;min-width:64px!important;margin:4px auto!important;flex:none!important;grid-column:auto!important;grid-row:auto!important}.piano-inline-metronome .pro-circle-beat{font-size:10px!important}

.piano-native-tempo{display:none!important}.piano-tempo-knob{touch-action:none;user-select:none;min-width:58px}.piano-tempo-knob output{white-space:nowrap;font-size:11px}.piano-tap-tempo{display:none!important}

.piano-tempo-controls:has(.piano-tempo-knob)>span[dir="ltr"]{display:none!important}

#progression-studio-card label:has(>input[type=checkbox]){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 12px;border:1px solid #64748b;border-radius:9px;background:#1e293b;color:#cbd5e1;position:relative;cursor:pointer}
#progression-studio-card label:has(>input[type=checkbox])::before{content:'⟳';font:22px/1 Arial,sans-serif}
#progression-studio-card label:has(>input[type=checkbox]:checked){background:#6b21a8;border-color:#c084fc;color:#faf5ff}
#progression-studio-card label:has(>input[type=checkbox]:focus-visible){outline:3px solid #38bdf8;outline-offset:3px}
#progression-studio-card label>input[type=checkbox]{position:absolute;width:1px;height:1px;opacity:0;clip-path:inset(50%);margin:0}

html[data-chord-edition=piano] a[href^="chordapp"]{font-size:11px!important;padding:4px 8px!important;border-radius:6px!important;line-height:1.4!important;font-weight:500!important;display:inline-flex!important;max-width:max-content;margin-right:auto!important;margin-left:0!important}
html[data-chord-edition=piano] div:has(>a[href^="chordapp"]){display:flex!important;justify-content:flex-end!important;direction:rtl;padding:4px 8px!important;text-align:left!important}

#progression-studio-card label.piano-hidden-loop{display:none!important}#progression-studio-card .piano-compact-loop{width:40px;height:40px;padding:9px;border-radius:50%;border:1px solid #475569}#progression-studio-card .piano-compact-loop[aria-pressed=true]{background:#6b21a8;color:#faf5ff;border-color:#c084fc}

#progression-studio-card .piano-tempo-knob{width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;max-width:58px!important;max-height:58px!important;aspect-ratio:1!important;border-radius:50%!important;flex:0 0 58px!important;box-sizing:border-box}#progression-studio-card .piano-tempo-knob output{font-size:10px;letter-spacing:-.2px}

#progression-studio-card .piano-compact-loop{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:auto!important;min-width:58px!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:5px 9px!important;border-radius:8px!important;line-height:1!important;flex:none!important}#progression-studio-card .piano-compact-loop svg{display:block;width:16px!important;height:16px!important;flex:0 0 16px;margin:0!important}#progression-studio-card .piano-loop-label{font-size:12px;font-weight:600;line-height:1}

.piano-progression-pages>button[data-section="chords"]{display:none!important}

html[data-chord-edition=piano] #progression-studio-card [data-progression-tools]{justify-content:flex-start!important;gap:8px!important}
#progression-studio-card [data-progression-tools]>button:first-child{order:1;background:#164e63!important;border-color:#67c5df!important;color:#e0f7ff!important;margin:0!important}
#progression-studio-card [data-progression-tools]>input{order:0}
#progression-studio-card [data-progression-tools]>a[href^="chordapp"]{order:10;margin-right:auto!important;margin-left:0!important;align-self:center;font-size:10px!important;padding:3px 6px!important}
#progression-studio-card [data-progression-tools]>select,#progression-studio-card [data-progression-tools]>button:not(:first-child){order:2}
#progression-studio-card [data-progression-tools]>[role=status]:empty{display:none}

html[data-chord-edition=piano] #progression-studio-card [data-progression-tools]{gap:6px!important;padding:10px 8px!important;align-items:center!important}
#progression-studio-card [data-progression-tools]>input{width:170px!important;min-width:110px;flex:0 1 170px!important;min-height:34px;padding:6px 10px!important;font-size:12px!important;order:0}
#progression-studio-card [data-progression-tools]>[data-save-progression]{order:1!important;margin-inline-end:14px}
#progression-studio-card [data-progression-tools]>select{width:170px!important;max-width:35vw;min-height:34px;padding:6px 8px!important;font-size:12px!important;order:2!important}
#progression-studio-card [data-progression-tools]>button{min-height:34px!important;padding:6px 10px!important;border-radius:7px!important;font-size:12px!important}
#progression-studio-card [data-progression-tools]>button:first-child{order:4!important;margin-inline-start:14px!important}
#progression-studio-card [data-progression-tools]>[data-export-midi]{order:5!important}
@media(max-width:650px){#progression-studio-card [data-progression-tools]>input,#progression-studio-card [data-progression-tools]>select{width:130px!important;flex-basis:130px!important}#progression-studio-card [data-progression-tools]>button:first-child{margin-inline-start:0!important}}

#progression-studio-card{position:relative}
#progression-studio-card .piano-actions-trigger{align-self:flex-start;padding:7px 14px;margin:8px;border:1px solid #67c5df;border-radius:8px;background:#164e63;color:#e0f7ff;font-size:13px;font-weight:600;cursor:pointer}
html[data-chord-edition=piano] #progression-studio-card .piano-actions-panel{display:none!important}
html[data-chord-edition=piano] #progression-studio-card .piano-actions-panel.is-open{display:flex!important;position:absolute!important;bottom:58px!important;right:12px!important;left:auto!important;top:auto!important;z-index:1000;width:min(440px,calc(100% - 24px));padding:16px!important;margin:0!important;background:#172235;border:1px solid #64748b;border-radius:12px;box-shadow:0 12px 36px #02061788;gap:10px!important;direction:rtl}
#progression-studio-card .piano-actions-panel>input{width:240px!important;flex:1 1 230px!important}
#progression-studio-card .piano-actions-panel>select{width:240px!important;max-width:100%;flex:1 1 230px}
#progression-studio-card .piano-actions-panel>button:first-child{margin-inline-start:0!important}
#progression-studio-card .piano-actions-panel>a[href^="chordapp"]{flex-basis:100%;margin-top:8px!important}

html[data-chord-edition=piano] #progression-studio-card>a.piano-lab-link{position:absolute!important;bottom:10px!important;left:12px!important;right:auto!important;margin:0!important;font-size:12px!important;padding:7px 11px!important;border:1px solid #91bfff;border-radius:7px!important;color:#91bfff;line-height:1.4!important;background:#152238;text-decoration:none}

#root header .piano-dictionary-tab{position:static!important;inset:auto!important;transform:none!important;display:inline-flex!important;align-items:center;gap:5px;padding:7px 12px!important;font-size:12px!important;line-height:1.3;border-radius:8px;background:#49325f;color:#f1e6ff;border:1px solid #9e7abc;margin:0!important;white-space:nowrap}

/* Progression workspace: compact transport, spacious chord cards, one footer. */
#progression-studio-card>.mtp-collapse-toggle{display:none!important}
html[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){padding-top:12px!important;justify-content:flex-start!important;gap:10px!important}
html[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){width:100%;max-width:none;min-width:0;gap:0!important}
html[data-chord-edition=piano] #progression-studio-card{display:flex;flex-direction:column;min-width:0;width:100%;padding:16px!important;gap:12px!important;position:relative}
#progression-studio-card>div:first-child{flex:none;min-width:0;padding-bottom:10px!important}
#progression-studio-card>div:nth-child(2){display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;padding:10px 12px!important;gap:12px!important;flex:none;min-width:0}
#progression-studio-card>div:nth-child(2)>div{min-width:0;flex-wrap:wrap!important;gap:8px!important}
#progression-studio-card .piano-inline-metronome{margin:0!important}
#progression-studio-card .piano-progression-pages{display:none!important}
#progression-studio-card .piano-progression-chords{flex:1 1 0;min-height:0;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;align-content:start;gap:12px!important}
#progression-studio-card .piano-progression-chords>div{min-width:0;min-height:170px;padding:14px!important;gap:10px!important;border-radius:12px}
#progression-studio-card .piano-progression-chords select{min-width:0;max-width:100%;font-size:12px!important;min-height:32px!important}
#progression-studio-card>.piano-progression-hint{flex:none;padding:0!important}
#progression-studio-card>.piano-actions-trigger{margin:0;min-height:34px}
#progression-studio-card>a.piano-lab-link{bottom:16px!important;left:16px!important}
@media(max-width:649px){html[data-chord-edition=piano] #progression-studio-card{padding:10px!important;gap:8px!important}#progression-studio-card .piano-progression-chords{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}#progression-studio-card .piano-progression-chords>div{min-height:120px;padding:7px!important;gap:5px!important}}
@media(orientation:landscape) and (max-height:600px){#progression-studio-card .piano-progression-chords>div{min-height:100px;padding:6px!important}#progression-studio-card .piano-progression-chords{gap:6px!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important}html[data-chord-edition=piano] #progression-studio-card{padding:8px!important;gap:7px!important}}

html[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden]))>.piano-dictionary-bar{display:none!important}
html[data-chord-edition=piano] #progression-studio-card{justify-content:flex-start!important}
#progression-studio-card .piano-progression-chords{align-content:stretch!important;grid-auto-rows:minmax(170px,1fr);align-items:stretch!important}
#progression-studio-card .piano-progression-chords>div{height:100%;display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box}
@media(min-width:1100px){#progression-studio-card .piano-progression-chords>div{padding:18px!important}#progression-studio-card .piano-progression-chords>div select{min-height:36px!important;font-size:13px!important}}
@media(orientation:landscape) and (max-height:600px){#progression-studio-card .piano-progression-chords{grid-auto-rows:minmax(100px,1fr)}}

@media(min-width:1000px) and (min-height:650px){
html[data-chord-edition=piano] #root main:has(#grand-staff-card){flex:1 1 0!important;min-height:0!important;max-width:none!important;width:100%;box-sizing:border-box}
html[data-chord-edition=piano] #root main:has(#grand-staff-card)>.piano-dictionary-bar:empty{display:none!important}
html[data-chord-edition=piano] #root main>div.grid:has(#grand-staff-card){flex:1;min-height:0;align-items:stretch!important}
html[data-chord-edition=piano] #root main>div.grid>div:has(#grand-staff-card){height:100%;min-height:0;display:flex;flex-direction:column}
html[data-chord-edition=piano] #grand-staff-card{height:100%;flex:1;display:flex;flex-direction:column;min-height:0!important}
html[data-chord-edition=piano] #grand-staff-card>div:nth-child(2){flex:1;min-height:0;display:flex;flex-direction:column}
html[data-chord-edition=piano] #vexflow-staff-wrapper{height:0!important;min-height:160px!important;flex:1!important;display:flex;align-items:center}
html[data-chord-edition=piano] #vexflow-staff-wrapper svg{height:100%!important;width:100%!important;max-height:none!important;object-fit:contain}
html[data-chord-edition=piano] .piano-switching-panels{height:100%;min-height:0;display:flex;flex-direction:column}
html[data-chord-edition=piano] #piano-keyboard-widget{flex:1;display:flex;flex-direction:column;min-height:0!important;justify-content:center;gap:14px!important}
html[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:clamp(170px,calc(var(--studio-app-height, 100dvh) * 0.3),300px)!important;flex:none;min-height:170px!important}
}

html[data-chord-edition=piano] #grand-staff-card #playback-style-select{display:inline-block!important;min-height:30px!important;max-width:205px;font-size:12px!important;padding:4px 8px!important;border:1px solid color-mix(in srgb,currentColor 20%,transparent);border-radius:8px;background:color-mix(in srgb,currentColor 6%,transparent);color:inherit}

#piano-scale-learning .scale-tools>a{order:10;background:#164e63!important;border:1px solid #5ab9d1!important;color:#d8f5ff!important;border-radius:8px!important;text-decoration:none;font-size:12px!important;padding:7px 10px!important;white-space:nowrap}#piano-scale-learning .scale-tools>a:first-of-type{margin-inline-start:auto}#piano-scale-learning .scale-tools>a:hover{background:#1e6980!important;border-color:#8ce5f5!important}

dialog.music-dictionary[open]{position:fixed!important;inset:0!important;margin:auto!important;width:min(680px,calc(100vw - 32px))!important;max-height:calc(calc(var(--studio-app-height, 100dvh) * 1) - 32px)!important;overflow:auto!important;transform:none!important;z-index:2147483646!important}dialog.music-dictionary::backdrop{background:#02061799}

html[data-chord-edition=piano] dialog.music-dictionary[open]{display:block!important;visibility:visible!important;opacity:1!important;content-visibility:visible!important}html[data-chord-edition=piano] dialog.music-dictionary[open]>div{display:block!important;visibility:visible!important}html[data-chord-edition=piano] dialog.music-dictionary article{visibility:visible!important}

#progression-studio-card #standalone-metronome-btn{display:none!important}

#progression-studio-card>div:first-child h3 .music-term-star{display:none!important}

#progression-studio-card .piano-progression-hint .music-term-star{display:none!important}

@media(max-width:649px) and (orientation:portrait){
html[data-chord-edition=piano] #root main:has(#grand-staff-card){flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:10px 12px 18px!important}
html[data-chord-edition=piano] #root main>div.grid:has(#grand-staff-card){display:flex!important;flex-direction:column!important;gap:14px!important;height:auto!important;min-height:0!important;flex:none!important}
html[data-chord-edition=piano] #root main>div.grid>div:has(#grand-staff-card){flex:none!important;height:auto!important}
html[data-chord-edition=piano] #grand-staff-card{height:auto!important;flex:none!important;min-height:320px!important}
html[data-chord-edition=piano] #vexflow-staff-wrapper{height:170px!important;min-height:170px!important;flex:none!important}
html[data-chord-edition=piano] .piano-switching-panels{height:auto!important;flex:none!important;min-height:330px!important}
html[data-chord-edition=piano] #piano-keyboard-widget{height:auto!important;min-height:280px!important;flex:none!important;gap:12px!important;padding-bottom:12px!important}
html[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:140px!important;min-height:140px!important;flex:none!important}
html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note{margin-bottom:8px}
html[data-chord-edition=piano] #root header>div>div:first-child{padding-top:0!important}
}

@media(max-width:649px) and (orientation:portrait){html[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){overflow-y:auto!important;min-height:0!important;flex:1 1 0!important}html[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){flex:none!important;min-height:0!important}html[data-chord-edition=piano] #progression-studio-card{flex:none!important;height:auto!important;min-height:0!important}#progression-studio-card .piano-progression-chords{flex:none!important;grid-auto-rows:minmax(130px,auto)!important}#progression-studio-card>a.piano-lab-link{font-size:10px!important;padding:5px 7px!important;max-width:45%;text-align:center}}

@media(max-width:649px) and (orientation:portrait){#progression-studio-card>.piano-actions-trigger{position:fixed!important;bottom:12px!important;right:12px!important;z-index:10020;margin:0!important}html[data-chord-edition=piano] #progression-studio-card .piano-actions-panel.is-open{position:fixed!important;bottom:58px!important;right:12px!important;width:calc(100vw - 24px)!important;z-index:10021}#progression-studio-card>a.piano-lab-link{position:fixed!important;left:12px!important;bottom:12px!important;z-index:10020}html[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){padding-bottom:64px!important}}

@media(max-width:649px) and (orientation:portrait){#progression-studio-card>.piano-actions-trigger,#progression-studio-card>a.piano-lab-link{bottom:44px!important}html[data-chord-edition=piano] #progression-studio-card .piano-actions-panel.is-open{bottom:90px!important}}
/* Phone: one bounded staff and keyboard, with no inner page scroll. */
@media(max-width:649px) and (orientation:portrait){
 html.studio-shell-enabled[data-chord-edition=piano] #root header{padding:4px 6px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div{gap:4px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header h1{font-size:17px!important;line-height:1.2!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header button{padding:4px 7px!important;min-height:28px!important;height:auto!important;font-size:11px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main:has(#grand-staff-card){overflow:visible!important;padding:4px 6px!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div.grid:has(#grand-staff-card){height:100%!important;flex:1!important;min-height:0!important;gap:6px!important;display:flex!important;flex-direction:column!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div.grid>div:has(#grand-staff-card){flex:1!important;min-height:0!important;height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card{height:100%!important;flex:1!important;min-height:0!important;padding-top:30px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #vexflow-staff-wrapper{flex:1!important;min-height:85px!important;height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:first-child,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){padding:4px 6px!important;gap:4px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card select,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card button{height:27px!important;min-height:27px!important;font-size:11px!important;padding:3px 6px!important}
 html.studio-shell-enabled[data-chord-edition=piano] .piano-switching-panels{height:0!important;min-height:0!important;flex:1!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget{height:100%!important;min-height:0!important;flex:1!important;gap:5px!important;padding-top:28px!important;padding-bottom:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:0!important;min-height:70px!important;flex:1!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-quick-chord{gap:4px!important;grid-template-columns:60px minmax(0,1fr)!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-quick-chord select{height:28px!important;min-height:28px!important;font-size:12px!important;padding:3px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-quick-name{font-size:20px!important;line-height:1.2!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note{margin:0!important;font-size:12px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){overflow:visible!important;padding:4px 6px 38px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){flex:1!important;min-height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card{height:100%!important;min-height:0!important;flex:1!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{flex:1!important;min-height:0!important;grid-auto-rows:minmax(70px,1fr)!important;gap:5px!important}
}

/* Keep save actions in the workspace instead of floating over chord editors. */
#progression-studio-card .piano-progression-footer{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-width:0}
#progression-studio-card .piano-progression-footer>.piano-actions-trigger{position:static!important;margin:0;min-height:36px}
#progression-studio-card .piano-progression-footer>.piano-lab-link{position:static!important;inset:auto!important;max-width:none;margin:0!important;text-align:center;font-size:12px}
html[data-chord-edition=piano] #progression-studio-card .piano-progression-footer>.piano-actions-panel.is-open{position:absolute!important;inset:auto 0 calc(100% + 8px)!important;width:100%!important;max-height:calc(var(--studio-app-height,100dvh) - 100px);overflow:auto;box-sizing:border-box;z-index:10021}
#grand-staff-card>div:nth-child(2)>div.absolute>div{color:#475569!important}
#grand-staff-card>div:nth-child(2)>div.absolute>div:first-child>span:first-child{color:#166534!important;background:#dcfce7!important}
#grand-staff-card>div:nth-child(2)>div.absolute>div:last-child>span:first-child{color:#6b21a8!important;background:#f3e8ff!important}
#grand-staff-card>div:nth-child(2)>div.absolute>div:nth-child(2)>span{color:#475569!important;background:#f1f5f9!important}

/* Native phone layout: use the real viewport in both orientations. */
@media(max-width:700px),(orientation:landscape) and (max-height:550px) and (max-width:1100px){
 html.studio-shell-enabled[data-chord-edition=piano] #root header{padding:5px 7px!important;flex:none!important;min-height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;gap:5px!important;align-items:center!important;width:100%!important;max-width:none!important;padding:0!important;margin:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:first-child{grid-column:1!important;grid-row:1!important;min-height:0!important;height:auto!important;padding:0!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header h1{font-size:16px!important;line-height:1.2!important;padding:0!important;white-space:nowrap}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){grid-column:1/-1!important;grid-row:2!important;justify-content:center!important;min-width:0!important;margin:0!important;padding:3px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:last-child:not(:first-child){display:flex!important;grid-column:2!important;grid-row:1!important;position:static!important;inset:auto!important;transform:none!important;min-height:0!important;width:auto!important;min-width:0!important;padding:0!important;margin:0!important;gap:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header button{font-size:11px!important;min-height:32px!important;height:auto!important;padding:5px 7px!important;white-space:nowrap}
 html.studio-shell-enabled[data-chord-edition=piano] #root header [data-pro-settings-open=true]{position:absolute!important;top:100%!important;inset-inline-end:6px!important;width:calc(100% - 12px)!important;max-height:calc(var(--studio-app-height,100dvh) - 100px);overflow:auto;z-index:200}
 html.studio-shell-enabled[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){padding:5px 6px!important;overflow:hidden!important;min-height:0!important;flex:1 1 0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){height:100%!important;min-height:0!important;flex:1!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>.piano-dictionary-bar:empty{display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card{display:flex!important;flex-direction:column!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:first-child,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){flex:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(2){flex:1 1 0!important;min-height:0!important;height:0!important;overflow:hidden!important}
 html.studio-shell-enabled[data-chord-edition=piano] #vexflow-staff-wrapper{width:100%!important;min-height:0!important;display:flex!important;align-items:center!important}
 html.studio-shell-enabled[data-chord-edition=piano] #vexflow-staff-wrapper svg{height:100%!important;width:100%!important;max-height:100%!important;object-fit:contain}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card .piano-play-shortcuts{display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card{height:100%!important;min-height:0!important;flex:1!important;padding:8px!important;gap:7px!important;overflow:visible!important;box-sizing:border-box}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:first-child{padding:0 0 5px!important;gap:5px!important;min-height:0!important;flex:none!important}
 #progression-studio-card>div:first-child h3{font-size:13px!important;line-height:1.3!important}
 #progression-studio-card>div:first-child>div{min-width:0!important;max-width:100%!important}
 #progression-studio-card>div:first-child>div:last-child{flex:1 1 180px!important}
 #progression-studio-card #progression-preset-select{width:100%!important;min-width:0!important}
 #progression-studio-card>div:first-child select{height:32px!important;min-height:32px!important;font-size:12px!important;max-width:100%!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;padding:5px!important;flex:none!important}
 #progression-studio-card>div:nth-child(2)>div:first-child{justify-content:center!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2)>div:last-child{grid-column:1/-1!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:8px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-tempo-controls{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{flex:1 1 0!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(180px,auto)!important;align-content:start!important;gap:7px!important;padding:2px!important;scrollbar-width:thin}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div{height:auto!important;min-height:180px!important;padding:7px!important;gap:5px!important;grid-template-rows:auto minmax(40px,1fr) auto!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:first-child,html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child{margin:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>button{grid-column:1/-1;min-height:38px!important;height:38px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child{grid-template-columns:minmax(0,1fr) 43px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child>select:nth-child(2){grid-column:1/-1!important;grid-row:2!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords select{min-height:32px!important;height:32px!important;font-size:12px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>div,html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>div bdi{font-size:11px!important;font-weight:400!important;line-height:1.4!important}
 #progression-studio-card .piano-progression-chords button[title]{opacity:1!important}
 #progression-studio-card .piano-progression-hint{display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card[data-section=tempo] .piano-tempo-presets{flex:1 1 0!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain}
 #progression-studio-card .piano-progression-footer{gap:6px!important}
 #progression-studio-card .piano-progression-footer>.piano-actions-trigger,#progression-studio-card .piano-progression-footer>.piano-lab-link{flex:1;min-width:0;max-width:none!important;font-size:11px!important;padding:7px!important;min-height:36px!important;box-sizing:border-box}
}
@media(orientation:landscape) and (max-height:550px) and (max-width:1100px){
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div{grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:auto!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){grid-column:2!important;grid-row:1!important;justify-self:center}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:last-child:not(:first-child){grid-column:3!important;grid-row:1!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main:has(#grand-staff-card){padding:4px 6px!important;min-height:0!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div.grid:has(#grand-staff-card){height:100%!important;min-height:0!important;display:grid!important;grid-template-columns:1.2fr 1fr!important;gap:6px!important;align-items:stretch!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div.grid>div:has(#grand-staff-card),html.studio-shell-enabled[data-chord-edition=piano] .piano-switching-panels{height:100%!important;min-height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card{height:100%!important;min-height:0!important;flex:1!important;padding-top:28px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #vexflow-staff-wrapper{height:0!important;flex:1!important;min-height:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){min-height:32px!important;flex-wrap:nowrap!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3) span,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3) bdi{font-size:11px!important;line-height:1.25!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:first-child,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card>div:nth-child(3){padding:3px 5px!important;gap:4px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card select,html.studio-shell-enabled[data-chord-edition=piano] #grand-staff-card button{height:27px!important;min-height:27px!important;font-size:11px!important;padding:3px 5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget{height:100%!important;min-height:0!important;flex:1!important;padding-top:28px!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){height:0!important;min-height:55px!important;flex:1!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card{gap:4px!important;padding:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:first-child{flex-direction:row!important;align-items:center!important;padding:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2){display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;padding:3px 5px!important;gap:5px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2)>div:first-child{flex-wrap:nowrap!important;gap:6px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2)>div:nth-child(2){flex-direction:row!important;flex-wrap:nowrap!important;padding:3px 6px!important;gap:5px!important}
 #progression-studio-card>div:nth-child(2) button{font-size:11px!important;white-space:nowrap!important;padding:6px 8px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(155px,1fr)!important;grid-template-rows:minmax(110px,1fr)!important;grid-auto-rows:auto!important;align-content:stretch!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div{min-height:110px!important;padding:5px!important;gap:3px!important;grid-template-rows:auto minmax(24px,1fr) auto!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:nth-child(2)>div{display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child{grid-template-columns:42px minmax(0,1fr) 38px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>div>div:last-child>select:nth-child(2){grid-column:auto!important;grid-row:auto!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords>button{grid-column:auto!important;height:auto!important;min-height:110px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root .piano-header-metronome.piano-inline-metronome{width:46px!important;height:46px!important;min-width:46px!important;margin:0!important}
 #progression-studio-card .piano-tempo-knob{min-width:46px!important}
 #progression-studio-card .piano-tempo-knob{width:44px!important;height:44px!important}
 #progression-studio-card .piano-progression-footer{height:36px!important}
 #progression-studio-card .piano-progression-footer>.piano-actions-trigger,#progression-studio-card .piano-progression-footer>.piano-lab-link{height:36px!important;min-height:36px!important;line-height:18px!important;padding:5px!important}
}
@media(orientation:landscape) and (max-height:550px) and (min-width:760px) and (max-width:1100px){
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card{display:grid!important;grid-template-columns:180px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) 36px}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:first-child{grid-column:1;grid-row:1;border:0!important}
 #progression-studio-card>div:first-child>div:first-child,#progression-studio-card>div:first-child>div:last-child>span{display:none!important}
 #progression-studio-card>div:first-child>div:last-child{width:100%!important;min-width:0!important}
 #progression-studio-card #progression-preset-select{width:100%!important;min-width:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card>div:nth-child(2){grid-column:2;grid-row:1}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{grid-column:1/-1;grid-row:2}
 #progression-studio-card .piano-progression-footer{grid-column:1/-1;grid-row:3}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card[data-section=tempo] .piano-tempo-presets{grid-column:1/-1;grid-row:2;overflow:auto}
}
@media(orientation:landscape) and (max-height:550px) and (max-width:759px){
 #progression-studio-card>div:first-child>div:first-child{display:none!important}
 #progression-studio-card>div:first-child>div:last-child{width:100%;min-width:0}
 #progression-studio-card #progression-preset-select{width:100%!important;min-width:0!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main:has(#piano-progression-editor:not([hidden])){overflow-y:auto!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div:has(>#progression-studio-card){height:auto!important;flex:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card{height:auto!important;min-height:0!important;flex:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #progression-studio-card .piano-progression-chords{flex:none!important;height:150px!important}
}
@media(max-width:700px) and (orientation:portrait){
 html.studio-shell-enabled[data-chord-edition=piano] #root main>div.grid>div:has(#grand-staff-card){flex:1.15!important}
 html.studio-shell-enabled[data-chord-edition=piano] .piano-switching-panels{flex:1!important;min-height:155px!important}
}
/* Explicit native-menu colors stay readable in either operating-system theme. */
html[data-chord-edition=piano] #grand-staff-card #piano-quick-chord select{
 color-scheme:light;color:oklch(24% .025 255)!important;background:oklch(99% .006 85)!important;
 border:1px solid oklch(53% .04 255)!important;font-weight:650!important;font-size:14px!important;
}
html[data-chord-edition=piano] #piano-quick-chord option{
 color:oklch(24% .025 255)!important;background:oklch(99% .006 85)!important;font-size:15px!important;
}
html[data-chord-edition=piano] #progression-studio-card select{
 color-scheme:dark;background:oklch(25% .035 255)!important;color:oklch(97% .008 255)!important;
 border:1px solid oklch(63% .04 255)!important;font-weight:600;
}
html[data-chord-edition=piano] #progression-studio-card option{
 color:oklch(97% .008 255)!important;background:oklch(25% .035 255)!important;
}
html[data-chord-edition=piano] #piano-quick-chord select:focus-visible,
html[data-chord-edition=piano] #progression-studio-card select:focus-visible{
 outline:3px solid oklch(70% .13 250);outline-offset:2px;
}
/* Retain the editor's state while its compact view plays below the keyboard. */
html[data-chord-edition=piano] #piano-progression-editor[hidden]{display:none!important}
html[data-chord-edition=piano] #piano-keyboard-widget .piano-progression-preview{
 flex:none;min-width:0;margin-top:8px;padding:8px 0 0;border-top:1px solid oklch(43% .035 255);
 color:oklch(96% .012 255);font:13px/1.35 system-ui;
}
html[data-chord-edition=piano] .piano-switching-panels>#piano-keyboard-widget[data-piano-tab-active=true]{display:flex!important;flex-direction:column}
.piano-progression-preview .music-term-star{display:none!important}
.piano-preview-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.piano-preview-toolbar h3{font:650 12px/1.35 system-ui;margin:0;margin-inline-end:auto}
.piano-preview-toolbar button{border:1px solid oklch(57% .035 255);border-radius:6px;padding:4px 10px;min-height:30px;cursor:pointer;font:600 12px/1.3 system-ui;color:inherit}
.piano-preview-play{background:oklch(36% .065 170)}
.piano-preview-play-icon{margin-inline-end:5px;font-size:10px}
.piano-preview-edit{background:oklch(27% .03 255)}
.piano-preview-chords{position:relative;display:flex;gap:5px;list-style:none;margin:0;padding:0 0 3px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
.piano-preview-chords li{flex:1 0 64px;min-width:0}
.piano-preview-chords button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:38px;padding:5px 8px;border:1px solid oklch(52% .04 255);border-radius:7px;background:oklch(26% .035 255);color:oklch(96% .012 255);cursor:pointer;font:650 15px/1.3 system-ui;white-space:nowrap}
.piano-preview-step{font-size:11px;font-weight:500;color:oklch(79% .025 255)}
.piano-preview-chords button[aria-current=true]{background:oklch(37% .07 250);border-color:oklch(79% .10 245);box-shadow:inset 0 0 0 1px oklch(79% .10 245)}
.piano-progression-preview button:hover{border-color:oklch(85% .07 245);background:oklch(35% .05 255)}
.piano-progression-preview button:focus-visible{outline:2px solid oklch(83% .09 245);outline-offset:2px}
@media(max-width:649px),(orientation:landscape) and (max-height:550px){
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-progression-preview{display:flex;align-items:center;gap:6px;margin-top:3px;padding-top:5px}
 .piano-preview-toolbar{flex:none;gap:5px;margin-bottom:0}
 .piano-preview-toolbar h3,.piano-preview-play-label,.piano-preview-edit>span{display:none}
 .piano-preview-toolbar button{min-width:32px;padding:4px;font-size:16px}
 .piano-preview-play-icon{margin:0;font-size:13px}
 .piano-preview-edit::before{content:'✎'}
 .piano-preview-chords{flex:1;min-width:0;padding-bottom:0}
 .piano-preview-chords li{flex-basis:58px}
 .piano-preview-chords button{gap:4px;padding:4px;min-height:32px;font-size:14px}
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note{height:24px;min-width:0;max-width:none;width:auto;flex:0 0 auto;padding:2px 8px}
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note svg{display:none}
 html[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(4){display:none!important}
}
@media(max-width:700px) and (orientation:portrait){
 html.studio-shell-enabled[data-chord-edition=piano] .piano-switching-panels{min-height:202px!important}
}
@media(max-width:649px) and (orientation:portrait) and (max-height:620px){
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget{padding-top:24px!important}
 html[data-chord-edition=piano] #piano-keyboard-widget>div:first-child{display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #piano-keyboard-widget>div:nth-child(3){min-height:50px!important}
}
/* Reserve the right edge for volume; keep the staff workspace below one header row. */
@media(min-width:900px){
 html.studio-shell-enabled[data-chord-edition=piano] #root header{padding:6px 12px!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div{
  display:grid!important;direction:ltr;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  grid-template-rows:auto!important;gap:12px!important;padding:0!important;min-height:48px;
 }
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:first-child{
  grid-column:3!important;grid-row:1!important;justify-self:end;min-height:42px!important;
  margin:0 144px 0 0!important;padding:0!important;max-width:calc(100% - 144px);
 }
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){
  grid-column:2!important;grid-row:1!important;margin:0!important;padding:4px!important;
  max-width:none!important;justify-self:center;
 }
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:last-child{display:contents!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header>div>div:last-child>:not(.piano-top-volume){display:none!important}
 html.studio-shell-enabled[data-chord-edition=piano] #root header .piano-top-volume{
  position:static!important;grid-column:3!important;grid-row:1!important;justify-self:end;
  inset:auto!important;transform:none!important;margin:0!important;height:48px!important;
 }
 html[lang=he].studio-shell-enabled[data-chord-edition=piano] #root header>div>div:first-child,
 html[lang=he].studio-shell-enabled[data-chord-edition=piano] #root header>div>div:has(>#tab-inspector-btn){direction:rtl}
}
@media(min-width:1100px) and (min-height:700px){
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note{width:240px;min-width:240px;max-width:240px;height:92px;flex-basis:240px}
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-note svg{width:176px;height:82px;flex-basis:176px}
}
/* The live staff keeps its full height; the keys yield space in shorter windows. */
@media(min-width:900px) and (min-height:551px){
 html[data-chord-edition=piano] #root #piano-keyboard-widget>div:first-child{flex:0 0 auto!important}
 html[data-chord-edition=piano] #root #piano-keyboard-widget>div:nth-child(3){flex:0 1 auto!important;min-height:80px!important}
}
html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-pitch{display:flex;flex-direction:column;align-items:center;gap:3px}
.piano-live-pitch small{font:600 12px/1.3 system-ui;white-space:nowrap}
/* Musical sequences retain their reading order in the Hebrew interface. */
.piano-staff-octave,.piano-analysis-notes,.piano-analysis-notes>div>div:not(:last-child),
html[data-chord-edition=piano] #piano-keyboard-widget button[title*="MIDI"]{direction:ltr}
html[data-chord-edition=piano] #root #grand-staff-card>div:nth-child(2){position:relative}
/* Use the blank space below the score without resizing it when names open. */
html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown{
 position:absolute;inset:auto 6px 3px;display:grid!important;grid-template-columns:1fr 1fr;
 direction:ltr;align-items:stretch;gap:6px!important;margin:0!important;padding:0!important;
 border:0;max-width:none;font-size:11px!important;
}
html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown>div{
 display:flex;align-items:center;gap:6px;min-width:0;padding:4px 6px!important;
 font-size:11px!important;line-height:1.3;
}
.piano-hand-breakdown>div>span:first-child{flex:none}
.piano-hand-notes{display:flex;flex-wrap:wrap;gap:2px 8px;min-width:0;direction:ltr}
.piano-hand-notes bdi{white-space:nowrap}
html[data-chord-edition=piano] #piano-keyboard-widget .piano-middle-c{
 position:absolute;display:flex;flex-direction:column;align-items:center;gap:1px;
 padding:2px 1px;line-height:1.1;white-space:nowrap;pointer-events:none;
}
.piano-middle-c small{font:inherit}
/* Note spelling is a quiet display preference inside the existing Options menu. */
html[data-chord-edition=piano] #root #grand-staff-card>.piano-panel-settings{
 display:inline-flex!important;align-items:center;position:absolute;top:4px;right:8px;z-index:12;
 border:1px solid oklch(57% .035 255);border-radius:7px;background:oklch(30% .04 255);
 color:oklch(97% .008 255);font:600 11px/1.3 system-ui;padding:3px 8px;min-height:26px;
}
#grand-staff-card .piano-spelling-options{
 display:none!important;position:absolute;top:34px;right:8px;z-index:25;
 width:min(330px,calc(100% - 16px));box-sizing:border-box;padding:12px;
 flex-direction:column;gap:8px;border:1px solid oklch(60% .035 255);border-radius:9px;
 background:oklch(27% .035 255);color:oklch(97% .008 255);font:13px/1.4 system-ui;
 box-shadow:0 4px 12px oklch(12% .02 255 / .25);
}
html[data-chord-edition=piano] #root #grand-staff-card.piano-options-open .piano-spelling-options{display:flex!important}
.piano-spelling-options p{margin:0;font-size:12px;color:oklch(84% .02 255)}
.piano-spelling-options .quick-spelling{display:flex;gap:6px}
html[data-chord-edition=piano] #root #grand-staff-card .piano-spelling-options .quick-spelling button{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:1;min-width:0;
 width:auto;height:auto!important;min-height:32px!important;padding:5px 9px!important;
 background:oklch(34% .035 255);color:oklch(96% .01 255);border:1px solid oklch(60% .035 255);
 font:600 12px/1.3 system-ui!important;
}
html[data-chord-edition=piano] #root #grand-staff-card .piano-spelling-options button[aria-pressed=true]{
 background:oklch(43% .09 250);border-color:oklch(80% .10 245);box-shadow:inset 0 0 0 1px oklch(80% .10 245);
}
.piano-spelling-options button>bdi:first-child{font-size:19px;line-height:1}
.piano-spelling-options button:focus-visible,#grand-staff-card>.piano-panel-settings:focus-visible{outline:2px solid oklch(85% .09 245);outline-offset:2px}
@media(max-width:649px),(orientation:landscape) and (max-height:600px){
 html[data-chord-edition=piano] #root #grand-staff-card .piano-spelling-options{
  position:static;width:100%;padding:8px 0 0;border:0;border-top:1px solid oklch(52% .035 255);
  border-radius:0;box-shadow:none;background:transparent;
 }
}
/* Short screens share the existing note footer instead of covering the score. */
@media(max-width:700px) and (max-height:720px),(orientation:landscape) and (max-height:550px){
 html[data-chord-edition=piano] #root #grand-staff-card>div:nth-child(2){overflow:visible!important}
 html[data-chord-edition=piano] #root #grand-staff-card>div:nth-child(3){flex-wrap:nowrap!important}
 html[data-chord-edition=piano] #root #grand-staff-card>div:nth-child(3)>div:first-child{flex:1;min-width:0;overflow:hidden}
 html[data-chord-edition=piano] #root #grand-staff-card:has(.piano-hand-breakdown)>div:nth-child(3)>div:first-child{visibility:hidden}
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown{
  inset-inline:6px 62px;bottom:-41px;gap:4px!important;pointer-events:none;
 }
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown>div{
  flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;padding:2px 3px!important;
 }
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown span,
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown bdi{font-size:9px!important;line-height:1.2}
 .piano-hand-breakdown .piano-hand-notes{gap:1px 4px}
 html[lang=he][data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown{left:62px;right:6px}
}
@media(orientation:landscape) and (max-height:550px){
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown{bottom:-29px}
 html[data-chord-edition=piano] #root #grand-staff-card .piano-hand-breakdown>div{flex-direction:row;align-items:center;gap:4px}
}
@media(max-width:649px),(orientation:landscape) and (max-height:550px){
 html[data-chord-edition=piano] #piano-keyboard-widget .piano-live-pitch{flex-direction:row;gap:6px;width:auto;min-width:0}
 .piano-live-pitch small{font-size:11px}
}

/* A single analysis view: pitches follow the score, high notes above low notes. */
html[data-chord-edition=piano] #root .piano-switching-panels>#chord-analysis-card[data-piano-tab-active=true]{
 display:grid!important;grid-template-columns:minmax(165px,.9fr) minmax(0,1.1fr);
 grid-template-rows:auto auto auto auto 1fr;align-content:start;align-items:start;
 column-gap:12px!important;row-gap:7px!important;direction:ltr;min-width:0;
}
html[data-chord-edition=piano] #root #chord-analysis-card>div{margin:0!important;padding:0!important;min-width:0}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-heading{
 grid-column:1/-1;display:flex!important;flex-wrap:wrap;align-items:center;gap:8px!important;
 padding-bottom:6px!important;direction:var(--mms-page-direction);
}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-heading>div:first-child>div:nth-child(2){display:block!important}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-heading p{display:none}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-structure{grid-column:1;grid-row:2/7;direction:var(--mms-page-direction)}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-notes{
 display:flex!important;flex-direction:column;gap:4px!important;direction:ltr;
}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-notes>.piano-analysis-note{
 display:grid!important;grid-template-columns:38px minmax(48px,1fr);column-gap:7px;row-gap:0;
 padding:5px 8px!important;min-height:38px;border-radius:7px;text-align:start;
}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note>div{font-size:13px!important;line-height:1.3!important;margin:0!important}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note>div:first-child{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;gap:2px}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note>div:nth-child(2){grid-column:2;grid-row:1;font-size:15px!important}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note>div:nth-child(3){grid-column:2;grid-row:2;font-size:12px!important}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note>div:last-child{
 grid-column:1/-1;grid-row:3;white-space:normal;overflow:visible;text-overflow:clip;font-size:11px!important;opacity:1;
}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note.is-note-hovered{
 outline:2px solid var(--piano-note-color);outline-offset:1px;
}
html[data-chord-edition=piano] #root #chord-analysis-card :is(.piano-analysis-character,.piano-analysis-uses,.piano-analysis-scales,.piano-analysis-symbols){
 display:block!important;grid-column:2;padding:6px 8px!important;direction:var(--mms-page-direction);
 font:12px/1.45 'Segoe UI',Arial,sans-serif;color:oklch(94% .01 250);border:0;border-radius:6px;
}
html[data-chord-edition=piano] #root #chord-analysis-card :is(.piano-analysis-character,.piano-analysis-uses)>div>svg{display:none}
#chord-analysis-card :is(.piano-analysis-character,.piano-analysis-uses) .font-semibold{display:block;margin-bottom:2px}
html[data-chord-edition=piano] #root #chord-analysis-card :is(h4,.piano-analysis-symbols>span){font-size:12px!important;line-height:1.35;margin-bottom:4px}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-link-toggle{
 display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px!important;padding:4px 8px!important;
 border:1px solid oklch(66% .04 245);border-radius:7px;background:oklch(29% .035 250);color:oklch(94% .015 245);
 font:600 12px/1.3 'Segoe UI',Arial,sans-serif;cursor:pointer;
}
html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-link-toggle[aria-pressed=true]{background:oklch(42% .07 220);border-color:oklch(82% .1 200)}
.piano-analysis-link-toggle:focus-visible{outline:2px solid oklch(85% .09 220);outline-offset:2px}
.piano-analysis-links{position:fixed;inset:0;width:100vw;height:100vh;z-index:15;pointer-events:none;overflow:hidden}
.piano-analysis-links *{pointer-events:none}
#grand-staff-card #toggle-note-labels-btn[aria-pressed=true]{background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}
@media(max-width:649px),(orientation:landscape) and (max-height:550px){
 html[data-chord-edition=piano] #root .piano-switching-panels>#chord-analysis-card[data-piano-tab-active=true]{grid-template-columns:minmax(130px,.85fr) minmax(0,1.15fr);column-gap:7px!important;row-gap:4px!important}
 html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-note{padding:3px 5px!important;min-height:32px;grid-template-columns:28px minmax(0,1fr);column-gap:5px}
 html[data-chord-edition=piano] #root #chord-analysis-card :is(.piano-analysis-character,.piano-analysis-uses,.piano-analysis-scales,.piano-analysis-symbols){padding:3px 4px!important;font-size:11px;line-height:1.35}
 html[data-chord-edition=piano] #root #chord-analysis-card .piano-analysis-heading{gap:5px!important}
}

/* Keep the score and its written pitches together while reading the analysis. */
html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near:has(#grand-staff-card){
 display:grid!important;direction:ltr;grid-template-columns:minmax(0,430px) minmax(0,640px)!important;
 grid-template-rows:minmax(0,1fr)!important;justify-content:center;column-gap:8px!important;row-gap:6px!important;
}
html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near>div:has(>#grand-staff-card){grid-column:1!important;grid-row:1!important;height:100%!important;min-height:0!important;direction:var(--mms-page-direction)}
html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near>.piano-switching-panels{grid-column:2!important;grid-row:1!important;height:100%!important;min-height:0!important}
html[data-chord-edition=piano] #root .piano-analysis-near #vexflow-staff-wrapper{justify-content:flex-end!important}
html[data-chord-edition=piano] #root .piano-analysis-near #vexflow-staff-wrapper>svg{margin-left:auto!important;margin-right:0!important}
html[data-chord-edition=piano] #root .piano-analysis-near #chord-analysis-card{grid-template-columns:minmax(155px,230px) minmax(0,1fr)!important}
@media(min-width:701px) and (max-width:1000px){
 html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near:has(#grand-staff-card){grid-template-columns:minmax(280px,.9fr) minmax(320px,1.1fr)!important}
}
@media(max-width:700px){
 html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near:has(#grand-staff-card){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(150px,.8fr) minmax(210px,1.2fr)!important}
 html[data-chord-edition=piano] #root main>div.grid.piano-analysis-near>.piano-switching-panels{grid-column:1!important;grid-row:2!important}
 html[data-chord-edition=piano] #root .piano-analysis-near #chord-analysis-card{grid-template-columns:minmax(130px,.85fr) minmax(0,1.15fr)!important}
}

/* Keep the harmony lab reachable beside the progression heading. */
#progression-studio-card .piano-lab-top{display:flex;align-items:center;flex:none;margin-inline-start:auto}
html[data-chord-edition=piano] #progression-studio-card .piano-lab-top>.piano-lab-link{position:static!important;inset:auto!important;margin:0!important;max-width:none!important;display:inline-flex;align-items:center;white-space:nowrap;padding:6px 10px!important;border:1px solid #91bfff;border-radius:7px;color:#91bfff;background:#152238;text-decoration:none;font-size:12px!important;line-height:1.4!important}

/* Scale learning uses the volume dial directly, without step buttons. */
html[data-chord-edition=piano] body[data-piano-scales=true] .piano-volume-knob-control>.volume-minus,
html[data-chord-edition=piano] body[data-piano-scales=true] .piano-volume-knob-control>.volume-plus{display:none!important}
