/* Compact, shared timeline. All chart coordinates and handles are real CSS pixels. */
.form-studio .timeline.studio-timeline,.form-studio .timeline.studio-timeline.curves-open{display:flex;flex-direction:column;align-items:stretch;position:relative;min-height:0;max-height:none;padding:0 14px 8px;gap:0;background:var(--bg);overflow:visible;z-index:45}
.studio-timeline [hidden]{display:none!important}
.studio-timeline-head{height:46px;flex:none;display:flex;align-items:center;gap:12px;min-width:0}
.form-studio .studio-timeline .timeline-transport{display:flex!important;align-items:center;gap:3px;flex:none}
.form-studio .studio-timeline .timeline-transport button{border:0!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;border-radius:5px;padding:5px;color:var(--muted);background:none}
.form-studio .studio-timeline .timeline-transport #timelinePlay{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;border-radius:50%;background:var(--text);color:var(--bg);margin-right:4px}
.form-studio .studio-timeline #curveToggle::before{display:none}.form-studio .studio-timeline #curveToggle.active{color:var(--accent);background:var(--soft)}
.form-studio .studio-timeline #timelineLoop.active{color:var(--accent)}
.studio-clock{display:flex;align-items:center;gap:7px;font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.studio-clock .timeline-time{display:block!important;font:12px Inter,sans-serif!important;letter-spacing:0!important;color:var(--text)}.studio-clock #timelineTime{cursor:ew-resize}.studio-clock #timelineEnd,.studio-clock-separator{color:var(--muted);font-size:12px}
.studio-track-controls{display:flex;gap:2px;align-items:center;min-width:0;margin-left:auto}.studio-track-controls>.studio-button{height:30px;min-width:28px;padding:5px}.studio-track-controls>#studioMusic{max-width:210px;min-width:0;gap:7px;font-size:12px}.studio-track-controls>#studioMusic>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-track-controls>#studioMusic.has-track{color:var(--text)}
#studioTimingSummary{font:12px Inter,sans-serif;font-variant-numeric:tabular-nums;border-left:1px solid var(--line);border-radius:0;padding-left:14px;color:var(--muted);min-width:fit-content}
.studio-timeline-overview{height:54px;min-height:54px;position:relative;touch-action:none;cursor:ew-resize;border-radius:4px;overflow:hidden;background:var(--studio-panel)}.studio-overview-svg{width:100%;height:100%;display:block;overflow:visible}
.studio-time-grid{stroke:var(--line);stroke-width:1;opacity:.65}.studio-ruler-text{font:11px Inter,sans-serif;fill:var(--muted);pointer-events:none}.studio-track-wave{fill:none;stroke:var(--accent);stroke-width:1.4;opacity:.8}.studio-empty-track{stroke:var(--line);stroke-width:1}.studio-time-playhead{stroke:var(--accent);stroke-width:1.5;pointer-events:none}.studio-time-handle{fill:var(--accent);pointer-events:none}.studio-cycle-boundary{stroke:var(--muted);opacity:.22;stroke-dasharray:2 3}.studio-silent-tail{fill:var(--bg);opacity:.65}.studio-key-wave{fill:none;stroke:var(--accent);stroke-width:1.5;opacity:.15;pointer-events:none}
.studio-cycle-nav{display:flex;align-items:center;min-width:0;gap:2px;white-space:nowrap}.studio-cycle-nav .studio-button{height:26px;min-width:25px;padding:3px}.studio-cycle-label{font:11px Inter,sans-serif;color:var(--muted);font-variant-numeric:tabular-nums}
.form-studio .studio-timeline.curves-open .studio-timeline-overview{display:none}.form-studio .studio-timeline.curves-open .curve-editor{grid-template-columns:166px minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:196px;max-height:32dvh;min-height:170px;margin:0;inset:auto;border:1px solid var(--line);border-radius:5px;background:var(--studio-panel);flex:none;width:100%;overflow:hidden}
.form-studio .studio-timeline .studio-key-work{grid-template-rows:34px minmax(70px,1fr) 36px;min-height:0}.form-studio .studio-timeline .studio-key-toolbar{padding:1px 8px;gap:3px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.form-studio .studio-timeline .studio-key-toolbar>strong{font-size:12px}.form-studio .studio-timeline .studio-key-toolbar .studio-button{height:28px;min-width:27px;padding:4px}.form-studio .studio-timeline .studio-key-toolbar .studio-field{font-size:11px}.form-studio .studio-timeline .studio-key-toolbar input{height:24px;width:44px;font-size:12px}.form-studio .studio-timeline .studio-key-graph-wrap{padding:0;min-height:0;touch-action:none}.form-studio .studio-timeline .studio-key-graph-wrap svg{height:100%;width:100%;touch-action:none;cursor:ew-resize}.form-studio .studio-timeline .studio-key-graph-wrap [data-keyframe]{cursor:move}
.form-studio .studio-timeline .studio-key-footer{padding:2px 8px;min-height:0;max-height:none;flex-wrap:nowrap;gap:8px;overflow:auto;font:12px Inter,sans-serif}.form-studio .studio-timeline .studio-key-footer .studio-field{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px}.form-studio .studio-timeline .studio-key-footer input{height:26px;font-size:12px}.form-studio .studio-timeline .studio-key-footer select{height:26px;font-size:12px}.form-studio .studio-timeline .studio-seam{font-size:11px;white-space:nowrap;flex-basis:auto}.form-studio .studio-timeline .studio-key-footer .studio-button{height:26px;min-width:26px}.form-studio .studio-timeline .studio-key-footer input[type=range]{width:80px;min-width:60px}
.form-studio .studio-timeline .studio-key-channels{padding:8px 7px}.form-studio .studio-timeline .studio-key-title{font-size:12px;margin-bottom:4px}.form-studio .studio-timeline .studio-key-title .studio-button{height:24px;min-width:24px}.form-studio .studio-timeline .studio-key-add{font-size:12px;height:28px;margin-bottom:5px}.form-studio .studio-timeline .studio-key-channels>.studio-button{font-size:12px;min-height:28px;height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:4px}.form-studio .studio-timeline .studio-key-channels>.studio-button>span:last-child{overflow:hidden;text-overflow:ellipsis}.form-studio .studio-timeline .studio-key-empty{font:13px/1.6 Inter,sans-serif;padding:12px}
.form-studio .studio-timeline.studio-no-key .studio-timeline-overview{display:block}.form-studio .studio-timeline.studio-no-key.curves-open .curve-editor{height:90px;min-height:90px;margin-top:6px}.form-studio .studio-timeline.studio-no-key .studio-key-work{display:flex;align-items:center}
.studio-time-popover{position:absolute;bottom:calc(100% + 8px);right:14px;width:min(380px,calc(100vw - 28px));max-height:min(560px,calc(100dvh - 140px));overflow:auto;overscroll-behavior:contain;z-index:80;padding:14px;background:var(--bg);border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 45px #0005}.studio-popover-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.studio-popover-heading strong{font:550 14px Inter,sans-serif}.studio-popover-heading .studio-button{height:26px;min-width:26px}
.studio-timing-control{margin:0 0 12px}.studio-timing-control-head{display:flex;justify-content:space-between;align-items:center;gap:12px;font:12px Inter,sans-serif}.studio-stepper{display:flex;align-items:center;border:1px solid var(--line);border-radius:5px}.studio-stepper .studio-button{min-width:28px;width:28px;height:28px;padding:6px}.studio-stepper input{width:62px;height:28px;border:0;background:transparent;color:var(--text);font:12px Inter,sans-serif;text-align:center;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}.studio-stepper input::-webkit-inner-spin-button{appearance:none}.studio-timing-control>input[type=range]{width:100%;height:23px;margin:4px 0 0;accent-color:var(--accent)}
.studio-time-presets{display:flex;gap:6px;margin:-6px 0 14px}.studio-time-presets .studio-button{background:var(--soft);flex:1;height:26px;font-size:12px}.studio-time-note{font:12px/1.5 Inter,sans-serif;color:var(--muted);margin:0 0 14px}.studio-output-fields{display:grid;grid-template-columns:72px 1fr;gap:10px;border-top:1px solid var(--line);padding-top:12px}.studio-output-field{display:grid;gap:6px;font:12px Inter,sans-serif;color:var(--muted)}.studio-output-field select{width:100%;height:32px;min-width:0;color:var(--text);border:1px solid var(--line);background:var(--bg);border-radius:5px;font:12px Inter,sans-serif;padding:4px}
.studio-audio-popover{width:min(510px,calc(100vw - 28px))}.studio-audio-name{font:12px Inter,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0 12px}.studio-audio-popover .music-wave-stage{height:74px}.studio-audio-popover .music-wave{height:74px}.studio-audio-popover .music-clip{margin:0;padding:0;border:0}.studio-audio-popover .music-hint{font-size:12px;margin:8px 0}.studio-audio-popover .music-clip-fields{margin:9px 0}.studio-audio-popover .music-clip-fields label{font-size:12px}.studio-audio-popover .music-clip-fields input{font-size:12px}.studio-audio-popover .music-selection-footer{font-size:12px}.studio-audio-actions{display:flex;justify-content:space-between;padding-top:8px;margin-top:8px;border-top:1px solid var(--line)}
.studio-timeline-status{position:absolute;bottom:calc(100% + 7px);left:14px;background:var(--bg);border:1px solid var(--line);border-radius:5px;padding:7px 10px;max-width:calc(100% - 28px);font:12px Inter,sans-serif;pointer-events:none;z-index:81}
.form-studio .studio-timeline.studio-timeline-collapsed{padding-bottom:0}.form-studio .studio-timeline.studio-timeline-collapsed::after{content:'';position:absolute;bottom:0;left:0;height:2px;width:var(--studio-time-progress,0%);background:var(--accent);pointer-events:none}.form-studio .studio-timeline.studio-timeline-collapsed .studio-timeline-overview,.form-studio .studio-timeline.studio-timeline-collapsed .curve-editor{display:none!important}.studio-track-drop{outline:2px solid var(--accent);outline-offset:-2px}
@media(max-width:1000px){.studio-cycle-nav{display:none!important}.studio-timeline-head{gap:7px}.studio-track-controls>#studioMusic{max-width:145px}.studio-clock{gap:5px}#studioTimingSummary{padding-left:9px}.form-studio .studio-timeline.curves-open .curve-editor{grid-template-columns:140px minmax(0,1fr)}}
@media(max-width:700px){.form-studio .timeline.studio-timeline,.form-studio .timeline.studio-timeline.curves-open{padding:0 8px 6px}.studio-timeline-head{height:42px;gap:3px;flex-wrap:nowrap}.studio-clock{gap:3px}.studio-clock .timeline-time{font-size:11px!important}.studio-clock #timelineEnd,.studio-clock-separator{display:none!important}.form-studio .studio-timeline .timeline-transport{gap:0}.form-studio .studio-timeline .timeline-transport button{width:28px!important;min-width:28px!important;height:30px!important}.form-studio .studio-timeline .timeline-transport>button:first-child{display:none}.studio-track-controls{margin-left:auto}.studio-track-controls>#studioMusic{width:30px;min-width:30px}.studio-track-controls>#studioMusic>span:last-child{display:none}.studio-track-controls>.studio-button{min-width:26px;width:26px}.studio-track-controls>button[aria-label="Remove music"]{display:none}#studioTimingSummary{min-width:0;max-width:92px;font-size:11px;padding:4px 6px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.studio-timeline-head>.studio-button:last-child{min-width:26px;width:26px;padding:4px}.studio-timeline-overview{height:50px;min-height:50px}.form-studio .studio-timeline.curves-open .curve-editor{grid-template-columns:102px minmax(0,1fr);height:210px;max-height:36dvh;min-height:172px}.form-studio .studio-timeline .studio-key-work{grid-template-rows:32px minmax(70px,1fr) 38px}.form-studio .studio-timeline .studio-key-channels{padding:4px}.form-studio .studio-timeline .studio-key-title{font-size:11px}.form-studio .studio-timeline .studio-key-add{font-size:11px}.form-studio .studio-timeline .studio-key-channels>.studio-button{font-size:11px}.form-studio .studio-timeline .studio-key-toolbar{gap:1px;padding:1px 3px}.form-studio .studio-timeline .studio-key-footer{gap:7px;padding:3px 5px}.form-studio .studio-timeline .studio-key-footer .studio-field{font-size:11px}.form-studio .studio-timeline .studio-key-footer input{width:52px}.form-studio .studio-timeline .studio-seam{display:none}.studio-time-popover{right:8px;width:min(380px,calc(100vw - 16px));max-height:calc(100dvh - 170px)}.studio-audio-popover{width:min(510px,calc(100vw - 16px))}.studio-time-popover .studio-button{min-height:30px}.studio-timing-control>input[type=range]{height:28px}}
@media(max-height:650px){.form-studio .studio-timeline.curves-open .curve-editor{height:170px;min-height:160px}.studio-time-popover{max-height:calc(100dvh - 110px)}}

.form-studio .studio-timeline .studio-time-popover{max-height:min(560px,calc(100dvh - var(--studio-panel-height,108px) - var(--studio-bottom-offset,0px) - var(--header,62px) - 28px))}
@media(max-width:370px){#studioTimingSummary{width:28px;min-width:28px;padding:4px;border:0}#studioTimingSummary>span:last-child{display:none}.studio-timeline-head{gap:2px}}
