/* Beta 0.34 optional panels: Blank, AI Build, Vista, Day Sheet, and detached notes. Studio palette, flat keys. */
.blank-panel,.ai-build,.vista-panel,.day-sheet{padding:10px;font-size:var(--text-xs);color:var(--ink);container-type:inline-size}
.blank-toolbar,.aib-actions,.aib-head,.vx-bar,.ds-shot-bar,.ds-mt-bar,.vx-map-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.blank-screen-pick{display:flex;align-items:center;gap:6px}
.blank-empty{margin:10px 0}
.blank-screens{display:grid;gap:10px;margin-top:10px}
.blank-screen{border:1px solid #33383e;border-radius:6px;overflow:hidden;background:#15181b}
.blank-screen-head{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:4px 6px;background:#1d2024;border-bottom:1px solid #33383e}
.blank-screen-head span{display:flex;gap:4px}
.blank-screen-head button{min-height:24px;padding:2px 8px}
.blank-screen .workspace-mirror{padding:6px;max-height:420px;overflow:auto}

/* AI Build */
.aib-head{justify-content:space-between;margin-bottom:8px}
.aib-status{color:var(--muted)}
.aib-prompt-label{display:grid;gap:4px;margin-bottom:6px}
.aib-prompt-label textarea{width:100%;resize:vertical;min-height:54px;font:inherit;font-size:13px}
.aib-more{display:inline-block;position:relative}
.aib-more summary{cursor:pointer;padding:4px 8px;border:1px solid #3a3f45;border-radius:4px;list-style:none}
.aib-more[open]{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.aib-message{min-height:18px;margin:6px 0}
.aib-message.aib-error{color:#f2a07b}
.aib-stage{position:relative;border:1px solid #33383e;border-radius:6px;background:#111315;min-height:240px;overflow:hidden}
.aib-empty{padding:16px;margin:0}
.aib-frame{display:block;width:100%;height:clamp(260px,60vh,900px);border:0;background:#111315}
.aib-source{max-height:320px;overflow:auto;white-space:pre-wrap;background:#15181b;border:1px solid #33383e;border-radius:6px;padding:8px;font:12px/1.45 ui-monospace,Menlo,Consolas,monospace;margin-top:8px}

/* Vista EX */
/* Vista panel: Vista EX right-hand section, styled like the MA panel (flat keys, studio palette). */
.vx-bar{margin-bottom:6px;color:var(--muted)}
.vx-mode-label{color:var(--accent);font-variant-numeric:tabular-nums;margin-right:auto;font-weight:600}
.vx-activity{font-size:11px;color:var(--muted);padding:2px 8px;border-radius:10px;border:1px solid var(--line)}
.vx-activity.vx-live{color:#121212;background:#7bd389;border-color:#7bd389}
.vx-settings{flex-basis:100%}
.vx-settings[open]{display:grid;gap:8px;padding:8px;border:1px solid var(--line);border-radius:4px;background:var(--bg)}
.vx-settings summary{cursor:pointer;width:max-content;font-weight:600;color:var(--ink)}
.vx-settings label{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.vx-message{min-height:16px;margin:4px 0 8px;color:var(--muted)}
.vx-board{display:grid;grid-template-columns:minmax(0,1fr) 54px;gap:10px 14px;padding:12px;border:1px solid var(--line);border-radius:4px;background:var(--bg)}
.vx-main{display:grid;gap:8px;min-width:0}
.vx-encoders{display:flex;justify-content:space-around;padding:0 calc(100% / 8)}
.vx-keyrow,.vx-arrows{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;align-items:center}
.vx-keyrow .vx-encoder{justify-self:center}
.vx-arrows{margin-top:2px}
.vx-sp{display:block}
.vx-wheels{display:flex;justify-content:space-between;gap:8px;padding:6px 2px}
.vx-lower{display:grid;grid-template-columns:56px auto minmax(0,1fr) auto;gap:12px;align-items:end;margin-top:6px}
.vx-mods{display:grid;gap:8px}
.vx-fader-pair{display:flex;gap:6px}
.vx-transport{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-self:center;max-width:200px;width:100%;justify-self:center}
.vx-transport .vx-go{grid-column:span 2}
.vx-fcol{display:grid;gap:6px;align-content:start}
.vx-fgap{height:12px}
.vx-plate{grid-column:1/-1;justify-self:end;display:flex;align-items:center;gap:8px;font-size:18px;letter-spacing:.18em;font-weight:300;color:var(--muted);user-select:none}
.vx-plate i{width:1px;height:20px;background:var(--accent)}
.vx-plate span:last-child{color:var(--ink);font-weight:500}
/* Keys: MA key look, plus a small LED square like the console */
.vista-panel .vx-board button.ma-key.vx-key{position:relative;height:36px;min-height:36px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px 2px;font-size:11px}
.vx-key .vx-label{font-size:10px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.vx-icon-key .vx-label,.vx-f .vx-label{font-size:11px}
.vx-icon-key:not(.vx-led-key) .vx-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.vx-ico{display:flex;width:16px;height:16px}
.vx-ico svg{width:100%;height:100%}
.vx-led{display:block;width:9px;height:6px;border-radius:2px;background:var(--line);flex:none}
.vx-key.lit .vx-led{background:var(--accent)}
.vx-key.held .vx-led{background:#fff}
.vx-led-red{background:#6b3030}.vx-led-yellow{background:#6b6230}.vx-led-green{background:#2f5c3a}.vx-led-blue{background:#2f4269}
.vx-key.held .vx-led-red{background:#ff6b6b}.vx-key.held .vx-led-yellow{background:#ffd166}.vx-key.held .vx-led-green{background:#6fdc8c}.vx-key.held .vx-led-blue{background:#74a7ff}
.vista-panel .vx-board .vx-mods button.ma-key.vx-key{height:40px}
.vx-go{background:#2f7a3a;color:#fff;border-color:#246030}
.vx-go.held{filter:brightness(1.15)}
/* Encoders and wheels: flat discs with a position tick */
.vx-encoder{display:grid;justify-items:center;gap:4px;touch-action:none;user-select:none;cursor:ns-resize}
.vx-knob{position:relative;border-radius:50%;background:var(--panel);border:1px solid var(--line);transform:rotate(var(--vx-angle,0deg));transition:transform .05s linear}
.vx-small .vx-knob{width:32px;height:32px}
.vx-large .vx-knob{width:clamp(70px,22cqi,112px);height:clamp(70px,22cqi,112px);box-shadow:inset 0 0 0 6px var(--bg),inset 0 0 0 7px var(--line)}
.vx-tick{position:absolute;left:50%;top:3px;width:3px;height:30%;margin-left:-1.5px;border-radius:2px;background:var(--ink)}
.vx-large .vx-tick{top:10px;height:20%}
.vx-encoder.vx-moving .vx-knob{border-color:var(--accent)}
.vx-encoder.vx-moving .vx-tick{background:var(--accent)}
.vx-encoder .vx-label,.vx-fader .vx-label{font-size:10px;color:var(--muted);text-align:center;line-height:1.2}
/* Faders: flat track with scale ticks */
.vx-fader{display:grid;justify-items:center;gap:4px;width:52px;touch-action:none;user-select:none}
.vx-scale{position:relative;padding:0 12px}
.vx-scale::before,.vx-scale::after{content:"";position:absolute;top:9px;bottom:9px;width:7px;background:repeating-linear-gradient(to bottom,var(--line) 0 1px,transparent 1px 12px)}
.vx-scale::before{left:0}.vx-scale::after{right:0}
.vx-track{position:relative;width:8px;height:150px;border-radius:4px;background:var(--panel);border:1px solid var(--line);cursor:ns-resize}
.vx-fill{position:absolute;left:0;right:0;bottom:0;height:calc(var(--vx-level,0)*100%);border-radius:4px;background:var(--accent-soft)}
.vx-cap{position:absolute;left:50%;width:30px;height:16px;margin-left:-15px;bottom:calc(var(--vx-level,0)*(100% - 16px));border-radius:3px;background:var(--panel);border:1px solid var(--muted);box-shadow:inset 0 7px 0 -6px var(--accent)}
.vx-fader:hover .vx-cap{border-color:var(--accent)}
.vx-value{font-variant-numeric:tabular-nums;color:var(--accent);font-size:10px}
/* Mapping and learn states */
.vx-mapped::after{content:"";position:absolute;top:3px;right:3px;width:4px;height:4px;border-radius:50%;background:var(--accent)}
.vx-encoder.vx-mapped,.vx-fader.vx-mapped{position:relative}
.vx-learning .vx-board{outline:2px dashed var(--accent);outline-offset:2px}
.vx-learning [data-vx]{cursor:crosshair}
.vx-learn-target{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.vx-fader:focus-visible,.vx-encoder:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
/* Narrow panels and phones: the F keys move under the board as two rows of six */
@container (max-width:460px){
 .vx-board{grid-template-columns:1fr;padding:10px}
 .vx-fcol{grid-template-columns:repeat(6,minmax(0,1fr))}
 .vx-fgap{display:none}
 .vx-keyrow,.vx-arrows{gap:3px}
 .vx-lower{grid-template-columns:50px auto minmax(0,1fr) auto;gap:8px}
 .vx-board{padding:8px 6px}
 .vista-panel .vx-board button.ma-key.vx-key{padding:3px 0}
 .vx-keyrow .vx-key .vx-label{font-size:9px;letter-spacing:-.02em}
 .vx-mods .vx-label{font-size:9px}
 .vx-fader{width:44px}.vx-scale{padding:0 9px}.vx-scale::before,.vx-scale::after{width:5px}
 .vx-track{height:130px}
 .vista-panel .vx-board button.ma-key.vx-key{height:38px;min-height:38px}
 .vx-plate{font-size:15px}
}

/* Day Sheet */
.ds-tabs{display:flex;gap:4px;margin-bottom:8px}
.ds-tabs [aria-selected=true]{border-color:var(--accent);color:#fff}
.ds-count{min-width:44px;text-align:center;font-variant-numeric:tabular-nums}
.ds-viewer{margin-top:8px;border:1px solid #33383e;border-radius:6px;background:#0f1113;min-height:160px;max-height:70vh;overflow:auto;display:grid;place-items:start center}
.ds-viewer img.ds-fit{max-width:100%;height:auto;display:block}
.ds-viewer img.ds-full{max-width:none;display:block}
.ds-thumbs{display:flex;gap:6px;overflow-x:auto;margin-top:6px}
.ds-thumb{padding:0;width:56px;height:56px;flex:none;border:1px solid #3a3f45;border-radius:4px;overflow:hidden;background:#0f1113}
.ds-thumb[aria-current=true]{border-color:var(--accent)}
.ds-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.ds-connect{display:grid;gap:8px;max-width:420px}
.ds-connect label{display:grid;gap:4px}
.ds-connect .ds-remember{display:flex;align-items:center;gap:6px}
.ds-mt-bar select{max-width:100%;min-width:0;flex:1 1 140px}
.ds-day{display:grid;gap:8px;margin-top:8px;max-height:70vh;overflow:auto}
.ds-day[aria-busy=true]{opacity:.6}
.ds-day-head{display:grid;gap:2px;padding:10px;border-radius:8px;background:#1d2024;border-left:3px solid var(--accent)}
.ds-day-head strong{font-size:15px;color:#fff}
.ds-date,.ds-type{color:var(--muted)}
.ds-card{padding:8px 10px;border:1px solid #33383e;border-radius:8px;background:#15181b}
.ds-card h4{margin:0 0 6px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#e2a46c}
.ds-card p{margin:0 0 6px}
.ds-schedule,.ds-contacts{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ds-schedule li{display:grid;grid-template-columns:minmax(84px,auto) 1fr;gap:10px}
.ds-schedule time{white-space:nowrap}
.ds-schedule time{font-variant-numeric:tabular-nums;color:#cfd3d8}
.ds-schedule small,.ds-contacts small{display:block;color:var(--muted);white-space:pre-wrap}
.ds-notes{white-space:normal;line-height:1.45}
.ds-message{min-height:16px}

/* Detached notes */
.note-tabs .note-tab-detached{border-style:dashed}
.note-tabs .note-tab-detached::after{content:" ↗";color:var(--accent)}
.note-float-layer{position:fixed;inset:0;pointer-events:none;z-index:1400}
.note-float-layer[hidden]{display:none}
.note-float{position:fixed;pointer-events:auto;display:flex;flex-direction:column;min-width:160px;min-height:120px;max-width:1200px;max-height:1200px;resize:both;overflow:hidden;background:#1b1e22;border:1px solid #4a4f55;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.note-float-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 6px 4px 10px;background:#262a2f;border-bottom:1px solid #3a3f45;cursor:grab;touch-action:none;user-select:none}
.note-float-moving .note-float-head{cursor:grabbing}
.note-float-title{font-weight:600;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.note-float-head button{min-height:24px;padding:2px 8px;font-size:11px}
.note-float textarea{flex:1;width:100%;resize:none;border:0;border-radius:0;background:transparent;color:var(--ink);padding:8px 10px;font:inherit;font-size:13px;line-height:1.45}
.note-float textarea:focus{outline:none;box-shadow:none}
.note-float:focus-within{border-color:var(--accent)}
