:root{color-scheme:light;--ink:#33334b;--paper:#f6f4ed;--stage:#282c48;--mint:#d7efba;--lilac:#b8abec;--accent:#f4d37d}*{box-sizing:border-box}.instrument,.instrument *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.instrument input:not([type=range]):not([type=checkbox]),.instrument textarea{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}body{margin:0;background:var(--paper);color:var(--ink);font-family:ui-rounded,SF Pro Rounded,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button,input[type=number],input[type=search],input[type=text],select{border:1px solid #dddcd4;background:var(--paper);border-radius:12px;padding:9px 12px;min-height:40px}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #9a85d9;outline-offset:3px}.instrument{height:100svh;height:100dvh;min-height:320px;display:flex;flex-direction:column;padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.toolbar{display:flex;align-items:center;gap:12px;padding:10px 6px;flex-shrink:0}h1{font-size:18px;font-weight:800;letter-spacing:-.8px;margin:0 12px 0 0}.toolbar>button{border-color:transparent;background:transparent}.break-picker{display:flex;align-items:center;gap:10px;min-width:0;max-width:52%;margin-right:auto}.break-picker span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:550}.break-picker svg{width:16px;height:16px;opacity:.65}.break-picker:hover,.toolbar .setup-toggle:hover{background:#eae8e1}.icon-button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;flex-shrink:0}.tempo-control{position:relative;flex-shrink:0}.tempo-scrub{display:flex;gap:5px;align-items:baseline;justify-content:center;width:96px;font-size:17px;font-weight:700;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;border-color:transparent;background:#eae8e1;cursor:ew-resize;touch-action:none;user-select:none;-webkit-user-select:none}.tempo-scrub span{font-size:10px;font-weight:500;opacity:.55}.tempo-scrub[aria-disabled=true]{cursor:default;background:transparent}.tempo-entry{width:96px;font-size:17px;text-align:center;font-weight:700}.tempo-error{position:absolute;z-index:6;right:0;top:45px;background:#ffe4dc;border-radius:6px;padding:5px 8px;color:#813c39}.tempo-error,.toolbar .calibrate{white-space:nowrap;font-size:11px}.toolbar .calibrate{background:#f6e6b7}.workspace{display:flex;flex:1 1;min-height:0;position:relative}.library{display:none;width:254px;flex-shrink:0;background:var(--paper);min-height:0;padding:2px 14px 0 4px;flex-direction:column;gap:10px}.library.open{display:flex}.dialog-heading,.library-heading{display:flex;justify-content:space-between;align-items:center;gap:6px}.library-heading{flex-shrink:0}.library-heading button{background:transparent}.library-search{width:100%;min-width:0;background:#eeece5!important;border-color:transparent!important;font-size:13px}.break-list{flex:1 1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0;scrollbar-width:auto;scrollbar-gutter:stable;scrollbar-color:#c6c3d1 transparent}.break-list .break-choice{display:block;width:100%;border:0;border-radius:10px;padding:12px;margin-bottom:3px;text-align:left;font-size:12px;line-height:1.5;min-height:44px}.break-list .break-choice:hover{background:#eae8e1}.break-list .break-choice[aria-pressed=true]{background:#dfdcf1;font-weight:650}.break-list .break-choice.loading{opacity:.5}.no-results{font-size:12px;padding:8px;opacity:.6}.library-backdrop{display:none}.stage{--pulse:0;position:relative;flex:1 1;min-width:0;overflow:hidden;background:var(--stage);color:#ebe8ff;border-radius:24px;isolation:isolate}.touch-surface{position:absolute;inset:26px 0 94px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;outline-offset:-4px;cursor:crosshair}.touch-surface:focus-visible{outline:2px solid #b8abec;border-radius:12px}.touch-surface[aria-disabled=true]{cursor:default}.surface-grid{inset:0;background:repeating-linear-gradient(to right,transparent 0,transparent calc(100% / var(--speed-columns, 3) - 1px),#c3b9e538 calc(100% / var(--speed-columns, 3) - 1px),#c3b9e538 calc(100% / var(--speed-columns, 3))),repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),#c3b9e52b calc(25% - 1px),#c3b9e52b 25%)}.surface-grid,.touch-orb{position:absolute;pointer-events:none}.touch-orb{width:86px;height:86px;border-radius:42% 48% 44% 48%;background:var(--lilac);color:#2b2940;transform:translate(-50%,-50%) scale(calc(1 + var(--pulse) * .09));display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:18px;font-weight:750;box-shadow:0 5px 0 #15182f50}.touch-orb span+span{font-size:11px;font-weight:500}.touch-orb.held{width:124px;height:124px;background:var(--accent);border-radius:44% 48% 42% 50%;box-shadow:0 9px 0 #15182f60}.reversed .touch-orb.held{background:#f1a8b3}.axis-x{inset:auto 0 7px;grid-template-columns:repeat(var(--speed-columns,3),1fr);text-align:center;font-size:11px;font-weight:550}.axis-x,.axis-y{position:absolute;display:grid;opacity:.6;pointer-events:none}.axis-y{inset:0 14px 0 auto;grid-template-rows:repeat(4,1fr);align-items:center;text-align:right;font-size:10px}.stage-top{position:absolute;top:10px;left:18px;right:18px;font-size:11px;opacity:.75;pointer-events:none}.stage-controls{position:absolute;bottom:18px;left:22px;right:22px;display:flex;align-items:center;gap:12px}.stage-controls .round{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;padding:0;border:0;background:#444560;color:#eeeaff;flex-shrink:0}.stage-controls .round:hover{filter:brightness(1.08)}.stage-controls .round:active{transform:translateY(2px)}.stage-controls .play{background:var(--mint);color:#333d31;box-shadow:0 4px 0 #15182f50}.stage-controls .reverse{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.stage-controls .reverse[aria-pressed=true]{background:#f1a8b3;color:#42303b}.volume-control{position:relative;margin-left:auto;flex-shrink:0}.volume-toggle{touch-action:manipulation}.stage-controls .volume-toggle[aria-expanded=true]{background:var(--lilac);color:#2b2940}.volume-popover{position:absolute;z-index:4;bottom:calc(100% + 12px);left:50%;transform:translateX(-50%);width:72px;height:clamp(96px,calc(100dvh - 260px),200px);display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px 10px;background:var(--paper);color:var(--ink);border-radius:18px;box-shadow:0 5px 20px #15182f40}.volume-popover input{writing-mode:vertical-lr;direction:rtl;width:44px;height:100%;min-height:0;flex:1 1;margin:0;padding:0;accent-color:#8072b7;touch-action:none}.volume-popover output{font-size:11px;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.playhead{position:absolute;top:0;bottom:0;width:2px;background:#b8abec;opacity:.11;pointer-events:none;z-index:-1}.choose-break{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);background:var(--lilac);color:#2b2940;border:0;border-radius:14px;padding:14px 20px;font-weight:650;white-space:nowrap}.error{position:fixed;z-index:5;bottom:10px;left:50%;transform:translateX(-50%);width:min(600px,calc(100% - 24px));background:#ffe9df;border:1px solid #dfb5a8;border-radius:14px;padding:10px 12px;color:#702415;display:flex;align-items:center;gap:12px;font-size:13px}.error span{flex:1 1}.error button{border:0;background:transparent}.setup-dialog{width:min(560px,calc(100% - 28px));max-height:calc(100dvh - 40px);border:0;border-radius:22px;background:var(--paper);color:var(--ink);padding:0;box-shadow:0 20px 70px #14142833}.setup-dialog::backdrop{background:#171d3b80}.setup-content{padding:24px}.dialog-heading button{display:grid;place-items:center;padding:8px;background:#eae8e1;border:0}h2,h3{margin:0;font-weight:650}h2{font-size:19px;letter-spacing:-.4px}h3{font-size:13px;margin-bottom:14px}.settings-section{margin-top:24px}.settings-line{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.settings-line label{display:grid;gap:6px;font-size:12px}.port-settings{display:grid;gap:12px;margin-top:14px}.port-settings label{display:grid;gap:6px;font-size:12px}select{max-width:100%;min-width:0}.loop-fields input{width:100px}.setting-note{font-size:11px;margin:12px 0 0;line-height:1.5;opacity:.75}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.setup-error{font-size:13px;color:#903e2e}@media (max-width:700px),(pointer:coarse) and (max-height:500px){.instrument{padding:env(safe-area-inset-top) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}.toolbar{gap:6px;flex-wrap:wrap;padding:8px 4px}h1{margin-right:auto;font-size:17px}.break-picker{order:5;flex-basis:100%;max-width:100%;width:100%;justify-content:space-between;min-height:34px;padding:4px 6px}.break-picker span{font-size:12px}.tempo-entry,.tempo-scrub{width:88px}.library{position:absolute;z-index:3;inset:0 auto 0 0;width:min(310px,87vw);padding:12px;border-radius:18px;box-shadow:6px 0 30px #15182f20}.library-backdrop{display:block;position:absolute;z-index:2;inset:0;width:100%;border:0;background:#171d3b80}.library-backdrop,.stage{border-radius:20px}.stage-controls{left:16px;right:16px;gap:12px}.touch-orb.held{width:100px;height:100px}.touch-orb{width:72px;height:72px;font-size:16px}.axis-y{right:8px}.setup-dialog{width:calc(100% - 16px);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)}.setup-content{padding:18px}}@media (max-height:460px){.touch-surface{top:20px;bottom:70px}.stage-controls{bottom:12px}.stage-controls .round{width:42px;height:42px}.touch-orb,.touch-orb.held{width:64px;height:64px}}@media (prefers-reduced-motion:reduce){.touch-orb{transform:translate(-50%,-50%)}.playhead{display:none}}.library-option{display:flex;align-items:center;gap:7px;font-size:11px;color:#727080;padding:8px 4px;margin-top:auto;flex-shrink:0}.library-option input{accent-color:#8072b7}.review-tag{display:block;margin-top:3px;font-size:10px;color:#8b685a;font-weight:400}.break-entry{position:relative}.break-list .break-choice{padding-right:40px}.break-meta{display:block;font-size:10px;font-weight:400;color:#777385;margin-top:5px;line-height:1.4}.metadata-items{display:flex;flex-wrap:wrap;gap:2px 10px}.break-actions{position:absolute;right:3px;top:4px;display:flex;flex-direction:column}.favorite-star{display:grid;place-items:center;width:32px;min-height:30px;border:0;padding:0;background:transparent;color:#a8a1b6}.favorite-star svg{width:18px;height:18px}.break-list .break-choice{min-height:64px}.favorite-star[aria-pressed=true],.favorites-filter[aria-pressed=true]{color:#8a6b28}.favorite-star[aria-pressed=true] svg,.favorites-filter[aria-pressed=true] svg{fill:#d5a53e;stroke:none}.library-heading .icon-button{width:32px;height:38px}.library-sort{display:flex;align-items:center;gap:8px;flex-shrink:0;padding-left:4px;color:#777385;font-size:11px}.library-sort select{flex:1 1;min-width:0;min-height:34px;padding:5px 9px;font-size:12px;color:var(--ink)}.break-menu{position:relative}.break-menu summary{display:grid;place-items:center;width:32px;height:26px;cursor:pointer;border-radius:8px;color:#81798c;list-style:none}.break-menu summary::-webkit-details-marker{display:none}.break-menu summary::marker{content:""}.break-menu summary:hover{background:#eae8e1}.break-menu summary:focus-visible{outline:3px solid #9a85d9}.break-menu summary svg{width:16px;height:16px}.break-menu-content{position:absolute;right:30px;top:-8px;z-index:4;padding:4px;background:var(--paper);border:1px solid #dddcd4;border-radius:10px;box-shadow:0 4px 14px #33334b20}.break-menu-content button{white-space:nowrap;font-size:12px;border:0;min-height:32px}@media (hover:hover) and (pointer:fine){.break-menu{opacity:0}.break-entry:focus-within .break-menu,.break-entry:hover .break-menu,.break-menu[open]{opacity:1}}.editor-name{font-size:12px;margin:0 0 14px;color:#777385}.editor-toolbar{justify-content:space-between;gap:10px;margin-bottom:12px}.editor-play,.editor-toolbar{display:flex;align-items:center}.editor-play{justify-content:center;gap:6px;background:var(--mint);border:0;font-size:12px}.editor-play svg{width:18px;height:18px}.editor-zoom{display:flex;gap:3px}.editor-zoom button{min-width:32px;min-height:34px;padding:4px 8px;font-size:12px;border:0;background:#eae8e1}.loop-waveform{position:relative;height:160px;margin:0 12px;background:#e2e0ef;border-radius:8px;isolation:isolate}.loop-waveform canvas{display:block;width:100%;height:100%;border-radius:8px}.loop-shade{top:0;background:#f6f4edcf}.editor-beat,.loop-shade{position:absolute;bottom:0;pointer-events:none}.editor-beat{top:30px;width:1px;background:#6c638523}.editor-beat.bar{background:#6c638548}.editor-playhead{position:absolute;top:0;bottom:0;width:2px;background:#7962c4;pointer-events:none}.loop-handle{position:absolute;z-index:2;top:0;height:100%;width:24px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;transform:translateX(-50%);cursor:ew-resize;touch-action:none;-webkit-user-select:none;user-select:none}.loop-handle:before{content:"";width:2px;bottom:0;left:calc(50% - 1px)}.loop-handle span,.loop-handle:before{position:absolute;top:0;background:#7962c4}.loop-handle span{padding:4px 6px;color:white;border-radius:5px;font-size:10px}.loop-handle.start span{left:50%}.loop-handle.end span{right:50%}.waveform-times{display:flex;justify-content:space-between;margin:7px 12px 0;font-size:10px;color:#777385;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.waveform-pan{width:100%;margin:10px 0 0;accent-color:#8072b7}.loop-editor .loop-fields{margin-top:16px}.loop-editor .loop-fields input{width:95px}@media (pointer:coarse){.stage-controls .round{min-width:44px;min-height:44px}.library-search,.library-sort select,.setup-dialog input[type=number],.setup-dialog select{font-size:16px}.break-picker,.icon-button,.library-heading .icon-button{min-height:44px}.library-heading .icon-button,.setup-toggle{width:44px}.editor-play,.editor-zoom button,.library-sort select{min-height:44px}.break-menu summary,.favorite-star{width:44px;min-height:44px}.break-list .break-choice{min-height:96px;padding-right:50px}.break-menu-content{right:42px}.break-menu-content button{min-height:44px}.loop-handle{width:44px}.loop-waveform{margin-left:22px;margin-right:22px}.editor-toolbar{flex-wrap:wrap}.waveform-pan{min-height:44px}}@media (pointer:coarse) and (min-width:600px) and (max-height:500px){.toolbar{flex-wrap:nowrap}h1{margin-right:8px}.break-picker{order:0;flex:1 1;width:auto;max-width:none;justify-content:flex-start}}