:root{color-scheme:dark;font:16px/1.5 Arial,Helvetica,sans-serif;color:#ededed;background:#000;--accent:#ff1738;--line:#303035}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#000}button,input,select{font:inherit;color:inherit}button{cursor:pointer;background:none;border:0;padding:0}button:disabled{opacity:.3;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:2px solid #eee;outline-offset:4px}button:hover:not(:disabled){color:#fff}svg{display:block}button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}
#instrument{position:relative;width:min(1120px,100vw);height:100dvh;min-height:660px;margin:auto;display:flex;flex-direction:column}.topbar{height:82px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 30px;flex-shrink:0}#main-tools{display:flex;gap:20px}.brand{font-size:12px;letter-spacing:4px;color:#96969c;position:absolute;left:50%;transform:translateX(-50%);pointer-events:none}.brand span{color:#55555f}.transport{display:flex;gap:22px;align-items:center}.tool{width:38px;height:38px;display:grid;place-items:center;color:#b9b9c1;border-radius:50%;flex-shrink:0}.tool:hover{background:#ffffff0b}.tool[aria-pressed=true]{color:var(--accent);background:#ffffff08}#play{color:#eee}#play.playing{color:var(--accent)}#tempo-button{font-size:16px;line-height:1.1;min-width:40px}#tempo-button small{display:block;font-size:10px;margin-top:6px;letter-spacing:1px;color:#777}
#surface{position:relative;flex:1;min-height:0}#stage{width:100%;height:100%;touch-action:none;user-select:none}#field-hit{cursor:crosshair}.field-edge{fill:none;stroke:#c6c6ce;stroke-width:1.35;pointer-events:none}.field-edge.inner{stroke:#696970;stroke-width:.55}#grid,#ranges,#connections,#pulses{pointer-events:none}.grid-ring{fill:none;stroke:#27272c;stroke-width:.6;stroke-dasharray:2 6}.grid-cross{stroke:#34343b;stroke-width:.6}.connection{stroke-width:1;opacity:.34}.range-ring{fill:none;stroke-width:.8;stroke-dasharray:3 7;opacity:.3}.pulse{fill:none;stroke-width:1.4}.sound-node{cursor:grab;touch-action:none;outline:none}.sound-node:active{cursor:grabbing}.sound-node.locked{cursor:default}.node-halo{fill:none;stroke-width:1;opacity:0}.sound-node.selected .node-halo{opacity:.85;stroke-dasharray:3 4}.sound-node:focus-visible .node-halo{opacity:1;stroke:white}.sound-node.muted{opacity:.25}.node-core{stroke-width:1}.node-caption{fill:#a7a7b0;font-size:12px;text-anchor:middle;pointer-events:none}.generator-mark{fill:none;stroke:#fff;stroke-width:1;pointer-events:none}.lock-mark{fill:white;pointer-events:none}
.edge-tools{position:absolute;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:24px}.edge-tools.left{left:30px}.edge-tools.right{right:30px}.divider{width:16px;height:1px;background:#333;margin:0 auto}.field-caption{position:absolute;left:30px;top:4px;display:flex;flex-direction:column;gap:6px;pointer-events:none}#mode-caption{font-size:11px;letter-spacing:2px;color:var(--accent)}#field-count{font-size:12px;color:#686870}.selection-button{position:absolute;bottom:0;left:30px;font-size:13px;color:#a7a7b0;padding:8px 0}.selection-button:hover{color:#fff}#empty-message{position:absolute;left:25%;right:25%;top:44%;text-align:center;pointer-events:none;color:#777;font-size:15px}.bottom-bar{display:flex;align-items:center;justify-content:space-between;padding:15px 30px 12px;flex-shrink:0}#palette{width:65%;max-width:650px;display:flex;justify-content:space-between}.channel-button{position:relative;width:42px;height:42px;display:grid;place-items:center;touch-action:none}.channel-button:before{content:'';width:13px;height:13px;border-radius:50%;border:1px solid var(--color);background:color-mix(in srgb,var(--color) 15%,#000)}.channel-button.active:before{background:var(--color);box-shadow:0 0 14px color-mix(in srgb,var(--color) 40%,transparent)}.channel-button.active:after{content:'';position:absolute;bottom:0;width:3px;height:3px;background:var(--color);border-radius:50%}.channel-button.muted{opacity:.3}.channel-button.solo{outline:1px solid var(--color);outline-offset:-7px;border-radius:50%}footer{display:flex;justify-content:space-between;gap:12px;padding:0 30px 19px;font-size:12px;color:#64646e}#save-status{white-space:nowrap}
 dialog{border:1px solid #34343a;border-radius:12px;background:#101013;color:#ececf0;width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:22px;box-shadow:0 20px 100px #000b}dialog::backdrop{background:#0009;backdrop-filter:blur(5px)}dialog>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:15px}dialog h1{font-size:19px;font-weight:500;margin:0}dialog h2{font-size:15px;font-weight:500;margin:24px 0 14px;color:#aaa}dialog p{font-size:14px;color:#a6a6af;line-height:1.7;margin:12px 0}dialog .help-list{padding-left:20px;color:#aaa;line-height:1.8;font-size:15px}dialog .help-list li{margin-bottom:13px}dialog strong{color:#ececf0;font-weight:500}dialog a{color:#bbb}.button{padding:10px 14px;border:1px solid #3b3b43;border-radius:7px;font-size:14px;background:#18181d}.button:hover{background:#24242b}.danger{color:#ff8294}.row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:16px 0}.row label{font-size:14px;color:#b8b8c2}.row input:not([type=range]){width:130px}.row input[type=text]{width:65%}.row select{max-width:65%}select,input[type=number],input[type=text]{border:1px solid #38383f;border-radius:6px;background:#19191e;padding:8px 10px;font-size:14px}select{appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23aaa'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}input[type=range]{appearance:none;height:3px;background:#393940;accent-color:var(--accent);cursor:pointer;margin:14px 0;min-width:60px}input[type=range]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;background:#eee}.range{display:block;margin:20px 0}.range>span{display:flex;justify-content:space-between;font-size:14px;color:#b8b8c2}.range output{color:#eee;font-variant-numeric:tabular-nums}.range input{width:100%}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.actions .button{flex:1}.checkbox{display:flex;align-items:center;gap:10px;margin:14px 0;color:#bbb;font-size:14px}.checkbox input{accent-color:var(--accent);width:17px;height:17px}.channel-tabs{display:flex;gap:22px;justify-content:center;border-bottom:1px solid #303035;padding-bottom:18px;margin-bottom:20px}.channel-tabs button{width:23px;height:23px;border-radius:50%;border:1px solid var(--color);background:color-mix(in srgb,var(--color) 18%,transparent)}.channel-tabs button.active{background:var(--color);box-shadow:0 0 0 4px #101013,0 0 0 5px var(--color)}.mixer-row{display:grid;grid-template-columns:12px 80px 1fr 32px 32px;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #222227}.color-dot{width:10px;height:10px;border-radius:50%;background:var(--color)}.mixer-row label{font-size:14px;overflow:hidden;text-overflow:ellipsis}.mixer-row input{width:100%}.toggle{border:1px solid #444;border-radius:5px;height:30px;font-size:13px;color:#aaa}.toggle[aria-pressed=true]{background:var(--color);color:#000}.scene-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.scene{height:58px;border:1px solid #303038;border-radius:7px;color:#666}.scene.stored{color:#eee;background:#1d1d24}.scene.active{border-color:var(--accent);color:#fff}.scene small{display:block;font-size:12px;color:#888}.file-note{font-size:13px!important;word-break:break-word}#toast{position:fixed;bottom:35px;left:50%;transform:translate(-50%,12px);max-width:90vw;width:max-content;background:#222228;border:1px solid #41414b;color:#eee;padding:11px 17px;border-radius:8px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:10}#toast.visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:720px){#instrument{min-height:590px}.topbar{height:68px;padding:0 12px;gap:8px}#main-tools{gap:3px}.brand{display:none}.transport{gap:5px}.tool{width:34px;height:38px}.edge-tools.left{left:8px}.edge-tools.right{right:8px}.edge-tools{gap:15px}.field-caption{left:14px;top:7px}.bottom-bar{padding:10px 10px}#palette{width:76%}.channel-button{width:32px}.selection-button{left:14px;bottom:0}footer{padding:0 14px 16px}#save-status{display:none}#hint{font-size:11px}dialog{padding:18px}.channel-tabs{gap:16px}.mixer-row{grid-template-columns:10px 63px 1fr 30px 30px;gap:8px}#stage{min-height:330px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
