*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}:root{--bg: #0d1117;--bg-2: #161b22;--bg-3: #21262d;--border: #30363d;--text: #e6edf3;--text-2: #8b949e;--accent: #58a6ff;--green: #3fb950;--red: #f85149;color-scheme:dark}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}button{font:inherit;color:inherit}.app{max-width:1400px;margin:0 auto;padding:16px 20px;display:flex;flex-direction:column;gap:16px;min-height:100vh}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:10px 14px;background:var(--bg-2);border:1px solid var(--border);border-radius:8px}.toolbar h1{font-size:1.15rem;color:var(--accent);margin-right:8px}.btn{padding:6px 12px;border:1px solid var(--border);border-radius:6px;font-size:.8rem;font-weight:500;cursor:pointer;background:var(--bg-3);transition:background .15s,border-color .15s}.btn:hover:not(:disabled){background:var(--border)}.btn:disabled{opacity:.4;cursor:not-allowed}.btn:focus-visible,.cell:focus-visible,.sub-picker button:focus-visible,.grid-label:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.btn-play{min-width:84px;background:var(--green);border-color:var(--green);color:#000}.btn-play:hover:not(:disabled){background:#2ea043}.btn-play.is-playing{background:var(--red);border-color:var(--red);color:#fff}.btn-play.is-playing:hover{background:#da3633}.btn-group{display:flex;gap:4px}.presets{margin-left:auto;flex-wrap:wrap}.btn-preset{font-size:.75rem;padding:5px 9px}.btn-preset:hover{border-color:var(--accent);color:var(--accent)}.control{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--text-2)}.control input{width:90px;accent-color:var(--accent);cursor:pointer}.control output{min-width:28px;font-weight:600;color:var(--accent);font-size:.8rem}.notation{background:#fff;border:1px solid var(--border);border-radius:8px;padding:8px 0;overflow-x:auto}.notation-scroll{position:relative}.notation svg{display:block}.notation-cursor{position:absolute;top:22px;left:0;width:0;height:110px;border-left:2px solid var(--green);pointer-events:none}.notation-error{color:#b62324;padding:0 16px;font-size:.85rem}.panel{background:var(--bg-2);border:1px solid var(--border);border-radius:8px;padding:14px;overflow-x:auto}.grid{display:grid;gap:4px 10px;min-width:720px;align-items:center}.grid-beat-header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-bottom:4px}.grid-beat-number{font-size:.8rem;font-weight:700;color:var(--text-2)}.sub-picker{display:flex;border:1px solid var(--border);border-radius:6px;overflow:hidden}.sub-picker button{width:26px;height:24px;background:var(--bg-3);border:none;border-left:1px solid var(--border);cursor:pointer;font-size:.85rem;color:var(--text-2)}.sub-picker button:first-child{border-left:none}.sub-picker button:hover{color:var(--text)}.sub-picker button.active{background:var(--accent);color:#000;font-weight:700}.grid-label{display:flex;align-items:center;gap:8px;padding:4px 8px;border:none;background:none;font-size:.8rem;font-weight:500;text-align:left;cursor:pointer;border-radius:4px;white-space:nowrap}.grid-label:hover{background:var(--bg-3)}.grid-label kbd{margin-left:auto}.dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.grid-beat{display:flex;gap:3px;padding:2px;border-radius:6px;transition:background .1s}.grid-beat.playing{background:#3fb9501a}.cell{flex:1;height:30px;min-width:0;border:1px solid var(--border);border-radius:4px;background:var(--bg-3);cursor:pointer;touch-action:none}.cell:hover:not(.on){border-color:var(--text-2)}.cell:first-child:not(.on){background:#2a313a}.cell.current{box-shadow:0 0 0 2px var(--green)}.cell.on.current{filter:brightness(1.3)}.footer{text-align:center;color:var(--text-2);font-size:.75rem;line-height:1.8}kbd{padding:1px 5px;background:var(--bg-3);border:1px solid var(--border);border-radius:3px;font-family:inherit;font-size:.7rem;color:var(--text-2)}@media (max-width: 900px){.presets{margin-left:0}}.kit-status{font-size:.75rem;color:var(--text-2)}.kit-status.error{color:var(--red)}.part-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}.tabs,.segmented{display:flex;border:1px solid var(--border);border-radius:6px;overflow:hidden}.tabs button,.segmented button{display:flex;align-items:center;gap:6px;padding:6px 14px;background:var(--bg-3);border:none;border-left:1px solid var(--border);cursor:pointer;font-size:.8rem;font-weight:600;color:var(--text-2)}.segmented button{padding:5px 10px;font-size:.75rem}.tabs button:first-child,.segmented button:first-child{border-left:none}.tabs button:hover,.segmented button:hover{color:var(--text)}.tabs button.active,.segmented button.active{background:var(--accent);color:#000}.tabs button:focus-visible,.segmented button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tab-count{font-size:.7rem;font-weight:700;padding:0 5px;border-radius:8px;background:var(--green);color:#000}.btn-generate:hover{border-color:var(--accent)}.grid-locked-note{font-size:.7rem;color:var(--text-2);font-style:italic}.grid-beat.locked{opacity:.35}.grid-beat.locked .cell{cursor:default}.cell.open:after{content:"o";font-size:.8rem;font-weight:700;color:#000}.grid-label .kbd-extra{margin-left:-4px}.fill-name{font-size:.8rem;color:var(--text-2);font-style:italic}.back-link{display:grid;place-items:center;width:32px;height:32px;margin-right:-4px;border:1px solid var(--border);border-radius:6px;background:var(--bg-3);color:var(--text-2);transition:color .15s,border-color .15s}.back-link:hover{color:var(--text);border-color:var(--text-2)}.back-link:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.back-link svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
