/* Menu mechanics: open/close, paging, scroll and popover placement. The look of
   every menu (smoked glass, words, light) lives in field-ui.css; nothing here paints. */
body.instrument-frame .spatial-ui{color:var(--note-text)}
/* A closed Sound panel takes its stage out of the tab order. */
body.instrument-frame #panel-audio.spatial-ui:not(.open) .space-stage{display:none}
body.instrument-frame #panel-audio.spatial-ui.open,body.instrument-frame #panel-visual.spatial-ui.open{pointer-events:auto}
/* Tabs page through cards; only the current one shows. */
body.instrument-frame .menu-pages>.space-card:not(.menu-current){display:none!important}
body.instrument-frame .menu-content{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}
body.instrument-frame .menu-pages{min-width:0;min-height:0}
/* Recording popover is placed against the viewport by design-system.js. */
body.instrument-frame #instrument-rail #record-menu{position:fixed;right:auto;bottom:auto;box-sizing:border-box;max-height:min(640px,calc(100dvh - 120px));overflow:auto;overscroll-behavior:contain}
@media(max-width:450px){body.instrument-frame #instrument-rail #record-menu{left:12px;right:12px;width:calc(100vw - 24px);max-width:none}}
/* Audio input indicator in the rail: a word with the scene's glowing dot. */
body.instrument-frame #instrument-rail #input-indicator{position:relative;margin-left:8px;padding-left:14px;color:var(--note-text);font:var(--note-weight-text) var(--note-text-sm)/var(--note-leading) var(--note-font);white-space:nowrap}
body.instrument-frame #instrument-rail #input-indicator::before{content:'';position:absolute;left:0;top:calc(50% - var(--note-dot) / 2);width:var(--note-dot);height:var(--note-dot);border-radius:50%;background:var(--scene-accent);box-shadow:var(--note-glow)}
body.instrument-frame #instrument-rail #input-indicator[hidden]{display:none}
@media(prefers-reduced-motion:reduce){body.instrument-frame .spatial-ui *{scroll-behavior:auto!important;transition:none!important}}
