/* The musical workspace uses the viewport below the shared studio header. */
html.studio-shell-enabled body{height:var(--studio-app-height);min-height:0;display:flex;flex-direction:column}
.studio-shell-enabled .app{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;padding:4px 8px;gap:5px}
.studio-shell-enabled .app>.fx-page-title{position:static;transform:none;width:100%;max-width:none;flex:none;height:28px;font-size:24px;padding:0;margin:0}
.studio-shell-enabled .app>.bar{position:static;display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;grid-template-rows:auto;align-items:center;flex:none;gap:8px;min-height:0!important;padding:0!important;margin:0;background:none}
.studio-shell-enabled .bar .fx-language-switch{display:none!important}
.studio-shell-enabled .bar>.brand,.studio-shell-enabled .bar>.grow,.studio-shell-enabled .bar>.transport{display:none}
.studio-shell-enabled .bar>.fx-mobile-source{display:flex;position:static;width:auto;height:auto;min-width:0;flex-direction:column;align-items:stretch;gap:1px;font-size:11px;line-height:1.2}
.studio-shell-enabled .fx-mobile-source select{width:100%;height:32px;min-height:32px;min-width:0;padding:3px 7px;font:inherit;font-size:13px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}
.studio-shell-enabled .bar>.song-controls{position:static!important;inset:auto!important;width:auto!important;max-width:none;height:auto!important;margin:0!important;padding:0!important;gap:1px;flex-direction:column;align-items:stretch;border:0;background:none}
.studio-shell-enabled .bar>.song-controls label{display:block;font-size:11px;line-height:1.2}
.studio-shell-enabled .bar>.song-controls select{box-sizing:border-box;flex:auto;width:100%!important;height:32px!important;min-height:32px!important;min-width:0!important;font-size:13px!important;padding:3px 7px!important}
.studio-shell-enabled .song-controls .song-credit,.studio-shell-enabled .song-controls .orchestra-reference{display:none!important}
.studio-shell-enabled .bar>#srcSeg{position:static;grid-row:1;grid-column:3;display:none;width:auto;min-width:0;min-height:0;height:auto;flex-basis:auto;border:0;padding:0;margin:0;background:none;gap:5px;flex-wrap:wrap}
.studio-shell-enabled .bar[data-voice=true]>#srcSeg{display:flex}
.studio-shell-enabled #srcSeg>button{display:none!important}
.studio-shell-enabled #srcSeg .voice-language-controls{position:static;inset:auto;width:auto;height:auto;margin:0;padding:0;border:0;gap:3px}
.studio-shell-enabled #srcSeg .voice-language-controls button{min-height:28px;min-width:38px;padding:3px 5px;font-size:11px}
.studio-shell-enabled #srcSeg .fx-voice-loop{min-height:28px;margin:0;padding:3px 5px;font-size:11px;gap:4px}
.studio-shell-enabled #srcSeg .fx-voice-loop[hidden]{display:none!important}
.studio-shell-enabled .main{display:grid;grid-template-columns:230px minmax(0,1fr);flex:1;min-height:0;height:auto!important;gap:7px;align-items:stretch}
.studio-shell-enabled .rail{position:static;display:flex;flex-direction:column;width:auto;min-width:0;min-height:0;max-height:none;padding:5px;margin:0;gap:4px;overflow:visible}
.studio-shell-enabled .rail .fx-volume-play{flex:none;min-height:40px;margin:0;gap:8px}
.studio-shell-enabled .rail .fx-effect-switch{flex:none;margin:0;padding:0;gap:4px}
.studio-shell-enabled .rail .fx-effect-switch button{min-height:28px;padding:3px;font-size:12px}
.studio-shell-enabled .rail .fx-category-tabs{flex:none;margin:0;padding:4px 0;gap:4px;grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-shell-enabled .rail .fx-category-tabs button{padding:3px;min-height:28px;font-size:11px;line-height:1.2;white-space:normal}
.studio-shell-enabled .rail #railList{display:flex;flex-direction:column;width:auto;min-height:0;flex:1;gap:2px;overflow:visible}
.studio-shell-enabled .rail #railList>button{min-height:27px;padding:3px 5px;font-size:12px}
.studio-shell-enabled .rail button .en{font-size:9px;flex-basis:auto;letter-spacing:0}
.studio-shell-enabled .rail .fx-compact-choices{display:none}
.studio-shell-enabled .unit{display:flex;flex-direction:column;min-width:0;min-height:0;height:auto;padding:0;gap:5px}
.studio-shell-enabled .unit>.card:not(.scopes){position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:visible}
.studio-shell-enabled .unit>.card:not(.scopes)::before{position:absolute;inset:0 0 auto;height:3px}
.studio-shell-enabled .unit>.cleanup-shortcuts{flex:none;margin:0;padding:0 4px;line-height:1.1}
.studio-shell-enabled .cleanup-shortcuts .lab{font-size:10px;letter-spacing:0}
.studio-shell-enabled .head{flex:none;padding:5px 8px}
.studio-shell-enabled .head .row{gap:5px;margin:0}
.studio-shell-enabled .head h2{font-size:22px}
.studio-shell-enabled .head .thesis{display:none}
.studio-shell-enabled .head .lab{font-size:10px;letter-spacing:0}
.studio-shell-enabled .head button,.studio-shell-enabled .head .chip{min-height:26px;padding:3px 7px;font-size:11px}
.studio-shell-enabled .viz{position:relative;display:block;flex:1;min-height:50px;padding:0}
.studio-shell-enabled .viz .cap{display:none}
.studio-shell-enabled .viz .mech{position:absolute;inset:3px 7px;width:calc(100% - 14px);height:calc(100% - 6px);min-height:0}
.studio-shell-enabled .knobs{display:flex;flex:none;justify-content:center;flex-wrap:wrap;padding:2px 5px;gap:2px;margin:0}
.studio-shell-enabled .knob{flex:1;min-width:60px;max-width:110px;width:auto;gap:0;padding:0 2px}
.studio-shell-enabled .knob svg{width:42px;height:42px}
.studio-shell-enabled .knob .kv,.studio-shell-enabled .knob .kl{font-size:11px;line-height:1.2}
.studio-shell-enabled .knob.segp{max-width:150px}
.studio-shell-enabled .segp .mini{flex-wrap:wrap;justify-content:center}
.studio-shell-enabled .segp .mini button{padding:3px 5px;font-size:11px;min-height:26px}
.studio-shell-enabled .unit>.card>.presets{display:flex;flex:none;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px;padding:3px 6px;border:0}
.studio-shell-enabled .presets>.lab{font-size:9px;letter-spacing:0}
.studio-shell-enabled .presets button{min-height:26px;padding:3px 7px!important;font-size:11px;line-height:1.2;margin:0}
.studio-shell-enabled #presetNote{flex:none;padding:2px 6px;margin:0;font-size:10px;line-height:1.2;letter-spacing:0;white-space:normal}
.studio-shell-enabled .scopes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:none;gap:6px;padding:4px 6px;min-width:0}
.studio-shell-enabled .scope{min-width:0}
.studio-shell-enabled .scope .cap{height:20px;min-height:0;font-size:9px;padding:0;gap:3px;white-space:normal;letter-spacing:0}
.studio-shell-enabled .scope .lab,.studio-shell-enabled .scope .key{font-size:9px;letter-spacing:0}
.studio-shell-enabled .scope canvas{height:clamp(50px,calc(var(--studio-app-height) * 0.12),100px);width:100%;min-height:0}
.studio-shell-enabled .unit>footer{display:none}
.fx-segment-choice{display:none}
.studio-shell-enabled .fx-recording-menu{grid-column:3;grid-row:1;align-self:center}
.fx-recording-menu[hidden]{display:none}
.fx-recording-menu summary{cursor:pointer;border:1px solid var(--sig);border-radius:7px;padding:4px 8px;font-size:12px;background:var(--panel)}
.studio-shell-enabled .fx-recording-menu>.recording-controls{position:absolute;top:85px;left:8px;right:8px;z-index:80;max-width:700px;margin:0 auto;padding:8px;gap:7px;align-items:center;box-shadow:0 8px 24px #0008}
.studio-shell-enabled .fx-recording-menu:not([open])>.recording-controls{display:none!important}
.studio-shell-enabled .recording-controls>button{min-height:32px;padding:4px 8px;font-size:12px}
.studio-shell-enabled .recording-controls>.lab{font-size:10px;letter-spacing:0;line-height:1.3;flex-basis:100%}
.studio-shell-enabled .recording-controls .recording-inputs{flex:1;min-width:150px;width:auto;gap:2px}
.studio-shell-enabled .recording-inputs label{font-size:11px;line-height:1.2}
.studio-shell-enabled .recording-inputs select{min-height:30px;height:30px;font-size:12px;padding:3px}
.studio-shell-enabled body>footer{flex:none;font-size:9px!important;line-height:14px!important;padding:0 6px!important;margin:0!important;height:16px;min-height:0}
@media(max-width:699px),(max-height:500px){
 .studio-shell-enabled .rail .fx-category-tabs,.studio-shell-enabled .rail #railList{display:none}
 .studio-shell-enabled .rail .fx-compact-choices{display:grid;grid-template-columns:1fr;gap:3px;min-width:0}
 .fx-compact-choices label{display:flex;flex-direction:column;min-width:0;font-size:10px;line-height:1.2;gap:2px}
 .fx-compact-choices select{width:100%;min-width:0;height:30px;font:inherit;font-size:12px;padding:3px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--ink)}
 .studio-shell-enabled .knob.segp .mini{display:none}
 .studio-shell-enabled .knob.segp .fx-segment-choice{display:block;width:100%;min-width:0;height:30px;padding:3px;font:inherit;font-size:10px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:5px}
}
@media(max-width:699px){
 .studio-shell-enabled .app{padding:3px 6px;gap:4px}
 .studio-shell-enabled .app>.fx-page-title{height:24px;font-size:20px}
 .studio-shell-enabled .app>.bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:0}
 .studio-shell-enabled .bar>#srcSeg{grid-column:1/-1;grid-row:auto;justify-content:center}
 .studio-shell-enabled .main{display:flex;flex-direction:column;gap:4px}
 .studio-shell-enabled .rail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:none;gap:3px 7px;padding:4px}
 .studio-shell-enabled .rail .fx-volume-play{min-height:38px;gap:5px}
 .studio-shell-enabled .rail .fx-volume-play>.vol>.lab{display:none}
 .studio-shell-enabled .rail .fx-volume-play>#play{width:88px;min-height:32px;font-size:12px}
 .studio-shell-enabled .rail .fx-volume-dial{min-width:34px!important;max-width:34px!important;width:34px!important;min-height:34px!important;height:34px!important;font-size:10px}
 .studio-shell-enabled .rail .fx-volume-dial::after{left:15px;top:4px;transform-origin:50% 12px}
 .studio-shell-enabled .rail .fx-effect-switch{align-self:center}
 .studio-shell-enabled .rail .fx-compact-choices{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}
 .studio-shell-enabled .unit{flex:1;gap:4px}
 .studio-shell-enabled .head{padding:4px 6px}
 .studio-shell-enabled .head .row{gap:3px}
 .studio-shell-enabled .head h2{font-size:18px}
 .studio-shell-enabled .head #fxEn,.studio-shell-enabled .head #fxCat,.studio-shell-enabled .head #fxSrc{display:none}
 .studio-shell-enabled .head button{padding:3px 5px;font-size:10px}
 .studio-shell-enabled .knobs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:2px}
 .studio-shell-enabled .knob{min-width:0;max-width:none;padding:0;gap:0}
 .studio-shell-enabled .knob svg{width:36px;height:36px}
 .studio-shell-enabled .knob .kv,.studio-shell-enabled .knob .kl{font-size:10px;line-height:1.15;overflow-wrap:anywhere}
 .studio-shell-enabled .knob.segp{max-width:none;grid-column:auto;min-width:0;gap:4px;align-self:center}
 .studio-shell-enabled .fx-recording-menu{grid-column:2;grid-row:1;justify-self:end}
 .studio-shell-enabled .bar:has(.fx-recording-menu:not([hidden]))>.fx-mobile-source{grid-column:1}
 .studio-shell-enabled .fx-recording-menu>.recording-controls{top:80px}
 .studio-shell-enabled .presets>.lab{display:none}
 .studio-shell-enabled .presets{gap:3px;padding:2px}
 .studio-shell-enabled .presets button{font-size:10px;min-height:26px;padding:3px 5px!important}
 .studio-shell-enabled .scope .cap{height:25px;align-items:flex-start;line-height:1.2;flex-wrap:wrap}
 .studio-shell-enabled .scope canvas{height:45px}
}
@media(max-height:600px){
 .studio-shell-enabled .app>.fx-page-title{height:22px;font-size:18px}
 .studio-shell-enabled .head h2{font-size:18px}
 .studio-shell-enabled .knob svg{width:32px;height:32px}
 .studio-shell-enabled .scope canvas{height:40px}
 .studio-shell-enabled .rail .fx-category-tabs button{min-height:24px;font-size:10px}
 .studio-shell-enabled .rail #railList>button{min-height:24px;padding:2px 4px;font-size:11px}
}
@media(max-height:500px){
 .studio-shell-enabled .app{gap:3px}
 .studio-shell-enabled .viz{min-height:40px}
 .studio-shell-enabled .head{padding:2px 6px}
 .studio-shell-enabled .main{grid-template-columns:180px minmax(0,1fr);gap:5px}
 .studio-shell-enabled .app>.bar{grid-template-columns:1fr 1fr auto;gap:5px;padding:0}
 .studio-shell-enabled .bar>.fx-mobile-source,.studio-shell-enabled .bar>.song-controls{flex-direction:row;align-items:center;gap:4px}
 .studio-shell-enabled .bar>.fx-mobile-source{font-size:10px}
 .studio-shell-enabled .bar>.song-controls label{white-space:nowrap;font-size:10px}
 .studio-shell-enabled .bar .fx-mobile-source select,.studio-shell-enabled .bar>.song-controls select{height:28px!important;min-height:28px!important;font-size:11px!important}
 .studio-shell-enabled .rail .fx-volume-play>.vol>.lab{display:none}
 .studio-shell-enabled .rail .fx-compact-choices{gap:4px}
 .studio-shell-enabled .rail .fx-volume-play{gap:5px;min-height:36px}
 .studio-shell-enabled .rail .fx-volume-dial{height:34px!important;min-height:34px!important;width:34px!important;min-width:34px!important}
 .studio-shell-enabled .head #fxEn,.studio-shell-enabled .head #fxCat,.studio-shell-enabled .head #fxSrc{display:none}
 .studio-shell-enabled .knob{flex:1 1 0;min-width:0}
 .studio-shell-enabled .knob.segp{flex:1.6 1 0;min-width:0;gap:3px;justify-content:center}
 .studio-shell-enabled .knob .kv,.studio-shell-enabled .knob .kl{font-size:9px}
 .studio-shell-enabled .knob svg{width:30px;height:30px}
 .studio-shell-enabled .presets>.lab{display:none}
 .studio-shell-enabled .presets button{min-height:22px;padding:2px 5px!important;font-size:10px}
 .studio-shell-enabled .scope .cap{height:16px;font-size:8px}
 .studio-shell-enabled .scope .lab,.studio-shell-enabled .scope .key{font-size:8px}
 .studio-shell-enabled .scope canvas{height:26px}
}
@media(max-width:699px) and (max-height:700px){
 .studio-shell-enabled .viz{min-height:45px}
 .studio-shell-enabled .knob svg{width:32px;height:32px}
 .studio-shell-enabled .scope .cap{height:20px}
 .studio-shell-enabled .scope canvas{height:30px}
}

/* Bound the two header choices without assigning a vertical flex basis. */
.studio-shell-enabled .app>.bar{grid-template-columns:200px minmax(180px,360px) auto;justify-content:start}
.studio-shell-enabled .bar>.fx-mobile-source,.studio-shell-enabled .bar>.song-controls{min-height:0;max-height:48px;flex:none}
.studio-shell-enabled .bar>.song-controls{max-width:360px}
@media(max-width:640px){.studio-shell-enabled .app>.bar{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) auto}}
/* Phones: screen-fit rules shrink this reading text below 11px; keep it readable. */
@media(max-width:700px){.knob .kl,.knob .kv,.presets button{font-size:11px!important}}
