/* Vesa Studio: viewport workspace, internal scrolling and floating tools. */
body:has(#audio-editor){overflow:hidden}
body:has(#audio-editor) .topbar{height:38px;padding:0 14px}
body:has(#audio-editor) .sidebar{width:170px;padding:18px 10px}
body:has(#audio-editor) .app-shell{margin-left:170px;height:100dvh;min-height:0}
body:has(#audio-editor) #main{max-width:none;height:calc(100dvh - 38px);min-height:0;padding:5px}
body:has(#audio-editor) #main>:not(#audio-editor),body:has(#audio-editor) .footer{display:none!important}
#audio-editor{--ink:#e5ecf7;--muted:#9ba8bc;--line:#3a4557;--teal:#ffad66;box-sizing:border-box;position:relative;isolation:isolate;display:flex;flex-direction:column;height:100%;width:100%;min-height:0;margin:0;padding:6px;border:1px solid #3b4659;border-radius:6px;background:#1b222d;color:var(--ink);font:12px system-ui,sans-serif;overflow:hidden}
#audio-editor *{box-sizing:border-box}
#audio-editor .btn,#audio-editor button{border:1px solid #4c5a71;border-radius:4px;background:#303c4d;color:#e6edf8;box-shadow:none;cursor:pointer;font-size:12px;font-weight:600;min-height:27px;padding:3px 7px;line-height:1.2}
#audio-editor button:hover{background:#43536a}
#audio-editor button:disabled{opacity:.35;cursor:default}
#audio-editor button[aria-pressed=true],#audio-editor .on{background:#b98043;color:#fff;border-color:#ffc27a}
#audio-editor button:focus-visible,#audio-editor input:focus-visible,#audio-editor select:focus-visible{outline:2px solid #ffca87;outline-offset:1px}
#audio-editor input,#audio-editor select{min-height:24px;max-width:100%;min-width:0;padding:2px 5px;border:1px solid #465369;border-radius:3px;background:#111925;color:#dfe8f8;font:11px system-ui}
#audio-editor input[type=range]{padding:0;border:0;background:transparent;accent-color:#f0ad69;height:18px;min-height:14px}
#audio-editor input[type=checkbox]{width:12px;height:12px;min-height:0;accent-color:#efad67}
#audio-editor label{font-size:10px;display:flex;align-items:center;gap:4px;white-space:nowrap}
.studio-transport,.studio-editbar{flex:none;display:flex;align-items:center;gap:5px;min-height:35px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;border-bottom:1px solid #3c4759;padding:3px 0}
.studio-transport>*{flex-shrink:0}
.studio-brand{display:flex;align-items:center;gap:5px;font-weight:700;font-size:12px;margin-right:5px}
.studio-brand img{width:20px;height:25px}
.studio-brand small{font-size:8px;color:#a5b1c4;font-weight:400}
.transport-buttons{display:flex;gap:3px}
#audio-editor .transport-buttons .btn{width:29px;height:29px;font-size:14px;padding:3px}
#audio-editor [data-ed=record],#audio-editor button.recording{color:#ff8b8e;border-color:#b75059}
#audio-editor button.recording,#audio-editor [data-ed=record][aria-pressed=true]{background:#a83a45;color:#fff}
.studio-position{display:flex;flex-direction:column;background:#111823;border:1px solid #3d4b60;border-radius:3px;padding:2px 6px;min-width:100px}
#ed-time{color:#ffd28e;font:14px ui-monospace,monospace;letter-spacing:1px}
#audio-editor #ed-cursor{width:100%;min-height:14px;height:16px;border:0;font:10px ui-monospace,monospace;padding:0;color:#a3b2c7}
#audio-editor .studio-transport input[type=number]{width:48px}
#audio-editor #ed-bpm{width:53px}
.studio-editbar{gap:4px;min-height:32px}
.studio-zoom{display:flex;align-items:center;gap:6px;margin-left:auto}
#audio-editor .studio-zoom input{width:76px}
#audio-editor .studio-editbar select{max-width:125px}
#ed-rec-time{font:11px ui-monospace,monospace;color:#ff9299}
.studio-arrangement{flex:1;min-height:95px;position:relative;overflow:hidden;margin:4px 0}
#audio-editor .ed-timeline{position:relative;width:100%;height:100%;max-height:none;border:1px solid #444f61;border-radius:3px;background:#121820;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
#audio-editor #ed-canvas{display:block;width:100%;min-width:380px;touch-action:none}
#audio-editor .ed-track-headers{position:absolute;left:0;top:34px;width:190px;z-index:2;background:#202a38}
#audio-editor .ed-track-header{position:relative;display:flex;flex-direction:column;justify-content:space-around;gap:2px;box-sizing:border-box;border-left:4px solid var(--track-color);border-right:1px solid #52627a;border-bottom:4px solid #121820;padding:3px 5px;background:linear-gradient(90deg,color-mix(in srgb,var(--track-color) 13%,#1c2634),#1c2634)}
#audio-editor .ed-track-header.selected{box-shadow:inset 0 0 0 1px #b2c4dc;background:#303e53}
.ed-track-title{display:flex;align-items:center;gap:4px}
#audio-editor .ed-track-title input[data-ed-name]{width:100%;font-weight:600;min-height:19px;height:20px;padding:1px 4px;border-color:transparent;background:#121a2480}
#audio-editor .ed-track-title input[type=color]{width:16px;height:17px;min-height:17px;padding:0;border:0;flex:none}
.ed-ms{display:flex;gap:3px}
#audio-editor .ed-ms button{min-width:24px;min-height:20px;height:21px;padding:1px 5px;font-size:10px}
#audio-editor .ed-ms .armed{background:#853c49;border-color:#ed8c95;color:#fff}
.ed-header-mix{display:flex;align-items:center;gap:5px}
#audio-editor .ed-header-mix input{width:90px}
.ed-header-mix output{margin-left:auto;font:9px ui-monospace,monospace}
#audio-editor .ed-track-header>input[type=range]{width:100%;height:12px;min-height:12px}
#audio-editor meter{accent-color:#67c49c;display:block;background:#121721;border:0;border-radius:2px;width:100%;height:6px}
#audio-editor meter::-webkit-meter-bar{background:#121721;border:0}
#audio-editor meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#469e82,#98d080,#efc46d)}
#audio-editor meter.clipping{outline:1px solid #ff6e7d}
.ed-empty{position:absolute;left:200px;right:10px;top:65px;pointer-events:none;color:#a4b0c0;font-size:12px;text-align:center;line-height:1.8}
#audio-editor .ed-mixer{flex:none;max-height:32dvh;margin:0;border:1px solid #414e62;border-radius:3px;overflow:hidden;background:#151d28;resize:none}
#audio-editor summary{font-size:11px;cursor:pointer;padding:4px 7px;color:#cfdae9}
.ed-mixer summary{height:23px;line-height:15px;background:#2b3647}
.ed-mixer summary span{font-size:9px;color:#9fadc3;margin-left:10px}
#audio-editor .ed-track-volumes{display:flex;align-items:stretch;gap:4px;height:157px;max-height:calc(32dvh - 23px);min-height:0;margin:0;padding:4px;overflow-x:auto;overflow-y:auto;background:#111923;overscroll-behavior:contain}
#audio-editor .ed-channel{flex:0 0 105px;min-width:105px;max-width:105px;padding:4px;gap:3px;display:flex;align-items:stretch;flex-direction:column;background:#243042;border-top:3px solid var(--track-color);border-radius:2px;cursor:pointer}
#audio-editor .ed-channel.selected{background:#35465e;box-shadow:inset 0 0 0 1px #a8bfdd}
#audio-editor .ed-channel .ed-channel-select{background:#162131;border-color:transparent;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:10px;min-height:21px;height:21px;padding:2px}
.ed-channel-fader{display:flex;justify-content:center;align-items:center;gap:10px;flex:1;min-height:34px}
#audio-editor .ed-channel-fader input[type=range]{writing-mode:vertical-lr;direction:rtl;width:20px;height:62px;min-height:34px}
#audio-editor .ed-channel-fader meter{writing-mode:vertical-lr;direction:rtl;width:9px;height:62px}
#audio-editor .ed-channel output{font:10px ui-monospace,monospace;text-align:center}
#audio-editor .ed-channel input[data-ed-pan]{width:100%;height:12px;min-height:12px}
#audio-editor .ed-channel .ed-insert-count{height:16px;min-height:16px;padding:1px 3px;background:#192537;border-color:transparent;font-size:9px}
#audio-editor .ed-master-channel{position:sticky;right:0;margin-left:auto;border-color:#ffad68}
.ed-master-badge{font-size:8px;text-align:center;letter-spacing:1px;color:#ffcf95}
.studio-chain-dock{display:flex;align-items:center;gap:9px;flex:none;min-height:38px;border:1px solid #3d4b61;background:#202c3c;margin-top:3px;padding:5px}
.studio-chain-dock>strong{font-size:10px;max-width:110px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex:none}
.phoenix-slots{display:flex;align-items:center;gap:5px;min-width:0;overflow-x:auto;flex:1}
.phoenix-caption{font-size:8px;letter-spacing:.5px;color:#94a3b7;max-width:57px;white-space:normal;flex:none}
#audio-editor .phoenix-slot{display:flex;align-items:center;gap:4px;min-width:90px;white-space:nowrap;font-size:10px;background:#35455d;padding:4px;height:26px}
.phoenix-slot img{width:14px;height:17px}
.phoenix-slot.bypassed{opacity:.5;border-style:dashed!important}
.phoenix-add{display:flex;align-items:center;flex:none}
#audio-editor .phoenix-add span{font-size:9px}
#audio-editor .phoenix-add select{width:125px;font-size:10px}
.studio-status{flex:none;display:flex;align-items:center;gap:12px;justify-content:space-between;min-height:19px;padding:3px;color:#9babc0;font:9px ui-monospace,monospace;overflow:hidden;white-space:nowrap}
.studio-status label{font-size:9px}
.studio-status a{color:#ffd093}
#audio-editor.ed-expanded,#audio-editor:fullscreen{position:fixed;inset:0;width:100%!important;height:100dvh!important;max-height:100dvh;margin:0!important;z-index:10000;border-radius:0;padding:6px;overflow:hidden;background:#1b222d}
#audio-editor .studio-floating-panel,#audio-editor .phoenix-window{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:10040;width:min(840px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:#182231;border:1px solid #a7794f;border-radius:7px;box-shadow:0 15px 70px #000a;padding:10px;overflow:auto}
#audio-editor [hidden]{display:none!important}
#audio-editor .phoenix-window{width:min(860px,calc(100vw - 24px));height:min(600px,calc(100dvh - 24px));display:flex;flex-direction:column;padding:10px;overflow:hidden;resize:both;min-width:min(350px,calc(100vw - 24px));min-height:280px}
.phoenix-window header{display:flex;align-items:center;gap:5px;padding-bottom:7px;flex:none;cursor:move;touch-action:none;border-bottom:1px solid #3c4c63}
.phoenix-window header img{width:24px;height:29px}
.phoenix-window header>div{margin-right:auto}
#audio-editor .phoenix-window h3{font-size:17px;color:#ffcf80;margin:0;letter-spacing:-.5px}
.phoenix-window header span{font-size:10px;color:#a3b2c6}
.phoenix-graph-toolbar{display:flex;align-items:center;gap:10px;font-size:9px;color:#9cacc2;padding:7px 0;flex:none;overflow:hidden;white-space:nowrap}
.phoenix-graph-hint{margin-left:auto;font-size:9px;color:#c4cfe0}
.phoenix-display{display:flex;min-height:120px;flex:1;background:#10151d;border:1px solid #37465c;border-radius:4px;overflow:hidden}
#phoenix-graph{flex:1;min-width:0;width:100%;height:100%;touch-action:none;cursor:crosshair}
.phoenix-meter-bank{display:flex;gap:7px;padding:8px;border-left:1px solid #34435b;background:#172030;flex:none;width:105px}
#audio-editor .phoenix-meter-bank label{display:flex;flex-direction:column;gap:5px;font-size:9px;flex:1;color:#c6d3e7}
#audio-editor .phoenix-meter-bank meter{writing-mode:vertical-lr;direction:rtl;width:10px;height:100%;min-height:40px;flex:1}
.phoenix-meter-bank output{font:9px ui-monospace,monospace;width:26px;text-align:center}
#phoenix-band-controls{flex:none}
.phoenix-band-selector{display:flex;gap:4px;margin:6px 0}
.phoenix-band-values{display:flex;gap:8px;flex-wrap:wrap}
#audio-editor .phoenix-band-values label{display:flex;gap:4px;font-size:10px}
#audio-editor .phoenix-band-values input{width:70px}
.phoenix-params{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px;padding-top:7px;max-height:135px;flex:none;overflow:auto}
#audio-editor .phoenix-params label{display:flex;flex-direction:column;gap:3px;padding:5px;border:1px solid #36445b;background:#111b29;border-radius:3px;min-width:0}
#audio-editor .phoenix-params input{width:100%}
.phoenix-window footer{display:flex;gap:8px;align-items:center;padding-top:6px;font-size:9px;color:#93a5bc;line-height:1.4;flex:none;max-height:38px;overflow:auto}
.phoenix-window footer [data-phoenix-gr]{color:#ffcf80;white-space:nowrap}
.phoenix-window footer a{color:#ebc183}
.studio-inspector header{display:flex;justify-content:space-between;align-items:center}
.ed-inspector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:8px}
.ed-inspector section{border:1px solid #3a4a60;padding:9px;border-radius:4px}
#audio-editor .ed-inspector h3{font-size:13px;letter-spacing:0;margin:0 0 8px;color:#d6dfed}
.ed-fields{display:flex;flex-direction:column;gap:7px}
#audio-editor .ed-field{display:flex;align-items:start;flex-direction:column;gap:3px;white-space:normal;font-size:11px;margin:5px 0}
.ed-field input,.ed-field select{width:100%}
.ed-inspector .ed-toolbar{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.ed-inspector p{font-size:10px;color:#98a9c1;margin:6px 0}
.ed-points{max-height:150px;overflow:auto}
.ed-points>div{display:flex;gap:4px;margin:5px 0}
.ed-points label{display:flex;flex-direction:column;min-width:0}
.ed-points input{width:100%}
@media(max-width:900px){body:has(#audio-editor) .sidebar{display:none}body:has(#audio-editor) .app-shell{margin-left:0}body:has(#audio-editor) #main{height:calc(100dvh - 105px);padding:3px}body:has(#audio-editor) .mobile-nav{height:65px}.studio-brand small{display:none}.phoenix-graph-hint{display:none}}
@media(max-height:550px){#audio-editor .ed-track-volumes{height:105px}#audio-editor .ed-channel-fader input[type=range],#audio-editor .ed-channel-fader meter{height:34px}#audio-editor .studio-status{display:none}.studio-brand small{display:none}.phoenix-window footer{display:none}}
@media(max-width:550px){.ed-inspector{grid-template-columns:1fr}.phoenix-graph-toolbar{gap:5px}.phoenix-meter-bank{width:83px;padding:5px;gap:3px}.phoenix-params{grid-template-columns:repeat(3,minmax(0,1fr));max-height:155px}.phoenix-window header span{font-size:9px}.studio-status>span:last-child{display:none}}
#audio-editor .ed-track-header{gap:1px;padding:2px 5px}
#audio-editor .ed-track-title input[data-ed-name]{min-height:17px;height:17px}
#audio-editor .ed-header-mix input[type=range]{height:12px;min-height:12px}
#audio-editor .ed-track-header>input[type=range]{height:10px;min-height:10px}
#audio-editor .ed-track-header meter{height:4px;min-height:4px}
@media(max-width:900px){body:has(#audio-editor) .mobile-nav{display:flex}}
#audio-editor .phoenix-window:not([data-plugin-type=eq]) .phoenix-graph-toolbar label{display:none}
/* Contextual DAW tools: keep transport clear and panels within the viewport. */
.pro-session{display:flex;align-items:center;gap:10px;flex:none;min-height:30px;padding:2px 4px;background:#111925;border-bottom:1px solid #435166;overflow-x:auto;white-space:nowrap}
.pro-session>strong{max-width:200px;overflow:hidden;text-overflow:ellipsis}.pro-session #pro-save{color:#9fb8ae;font-size:10px}.pro-session [data-state=error]{color:#ff9f9f!important}.pro-rec-destination{color:#ffbda1;font-size:11px;margin-left:auto}
#audio-editor .ed-track-header [data-control-kind=pan]{accent-color:#8cbbde;background:linear-gradient(90deg,transparent 49%,#b3d7f0 49%,#b3d7f0 51%,transparent 51%)}
#audio-editor .ed-header-mix:before{content:'PAN';color:#a9cbe5;font:9px ui-monospace,monospace}.ed-header-mix{gap:4px}
#audio-editor .ed-channel-fader:after{content:'+3\a 0\a −12\a −24\a −60';white-space:pre;position:absolute;right:5px;top:0;line-height:19px;color:#c1cad8;font:8px/18px ui-monospace,monospace;pointer-events:none}.ed-channel-fader{position:relative;padding-right:17px}
#audio-editor meter.clipping{outline:1px solid #ff5b68}.pro-divider{height:6px;flex:none;cursor:row-resize;background:#303e50;border-top:1px solid #54647a;touch-action:none}.pro-divider:hover{background:#c28b52}
#audio-editor .ed-mixer{flex:none;max-height:var(--mixer-height,190px);overflow:auto}#audio-editor .ed-track-volumes{min-height:130px;height:calc(var(--mixer-height,190px) - 28px)}
#audio-editor .pro-panel{z-index:90;position:absolute;right:12px;top:45px;width:min(640px,calc(100% - 24px));max-height:calc(100% - 64px);display:flex;flex-direction:column;background:#1c2736;border:1px solid #6b7b92;border-radius:7px;box-shadow:0 16px 48px #0009;overflow:hidden;color:#e6edf6;resize:both;min-width:280px;min-height:160px}
.pro-panel header{display:flex;align-items:center;justify-content:space-between;padding:10px;background:#29364a}.pro-panel nav{display:flex;gap:4px;padding:7px;overflow-x:auto;flex:none}.pro-panel-body{overflow:auto;padding:14px;min-height:0}.pro-panel-body p{font-size:12px;color:#b8c7d7;white-space:normal}.pro-panel-body h4{margin:16px 0 8px}.pro-panel-body label{display:flex!important;gap:10px!important;margin:8px 0;font-size:12px!important;white-space:normal!important;justify-content:space-between}.pro-panel-body label input:not([type=checkbox]),.pro-panel-body label select{max-width:280px!important;width:55%;font-size:12px!important}.pro-panel-body button{margin:3px}.pro-actions,.pro-take,.pro-bus,.pro-point{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.pro-take{justify-content:space-between;border-bottom:1px solid #3c4c62;padding:6px 0}.pro-bus>input{max-width:160px}.pro-lane{border:1px solid #4a5a70;border-radius:4px;margin:10px 0;padding:8px}.pro-lane canvas{width:100%;height:64px;cursor:crosshair}.pro-point label{flex:1}.pro-history{max-height:160px;overflow:auto}.pro-plugin-tools{display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:#192535}.pro-plugin-tools select{max-width:150px}
@media(max-height:650px){.pro-session #pro-save{display:none}#audio-editor .ed-track-volumes{min-height:100px;height:110px}.pro-session{gap:5px}}
#audio-editor .pro-panel{left:auto;transform:none;padding:0;z-index:10039}
#audio-editor .ed-channel-fader:after{content:none}.pro-fader-scale{position:absolute;right:0;top:50%;transform:translateY(-50%);height:62px;width:20px;color:#b9c9dc;font:8px ui-monospace,monospace;pointer-events:none}.pro-fader-scale span{position:absolute;right:0;transform:translateY(-50%)}

/* Phoenix contextual controls */
.phoenix-insert{display:inline-flex;align-items:center;border:1px solid #435166;border-radius:7px;overflow:hidden}.phoenix-insert .phoenix-slot{border:0;border-radius:0}.phoenix-insert>button{min-width:26px;padding:4px;background:#202c3c;color:#d6e4f4;border:0;border-left:1px solid #435166}.phoenix-insert>button[aria-pressed=false]{color:#ffac66}.phoenix-help,.phoenix-automation-question{position:absolute;z-index:130;background:#182433;color:#e4edf8;border:1px solid #7994b6;border-radius:12px;padding:20px;box-shadow:0 16px 60px #0009;max-width:min(520px,90vw)}.phoenix-help{right:12px;top:110px;pointer-events:none}.phoenix-help p{font-size:13px;line-height:1.6;color:#d3e0ef}.phoenix-automation-question{left:50%;top:30%;transform:translateX(-50%)}.phoenix-automation-question label{display:block;margin-top:16px}.phoenix-marquee-tools{position:absolute;bottom:32px;left:210px;z-index:50;background:#263d54;color:#e4f3ff;padding:8px;border-radius:6px;font-size:12px}.phoenix-marquee-tools button{margin-left:6px}.studio-chain-dock .phoenix-slots{overflow-x:auto;flex-wrap:nowrap}.studio-brand{white-space:nowrap}
.phoenix-track-inspector{position:absolute;left:12px;top:136px;bottom:40px;z-index:65;width:min(300px,calc(100% - 24px));overflow:auto;background:#162230;border:1px solid #4c637d;border-radius:10px;padding:18px;box-shadow:0 10px 35px #0008;color:#e5edf7}.phoenix-track-inspector header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.phoenix-track-inspector label{display:block;font-size:12px;margin:16px 0}.phoenix-track-inspector input[type=range]{display:block;width:100%;margin-top:10px}.phoenix-track-inspector .phoenix-slots{display:flex;flex-direction:column;align-items:stretch}.phoenix-track-inspector .phoenix-insert{flex-shrink:0}.phoenix-track-inspector h4{margin-top:20px;color:#a4c5e5}.phoenix-track-inspector p{font-size:12px;color:#b4c5d8}

.phoenix-window:is([data-plugin-type=hall],[data-plugin-type=room],[data-plugin-type=plate],[data-plugin-type=delay],[data-plugin-type=saturate]) .phoenix-meter-bank>label:last-child{display:none}.phoenix-window:is([data-plugin-type=hall],[data-plugin-type=room],[data-plugin-type=plate],[data-plugin-type=delay],[data-plugin-type=saturate],[data-plugin-type=multiband]) .phoenix-graph-toolbar>label{display:none}

.aw-details{font-size:11px;line-height:1.5;padding:10px 18px;background:#172433;color:#c4d8ee}.aw-details p{color:inherit;margin:4px 0}.aw-details a{color:#8addc5}.phoenix-airwindows .phoenix-meter-bank>label[hidden]{display:none}.phoenix-airwindows .phoenix-graph-toolbar>label{display:inline-flex!important}

#audio-editor .phoenix-airwindows .aw-details{padding:8px 12px;flex:none}#audio-editor .phoenix-airwindows .aw-details p{font-size:11px;line-height:1.5;margin:3px 0;color:#c4d8ee}#audio-editor .phoenix-airwindows .phoenix-params{grid-template-columns:repeat(5,minmax(0,1fr));max-height:185px;padding-bottom:4px}#audio-editor .phoenix-airwindows .phoenix-params input[type=number]{min-height:25px;font-size:12px}@media(max-width:650px){#audio-editor .phoenix-airwindows .phoenix-params{grid-template-columns:repeat(3,minmax(0,1fr));max-height:205px}}
