:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#09090b;color:#eee;--min:52px;--accent:#edb1d1;--depth:34%;--left:env(safe-area-inset-left,0px);--right:env(safe-area-inset-right,0px);--top:env(safe-area-inset-top,0px);--bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none} [hidden]{display:none!important} button,input,select{font:inherit}button,select,input[type=range]{min-height:var(--min);min-width:var(--min)}button,select{border:1px solid #66616a;background:#28262d;color:#eee;border-radius:5px;padding:8px;touch-action:manipulation}button:disabled{opacity:.45}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #fff;outline-offset:-3px}button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}
#canvas{position:fixed;inset:0;overflow:hidden;background:#09090b;display:grid;place-items:center}
#media{position:absolute;inset:0;display:flex;flex-direction:column;transform-origin:center center;overflow:hidden}
.band{position:relative;flex:1 1 0;min-width:0;min-height:0;overflow:hidden;background:#09090b;display:grid;place-items:center}
.band video{position:absolute;left:50%;top:50%;object-fit:fill;max-width:none;max-height:none;pointer-events:none;transform-origin:center}
.band::after{content:"";position:absolute;inset:0;pointer-events:none;border:4px solid var(--focus-green-hot,#8cff9d);box-shadow:inset 0 0 6px 2px var(--focus-green-color,#38ff56),inset 0 0 22px 5px var(--focus-green-spill,#35ff629c);opacity:0;transition:opacity 220ms ease-out;z-index:3}
#media[data-edit-mode=true] .band.selected::after{opacity:1}
/* Focus is inherited by every presentation surface, including the loop deck's
   canvas, independent of decoder handoff, layout order and surface creation. */
.band{--band-saturation:1}
#media[data-edit-mode=true] .band:not(.selected){--band-saturation:.15}
.band :is(video,.loop-picture,.scrub-picture){filter:none}
#media[data-edit-mode=true] .band:not(.selected) :is(video,.loop-picture,.scrub-picture){filter:saturate(.15)}
@media(prefers-reduced-motion:reduce){.band::after,.band :is(video,.loop-picture,.scrub-picture){transition:none}}
#index{position:fixed;inset:0;pointer-events:none;z-index:4}






#panel{position:fixed;z-index:5;background:#222127;border:1px solid #625b67;overflow:auto;overscroll-behavior:contain;padding:6px 8px;display:flex;flex-direction:column;gap:5px;left:var(--left);right:var(--right);bottom:var(--bottom);height:var(--depth)}
#panel[data-edge=top]{top:var(--top);bottom:auto}#panel[data-edge=left]{left:var(--left);right:auto;top:var(--top);bottom:var(--bottom);width:var(--depth);height:auto}#panel[data-edge=right]{right:var(--right);left:auto;top:var(--top);bottom:var(--bottom);width:var(--depth);height:auto}.row{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.row button{flex:1}.field{display:flex;align-items:center;gap:8px;min-height:52px}.field span{flex:0 0 66px;font-size:13px}.field input{flex:1;width:100%;accent-color:var(--accent)}.field output{min-width:54px;text-align:right;font-variant-numeric:tabular-nums;font-size:12px}
/* White screen flashlight; the only visible control is the retained key. */
#privacy{position:fixed;inset:0;background:#fff;z-index:30;overflow:hidden;touch-action:none}
#privacy #reveal{position:fixed;min-width:0;min-height:0;pointer-events:auto;transition:none;animation:none}
#status{position:fixed;z-index:21;bottom:calc(var(--bottom) + 6px);left:50%;transform:translateX(-50%);background:#232128;color:#eee;padding:8px;border-radius:4px;font-size:12px;pointer-events:none;max-width:90%;text-align:center}#status:empty{display:none}
dialog{max-width:min(90vw,500px);color:#eee;background:#242329;border:1px solid #666;border-radius:6px}dialog::backdrop{background:#09090b}dialog button{margin:4px}
a{color:var(--accent)}small{color:#c5c2c9} 
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Perimeter transport and instrument layout. */
#index{z-index:6}.edge.left,
#panel,#panel[data-edge=top],#panel[data-edge=left],#panel[data-edge=right]{overflow:hidden;padding:4px;display:flex;flex-direction:column;gap:4px}
#panel[data-edge=top]{flex-direction:column-reverse}
.panel-body{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:3px}
.panel-body>.row,.panel-body>.field,.panel-body>button,.panel-body>small,.panel-body>a{flex-shrink:0}
.row{gap:3px}.row button{min-width:52px;min-height:52px;font-size:12px;line-height:1.1;padding:4px;overflow-wrap:anywhere}
.field{min-height:52px;gap:4px}.field span{flex:0 0 48px;font-size:11px}.field output{min-width:44px;font-size:11px}
input[type=range]{appearance:none;-webkit-appearance:none;display:block;min-width:52px;height:52px;min-height:52px;max-width:100%;background:transparent;touch-action:none;margin:0}
input[type=range]::-webkit-slider-runnable-track{height:8px;background:#71616c;border-radius:4px}
input[type=range]::-moz-range-track{height:8px;background:#71616c;border-radius:4px}
input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:52px;height:52px;margin-top:-22px;border:1px solid #ddbdd0;border-radius:5px;background:#a78199}
input[type=range]::-moz-range-thumb{width:50px;height:50px;border:1px solid #ddbdd0;border-radius:5px;background:#a78199}
.panel-body a{display:flex;align-items:center;min-height:52px;padding:4px}
@media(max-width:340px){.field span{flex-basis:36px}.field output{min-width:35px}}

/* Pull tabs and control surfaces. */
#index{z-index:6}.pull-tab{position:fixed;pointer-events:auto;touch-action:none;display:flex;align-items:center;justify-content:center;gap:4px;overflow:hidden;padding:4px;font-size:13px;background:#2b2830;border:1px solid #887583;border-radius:3px}
.pull-tab strong{font-size:20px;line-height:1}.pull-tab[data-edge=left],.pull-tab[data-edge=right]{flex-direction:column}.pull-tab[aria-expanded=true]{background:#3c303d;border-color:#d6b4ca}

#panel,#panel[data-edge=top],#panel[data-edge=left],#panel[data-edge=right]{position:fixed;flex-direction:column;overflow:hidden;gap:0;padding:3px;background:#222127;border:1px solid #887583;border-radius:3px}
#panel[data-control=Loop]{padding:0}.panel-body{padding:0;gap:3px;min-width:0;min-height:0}
#panel[data-control=Media] .panel-body{flex-direction:row;align-items:center;overflow:auto}#panel[data-control=Media] .panel-body>small{display:none}
#panel[data-control=Media] .row{flex:1;flex-wrap:nowrap}
.direct-timeline{position:relative;isolation:isolate;touch-action:none;flex:1;min-height:156px;min-width:156px;background:#17161b;overflow:hidden}

.time-track{position:absolute;z-index:-1;background:#4d444c;border-radius:3px;pointer-events:auto}
[data-orientation=horizontal]>.time-track{left:26px;right:26px;top:calc(50% - 4px);height:8px}
[data-orientation=vertical]>.time-track{top:26px;bottom:26px;left:calc(50% - 4px);width:8px}
.time-selection{position:absolute;background:#d3a7c3;border-radius:2px}
[data-orientation=horizontal] .time-selection{top:0;height:100%}[data-orientation=vertical] .time-selection{left:0;width:100%}
.time-handle{position:absolute;display:grid;place-items:center;width:52px;height:52px;min-width:52px;min-height:52px;padding:2px;font-size:10px;line-height:1.05;background:#bd97b1;color:#201a20;border-color:#ddbdd0;touch-action:none;overflow:hidden}
[data-orientation=horizontal] .time-handle{transform:translateX(-50%);top:0}
[data-orientation=vertical] .time-handle{transform:translateY(-50%);left:0}
.range-armed .time-handle{border-color:#fff;box-shadow:inset 0 0 0 2px #fff}

/* Keep captions readable and controls accessible at all deployment edges. */
.pull-tab{will-change:transform}.pull-tab[data-edge=left],.pull-tab[data-edge=right]{line-height:1.1;overflow-wrap:anywhere}.time-handle:focus-visible{outline:2px solid white;outline-offset:-3px}

/* Shared timeline minimum and inert panel. */
.direct-timeline{min-width:104px;min-height:104px}

[data-orientation=horizontal]>.time-track{top:22px}
[data-orientation=vertical]>.time-track{left:22px}
#panel[inert]{pointer-events:none}

/* M005 — one shared line, opposed rotated grips. The end of each grip
   protrudes 26px beyond the centered 52px playhead. */
.direct-timeline.shared-line{display:block;position:relative;min-width:104px;min-height:104px;padding:0;overflow:hidden}
.direct-timeline.shared-line>.time-track{z-index:1;overflow:visible;pointer-events:auto}
.shared-line[data-orientation=horizontal]>.time-track{left:26px;right:26px;top:calc(50% - 3px);height:6px}
.shared-line[data-orientation=vertical]>.time-track{top:26px;bottom:26px;left:calc(50% - 3px);width:6px}
.shared-line .time-handle{position:absolute;z-index:2;touch-action:none;display:flex;align-items:center;justify-content:center;padding:0;font-size:10px;line-height:1;overflow:hidden;transform:none}
.shared-line .time-handle[data-kind=head]{z-index:3;width:52px;height:52px;min-width:52px;min-height:52px;background:#5d5863;color:#eee;border-color:#aaa;font-size:16px}
.shared-line[data-orientation=horizontal] .time-handle[data-kind=head]{top:3px;transform:translate(-50%,-50%)}
.shared-line[data-orientation=vertical] .time-handle[data-kind=head]{left:3px;transform:translate(-50%,-50%)}
.shared-line[data-orientation=horizontal] .time-handle:not([data-kind=head]){width:26px;height:52px;min-width:26px;min-height:52px;transform:translateX(-50%)}
.shared-line[data-orientation=horizontal] .time-handle[data-kind=in]{top:-49px;align-items:flex-start;padding-top:3px}
.shared-line[data-orientation=horizontal] .time-handle[data-kind=out]{top:3px;align-items:flex-end;padding-bottom:3px}
.shared-line[data-orientation=vertical] .time-handle:not([data-kind=head]){width:52px;height:26px;min-width:52px;min-height:26px;transform:translateY(-50%)}
.shared-line[data-orientation=vertical] .time-handle[data-kind=in]{left:-49px;justify-content:flex-start;padding-left:3px}
.shared-line[data-orientation=vertical] .time-handle[data-kind=out]{left:3px;justify-content:flex-end;padding-right:3px}
.shared-line .time-handle[aria-disabled=true]{opacity:.55}

/* M007 direct framing: keep native touch scrolling outside video bands. */
.band{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}.band:active{cursor:grabbing}.band:focus-visible{outline:2px solid #eee;outline-offset:-3px}

/* M009: bounded instrument pages; no hidden scrollable settings drawers. */
#panel:not([data-control=Loop]) .panel-body.paged-body{display:flex;flex-direction:column;overflow:hidden;gap:3px}
#panel[data-control=Media] .panel-body.paged-body{flex-direction:column;align-items:stretch}
.instrument-page{display:flex;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;flex-direction:column;gap:3px}
.instrument-page>.row,.instrument-page>button,.instrument-page>select,.instrument-page>a,.instrument-page>.instrument-note{flex:0 0 52px;min-height:52px;height:52px;max-height:52px;min-width:0;width:100%;margin:0}
.instrument-page>.row{display:flex;flex-wrap:nowrap;gap:3px;align-items:stretch}
.instrument-page>.row button{flex:1 1 0;min-width:52px;min-height:52px;height:52px;font-size:12px;padding:3px;overflow-wrap:normal}
.instrument-page>button,.instrument-page>select,.instrument-page>a{font-size:12px;line-height:1.12;padding:4px;overflow-wrap:anywhere}
.instrument-page>select{max-width:100%;text-overflow:ellipsis}
.instrument-page>.instrument-note{display:flex!important;align-items:center;overflow-wrap:anywhere;font-size:12px;line-height:1.1;padding:3px}
.instrument-page>.field{display:grid;grid-template-columns:1fr auto;grid-template-rows:20px 52px;gap:0;min-height:72px;height:72px;flex:0 0 72px;min-width:0;margin:0}
.instrument-page>.field span{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.instrument-page>.field output{min-width:0;font-size:16px}
.instrument-page>.field input{grid-row:2;grid-column:1/-1;width:100%;min-width:52px;height:52px}
.instrument-page-picker{flex:0 0 52px;min-height:52px;height:52px;width:100%;min-width:52px;max-width:100%;font-size:12px;padding:3px;text-overflow:ellipsis}
.pull-tab[data-edge=left],.pull-tab[data-edge=right]{overflow-wrap:normal;word-break:normal}
.pull-tab[data-edge=left]{writing-mode:vertical-rl;transform:none;flex-direction:row}
.pull-tab[data-edge=right]{writing-mode:vertical-rl;transform:none;flex-direction:row}

/* M011 — fixed compact framing strip; orientation follows the attachment edge. */
#panel[data-control=Frame]{padding:0;border:0;box-shadow:inset 0 0 0 1px #887583;background:transparent;border-radius:0}
#panel[data-control=Frame] .frame-strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:4px;padding:0;overflow:hidden}
#panel[data-control=Frame][data-edge=left] .frame-strip,#panel[data-control=Frame][data-edge=right] .frame-strip{flex-direction:column}
.frame-strip>button{box-sizing:border-box;width:52px;height:52px;min-width:52px;min-height:52px;flex:0 0 52px;padding:0;font-size:27px;line-height:1}

/* M012 — non-extending index actions and separate About surface. */
 .pull-tab.direct-key{writing-mode:horizontal-tb;flex-direction:column;gap:2px;font-size:10px;line-height:1.05;touch-action:none;overflow-wrap:normal}
.pull-tab.direct-key strong{font-size:20px}
#about{overscroll-behavior:contain;box-sizing:border-box}
#about h2{font-size:18px;margin:0 0 8px}#about p{font-size:14px;line-height:1.35;margin:8px 0}#about nav{display:flex;flex-direction:column;gap:4px}#about nav a{min-height:52px;display:flex;align-items:center;padding:6px 0;overflow-wrap:anywhere}#about form{position:sticky;bottom:0;background:#242329;padding:4px 0}#about form button{width:100%;margin:0}

/* M014 — bounded partial-loop presentation retains the last accepted picture. */
.band .loop-picture{position:absolute;left:50%;top:50%;max-width:none;max-height:none;pointer-events:none;transform-origin:center;z-index:1}

/* M015 — cached scrub feedback is distinct from the live presentation. */
.band .scrub-picture{position:absolute;left:50%;top:50%;max-width:none;max-height:none;pointer-events:none;transform-origin:center;z-index:2}.band.selected::after{z-index:3}
.shared-line .cache-progress{position:absolute;bottom:1px;left:26px;right:26px;height:4px;background:#39333d;pointer-events:none;z-index:1}
.shared-line[data-orientation=vertical] .cache-progress{left:auto;right:1px;top:26px;bottom:26px;width:4px;height:auto}

/* Local decoder re-entry status; never a transport overlay. */
.band .residency-note{position:absolute;inset:auto 8px 8px;z-index:2;text-align:center;font-size:13px;line-height:1.3;padding:5px;color:#ddd;background:#141318cc;pointer-events:none}

/* Frame-constrained reorder preview. The picture is never resized. */
.pull-tab{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.pull-tab[data-reposition]{z-index:2;border-color:var(--accent);border-style:dashed;outline:2px solid var(--accent);outline-offset:-2px;cursor:grab}
.pull-tab[data-reposition=dragging]{cursor:grabbing}

#index[data-reflow=true] .pull-tab:not([data-reposition]){transition:left 140ms cubic-bezier(.2,.7,.3,1),top 140ms cubic-bezier(.2,.7,.3,1),width 140ms cubic-bezier(.2,.7,.3,1),height 140ms cubic-bezier(.2,.7,.3,1)}
#index[data-drop-valid=false] .pull-tab[data-reposition]{border-color:#e58d8d;outline-color:#e58d8d}
@media(prefers-reduced-motion:reduce){#index[data-reflow=true] .pull-tab{transition:none}}

/* Expanded timeline end grips. Equal-sized touch targets, outside the time track. */
#index[data-span-resize=true] .pull-tab:not([data-instrument=Loop]){transition:left 100ms ease,top 100ms ease,width 100ms ease,height 100ms ease}
.volume-control{position:relative;flex:1;min-width:0;min-height:0;touch-action:none;user-select:none;cursor:pointer;overflow:hidden}
.volume-track{position:absolute;background:#71616c;border-radius:4px;pointer-events:none}
.volume-control[data-edge=top] .volume-track,.volume-control[data-edge=bottom] .volume-track{top:26px;bottom:26px;left:calc(50% - 4px);width:8px}
.volume-control[data-edge=left] .volume-track,.volume-control[data-edge=right] .volume-track{left:26px;right:26px;top:calc(50% - 4px);height:8px}
.volume-thumb{position:absolute;width:52px;height:52px;border:1px solid #ddbdd0;border-radius:5px;background:#a78199;pointer-events:none;transform:translate(-50%,-50%)}
.volume-control[data-edge=top] .volume-thumb,.volume-control[data-edge=bottom] .volume-thumb{left:50%;top:var(--volume-pos)}
.volume-control[data-edge=left] .volume-thumb,.volume-control[data-edge=right] .volume-thumb{top:50%;left:var(--volume-pos)}
.volume-control:focus-visible{outline:2px solid white;outline-offset:-3px}
@media(prefers-reduced-motion:reduce){#index[data-span-resize=true] .pull-tab{transition:none}}

/* Gravity settling follows the frame axis; the picture is not involved. */
#panel[data-frame-settle=true]{transition:left 140ms cubic-bezier(.2,.7,.3,1),top 140ms cubic-bezier(.2,.7,.3,1)}
#index[data-reflow=true] :is(.timeline-zoom-key,.timeline-resize-key){transition:left 140ms cubic-bezier(.2,.7,.3,1),top 140ms cubic-bezier(.2,.7,.3,1)}
@media(prefers-reduced-motion:reduce){#panel[data-frame-settle=true],#index[data-reflow=true] :is(.timeline-zoom-key,.timeline-resize-key){transition:none}}

/* M056: exactly two fixed keys, oriented along the owning frame edge. */
:is(#panel[data-control=Clicker],#panel[data-control=Beat],#panel[data-control=Bridge]) .clicker-face{
 display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:center;gap:12px;overflow:hidden;
}
:is(#panel[data-control=Clicker],#panel[data-control=Beat],#panel[data-control=Bridge])[data-edge=bottom] .clicker-face{flex-direction:column-reverse}
:is(#panel[data-control=Clicker],#panel[data-control=Beat],#panel[data-control=Bridge])[data-edge=left] .clicker-face{flex-direction:row}
:is(#panel[data-control=Clicker],#panel[data-control=Beat],#panel[data-control=Bridge])[data-edge=right] .clicker-face{flex-direction:row-reverse}
.clicker-face>button{flex:0 0 52px;width:52px;height:52px;min-width:52px;min-height:52px;padding:3px}
#panel .instrument-key{display:grid;place-items:center}
#panel .instrument-key svg{display:block;width:32px;height:32px;pointer-events:none}

/* M053: Mobile status text is glance-readable, not miniature instrumentation. */
 #status,.band .residency-note,.instrument-page>.instrument-note,#about p,#recovery-status{font-size:16px;line-height:1.25}
#panel .field output{font-size:16px;line-height:1.2}

/* M057: drawer keys have 12px clear separation. Frame attachment spacing is independent. */
#panel .panel-body,#panel:not([data-control=Loop]) .panel-body.paged-body,
#panel .instrument-page,#panel .instrument-page>.row,#panel .row,
#panel[data-control=Frame] .frame-strip,:is(#panel[data-control=Clicker],#panel[data-control=Beat],#panel[data-control=Bridge]) .clicker-face{gap:12px}

/* M061: direct merged Arrange face, no pages or dropdown. */
#panel[data-control=Arrange] .arrange-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;overflow:hidden}
.arrange-row{display:grid;grid-template-columns:repeat(3,52px);grid-template-rows:52px;grid-auto-flow:column;flex:0 0 52px;width:180px;min-width:180px;justify-content:start;gap:12px}
.arrange-row>button,#panel[data-control=Media] .media-strip>button{width:52px;height:52px;min-width:52px;min-height:52px;padding:0}
#panel[data-control=Arrange] .arrange-count{font-size:24px;font-variant-numeric:tabular-nums;line-height:1}
#panel[data-control=Media] .media-strip{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:12px;overflow:hidden}

/* M064: Media owns file actions and selected-band framing. */
#panel[data-control=Media] .panel-body.media-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;overflow:hidden}

/* Direction keys follow the picture axis, not the drawer's attachment. */
#panel :is(.arrange-face,.media-face)[data-direction-axis=column] .arrange-direction svg{transform:rotate(90deg)}

/* M100: Media uses two aligned columns, three rows, 116px content width. */
.media-row{display:grid;grid-template-columns:repeat(2,52px);grid-template-rows:52px;flex:0 0 52px;width:116px;min-width:116px;gap:12px}
.media-row>button{width:52px;height:52px;min-width:52px;min-height:52px;padding:0}

/* M070 — fixed standard controls; independent scrolling square-key grid. */
#panel[data-control=Recent] .bookmarks-face{display:flex;flex-direction:column;gap:12px;overflow:hidden;align-items:stretch}
.bookmark-controls{display:grid;grid-template-columns:repeat(2,52px);gap:12px;flex:0 0 52px;justify-content:start}
.bookmark-controls>button{width:52px;height:52px;padding:0}
.bookmark-grid{display:grid;grid-template-columns:repeat(auto-fill,var(--bookmark-size,52px));grid-auto-rows:var(--bookmark-size,52px);gap:12px;align-content:start;justify-content:start;flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.bookmark-grid::-webkit-scrollbar{display:none}
.bookmark-file{position:relative;display:grid;place-items:center;width:var(--bookmark-size,52px);height:var(--bookmark-size,52px);padding:4px;overflow:hidden;min-width:0;min-height:0}
.bookmark-file img{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center;pointer-events:none}
.bookmark-file span{font-size:11px;line-height:1.1;overflow-wrap:anywhere;max-width:100%;max-height:100%;overflow:hidden;pointer-events:none}
#panel .bookmark-file[aria-pressed=true]{outline:3px solid #8cff9d;outline-offset:-3px}

/* M076: a device is one attached strip, not a second control page. */
#panel[data-control=Device] .device-face{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px;overflow:hidden}
#panel[data-control=Device][data-edge=left] .device-face,#panel[data-control=Device][data-edge=right] .device-face{flex-direction:column}
.device-knob{position:relative;flex:0 0 52px;width:52px;height:52px;display:grid;place-items:center;touch-action:none;user-select:none;border:1px solid #887583;overflow:hidden}
.device-dial{width:32px;height:32px;position:relative;border:2px solid #665268;border-radius:50%;background:radial-gradient(circle,#b89bac,#41313d);box-shadow:inset 0 1px 2px #fff6}
.device-mark{position:absolute;inset:1px;transform-origin:center;pointer-events:none}
.device-mark::before{content:'';position:absolute;top:1px;left:calc(50% - 1px);width:2px;height:9px;background:#fff;border-radius:1px}
.device-value{position:absolute;right:2px;bottom:1px;font-size:12px;line-height:1;color:#172a3e;background:#dceeffb0;border-radius:2px;padding:1px}
.device-knob[data-parameter=baseline]::before,.device-knob[data-parameter=peak]::before,.device-knob[data-parameter=duty]::before{content:'';position:absolute;left:3px;top:3px;width:10px;height:10px;border-bottom:2px solid currentColor}
.device-knob[data-parameter=peak]::before{border-bottom:0;border-top:2px solid currentColor}
.device-knob[data-parameter=duty]::before{border:2px solid currentColor;border-radius:50%;border-right-color:transparent}
.device-knob[aria-disabled=true]{opacity:.55;pointer-events:none}

/* M077: the fallback preserves key dimensions and leaves unused cells blank. */
#panel[data-control=Device][data-device-shape=square] .device-face{display:grid;grid-template-columns:repeat(2,52px);grid-template-rows:repeat(2,52px);gap:12px;align-content:center;justify-content:center;align-items:center;justify-items:center}

#bluetooth-diagnostic{white-space:pre-wrap;overflow-wrap:anywhere;max-height:42vh;overflow:auto;user-select:text;font:14px/1.4 ui-monospace,monospace;background:#100d12;padding:8px;border:1px solid #806775}
#bluetooth-details summary{cursor:pointer;min-height:44px;display:flex;align-items:center}

/* M088: one full-sized fader strip per loaded band.
   Scroll across strips, never along the fader axis. */
#panel[data-control=Mix] .mix-face{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;gap:12px;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:none;scroll-snap-type:x proximity;touch-action:pan-x}
#panel[data-control=Mix][data-edge=left] .mix-face,#panel[data-control=Mix][data-edge=right] .mix-face{flex-direction:column;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y proximity;touch-action:pan-y}
.mix-face::-webkit-scrollbar{display:none}
#panel[data-control=Mix] .mix-channel{display:flex;flex-direction:column;align-items:stretch;gap:12px;flex:0 0 52px;width:52px;min-width:52px;min-height:0;scroll-snap-align:start}
#panel[data-control=Mix][data-edge=bottom] .mix-channel{flex-direction:column-reverse}
#panel[data-control=Mix][data-edge=left] .mix-channel,#panel[data-control=Mix][data-edge=right] .mix-channel{flex-direction:row;flex:0 0 52px;height:52px;min-height:52px;width:auto;min-width:0}
#panel[data-control=Mix][data-edge=right] .mix-channel{flex-direction:row-reverse}
#panel[data-control=Mix] .mix-include{flex:0 0 52px;width:52px;height:52px;min-width:52px;min-height:52px;padding:0}
#panel[data-control=Mix] .mix-channel .volume-control[data-scroll-cross=true]{touch-action:pan-x}
#panel[data-control=Mix][data-edge=left] .mix-channel .volume-control[data-scroll-cross=true],#panel[data-control=Mix][data-edge=right] .mix-channel .volume-control[data-scroll-cross=true]{touch-action:pan-y}
#panel[data-control=Mix] .mix-channel .volume-thumb{display:grid;place-items:center}
.mix-number{font-size:16px;line-height:1;font-weight:800;font-variant-numeric:tabular-nums;pointer-events:none}
/* Channel focus is expressed by the lit cap, not a secondary outline.
   Inclusion remains independently represented by its channel key. */


/* Timeline end keys occupy two thirds of the former grip footprint. */
#index :is(.timeline-zoom-key,.timeline-resize-key){position:fixed;z-index:3;pointer-events:auto;display:grid;place-items:center;width:34.6667px;height:34.6667px;min-width:0;min-height:0;padding:0;font-size:16px;font-weight:700;line-height:1;touch-action:manipulation;user-select:none;--physical-key-size:34.6667px}


#index .timeline-resize-key{touch-action:none;cursor:ew-resize}
#index .timeline-resize-key svg{width:22px;height:22px;display:block;pointer-events:none}
#index .timeline-resize-key[data-orientation=vertical] svg{transform:rotate(90deg)}

/* Overview is the same authored stack inside the instrument frame. */
#media[data-overview=true]{background:#101014;outline:1px solid #77717b;gap:2px}
#media[data-overview=true] .band{cursor:pointer}
#media[data-overview=true] .audio-band{background:#24202e}
.audio-band audio{display:none}
.audio-wave{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.audio-wave-label{position:absolute;left:6px;right:6px;bottom:6px;z-index:2;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 5px;background:#141318cc;color:#eee;font-size:12px;pointer-events:none}

/* Motion drawer retains the two-row physical Arrange geometry. */
#panel[data-control=Movement] .arrange-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;overflow:hidden}
#panel[data-control=Movement] .arrange-count{font-size:24px;font-variant-numeric:tabular-nums;line-height:1}
#panel[data-control=Movement] .arrange-row>button{width:52px;height:52px;min-width:52px;min-height:52px;padding:0}
#media[data-field-slide=true]{gap:0}

/* A permanent physical duration key, independent of moving Timeline handles. */
#panel[data-control=Loop] .timeline-with-musical{display:flex;align-items:stretch;overflow:hidden;gap:12px}
#panel[data-control=Loop] .timeline-with-musical[data-timeline-axis=horizontal]{flex-direction:row;padding-right:8px}
#panel[data-control=Loop] .timeline-with-musical[data-timeline-axis=vertical]{flex-direction:column;padding-bottom:8px}
#panel[data-control=Loop] .timeline-with-musical>.direct-timeline{flex:1 1 0;min-width:104px;min-height:104px}
#panel .timeline-musical-key{flex:0 0 52px;width:52px;height:52px;min-width:52px;min-height:52px;align-self:center;padding:0;font-size:22px;line-height:1;font-variant-numeric:tabular-nums}

/* Sequencer uses the existing two-row drawer; mirrors are visual only. */
#panel[data-control=Movement] .sequence-value{font-size:16px;letter-spacing:0;white-space:nowrap}
.sequence-mirror{pointer-events:none;cursor:default}
