:root{--bg:#eaf7ff;--surface:#fff;--border:#b8dcf1;--text:#17324d;--text-muted:#5a7490;--text-strong:#061d33;--mono:"SFMono-Regular", Consolas, "Liberation Mono", monospace;--sans:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;color:var(--text);background:var(--bg);font-family:var(--sans);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;line-height:1.45}*{box-sizing:border-box}html{background:var(--bg)}body{background:radial-gradient(circle at 18% 0%, #38bdf833, transparent 32%), radial-gradient(circle at 88% 10%, #ff8a2829, transparent 28%), linear-gradient(180deg, #ffffff9e, #e4f7ffc7), var(--bg);min-width:320px;min-height:100svh;margin:0}button,input,select{letter-spacing:0}button:focus-visible,input:focus-visible,select:focus-visible{outline-offset:2px;outline:3px solid #ff7a1a57}#root{min-height:100svh}.app-shell{min-height:100svh;padding:24px}.topbar{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:20px;padding-bottom:20px;display:flex}.brand{align-items:center;gap:14px;min-width:0;display:flex}.brand-mark{color:#f8fbff;background:linear-gradient(135deg,#075985,#0ea5e9);border-radius:8px;flex:none;justify-content:center;align-items:center;width:46px;height:46px;display:inline-flex;box-shadow:0 10px 24px #082f4933}.brand h1,.panel-heading h2,.drawer-heading h2,.editor-block h2{color:var(--text-strong);letter-spacing:0;margin:0}.brand h1{font-size:28px;font-weight:800;line-height:1.1}.brand p,.panel-heading p{color:var(--text-muted);margin:5px 0 0}.session-stats{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.session-stats span,.meter-pill,.audio-state{min-height:34px;color:var(--text-strong);border:1px solid var(--border);white-space:nowrap;background:#fff;border-radius:8px;align-items:center;gap:7px;padding:7px 10px;font-size:13px;font-weight:700;display:inline-flex}.transport-bar{flex-wrap:wrap;align-items:center;gap:10px;padding:18px 0;display:flex}button,select,input{font:inherit}button{color:var(--text-strong)}.icon-button,.toggle-button,.bpm-step-button,.click-subdivision button,.sound-mode-control button,.action-grid button,.library-filters button,.pattern-picker-toggle,.pattern-result,.pattern-list button{border:1px solid var(--border);cursor:pointer;background:#fff;border-radius:8px;justify-content:center;align-items:center;gap:8px;min-height:40px;transition:transform .16s,background .16s,border-color .16s,color .16s;display:inline-flex}.icon-button{width:42px;padding:0}.icon-button.primary{color:#fff;background:#ff7a1a;border-color:#ff7a1a;width:48px}.icon-button:hover,.toggle-button:hover,.bpm-step-button:hover,.click-subdivision button:hover,.sound-mode-control button:hover,.action-grid button:hover,.library-filters button:hover,.pattern-picker-toggle:hover,.pattern-result:hover,.pattern-list button:hover{border-color:#5dc7f3;transform:translateY(-1px)}.icon-button.primary:hover{background:#e65f00;border-color:#e65f00}.stop-button{color:#fff;background:#dc2626;border-color:#dc2626}.stop-button:hover{background:#b91c1c;border-color:#b91c1c}.toggle-button{padding:0 12px;font-weight:800}.toggle-button.is-on{color:#fff;background:#0891b2;border-color:#0891b2}.click-control{align-items:center;gap:8px;min-height:40px;display:inline-flex}.click-subdivision{border:1px solid var(--border);border-radius:8px;display:inline-flex;overflow:hidden}.click-subdivision button{border:0;border-right:1px solid var(--border);border-radius:0;min-height:38px;padding:0 11px;font-size:13px;font-weight:900}.click-subdivision button:last-child{border-right:0}.click-subdivision button.is-selected{color:#fff;background:#ff7a1a}.sound-mode-control{border:1px solid var(--border);background:#fff;border-radius:8px;align-items:center;gap:0;min-height:40px;display:inline-flex;overflow:hidden}.sound-mode-control.prominent{border-color:#ff7a1a;box-shadow:0 8px 20px #ff7a1a24}.sound-mode-control span{color:var(--text-muted);border-right:1px solid var(--border);text-transform:uppercase;background:#e8f6ff;align-self:stretch;align-items:center;padding:0 10px;font-size:12px;font-weight:900;display:inline-flex}.sound-mode-control.prominent span{color:#fff;background:#ff7a1a}.sound-mode-control button{border:0;border-right:1px solid var(--border);border-radius:0;min-height:38px;padding:0 12px;font-size:13px;font-weight:900}.sound-mode-control button:last-child{border-right:0}.sound-mode-control button.is-selected{color:#fff;background:#075985}.bpm-step-button:disabled{color:#91a9bb;cursor:not-allowed;background:#e5f4fb;transform:none}.audio-state{color:#31556f;margin-left:auto}.field{align-items:center;gap:8px;min-height:40px;display:inline-flex}.field span{color:var(--text-muted);text-transform:uppercase;font-size:12px;font-weight:800}.field select,.field input[type=text],.field input[type=search],.field input[type=number]{min-height:40px;color:var(--text-strong);border:1px solid var(--border);background:#fff;border-radius:8px}.field select{width:min(260px,52vw);padding:0 34px 0 12px}.field input[type=text]{width:100%;padding:0 12px}.preset-field{flex:300px;max-width:430px;position:relative}.pattern-picker{width:100%;position:relative}.pattern-input-wrap{width:100%;min-height:40px;color:var(--text-muted);border:1px solid var(--border);background:#fff;border-radius:8px;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center;display:grid}.pattern-input-wrap:focus-within{border-color:#0ea5e9;box-shadow:0 0 0 3px #0ea5e92e}.pattern-input-wrap>svg{justify-self:center}.pattern-input-wrap input[type=search]{width:100%;min-width:0;min-height:38px;color:var(--text-strong);background:0 0;border:0;border-radius:0;padding:0}.pattern-input-wrap input[type=search]:focus{outline:0}.pattern-input-wrap input[type=search]::-webkit-search-cancel-button{cursor:pointer}.pattern-picker-toggle{border:0;border-left:1px solid var(--border);background:0 0;border-radius:0 7px 7px 0;width:34px;min-height:38px;padding:0}.pattern-results{z-index:50;border:1px solid var(--border);background:#fff;border-radius:8px;gap:5px;max-height:320px;padding:7px;display:grid;position:absolute;top:calc(100% + 6px);left:0;right:0;overflow-y:auto;box-shadow:0 18px 34px #082f492e}.pattern-result{text-align:left;justify-content:space-between;width:100%;min-height:44px;padding:8px 10px}.pattern-result span,.pattern-result small{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pattern-result span{font-size:14px;font-weight:900}.pattern-result small{color:var(--text-muted);font-size:12px;font-weight:800}.pattern-result.is-selected{color:#fff;background:#075985;border-color:#075985}.pattern-result.is-selected small{color:#bae6fd}.pattern-empty{color:var(--text-muted);text-align:center;padding:14px 10px;font-size:13px;font-weight:800}.bpm-field{flex:330px;max-width:520px}.bpm-field input[type=range]{accent-color:#ff7a1a;flex:150px;width:100%;min-width:120px}.bpm-step-button{flex:0 0 36px;width:36px;min-height:40px;padding:0}.bpm-number{text-align:center;flex:0 0 76px;width:76px;padding:0 8px}.workbench{grid-template-columns:minmax(0,1fr);align-items:start;gap:18px;display:grid}.score-panel,.side-panel{background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 18px 38px #082f491a}.score-panel{min-width:0;overflow:hidden}.panel-heading{border-bottom:1px solid var(--border);justify-content:space-between;align-items:flex-start;gap:18px;padding:20px;display:flex}.panel-heading h2{margin-top:4px;font-size:26px;line-height:1.15}.eyebrow{color:#f97316;letter-spacing:0;text-transform:uppercase;font-size:12px;font-weight:900}.meter-pill{flex:none}.staff-view{background:linear-gradient(90deg,#0e74901f 1px,#0000 1px) 0 0/6.25% 100%,#f8fdff;border:1px solid #b8dcf1;border-radius:8px;height:216px;margin:20px;position:relative;overflow:hidden}.staff-lines{position:absolute;inset:38px 20px}.staff-lines span{background:#075985;height:1px;position:absolute;left:0;right:0}.staff-lines span:first-child{top:0}.staff-lines span:nth-child(2){top:25%}.staff-lines span:nth-child(3){top:50%}.staff-lines span:nth-child(4){top:75%}.staff-lines span:nth-child(5){top:100%}.staff-note{top:calc(var(--note-y) * 1%);left:calc((var(--note-x) + .5) * 100% / 16);z-index:2;width:23px;height:18px;color:var(--note-color);justify-content:center;align-items:center;font-size:22px;font-weight:900;line-height:1;display:inline-flex;position:absolute;transform:translate(-50%,-50%)}.staff-note:after{content:"";background:currentColor;width:2px;height:38px;position:absolute;bottom:10px;left:17px}.note-kick:after,.note-snare:after,.note-tom:after{top:10px;bottom:auto}.staff-playhead{top:0;bottom:0;left:calc(var(--playhead-x) * 100% / 16);z-index:3;background:#ff7a1a;width:2px;position:absolute;box-shadow:0 0 0 999px #ff7a1a09}.staff-playhead:before{content:"";background:#ff7a1a;border-radius:999px;width:10px;height:10px;position:absolute;top:0;left:50%;transform:translate(-50%)}.timeline-wrap{border:1px solid var(--border);border-radius:8px;margin:0 20px 20px;overflow-x:auto}.timeline-grid{background:#fff;min-width:900px;display:grid}.timeline-row{display:contents}.corner-cell,.step-label,.instrument-label,.step-cell{border-right:1px solid var(--border);border-bottom:1px solid var(--border);min-height:48px}.corner-cell,.instrument-label{z-index:4;color:var(--text-strong);background:#e8f6ff;align-items:center;gap:8px;padding:0 12px;display:flex;position:sticky;left:0}.corner-cell{text-transform:uppercase;font-size:12px;font-weight:900;top:0}.instrument-label strong{flex:none;width:28px;font-size:12px}.instrument-label span:last-child{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;overflow:hidden}.instrument-dot{border-radius:999px;flex:none;width:10px;height:10px}.step-label{color:var(--text-muted);background:#e8f6ff;justify-content:center;align-items:center;font-size:14px;font-weight:900;display:flex}.step-label.quarter{color:#061d33;background:#cfefff}.step-label.eighth{color:#25617e}.step-label.is-current,.step-cell.is-current{background:#fff0dc;position:relative}.step-label.is-current:before,.step-cell.is-current:before{content:"";pointer-events:none;background:#ff7a1a;width:3px;position:absolute;top:0;bottom:0;left:-1px}.step-cell{cursor:pointer;background:#fff;border-top:0;border-left:0;border-radius:0;padding:0;position:relative}.step-cell.quarter{border-left:2px solid #0f5f8b}.step-cell.eighth{background:#f2fbff}.step-cell:hover{background:#dff5ff}.step-cell.is-active{background:#fff2d9}.hit-marker{z-index:1;justify-content:center;align-items:center;width:30px;height:30px;font-size:22px;font-weight:900;line-height:1;display:inline-flex;position:relative}.marker-openhat,.marker-hihat,.marker-ride{font-size:20px}.editor-fab{z-index:20;color:#fff;cursor:pointer;text-align:left;background:linear-gradient(135deg,#075985,#0284c7 62%,#0ea5e9);border:1px solid #bae6fd8f;border-right:0;border-radius:14px 0 0 14px;align-items:center;gap:10px;min-height:62px;padding:10px 12px 10px 14px;font-weight:900;transition:opacity .16s,transform .16s,background .16s;display:inline-flex;position:fixed;top:126px;right:18px;box-shadow:0 16px 34px #082f4947}.editor-fab:before{content:"";background:#ff7a1a;border-radius:0 6px 6px 0;width:4px;position:absolute;top:10px;bottom:10px;left:0}.editor-fab svg{flex:none}.editor-fab-copy{gap:1px;min-width:0;display:grid}.editor-fab-copy strong,.editor-fab-copy small{white-space:nowrap;line-height:1.1;display:block}.editor-fab-copy strong{letter-spacing:0;font-size:14px}.editor-fab-copy small{color:#dff5ff;letter-spacing:0;text-transform:uppercase;font-size:11px;font-weight:800}.editor-fab-badge{color:#fff;background:#ff7a1a;border-radius:999px;justify-content:center;align-items:center;min-width:28px;height:26px;padding:0 8px;font-size:12px;font-weight:900;display:inline-flex}.editor-fab:hover{background:linear-gradient(135deg,#0369a1,#0ea5e9 68%,#38bdf8);transform:translate(-2px)}.editor-fab.is-hidden{opacity:0;pointer-events:none;transform:translate(18px)}.editor-backdrop{z-index:24;opacity:0;pointer-events:none;background:#061d334d;border:0;border-radius:0;width:100%;height:100%;padding:0;transition:opacity .2s;display:block;position:fixed;inset:0}.editor-backdrop.is-visible{opacity:1;pointer-events:auto}.side-panel{z-index:30;background:var(--surface);border:1px solid var(--border);opacity:0;pointer-events:none;border-right:0;border-radius:8px 0 0 8px;width:min(390px,100vw - 24px);transition:opacity .22s,transform .22s;position:fixed;top:0;bottom:0;right:0;overflow-y:auto;transform:translate(104%);box-shadow:-22px 0 44px #082f492e}.side-panel.is-open{opacity:1;pointer-events:auto;transform:translate(0)}.drawer-heading{z-index:2;border-bottom:1px solid var(--border);background:#e8f6ff;justify-content:space-between;align-items:center;gap:12px;padding:18px;display:flex;position:sticky;top:0}.drawer-heading h2{margin-top:3px;font-size:20px;line-height:1.15}.editor-block{border-bottom:1px solid var(--border);padding:18px}.editor-block:last-child{border-bottom:0}.editor-block h2{margin-bottom:14px;font-size:18px;line-height:1.2}.stack-field{flex-direction:column;align-items:stretch;gap:7px;display:flex}.action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;display:grid}.action-grid button{min-width:0;padding:0 10px;font-size:14px;font-weight:800}.reading-grid{color:var(--text-muted);grid-template-columns:100px 1fr;align-items:center;gap:8px 12px;font-size:13px;display:grid}.reading-grid span{font-weight:800}.reading-grid strong{color:var(--text-strong);font-family:var(--mono);letter-spacing:0;font-size:13px}.library-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.library-heading h2{margin-bottom:0}.library-heading span{color:#fff;background:#0891b2;border-radius:999px;justify-content:center;align-items:center;min-width:30px;height:24px;padding:0 8px;font-size:12px;font-weight:900;display:inline-flex}.library-filters{flex-wrap:wrap;gap:7px;margin-bottom:12px;display:flex}.library-filters button{min-height:30px;padding:0 9px;font-size:12px;font-weight:900}.library-filters button.is-selected{color:#fff;background:#ff7a1a;border-color:#ff7a1a}.pattern-list{gap:8px;max-height:440px;padding-right:2px;display:grid;overflow-y:auto}.pattern-list button{text-align:left;justify-content:space-between;width:100%;padding:10px 12px}.pattern-list button span,.pattern-list button small{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pattern-list button span{font-weight:800}.pattern-list button small{color:var(--text-muted);text-transform:uppercase;font-size:12px;font-weight:800}.pattern-list button.is-selected{color:#fff;background:#075985;border-color:#075985}.pattern-list button.is-selected small{color:#bae6fd}@media (width<=1080px){.workbench{grid-template-columns:1fr}.editor-block{border-bottom:1px solid var(--border)}.editor-block:last-child{border-bottom:0}}@media (width<=760px){.app-shell{padding:16px}.topbar{flex-direction:column;align-items:flex-start}.brand h1{font-size:24px}.session-stats{justify-content:flex-start}.audio-state{margin-left:0}.click-control{flex-wrap:wrap;width:100%}.sound-mode-control{width:100%}.sound-mode-control button{flex:1 1 0}.preset-field,.bpm-field{flex:100%;max-width:none}.field select{width:100%}.panel-heading{flex-direction:column}.staff-view{height:190px;margin:14px}.timeline-wrap{margin:0 14px 14px}.editor-fab{border-radius:8px;min-height:54px;padding:9px 11px 9px 14px;top:auto;bottom:18px;right:12px}.editor-fab:before{top:9px;bottom:9px}.editor-fab-copy small{display:none}.side-panel{width:min(420px,100vw - 14px)}.drawer-heading{padding:16px}}
