.desk-controls-card[data-deck=Program]{display:flex;flex-direction:column}
.desk-program-tools{order:99;display:flex;flex-direction:column;gap:8px;padding:10px 12px 12px;border-top:1px solid var(--line,#353d46)}
.desk-tool-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.desk-tool-label{width:56px;flex:none;font-size:11px;color:var(--muted,#9ea9b4)}
.desk-tool-select{display:flex}
.desk-program-tools select{min-height:32px;max-width:200px}
.desk-program-tools button{min-height:32px;white-space:nowrap}
.desk-program-tools button[aria-pressed=true]{border-color:#87dce0;color:#87dce0}
/* Saved desk layouts. Placement and size only; untouched Laptop adds nothing. */

/* Sized layouts: the monitor row takes the chosen height, pictures fill their cells. */
body.desk-layout:not(.program-only)[data-desk-sized] .monitor-grid{min-height:120px;max-height:92dvh}
body.desk-layout:not(.program-only)[data-desk-sized] .monitor-grid>article{min-height:0}
body.desk-layout:not(.program-only)[data-desk-sized] .monitor-grid .deck-viewport,
body.desk-layout:not(.program-only)[data-desk-sized] .monitor-grid .program-viewport{height:auto;flex:1 1 0;min-height:30px}
body.desk-layout.program-only .monitor-grid{height:auto!important}

/* Dividers */
.desk-gutter{position:absolute;z-index:6;touch-action:none;display:flex;align-items:center;justify-content:center}
.desk-gutter.col{cursor:col-resize}.desk-gutter.row{cursor:row-resize}
.desk-gutter::after{content:"";border-radius:2px;background:#3a444f;opacity:.75;transition:background .12s,opacity .12s}
.desk-gutter.col::after{width:3px;height:32px}.desk-gutter.row::after{width:44px;height:3px}
.desk-gutter:hover::after,.desk-gutter.drag::after{background:#87dce0;opacity:1}
body.program-only .desk-gutter,body.editing .desk-gutter{display:none}

/* Patch browsing: the patch finder comes first and gets the wide column. */
body.desk-layout[data-desk-layout=browse] #deskControls{display:flex;flex-direction:column}
body.desk-layout[data-desk-layout=browse] #deskControls>.workspace{order:-1;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr)}
body.desk-layout[data-desk-layout=browse] #deskControls>.workspace>.browser{order:2}
@media(max-width:850px){body.desk-layout[data-desk-layout=browse] #deskControls>.workspace{grid-template-columns:1fr}body.desk-layout[data-desk-layout=browse] #deskControls>.workspace>.browser{order:-1}}

/* Phone / tablet + HDMI: thumb-sized controls. */
body.desk-layout[data-desk-layout=phone] #deskControls button,
body.desk-layout[data-desk-layout=phone] .monitor-grid header button,
body.desk-layout[data-desk-layout=phone] .desk-layout-bar button,
body.desk-layout[data-desk-layout=phone] .desk-layout-bar select{min-height:48px}
body.desk-layout[data-desk-layout=phone] #deskControls input[type=range]{min-height:44px}
