/* Stage keeps its mood colours and pad finish; positions match the Master. */
#pane-stage{container-type:inline-size;}
.stage-board{display:flex;flex-direction:column;gap:4px;margin-bottom:6px;}
.stage-row{display:grid;grid-template-columns:112px minmax(0,1fr);gap:8px;align-items:stretch;}
.stage-row>.mood-btn{width:100%;min-width:0;margin:0;justify-content:center;}
.stage-row-pads{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px;}
.stage-row-pads>.sp{min-width:0;min-height:44px;margin:0;padding:5px 6px;font-family:'DM Mono',monospace;overflow-wrap:anywhere;}
.stage-row-pads>.sp:nth-child(5){margin-left:5px;}
.stage-row-pads>.sp:focus-visible,.stage-row>.mood-btn:focus-visible,.fx-auto-select:focus-visible{outline:2px solid var(--luma2,#a78bfa);outline-offset:2px;}
@container (max-width:1050px){
  .stage-row{grid-template-columns:92px minmax(0,1fr);gap:6px;}
  .stage-row-pads{grid-template-columns:repeat(4,minmax(0,1fr));}
  .stage-row-pads>.sp{min-height:46px;padding:7px 4px;}
  .stage-row-pads>.sp:nth-child(5){margin-left:0;}
}
@container (max-width:450px){
  .stage-row{grid-template-columns:64px minmax(0,1fr);gap:5px;}
  .stage-row>.mood-btn{padding:6px 2px;}
  .stage-row .mb-nm{font-size:9px;}
  .stage-row-pads{gap:4px;}
  .stage-row-pads>.sp{font-size:8px;min-height:54px;}
}
/* Separate touch targets: the large pad fires; AUTO only changes eligibility. */
.fx-performance{display:flex;flex-direction:column;gap:4px;min-width:0;}
.fx-performance>.mfx-btn,.fx-performance>.cv-mfx-btn{width:100%;flex:1;margin:0;}
.fx-auto-select{min-height:26px;padding:3px 10px;border:1px solid rgba(139,92,246,.22);border-radius:5px;background:rgba(12,10,20,.6);color:var(--t3,#888);font:9px 'DM Mono',monospace;letter-spacing:1px;cursor:pointer;touch-action:manipulation;}
.fx-auto-select[aria-pressed="true"]{color:#c4b5fd;border-color:rgba(139,92,246,.55);background:rgba(139,92,246,.12);}
.fx-auto-select.suspended{border-style:dashed;opacity:.6;}
.fx-auto-select:disabled{cursor:default;opacity:.4;}
@media(pointer:coarse){.fx-auto-select{min-height:34px;}}
.cv-mfx{align-items:flex-start;}
.cv-mfx>.fx-performance{flex:1;}
.cv-mfx>.cv-mfx-btn,.cv-mfx>.fx-performance>.cv-mfx-btn{min-height:60px;justify-content:center;}
.m-fx-row{align-items:start;}
/* One stable panel for every tab; overflowing sections scroll inside it. */
.pbody{height:min(250px,48dvh);max-height:min(250px,48dvh);overflow-y:auto;scrollbar-gutter:stable;}
@media(min-width:1100px){
  #pane-stage{--stage-control-height:30px;}
  #pane-stage.active{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 14px;align-items:center;}
  #pane-stage>.stage-board{grid-column:1/-1;}
  #pane-stage>.scene-ctrl,#pane-stage>.trans-modes,#pane-stage>.ctrl{margin:0!important;min-width:0;}
  #pane-stage>.trans-modes{min-height:var(--stage-control-height);}
  #pane-stage .trans-btn{height:var(--stage-control-height);}
  .stage-row>.mood-btn{padding:2px 4px;gap:4px;flex-direction:row;}
  .stage-row-pads>.sp{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;min-height:var(--stage-control-height);height:var(--stage-control-height);padding:1px 4px;line-height:10px;}
  .stage-row-pads>.sp .sp-num{font-size:9px;line-height:10px;margin:0;}
  .stage-row-pads>.sp .sp-name{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:10px;}
  .stage-row .mb-dots{display:none;}
  .stage-row .mb-ic,.stage-row .mb-ic svg{width:16px;height:16px;}
  .stage-row .mb-nm{font-size:9px;}
}

/* Una escena en preparación admite prioridad al tocar, aún no es hotcue. */
[data-pad-idx].scene-preparing { opacity: .62; border-style: dashed; }

[data-pad-idx].scene-unavailable { opacity: .45; border-style: dotted; }
