#sceneTimeline { position:fixed; z-index:var(--layer-stack-65); /* 低于 cookie 同意条等通知（--z-notice 70），导入课件后首次访问也能点同意 */ left:var(--timeline-left,20px); right:20px; bottom:12px; padding:10px 14px; border:1px solid var(--n-200,#e4e4e7); border-radius:12px; color:var(--ink,#18181b); background:var(--surface,#fff); box-shadow:0 8px 30px #00000012; font:13px/1.4 Inter,PingFang SC,sans-serif; }
#sceneTimeline[hidden] { display:none; }
.timeline-controls,.timeline-settings { display:flex; align-items:center; gap:8px; }
.timeline-controls { margin-bottom:6px; }
#timelineTitle { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#sceneTimeline button,#sceneTimeline input,#sceneTimeline select { font:inherit; color:inherit; background:var(--surface,#fff); border:1px solid var(--n-200,#e4e4e7); border-radius:6px; padding:6px 9px; }
#sceneTimeline button:disabled { opacity:.45; }
#sceneTimeline button:focus-visible,#sceneTimeline input:focus-visible,#sceneTimeline select:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
#timelinePlay { background:var(--btn-primary-bg)!important; color:var(--btn-primary-fg)!important; }
#timelineDuration { width:64px; }
#timelineClock { margin-left:auto; white-space:nowrap; font-variant-numeric:tabular-nums; }
#timelineRanges .vis-timeline { border:0; font:inherit; }
#timelineRanges .vis-item { background:var(--n-100,#f4f4f5); color:var(--n-900,#18181b); border:1px solid var(--n-300,#d4d4d8); border-radius:6px; }
#timelineRanges .vis-item.vis-selected { border-color:var(--n-900,#18181b); box-shadow:0 0 0 1px var(--n-900,#18181b); }
#timelineRanges .vis-item .vis-item-content { padding:4px; }
.timeline-thumb { display:flex; gap:6px; align-items:center; max-width:230px; }
.timeline-thumb canvas { width:88px; height:50px; object-fit:contain; border-radius:3px; background:#0c241b; }
.timeline-thumb span { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#timelineScrub { width:100%; padding:0!important; margin:6px 0 0; accent-color:var(--n-900,#18181b); }
#timelineTransition { position:absolute; inset:0; width:100%; height:100%; z-index:var(--layer-stack-35); pointer-events:none; }
/* 底部背景与时间线共用 body 层叠上下文；根节点伪元素会盖住整个 body。 */
html[data-timeline-open] body::after { content:""; position:fixed; left:max(0px,calc(var(--timeline-left,20px) - 12px)); right:0; bottom:0; height:var(--timeline-height,230px); background:var(--surface-hover,#f4f4f5); z-index:var(--layer-stack-64); pointer-events:none; }
html[data-timeline-open] #pageManagerDock { visibility:hidden; pointer-events:none; }
/* Child buttons can set visibility themselves; keep the entire page dock out. */
html[data-timeline-open] #pageManagerDock * { visibility:hidden!important; pointer-events:none!important; }
html[data-timeline-open] :is(#ai-assistant-bar,#ai-assistant-reopen,#ai-assistant-hist,#ai-assistant-cards,#ai-assistant-note) { display:none!important; }
/* B-36: timeline (layer 65) must not block the bottom AI disc; lift disc above timeline, keep timeline controls usable via chromeTop. */
html[data-timeline-open] body #gbBottomTools.arc-disc { z-index:var(--layer-stack-66); pointer-events:auto; }
html[data-timeline-open] body #gbBottomTools.arc-disc #gbAiDisc { pointer-events:auto; }
html[data-timeline-open] #workbenchWrapper { transition:none!important; flex:0 0 auto!important; max-height:none!important; height:calc(100dvh - var(--workspace-nav-height,120px) - var(--timeline-height,230px))!important; min-height:0!important; padding-bottom:0!important; }
html[data-timeline-preview] #redesignContext,html[data-timeline-preview] #t1021ToolOpts { visibility:hidden; }
/* 手机上时间线占满底部：工具选项浮层（固定在右侧中部）会压住时间线按钮，同一时间只留时间线 */
@media(max-width:640px) { html[data-timeline-open] #t1021ToolOpts { visibility:hidden!important; pointer-events:none!important; } }
html[data-timeline-preview] #mainCanvas,html[data-timeline-preview] #threeLayer { pointer-events:none; }
html[data-timeline-media] #mainCanvas,html[data-timeline-media] #threeLayer { opacity:0!important; }
@media(max-width:640px) {
 #sceneTimeline { left:6px; right:6px; bottom:calc(6px + var(--mobile-safe-bottom, env(safe-area-inset-bottom, 0px))); padding:8px; }
 .timeline-controls { flex-wrap:wrap; gap:5px; }
 #timelineTitle { flex-basis:100%; }
 #timelineClose { margin-left:auto; }
 .timeline-settings { flex-wrap:wrap; gap:5px; }
 #sceneTimeline button { min-height:38px; }
 #timelineClock { font-size:12px; }
 #sceneTimeline label { font-size:12px; }
 #timelineDuration { width:54px; }
 #timelineTransitionKind { width:100px; }

}
@media(prefers-reduced-motion:reduce) { #timelineTransition { display:none; } }
/* The mobile tool dock otherwise sits over the scene range and duration controls. */
@media(max-width:640px) { html[data-timeline-open] #leftSidebar { visibility:hidden; pointer-events:none; } }
