/* Compact, immediate DAW controls; musical state has its own color vocabulary. */
.studio-shell{--state-play:#68d65c;--state-record:#ef5249;--state-solo:#78a8ed;--state-hover:#dce0e0;--state-focus:#197c70}
.studio-shell button{transition:none;transform:none;box-shadow:none;border-radius:2px;line-height:1.2}
.studio-shell button:not(:disabled):active{background:#9fa5a6;border-color:#626b6b}
.studio-shell :is(button,input,select):focus-visible{outline:1px solid var(--state-focus);outline-offset:-1px}
.studio-shell .transport .playback{gap:2px;align-items:center}
.studio-shell .transport-button{display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:0;background:transparent;color:#303537;border-radius:1px}
.studio-shell .transport-button:hover{background:#a8aeaf}
.studio-shell .transport-button .studio-icon{width:15px;height:15px;stroke-width:1.3}
.studio-shell #pause{display:none}
.studio-shell #play[aria-pressed=true]{background:transparent;color:var(--state-play);border:0}
.studio-shell #record{color:#303537}
.studio-shell #record.recording{background:transparent;color:var(--state-record);animation:none}
.studio-shell #back{color:#525a5b;border-color:transparent;background:transparent}
.studio-shell #back.overridden{background:#e79b55;border-color:#9b6332;color:#2a241e}
.studio-shell #metronome[aria-pressed=true],.studio-shell #loop-toggle[aria-pressed=true]{background:#e3ad62;border-color:#9a794a}
.studio-shell .tabs button{border:0;border-radius:2px;color:#4c5354}
.studio-shell .tabs .active{background:#c7cece;border-color:transparent;color:#202728;box-shadow:inset 0 -2px var(--accent)}
.studio-shell .channel .toggles button[data-solo][aria-pressed=true]{background:var(--state-solo);border-color:#4f6b99;color:#15233a}
.studio-shell .channel .toggles button[data-mute][aria-pressed=true]{background:#919798;color:#444c4d}
.studio-shell .clip{position:relative;isolation:isolate}
.studio-shell .clip.playing{box-shadow:none}
.studio-shell .clip.playing::after{content:'';position:absolute;left:0;bottom:0;height:2px;width:100%;background:#35483b;transform:scaleX(var(--clip-phase,0));transform-origin:left;pointer-events:none}
.studio-shell .clip.queued{animation:none;opacity:1}
.studio-shell .clip .launch{min-width:17px;width:17px;padding:0;border:0;border-right:1px solid #343b3a33;border-radius:0;color:#353d3d}
.studio-shell .clip .launch .studio-icon{width:10px;height:10px}
.studio-shell .clip.playing .launch{color:var(--state-play);background:#434d47}
.studio-shell .clip.queued .launch,.studio-shell .scene.queued .scene-play{color:#2e803a}
.studio-shell .clip.queued[data-pulse=true] .launch,.studio-shell .scene.queued[data-pulse=true] .scene-play{color:var(--state-play);background:#434d47}
.studio-shell .scene[aria-pressed=true]{background:#a7b3ac;color:#17291e}
.studio-shell .scene[aria-pressed=true] .scene-play{color:#16662c}
.studio-shell .app-menubar>button:hover,.studio-shell .app-menubar>button[aria-expanded=true]{background:#ced5d4;color:#172323}
.studio-shell .app-menu-popup{width:330px;padding:3px;max-height:calc(100dvh - 70px);overflow-y:auto;border:1px solid #81898a;border-radius:1px;box-shadow:2px 3px 7px #0003;background:#d9dddd}
.studio-shell .app-menu-popup>button{min-height:23px;padding:4px 8px;font-size:11px;gap:18px}
.studio-shell .app-menu-popup>button:hover,.studio-shell .app-menu-popup>button:focus{background:#8dbdb4;color:#152a25;outline:0}
.studio-shell .app-menu-popup>button[aria-disabled=true],.studio-shell .app-menu-popup>button[aria-disabled=true]:hover{background:transparent;color:#858d8d;cursor:default}
.studio-shell .app-menu-popup small{color:inherit;opacity:.75;font:10px Arial,sans-serif;text-transform:none}
.studio-shell .app-menu-popup hr{margin:3px 5px;border-color:#b4bcbc}
.studio-shell .app-menu-popup[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.studio-shell .clip.playing::after{display:none}}
@media(max-width:720px){.studio-shell .transport-button{min-width:27px;height:27px}.studio-shell .app-menu-popup>button{min-height:31px}.studio-shell .app-menu-popup{max-height:calc(100dvh - 80px)}}
/* Flat parameter tracks and small rectangular handles replace browser-specific thumbs. */
.studio-shell input[type=range]:not([data-volume]):not(#master){appearance:none;height:14px;background:transparent;border:0;padding:0;cursor:ew-resize}
.studio-shell input[type=range]:not([data-volume]):not(#master)::-webkit-slider-runnable-track{height:2px;background:#7b8484;border:0;border-radius:0}
.studio-shell input[type=range]:not([data-volume]):not(#master)::-webkit-slider-thumb{appearance:none;width:6px;height:10px;margin-top:-4px;background:#3c4545;border:1px solid #242b2b;border-radius:0;box-shadow:none}
.studio-shell input[type=range]:not([data-volume]):not(#master)::-moz-range-track{height:2px;background:#7b8484;border:0;border-radius:0}
.studio-shell input[type=range]:not([data-volume]):not(#master)::-moz-range-thumb{width:5px;height:9px;background:#3c4545;border:1px solid #242b2b;border-radius:0;box-shadow:none}
/* Keyboard selection shares the same slot boundaries as pointer selection. */
.studio-shell .slot:focus-visible{outline:1px solid #233a36;outline-offset:-1px;background:#a6beb8}
/* The insert marker and moving playhead are separate transport positions. */
.studio-shell .timeline-insert-marker{position:absolute;top:22px;bottom:0;width:1px;z-index:3;pointer-events:none;background:#337db7;border-left:1px dotted #d2e7f5}
.studio-shell .timeline-insert-marker::before{content:'';position:absolute;top:-5px;left:-4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #337db7}
/* Deactivated Session placements remain editable and retain their source color identity. */
.studio-shell .clip.inactive{background:#b9bdbc;border-color:#929b99;box-shadow:none}
.studio-shell .clip.inactive .clip-select{color:#737c79;text-decoration:line-through;text-decoration-thickness:1px}
.studio-shell .clip.inactive .launch,.studio-shell .clip.inactive.playing .launch{color:#828c88;background:#a9b2af}
.studio-shell .slot.selected{box-shadow:inset 0 0 0 1px #253f39;background:#a5bdb6}
.studio-shell .slot.selected .clip-select[aria-pressed=true]{background:transparent;color:inherit}
/* Empty Session space selects; only the explicit plus button imports. */
.session-grid{position:relative}.session-empty-space{flex:1;align-self:stretch;min-width:20px;cursor:default;touch-action:pan-x pan-y}.studio-shell .empty-slot-controls>.empty-slot{flex:0 0 17px;width:17px;min-width:17px}.session-marquee{position:absolute;z-index:8;pointer-events:none;border:1px solid #315e56;background:#7fb5a926;box-sizing:border-box}.session-context-menu{width:230px!important;max-height:calc(100dvh - 8px)!important}.session-grid.session-selecting{user-select:none;cursor:crosshair}.session-grid.session-selecting .session-empty-space{cursor:crosshair}

/* Compact clip source properties; source color remains independent of track color. */
.studio-shell .clip-source-properties{margin:0;padding:8px;min-width:0;border:1px solid #7c8481;display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#b3b9b6;color:#303734}
.studio-shell .clip-source-properties legend{font-size:10px;font-weight:600;padding:0 4px;color:#303734}
.studio-shell .clip-source-properties label{color:#39433f}.studio-shell .clip-source-properties .micro{color:#4a5550;margin:0;line-height:1.4}
.clip-color-field>span{display:block;font-size:9px;margin-bottom:5px}.clip-color-palette{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.studio-shell .clip-color-palette [data-clip-color]:not(.clip-track-color),.session-context-menu .context-color-swatch{background:var(--swatch)!important;border:1px solid #46534b!important;border-radius:0!important;box-shadow:none;min-width:17px;width:17px;height:17px;padding:0!important}
.studio-shell .clip-color-palette [aria-pressed=true]{outline:2px solid #263f36;outline-offset:1px}.clip-color-palette .clip-track-color{font-size:9px;padding:1px 4px}
.clip-source-properties .clip-custom-color{display:flex;flex-direction:row;align-items:center;gap:4px;font-size:9px;margin:0}.clip-source-properties input[type=color]{width:23px;height:20px;min-height:20px;padding:1px}
.clip-info summary{font-size:10px;cursor:pointer}.studio-shell .clip-info textarea{font-size:11px;font-family:inherit;color:#303734;background:#d9dedb;border:1px solid #7c8481;width:100%;max-width:100%;min-height:65px;resize:vertical;margin:6px 0;padding:5px;box-sizing:border-box}
.context-color-palette{display:flex;gap:5px;flex-wrap:wrap;padding:8px}.session-context-menu .context-color-swatch{min-height:17px!important;color:#263f36!important}.session-context-menu .context-color-swatch:focus{outline:2px solid #c1d5cb;outline-offset:1px}
@media(max-width:480px){.studio-shell .clip-source-properties{gap:7px;padding:6px}.clip-color-palette{gap:5px}}

.studio-shell .group-slot{background:color-mix(in srgb,var(--group-clip,#7b8986) 22%,transparent)}

/* Recording controls share the compact mixer and Session grid geometry. */
.studio-shell .toggles .arm-input{display:inline-flex;align-items:center;justify-content:center;min-width:22px;padding:3px;color:#562c2c}
.studio-shell .toggles .arm-input.armed,.studio-shell .slot-record.recording{background:#c46560;color:#fff;border-color:#8c4340}
.studio-shell .empty-slot-controls .slot-record{width:20px;min-width:20px;padding:2px;flex:none;color:#98443e;display:inline-flex;align-items:center;justify-content:center}
.studio-shell .empty-slot-controls .slot-record[hidden],.studio-shell .empty-slot-controls [data-slot-stop][hidden]{display:none!important}
.studio-shell .empty-slot-controls .slot-record.recording{color:#fff}

.studio-shell .arrangement-take-preview{position:absolute;top:3px;bottom:3px;min-width:2px;overflow:hidden;pointer-events:none;box-sizing:border-box;background:#c46560b3;border:1px solid #8c4340;color:#fff;padding:4px;font-size:10px;white-space:nowrap;z-index:4}
