*,*:before,*:after{box-sizing:border-box}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--app-viewport-height: 100dvh}body{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,sans-serif;background:#f0f0f0;color:#111;margin:0;height:var(--app-viewport-height);overflow:hidden;display:flex;flex-direction:column}html[data-app-runtime=web]{width:100%;height:var(--app-viewport-height);overflow:hidden;overscroll-behavior:none;touch-action:pan-x pan-y}html[data-app-runtime=web] body{position:fixed;inset:0;width:100%;height:var(--app-viewport-height);min-height:0;overflow:hidden;overscroll-behavior:none}.topbar{display:flex;align-items:center;gap:8px;background:#0a0a0a;padding:var(--safe-top) 12px 0;flex-shrink:0;min-height:calc(56px + var(--safe-top))}.topbar-tabs{flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}.topbar-tabs::-webkit-scrollbar{display:none}.topbar-preview-slot{flex:0 0 auto;display:flex;align-items:center}.topbar-tabs.is-reordering{cursor:grabbing;touch-action:none;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:auto}.btn-menu{font-size:20px;background:none;border:none;color:#fff;cursor:pointer;padding:8px;border-radius:4px;line-height:1;flex-shrink:0;touch-action:manipulation}.btn-menu:active{background:#222}.topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0}.bpm-wrap{display:flex;align-items:center;gap:4px;font-size:11px;color:#666;letter-spacing:.08em}.bpm-input{width:50px;font-size:16px;padding:5px 6px;border-radius:3px;border:1px solid #444;background:#1a1a1a;color:#fff;text-align:center}.bpm-input::-webkit-outer-spin-button,.bpm-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.bpm-input{appearance:textfield;-moz-appearance:textfield}.btn{font-size:17px;padding:7px 12px;border-radius:4px;border:none;cursor:pointer;line-height:1;touch-action:manipulation;font-weight:700}.btn:active{opacity:.7}.btn-play{background:#fff;color:#111}.topbar-tab-btn{background:transparent;color:#d6d6d6;border:1px solid #4a4a4a;min-width:72px;min-height:36px;padding:0 12px;font-size:12px;letter-spacing:.04em;flex-shrink:0;max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:none;-webkit-user-select:none}.topbar-preview-slot .topbar-tab-btn{min-width:72px}.topbar-tab-btn.is-active{background:#fff;color:#111;border-color:#fff}.topbar-tab-btn.is-dragging{opacity:.72;transform:scale(.96);touch-action:none}.btn-play.is-playing{background:#333;color:#fff;border:1px solid #555}.sidebar-overlay{display:none;position:fixed;inset:0;background:#0006;z-index:50}.sidebar-overlay.open{display:block}.sidebar{position:fixed;top:0;left:0;width:280px;max-width:85vw;height:100%;background:#fff;z-index:60;display:flex;flex-direction:column;transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1);padding-top:var(--safe-top);padding-bottom:var(--safe-bottom);border-right:1px solid #e0e0e0}.sidebar.open{transform:translate(0)}.sidebar-heading{font-size:10px;font-weight:700;color:#aaa;text-transform:uppercase;letter-spacing:.16em;padding:20px 16px 12px;border-bottom:1px solid #eee}.track-list{flex:1;overflow-y:auto;padding:16px 0;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:6px;background:#fff}.track-item{display:flex;align-items:center;gap:16px;padding:7px 16px;background:#111;color:#ccc;width:calc(100% - 30px);margin:0;border-radius:0 8px 8px 0;cursor:pointer;touch-action:manipulation;box-shadow:3px 4px 10px #00000038;transition:background .1s}.track-item:active{background:#2a2a2a}.track-item.active{background:#383838;color:#fff;box-shadow:3px 4px 10px #00000038,inset 4px 0 #fff}.track-item-name{flex:1;font-size:14px;letter-spacing:.02em}.track-item-delete{font-size:14px;color:#444;background:none;border:none;cursor:pointer;padding:4px 6px;line-height:1;touch-action:manipulation;flex-shrink:0}.track-item-delete:active{color:#e53935}.sidebar-footer{padding:14px 12px;border-top:1px solid #eee}.btn-add-track{width:100%;padding:14px;font-size:14px;background:#111;color:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:600;letter-spacing:.04em;touch-action:manipulation}.btn-add-track:active{background:#333}.sidebar-actions{display:flex;gap:6px;margin-top:10px}.btn-sidebar-action{flex:1;padding:10px 4px;border:1px solid #ddd;border-radius:6px;background:#fff;font-size:12px;cursor:pointer;touch-action:manipulation;text-align:center}.btn-sidebar-action:active{background:#eee}.main{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:10px 12px;background:#f0f0f0}.topbar,.sidebar,.track-item,.main,#trackEditor,.melody-topbar,.measure-actions,.measure-seek-shell,.measure-seek-card,.editor-help{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.topbar input,.topbar select,.topbar textarea,.sidebar input,.sidebar select,.sidebar textarea,.main input,.main select,.main textarea,#trackEditor input,#trackEditor select,#trackEditor textarea{user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default}.boot-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#fff;transition:opacity .3s ease}.boot-overlay.hide{opacity:0;pointer-events:none}.boot-overlay-content{display:flex;flex-direction:column;align-items:center;gap:16px}.boot-overlay-icon{font-size:48px;animation:pulse 1.5s ease-in-out infinite}.boot-overlay-text{font-size:14px;color:#999}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:240px;gap:16px}.empty-state-icon{font-size:48px;opacity:.3}.empty-state-icon.loading{animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,to{opacity:.3;transform:scale(1)}50%{opacity:.6;transform:scale(1.05)}}.empty-state-text{font-size:14px;text-align:center;line-height:1.6;color:#999}.editor-header{display:flex;align-items:center;gap:6px;margin-bottom:8px;justify-content:space-between}.editor-header:empty{display:none;margin:0}.melody-topbar{display:flex;flex-direction:column;gap:2px;margin:0 0 3px;padding:0;border:0;border-radius:0;background:transparent}.melody-editor-header{align-items:center;justify-content:space-between;gap:8px;margin:0}.melody-header-chip{display:inline-flex;align-items:center;min-height:22px;padding:0 7px;border-radius:999px;background:#ffffffd9;border:1px solid #dce3ef;color:#475569;font-size:9px;font-weight:700;letter-spacing:.03em}.melody-header-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;flex-wrap:wrap}.melody-header-group{display:inline-flex;align-items:center;gap:4px}.melody-header-divider{color:#94a3b8;font-size:11px;font-weight:700}.measure-actions{display:inline-flex;align-items:center;gap:6px;padding:4px 6px;border:1px solid #ddd;border-radius:8px;background:#fafafa}.measure-actions-label{font-size:10px;font-weight:800;color:#777;letter-spacing:.08em}.measure-action-btn{width:34px;height:34px;border:1px solid #cfcfcf;border-radius:8px;background:#fff;font-size:18px;font-weight:700;cursor:pointer;touch-action:manipulation}.measure-action-btn.add{color:#2e7d32}.measure-action-btn.remove{color:#c62828}.measure-action-btn:disabled{opacity:.3;cursor:default}.editor-help{display:flex;flex-direction:column;gap:2px;padding:8px 10px;margin-bottom:8px;background:#fafafa;border:1px solid #e4e4e4;border-radius:8px;position:relative}.editor-help-close{position:absolute;top:6px;right:6px;width:24px;height:24px;border:1px solid #d5d5d5;border-radius:999px;background:#fff;color:#666;font-size:16px;line-height:1;cursor:pointer;touch-action:manipulation}.editor-help-close:active{background:#f0f0f0}.editor-help strong{font-size:11px;font-weight:800;letter-spacing:.04em;color:#333;padding-right:28px}.editor-help span{font-size:11px;line-height:1.45;color:#777}.drum-track-editor{--drum-add-action-height: 34px;--drum-add-row-gap: 6px;--drum-add-section-gap: 8px;--drum-add-padding-x: 10px;--drum-add-padding-y: 10px;--drum-add-panel-radius: 8px;--drum-add-button-radius: 8px;--drum-add-sheet-radius: 16px;--drum-add-sheet-height: 60vh;--drum-add-sheet-header-height: 40px;--drum-add-sheet-footer-height: 42px;--drum-add-sheet-vertical-padding: 22px;--drum-editor-inline-gap: 0px;--drum-editor-scroll-bottom-gap: 12px}.drum-track-editor .drum-editor,.drum-track-editor .drum-add-panel{width:calc(100% - (var(--drum-editor-inline-gap) * 2));margin-inline:var(--drum-editor-inline-gap);box-sizing:border-box}#trackEditor.drum-track-editor .drum-editor{border-left:0;border-right:0;border-radius:0}.row{background:#fff;border-radius:6px;padding:10px 12px;margin-bottom:8px;border:1px solid #e8e8e8;box-shadow:0 1px 4px #0000000f}.row-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.row-label{font-size:11px;color:#666;font-weight:700;letter-spacing:.08em;text-transform:uppercase;flex:1}.steps-scroll{overflow-x:hidden;padding-bottom:4px}.steps{display:flex;gap:4px}.step{flex:1;min-width:0;height:36px;border-radius:3px;border:1px solid #d0d0d0;background:#f5f5f5;cursor:pointer;outline:none;transition:background .06s;touch-action:manipulation}.step.on{background:var(--on-bg, #111);border-color:var(--on-border, #000)}.step:active{opacity:.55}.step.playing{background:#f5c518;border-color:#d4a800}.drum-add-panel{display:flex;flex-direction:column;gap:var(--drum-add-section-gap);margin-top:12px}.drum-add-panel-trigger{cursor:pointer;font-size:11px;font-weight:700;color:#666;padding:6px 9px;border:1px solid #e5e5e5;border-radius:var(--drum-add-panel-radius);background:#fff;text-align:left}.drum-add-panel-empty{margin:0;padding:8px 10px;border:1px solid #ececec;border-radius:var(--drum-add-panel-radius);background:#fafafa;font-size:10px;color:#6b7380}.drum-add-group{flex:0 0 auto;border:1px solid #e5e5e5;border-radius:var(--drum-add-panel-radius);background:#fff;overflow:hidden}.drum-add-group-summary{min-height:var(--drum-add-action-height);padding:0 9px;display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:11px;font-weight:700;color:#666}.drum-add-group-summary::-webkit-details-marker{display:none}.drum-add-group-list{display:flex;flex-direction:column;gap:0;padding:0 9px 8px}.drum-add-row{min-height:40px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:6px 0;border-top:1px solid #ececec}.drum-add-row:first-child{border-top:0}.drum-add-row-label{min-width:0;font-size:11px;font-weight:700;color:#333;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drum-add-row-preview,.drum-add-row-add{min-width:30px;min-height:30px;padding:0 8px;border:1px solid #e5e5e5;border-radius:var(--drum-add-button-radius);background:#fff;color:#555;font-size:12px;font-weight:700;line-height:1.2;touch-action:manipulation}.drum-add-panel-trigger:active,.drum-add-row-preview:active,.drum-add-row-add:active,.drum-add-group-summary:active{opacity:.72}.drum-add-sheet-overlay{position:fixed;inset:0;z-index:220;background:#00000047;display:flex;align-items:flex-end;justify-content:center;padding:max(12px,env(safe-area-inset-top,0px)) 0 0;box-sizing:border-box;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-add-sheet{width:min(100%,520px);height:var(--drum-add-sheet-height);max-height:var(--drum-add-sheet-height);box-sizing:border-box;background:#fff;border-radius:var(--drum-add-sheet-radius) var(--drum-add-sheet-radius) 0 0;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:8px;box-shadow:0 -8px 24px #0000002e;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-add-sheet-handle{width:40px;height:4px;border-radius:999px;background:#d4d4d4;margin:0 auto}.drum-add-sheet-title{font-size:13px;font-weight:800;color:#222}.drum-add-sheet-body{flex:0 0 auto;height:calc(var(--drum-add-sheet-height) - var(--drum-add-sheet-header-height) - var(--drum-add-sheet-footer-height) - var(--drum-add-sheet-vertical-padding) - env(safe-area-inset-bottom,0px));min-height:0;max-height:calc(var(--drum-add-sheet-height) - var(--drum-add-sheet-header-height) - var(--drum-add-sheet-footer-height) - var(--drum-add-sheet-vertical-padding) - env(safe-area-inset-bottom,0px));overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:var(--drum-add-section-gap);padding-right:2px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.drum-add-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.drum-add-sheet-close{min-height:34px;padding:0 12px;border:1px solid #e5e5e5;border-radius:var(--drum-add-panel-radius);background:#fff;color:#666;font-size:11px;font-weight:700}.drum-add-panel-empty{flex:0 0 auto}.drum-add-sheet-close:active{opacity:.72}.drum-row-delete-overlay{position:fixed;inset:0;z-index:260;background:#00000047;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-row-delete-dialog{width:min(100%,280px);border-radius:14px;background:#fff;box-shadow:0 14px 30px #0000002e;padding:18px 16px 16px;display:flex;flex-direction:column;gap:10px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-row-delete-message{margin:0;font-size:15px;font-weight:800;color:#222;text-align:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-row-delete-sub{margin:0;font-size:12px;line-height:1.5;color:#666;text-align:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-row-delete-actions{display:flex;justify-content:center;gap:10px;margin-top:2px}.drum-row-delete-btn{min-width:92px;min-height:38px;padding:0 14px;border:1px solid #d8dde6;border-radius:10px;background:#fff;color:#555;font-size:13px;font-weight:700;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.drum-row-delete-btn.danger{border-color:#ef4444;color:#ef4444}.oct-range-ctrl{display:flex;align-items:center;gap:4px;flex-shrink:0;border:1.5px solid #ddd;border-radius:6px;padding:4px 6px;background:#fafafa}.melody-topbar .oct-range-ctrl{padding:1px;gap:4px;border:0;border-radius:10px;background:#ffffffd1;box-shadow:inset 0 0 0 1px #dce3ef}.melody-topbar .ctrl-title{display:none}.melody-topbar .oct-range-btn{width:24px;min-height:24px;border-radius:7px;border-color:#d5ddea}.melody-topbar .oct-range-label{color:#334155;font-size:10px;padding-inline:0}.melody-topbar .measure-actions{padding:1px;gap:2px;border:0;border-radius:10px;background:#ffffffd1;box-shadow:inset 0 0 0 1px #dce3ef}.melody-topbar .measure-actions-label{display:none}.melody-topbar .measure-action-btn{width:auto;min-width:42px;height:24px;border-radius:7px;border-color:#d5ddea;font-size:10px;padding:0 8px}.oct-range-btn{width:30px;height:auto;min-height:26px;border:1px solid #ccc;background:#fff;border-radius:4px;font-size:11px;cursor:pointer;touch-action:manipulation;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;padding:2px 0}.oct-range-btn:disabled{opacity:.25;cursor:default}.oct-range-btn:not(:disabled):active{background:#f0f0f0}.oct-range-label{font-size:11px;color:#888;font-weight:700;letter-spacing:.04em;white-space:nowrap}.oct-accordion{display:flex;flex-direction:column;gap:6px;margin-bottom:6px}.oct-section{border-radius:6px;overflow:hidden;border:1.5px solid #ddd}.oct-section-header{width:100%;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background:#111;color:#fff;font-size:12px;font-weight:700;border:none;cursor:pointer;touch-action:manipulation;letter-spacing:.05em;text-align:left}.oct-section-header:active{opacity:.75}.oct-section-arrow{font-size:10px;opacity:.5;flex-shrink:0}.oct-section-body{display:none}.oct-section.open .oct-section-body{display:block}.oct-section.open .oct-section-mini{display:none}.oct-section.open .oct-section-header{padding:4px 10px}.oct-section-mini{flex:1;margin:0 12px;display:grid;grid-auto-rows:2px;gap:1px}.oct-mini-cell{background:#ffffff1f}.oct-mini-cell.on{background:#fff}.melodic-editor{display:flex;border:1px solid #ddd;border-radius:8px;overflow:hidden;background:#fff}.piano-keys{flex-shrink:0;display:flex;flex-direction:column;background:#f0f0f0;border-right:2px solid #ccc}.piano-key-spacer{height:22px;border-bottom:1px solid #ddd;background:#fafafa}.piano-key{height:26px;display:flex;align-items:center;justify-content:flex-end;padding-right:6px;font-size:9px;font-family:monospace;font-weight:700;flex-shrink:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.piano-key.white-key{width:48px;background:#fff;color:#333;border-bottom:1px solid #eee}.piano-key.drum-key{width:var(--drum-key-width, 28px);min-width:var(--drum-key-width, 28px);align-items:center;justify-content:center;padding:0 1px;text-align:center;line-height:1;gap:0;flex-direction:column}.piano-key.drum-key .drum-key-line{display:block;width:100%;font-size:7px;line-height:1;white-space:nowrap;text-align:center;overflow:hidden;text-overflow:clip;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.piano-key.black-key{width:36px;background:#1a1a1a;color:#eee;border-bottom:1px solid #000}.steps-grid-scroll{flex:1;overflow-x:hidden}.timeline-grid{position:relative;display:flex;flex-direction:column}.timeline-header{display:grid;grid-auto-flow:column;gap:0;padding:0;height:22px;flex-shrink:0;align-items:center;border-bottom:1px solid #e8e8e8;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b1b1b1 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b1b1b1 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e5e5e5 calc((100% / var(--timeline-columns)) - 1px),#e5e5e5 calc(100% / var(--timeline-columns))),#fafafa}.timeline-header-cell{min-width:0;font-size:9px;text-align:center;color:#b8b8b8}.timeline-header-cell.beat{color:#888;font-weight:700;font-size:10px}.timeline-row{display:block;padding:0;height:30px;border-bottom:1px solid #f0f0f0;position:relative;overflow:hidden;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#ececec calc(100% - 1px)),#f8f8f8}.timeline-row.black-key{background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#a9a9a9 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#a9a9a9 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#d7d7d7 calc((100% / var(--timeline-columns)) - 1px),#d7d7d7 calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#d8d8d8 calc(100% - 1px)),#f0f0f0}.timeline-note{display:block;position:absolute;top:2px;height:calc(100% - 4px);border:0;border-radius:4px;background:#111;box-shadow:none;outline:none;cursor:pointer;z-index:2;-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box}.timeline-note:hover,.timeline-note:focus,.timeline-note:active{outline:none}.timeline-note.drum-note{top:4px;height:calc(100% - 8px);border-radius:3px;background:#1b1b1b;box-shadow:none}.timeline-note.melodic-note{background:linear-gradient(90deg,#1d4ed8,#2563eb);border-color:#1d4ed8}.timeline-note.chord-note{background:#222}.timeline-note.drum-note,.timeline-note.chord-note{margin-left:0}.timeline-note.is-delete-pending,.melodic-track-editor .continuous-roll .melody-grid-note.is-delete-pending{opacity:.72}.timeline-note.is-note-drag-preview,.melodic-track-editor .continuous-roll .melody-grid-note.is-note-drag-preview{opacity:.72;transform:scale(1.08);transform-origin:center;z-index:4}.timeline-note.is-delete-pending:after,.melodic-track-editor .continuous-roll .melody-grid-note.is-delete-pending:after{content:"×";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:800;line-height:1;text-shadow:0 1px 1px rgba(0,0,0,.28);pointer-events:none}.playhead-bar{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#ef4444e6;box-shadow:0 0 0 1px #ffffff59;pointer-events:none;z-index:5}.modal-overlay{display:none;position:fixed;inset:0;background:#00000080;align-items:flex-end;justify-content:center;z-index:200}.modal-overlay.open{display:flex}.modal{background:#fff;border-radius:16px 16px 0 0;padding:20px 16px;width:100%;max-width:480px;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}.modal-handle{width:40px;height:4px;background:#ddd;border-radius:2px;margin:0 auto 16px}.modal h2{margin:0 0 14px;font-size:12px;color:#aaa;text-align:center;letter-spacing:.12em;text-transform:uppercase;font-weight:600}.modal-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modal-options button{padding:20px 12px;font-size:14px;border:none;border-radius:0 0 8px 8px;background:#1a1a1a;color:#ddd;cursor:pointer;font-weight:600;touch-action:manipulation;letter-spacing:.02em;box-shadow:0 4px 8px #0003}.modal-options button:active{background:#333}.btn-cancel{margin-top:12px;width:100%;padding:14px;font-size:14px;background:#fff;color:#bbb;border:1.5px solid #e8e8e8;border-radius:8px;cursor:pointer;touch-action:manipulation}.btn-cancel:active{background:#f5f5f5}:root{--project-home-padding-x: 20px;--project-home-padding-top: 28px;--project-home-gap: 12px;--project-card-min-height: 94px;--project-action-height: 48px;--project-icon-size: 44px;--project-dialog-input-height: 48px;--project-version-font-size: 11px;--project-version-line-height: 16px;--project-version-margin-top: 2px}body.project-home-active .topbar,body.project-home-active .sidebar,body.project-home-active .sidebar-overlay{display:none}body.project-home-active .main{padding:0;background:#f6f7f9}.project-home{height:100%;min-height:0;padding:calc(var(--safe-top) + var(--project-home-padding-top)) var(--project-home-padding-x) calc(var(--safe-bottom) + 18px);background:#f6f7f9;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.project-home[hidden]{display:none}.project-home-shell{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:var(--project-home-gap)}.project-home-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px}.project-home-header-actions{position:relative;display:flex;align-items:center;justify-content:flex-end}.project-home-kicker{margin:0 0 4px;color:#64748b;font-size:12px;font-weight:800;letter-spacing:.08em}.project-home h1{margin:0;font-size:28px;line-height:1.1;letter-spacing:0}.project-home-list{list-style:none;display:flex;flex-direction:column;gap:10px;margin:0;padding:0}.project-home-shell:has(.project-home-actions.is-selecting) .project-home-list{padding-bottom:124px}.project-home-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px}.project-home-card{position:relative;min-height:var(--project-card-min-height);padding:14px 16px;border:1px solid #d8dee8;border-radius:8px;background:#fff;color:#0f172a;box-shadow:0 1px 2px #0f172a0f;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:6px;text-align:left;cursor:pointer;touch-action:manipulation}.project-home-card.is-selected{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb2e}.project-home-item.is-selecting{grid-template-columns:minmax(0,1fr)}.project-home-check{position:absolute;top:12px;right:12px;width:22px;height:22px;border:2px solid #94a3b8;border-radius:6px;background:#fff}.project-home-card.is-selected .project-home-check{border-color:#2563eb;background:#2563eb}.project-home-card.is-selected .project-home-check:after{content:"";position:absolute;left:6px;top:2px;width:6px;height:12px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}.project-home-card:active,.project-home-action:active,.project-home-icon-btn:active{transform:translateY(1px)}.project-home-card-title{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:17px;font-weight:800;letter-spacing:0}.project-home-card-meta{color:#64748b;font-size:12px;font-weight:700}.project-home-card-tools{display:flex;flex-direction:column;gap:6px}.project-home-icon-btn{width:var(--project-icon-size);height:var(--project-icon-size);border:1px solid #d8dee8;border-radius:8px;background:#fff;color:#334155;font-size:20px;font-weight:800;line-height:1;cursor:pointer;touch-action:manipulation}.project-home-icon-btn.danger{color:#b91c1c}.project-home-menu-trigger{width:var(--project-icon-size);height:var(--project-icon-size);border:1px solid #d8dee8;border-radius:8px;background:#fff;color:#0f172a;font-size:24px;font-weight:900;line-height:1;cursor:pointer;touch-action:manipulation}.project-home-menu-trigger:active{transform:translateY(1px)}.project-home-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:5;width:164px;padding:6px;border:1px solid #d8dee8;border-radius:12px;background:#fff;box-shadow:0 14px 32px #0f172a29}.project-home-menu[hidden]{display:none}.project-home-menu button{width:100%;min-height:44px;border:0;border-radius:8px;background:transparent;color:#0f172a;font-size:14px;font-weight:800;text-align:left;padding:0 12px;cursor:pointer;touch-action:manipulation}.project-home-menu button:active{background:#f1f5f9}.project-home-empty{min-height:116px;border:1px dashed #cbd5e1;border-radius:8px;background:#fff;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px;text-align:center}.project-home-empty[hidden]{display:none}.project-home-empty strong{color:#0f172a;font-size:16px}.project-home-empty span{font-size:13px}.project-home-actions{position:sticky;bottom:calc(var(--safe-bottom) + 12px);display:grid;grid-template-columns:1fr;gap:8px;padding-top:8px}.project-home-actions.is-selecting{grid-template-columns:1fr 1fr}.project-home-actions.is-selecting [data-project-select-cancel=true]{grid-column:1 / -1}.project-home-action{min-height:var(--project-action-height);border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font-size:16px;font-weight:800;cursor:pointer;touch-action:manipulation}.project-home-action.primary{background:#111;border-color:#111;color:#fff}.project-home-action.danger{background:#fff;border-color:#fecaca;color:#b91c1c}.project-home-action:disabled{opacity:.45;cursor:not-allowed}.project-home-action.tutorial{border-color:#111;background:#fff;color:#111}.project-home-action.wide{width:100%}.project-home-version{min-height:var(--project-version-line-height);margin-top:var(--project-version-margin-top);color:#94a3b8;font-size:var(--project-version-font-size);font-weight:700;line-height:var(--project-version-line-height);text-align:center;letter-spacing:0}.project-create-dialog{position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;padding:calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 20px);background:#0f172a52}.project-create-dialog[hidden]{display:none}.project-create-panel{width:min(100%,340px);padding:18px;border-radius:8px;background:#fff;box-shadow:0 18px 48px #0f172a38}.project-create-panel h2{margin:0 0 12px;color:#0f172a;font-size:18px;line-height:1.2;letter-spacing:0}.project-create-input{width:100%;height:var(--project-dialog-input-height);padding:0 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font-size:16px;font-weight:700}.project-create-input:focus{outline:2px solid #111;outline-offset:2px}.project-create-error{margin-top:8px;color:#b91c1c;font-size:12px;font-weight:700}.project-create-error[hidden]{display:none}.project-create-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.project-create-btn{min-height:44px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font-size:15px;font-weight:800;cursor:pointer;touch-action:manipulation}.project-create-btn.primary{border-color:#111;background:#111;color:#fff}.project-create-btn:disabled{opacity:.35;cursor:default;transform:none}.drum-track-editor .drum-editor{flex:1 1 auto;min-height:0;align-items:stretch;overflow:hidden;overflow-x:hidden}.drum-track-editor .drum-editor .timeline-grid{flex:0 0 auto;min-height:max-content;width:100%;min-width:100%}.drum-track-editor .drum-editor .drum-grid-header-row,.drum-track-editor .drum-editor .drum-lane{display:grid;grid-template-columns:var(--drum-key-width, 28px) minmax(0,1fr);width:100%}.drum-track-editor .drum-editor .piano-key-spacer{height:22px;width:var(--drum-key-width, 28px);min-width:var(--drum-key-width, 28px)}.drum-track-editor .drum-editor .steps-grid-scroll{flex:1 1 auto;min-height:0;align-self:stretch;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;box-sizing:border-box;padding-right:8px;padding-bottom:var(--drum-editor-scroll-bottom-gap, 12px);scrollbar-width:none}.drum-track-editor .drum-editor .steps-grid-scroll::-webkit-scrollbar{display:none}.drum-track-editor .drum-editor .drum-roll-content{position:relative;min-height:max-content;width:100%;min-width:100%}.drum-track-editor .drum-editor .piano-key,.drum-track-editor .drum-editor .timeline-row{flex:none;height:52px}.drum-track-editor .drum-editor .timeline-row{border-left:1px solid #b5b5b5;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#cdcdcd calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#cdcdcd calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e9e9e9 calc((100% / var(--timeline-columns)) - 1px),#e9e9e9 calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#ececec calc(100% - 1px)),#fafafa}.drum-track-editor .drum-editor .timeline-header{border-left:1px solid #b1b1b1}.drum-track-editor .drum-editor .drum-kit-band-lane{min-height:20px}.drum-track-editor .drum-editor .drum-kit-band-spacer{background:#fff;border-bottom:1px solid #e9eef6}.drum-track-editor .drum-editor .drum-kit-band{display:flex;align-items:center;min-height:20px;padding:0 8px;border-left:1px solid #b1b1b1;border-bottom:1px solid #dbe3ef;background:#eef4fb;color:#64748b;font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.drum-track-editor .drum-editor .playhead-bar{background:#ef44448c;box-shadow:none}.melodic-track-editor .continuous-roll{--melody-key-width: 28px;flex:1;min-height:0;overflow:hidden}.melodic-track-editor .melody-topbar .duration-toolbar,.drum-track-editor .melody-topbar .duration-toolbar,.chord-track-editor .melody-topbar .duration-toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:0;align-items:stretch}.melodic-track-editor .melody-topbar .duration-mode-row,.melodic-track-editor .melody-topbar .duration-value-row,.drum-track-editor .melody-topbar .duration-mode-row,.drum-track-editor .melody-topbar .duration-value-row,.chord-track-editor .melody-topbar .duration-mode-row,.chord-track-editor .melody-topbar .duration-value-row{display:flex;align-items:center;gap:5px;min-width:0;margin:0;padding:4px 6px;border-radius:8px;background:#ffffffd1;border:1px solid #dce3ef}.melodic-track-editor .melody-topbar .duration-mode-row,.drum-track-editor .melody-topbar .duration-mode-row,.chord-track-editor .melody-topbar .duration-mode-row{flex:0 0 auto}.melodic-track-editor .melody-topbar .duration-value-row,.drum-track-editor .melody-topbar .duration-value-row,.chord-track-editor .melody-topbar .duration-value-row{flex:1 1 240px}.melodic-track-editor .melody-topbar .duration-toolbar{gap:2px}.melodic-track-editor .melody-topbar .melody-toolbar-primary{display:flex;align-items:stretch;gap:4px;width:100%;min-width:0;flex-wrap:nowrap}.melodic-track-editor .melody-topbar .melody-toolbar-divider{display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px;font-weight:700;flex:0 0 auto}.melodic-track-editor .melody-topbar .melody-oct-row{display:flex;align-items:center;gap:5px;min-width:0;margin:0;padding:4px 6px;border-radius:8px;background:#ffffffd1;border:1px solid #dce3ef;flex:1 1 auto}.melodic-track-editor .melody-topbar .melody-oct-row .duration-row-label{min-width:auto}.melodic-track-editor .melody-topbar .duration-mode-row{flex:0 0 auto;margin:0}.melodic-track-editor .melody-topbar .duration-value-row{flex:0 0 auto;width:100%}.melodic-track-editor .melody-topbar .duration-value-buttons,.drum-track-editor .melody-topbar .duration-value-buttons,.chord-track-editor .melody-topbar .duration-value-buttons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:100%;overflow:visible}.melodic-track-editor .melody-topbar .dur-btn,.drum-track-editor .melody-topbar .dur-btn,.chord-track-editor .melody-topbar .dur-btn{min-width:0;width:100%;height:38px;padding:1px 2px}.melodic-track-editor .melody-topbar .oct-range-ctrl{flex:1 1 auto;min-width:0;min-height:28px;padding:0;border-radius:0;background:transparent;box-shadow:none;justify-content:space-between}.melodic-track-editor .melody-topbar .ctrl-title{display:inline-flex;color:#64748b;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.melodic-track-editor .melody-topbar .duration-row-label,.drum-track-editor .melody-topbar .duration-row-label,.chord-track-editor .melody-topbar .duration-row-label{min-width:auto;color:#64748b;font-size:9px}.melodic-track-editor .melody-topbar .grid-mode-tab,.drum-track-editor .melody-topbar .grid-mode-tab,.chord-track-editor .melody-topbar .grid-mode-tab{min-width:42px;height:28px;border-radius:7px;font-size:10px}.melodic-track-editor .melody-topbar .dur-btn,.drum-track-editor .melody-topbar .dur-btn,.chord-track-editor .melody-topbar .dur-btn{min-width:36px;height:30px;border-radius:7px;padding:1px 3px}.melodic-track-editor .melody-topbar .dur-icon,.drum-track-editor .melody-topbar .dur-icon,.chord-track-editor .melody-topbar .dur-icon{font-size:16px;min-width:16px;min-height:16px}.melodic-track-editor .melody-topbar .dur-label,.drum-track-editor .melody-topbar .dur-label,.chord-track-editor .melody-topbar .dur-label{font-size:8px}.melodic-track-editor .melody-topbar .dur-icon-wrap,.drum-track-editor .melody-topbar .dur-icon-wrap,.chord-track-editor .melody-topbar .dur-icon-wrap{min-height:16px}.melodic-track-editor .melody-topbar .editor-help,.drum-track-editor .melody-topbar .editor-help,.chord-track-editor .melody-topbar .editor-help{margin:0;background:#ffffffd1;border-color:#dce3ef;padding:4px 6px}.chord-track-editor .melody-topbar{gap:2px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}.chord-track-editor .melody-topbar::-webkit-scrollbar{display:none}.chord-track-editor .melody-topbar .duration-mode-row,.chord-track-editor .melody-topbar .duration-value-row{padding:4px 6px;gap:5px}.chord-track-editor .melody-topbar .duration-row-label{font-size:9px}.chord-track-editor .melody-topbar .editor-help{padding:3px 6px}.chord-track-editor .melody-topbar .editor-help strong{font-size:11px}.chord-track-editor .melody-topbar .editor-help span{font-size:9px;line-height:1.25}.drum-track-editor>.editor-help,.chord-track-editor>.editor-help{display:none}.melodic-track-editor .continuous-roll .melody-roll-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.melodic-track-editor .continuous-roll .melody-roll-scroll::-webkit-scrollbar{display:none}.melodic-track-editor .continuous-roll .melody-roll-content{position:relative;min-height:max-content;width:100%;min-width:100%}.melodic-track-editor .continuous-roll .melody-roll-header,.melodic-track-editor .continuous-roll .melody-lane,.melodic-track-editor .continuous-roll .melody-lane-divider{display:grid;grid-template-columns:var(--melody-key-width) minmax(0,1fr);align-items:stretch;width:100%}.melodic-track-editor .continuous-roll .melody-chord-header{display:grid;min-width:0;width:100%;height:22px;background:#faf7ef;border-bottom:1px solid #e8dfd0}.melodic-track-editor .continuous-roll .melody-chord-header-cell{min-width:0;display:flex;align-items:center;justify-content:flex-start;gap:4px;padding:0 4px;font-size:9px;font-weight:700;letter-spacing:.02em;color:#7b5321;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid #eadbc5}.melodic-track-editor .continuous-roll .melody-chord-header-beat{flex:0 0 auto;min-width:10px;color:#aa7b43;font-size:8px;font-weight:800;text-align:left}.melodic-track-editor .continuous-roll .melody-chord-header-name{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}.melodic-track-editor .continuous-roll .melody-chord-header-cell:last-child{border-right:0}.melodic-track-editor .continuous-roll .melody-chord-header-cell.has-chord{background:color-mix(in srgb,var(--chord-accent, #d97706) 14%,white)}.melodic-track-editor .continuous-roll .melody-chord-header-cell.is-empty{color:#b79f86}.melodic-track-editor .continuous-roll .piano-key,.melodic-track-editor .continuous-roll .melody-grid-row{height:34px}.melodic-track-editor .continuous-roll .piano-key{width:var(--melody-key-width);min-width:var(--melody-key-width);max-width:var(--melody-key-width)}.melodic-track-editor .continuous-roll .melody-tone-key{justify-content:flex-end;padding-right:3px;font-size:10px;font-weight:700}.melodic-track-editor .continuous-roll .melody-key-octave-divider{width:var(--melody-key-width);min-width:var(--melody-key-width);max-width:var(--melody-key-width)}.melodic-track-editor .continuous-roll .melody-grid-row,.melodic-track-editor .continuous-roll .melody-grid-octave-divider{min-width:0;width:auto;max-width:none}.melody-key-octave-divider,.melody-grid-octave-divider{height:22px;display:flex;align-items:center;font-size:10px;font-weight:700;letter-spacing:.08em}.melody-key-octave-divider{justify-content:flex-end;padding-right:4px;color:#777;background:#efefef;border-bottom:1px solid #dbdbdb}.melody-grid-octave-divider{padding-left:0;color:#666;background:linear-gradient(90deg,#f3f3f3,#f8f8f8);border-left:1px solid #c8c8c8;border-bottom:1px solid #dbdbdb}.melodic-track-editor .continuous-roll .melody-grid-row{position:relative;overflow:hidden;border-left:1px solid #c8c8c8;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#d9d9d9 calc(100% - 1px)),#e4e4e4}.melodic-track-editor .continuous-roll .melody-grid-row.is-scale-tone{background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#bbbbbb calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#bbbbbb calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e5e5e5 calc((100% / var(--timeline-columns)) - 1px),#e5e5e5 calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#ececec calc(100% - 1px)),#fbfbfb}.melodic-track-editor .continuous-roll .melody-chord-tone-segment{position:absolute;top:0;bottom:0;background:#ff980024;pointer-events:none;z-index:1}.melodic-track-editor .continuous-roll .melody-grid-row.is-non-scale-tone{background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#dddddd calc((100% / var(--timeline-columns)) - 1px),#dddddd calc(100% / var(--timeline-columns))),linear-gradient(to bottom,transparent calc(100% - 1px),#d9d9d9 calc(100% - 1px)),#e4e4e4}.melodic-track-editor .continuous-roll .melody-grid-note{display:block;position:absolute;top:2px;height:calc(100% - 4px);border:1px solid #1d4ed8;border-radius:4px;background:linear-gradient(90deg,#1d4ed8,#2563eb);box-shadow:none;cursor:pointer;z-index:3;touch-action:none}.melody-playhead{top:22px;bottom:0}@media(max-width:720px){.melody-header-actions{width:100%;justify-content:flex-start}.melodic-track-editor .melody-topbar .duration-mode-row,.melodic-track-editor .melody-topbar .duration-value-row,.drum-track-editor .melody-topbar .duration-mode-row,.drum-track-editor .melody-topbar .duration-value-row,.chord-track-editor .melody-topbar .duration-mode-row,.chord-track-editor .melody-topbar .duration-value-row{flex:0 0 auto}.melodic-track-editor .melody-topbar .duration-value-buttons,.drum-track-editor .melody-topbar .duration-value-buttons,.chord-track-editor .melody-topbar .duration-value-buttons{gap:4px}.melodic-track-editor .melody-topbar .dur-btn,.drum-track-editor .melody-topbar .dur-btn,.chord-track-editor .melody-topbar .dur-btn{min-width:36px}}.chord-section-desc{font-size:9px;color:#7c7c7c;line-height:1.25}.chord-progress-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.chord-progress-head .chord-section-desc{flex:1 1 auto}.chord-progress-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.chord-panel-body{padding:4px 0 8px;display:flex;flex-direction:column;gap:4px}.chord-palette{flex-shrink:0;display:flex;flex-direction:column;gap:4px}.chord-palette-row{display:flex;align-items:center;gap:8px}.chord-key-row{align-items:center;gap:8px}.chord-key-root-input{width:74px;flex:0 0 74px}.key-mode-tabs{display:inline-flex;gap:4px;flex:1}.key-mode-tab{flex:1;min-width:0;height:34px;border:1.5px solid #d5d5d5;border-radius:6px;background:#fff;color:#475569;font-size:12px;font-weight:700;cursor:pointer;touch-action:manipulation}.key-mode-tab.selected{background:#111;border-color:#111;color:#fff}.chord-select-control{flex:1;min-width:0}.chord-select-input{width:100%;min-width:0;height:34px;padding:0 8px;border:1.5px solid #d5d5d5;border-radius:6px;background:#fff;color:#111;font-size:12px;font-weight:600}.chord-oct-row{flex-shrink:0;white-space:nowrap}.chord-section{display:flex;flex-direction:column;gap:3px;background:#f8f8f8;border:1px solid #e0e0e0;border-radius:8px;padding:6px 8px 8px}.chord-section-title{font-size:10px;font-weight:700;color:#888;letter-spacing:.05em;text-transform:uppercase;margin-bottom:2px}.chord-panel-body>.chord-section:last-child{flex:1;min-height:0}.chord-sequencer-section{gap:6px;padding:6px 0;background:transparent;border:0;border-radius:0}.chord-sequencer-grid{display:flex;flex-direction:column;gap:0}.chord-sequencer-progress,.chord-sequencer-timing{display:flex;flex-direction:column;gap:4px;flex:0 0 auto}.chord-sequencer-controls{gap:0}.chord-sequencer-controls .chord-palette-row{align-items:stretch;gap:6px}.chord-sequencer-controls .chord-select-control{flex:1 1 0}.chord-sequencer-controls .chord-select-input{height:34px}.chord-sequencer-controls .chord-oct-row{flex:0 0 auto}.chord-sequencer-head{display:flex;align-items:center;justify-content:flex-end;gap:8px}.chord-sequencer-title{font-size:10px;font-weight:800;color:#6b7280;letter-spacing:.05em;text-transform:uppercase}.chord-sequencer-actions{display:flex;flex-direction:column;gap:6px;padding-top:4px;flex:0 0 auto}.chord-instrument-row{padding-top:0}.chord-panel-body>.chord-section:last-child .chord-steps-row{flex:1;min-height:0}.chord-panel-body>.chord-section:last-child .chord-steps-cells{min-height:0}.chord-sound-btn{width:100%;min-width:0;max-width:none;height:36px;border:1px solid #d0d0d0;border-radius:3px;background:#f5f5f5;cursor:pointer;flex-shrink:0;touch-action:manipulation;transition:background .06s}.chord-sound-btn:active{opacity:.7}.chord-sound-btn.on{background:#111;border-color:#000}.chord-selector-row{display:flex;flex-direction:column;gap:4px}.chord-selector-row.horizontal{flex-direction:row;align-items:center;gap:6px}.chord-selector-label{font-size:10px;color:#888;font-weight:700;letter-spacing:.05em;flex-shrink:0}.chord-root-list{display:flex;gap:3px;padding-bottom:2px}.chord-root-btn{flex:1;min-width:0;height:36px;font-size:11px;font-weight:600;border:1.5px solid #ddd;border-radius:6px;background:#f8f8f8;color:#111;cursor:pointer;touch-action:manipulation;padding:0}.chord-root-btn:active{opacity:.7}.chord-root-btn.selected{background:#111;color:#fff;border-color:#111}.chord-type-list{display:flex;flex-wrap:wrap;gap:5px}.chord-type-btn{height:36px;padding:0 10px;font-size:12px;font-weight:600;border:1.5px solid #ddd;border-radius:6px;background:#f8f8f8;color:#111;cursor:pointer;touch-action:manipulation}.chord-type-btn:active{opacity:.7}.chord-type-btn.selected{background:#111;color:#fff;border-color:#111}.chord-oct-ctrl{display:flex;align-items:center;gap:6px}.oct-range-label{min-width:48px;text-align:center;font-size:11px;font-weight:700;color:#475569}.chord-rhythm-ref{background:#f8f8f8;border-radius:6px;padding:8px 10px;display:flex;flex-direction:column;gap:4px}.chord-rhythm-title{font-size:10px;color:#aaa;letter-spacing:.06em;margin-bottom:2px}.chord-rhythm-row{display:flex;align-items:center;gap:6px}.chord-rhythm-row-label{font-size:10px;color:#888;min-width:38px;flex-shrink:0}.chord-rhythm-cells{display:grid;gap:2px;flex:1}.chord-rhythm-cell{font-size:10px;text-align:center;color:#ccc;min-width:0}.chord-rhythm-cell.on{color:#111;font-weight:700}.chord-steps-section{display:flex;flex-direction:column;gap:2px}.chord-steps-header,.chord-steps-row{display:flex;align-items:center;gap:0}.chord-steps-label-spacer,.chord-steps-label{min-width:38px;font-size:11px;color:#888;flex-shrink:0}.chord-step-header-cell{font-size:10px;text-align:center;color:#bbb;width:calc((100vw - 110px)/16);max-width:44px;flex-shrink:0}.chord-step-header-cell.beat{color:#555;font-weight:600}.chord-steps-cells{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex:1;position:relative;min-height:30px;padding:0;border-bottom:1px solid #ececec;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#b5b5b5 calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc((100% / var(--timeline-columns)) - 1px),#e1e1e1 calc(100% / var(--timeline-columns))),#fff}.chord-steps-cells::-webkit-scrollbar{display:none}.chord-step-btn{min-width:calc((100vw - 110px)/16);max-width:44px;height:44px;font-size:9px;font-weight:700;line-height:1.2;border:1.5px solid #e0e0e0;border-radius:4px;background:#f8f8f8;color:#aaa;cursor:pointer;flex-shrink:0;touch-action:manipulation;padding:0 1px}.chord-step-btn:active{opacity:.7}.chord-step-btn.on{background:#1a1a1a;color:#fff;border-color:#111}.chord-section-header{display:flex;align-items:center;gap:6px;margin-bottom:4px}.chord-div-arrow{width:26px;height:26px;font-size:10px;border:1px solid #ccc;border-radius:4px;background:#fff;cursor:pointer;touch-action:manipulation;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0}.chord-div-arrow:disabled{opacity:.25;pointer-events:none}.chord-div-arrow:not(:disabled):active{opacity:.7}.chord-zone-div{width:6px;align-self:stretch;background:#bbb;border-radius:3px;flex-shrink:0;cursor:pointer;touch-action:manipulation;transition:background .1s}.chord-zone-div.selected{background:#333}.chord-zone-div:active{opacity:.7}.chord-div-delete:not(:disabled){color:#c00}.chord-div-delete:not(:disabled):active{background:#fff0f0}.chord-range-guide{font-size:9px;color:#bbb;text-align:center;padding:3px 0 0;letter-spacing:.03em}.chord-range-row{display:flex;align-items:stretch;padding:2px 0}.chord-range-zone{display:flex;flex-direction:column;min-width:0}.chord-zone-label{font-size:10px;font-weight:700;height:16px;display:flex;align-items:flex-end;padding-left:2px;letter-spacing:.04em;white-space:nowrap;overflow:visible;color:#ccc}.chord-zone-dots{display:flex;flex:1;min-width:0}.chord-dot-btn{flex:1;min-width:0;max-width:none;height:36px;font-size:20px;line-height:1;border:none;background:transparent;color:#ddd;cursor:pointer;touch-action:manipulation;display:flex;align-items:center;justify-content:center;padding:0}.chord-dot-btn:active{opacity:.6}.chord-dot-sep{width:2px;height:36px;flex-shrink:0;cursor:col-resize;touch-action:manipulation;border-radius:2px;transition:background .1s}.chord-dot-sep:hover{background:#0000000f}.chord-dot-sep:active{background:#0000001f}.chord-drum-check{width:16px;height:16px;flex-shrink:0;cursor:pointer;accent-color:#111}.chord-rhythm-row{cursor:default}.chord-sync-all-btn{align-self:flex-end;height:28px;padding:0 14px;font-size:11px;border:1px solid #ccc;border-radius:4px;background:#fff;color:#333;cursor:pointer;touch-action:manipulation;margin-top:2px}.chord-sync-all-btn:active{opacity:.7}.chord-quick-bar{display:flex;gap:5px;flex-wrap:wrap;padding:2px 0}.chord-quick-btn{height:32px;padding:0 10px;font-size:11px;border:1px solid #ccc;border-radius:4px;background:#fff;color:#333;cursor:pointer;touch-action:manipulation}.chord-quick-btn:active{opacity:.7}.chord-quick-btn.danger{border-color:#e0a0a0;color:#c00}.chord-progress-cell{min-width:0;min-height:58px;border:1.5px solid #d9d9d9;border-radius:10px;background:#fff;color:#444;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:8px 7px;text-align:left;touch-action:manipulation}.chord-progress-grid-embedded{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid #d9dfe8;border-bottom:0;border-radius:10px 10px 0 0;overflow:hidden;background:#fff}.chord-progress-grid-embedded .chord-progress-cell{min-height:42px;padding:6px 7px;border:0;border-right:1px solid #d9dfe8;border-radius:0;justify-content:flex-start;gap:2px}.chord-progress-grid-embedded .chord-progress-cell:last-child{border-right:0}.chord-progress-cell.on{background:color-mix(in srgb,var(--chord-accent, #111) 12%,white);border-color:var(--chord-accent, #111)}.chord-progress-cell.detail-open{box-shadow:0 0 0 2px color-mix(in srgb,var(--chord-accent, #111) 28%,white)}.chord-progress-cell.is-customized{position:relative}.chord-progress-beat{font-size:10px;color:#8b8b8b;font-weight:700}.chord-progress-name{font-size:11px;font-weight:800;color:#222}.chord-progress-badge{align-self:flex-end;padding:2px 6px;border-radius:999px;background:#111827;color:#fff;font-size:9px;font-weight:700;letter-spacing:.04em}.chord-rhythm-details{border:1px solid #e5e5e5;border-radius:8px;background:#fff;overflow:hidden}.chord-rhythm-summary{cursor:pointer;font-size:11px;font-weight:700;color:#666;padding:6px 9px;border:1px solid #e5e5e5;border-radius:8px;background:#fff;text-align:left}.chord-rhythm-ref{border-top:1px solid #ececec;border-radius:0;background:#fafafa}.chord-drum-sheet-overlay{position:fixed;inset:0;z-index:220;background:#00000047;display:flex;align-items:flex-end;justify-content:center}.chord-drum-sheet{width:min(100%,520px);max-height:min(72vh,560px);background:#fff;border-radius:16px 16px 0 0;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:8px;box-shadow:0 -8px 24px #0000002e}.chord-drum-sheet-handle{width:40px;height:4px;border-radius:999px;background:#d4d4d4;margin:0 auto}.chord-drum-sheet-title{font-size:13px;font-weight:800;color:#222}.chord-drum-sheet-desc{font-size:10px;line-height:1.35;color:#6b7280}.chord-drum-sheet-list{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding-right:2px}.chord-drum-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.chord-detail-sheet-overlay{position:fixed;inset:0;z-index:221;background:#00000052;display:flex;align-items:flex-end;justify-content:center}.chord-detail-sheet{width:min(100%,520px);max-height:min(78vh,640px);background:linear-gradient(180deg,#fffffffa,#f6f6f6fa);border-radius:28px 28px 0 0;padding:12px 16px calc(16px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:12px;box-shadow:0 -18px 48px #0f172a38}.chord-detail-sheet-handle{width:52px;height:5px;border-radius:999px;background:#73737347;margin:0 auto}.chord-detail-sheet-desc{font-size:11px;line-height:1.35;color:#666}.chord-detail-harmony-controls{display:flex;flex-direction:column;gap:10px}.chord-detail-harmony-row{align-items:stretch}.chord-detail-select-row{display:flex;align-items:flex-end;gap:10px;min-width:0}.chord-detail-select-field{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.chord-detail-select{min-width:0;width:100%}.chord-detail-oct-row{flex:0 0 112px}.chord-detail-oct-ctrl{display:flex;align-items:center;gap:6px;justify-content:space-between;min-height:34px}.chord-detail-oct-value{min-width:40px;text-align:center;font-size:11px;line-height:1;font-weight:700;color:#475569;letter-spacing:.04em;white-space:nowrap}.chord-detail-note-summary{display:flex;flex-direction:column;gap:4px}.chord-detail-note-summary-label{font-size:11px;color:#666;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.chord-detail-note-summary-value{color:#444;font-size:14px;font-weight:700}.chord-detail-keyboard{min-height:0;display:flex;flex-direction:column;gap:10px}.chord-detail-keyboard-shell{--chord-detail-white-key-width: 56px;--chord-detail-white-key-step: 54px;--chord-detail-black-key-width: 34px;min-height:0;display:flex;flex-direction:column;gap:10px;padding:14px 12px 12px;border-radius:24px;background:linear-gradient(180deg,#fffffff5,#f5f5f5f5);box-shadow:inset 0 1px #fffc,0 16px 32px #0f172a14}.chord-detail-keyboard-guide{font-size:11px;font-weight:700;color:#666}.chord-detail-keyboard-viewport{min-height:0;overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;touch-action:pan-x;-webkit-overflow-scrolling:touch;scrollbar-width:none}.chord-detail-keyboard-viewport::-webkit-scrollbar{display:none}.chord-detail-piano-stage{position:relative;width:max-content;height:168px}.chord-detail-white-row{display:flex;align-items:stretch;height:100%}.chord-detail-octave-white-run{display:flex;align-items:stretch}.chord-detail-black-row{position:absolute;inset:0 auto auto 0;display:flex;align-items:flex-start;height:100%;width:max-content;pointer-events:none}.chord-detail-octave-black-run{position:relative;width:calc(var(--chord-detail-white-key-width, 56px) + (var(--chord-detail-white-key-step, 54px) * 6));height:100%}.chord-detail-key{border:2px solid #253042;border-radius:0 0 4px 4px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;text-align:center;padding:0 4px 14px;font-size:10px;font-weight:700;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease,color .12s ease}.chord-detail-key.white-key{position:relative;width:var(--chord-detail-white-key-width, 56px);min-width:var(--chord-detail-white-key-width, 56px);height:100%;margin-left:calc(var(--chord-detail-white-key-step, 54px) - var(--chord-detail-white-key-width, 56px));background:linear-gradient(180deg,#fff,#f8fafc);color:#5b6677;box-shadow:inset 0 -10px 20px #94a3b81f}.chord-detail-key.white-key:after{content:none}.chord-detail-key.white-key:first-child{margin-left:0}.chord-detail-key.black-key{position:absolute;top:0;z-index:3;width:var(--chord-detail-black-key-width, 34px);height:64%;background:linear-gradient(180deg,#071634,#0b1730);border-color:#071634;color:#f8fafc;box-shadow:0 12px 24px #0f172a2e;pointer-events:auto;transform:translate(-50%);border-radius:0;padding-bottom:8px}.chord-detail-key.is-active{border-color:#2563eb;box-shadow:0 0 0 3px #3b82f629}.chord-detail-key.white-key.is-active{background:linear-gradient(180deg,#7bb3ff,#3b82f6);color:#eff6ff}.chord-detail-key.black-key.is-active{background:linear-gradient(180deg,#214ea1,#1d4ed8);color:#eff6ff}.chord-detail-key-label{min-width:0;font-weight:800;letter-spacing:.01em;font-size:11px;line-height:1;pointer-events:none}.chord-detail-sheet-actions{display:flex;justify-content:flex-end;gap:8px}@media(max-width:520px){.chord-detail-select-row{align-items:stretch}.chord-detail-oct-row{flex-basis:120px}}.chord-timing-grid{margin-top:2px;min-height:132px;border:1px solid #e5e5e5;border-radius:8px;background:repeating-linear-gradient(to right,transparent 0,transparent calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#c6d0df calc((100% / (var(--timeline-columns) / var(--timeline-major, 4))) - 1px),#c6d0df calc(100% / (var(--timeline-columns) / var(--timeline-major, 4)))),repeating-linear-gradient(to right,transparent 0,transparent calc((100% / var(--timeline-columns)) - 1px),#e3e8ef calc((100% / var(--timeline-columns)) - 1px),#e3e8ef calc(100% / var(--timeline-columns))),#fff}.chord-sequencer-timing .chord-timing-grid{margin-top:0;height:132px;min-height:132px;flex:0 0 132px;border-radius:0 0 10px 10px}.chord-sequencer-actions .chord-rhythm-summary{width:100%;margin-top:0}.measure-slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;position:relative;z-index:1;background-color:#e0e0e0;background-image:linear-gradient(#111,#111);background-size:0% 100%;background-repeat:no-repeat;border-radius:3px;outline:none;margin:0;display:block}.measure-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;background:#111;cursor:pointer;box-shadow:0 1px 4px #0000004d;margin-top:-8px}.measure-slider::-moz-range-thumb{width:22px;height:22px;border:none;border-radius:50%;background:#111;cursor:pointer;box-shadow:0 1px 4px #0000004d}.main{flex:1;overflow:hidden;display:flex;flex-direction:column;padding:8px 12px}#trackEditor{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}#trackEditor.melodic-track-editor,#trackEditor.drum-track-editor,#trackEditor.chord-track-editor{margin-inline:-12px}#trackEditor.melodic-track-editor .editor-header{padding-inline:12px}#trackEditor.melodic-track-editor .melody-editor-header{padding-inline:0}#trackEditor.melodic-track-editor .oct-section{border-left:0;border-right:0;border-radius:0}#trackEditor.melodic-track-editor .piano-keys{border-right-width:1px}#trackEditor.melodic-track-editor .piano-key{padding-right:3px;font-size:8px}#trackEditor.melodic-track-editor .piano-key.white-key{width:28px}#trackEditor.melodic-track-editor .piano-key.black-key{width:21px}#trackEditor.melodic-track-editor .melodic-editor{border-left:0;border-right:0;border-radius:0;margin-right:8px}.melodic-editor{flex:1;display:flex;flex-direction:row;overflow:hidden;min-height:0}.drum-track-editor .steps-grid-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.drum-track-editor .piano-keys{flex-shrink:0}.chord-panel-body{flex:1;display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain;min-height:0}.oct-accordion{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.oct-section{display:flex;flex-direction:column;min-height:0}.oct-section.open{flex:1}.oct-section.open .oct-section-body{display:flex;flex:1;flex-direction:column;overflow:hidden;min-height:0}.measure-seek{flex-shrink:0;padding:4px 0 0}.preview-card{position:relative;background:#fff;border:1px solid #e0e0e0;border-radius:8px;overflow:visible;flex-shrink:0;padding-left:10px;padding-right:10px;--preview-repeat-rail-overhang: 0px;--preview-repeat-rail-bg: #bfdbfe;--preview-repeat-rail-color: #1d4ed8}.preview-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:6px 12px;color:#fff;background:#111;cursor:pointer;touch-action:manipulation;letter-spacing:.04em}.measure-ctrl{display:flex;align-items:center;gap:3px;flex-shrink:0;border:1.5px solid #ddd;border-radius:6px;padding:4px 6px;background:#fafafa}.ctrl-title{font-size:9px;color:#999;font-weight:700;margin-right:2px;white-space:nowrap}.measure-btn{width:28px;height:auto;min-height:28px;border:1px solid #ccc;background:#fff;border-radius:4px;font-size:12px;cursor:pointer;touch-action:manipulation;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;padding:3px 0}.btn-guide{display:block;font-size:7px;line-height:1;color:#999;font-weight:400;margin-top:1px}.measure-btn:disabled{opacity:.25;cursor:default}.measure-btn:not(:disabled):active{background:#f0f0f0}.measure-add{color:#2e7d32;font-weight:700;margin-left:4px}.measure-remove{color:#c00;font-weight:700}.measure-label{font-size:11px;color:#888;font-weight:700;letter-spacing:.04em;white-space:nowrap;min-width:32px;text-align:center}:root{--seek-collapsed-height: 92px;--seek-expanded-height: 190px;--seek-card-padding-x: 20px;--seek-shell-side-gap: 8px;--seek-shell-bottom-gap: 8px;--seek-handle-width: 28px;--seek-handle-height: 4px;--seek-overlay-space: calc(var(--seek-collapsed-height) + var(--seek-shell-bottom-gap))}#trackEditor{position:relative}#trackEditor:has(.measure-seek-card.is-expanded){--seek-overlay-space: calc(var(--seek-expanded-height) + var(--seek-shell-bottom-gap))}.measure-seek-shell{position:absolute;z-index:20;right:0;bottom:0;left:0;display:flex;flex-direction:column;gap:2px;padding:8px var(--seek-shell-side-gap) var(--seek-shell-bottom-gap);background:transparent;pointer-events:none}#trackEditor>.measure-seek-shell{width:100%;margin-inline:0;box-sizing:border-box}#trackEditor.melodic-track-editor>.measure-seek-shell{width:100%;margin-inline:0;padding-inline:20px}.measure-seek-card{pointer-events:auto}.melodic-track-editor .continuous-roll .melody-roll-content,.drum-track-editor .drum-editor .drum-roll-content{padding-bottom:calc(var(--seek-overlay-space) + var(--safe-bottom))}.melodic-track-editor .continuous-roll .melody-roll-scroll,.drum-track-editor .drum-editor .steps-grid-scroll,.preview-editor .preview-wrap{scroll-padding-bottom:calc(var(--seek-overlay-space) + var(--safe-bottom));overscroll-behavior:contain}.preview-editor .preview-wrap{padding-bottom:0}.preview-editor .preview-bottom-spacer{flex:0 0 calc((var(--seek-overlay-space) * 3) + var(--safe-bottom));min-height:calc((var(--seek-overlay-space) * 3) + var(--safe-bottom));pointer-events:none}.drum-track-editor .drum-add-panel{margin-bottom:calc(var(--seek-overlay-space) + var(--safe-bottom))}.measure-seek-card{position:relative;display:flex;flex-direction:column;gap:0;height:calc(var(--seek-collapsed-height) + var(--safe-bottom));min-height:calc(var(--seek-collapsed-height) + var(--safe-bottom));padding:8px var(--seek-card-padding-x) var(--safe-bottom);border-radius:24px;background:#fff;border:1px solid #e7ebf2;box-shadow:0 8px 24px #0f172a1f;transition:height .22s ease,min-height .22s ease,border-radius .22s ease}.measure-seek-card.is-expanded{height:calc(var(--seek-expanded-height) + var(--safe-bottom));min-height:calc(var(--seek-expanded-height) + var(--safe-bottom));border-radius:24px}.measure-seek-handle{position:relative;width:100%;height:20px;min-height:20px;margin:-4px 0 0;padding:0;border:0;background:transparent;cursor:pointer;touch-action:pan-y;outline:none}.measure-seek-handle:before{content:"";position:absolute;top:8px;left:50%;width:var(--seek-handle-width);height:var(--seek-handle-height);border-radius:999px;background:#d7d7d7;transform:translate(-50%)}.measure-seek-handle:focus-visible:before{box-shadow:0 0 0 3px #3b82f63d}.measure-seek-label{font-size:12px;color:#555;font-weight:700;letter-spacing:.05em;white-space:nowrap;line-height:1.2}.measure-seek-compact-label{position:absolute;top:10px;left:16px;color:#777;font-size:10px;font-weight:700;line-height:1;letter-spacing:.02em;white-space:nowrap;pointer-events:none}.measure-seek-card.is-expanded .measure-range-meta{display:none}.measure-seek-card.is-expanded .measure-range-editor{min-height:44px;gap:0}.measure-seek-card.is-expanded .measure-seek.transport-row{flex:0 0 56px;min-height:56px}.measure-seek-card.is-expanded .measure-seek.action-row{flex:0 0 44px;min-height:44px;margin-top:0}.measure-seek{display:flex;align-items:center;gap:6px}.measure-seek.transport-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:32px;min-height:64px;padding:0;flex:1}.measure-preview-highlight{display:none}.mb-btn{width:44px;height:44px;border:0;background:transparent;border-radius:12px;font-size:16px;font-weight:700;color:#333;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;touch-action:manipulation}.mb-btn:disabled{opacity:.25;cursor:default}.mb-btn:not(:disabled):active{opacity:.72}.mb-nav-btn{width:44px;height:44px;font-size:0;font-weight:500;line-height:1;white-space:nowrap}.mb-nav-icon{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;gap:2px;flex:0 0 auto;line-height:1}.mb-nav-icon-bar{width:2px;height:22px;border-radius:999px;background:currentColor;flex:0 0 auto}.mb-nav-icon-triangle{width:0;height:0;flex:0 0 auto}.mb-nav-icon.prev .mb-nav-icon-triangle{border-top:9px solid transparent;border-bottom:9px solid transparent;border-right:14px solid currentColor}.mb-nav-icon.next .mb-nav-icon-triangle{border-top:9px solid transparent;border-bottom:9px solid transparent;border-left:14px solid currentColor}.mb-play-btn{justify-self:center;width:56px;height:56px;border-radius:12px;border:0;font-size:32px;color:#111;background:transparent;box-shadow:none;transition:transform .15s ease-out}.mb-play-btn.is-playing{border:0;color:#111;background:transparent}.mb-play-btn:not(:disabled):active{transform:scale(.95)}.measure-range-editor{display:flex;flex-direction:column;gap:8px;min-height:72px}.measure-seek-card:not(.is-expanded) .measure-range-editor,.measure-seek-card:not(.is-expanded) .measure-seek.action-row{display:none}.measure-range-rail{position:relative;height:44px;overflow:visible}.measure-range-track{position:absolute;left:0;right:0;top:12px;height:24px;border-radius:4px;background:#f0f0f0;pointer-events:none}.measure-range-highlight{position:absolute;left:var(--measure-range-left, 0%);width:var(--measure-range-width, 0%);top:12px;height:24px;border-radius:4px;background:#3b82f640;box-shadow:inset 0 0 0 1px #3b82f624;pointer-events:none}.measure-range-highlight:before,.measure-range-highlight:after{content:"";position:absolute;top:0;width:4px;height:24px;background:#3b82f6}.measure-range-highlight:before{left:0;border-radius:4px 0 0 4px}.measure-range-highlight:after{right:0;border-radius:0 4px 4px 0}.measure-copy-range-highlight{position:absolute;left:var(--measure-copy-range-left, 0%);width:var(--measure-copy-range-width, 0%);top:12px;height:24px;border-radius:4px;background:#ef444442;box-shadow:inset 0 0 0 1px #dc262652;pointer-events:none;z-index:2}.measure-copy-range-highlight:before,.measure-copy-range-highlight:after{content:"";position:absolute;top:0;width:4px;height:24px;background:#ef4444}.measure-copy-range-highlight:before{left:0;border-radius:4px 0 0 4px}.measure-copy-range-highlight:after{right:0;border-radius:0 4px 4px 0}.measure-point-marker{position:absolute;top:2px;width:44px;height:44px;margin-left:-22px;display:flex;flex-direction:row;justify-content:center;align-items:center;z-index:4;cursor:grab;touch-action:none}.measure-point-marker.start,.measure-point-marker.end{color:#2563eb}.measure-point-label{display:flex;align-items:center;justify-content:center;width:14px;height:24px;border-radius:4px;background:#2563eb;position:relative;overflow:hidden}.measure-repeat-symbol{display:inline-flex;align-items:center;justify-content:center;gap:1px;width:12px;height:20px}.measure-repeat-symbol.start{flex-direction:row-reverse}.measure-repeat-symbol.end{flex-direction:row}.measure-repeat-bars{display:inline-flex;align-items:stretch;gap:1px;height:20px}.measure-repeat-bars span{width:1px;height:20px;border-radius:1px;background:#fff}.measure-repeat-dots{display:inline-flex;flex-direction:column;justify-content:center;gap:4px;height:20px}.measure-repeat-dots span{width:2px;height:2px;border-radius:999px;background:#fff}.measure-point-stem{display:none}.measure-current-marker{position:absolute;top:8px;bottom:0;left:var(--measure-current-left, 0%);width:44px;margin-left:-22px;background:transparent;z-index:5;pointer-events:auto;touch-action:none}.measure-current-marker:before{display:none}.measure-current-marker:after{content:"";position:absolute;top:0;bottom:0;left:50%;width:5px;margin-left:-2.5px;border-radius:3px;background:#ef4444}.measure-range-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:20px;padding-top:0}.measure-seek.action-row{justify-content:space-between;align-items:center;min-height:44px;padding-bottom:0;margin-top:auto}.seek-measure-actions{width:100%;padding:0;gap:0;border:0;border-radius:0;background:transparent;box-shadow:none;flex-shrink:0;display:flex;justify-content:space-between;align-items:center}.seek-measure-actions .measure-actions-label{display:none}.seek-measure-actions .measure-action-btn{width:auto;min-width:32px;height:32px;border-radius:8px;font-size:13px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center}.seek-measure-actions .measure-action-btn.add{gap:4px;color:#3b82f6;background:#3b82f614;border:0;font-weight:500}.seek-measure-actions .measure-action-btn.more{width:32px;min-width:32px;padding:0;border:0;background:transparent;color:#999;font-size:18px}.measure-action-icon{font-size:14px;line-height:1}.measure-action-text{line-height:1}.measure-range-dividers{position:absolute;inset:12px 0 8px;display:grid;pointer-events:none}.measure-range-divider{border-right:1px solid #e0e0e0}.measure-range-divider:last-child{border-right:0}.measure-drag-tooltip{position:absolute;top:-8px;transform:translate(-50%,-100%);padding:4px 8px;border-radius:4px;background:#1a1a1a;color:#fff;font-size:11px;line-height:1;white-space:nowrap;pointer-events:none;z-index:6}.measure-actions-sheet-overlay{position:fixed;inset:0;display:flex;align-items:flex-end;justify-content:center;background:#0f172a47;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px));z-index:320}.measure-actions-sheet{width:min(100%,360px);background:#fff;border-radius:16px;box-shadow:0 12px 30px #0f172a2e;overflow:hidden}.measure-sheet-btn{width:100%;min-height:52px;border:0;border-top:1px solid #edf1f6;background:#fff;font-size:15px;color:#333}.measure-sheet-btn:first-child{border-top:0}.measure-sheet-btn.danger{color:#ef4444}.onboarding-overlay{--onboarding-progress-steps: 5;--onboarding-progress-height: 4px;--onboarding-card-max-width: 420px;--onboarding-card-radius: 18px;--onboarding-card-padding-x: 16px;--onboarding-card-padding-top: 18px;--onboarding-card-padding-bottom: 16px;--onboarding-start-primary-height: 52px;--onboarding-section-option-height: 56px;--onboarding-guide-edge-gap: 12px;--onboarding-player-card-gap: 12px;--onboarding-guide-top-offset: calc(64px + env(safe-area-inset-top, 0px)) ;--onboarding-guide-bottom-offset: calc(116px + env(safe-area-inset-bottom, 0px)) ;--onboarding-next-bar-gap: 12px;--onboarding-next-bar-height: 44px;--onboarding-next-bar-width: 200px;--onboarding-next-bar-bottom: calc( var(--seek-shell-bottom-gap) + var(--seek-collapsed-height) + 10px );--onboarding-card-bottom-with-next: calc( var(--onboarding-next-bar-bottom) + var(--onboarding-next-bar-height) + var(--onboarding-next-bar-gap) );position:fixed;inset:0;background:#0a0a0a8f;display:flex;align-items:flex-end;justify-content:center;padding:18px 12px calc(18px + env(safe-area-inset-bottom,0px));z-index:400}.onboarding-overlay.is-guide{background:transparent;padding:0;pointer-events:none}.onboarding-overlay.is-guide.is-guide-waiting-next:not(.is-guide-has-highlight){background:#0a0a0a94}.onboarding-card{position:relative;z-index:402;box-sizing:border-box;width:100%;max-width:var(--onboarding-card-max-width);background:#fff;border-radius:var(--onboarding-card-radius);padding:var(--onboarding-card-padding-top) var(--onboarding-card-padding-x) var(--onboarding-card-padding-bottom);box-shadow:0 18px 40px #00000047}.onboarding-overlay.is-guide .onboarding-card{position:fixed;right:var(--onboarding-guide-edge-gap);left:var(--onboarding-guide-edge-gap);width:auto;top:auto;bottom:var(--onboarding-guide-bottom-offset);margin:0 auto;pointer-events:auto}.onboarding-overlay.is-guide.is-guide-waiting-next:not(.is-guide-chapter-choice) .onboarding-card:not(.is-guide-top):not(.is-guide-player-top):not(.is-guide-drums-anchor):not(.is-guide-sheet-top):not(.is-guide-editor-lower):not(.is-guide-avoid-target){bottom:var(--onboarding-card-bottom-with-next)}.onboarding-overlay.is-guide .onboarding-card.is-guide-top{top:var(--onboarding-guide-top-offset);bottom:auto}.onboarding-overlay.is-guide .onboarding-card.is-guide-player-top{top:auto;bottom:var(--onboarding-player-card-bottom, calc( var(--seek-expanded-height) + var(--seek-shell-bottom-gap) + var(--onboarding-player-card-gap) ))}.onboarding-overlay.is-guide .onboarding-card.is-guide-drums-anchor{top:var(--onboarding-drums-card-top, 50%);bottom:auto}.onboarding-overlay.is-guide .onboarding-card.is-guide-sheet-top{top:auto;bottom:var(--onboarding-sheet-card-bottom, 50%)}.onboarding-overlay.is-guide .onboarding-card.is-guide-editor-lower{top:var(--onboarding-editor-lower-top, 48vh);bottom:auto}.onboarding-overlay.is-guide .onboarding-card.is-guide-avoid-target{top:var(--onboarding-avoid-target-top, 12px);bottom:auto}.onboarding-next-bar{position:fixed;right:50%;bottom:var(--onboarding-next-bar-bottom);left:auto;z-index:404;box-sizing:border-box;width:min(var(--onboarding-next-bar-width),calc(100vw - var(--onboarding-guide-edge-gap) * 2));transform:translate(50%);pointer-events:auto}.onboarding-next-bar .onboarding-btn.primary{width:100%;min-height:var(--onboarding-next-bar-height);background:#f6c945;color:#111;border-color:#f6c945;box-shadow:0 8px 22px #00000047}.onboarding-shade,.onboarding-spotlight,.onboarding-range-destination,.onboarding-range-arrow{position:fixed;pointer-events:none}.onboarding-shade{z-index:400;background:#0a0a0a94}.onboarding-spotlight{z-index:401;border:3px solid #f6c945;border-radius:12px;box-shadow:0 0 0 1px #ffffff47}.onboarding-range-destination{z-index:403;width:3px;border-radius:999px;background:#f6c945;box-shadow:0 0 0 2px #1111114d;transform:translate(-50%)}.onboarding-range-destination-label{position:absolute;top:-25px;left:50%;padding:3px 7px;border-radius:999px;background:#f6c945;color:#111;font-size:11px;font-weight:800;line-height:1;white-space:nowrap;transform:translate(-50%)}.onboarding-range-destination.is-end .onboarding-range-destination-label{left:auto;right:0;transform:none}.onboarding-range-arrow{z-index:403;height:22px}.onboarding-range-arrow-line{position:absolute;top:10px;right:4px;left:4px;height:3px;border-radius:999px;background:#f6c945;box-shadow:0 0 0 2px #11111147}.onboarding-range-arrow-head{position:absolute;top:5px;right:0;width:0;height:0;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:10px solid #f6c945;filter:drop-shadow(0 0 1px rgba(17,17,17,.5))}.onboarding-range-arrow.is-left .onboarding-range-arrow-head{right:auto;left:0;border-right:10px solid #f6c945;border-left:0}.onboarding-kicker{font-size:10px;font-weight:800;letter-spacing:.14em;color:#8a8a8a;text-transform:uppercase;margin-bottom:6px}.onboarding-title{margin:0 0 14px;font-size:22px;line-height:1.2;color:#111}.onboarding-description{margin:0;font-size:13px;line-height:1.55;color:#555}.onboarding-guide-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0 0 10px;border-radius:10px;background:#f4f4f4}.onboarding-guide-icon img{width:26px;height:26px;object-fit:contain}.onboarding-progress{height:var(--onboarding-progress-height);margin:0 0 14px;border-radius:999px;background:linear-gradient(to right,#111 0 calc(var(--onboarding-progress) / var(--onboarding-progress-steps) * 100%),#e7e7e7 calc(var(--onboarding-progress) / var(--onboarding-progress-steps) * 100%) 100%)}.onboarding-overlay.is-guide .onboarding-progress{margin-bottom:10px}.onboarding-actions{display:flex;gap:8px;margin-top:14px}.onboarding-actions-split{margin-top:16px}.onboarding-start-actions{display:grid;gap:8px;margin-top:14px}.onboarding-btn.onboarding-start-primary{min-height:var(--onboarding-start-primary-height)}.onboarding-btn.onboarding-start-detail{min-height:44px;border-color:transparent}.onboarding-section-list{display:grid;gap:8px;margin-top:12px}.onboarding-section-option{display:grid;gap:3px;min-height:var(--onboarding-section-option-height);padding:10px 12px;border:1px solid #dedede;border-radius:10px;background:#fff;color:#111;text-align:left;cursor:pointer;touch-action:manipulation}.onboarding-section-label{font-size:14px;font-weight:800;line-height:1.2}.onboarding-section-desc{font-size:12px;line-height:1.35;color:#666}.onboarding-btn{flex:1;min-height:44px;border-radius:10px;border:1px solid #d7d7d7;font-size:14px;font-weight:700;cursor:pointer;touch-action:manipulation}.onboarding-btn.primary{background:#111;color:#fff;border-color:#111}.onboarding-btn.secondary{background:#fff;color:#222}.preview-wrap{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overflow-anchor:none;display:flex;flex-direction:column;gap:8px;min-height:0}.preview-help{display:flex;flex-direction:column;gap:2px;padding:10px 12px;position:relative;background:#fafafa;border:1px solid #e1e1e1;border-radius:8px}.preview-help-close{position:absolute;top:8px;right:8px;width:24px;height:24px;border:1px solid #d9d9d9;border-radius:999px;background:#fff;color:#666;font-size:16px;line-height:1}.preview-help strong{font-size:11px;font-weight:800;color:#333}.preview-help span{font-size:11px;line-height:1.45;color:#777}.preview-song-settings{display:flex;flex-direction:column;gap:8px;padding:10px 12px;background:#fff;border:1px solid #dbe2ec;border-radius:10px}.preview-song-settings strong{font-size:11px;font-weight:800;color:#333}.preview-song-settings-row{display:flex;align-items:center;gap:8px;min-width:0}.preview-song-settings-row.key-row,.preview-song-settings-row.scale-row{align-items:center}.preview-song-settings-label{flex:0 0 40px;font-size:11px;font-weight:700;color:#667085}.preview-song-select{min-width:68px;height:32px;border-radius:9px;border:1px solid #cfd8e3;background:#fff;padding:0 9px;font-size:13px;font-weight:700;color:#223047}.preview-song-root-select{min-width:68px;max-width:92px}.preview-harmony-segmented{display:inline-grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;flex:0 0 auto}.preview-harmony-btn{min-width:42px;min-height:32px;padding:0 10px;border-radius:9px;border:1px solid #d1d8e4;background:#fff;font-size:12px;font-weight:800;color:#49566a}.preview-harmony-btn.selected{background:#111;border-color:#111;color:#fff}.preview-song-family-select{flex:0 1 178px;min-width:0;max-width:178px;padding-right:28px;font-size:12px}.preview-card{--preview-repeat-rail-width: 12px;--preview-repeat-rail-overhang: 0px;--preview-grid-side-gap: 14px;--preview-header-small-button-size: 20px;--preview-header-small-icon-size: 15px;--preview-header-icon-button-size: 30px;--preview-header-icon-glyph-size: 20px;--preview-header-checkbox-size: 20px;--preview-header-touch-size: 44px;--preview-header-controls-width: 92px;--preview-header-left-gap: 8px;--preview-header-right-gap: 8px;--preview-repeat-rail-bg: #bfdbfe;--preview-repeat-rail-color: #1d4ed8;--preview-repeat-active-bg: #76c957;--preview-repeat-active-border: #57a83f;--preview-copy-range-bg: #fee2e2;--preview-copy-range-border: #ef4444;position:relative;background:#fff;border:1px solid #e0e0e0;border-radius:8px;overflow:visible;flex-shrink:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.preview-card input,.preview-card select,.preview-card textarea{user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default}.preview-card.repeat-source{background:#fffdf3;border-color:#ead780}.preview-card.repeat-target{background:#f6fcf1;border-color:#a9ce92}.preview-card.copy-range{background:var(--preview-copy-range-bg)}.preview-card.copy-range:after{content:"";position:absolute;inset:0;border:2px solid var(--preview-copy-range-border);border-radius:8px;pointer-events:none;z-index:5}.preview-card.is-muted{opacity:.58}.preview-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:6px var(--preview-header-right-gap) 6px var(--preview-header-left-gap);color:#fff;background:#111;cursor:pointer;touch-action:manipulation;letter-spacing:.04em}.preview-card-header:active{opacity:.75}.preview-card-title{font-size:11px;font-weight:700;line-height:1.4}.preview-card-title-group{display:flex;align-items:center;gap:2px;min-width:0;min-height:var(--preview-header-icon-button-size)}.preview-track-controls{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:var(--preview-header-controls-width)}.preview-track-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:24px}.preview-track-toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--preview-header-touch-size);height:var(--preview-header-touch-size);margin:-8px 0 -8px -10px;flex:0 0 auto;cursor:pointer}.preview-track-toggle input{width:var(--preview-header-checkbox-size);height:var(--preview-header-checkbox-size);margin:0;accent-color:#1479f7}.preview-track-repeat-slot{flex:0 0 auto;min-height:var(--preview-header-icon-button-size);display:inline-flex;align-items:center;justify-content:center;gap:8px}.preview-track-volume{display:flex;align-items:center;gap:6px;width:100%}.preview-track-volume-label{flex:0 0 auto;font-size:9px;font-weight:700;white-space:nowrap}.preview-track-volume-slider{width:68px;margin:0}.preview-track-repeat-btn{width:var(--preview-header-small-button-size);height:var(--preview-header-small-button-size);padding:0;border:1px solid #d8dee8;border-radius:8px;background:#fff;font-weight:800;color:#111;display:inline-flex;align-items:center;justify-content:center;line-height:1;box-shadow:0 1px 2px #0f172a14;cursor:pointer;touch-action:manipulation}.preview-card-header,.preview-card-title,.preview-card-actions,.preview-card-action-btn,.preview-track-controls,.preview-track-toggle-row,.preview-track-toggle,.preview-track-repeat-slot,.preview-track-volume,.preview-track-volume-label,.preview-range-picker,.preview-range-title,.preview-range-status,.preview-range-current,.preview-paste-confirm,.preview-paste-title{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.preview-track-tone-btn{width:var(--preview-header-small-button-size);height:var(--preview-header-small-button-size);padding:0;border:1px solid #d8dee8;border-radius:8px;background:#fff;font-size:var(--preview-header-small-icon-size);font-weight:800;color:#111;display:inline-flex;align-items:center;justify-content:center;line-height:.8;box-shadow:0 1px 2px #0f172a14;cursor:pointer;touch-action:manipulation}.preview-track-tone-btn:active,.preview-track-repeat-btn:active{opacity:.82}.preview-track-repeat-btn.active{background:var(--preview-repeat-active-bg);border-color:var(--preview-repeat-active-border);color:#111}.preview-track-repeat-btn:disabled{opacity:.35}.preview-track-repeat-icon{width:var(--preview-header-small-icon-size);height:var(--preview-header-small-icon-size);display:block;object-fit:contain}.preview-repeat-rail{position:absolute;top:0;bottom:0;width:var(--preview-repeat-rail-width);border:0;background:var(--preview-repeat-rail-bg);color:var(--preview-repeat-rail-color);font-size:10px;font-weight:900;display:flex;align-items:center;justify-content:center;z-index:2}.preview-repeat-rail.start{left:calc(var(--preview-repeat-rail-overhang) * -1);border-radius:8px 0 0 8px}.preview-repeat-rail.end{right:calc(var(--preview-repeat-rail-overhang) * -1);border-radius:0 8px 8px 0}.preview-repeat-rail.active{color:#5c4b00}.preview-repeat-rail.start.active,.preview-repeat-rail.end.active{background:#fbec9a}.preview-card-actions{display:flex;flex-direction:column;gap:8px;min-width:0;margin:8px 8px 0;padding:10px;background:#fffffffa;border:1px solid #d8dee8;border-radius:12px;box-shadow:0 10px 28px #0f172a2e}.preview-card-action-row,.preview-range-controls{display:grid;align-items:center;gap:6px}.preview-card-action-row{grid-template-columns:minmax(0,1fr)}.preview-range-controls{grid-template-columns:minmax(0,1fr) 72px}.preview-card-action-btn{min-height:34px;padding:0 10px;border:1px solid #d6dce6;border-radius:10px;background:#fff;font-size:12px;font-weight:700;color:#223047;width:100%;white-space:nowrap}.preview-card-action-btn:disabled{opacity:.35}.preview-card-action-btn.confirm{background:#111;border-color:#111;color:#fff}.preview-card-action-btn.compact{min-width:40px;padding:0 8px}.preview-tone-sheet-overlay{position:fixed;inset:0;z-index:240;background:#00000052;display:flex;align-items:flex-end;justify-content:center}.preview-tone-sheet{width:min(100%,520px);max-height:min(78vh,620px);background:#fff;border-radius:18px 18px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:10px;box-shadow:0 -10px 28px #0000002e}.preview-tone-sheet-handle{width:42px;height:4px;border-radius:999px;background:#d4d4d4;margin:0 auto}.preview-tone-sheet-title{font-size:14px;font-weight:800;color:#1b1b1b}.preview-tone-sheet-desc{font-size:11px;line-height:1.45;color:#667085}.preview-tone-sheet-list{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding-right:2px}.preview-tone-control{display:flex;flex-direction:column;gap:6px;padding:10px 10px 8px;border:1px solid #e6e8ee;border-radius:12px;background:#fafbfe}.preview-tone-graph{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid #e6e8ee;border-radius:14px;background:#f8fafc}.preview-tone-graph-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.preview-tone-graph-title{font-size:12px;font-weight:800;color:#202939}.preview-tone-graph-legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.preview-tone-band-chip{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 8px;border-radius:999px;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums;background:#fff;border:1px solid #dbe3f0;color:#314158}.preview-tone-band-chip.low{border-color:#bed1ff}.preview-tone-band-chip.mid{border-color:#bde8d7}.preview-tone-band-chip.high{border-color:#ffd8b5}.preview-tone-band-chip-label{letter-spacing:.03em}.preview-tone-band-chip-value{color:#55637a}.preview-tone-graph-svg-wrap{width:100%}.preview-tone-graph-svg{display:block;width:100%;height:auto;touch-action:none}.preview-tone-graph-bg{fill:#fff;stroke:#dbe3f0;stroke-width:1}.preview-tone-grid-line{stroke:#d9e2ee;stroke-width:1}.preview-tone-grid-line.vertical{stroke-dasharray:2 3}.preview-tone-grid-line.zero{stroke:#9db2d2}.preview-tone-axis-label{fill:#708097;font-size:9px;font-weight:700}.preview-tone-curve{fill:none;stroke:#202939;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.preview-tone-handle-focus{fill:#2f6fed1f}.preview-tone-band.mid .preview-tone-handle-focus{fill:#05966924}.preview-tone-band.high .preview-tone-handle-focus{fill:#ef6c0024}.preview-tone-handle-hit{fill:transparent;cursor:grab}.preview-tone-handle{fill:#fff;stroke:#2f6fed;stroke-width:2}.preview-tone-band.mid .preview-tone-handle{stroke:#059669}.preview-tone-band.high .preview-tone-handle{stroke:#ef6c00}.preview-tone-point-label{fill:#334155;font-size:9px;font-weight:800;pointer-events:none}.preview-tone-control-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.preview-tone-control-label{font-size:12px;font-weight:800;color:#202939}.preview-tone-control-value{font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;color:#475467}.preview-tone-control-slider{width:100%;margin:0}.preview-tone-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.preview-tone-sheet-btn{min-width:84px;padding:10px 14px;border-radius:999px;border:1px solid #d7deea;font-size:12px;font-weight:800}.preview-tone-sheet-btn.secondary{background:#fff;color:#475467}.preview-tone-sheet-btn.primary{background:#111827;border-color:#111827;color:#fff}.preview-range-picker{display:flex;flex-direction:column;gap:8px;padding:2px 0 0}.preview-range-title{font-size:12px;font-weight:800;color:#223047}.preview-range-status{font-size:18px;font-weight:800;color:#111827}.preview-range-current{font-size:12px;font-weight:700;color:#2563eb}.preview-paste-confirm{display:flex;flex-direction:column;gap:8px}.preview-paste-title{font-size:12px;font-weight:800;color:#223047}.preview-paste-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.preview-repeat-status{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0;padding:0 2px}.preview-repeat-chip{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.03em}.preview-repeat-chip.step,.preview-repeat-chip.range{color:#9a6700;background:#fff6c8}.preview-grid{display:flex;flex-direction:column;gap:4px;padding:6px var(--preview-grid-side-gap);background:#fafafa;border-radius:0 0 8px 8px}.preview-grid.repeat-source{background:#fff8d2}.preview-grid.repeat-target{background:#eaf7e0}.preview-grid.copy-range{background:var(--preview-copy-range-bg)}.preview-row-track{position:relative;display:grid;grid-template-columns:repeat(48,minmax(0,1fr));gap:1px}.preview-row-track.melody-summary{min-height:6px}.preview-chord-zone-grid{display:grid;gap:1px}.preview-cell{aspect-ratio:1;max-height:6px;border-radius:1px;background:#e8e8e8}.preview-cell.on{background:#333}.preview-row-track.melody-summary .preview-cell{max-height:6px;background:#e6ecf7}.preview-row-track.melody-summary .preview-cell.is-density-1{background:#8fb6ff}.preview-row-track.melody-summary .preview-cell.is-density-2{background:#4f8dff}.preview-row-track.melody-summary .preview-cell.is-density-3{background:#1d4ed8}.preview-cell.beat-start{box-shadow:inset 1px 0 #b5b5b5}.preview-cell.beat-end{margin-right:1px}.preview-cell.playing{outline:2px solid #f5c518;outline-offset:-1px;z-index:1;position:relative}.preview-note-bar{position:absolute;top:0;bottom:0;border-radius:2px;z-index:2;pointer-events:none}.preview-note-bar.rhythm{background:#111111c7;border:1px solid rgba(17,17,17,.88)}.preview-note-bar.melody{background:#2563ebc7;border:1px solid rgba(29,78,216,.9)}.preview-note-bar.chord{background:#5a5a5ac7;border:1px solid rgba(70,70,70,.9)}.preview-chord-label{font-size:9px;font-weight:700;text-align:center;padding:2px 0;color:#fff;border-radius:2px;line-height:1.2;white-space:nowrap;overflow:hidden}.duration-toolbar{display:flex;flex-direction:column;gap:6px;padding:8px 12px;align-items:stretch;scrollbar-width:none}.duration-toolbar::-webkit-scrollbar{display:none}.duration-mode-row,.duration-value-row{display:flex;align-items:center;gap:6px;min-width:0}.duration-row-label{flex:0 0 auto;font-size:10px;font-weight:800;letter-spacing:.08em;color:#7a7a7a;min-width:34px}.grid-mode-tabs{display:inline-flex;gap:4px;margin-right:0;flex:0 0 auto}.duration-value-buttons{display:inline-flex;gap:4px;overflow-x:auto;scrollbar-width:none;min-width:0}.duration-value-buttons::-webkit-scrollbar{display:none}.grid-mode-tab{min-width:56px;height:36px;border:1px solid #ccc;border-radius:6px;background:#f5f5f5;color:#444;font-size:12px;font-weight:700;cursor:pointer}.grid-mode-tab.selected{background:#111;color:#fff;border-color:#111}.dur-btn{min-width:48px;height:40px;border:1px solid #ccc;border-radius:6px;background:#fff;font-size:13px;cursor:pointer;touch-action:manipulation;transition:background .15s,color .15s;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:0;padding:0 5px;flex:0 0 auto}.dur-btn.selected{background:#111;color:#fff;border-color:#111}.dur-btn.dotted{margin-left:2px}.dur-btn:disabled{opacity:.3;cursor:default}.dur-btn:active:not(:disabled){transform:scale(.95)}.dur-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px}.dur-icon{display:inline-flex;align-items:center;justify-content:center;position:relative;min-width:18px;min-height:18px}.note-svg-icon{width:26px;height:26px;object-fit:contain;display:block}.note-svg-icon.whole-note-icon{width:18px;height:18px}.dur-btn.selected .note-svg-icon{filter:invert(1)}.dur-badge{position:absolute;right:-7px;top:1px;font-size:9px;font-weight:800;line-height:1}.editor-header .grid-mode-tabs{margin-right:auto}.save-error-notice{--save-error-max-width: 420px;--save-error-side-gap: 16px;--save-error-bottom-gap: 16px;--save-error-action-height: 44px;position:fixed;z-index:500;left:50%;bottom:calc(var(--save-error-bottom-gap) + var(--safe-bottom));transform:translate(-50%);width:min(var(--save-error-max-width),calc(100% - (var(--save-error-side-gap) * 2)));padding:14px;border:1px solid #ffb3b3;border-radius:12px;background:#fff;color:#2b1111;box-shadow:0 8px 28px #0000003d}.save-error-notice-heading{min-height:28px;display:flex;align-items:center;justify-content:space-between;gap:12px}.save-error-notice-heading strong{font-size:15px}.save-error-notice-close{width:44px;height:44px;margin:-8px -8px -8px 0;border:0;background:transparent;color:#666;font-size:22px;cursor:pointer;touch-action:manipulation}.save-error-notice p{margin:6px 0 12px;color:#624343;font-size:13px;line-height:1.45}.save-error-notice-export{width:100%;min-height:var(--save-error-action-height);border:0;border-radius:8px;background:#111;color:#fff;font-size:14px;font-weight:700;cursor:pointer;touch-action:manipulation}.save-error-notice-export:active{opacity:.75}
