/* Living Score. Only Timeline and its owned native top-layer surfaces. */
.timeline,.tl-overlay {
  --tl-bg:#08090b;--tl-surface:#111318;--tl-raised:#191c21;--tl-hover:#24282f;
  --tl-line:#343840;--tl-edge:#66707b;--tl-text:#f0f1ed;--tl-secondary:#b8bdc6;
  --tl-accent:#cefa75;--tl-accent-ink:#151b0c;--tl-selected:#252d1b;
  --tl-warning:#f5c57b;--tl-danger:#ff9cad;--tl-danger-surface:#351a24;
  --tl-font:'Space Grotesk','Helvetica Neue',sans-serif;--tl-numeric-font:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-family:var(--tl-font);font-size:14px;color:var(--tl-text);color-scheme:dark;
  accent-color:var(--tl-accent);caret-color:var(--tl-accent);
}
.timeline {--tl-ledger:184px;--tl-row:44px;--tl-head:104px;--tl-section:28px;--tl-loop:28px;--tl-ruler:28px;--tl-strip:20px;container-type:inline-size;isolation:isolate;display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--tl-bg);border-color:var(--tl-line);}
.timeline:not(.sequence-collapsed),.timeline.editor-open {height:var(--timeline-expanded-height,290px);min-height:160px;max-height:none;flex-shrink:0;}
.timeline.sequence-collapsed {height:44px;min-height:44px;max-height:44px;flex:0 0 44px;}
.timeline [hidden],.tl-overlay [hidden] {display:none!important;}
.timeline ::selection,.tl-overlay ::selection {background:var(--tl-accent);color:var(--tl-accent-ink);}
.timeline button,.tl-overlay button,.timeline input,.tl-overlay input,.timeline select,.tl-overlay select {font:500 13px var(--tl-font);letter-spacing:0;color:var(--tl-text);border-radius:4px;box-sizing:border-box;}
.timeline button,.tl-overlay button {min-height:36px;padding:0 10px;border:1px solid var(--tl-edge);background:var(--tl-raised);cursor:pointer;display:inline-flex;gap:6px;align-items:center;justify-content:center;white-space:nowrap;}
.timeline button:hover,.tl-overlay button:hover {background:var(--tl-hover);color:var(--tl-text);}
.timeline button:disabled,.tl-overlay button:disabled {color:var(--tl-secondary);opacity:1;cursor:default;border-color:var(--tl-line);}
.timeline button[aria-pressed=true],.tl-overlay button[aria-pressed=true] {background:var(--tl-selected);color:var(--tl-accent);}
.timeline :focus-visible,.tl-overlay :focus-visible {outline:2px solid var(--tl-accent);outline-offset:2px;scroll-margin:8px;}
.timeline .icon,.tl-overlay .icon {width:16px;height:16px;flex:none;}
.timeline input,.timeline select,.tl-overlay input,.tl-overlay select {min-height:36px;max-width:100%;padding:6px 8px;border:1px solid var(--tl-edge);background:var(--tl-raised);font-weight:400;}
.timeline input::placeholder,.tl-overlay input::placeholder {color:var(--tl-secondary);opacity:1;}
.timeline input[aria-invalid=true],.tl-overlay input[aria-invalid=true] {background:var(--tl-danger-surface);border-color:var(--tl-danger);}
.timeline #arrangement-toolbar {height:44px;min-height:44px;padding:4px 12px;display:flex;flex:none;gap:8px;align-items:center;border-bottom:1px solid var(--tl-line);background:var(--tl-surface);container-type:normal;overflow:hidden;}
.timeline .timeline-title {display:flex;gap:0;flex:none;}
.timeline .timeline-title h2 {margin:0;font-size:14px;line-height:1;}
.timeline .timeline-title h2 button {padding:0 4px;border:0;background:transparent;min-width:100px;justify-content:flex-start;}
.timeline .timeline-title [aria-expanded=false] svg {transform:rotate(-90deg);}
.timeline .sequence-toolbox {display:flex;flex:none;border:0;gap:0;}
.timeline .sequence-toolbox button {padding:0 6px;gap:4px;min-width:58px;border-radius:0;border-color:var(--tl-line);height:36px;}
.timeline .sequence-toolbox button:first-child {border-radius:4px 0 0 4px;}
.timeline .sequence-toolbox button:last-child {border-radius:0 4px 4px 0;}
.timeline .tl-rail-spacer,.timeline .tl-ledger-spacer {flex:1;}
.timeline .tl-write[aria-pressed=true] {color:var(--tl-danger);background:var(--tl-raised);}
.timeline #clip-selection-toolbar {display:flex;align-items:center;gap:8px;flex:none;height:36px;min-height:36px;padding:0 12px;border-bottom:1px solid var(--tl-line);background:var(--tl-raised);overflow:hidden;}
.timeline #clip-selection-toolbar button {height:28px;min-height:28px;border:0;padding:0 4px;background:transparent;font-size:12px;}
.timeline #clip-selection-toolbar .tl-edit-key {border:1px solid var(--tl-edge);padding:0 8px;}
.timeline .tl-primary-name {font-size:12px;color:var(--tl-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.timeline .tl-policy {display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px;}
.timeline .tl-policy input {min-height:16px;width:16px;height:16px;}
.timeline .tl-working-body {display:flex;min-height:0;min-width:0;flex:1;overflow:hidden;}
.timeline .tl-main-field {display:flex;min-height:0;min-width:0;flex:1;flex-direction:column;overflow:hidden;}
.timeline #timeline-content {min-height:0;flex:1;overflow:auto;position:relative;touch-action:auto;overscroll-behavior:auto;}
.timeline.editor-open #timeline-content {display:none;}
.timeline .tl-overview {height:18px;flex:0 0 18px;padding:0;background:var(--tl-bg);border-bottom:1px solid var(--tl-line);}
.timeline [data-tl-overview] {height:100%;position:relative;cursor:ew-resize;overflow:hidden;margin-left:var(--tl-ledger);}
.timeline [data-tl-overview] i {position:absolute;top:6px;height:4px;background:var(--tl-secondary);opacity:.6;}
.timeline [data-tl-window] {position:absolute;inset-block:1px;border:1px solid var(--tl-text);background:#ffffff0c;pointer-events:none;}
.timeline .timeline-grid {min-height:100%;position:relative;background:var(--tl-bg);}
.timeline .timeline-ruler {height:var(--tl-head);margin:0;display:flex;position:sticky;top:0;z-index:8;background:var(--tl-surface);border-bottom:1px solid var(--tl-line);}
.timeline .track-heading,.timeline .track-label {width:var(--tl-ledger);min-width:var(--tl-ledger);flex-basis:var(--tl-ledger);box-sizing:border-box;position:sticky;left:0;background:var(--tl-raised);border-right:1px solid var(--tl-line);}
.timeline .track-heading {z-index:12;display:flex;flex-direction:column;padding:0 12px;letter-spacing:0;color:var(--tl-secondary);font-size:12px;}
.timeline .track-heading span {height:var(--tl-ruler);display:flex;align-items:center;}
.timeline .track-heading span:first-child {height:var(--tl-section);}
.timeline .track-heading .tl-loop-heading {height:var(--tl-loop);}
.timeline .track-heading span:last-child {height:var(--tl-strip);}
.timeline .bar-ruler {position:relative;flex:1;min-width:0;display:block;}
.timeline .bar-ruler>button {top:calc(var(--tl-section) + var(--tl-loop));height:var(--tl-ruler);min-height:var(--tl-ruler);border:0;border-left:1px solid var(--tl-line);border-radius:0;background:var(--tl-surface);color:var(--tl-secondary);text-align:left;justify-content:flex-start;padding:0 8px;font:12px var(--tl-numeric-font);overflow:hidden;}
.timeline .tl-section-band {position:absolute;top:0;height:var(--tl-section);left:0;right:0;border-bottom:1px solid var(--tl-line);}
.timeline .tl-section {position:absolute;height:100%;border-top:1px solid var(--tl-marker);}
.timeline .tl-section>button:first-child {width:100%;height:100%;min-height:0;padding:0 16px;border:0;border-radius:0;background:var(--tl-surface);justify-content:flex-start;overflow:hidden;font-size:12px;}
.timeline .tl-section .tl-section-flag {position:absolute;left:0;top:0;width:14px;height:100%;min-height:0;padding:0;border:0;border-radius:0;border-left:1px solid var(--tl-marker);background:var(--tl-hover);font-size:12px;}
.timeline .tl-section i {position:absolute;top:0;left:0;width:5px;height:100%;cursor:ew-resize;}
.timeline .tl-time-strip {position:absolute;bottom:0;left:0;right:0;height:var(--tl-strip);background:var(--tl-bg);border-top:1px solid var(--tl-line);cursor:crosshair;touch-action:none;}
.timeline .tl-range-fill {position:absolute;inset-block:0;border-inline:2px solid var(--tl-accent);background:#cefa7526;pointer-events:none;}
.timeline .tl-lane-range {position:absolute;inset-block:0;background:#cefa7519;border-inline:1px solid #cefa7580;pointer-events:none;}
.timeline .tl-insertion {position:absolute;top:0;bottom:0;border-left:1px dashed var(--tl-secondary);pointer-events:none;}
.timeline .tl-insertion:before {content:'';position:absolute;width:7px;height:7px;border:1px solid var(--tl-text);transform:translate(-4px,3px) rotate(45deg);background:var(--tl-bg);}
.timeline .tl-loop-strip {position:absolute;top:var(--tl-section);height:var(--tl-loop);left:0;right:0;background:var(--tl-bg);border-block:1px solid var(--tl-line);box-sizing:border-box;z-index:3;}
.timeline .loop-region {top:0;height:100%;border-block:1px solid var(--tl-accent);background:var(--tl-selected);pointer-events:none;}
.timeline .loop-region b {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--tl-accent);font:10px var(--tl-font);white-space:nowrap;}
.timeline .loop-region.tl-loop-tight b {display:none;}
.timeline [data-tl-loop-edge] {position:absolute;top:-1px;width:44px;height:var(--tl-loop);min-height:var(--tl-loop);padding:0 2px;border:1px solid var(--tl-edge);border-radius:0;background:var(--tl-raised);color:var(--tl-accent);font:10px var(--tl-font);cursor:ew-resize;touch-action:none;user-select:none;pointer-events:auto;}
.timeline [data-tl-loop-edge]:after {content:'';position:absolute;left:var(--tl-loop-boundary);top:-1px;bottom:-1px;border-left:2px solid var(--tl-accent);pointer-events:none;}
.timeline [data-tl-loop-edge]:is(:hover,:active) {background:var(--tl-accent);color:var(--tl-accent-ink);}
.timeline [data-tl-loop-edge]:focus-visible {outline-offset:-3px;z-index:1;}
.timeline .loop-region.tl-loop-off {border-color:var(--tl-edge);background:var(--tl-surface);}
.timeline .tl-loop-off :is(b,[data-tl-loop-edge]) {color:var(--tl-secondary);}
.timeline .tl-loop-off [data-tl-loop-edge]:is(:hover,:active) {color:var(--tl-accent-ink);}
.timeline .tl-loop-off [data-tl-loop-edge]:after {border-color:var(--tl-edge);}
.timeline .track-rows {min-height:calc(100% - var(--tl-head));}
.timeline .timeline-track {height:var(--tl-row);border-bottom:1px solid var(--tl-line);}
.timeline.tl-tall {--tl-row:56px;}
.timeline .track-label {padding:0 8px;gap:3px;z-index:5;}
.timeline .track-label button {height:32px;min-height:32px;padding:0 4px;border:0;border-radius:2px;font-size:12px;background:transparent;}
.timeline .track-select {flex:1;min-width:0;font-weight:600;justify-content:flex-start;}
.timeline .track-select span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.timeline .track-select>i {width:5px;height:5px;flex:none;background:var(--track-color);}
.timeline .track-label .track-mute,.timeline .track-label .track-solo {width:24px;flex:none;}
.timeline .track-label .tl-track-more {width:24px;font-size:0;flex:none;}
.timeline .tl-track-more:after {content:'…';font-size:16px;}
.timeline .track-lane {position:relative;background-color:var(--tl-bg);background-size:var(--meter-bar-width) 100%,var(--meter-beat-width) 100%;touch-action:auto;}
.timeline .timeline-clip {top:6px;bottom:6px;height:auto;min-width:0;border:1px solid var(--track-color);border-radius:4px;background:color-mix(in srgb,var(--track-color) 12%,var(--tl-surface));color:var(--tl-text);box-shadow:none;overflow:visible;touch-action:pan-y;}
.timeline .timeline-clip>span {display:block;font-size:12px;font-weight:500;line-height:15px;text-transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 8px;}
.timeline .timeline-clip svg {position:absolute;left:8px;right:8px;bottom:3px;width:calc(100% - 16px);height:14px;fill:var(--track-color);opacity:.7;}
.timeline .timeline-clip.selected {box-shadow:inset 0 0 0 2px var(--tl-accent);background:var(--tl-selected);}
.timeline .timeline-clip.tl-primary:after {content:'';position:absolute;left:3px;top:3px;width:4px;height:4px;background:var(--tl-accent);}
.timeline .timeline-clip.tl-muted {opacity:1;border-style:dashed;}
.timeline .tl-muted-label {position:absolute;right:8px;bottom:2px;font-size:10px;background:var(--tl-raised);font-weight:500;}
.timeline .clip-trim {width:10px;touch-action:none;}
.timeline .tl-collision {outline:2px solid var(--tl-danger);}
.timeline .timeline-grid .timeline-playhead {left:calc(var(--tl-ledger) + (100% - var(--tl-ledger))*var(--position,0)/100);z-index:6;background:var(--tl-text);width:1px;}
.timeline .timeline-playhead:before {background:var(--tl-accent);width:7px;height:5px;left:-3px;top:0;}
.timeline .tl-song-end {position:absolute;top:var(--tl-section);bottom:0;width:3px;border-inline:1px solid var(--tl-edge);pointer-events:none;z-index:4;}
.timeline .tl-song-end span {position:absolute;top:30px;right:5px;color:var(--tl-secondary);font:10px var(--tl-font);white-space:nowrap;background:var(--tl-bg);}
.timeline #clip-editor {height:auto;min-height:0;flex:1;border:0;background:var(--tl-bg);display:none;}
.timeline.editor-open #clip-editor {display:flex;flex-direction:column;}
.timeline .clip-editor-header {height:36px;min-height:36px;padding:0 8px;gap:8px;display:flex;background:var(--tl-surface);border-bottom:1px solid var(--tl-line);}
.timeline .clip-editor-header>div:first-of-type {flex:1;min-width:40px;display:block;overflow:hidden;}
.timeline .clip-editor-header strong {font-size:13px;color:var(--tl-text);max-width:none;display:block;}
.timeline .clip-editor-header span {display:none;}
.timeline .clip-editor-header button {min-height:28px;height:28px;font-size:12px;padding:0 8px;}
.timeline .editor-tabs {display:flex;gap:4px;}
.timeline .editor-tabs button.active {color:var(--tl-accent);background:var(--tl-selected);}
.timeline .tl-header-setup {display:none;}
.timeline .clip-editor-body {padding:0;display:flex;flex-direction:column;min-height:0;flex:1;overflow:auto;}
.timeline .tl-pattern-actions,.timeline .pattern-editor-tools {display:flex;gap:4px;align-items:center;height:36px;min-height:36px;flex:none;padding:0 8px;flex-wrap:nowrap;background:var(--tl-surface);border-bottom:1px solid var(--tl-line);overflow:hidden;}
.timeline .tl-pattern-actions button {min-height:28px;height:28px;padding:0 8px;font-size:12px;}
.timeline .tl-pattern-actions span {font-size:12px;flex:1;min-width:30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.timeline .pattern-editor-tools label {display:flex;align-items:center;gap:8px;font-size:12px;min-width:0;}
.timeline .pattern-editor-tools select {min-height:28px;height:28px;max-width:240px;}
.timeline .pattern-editor-tools>span {font-size:12px;color:var(--tl-secondary);}
.timeline .clip-drum-grid,.timeline .piano-scroll {flex:1;min-height:0;max-height:none;overflow:auto;touch-action:auto;}
.timeline .clip-drum-row,.timeline .pattern-step-ruler {grid-template-columns:112px repeat(16,minmax(32px,1fr));min-width:624px;}
.timeline .clip-drum-row {height:36px;}
.timeline .pattern-step-ruler {height:24px;min-height:24px;position:sticky;top:0;z-index:4;background:var(--tl-raised);}
.timeline .pattern-step-ruler button {height:24px;min-height:24px;border-radius:0;border-color:var(--tl-line);font-size:12px;padding:0;}
.timeline .clip-drum-row>button {min-height:32px;font-size:12px;border-radius:2px;padding:0 4px;}
.timeline .clip-drum-row>button:first-child {position:sticky;left:0;z-index:3;background:var(--tl-raised);text-align:left;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;}
.timeline .piano-grid {min-width:576px;}
.timeline .piano-row,.timeline .piano-grid .pattern-step-ruler {grid-template-columns:64px repeat(16,minmax(32px,1fr));min-width:576px;}
.timeline .piano-row {height:22px;}
.timeline .piano-row>span {font-size:12px;background:var(--tl-raised);position:sticky;left:0;z-index:3;}
.timeline .piano-row button {height:22px;min-height:22px;border-radius:0;border-color:var(--tl-line);}
.timeline .piano-row.black-key {background:#0c0e11;}
.timeline .piano-row button.active {background:color-mix(in srgb,var(--tl-accent) 60%,var(--tl-selected));}
.timeline .tl-event-selected {outline:2px solid var(--tl-accent)!important;outline-offset:-2px;}
.timeline .tl-scale-tone {box-shadow:inset 0 -1px #cefa7570;}
.timeline .automation-canvas {min-height:96px;flex:1;display:flex;position:relative;padding:8px;}
.timeline .automation-canvas svg {height:100%;min-height:96px;flex:1;touch-action:none;}
.timeline .auto-scale {font-size:12px;}
.timeline .auto-line {stroke:var(--tl-accent);stroke-width:2;fill:none;}
.timeline [data-auto-point] {fill:var(--tl-text);stroke:var(--tl-bg);stroke-width:1;cursor:move;}
.timeline .tl-point-selected {fill:var(--tl-accent);stroke:var(--tl-text);stroke-width:2;}
.timeline .auto-points {display:none;}
.timeline .tl-workbench {width:336px;flex:0 0 336px;border:0;border-left:1px solid var(--tl-line);background:var(--tl-surface);min-height:0;display:flex;flex-direction:column;overflow:hidden;}
.tl-overlay .tl-workbench-heading {height:40px;min-height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid var(--tl-line);}
.tl-overlay h2 {font:650 16px var(--tl-font);margin:0;}
.tl-overlay h3 {font:600 14px var(--tl-font);margin:16px 0 0;flex-basis:100%;}
.tl-overlay .tl-workbench-heading button {border:0;background:transparent;}
.tl-overlay .tl-task-label {display:flex;align-items:center;gap:8px;padding:0 12px;height:36px;min-height:36px;border-bottom:1px solid var(--tl-line);font-size:12px;}
.tl-overlay .tl-task-label select {flex:1;border:0;background:transparent;min-height:32px;}
.tl-overlay .tl-task-body {padding:16px;display:flex;flex-wrap:wrap;align-content:flex-start;gap:8px;overflow:auto;min-height:0;flex:1;scroll-padding:16px;}
.tl-overlay .tl-task-body>label,.tl-overlay .tl-task-body>div,.tl-overlay .tl-task-body>output {width:100%;}
.tl-overlay .tl-task-body label {display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--tl-secondary);}
.tl-overlay .tl-task-body label input,.tl-overlay .tl-task-body label select {width:100%;}
.tl-overlay .tl-task-body .tl-check {display:flex;align-items:center;flex-direction:row;min-height:32px;color:var(--tl-text);}
.tl-overlay .tl-check input {width:18px!important;min-height:18px;height:18px;}
.tl-overlay .tl-help {margin:0 0 8px;font:400 12px/1.5 var(--tl-font);color:var(--tl-secondary);width:100%;}
.tl-overlay [data-tl-status] {font-size:12px;line-height:1.5;color:var(--tl-accent);width:100%;margin:8px 0 0;}
.tl-overlay .tl-workbench-footer {height:44px;min-height:44px;padding:4px 12px;border-top:1px solid var(--tl-line);display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:var(--tl-secondary);}
.tl-overlay .tl-marker-item,.tl-overlay .tl-track-item {border-bottom:1px solid var(--tl-line);width:100%;padding:8px 0 16px;display:flex;flex-wrap:wrap;gap:8px;}
.tl-overlay :is(.tl-marker-item,.tl-track-item) strong {width:100%;font-size:14px;}
.tl-overlay :is(.tl-marker-item,.tl-track-item)>span {font-size:12px;width:100%;color:var(--tl-secondary);}
.tl-overlay .tl-point-list {display:flex;flex-direction:column;gap:4px;}
.tl-overlay .pattern-editor-tools,.tl-overlay .hit-editor {display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;padding:0;height:auto;border:0;background:transparent;white-space:normal;}
.tl-overlay .pattern-editor-tools label,.tl-overlay .hit-editor label {display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--tl-secondary);}
.tl-overlay .pattern-editor-tools span,.tl-overlay .hit-editor strong,.tl-overlay .hit-editor output {font-size:12px;color:var(--tl-text);}
.tl-overlay .note-rolls {display:flex;gap:4px;flex-wrap:wrap;}
.tl-overlay [data-native-fragment=snap] {width:100%;}
.tl-overlay dialog,.timeline dialog.tl-workbench {position:fixed;inset:0;margin:auto;width:min(560px,calc(100vw - 24px));height:min(720px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);padding:0;border:1px solid var(--tl-edge);border-radius:6px;box-shadow:0 16px 40px #0008;z-index:100;}
.timeline dialog.tl-workbench:not([open]) {display:none;}
.timeline dialog.tl-workbench::backdrop {background:#0009;}
.timeline dialog .tl-workbench-heading {height:48px;min-height:48px;}
.timeline dialog .tl-task-label {height:44px;min-height:44px;}
.timeline dialog .tl-workbench-footer {height:56px;min-height:56px;}
.timeline .tl-marquee {position:fixed;border:1px solid var(--tl-accent);background:#cefa7520;pointer-events:none;z-index:100;}
.timeline.sequence-collapsed :is(.tl-working-body,#clip-selection-toolbar,.sequence-toolbox,.tl-add,.tl-snap,.tl-rail-spacer,#arrangement-toolbar>button) {display:none;}
.timeline.tl-area-armed :is(.track-lane,.clip-drum-grid,.piano-scroll,[data-automation-graph]) {touch-action:none;cursor:crosshair;}
.timeline.tl-short .tl-pattern-actions {display:none;}
.timeline.tl-short .tl-header-setup {display:inline-flex;}
@container (max-width:1079px) {
 .timeline #arrangement-toolbar {height:88px;min-height:88px;display:grid;grid-template-columns:104px repeat(4,minmax(44px,1fr));grid-template-rows:36px 36px;gap:4px;padding:6px 8px;}
 .timeline .timeline-title {grid-column:1;grid-row:1;}
 .timeline .sequence-toolbox {grid-column:2/5;grid-row:1;justify-content:flex-end;}
 .timeline .sequence-toolbox button {flex:1;min-width:44px;max-width:76px;}
 .timeline .sequence-toolbox button span {display:none;}
 .timeline .tl-add {grid-column:1;grid-row:2;}
 .timeline .tl-snap {grid-column:2;grid-row:2;min-width:0;padding:0 4px;font-size:12px;overflow:hidden;}
 .timeline #arrangement-toolbar>[data-tl-view=Sections] {grid-column:3;grid-row:2;}
 .timeline #arrangement-toolbar>[data-tl-view=Tracks] {grid-column:4;grid-row:2;}
 .timeline #arrangement-toolbar>[data-tl-view=View] {grid-column:5;grid-row:2;}
 .timeline .tl-write {grid-column:5;grid-row:1;font-size:12px;padding:0;visibility:visible;}
 .timeline .tl-rail-spacer {display:none;}
 .timeline #clip-selection-toolbar {height:44px;min-height:44px;padding:0 8px;gap:4px;}
 .timeline .tl-primary-name,.timeline .tl-policy,.timeline .tl-resume {display:none;}
 .timeline #clip-selection-toolbar button {height:36px;min-height:36px;}
 .timeline .tl-pattern-actions {height:44px;min-height:44px;}
 .timeline .tl-pattern-actions button {height:36px;min-height:36px;padding:0 6px;}
 .timeline .tl-pattern-actions>[data-tl-view][data-task=Hit] {display:none;}
 .timeline .tl-pattern-actions>[data-arr-action] {width:44px;font-size:0;}
 .timeline .tl-pattern-actions>[data-arr-action=prev-page]:after {content:'Prev';font-size:12px;}
 .timeline .tl-pattern-actions>[data-arr-action=next-page]:after {content:'Next';font-size:12px;}
 .timeline .pattern-editor-tools {height:auto;min-height:88px;display:grid;grid-template-columns:minmax(120px,1fr) 112px;gap:4px;padding:4px 8px;}
 .timeline .pattern-editor-tools>span {display:none;}
}
@container (max-width:719px) {
 .timeline .tl-overview {height:28px;flex-basis:28px;}
 .timeline .track-label .tl-track-more {display:none;}
 .timeline .clip-editor-header {gap:4px;padding-inline:8px;}
 .timeline .clip-editor-header strong {font-size:12px;}
 .timeline .editor-tabs button {padding:0 5px;}
 .timeline .tl-back-score {width:64px;}
}
@container (max-width:479px) {
 .timeline .sequence-toolbox button span {display:none;}
 .timeline .sequence-toolbox button {width:44px;max-width:48px;}
 .timeline #arrangement-toolbar {grid-template-columns:88px repeat(4,minmax(0,1fr));}
 .timeline #arrangement-toolbar>button {font-size:12px;padding-inline:4px;}
 .timeline .tl-snap {font-size:0!important;}
 .timeline .tl-snap:after {content:'Snap';font-size:12px;}
 .timeline .timeline-title h2 button {min-width:88px;font-size:13px;}
 .timeline #clip-selection-toolbar>.tl-scope-entry:not(:first-child) {display:none;}
 .timeline #clip-selection-toolbar [data-tl-view=Insertion] {font-size:11px;}
 .timeline .tl-ledger-spacer {min-width:0;}
 .timeline dialog.tl-workbench {width:100%;max-width:100%;max-height:100dvh;height:100dvh;border-radius:0;}
 .timeline dialog h2 {font-size:21px;}
 .timeline dialog input,.timeline dialog select {font-size:16px;min-height:44px;}
 .timeline dialog button {min-height:44px;}
}
@media (pointer:coarse) {
 .timeline {--tl-section:44px;--tl-loop:44px;--tl-ruler:36px;--tl-strip:32px;--tl-head:156px;--tl-row:60px;}
 .timeline .track-label button {height:44px;min-height:44px;}
 .timeline .track-label :is(.track-mute,.track-solo) {width:44px;}
 .timeline.tl-phone {--tl-row:88px;}
 .timeline.tl-phone .track-label {display:grid;grid-template-columns:1fr 1fr;grid-template-rows:44px 44px;padding:0;gap:0;}
 .timeline.tl-phone .track-select {grid-column:1/3;width:112px;padding-inline:8px;}
 .timeline.tl-phone .track-label :is(.track-mute,.track-solo) {width:56px;}
 .timeline .clip-trim {width:18px;}
 .timeline .clip-drum-row {height:44px;}
 .timeline .clip-drum-row,.timeline .pattern-step-ruler {grid-template-columns:112px repeat(16,minmax(44px,1fr));min-width:816px;}
 .timeline .clip-drum-row>button {min-height:44px;height:44px;}
 .timeline .piano-row {height:36px;}
 .timeline .piano-row,.timeline .piano-grid .pattern-step-ruler {grid-template-columns:64px repeat(16,minmax(44px,1fr));min-width:768px;}
 .timeline .piano-row button {height:36px;min-height:36px;}
 .timeline .clip-editor-header {height:44px;min-height:44px;}
 .timeline .clip-editor-header button {height:44px;min-height:44px;}
 .timeline .track-lane {touch-action:auto;}
 .timeline .timeline-clip {touch-action:pan-y;}
 .timeline [data-automation-graph] {touch-action:auto;}
 .timeline.tl-area-armed [data-automation-graph] {touch-action:none;}
 .timeline .tl-workbench button {min-height:44px;}
}
@media(prefers-reduced-motion:reduce) {.timeline *,.tl-overlay * {transition:none!important;animation:none!important;scroll-behavior:auto!important;}}
.timeline .tl-short-actions {display:none;}
.timeline .tl-popover {position:fixed;inset:auto;margin:0;width:352px;max-width:calc(100vw - 16px);height:auto;max-height:min(640px,calc(100dvh - 100px));padding:0;border:1px solid var(--tl-edge);border-radius:6px;box-shadow:0 16px 40px #0008;}
.timeline .tl-popover:not(:popover-open) {display:none;}
.timeline .tl-popover .tl-task-body {max-height:440px;}
.timeline.tl-short {--tl-section:0px;--tl-ruler:28px;--tl-strip:20px;--tl-head:calc(var(--tl-loop) + 48px);}
.timeline.tl-short #arrangement-toolbar {display:flex;height:44px;min-height:44px;gap:4px;padding:4px 8px;}
.timeline.tl-short #arrangement-toolbar .timeline-title h2 button {min-width:80px;font-size:13px;}
.timeline.tl-short #arrangement-toolbar .sequence-toolbox {display:flex;justify-content:flex-start;}
.timeline.tl-short #arrangement-toolbar .sequence-toolbox button {width:36px;min-width:36px;max-width:36px;padding:0;}
.timeline.tl-short .sequence-toolbox button span {display:none;}
.timeline.tl-short #arrangement-toolbar .tl-add {width:44px;font-size:0;}
.timeline.tl-short #arrangement-toolbar .tl-short-actions {display:inline-flex;width:44px;font-size:0;padding:0;}
.timeline.tl-short .tl-short-actions:after {content:'More';font-size:12px;}
.timeline.tl-short #arrangement-toolbar> :is(.tl-snap,[data-tl-view=Sections],[data-tl-view=Tracks],[data-tl-view=View],.tl-write) {display:none;}
.timeline.tl-short .tl-section-band,.timeline.tl-short .track-heading span:first-child,.timeline.tl-short .tl-overview {display:none;}
.timeline.tl-short .tl-header-setup {display:inline-flex;}
.timeline.tl-short .clip-editor-header {height:36px;min-height:36px;}
@media(pointer:coarse){.timeline.tl-short #arrangement-toolbar .sequence-toolbox button {width:44px;min-width:44px;max-width:44px;}}
.timeline [data-auto-point].auto-hit {fill:transparent;stroke:none;}
.timeline .auto-arrival {fill:var(--tl-bg);stroke:var(--tl-accent);stroke-width:1.5;pointer-events:none;}
.timeline [data-arr-step]:focus-visible {outline-offset:-2px;}
.timeline .timeline-clip:not(.selected) .clip-trim {pointer-events:none;}
.timeline .timeline-clip.selected .clip-trim-left {left:-5px;}
.timeline .timeline-clip.selected .clip-trim-right {right:-5px;}

.timeline #clip-selection-toolbar .tl-compact-scope {display:none;}
@container(max-width:1079px){
 .timeline #clip-selection-toolbar>.tl-scope-entry {display:none;}
 .timeline #clip-selection-toolbar .tl-compact-scope {display:flex;flex-direction:column;gap:0;align-items:flex-start;min-width:136px;flex:1;line-height:16px;}
 .timeline .tl-compact-scope small {font-size:12px;color:var(--tl-secondary);font-weight:400;}
 .timeline #clip-selection-toolbar .tl-ledger-spacer {display:none;}
 .timeline #clip-selection-toolbar>[data-tl-view=Insertion] {width:124px;font-size:11px;flex:none;}
 .timeline #clip-selection-toolbar .tl-edit-key {width:64px;font-size:12px;overflow:hidden;flex:none;padding:0 4px;}
}
/* Compact rail: the same actions occupy two deliberate rows. */
@container(max-width:1079px){
 .timeline:not(.tl-short) #arrangement-toolbar {grid-template-columns:108px 64px 64px minmax(48px,1fr) 60px;grid-template-rows:44px 44px;gap:0 4px;padding:0 8px;}
 .timeline:not(.tl-short) #arrangement-toolbar .timeline-title {grid-column:1;grid-row:1;}
 .timeline:not(.tl-short) #arrangement-toolbar .sequence-toolbox {grid-column:2/5;grid-row:1;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-add {grid-column:5;grid-row:1;font-size:0;gap:4px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-add:after {content:'Add';font-size:12px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-snap {grid-column:1;grid-row:2;}
 .timeline:not(.tl-short) #arrangement-toolbar>[data-tl-view=Sections] {grid-column:2;grid-row:2;}
 .timeline:not(.tl-short) #arrangement-toolbar>[data-tl-view=Tracks] {grid-column:3;grid-row:2;}
 .timeline:not(.tl-short) #arrangement-toolbar>[data-tl-view=View] {grid-column:4;grid-row:2;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-write {grid-column:5;grid-row:2;gap:3px;padding-inline:3px;}
}
.timeline .bar-ruler>button {align-items:flex-end;padding-bottom:2px;}
.timeline [data-automation-graph] {background:var(--tl-bg);}
.timeline .auto-grid path {stroke:var(--tl-line);stroke-width:1;vector-effect:non-scaling-stroke;}
.timeline .auto-line {vector-effect:non-scaling-stroke;}
.timeline .auto-arrival,.timeline [data-auto-point] {vector-effect:non-scaling-stroke;}
@media(pointer:coarse){
 .timeline:not(.tl-short) #arrangement-toolbar button,.timeline #clip-selection-toolbar button {height:44px;min-height:44px;}
 .timeline:not(.tl-short) #arrangement-toolbar {padding-block:0;}
 .timeline .tl-write .icon {display:none;}
}
.timeline .automation-canvas {overflow:auto;align-items:stretch;touch-action:auto;}
.timeline .automation-canvas svg {width:auto;max-width:none;flex:1 0 auto;}
.timeline .tl-task-body [data-tl-track-drag] {cursor:grab;min-height:32px;}
.timeline .tl-overlay .tl-track-item>span[data-tl-track-drag] {width:auto;display:flex;align-items:center;}
@container(max-width:1079px){
 .timeline:not(.tl-short) #arrangement-toolbar .tl-write {width:60px;min-width:60px;font-size:12px;justify-self:stretch;}
}
.timeline.tl-short .tl-workbench .tl-overview {display:block;height:28px;min-height:28px;width:100%;}
.timeline .tl-workbench .tl-overview [data-tl-overview] {margin-left:0;}
@container(max-width:1079px){
 .timeline .tl-primary-name[data-tl-status] {display:block;position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
}
.timeline .tl-pattern-full>[data-arr-action],.timeline .tl-pattern-full>span {display:none;}
.timeline .tl-pattern-full>[data-native-fragment=setup] {flex:1;min-width:0;padding:0;border:0;}

/* Split workspace divider: the grip is also a keyboard-operable separator. */
.timeline .tl-resize-handle {display:none;flex:0 0 16px;min-height:16px;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none;background:var(--tl-surface);border-bottom:1px solid var(--tl-edge);user-select:none;}
#shell[data-workspace-mode="split"] .timeline:not(.sequence-collapsed) .tl-resize-handle {display:flex;}
.timeline .tl-resize-handle span {width:48px;height:4px;background:var(--tl-secondary);}
.timeline .tl-resize-handle:hover span,.timeline.tl-resizing .tl-resize-handle span {background:var(--tl-accent);}
.timeline .tl-resize-handle:focus-visible {outline:2px solid var(--tl-accent);outline-offset:-2px;}
.timeline.tl-resizing {user-select:none;}
.timeline[data-tool="eraser"] :is(.timeline-clip,[data-arr-step]) {cursor:crosshair;}
.timeline #clip-selection-toolbar .tl-delete-selection {flex-shrink:0;color:var(--tl-text);border:1px solid var(--tl-edge);padding:0 8px;background:var(--tl-surface);}
.timeline #clip-selection-toolbar .tl-delete-selection:hover {background:var(--tl-hover);}
@media(max-width:720px),(max-height:680px) {
 #shell[data-workspace-mode="split"] .timeline:not(.sequence-collapsed) {min-height:160px;height:var(--timeline-expanded-height,290px);}
}
@container (max-width:1079px) {
 .timeline .sequence-toolbox button {min-width:32px;}
}
@container (max-width:480px) {
 .timeline.tl-short #arrangement-toolbar .sequence-toolbox button {width:30px;min-width:30px;max-width:30px;}
 .timeline #clip-selection-toolbar .tl-delete-selection {font-size:11px;padding:0 4px;}
 .timeline #clip-selection-toolbar:has(.tl-delete-selection) .tl-compact-scope {min-width:80px;}
}

/* Text actions keep their inset; compact rails reflow instead of cropping. */
.timeline #arrangement-toolbar {height:auto;min-height:52px;padding:6px 8px;flex-wrap:wrap;overflow:visible;}
.timeline #arrangement-toolbar > button,.timeline .sequence-toolbox button {flex-shrink:0;padding-inline:10px;line-height:1.4;}
.timeline .sequence-toolbox button {min-height:36px;}
.timeline .tl-compact-label {display:none;}
.timeline #clip-selection-toolbar {height:auto;min-height:44px;padding:6px 8px;flex-wrap:wrap;overflow:visible;}
.timeline #clip-selection-toolbar button {height:auto;min-height:32px;padding:6px 10px;line-height:1.4;flex-shrink:0;}
.timeline #clip-selection-toolbar .tl-edit-key,.timeline #clip-selection-toolbar .tl-delete-selection {padding:6px 10px;}
.timeline .clip-editor-header {height:auto;min-height:44px;flex-wrap:wrap;padding:4px 8px;}
.timeline .clip-editor-header button {height:auto;min-height:32px;padding:6px 10px;line-height:1.4;flex-shrink:0;}
.timeline .tl-pattern-actions,.timeline .pattern-editor-tools {height:auto;min-height:44px;flex-wrap:wrap;padding:4px 8px;overflow:visible;}
.timeline .tl-pattern-actions button,.timeline .pattern-editor-tools button {height:auto;min-height:32px;padding:6px 10px;line-height:1.4;}
@container(max-width:1079px) {
 .timeline:not(.tl-short) #arrangement-toolbar {display:grid;height:auto;min-height:96px;grid-template-columns:repeat(5,minmax(max-content,1fr));grid-template-rows:auto auto;gap:4px;padding:4px 8px;}
 .timeline:not(.tl-short) #arrangement-toolbar .timeline-title {grid-column:1;}
 .timeline:not(.tl-short) #arrangement-toolbar .sequence-toolbox {grid-column:2/5;justify-content:flex-end;min-width:0;}
 .timeline .sequence-toolbox button {min-width:32px;max-width:none;padding-inline:8px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-add {grid-column:5;}
 .timeline #arrangement-toolbar .tl-snap .tl-full-label {display:none;}
 .timeline #arrangement-toolbar .tl-snap .tl-compact-label {display:inline;}
 .timeline #clip-selection-toolbar .tl-compact-scope {flex:1 1 136px;min-width:0;white-space:normal;}
 .timeline .tl-compact-scope small {white-space:normal;}
 .timeline #clip-selection-toolbar > [data-tl-view=Insertion],.timeline #clip-selection-toolbar .tl-edit-key {width:auto;max-width:100%;overflow:visible;padding:6px 10px;}
 .timeline #arrangement-toolbar > button {font-size:12px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-write {padding-inline:8px;}
}
@container(max-width:600px) {
 .timeline:not(.tl-short) #arrangement-toolbar {grid-template-columns:repeat(5,minmax(max-content,1fr));}
 .timeline #arrangement-toolbar > button {font-size:11px;padding-inline:6px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-write {font-size:11px;padding-inline:6px;}
 .timeline #arrangement-toolbar .tl-write .icon {display:none;}
 .timeline:not(.tl-short) #arrangement-toolbar .sequence-toolbox {grid-column:2/6;justify-content:flex-end;padding-right:44px;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-add {width:40px;justify-self:end;font-size:0;padding:0;z-index:1;}
 .timeline:not(.tl-short) #arrangement-toolbar .tl-add:after {display:none;}
 .timeline .sequence-toolbox button {flex:none;width:32px;padding:0;}
 .timeline #arrangement-toolbar .timeline-title h2 button {min-width:90px;font-size:12px;}
 .timeline.tl-short #arrangement-toolbar {height:auto;min-height:44px;flex-wrap:wrap;}
 .timeline #clip-selection-toolbar .tl-compact-scope {flex-basis:120px;}
 .timeline #clip-selection-toolbar button {font-size:11px;}
}

/* A folded Split timeline keeps its disclosure, without editing tools. */
#shell[data-workspace-mode="split"] .timeline.sequence-collapsed #arrangement-toolbar .sequence-toolbox,
#shell[data-workspace-mode="split"] .timeline.sequence-collapsed #arrangement-toolbar .tl-short-actions {display:none;}

/* Pointer zones mirror the editing task: loop above, trim below. */
.timeline[data-tool=select] .clip-trim {top:50%;height:50%;bottom:0;}
.timeline .tl-clip-loop {display:none;position:absolute;right:-2px;top:-2px;width:20px;height:calc(50% + 2px);z-index:3;cursor:alias;touch-action:none;}
.timeline[data-tool=select] .tl-clip-loop {display:block;}
.timeline .tl-clip-loop svg {position:absolute;inset:1px 2px auto auto;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;opacity:0;}
.timeline .timeline-clip:hover .tl-clip-loop svg,.timeline .timeline-clip:focus-visible .tl-clip-loop svg {opacity:1;}
.timeline .tl-clip-loop:hover {background:var(--tl-selected);outline:1px solid var(--tl-accent);}
.timeline .tl-loop-preview {pointer-events:none;border-style:dashed!important;background:var(--tl-selected)!important;opacity:.75;}
.timeline .tl-gesture-hint {display:flex;justify-content:space-between;gap:12px;flex:none;padding:6px 10px;border-top:1px solid var(--tl-line);background:var(--tl-surface);color:var(--tl-secondary);font-size:11px;line-height:1.6;}
.timeline.editor-open .tl-gesture-hint,.timeline:not(.tl-tall) .tl-gesture-hint,.timeline.sequence-collapsed .tl-gesture-hint {display:none;}
@container(max-width:1079px){.timeline .tl-gesture-hint {flex-direction:column;gap:2px;}}
@container(max-width:600px){.timeline .tl-gesture-hint {display:none;}}

.tl-context-menu {position:fixed;inset:auto;margin:0;padding:6px;width:300px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow-y:auto;box-sizing:border-box;border:2px solid var(--tl-edge);border-radius:0;background:var(--tl-surface);color:var(--tl-text);box-shadow:3px 4px 0 #080a10;font-family:var(--tl-font);}
.tl-context-menu .tl-menu-title {padding:8px 10px;color:var(--tl-secondary);font-size:11px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tl-context-menu [role=separator] {height:1px;margin:5px 4px;background:var(--tl-line);}
.tl-context-menu button[role=menuitem] {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:36px;height:auto;margin:0;padding:8px 10px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--tl-text);font:12px/1.5 var(--tl-font);text-align:left;}
.tl-context-menu button[role=menuitem]:is(:hover,:focus-visible) {background:var(--tl-accent);color:var(--tl-accent-ink);outline:0;}
.tl-context-menu button[role=menuitem]:disabled {color:var(--tl-secondary);opacity:.5;cursor:default;background:transparent;}
.tl-context-menu kbd {flex:none;font:11px/1.5 var(--tl-numeric-font);color:inherit;}
.timeline .track-lane.tl-transfer-target {outline:2px dashed var(--tl-accent);outline-offset:-3px;}
.timeline .track-lane.tl-transfer-invalid {outline:2px dashed var(--tl-danger);outline-offset:-3px;}
.timeline #clip-selection-toolbar .tl-primary-name {flex:1 1 160px;}
.timeline[data-tool=select] .timeline-clip.selected {touch-action:none;}
.timeline .tl-loop-preview {pointer-events:none;}
.tl-context-menu [data-menu-action=delete]:not(:hover,:focus-visible,:disabled) {color:var(--tl-danger);}
@media(forced-colors:active){.tl-context-menu button[role=menuitem]:is(:hover,:focus-visible){outline:2px solid Highlight;}.timeline .tl-loop-preview{border-style:dashed;}}
