/* Keep the ordinary studio until its layout is customized. Editing stays on this canvas. */
#studio-panes,.studio-pane,.pane-content{display:contents}.pane-heading,.pane-resize{display:none}.layout-editor[hidden]{display:none!important}
/* Give the initial score room for several systems without resizing the workspace. */
body:not(.custom-layout) .tab-panel{flex:1 0 620px;min-height:620px}
body:not(.custom-layout) #score-scroll{min-height:420px;max-height:none}
@media(max-width:900px){body:not(.custom-layout) .tab-panel{min-height:440px}body:not(.custom-layout) #score-scroll{min-height:330px;max-height:65dvh}}
body.custom-layout main{height:100dvh;display:block;overflow-y:auto;overflow-x:hidden;padding-bottom:35px}
body.custom-layout #studio-panes{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}
body.custom-layout .studio-pane{position:relative;display:block;width:calc(var(--pane-width,100%) - var(--pane-gap,0px));min-width:min(280px,100%);max-width:100%;border:1px solid #344455;border-radius:12px;background:#141c27;overflow:hidden;flex-shrink:0}
body.custom-layout .pane-heading{display:flex;align-items:center;gap:6px;background:#192532;padding:3px 8px;min-height:32px}.pane-heading button{padding:3px 7px;font-size:14px}.pane-heading .pane-drag{flex:1;min-width:0;text-align:left;border:0;background:none;touch-action:none;font-size:13px}.pane-drag strong{font-size:11px;font-weight:500}.pane-order{display:flex;gap:3px}.pane-heading output{font-size:10px;color:#b2f48d;white-space:nowrap}
body.custom-layout .pane-content{display:block;height:var(--pane-height);min-height:100px;overflow:auto;overscroll-behavior:contain}
body.custom-layout .pane-content>.fret-panel,body.custom-layout .pane-content>.tab-panel{display:flex;flex-direction:column;height:100%;min-height:0;margin:0;border:0;border-radius:0}
body.custom-layout .pane-content .panel-heading,body.custom-layout .finger-tools,body.custom-layout .fret-footer{flex-shrink:0;flex-wrap:wrap}
body.custom-layout #score-scroll{flex:1;min-height:70px;max-height:none}
body.custom-layout #fretboard{flex:1;min-height:180px;overflow:auto}
body.custom-layout #fretboard svg{height:100%;min-height:180px;width:auto;min-width:100%;max-width:none}
body.custom-layout .pane-content>.song-header,body.custom-layout .pane-content>.toolbar,body.custom-layout .pane-content>.listen-panel{margin:0;padding:12px;flex-wrap:wrap;min-height:100%;border:0;gap:12px}
body.custom-layout .pane-content>.song-header h1{font-size:28px}
body.custom-layout .pane-content>.transport{position:static!important;inset:auto!important;margin:0;min-height:100%;width:100%;padding:15px;backdrop-filter:none;border:0;z-index:auto}
body.custom-layout .transport-row{flex-wrap:wrap;gap:18px}body.custom-layout .progress-row{min-width:0}
.layout-editor{position:sticky;top:0;z-index:12;display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0;padding:8px 10px;border:1px solid #6a9458;border-radius:9px;background:#1b3025;font-size:11px}.layout-editor>span:first-child{flex:1}.layout-editor button{padding:6px 9px;font-size:11px}.layout-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body:not(.layout-editing) .pane-order,body:not(.layout-editing) .pane-heading output{display:none}
body.layout-editing .pane-drag{cursor:grab}body.layout-editing .studio-pane{border-color:#759664}
body.layout-editing .pane-resize{display:block;position:absolute;bottom:0;width:28px;height:28px;z-index:8;padding:0;background:linear-gradient(135deg,transparent 48%,#9ad477 50%,#9ad477 57%,transparent 59%,transparent 69%,#9ad477 71%,#9ad477 78%,transparent 80%);border:0;border-radius:0;touch-action:none;transform:none}
.pane-resize-right{right:0;cursor:nwse-resize}.pane-resize-left{left:0;cursor:nesw-resize;scale:-1 1}.pane-moving{opacity:.65}.pane-drop-target{outline:3px solid #b2f48d;outline-offset:-3px}.pane-resizing{outline:1px solid #b2f48d}
body.pane-is-expanded main{overflow:hidden}
body.custom-layout .studio-pane.pane-expanded{position:fixed;inset:10px;width:calc(100vw - 20px);height:calc(100dvh - 20px);max-width:none;z-index:50;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax #080d16ed}
body.custom-layout .pane-expanded .pane-content{height:0;flex:1;min-height:0}.pane-expanded .pane-resize,.pane-expanded .pane-order{display:none!important}
@media(max-width:900px){body.custom-layout main{padding-bottom:30px!important}body.custom-layout .pane-content>.transport{padding-bottom:15px!important}body.custom-layout .pane-content>.toolbar .track-field{max-width:100%}body.custom-layout #fretboard svg{height:100%!important;min-height:220px}body.custom-layout .pane-content>.transport .loop-controls,body.custom-layout .pane-content>.transport .rhythm-controls{display:flex}.pane-heading output{display:none}.layout-editor>span:first-child{flex-basis:100%}.pane-heading .pane-drag{font-size:11px}}
