/* Audio footer shares the native timeline XY scroll and aligned label/lane grid. */
body.layer-timeline-active .timeline-content{height:calc(32px + var(--track-group-height,58px) + var(--layer-count,0)*32px + var(--sfx-height,58px));min-height:100%}
.audio-stack{position:sticky;bottom:0;z-index:6;background:#101010;align-self:end;border-top:1px solid #323232}
.sfx-long-list .audio-stack{position:relative;bottom:auto}
body.layer-timeline-active .audio-stack :is(.audio-track,.audio-layer){position:relative;bottom:auto;height:32px;border-top:0}
body.layer-timeline-active .audio-stack .audio-clip svg{height:18px}
.sfx-heading{height:var(--track-group-height,58px);box-sizing:border-box;display:flex;align-items:center;gap:4px;padding:0 7px;background:#151515;border-top:1px solid #2b2b2b;font-size:10px}
.sfx-heading strong{font-weight:400;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfx-heading .track-id{width:22px;height:20px;font-size:9px}
.sfx-heading button{height:24px;min-width:18px;padding:0 3px;border:0;background:transparent;color:#aaa;font-size:11px}
.sfx-heading button:hover{color:#fff;background:#292929}
.sfx-heading button[aria-pressed=true]{color:#fff;background:#323232}
.sfx-heading-lane{gap:8px;padding:0 9px}
.sfx-heading .sfx-add-files{min-width:0;text-align:left;white-space:nowrap;font-size:10px}
.sfx-status{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d0b788;font-size:10px}
.sfx-status:empty{display:none}
.sfx-label{height:32px;box-sizing:border-box;background:#111;border-bottom:1px solid transparent}
.sfx-label{display:flex;align-items:center;gap:0;padding-right:6px}
.sfx-choose{flex:1;min-width:0;width:auto;background:transparent}
.sfx-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sfx-row-mute{flex:none;width:20px;height:22px;border:0;padding:0;background:transparent;color:#888}

.sfx-clip{min-width:4px;cursor:grab;touch-action:pan-y}
.sfx-clip:active{cursor:grabbing}
.sfx-clip svg{position:absolute;inset:0;width:100%;height:100%;stroke:#aaa;stroke-width:1;fill:none;opacity:.24;pointer-events:none}
.sfx-clip-name{position:relative;z-index:1;font-size:inherit;white-space:nowrap;pointer-events:none}
.sfx-label.selected{background:#292929;color:#fff}.sfx-label.selected .sfx-choose{background:transparent}.sfx-choose .layer-shot-number{color:#eee}
.sfx-muted{opacity:.42}
.sfx-dialog{color:#eee;background:#191919;border:1px solid #444;border-radius:8px;padding:18px;width:min(360px,calc(100vw - 40px));box-shadow:0 16px 60px #0009;font:12px Inter,Arial,sans-serif}
.sfx-dialog::backdrop{background:#0007}
.sfx-dialog-heading,.sfx-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sfx-dialog-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.sfx-dialog button{background:#2a2a2a;color:#ddd;border:0;border-radius:4px;padding:7px 10px;cursor:pointer}
.sfx-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.sfx-fields label{display:flex;flex-direction:column;gap:6px;color:#aaa}
.sfx-fields label:first-child{grid-column:1/-1}
.sfx-fields input{width:100%;box-sizing:border-box;padding:7px 8px;background:#101010;color:#eee;border:1px solid #393939;border-radius:4px;font:12px Inter,Arial,sans-serif}
.sfx-fields .sfx-checkbox{flex-direction:row;align-items:center}
.sfx-checkbox input{width:auto;accent-color:#ddd}
.sfx-dialog-actions button:last-child{background:#eee;color:#111}
@media(max-width:700px){.sfx-heading{padding:0 4px;gap:2px}.sfx-heading .track-id,.sfx-fold{display:none}.sfx-heading strong{font-size:8px}.sfx-heading .sfx-mute{display:none}.sfx-choose{gap:2px;padding:0 5px}.sfx-label{padding-right:3px}.sfx-clip-name{font-size:8px}.sfx-heading .sfx-add-files{font-size:9px}}



/* V1 retains its scene clip while folding its authored element rows. */
body.layer-timeline-active.scene-layers-collapsed :is(.element-tracks,.element-track-labels){display:none}
.scene-track-label .scene-fold{flex:none;height:24px;min-width:18px;padding:0 3px;border:0;background:transparent;color:#aaa;font-size:11px}
.scene-track-label .scene-fold:hover{color:#fff;background:#292929}
.scene-track-label{padding-left:7px;gap:4px}

/* A1 is the shared audio group; its soundtrack is a normal child row. */
.audio-stack [hidden]{display:none!important}
.audio-stack .soundtrack-label{gap:6px;padding:0 10px;color:#bbb;font-size:9px}
.soundtrack-label .layer-shot-number{color:#eee}
.soundtrack-label .layer-kind-icon{color:#bbb}
.soundtrack-label strong{font-weight:400;flex:1}
.soundtrack-label .layer-sound{flex:none;margin-left:0;width:20px;height:22px}
.soundtrack-track .audio-clip{inset:4px 1px;height:24px;border:0}
.soundtrack-track .audio-clip>span{top:5px;font-size:9px}
@media(max-width:700px){.sfx-heading .sfx-fold{display:block}.audio-stack .soundtrack-label{padding:0 5px;gap:2px;font-size:8px}}

/* V1 and A1 use the same group header, including their responsive layout. */
.timeline-panel{--track-group-height:58px}
body.layer-timeline-active .track-group-header{height:var(--track-group-height);box-sizing:border-box;display:flex;align-items:center;gap:4px;padding:0 7px;background:#101010;border:0;color:#ddd;font-size:10px}
.track-group-header strong{flex:1;min-width:0;font-size:inherit;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.track-group-header .track-id{display:grid;flex:none;place-items:center;width:24px;height:21px;font-size:9px;background:#272727;border-radius:3px}
.track-group-header :is(.scene-fold,.sfx-fold){display:block;flex:none;width:18px;min-width:18px;height:24px;padding:0 3px;border:0;background:transparent;color:#aaa;font-size:11px}
.track-group-header :is(.scene-fold,.sfx-fold):hover{color:#fff;background:#292929}
.track-group-header .sfx-mute{flex:none;width:14px;min-width:14px;padding:0 1px}
@media(max-width:700px){body.layer-timeline-active .track-group-header{padding:0 4px;gap:2px;font-size:8px}.track-group-header .track-id{width:18px;height:21px}.track-group-header :is(.scene-fold,.sfx-fold){width:14px;min-width:14px;padding:0 1px}.track-group-header .sfx-mute{display:none}}
