*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;touch-action:manipulation}:root{--bg: #0d0d11;--panel: #151519;--border: #2a2a30;--text: #c8c8cc;--text-muted: #6a6a70;--accent: #3a3a42;--accent-hover: #4a4a55;--accent-active: #50505c;--accent-text: #d0d0d8;--button-bg: #2a2a30;--button-hover: #3a3a42;--track-bg: #1a1a20;--track-hover: #22222a;--note-color: #888;--note-selected: #999;--danger: #a04040;--danger-hover: #c05050;--green: #5a8a5a;--green-hover: #6a9a6a}:root[data-theme=light]{--bg: #e8e8ec;--panel: #f5f5f8;--border: #d0d0d6;--text: #2a2a30;--text-muted: #7a7a82;--accent: #d8d8de;--accent-hover: #c8c8ce;--accent-active: #b8b8be;--accent-text: #2a2a30;--button-bg: #d8d8de;--button-hover: #c8c8ce;--track-bg: #e0e0e6;--track-hover: #d8d8de;--note-color: #666;--note-selected: #444;--danger: #c05050;--danger-hover: #d06060;--green: #4a7a4a;--green-hover: #5a8a5a}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,sans-serif;height:100vh;overflow:hidden;-webkit-user-select:none;user-select:none}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--accent-hover);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}button{background:var(--button-bg);border:none;color:var(--text);padding:4px 10px;border-radius:5px;cursor:pointer;font-size:.78rem;display:inline-flex;align-items:center;gap:5px;transition:background .12s,transform .06s,box-shadow .12s;white-space:nowrap}button:hover{background:var(--accent-hover)}button:active{background:var(--accent-active);transform:scale(.96)}button:disabled{opacity:.4;cursor:default;transform:none}button.primary{background:var(--accent-hover)}button.primary:hover{background:var(--accent-active)}button.transport-play{background:#2a6fc4;color:#fff;box-shadow:0 1px 3px #2a6fc466}button.transport-play:hover{background:#3a7fd4;box-shadow:0 2px 6px #2a6fc480}button.transport-play:active{background:#1a5fb4;transform:scale(.94)}button.transport-stop{background:#c44040;color:#fff;box-shadow:0 1px 3px #c4404066}button.transport-stop:hover{background:#d45050;box-shadow:0 2px 6px #c4404080}button.transport-stop:active{background:#b43030;transform:scale(.94)}button.transport-stop:disabled{background:var(--button-bg);color:var(--text-muted);opacity:.4;box-shadow:none;transform:none}button.active{background:var(--accent-active);outline:1px solid var(--text-muted)}button.danger{background:var(--danger)}button.danger:hover{background:var(--danger-hover)}input,select,textarea{background:var(--button-bg);color:var(--text);border:1px solid var(--border);border-radius:5px;padding:4px 8px;font-size:.75rem;outline:none}input:focus,select:focus{border-color:var(--text-muted);box-shadow:0 0 0 2px #6a6a7026}input[type=range]{padding:0;border:none;height:5px;background:var(--border);border-radius:3px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:var(--accent-hover);width:14px;height:14px;border-radius:50%;cursor:pointer;transition:background .12s,transform .06s}input[type=range]::-webkit-slider-thumb:hover{background:var(--text);transform:scale(1.15)}input[type=range]::-moz-range-thumb{background:var(--accent-hover);width:14px;height:14px;border-radius:50%;cursor:pointer;border:none;transition:background .12s,transform .06s}input[type=range]::-moz-range-thumb:hover{background:var(--text);transform:scale(1.15)}input[type=checkbox],input[type=radio]{accent-color:var(--text-muted)}.modal{position:fixed;top:0;left:0;width:100%;height:100%;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000;visibility:hidden;opacity:0;transition:.15s}.modal.active{visibility:visible;opacity:1}.modal-content{background:var(--panel);border-radius:10px;padding:20px;max-width:92vw;max-height:85vh;overflow-y:auto;min-width:300px;border:1px solid var(--border)}.modal-content h3{margin-bottom:16px;font-size:1rem;color:var(--text);border-bottom:1px solid var(--border);padding-bottom:8px}.progress-bar{flex:1;height:6px;background:var(--border);border-radius:3px;cursor:pointer;position:relative;transition:height .12s}.progress-bar:hover{height:8px}.progress-fill{height:100%;background:var(--accent-hover);border-radius:3px;transition:width .05s linear}.menu-bar{background:var(--panel);border-bottom:1px solid var(--border);display:flex;flex-wrap:nowrap;padding:0 6px;flex-shrink:0;align-items:center;gap:2px;height:36px;position:relative;z-index:100}.menu-item{position:relative;cursor:pointer;padding:6px 10px;font-size:.78rem;border-radius:4px;white-space:nowrap;transition:background .1s}.menu-item:hover{background:var(--accent-hover)}.menu-item.active{background:var(--accent-active)}.menu-dropdown{position:absolute;top:100%;left:0;background:var(--panel);border:1px solid var(--border);border-radius:6px;min-width:160px;z-index:1000;display:none;flex-direction:column;box-shadow:0 6px 24px #00000080;padding:4px}.menu-dropdown a{padding:7px 12px;cursor:pointer;font-size:.75rem;white-space:nowrap;text-decoration:none;color:var(--text);display:flex;align-items:center;gap:8px;border-radius:4px;transition:background .1s}.menu-dropdown a:hover{background:var(--accent-hover)}.menu-item.active .menu-dropdown{display:flex}.mode-badge{background:var(--accent-active);padding:3px 8px;border-radius:12px;font-size:.65rem}.settings-row{display:flex;align-items:center;gap:10px;padding:6px 0}.settings-group{margin-bottom:14px}.settings-group>div:first-child{font-weight:600;margin-bottom:6px;font-size:.85rem}.edit-toolbar{display:flex;gap:2px;margin-left:8px;padding:0 4px}.edit-toolbar button{padding:3px 7px;font-size:.7rem}@media (max-width: 768px){.menu-bar{flex-wrap:wrap;height:auto;padding:4px}.menu-item{padding:4px 8px;font-size:.7rem}button{padding:3px 7px;font-size:.7rem}.edit-toolbar{margin-left:4px}input,select{font-size:.7rem;padding:3px 6px}}body.touch-mode button,.touch-mode button{min-height:44px;min-width:44px}body.touch-mode input[type=range],.touch-mode input[type=range]{min-height:24px}body.touch-mode .menu-item,.touch-mode .menu-item{padding:8px 12px;min-height:40px}body.touch-mode select,.touch-mode select{min-height:36px}body.touch-mode .track-panel-scroll,.touch-mode .track-panel-scroll,body.touch-mode .piano-roll-scroll,.touch-mode .piano-roll-scroll{touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}body.touch-mode .menu-bar,.touch-mode .menu-bar{gap:4px;padding:0 8px}body.touch-mode .edit-toolbar button,.touch-mode .edit-toolbar button{padding:4px 10px;min-height:40px}body.touch-mode .piano-roll-note,.touch-mode .piano-roll-note{min-height:20px}body.touch-mode .transport button,.touch-mode .transport button{min-height:44px;min-width:44px;padding:8px 14px}.touch-mode .track-panel-collapsed{width:0!important;min-width:0!important;overflow:hidden;padding:0;margin:0;border:none}@media (max-width: 600px){body.touch-mode .menu-bar,.touch-mode .menu-bar{flex-wrap:wrap;height:auto;max-height:96px;overflow-x:auto;overflow-y:hidden;padding:2px 4px;gap:2px}body.touch-mode .menu-item,.touch-mode .menu-item{padding:4px 6px;min-height:32px;font-size:.65rem;white-space:nowrap}body.touch-mode button,.touch-mode button{min-height:36px;min-width:36px;padding:3px 6px}body.touch-mode .edit-toolbar button,.touch-mode .edit-toolbar button{padding:4px 8px;min-height:36px}body.touch-mode .transport button,.touch-mode .transport button{min-height:40px;min-width:40px;padding:6px 10px}body.touch-mode .piano-roll-scroll,.touch-mode .piano-roll-scroll{touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}}@media (max-width: 400px){body.touch-mode .menu-bar,.touch-mode .menu-bar{max-height:72px}body.touch-mode .menu-item,.touch-mode .menu-item{padding:3px 4px;min-height:28px;font-size:.6rem}body.touch-mode button,.touch-mode button{min-height:32px;min-width:32px}}
