/* Compact titles keep real, generously sized touch targets. */
body[data-view] #instrument-view #control-panel .workspace-panel-heading{box-sizing:border-box;min-height:52px;padding:4px 10px;margin-bottom:6px;gap:6px}
body[data-view] #instrument-view #control-panel .workspace-panel-heading>.icon-button{width:44px;height:44px;min-height:44px;flex:none}
body[data-view] #instrument-view #control-panel .workspace-panel-heading>strong{font-size:16px;line-height:1.2}
body[data-view] #instrument-view #control-panel .settings-section{margin:0 0 7px;border-radius:15px}
body[data-view] #instrument-view #control-panel .settings-section>summary{box-sizing:border-box;min-height:52px;padding:6px 10px;gap:9px;border-radius:14px}
body[data-view] #instrument-view #control-panel .section-icon{width:32px;height:32px;border-radius:10px;font-size:22px;flex:none}
body[data-view] #instrument-view #control-panel .section-label strong{font-size:15px;line-height:1.25}
body[data-view] #instrument-view #control-panel .section-content{padding:6px 10px 12px}
body[data-view] #instrument-view #control-panel .lab-tabs{margin-bottom:8px}
body[data-view] #instrument-view #control-panel .lab-tabs button{min-height:44px;padding:6px;font-size:14px}
#play-panel .discover-settings{display:flex;flex-direction:column;padding:10px;gap:8px;border-radius:16px}
#play-panel .discover-settings>.lab-fields{margin:0!important;gap:8px}
#play-panel .discover-settings>.lab-fields label{font-size:14px;line-height:1.2}
#play-panel .discover-settings>.lab-fields select{min-height:42px;margin-top:4px}
#play-panel #discover-player{order:-1;display:grid;grid-template-columns:44px minmax(72px,1fr) 44px 38px minmax(72px,1fr);align-items:center;gap:6px;margin:0 0 2px;padding:0 0 8px;border-bottom:1px solid #e5ecef}
#play-panel #discover-player>[data-music-rewind]{grid-column:1;grid-row:1}
#play-panel #discover-player>[data-music-play]{grid-column:2;grid-row:1;min-width:0;min-height:44px;height:44px;padding:5px;font-size:14px;white-space:nowrap}
#play-panel #discover-player>[data-touch-record]{grid-column:3;grid-row:1;width:42px;min-width:42px;height:42px;min-height:42px}
#play-panel #discover-player>[data-reset-handpan]{grid-column:4;grid-row:1;width:38px;min-width:38px;height:44px;min-height:44px;padding:5px}
#play-panel #discover-player>[data-music-tempo]{grid-column:5;grid-row:1;min-width:0;min-height:44px;height:44px;padding:5px;flex-direction:row;gap:3px}
#play-panel #discover-player>.slap-controls{grid-row:2;grid-column:1/3;min-height:44px}
#play-panel #discover-player>.check-row{grid-row:2;grid-column:3/-1;justify-self:end;min-height:44px;width:auto;flex-basis:auto;margin:0;padding:0 6px;font-size:14px}
#play-panel [data-music-status]:empty{display:none}
#play-panel [data-music-status]{margin:0;font-size:13px}
@media(max-width:370px){#play-panel #discover-player{grid-template-columns:36px minmax(56px,1fr) 38px 32px minmax(65px,1fr);gap:3px}#play-panel #discover-player>[data-music-play]{font-size:12px}}
/* A phone sheet shares the same continuously adjustable height while dragged. */
#instrument-view[data-panel-layout=bottom] .workspace-panel-heading{touch-action:none;cursor:ns-resize}
#instrument-view[data-panel-layout=bottom] .workspace-panel-heading:before{content:'';position:absolute;top:2px;left:50%;width:32px;height:3px;transform:translateX(-50%);background:#adc0c8;border-radius:3px;pointer-events:none}
body[data-view] #instrument-view[data-panel-layout=bottom].sheet-moving #control-panel{top:auto!important;height:var(--drag-sheet-height)!important;min-height:0!important;max-height:none!important;transform:none!important;transition:none!important;overflow:hidden}
body[data-view] #instrument-view[data-panel-layout=bottom].sheet-moving #stage-canvas{visibility:visible!important;pointer-events:auto!important;bottom:calc(var(--drag-sheet-height) + 16px + env(safe-area-inset-bottom))!important;transition:none!important}
body[data-view] #instrument-view[data-panel-layout=bottom].controls-open #stage-canvas{bottom:calc(var(--sheet-height,48%) + 14px + env(safe-area-inset-bottom))!important}
body[data-view] #instrument-view[data-panel-layout=bottom].controls-open[data-sheet=half]{--sheet-height:50%}
body[data-view] #instrument-view[data-panel-layout=bottom].sheet-moving #control-panel{opacity:1!important;visibility:visible!important}
/* A direct scene action stays above the note area and separate from dragging. */
.pan-scene-actions{position:absolute;z-index:7;left:50%;top:calc(var(--handle-top,18px) - 18px);transform:translateX(-50%);max-width:94%;width:max-content;display:flex;align-items:center;gap:4px;pointer-events:auto}
.pan .pan-scene-actions .pan-handle{position:static;transform:none;flex:1;min-width:0;max-width:calc(100% - 48px);height:36px;white-space:nowrap}
.pan-scene-remove{flex:none;width:44px;height:44px;display:grid;place-items:center;border:1px solid #d5e2e7;border-radius:50%;background:#fffffff0;color:#607887;box-shadow:0 4px 12px #3c637016;font:400 24px/1 sans-serif;cursor:pointer;touch-action:manipulation}
.pan-scene-remove:hover{background:#fff0f1;color:#bf4c61;border-color:#eeb8c3}
.pan-scene-remove:active{transform:scale(.94)}
.toast-undo{min-height:44px;margin-inline-start:12px;padding:6px 12px;border:1px solid #b6d4ce;border-radius:10px;background:#e5f7f1;color:#167969;font:inherit;cursor:pointer}

/* Keep the persistent header controls visible; reserve their column beside
   the full sheet's collapse button instead of letting the two overlap. */
body #instrument-view[data-panel-layout=bottom][data-sheet=full] #artist-corner{visibility:visible}
body[data-view] #instrument-view[data-panel-layout=bottom][data-sheet=full]:not(.instrument-tools-inline) #control-panel .workspace-panel-heading{padding-inline-end:64px}
body #instrument-view[data-panel-layout=bottom][data-sheet=full] #raise-inspire-settings{display:none}
