:root{--bg: #000;--panel: #111214;--panel-border: #24262a;--text: #e8e8e8;--muted: #8a8d93;--accent: #d4ff00;--accent-black: #a8d400;--white-key: #f6f5f2;--white-key-edge: #2a2a2a;--black-key: #141414;--felt: #8b1a1a;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:13px;overflow:hidden;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.app{display:flex;flex-direction:column;height:100%;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:8px 16px;background:var(--panel);border-bottom:1px solid var(--panel-border)}.brand{font-weight:700;letter-spacing:.02em;color:var(--accent)}.group{display:flex;align-items:center;gap:6px}.group-label{color:var(--muted)}.toolbar button,.toolbar select{background:#1d1f23;color:var(--text);border:1px solid #33363c;border-radius:6px;padding:3px 9px;font:inherit;cursor:pointer}.toolbar button:hover:not(:disabled),.toolbar select:hover{border-color:#50545c}.toolbar input[type=range]{width:90px;accent-color:var(--accent)}.toolbar .pedal{border-radius:999px;color:var(--muted);touch-action:manipulation}.toolbar .pedal.on{border-color:var(--accent);color:#000;background:var(--accent)}.toolbar .icon-button{font-size:16px;line-height:1;padding:4px 8px}.spacer{flex:1}.badge{padding:3px 10px;border-radius:999px;background:#1d1f23;color:var(--muted)}.toolbar .badge-error{color:#ff8a8a;border-color:#6a2a2a}.stage{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.note-roll{display:block;flex:none}.keyboard{position:relative;flex:none;overflow:hidden;border-top:3px solid var(--felt);background:#111;touch-action:none;cursor:pointer}.key{position:absolute;top:0;display:flex;align-items:flex-end;justify-content:center}.key.white{height:100%;background:linear-gradient(to bottom,#e9e8e4 0%,var(--white-key) 8%,var(--white-key) 94%,#dcdad5 100%);border-right:1px solid var(--white-key-edge);border-radius:0 0 4px 4px;z-index:1}.key.black{height:64%;background:linear-gradient(to bottom,#000,#262626 84%,#3d3d3d 86%,#1b1b1b);border:1px solid #000;border-top:none;border-radius:0 0 4px 4px;box-shadow:0 3px 4px #0000008c;z-index:2}.key.white.active{background:linear-gradient(to bottom,#b7dc00,var(--accent) 30%);box-shadow:inset 0 0 10px #00000040}.key.black.active{background:linear-gradient(to bottom,#7d9e00,var(--accent-black) 60%);box-shadow:0 0 12px #d4ff0099}.key-label{display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;line-height:1}.key.white .key-label{padding-bottom:calc(var(--kb-h) * .2)}.key.black .key-label{padding-bottom:calc(var(--kb-h) * .64 * .17)}.keycap{display:inline-flex;align-items:center;justify-content:center;min-width:clamp(14px,calc(var(--key-px) * .46),34px);padding:3px 4px;border-radius:3px;font-size:clamp(9px,calc(var(--key-px) * .27),16px);font-weight:500}.key.white .keycap{color:#3b3b3b;background:linear-gradient(to bottom,#d6d6d6,#b9b9b9);border:1px solid #a3a3a3;box-shadow:0 1px 1px #00000040}.key.black .keycap{min-width:clamp(12px,calc(var(--key-px) * .32),24px);color:#eee;background:linear-gradient(to bottom,#4a4a4a,#2e2e2e);border:1px solid #5c5c5c}.key-note{font-size:clamp(7px,calc(var(--key-px) * .22),12px);opacity:.6}.key.white .key-note{color:#3a3833}.key.black .key-note{color:#ddd}.key.active .keycap{background:#0000001f;border-color:#0000004d;color:#000}.middle-c,.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#b3121b}.middle-c{position:absolute;bottom:4%;left:50%;transform:translate(-50%);pointer-events:none}.footer{display:flex;align-items:center;padding:6px 16px;background:var(--panel);border-top:1px solid var(--panel-border)}.helpbar{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;color:var(--muted);font-size:12px}.helpbar .dot{width:7px;height:7px;vertical-align:middle}kbd{display:inline-block;min-width:18px;padding:1px 5px;border:1px solid #3a3d43;border-bottom-width:2px;border-radius:4px;background:#1d1f23;color:var(--text);font:11px ui-monospace,Consolas,monospace;text-align:center}.rotate-overlay{display:none}@media (pointer: coarse){.footer{display:none}}@media (pointer: coarse) and (max-height: 520px){.toolbar{flex-wrap:nowrap;gap:10px;padding:4px 10px;font-size:12px}.toolbar .optional,.toolbar .group:has(select){display:none}.toolbar input[type=range]{width:70px}}@media (pointer: coarse) and (orientation: portrait) and (max-width: 820px){.rotate-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;background:#000;text-align:center;font-size:16px}.rotate-icon{font-size:54px;color:var(--accent);animation:rotate-hint 2.4s ease-in-out infinite}.rotate-overlay button{padding:10px 18px;border:none;border-radius:999px;background:var(--accent);color:#000;font:inherit;font-weight:600}}@keyframes rotate-hint{0%,30%{transform:rotate(0)}60%,to{transform:rotate(90deg)}}
