/* Keep every game region together below the shared application header. */
html.studio-shell-enabled body{height:var(--studio-app-height)!important;min-height:0;display:block;padding:6px 8px;overflow:visible!important}
html.studio-shell-enabled main{height:100%!important;min-height:0!important;max-height:none!important;margin:0 auto;padding:8px;display:flex;flex-direction:column;gap:4px;overflow:visible!important}
html.studio-shell-enabled main>header{min-height:42px!important;height:42px;flex:none;align-items:center}
html.studio-shell-enabled h1{font-size:18px;margin:0}
html.studio-shell-enabled .game-subtitle{font-size:10px!important;margin:0!important}
html.studio-shell-enabled header p:not(.game-subtitle):not(.score){display:none}
html.studio-shell-enabled .mobile-landscape-hint{display:none}
html.studio-shell-enabled .selection-menu{flex:none;padding:3px 5px}
html.studio-shell-enabled .selection-menu>summary{font-size:11px;padding:2px}
html.studio-shell-enabled .selection-menu>summary::before{width:21px;height:21px;font-size:17px}
html.studio-shell-enabled .selection-menu .controls{gap:5px;margin:0;align-items:end}
html.studio-shell-enabled .controls label{font-size:10px;gap:2px;min-width:0}
html.studio-shell-enabled .controls select,html.studio-shell-enabled .controls button{min-height:27px;font-size:11px;padding:4px}
html.studio-shell-enabled #midiStatus{font-size:10px;flex:none}
html.studio-shell-enabled .game-layout,html.studio-shell-enabled .game-layout.single-clef{flex:1!important;min-height:55px!important;height:auto!important;gap:4px;overflow:visible}
html.studio-shell-enabled .staff-with-note-name{flex:1;min-height:0;height:100%}
html.studio-shell-enabled .staff-with-note-name #staff,html.studio-shell-enabled .staff-with-note-name #staff.two-staves{height:100%!important;min-height:0!important;max-height:100%;margin:0;object-fit:contain}
html.studio-shell-enabled .played-note-name{flex-basis:80px;font-size:30px}
html.studio-shell-enabled main>h2{margin:0;flex:none;font-size:11px}
html.studio-shell-enabled main>#keys{flex:none;min-height:0;margin:0}
html.studio-shell-enabled .continuous-note-row{padding-top:25px}
html.studio-shell-enabled .continuous-note-row .note{height:32px!important;min-height:0!important;padding:2px;font-size:11px}
html.studio-shell-enabled .continuous-note-row .note.accidental{height:23px!important;min-height:0!important;padding:1px}
html.studio-shell-enabled .continuous-note-row:not(:has(.accidental)){padding-top:0}
html.studio-shell-enabled #toggle-note-buttons{min-height:23px;padding:3px;font-size:10px;flex:none}
html.studio-shell-enabled .piano-scroll{flex:none!important;min-height:0;height:90px!important;padding:2px;overflow:visible}
html.studio-shell-enabled #piano{height:86px!important}
html.studio-shell-enabled .piano-key{height:84px!important}
html.studio-shell-enabled .piano-key.black{height:54px!important}
html.studio-shell-enabled #message{flex:none;font-size:11px;margin:0;min-height:15px;line-height:1.2}
html.studio-shell-enabled #start{min-height:32px;margin:0 auto;padding:5px 12px}
@media(max-width:650px){
 html.studio-shell-enabled main>header{height:52px!important;min-height:52px!important}
 html.studio-shell-enabled h1{font-size:16px}
 html.studio-shell-enabled .selection-menu .controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 html.studio-shell-enabled .controls label{font-size:9px}
 html.studio-shell-enabled .controls select,html.studio-shell-enabled .controls button{font-size:10px;min-height:27px}
 html.studio-shell-enabled .game-layout{min-height:90px!important}
 html.studio-shell-enabled .played-note-name{flex-basis:60px;font-size:24px}
 html.studio-shell-enabled .keys.two-octaves-inline .clef-group{min-width:0}
}
@media(orientation:landscape) and (max-height:500px){
 html.studio-shell-enabled main>header{height:27px!important;min-height:27px!important}
 html.studio-shell-enabled .game-subtitle{display:none!important}
 html.studio-shell-enabled main{gap:3px;padding:5px}
 html.studio-shell-enabled .selection-menu{padding:2px 4px}
 html.studio-shell-enabled .selection-menu>summary{display:none}
 html.studio-shell-enabled .controls select,html.studio-shell-enabled .controls button{min-height:23px;padding:2px;font-size:10px}
 html.studio-shell-enabled .controls label{font-size:9px}
 html.studio-shell-enabled #midiStatus,html.studio-shell-enabled #toggle-note-buttons{display:none}
 html.studio-shell-enabled .piano-scroll{height:58px!important}
 html.studio-shell-enabled #piano{height:54px!important}
 html.studio-shell-enabled .piano-key{height:52px!important}
 html.studio-shell-enabled .piano-key.black{height:34px!important}
 html.studio-shell-enabled .continuous-note-row .note{height:23px!important;font-size:10px}
 html.studio-shell-enabled .continuous-note-row{padding-top:17px}
 html.studio-shell-enabled .continuous-note-row .note.accidental{height:16px!important}
 html.studio-shell-enabled #start{min-height:26px;padding:3px 12px}
}

@media(orientation:landscape) and (max-height:500px){html.studio-shell-enabled main>h2{display:none}}
/* Phones: screen-fit rules shrink this reading text below 11px; keep it readable. */
@media(max-width:700px){.controls label{font-size:11px!important}}
