:root{color-scheme:dark;font:15px/1.36 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#0d111b;color:#eaf0fa}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;width:100%;margin:0;overflow:hidden;-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
button,select,input{font:inherit;color:inherit}
button,select{background:#223044;border:1px solid #41516b;border-radius:11px;min-height:42px;padding:8px 12px}
button{cursor:pointer;touch-action:manipulation}button:disabled,select:disabled{opacity:.42;cursor:default}
button:active:not(:disabled){filter:brightness(1.15)}
button.primary,.selected{background:#48305d;border-color:#c7a4f2;color:#f1dfff}
.shell{max-width:840px;margin:auto;display:flex;flex-direction:column;gap:11px;height:100vh;height:100dvh;min-height:0;padding:max(10px,env(safe-area-inset-top)) 12px max(10px,env(safe-area-inset-bottom));overflow:hidden}
.top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}
.brand{min-width:0}.eyebrow{font-size:10px;letter-spacing:2px;color:#bda5d5;font-weight:700}h1{font-size:22px;line-height:1.1;letter-spacing:-.5px;margin:3px 0}
.top-tools{display:flex;gap:5px;align-items:center;flex:none}.top-tools button{min-height:39px;padding:6px 8px;font-size:12px}.top-tools #start{font-size:19px;min-width:40px}.top-tools #panic{font-weight:900;min-width:34px}.top-tools #midi{min-width:42px}.status{border:1px solid #4b5872;border-radius:22px;padding:7px 8px;font-size:11px;white-space:nowrap}.status.ready{border-color:#3a986f;color:#a1e6c6}
.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;flex:none}.tabs button{min-height:42px;font-weight:600;font-size:13px}.tabs button.active{background:#352445;border-color:#b991e5;color:#eedcff}
.view{min-height:0;flex:1;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}.bar>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.bar strong{font-size:17px}.bar small{font-size:11px;color:#a2b2c9;line-height:1.25}
.add-track{display:flex;gap:5px;flex:none}.add-track select{max-width:125px;font-size:13px;min-height:40px}.add-track button{font-size:13px;min-height:40px;white-space:nowrap}
.track-list,.effect-list{min-height:0;overflow-y:auto;overflow-x:hidden;flex:1;display:flex;flex-direction:column;gap:9px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:2px 2px 18px;scrollbar-width:thin;scrollbar-color:#55667f transparent}
.track,.effect{background:#172332;border:1px solid #394a61;border-radius:16px;padding:12px;display:flex;flex:none;flex-direction:column;gap:9px;min-width:0}
.track-head{display:flex;gap:7px;align-items:center;justify-content:space-between;min-width:0}.track-title{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.track-title strong{font-size:16px}.track-title small{font-size:11px;color:#a6bbcd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.track-head button{min-width:66px;min-height:37px;padding:5px 9px;font-size:12px}.track-head .remove{color:#f1c5cd}
.track-chain{display:flex;gap:5px;align-items:center;flex-wrap:wrap;color:#bcaed5;font-size:12px}.track-chain span{border:1px solid #394a63;padding:4px 7px;border-radius:7px;background:#202c3c}.track-chain b{font-weight:500;color:#9fafc6}
.track-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}.field{display:flex;flex-direction:column;gap:3px;font-size:11px;color:#a6b6cb;min-width:0}.field select{width:100%;font-size:14px;min-height:43px;padding:8px 9px}
.processor{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding-top:8px;border-top:1px solid #354358}.processor strong{font-size:13px;flex:1}.processor button{min-height:36px;font-size:12px;padding:6px 11px}.processor .proc-value{font-size:12px;color:#e0bcff}
.track-editor{display:flex;flex-direction:column;gap:10px}.track-editor[hidden]{display:none}.editor-label{font-size:12px;color:#b9c9dc;font-weight:650}.editor-section{border-top:1px solid #354359;padding-top:9px;display:flex;flex-direction:column;gap:7px;min-width:0}.editor-section .editor-label{display:flex;align-items:center;justify-content:space-between}.editor-section .editor-label button{font-size:12px;min-height:32px;padding:4px 10px}
.gui-mount{min-width:0;overflow:hidden}.gui-mount>wam-parameter-gui{display:block;width:100%;max-width:100%}
.gui-mount .keyboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,64px);gap:5px;touch-action:none;-webkit-user-select:none;user-select:none}
.gui-mount .keyboard .note{display:flex;align-items:center;justify-content:center;padding:0;min-width:0;min-height:0;background:#e8ecf4;color:#182436;font-weight:750;font-size:16px;touch-action:none}
.gui-mount .keyboard .note.semitone{background:#36485e;color:#eaf2fa}.gui-mount .keyboard .note.pressed{background:#d2b5ff;color:#151022}
.gui-mount .wam-midi-keyboard{min-height:134px}
.seq-editor button,.seq-editor input[type=range]{touch-action:manipulation}
.effect-head{display:flex;justify-content:space-between;align-items:center;gap:7px}.effect-head strong{flex:1;font-size:15px}.effect-actions{display:flex;gap:5px}.effect-actions button{padding:6px 9px;min-height:36px;font-size:12px}.effect>.gui-mount{border-top:1px solid #33465c;padding-top:7px}.effect .info{margin:0}
.session-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}.session-tools button{min-height:49px}.info{font-size:13px;line-height:1.5;color:#a7b7cb;background:#172332;border:1px solid #394a61;border-radius:12px;padding:12px;margin:0}
#view-session details{background:#172332;border:1px solid #394a61;padding:12px;border-radius:12px;min-height:0;overflow:auto}#view-session pre{white-space:pre-wrap;word-break:break-word;font-size:10px;color:#bad0e8;overflow:auto;max-height:40vh}
.empty{color:#abbdd1;padding:26px 18px;text-align:center;border:1px dashed #53627b;border-radius:13px;line-height:1.5}
.log-export-overlay{position:fixed;inset:0;z-index:10;background:#060a12d9;display:grid;place-items:center;padding:20px}.log-export-box{background:#1b2635;padding:15px;border:1px solid #556885;border-radius:15px;width:100%;max-width:640px}.log-export-box textarea{display:block;margin-top:10px;width:100%;height:55vh;background:#101926;color:#ecf3fb;border:1px solid #465a72;user-select:text;-webkit-user-select:text}
@media(max-width:390px){h1{font-size:19px}.top-tools{gap:3px}.top-tools button{padding:5px 6px}.top-tools #copy-logs{font-size:11px}.eyebrow{font-size:9px}.bar strong{font-size:15px}.track{padding:10px}.add-track select{max-width:102px}.add-track button{padding:7px 8px}}

/* Two one-tap source choices instead of a nested file-picker-like selector. */
.add-track button{min-height:40px;font-size:12px;padding:6px 9px}
@media(max-width:390px){.add-track button{padding:5px 7px;font-size:11px}.bar small{font-size:10px}}

.install-panel{flex:none;background:#142035;border:1px solid #48536f;border-radius:12px;padding:8px 10px;max-height:44vh;overflow:auto}
.install-panel summary{cursor:pointer;color:#e2d1f6;font-weight:650;padding:5px 0;touch-action:manipulation}
.install-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:7px;margin-top:10px}
.install-fields label{display:flex;min-width:0;flex-direction:column;gap:4px;color:#adbdd2;font-size:11px}
.install-fields input,.install-fields select{min-width:0;width:100%;background:#223044;border:1px solid #41516b;border-radius:9px;min-height:42px;padding:8px;color:#fff;font-size:13px}
.install-fields button{grid-column:1/-1;background:#42315c}
.wam-install-note{font-size:11px;color:#adbdd2;line-height:1.45;margin:8px 0}
#installed-wams{font-size:12px;color:#b4e3ce;overflow-wrap:anywhere;margin-top:5px}

.processor select{min-width:90px;max-width:180px;flex:1 1 110px;font-size:12px;min-height:36px;padding:5px 8px}

/* Instance-scoped choice of default keyboard, plugin GUI, or neither. */
.presentation-field{padding-top:8px;border-top:1px solid #354359}
.presentation-field select{max-width:none;min-height:38px}
.editor-section[hidden]{display:none}
