/* One, two or three panes at 450px each, based on actual content width. */
html body { text-align:center; overflow-x:hidden; }
.controller-scenes { container: controller-scenes / inline-size; width:100%; }
.controller-scenes-grid { display:grid; grid-template-columns:repeat(var(--scene-columns,1),minmax(0,1fr)); align-items:stretch; position:relative; overflow:clip; }
.controller-scenes-grid > .controller-scene {
 display:none; position:relative; float:none; width:auto; min-width:0; box-sizing:border-box;
 padding:24px 10px; text-align:center; overflow-wrap:anywhere;
 min-height:calc(100dvh - var(--dock-size,64px) - var(--sync-offset,0px));
 border:0;
 opacity:.8;
 background:var(--page-background-normal);
 transition:opacity .2s;
}
.controller-scenes-grid > #scene1 { background:var(--page-background-highlight); color:var(--body-color-highlight); }
#scene1 p { margin:0 auto; max-width:550px; }
/* Selection is shared with the sliding window; never reserve empty columns. */
.controller-scenes-grid > .controller-scene[data-visible="true"] { display:block; }
.controller-scenes-grid > .controller-scene[data-selected="true"] { opacity:1; }
@media (prefers-reduced-motion:reduce) {
 .controller-scenes-grid > .controller-scene { transition:none; }
}
.controller-scenes .action-panel { box-sizing:border-box; max-width:100%; min-height:44px; }
html body.dock-bottom .controller-scenes { padding-bottom:var(--dock-bottom-clearance,139px); }
ul#dock-top li[value="1"]::before { content:'\f05a'; }
ul#dock-top li[value="2"]::before { content:'\f15b'; }
ul#dock-top li[value="3"]::before { content:'\f6ff'; }
ul#dock-top li[value]::before { font:var(--fa-font-solid); }
ul#dock-top li[value][aria-pressed="true"] { color:var(--dialog-color-highlight); background:var(--dialog-background-highlight); border-radius:5px; }
ul#dock-top li[value]:focus-visible { outline:2px solid var(--dialog-border-highlight); outline-offset:-2px; }

/* Form and shared input wrappers must fit the scene, even below 450px. */
.controller-scenes form,
.controller-scenes form .input,
.controller-scenes form input,
.controller-scenes form button,
.controller-scenes form select,
.controller-scenes form textarea,
.controller-scenes form p {
 box-sizing:border-box;
 min-width:0;
 max-width:100%;
}

/* Keep label text and its control in the same centered shared-form column. */
.controller-scenes form > label {
 box-sizing:border-box;
 width:280px;
 max-width:100%;
 min-width:0;
 margin-inline:auto;
}
