:root{font-family:Inter,ui-rounded,Segoe UI,sans-serif;color:#272247;background:#fff9ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{min-height:44px;border:2px solid #ded9f5;background:#fff;border-radius:12px;padding:.55rem .8rem;color:#30275c;font-weight:700;cursor:pointer}button:hover,button:focus-visible{border-color:#5b36d6;outline:3px solid #ffcf48;outline-offset:2px}.primary,.selected{background:#5b36d6;color:#fff;border-color:#5b36d6}main{min-height:100vh}header{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:1rem clamp(1rem,4vw,3rem);background:#5b36d6;color:#fff}.brand{display:flex;align-items:center;gap:.8rem}.logo{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:#ffd44d;color:#5b36d6;font-size:2rem}h1{font-size:clamp(1.35rem,4vw,2rem);margin:0}header p{margin:.15rem 0 0;opacity:.9}.mode{display:flex}.mode button{border-radius:0}.mode button:first-child{border-radius:12px 0 0 12px}.mode button:last-child{border-radius:0 12px 12px 0}.title-row,.toolbar,.tracks,footer{margin:1rem clamp(1rem,4vw,3rem)}.title-row{display:flex;justify-content:space-between;gap:1rem;align-items:center}.title-row input{font-size:1.25rem;font-weight:800;border:0;border-bottom:3px solid #bcb1ef;background:transparent;padding:.5rem}.toolbar{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}.toolbar label{display:flex;align-items:center;gap:.45rem;background:#fff;border:2px solid #ded9f5;border-radius:12px;padding:.4rem .7rem}.grid-wrap{overflow:auto;margin:0 clamp(.5rem,2vw,2rem);border:3px solid #33265e;border-radius:18px;background:#33265e;max-height:65vh}.note-grid{display:grid;gap:2px;min-width:max-content}.pitch{position:sticky;left:0;z-index:2;display:grid;place-items:center;background:#33265e;color:#fff;font-weight:800}.cell{width:2.25rem;height:2.25rem;min-height:0;padding:0;border:0;border-radius:7px;background:#f4f0ff}.cell.beat{box-shadow:inset 3px 0 #cabff5}.cell.on{background:var(--note);box-shadow:inset 0 -5px #0000002e}.cell.cursor{outline:3px solid #ffb000;outline-offset:-3px}.tracks{background:#fff;border:2px solid #ded9f5;border-radius:16px;padding:1rem}.tracks h2{margin-top:0}.tracks>div{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center;padding:.45rem;border-radius:10px}.tracks>div.active{background:#f0ecff}footer{display:flex;justify-content:space-between;gap:1rem;color:#625b78;padding-bottom:1rem}aside{margin:1rem 3rem;padding:1rem;background:#fff0b8;border-radius:12px}@media(max-width:650px){header{align-items:flex-start;flex-direction:column}.brand p{display:none}.title-row{align-items:flex-start;flex-direction:column}.toolbar{margin:.7rem}.toolbar button{flex:1 1 auto}.grid-wrap{max-height:55vh}footer{flex-direction:column}.cell{width:2.6rem;height:2.6rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}.edit-tools,.note-inspector{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin:1rem clamp(1rem,4vw,3rem)}.edit-tools>span{font-weight:800}.note-inspector{padding:.8rem 1rem;border:2px solid #5b36d6;border-radius:16px;background:#f1edff}.note-inspector label{display:flex;align-items:center;gap:.4rem;font-weight:700}.note-inspector input[type=number]{width:6.5rem;padding:.45rem;border:2px solid #c9c0ee;border-radius:8px}.note-inspector output{min-width:2rem}.cell.on{background:var(--note,#ff7b54)}.cell.on[aria-label^=Note]{position:relative}.cell.on:focus-visible,.cell.on[aria-pressed=true]:focus-visible{outline:4px solid #1b998b;outline-offset:-2px}.note-grid{touch-action:pan-x pan-y}.edit-tools .selected{box-shadow:0 0 0 3px #ffcf48}@media(max-width:650px){.edit-tools,.note-inspector{margin:.7rem}.note-inspector label{flex:1 1 9rem}}.advanced-panel{margin:1rem clamp(1rem,4vw,3rem);padding:1rem;background:#fff;border:2px solid #d9d0fa;border-radius:18px}.advanced-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.advanced-panel fieldset{border:2px solid #e0daf5;border-radius:14px;display:flex;flex-direction:column;gap:.7rem;min-width:0}.advanced-panel legend{font-weight:900;color:#5b36d6}.advanced-panel label{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-weight:700}.advanced-panel input[type=number],.advanced-panel input[type=text],.track-row>input,.advanced-panel select{min-height:40px;max-width:9rem;border:2px solid #cbc2ed;border-radius:8px;padding:.35rem}.advanced-panel small{line-height:1.4;color:#655d7d}.map-row{display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem;border-radius:10px;background:#f7f4ff}.map-row label{flex:1 1 7rem}.track-list{display:flex;flex-direction:column;gap:.6rem;margin-bottom:.7rem}.track-row{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;padding:.65rem;border:2px solid #e0daf5;border-radius:12px}.track-row.active{background:#f0ecff;border-color:#5b36d6}.track-row label{justify-content:flex-start}.track-row>input{flex:1 1 10rem;max-width:none}@media(max-width:950px){.advanced-grid{grid-template-columns:1fr}}@media(max-width:650px){.advanced-panel{margin:.7rem}.track-row>*{flex:1 1 8rem}}.library-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:1rem;background:#1b1437b8}.library{width:min(920px,100%);max-height:90vh;overflow:auto;background:#fffaf0;border-radius:22px;box-shadow:0 24px 80px #00000059}.library>header{position:sticky;top:0;z-index:2;background:#5b36d6;padding:1rem 1.25rem}.library h2{margin:0;font-size:1.6rem}.library header p{margin:.25rem 0 0}.library-actions{display:flex;flex-wrap:wrap;gap:.7rem;padding:1rem;border-bottom:2px solid #ded9f5}.library-actions label{display:flex;align-items:center;gap:.4rem;font-weight:700}.library-actions input,.library-actions select{min-height:44px;border:2px solid #c9c0ee;border-radius:10px;padding:.45rem}.project-list{display:flex;flex-direction:column;gap:.65rem;padding:1rem}.project-list article{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem;background:#fff;border:2px solid #e0daf5;border-radius:14px}.project-list article.current{border-color:#5b36d6;background:#f1edff}.project-list h3{margin:0}.project-list h3 span{display:inline-block;margin-left:.5rem;padding:.2rem .45rem;border-radius:99px;background:#5b36d6;color:#fff;font-size:.8rem}.project-list p{margin:.3rem 0 0;color:#655d7d}.project-actions{display:flex;flex-wrap:wrap;gap:.4rem}.empty{text-align:center;padding:3rem;color:#655d7d}@media(max-width:700px){.library{max-height:96vh}.project-list article{align-items:flex-start;flex-direction:column}.project-actions{width:100%}.project-actions button{flex:1 1 auto}.library-actions label{flex:1 1 100%}.library-actions input,.library-actions select{flex:1}}:root,body{color:#20242b;background:#f8fbfc}header{background:#fff;color:#171c1f;border-bottom:1px solid #dcebed}.logo{border-radius:50%;background:#23abe3;color:#fff}button{border-color:#d7e5e9;color:#26343a}button:hover,button:focus-visible{border-color:#23abe3}.primary,.selected{background:#087aa5;border-color:#087aa5;color:#fff}.play-button{min-width:6.4rem;border-radius:999px;font-size:1.08rem}.toolbar label{border-color:#d7e5e9}.sound-picker select{border:0;background:#fff;color:#26343a;font-weight:800}.grid-wrap{border:2px solid #cce7eb;border-radius:4px;background:#cce7eb}.note-grid{gap:1px}.pitch{background:#f4fafb;color:#60757b;border-right:2px solid #77ced8}.cell{border-radius:0;background:#fff}.cell.beat{box-shadow:inset 2px 0 #70cbd7}.cell.on{box-shadow:inset 0 -3px #0000001a}.cell.cursor{outline-color:#23abe3}.tracks>div.active{background:#e7f8fc}.header-actions{display:flex;align-items:center;gap:.65rem}.update-button{white-space:nowrap;border-color:#9dd6e2;background:#eefbfe;color:#075e7d}.simple-layout{display:flex;min-height:100vh;flex-direction:column}.simple-layout header{padding:.65rem clamp(.75rem,3vw,2rem)}.simple-layout .logo{width:44px;height:44px;font-size:1.5rem}.simple-layout .title-row{margin:.55rem clamp(.75rem,3vw,2rem)}.simple-layout .title-row input{font-size:1.05rem}.simple-layout .edit-tools,.simple-layout .note-inspector,.simple-layout .advanced-control{display:none}.simple-layout .hidden-note-notice{order:1;margin:.3rem 1rem;color:#6b5960;font-weight:700}.simple-layout .grid-wrap{order:2;max-height:none;flex:1;margin:0;border-left:0;border-right:0}.simple-layout .toolbar{order:3;position:sticky;z-index:10;bottom:0;margin:0;padding:.7rem clamp(.65rem,2vw,1.25rem);background:#fff;box-shadow:0 -4px 18px #1b495821;justify-content:center}.simple-layout .toolbar>button,.simple-layout .toolbar>label,.simple-layout .more-controls{flex:0 1 auto}.simple-layout .play-button{min-width:5.8rem}.simple-layout footer{order:4;margin:.4rem 1rem;padding:0;font-size:.82rem}.drum-label{color:#88969a;font-size:.9rem}.drum-cell{background:#fafafa}.more-controls{position:relative}.more-controls summary{display:grid;place-items:center;min-height:44px;padding:.55rem .8rem;border:2px solid #d7e5e9;border-radius:12px;background:#fff;color:#26343a;font-weight:800;cursor:pointer;list-style:none}.more-controls summary::-webkit-details-marker{display:none}.more-controls[open]>div{position:absolute;right:0;bottom:calc(100% + .6rem);display:grid;width:min(19rem,85vw);gap:.45rem;padding:.65rem;border:2px solid #cce7eb;border-radius:14px;background:#fff;box-shadow:0 12px 35px #183c4838}@media(max-width:650px){.simple-layout header{flex-direction:row;align-items:center}.simple-layout .brand h1{font-size:1.12rem}.header-actions{gap:.35rem}.update-button{min-height:38px;padding:.4rem .5rem}.simple-layout .mode button{padding:.42rem .55rem;min-height:38px}.simple-layout .title-row span{font-size:.78rem}.simple-layout .grid-wrap{max-height:calc(100vh - 18rem)}.simple-layout .toolbar{flex-wrap:wrap;justify-content:center;overflow:visible}.simple-layout .toolbar>label:not(.sound-picker){display:none}.simple-layout .toolbar button,.simple-layout .more-controls summary{min-width:auto;padding:.5rem .58rem}.simple-layout .sound-picker{padding:.35rem .5rem}.simple-layout footer{display:none}}
