/**
 * Left column — PR-like program monitor with resizable timeline
 */

.workspace-left {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  gap: 0 !important;
  background: var(--cg-bg-raised, #0a0a0c) !important;
}

:root[data-density] .workspace-left {
  gap: 0 !important;
}

:root[data-density] .workspace-transport-stack {
  gap: 0 !important;
}

/* Unified program card — single border avoids resize seam between monitor + control bar */
.program-monitor-shell {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  background: var(--cg-surface, #101012) !important;
  border: 1px solid var(--cg-line, rgba(255, 255, 255, 0.09)) !important;
  border-radius: var(--cg-radius-md, 7px) !important;
  box-sizing: border-box !important;
}

/* Control bar — bottom of unified program card */
.workspace-left-stage-tail {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: var(--workspace-transport-pad-y, 7px) 0 calc(var(--workspace-transport-pad-y, 7px) + 1px) !important;
  background: var(--cg-surface, #101012) !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.workspace-left:has(#playerBox.empty) .workspace-left-stage-tail {
  margin-top: auto !important;
}

/* Program monitor — top of unified program card */
.player-wrapper.video-viewport-host {
  flex: 1 1 0 !important;
  height: auto !important;
  min-height: 160px !important;
  min-width: 0 !important;
  width: 100% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Blank workspace — center the 16:9 program window in the area above transport/timeline */
.workspace-left:has(#playerBox.empty) .program-monitor-shell {
  justify-content: flex-start !important;
}

.workspace-left:has(#playerBox.empty) .player-wrapper.video-viewport-host {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  justify-content: center !important;
  align-items: center !important;
}

.workspace-left:has(#playerBox.empty) .workspace-left-stage-tail {
  margin-top: 0 !important;
  flex: 0 0 auto !important;
}
.workspace-left:has(#playerBox.empty) .stage-row-resizer {
  margin-top: 0 !important;
}

.player-wrapper.video-viewport-host:has(#playerBox.empty) .program-monitor-surface {
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 100% !important;
  background: #000 !important;
}

.player-wrapper.video-viewport-host:has(#playerBox.empty) #playerBox.player-container.empty {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  background: #000 !important;
}

.player-wrapper.video-viewport-host:not(:has(#playerBox.empty)) {
  background: var(--cg-surface, #101012) !important;
}

.player-wrapper.video-viewport-host:not(:has(#playerBox.empty)) .program-monitor-surface {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: unset !important;
  background: var(--cg-surface, #101012) !important;
}

.stage-row-resizer {
  flex: 0 0 var(--workspace-split-gap, 4px) !important;
  height: var(--workspace-split-gap, 4px) !important;
  margin: 4px 0 0 !important;
  cursor: row-resize;
  position: relative;
  z-index: 200;
  touch-action: none;
  flex-shrink: 0 !important;
  background: transparent !important;
}

/* Invisible seam — same width as column resizers, drag still works */
.stage-row-resizer::before {
  content: none !important;
  display: none !important;
}

.stage-row-resizer:hover::before,
.stage-row-resizer.is-active::before {
  content: none !important;
  display: none !important;
}

.workspace-transport-stack {
  flex: 0 0 var(--workspace-timeline-h, auto) !important;
  flex-shrink: 0 !important;
  min-height: 96px !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

.program-monitor-surface {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: var(--cg-surface, #101012) !important;
  position: relative !important;
}

.program-monitor-surface > #playerBox.player-container {
  flex: 0 1 auto !important;
  width: var(--program-video-w, 100%) !important;
  height: var(--program-video-h, 100%) !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}

#playerBox.player-container {
  flex: 0 1 auto !important;
  position: relative !important;
  width: var(--program-video-w, 100%) !important;
  height: var(--program-video-h, 100%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--cg-surface, #101012) !important;
  cursor: pointer;
  overflow: hidden !important;
}

#playerBox.player-container:not(.empty) > video {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

#playerBox.player-container.empty {
  width: 100% !important;
  height: 100% !important;
}

#playerBox.player-container.empty .empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

#playerBox.player-container video,
.player-container video,
#playerBox video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: var(--cg-surface, #101012) !important;
  outline: none !important;
}

#playerBox .video-ui-layer {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  z-index: 30 !important;
  pointer-events: none !important;
}

#playerBox .video-ui-layer > * {
  pointer-events: auto;
}

.player-wrapper.video-viewport-host > .dashboard,
.workspace-left-stage-tail > .dashboard {
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.player-wrapper.video-viewport-host .control-console {
  background: var(--cg-surface, #101012) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.workspace-transport-stack .timeline-wrapper {
  flex: 1 1 0 !important;
  min-height: 0 !important;
}

.workspace-left .timeline-container {
  flex: 1 1 0 !important;
  height: auto !important;
  min-height: 72px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

:root[data-density] .workspace-left .timeline-container {
  height: auto !important;
}

.workspace-left #timelineTrack {
  padding-top: 0 !important;
}

/* Legacy single-lane overrides — dual-lane layout uses timeline-dual-lane.css */
.workspace-left #timelineTrack:not(.timeline-track--stacked) #waveformCanvas,
.workspace-left #timelineTrack:not(.timeline-track--stacked) #ioRange,
.workspace-left #timelineTrack:not(.timeline-track--stacked) #multiRangeContainer,
.workspace-left #timelineTrack:not(.timeline-track--stacked) #playhead {
  top: calc(var(--timeline-ruler-h, 26px) + var(--timeline-wave-pad, 0px)) !important;
  height: var(--timeline-wave-band-h, auto) !important;
  bottom: auto !important;
}

.workspace-left #timelineTrack:not(.timeline-track--stacked) #playheadTime {
  top: 6px !important;
}

.player-program-zoom-ctrl {
  position: absolute;
  /* Sit between speed (right) and volume (further left) so volume can expand without covering 适合. */
  right: 72px;
  bottom: 16px;
  z-index: 35;
  height: 28px;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.player-program-zoom-ctrl[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.95);
  color: #d1d1d6;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'PingFang SC', sans-serif;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 8000;
  border: 1px solid #3a3a3c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.player-program-zoom-ctrl[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.player-program-zoom-select {
  box-sizing: border-box;
  height: 28px;
  min-width: 0;
  width: auto;
  max-width: 72px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.92);
  /* Tight pill: text + chevron, no empty right gutter. */
  padding: 0 20px 0 10px;
  font: 600 11px/28px 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2.2 3.6L5 6.4L7.8 3.6' stroke='rgba(255,255,255,0.88)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 10px;
  text-align: left;
}

.player-program-zoom-select:hover,
.player-program-zoom-select:focus {
  background-color: rgba(0, 0, 0, 0.82);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2.2 3.6L5 6.4L7.8 3.6' stroke='rgba(255,255,255,0.88)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 10px;
}

.player-audio-ctrl {
  padding: 0 !important;
}

.player-audio-ctrl .audio-icon-wrapper {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  line-height: 0;
  /* Volume glyph is left-heavy (solid cone vs thin waves) — nudge right for optical center */
  transform: translateX(1.75px);
}

.player-audio-ctrl .audio-icon-wrapper svg {
  display: block;
  width: 18px;
  height: 18px;
}

.player-audio-ctrl:hover .audio-icon-wrapper {
  margin-left: 8px;
}

body[data-media-ready-stage='video_loading'] #waveformCanvas,
body[data-media-ready-stage='waveform_loading'] #waveformCanvas {
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

body[data-media-ready-stage='waveform_ready'] #waveformCanvas,
body[data-media-ready-stage='preview_loading'] #waveformCanvas,
body[data-media-ready-stage='preview_ready'] #waveformCanvas,
body[data-media-ready-stage='analysis_loading'] #waveformCanvas,
body[data-media-ready-stage='analysis_ready'] #waveformCanvas {
  opacity: 0.88;
}

.workspace-left .io-duration-float {
  top: calc(var(--timeline-ruler-h, 20px) + 12px) !important;
  bottom: auto !important;
}

.workspace-left.is-stage-synced {
  flex: 0 0 var(--stage-video-w) !important;
  width: var(--stage-video-w) !important;
  min-width: var(--stage-video-w) !important;
  max-width: var(--stage-video-w) !important;
}

.workspace-middle {
  flex: 1 1 var(--workspace-shot-library-active-w, var(--workspace-shot-library-w, 400px)) !important;
  min-width: var(--workspace-shot-library-active-w, var(--workspace-shot-library-w, 320px)) !important;
  width: auto !important;
  max-width: none !important;
}

.workspace-right.is-stage-synced,
.workspace-right {
  width: var(--workspace-inspector-active-w, var(--workspace-inspector-w, 320px)) !important;
  flex: 0 0 var(--workspace-inspector-active-w, var(--workspace-inspector-w, 320px)) !important;
  margin-left: auto !important;
}

.split-workspace {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

.workspace-middle,
.workspace-right {
  border: 0 !important;
}

.workspace-left .scrollbar-track {
  border: 0 !important;
}

/* PR 式分隔条：与 stage-row-resizer 同宽 */
.split-workspace .layout-resizer,
:root[data-density] .split-workspace .layout-resizer {
  width: var(--workspace-split-gap, 4px) !important;
  min-width: var(--workspace-split-gap, 4px) !important;
  max-width: var(--workspace-split-gap, 4px) !important;
  margin: 0 !important;
  flex-shrink: 0;
  cursor: col-resize;
  z-index: 120;
  position: relative;
  touch-action: none;
}

.split-workspace .layout-resizer::before {
  content: none;
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease, width 0.15s ease, top 0.15s ease, bottom 0.15s ease;
}

.split-workspace .layout-resizer.is-active {
  background: transparent;
}

/* AI 场景检测弹窗 — 对齐批量提取静帧 loading 设计语言 */
.scene-detect-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: none;
  transition: opacity 0.28s ease;
}

.scene-detect-modal[hidden] {
  display: none !important;
}

.scene-detect-modal.is-fading {
  opacity: 0;
  pointer-events: none;
}

.scene-detect-modal-card {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  padding: 20px 30px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.scene-detect-modal-card > b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f7;
}

.scene-detect-phase,
.scene-detect-count-row {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #8e8e93;
}

.scene-detect-count-row {
  font-variant-numeric: tabular-nums;
}

#sceneDetectCount {
  color: #d1d1d6;
  font-weight: 600;
  transition: color 0.12s ease;
}

#sceneDetectCount.is-tick {
  color: #f5f5f7;
}

.scene-detect-summary {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--cg-brand, #a3e635);
  font-variant-numeric: tabular-nums;
}

/* 场景检测配置 / 确认弹窗 — 与 scene-detect-modal、loading 同一遮罩语言 */
.scene-detect-dialog-card {
  width: min(380px, calc(100vw - 40px));
  text-align: left;
  padding: 22px 26px 20px;
}

.scene-detect-dialog-lead {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #8e8e93;
  font-weight: 400;
}

.scene-detect-dialog-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #8e8e93;
}

.scene-detect-dialog-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.scene-detect-dialog-mode {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.scene-detect-dialog-sens {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.scene-detect-dialog-sens-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scene-detect-sens-range {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.scene-detect-sens-val {
  flex: 0 0 auto;
  min-width: 40px;
  font-family: var(--cg-font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: #8e8e93;
  text-align: right;
}

.scene-detect-dialog-mode-title {
  font-size: 11px;
  color: #8e8e93;
  flex: 0 0 auto;
}

.scene-detect-dialog-mode-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.scene-detect-dialog-options-head {
  margin-bottom: 8px;
}

.scene-detect-dialog-mode-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.scene-detect-dialog-mode-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: #d1d1d6;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.scene-detect-dialog-mode-item:has(input:checked) {
  background: rgba(163, 230, 53, 0.16);
  color: #a3e635;
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.34);
}

.scene-detect-dialog-mode-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scene-detect-dialog-mode-hint {
  color: #8e8e93;
  font-size: 11px;
  line-height: 1.45;
}

.scene-detect-dialog-mode-hint.is-inline {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-detect-dialog-mode-hint.is-warn {
  color: rgba(255, 179, 64, 0.95);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.scene-detect-dialog-mode-hint.is-warn.is-flash {
  animation: scene-detect-hint-flash 0.95s ease;
}

@keyframes scene-detect-hint-flash {
  0%,
  100% {
    opacity: 1;
    color: rgba(255, 179, 64, 0.95);
  }
  20%,
  60% {
    opacity: 0.25;
    color: rgba(255, 210, 90, 1);
  }
  40%,
  80% {
    opacity: 1;
    color: rgba(255, 196, 64, 1);
  }
}

.scene-detect-dialog-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #d1d1d6;
  cursor: pointer;
}

.scene-detect-dialog-check[hidden] {
  display: none !important;
}

.scene-detect-dialog-check-note {
  color: #8e8e93;
  font-weight: 500;
}

.scene-detect-dialog-check input {
  margin-top: 2px;
  accent-color: var(--cg-brand, #a3e635);
}

.scene-detect-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* 分镜台入口弹窗：收紧垂直节奏，正文/勾选一组，按钮一组 */
#storyboardDeskPromptModal .sb-desk-prompt-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(400px, calc(100vw - 40px));
  padding: 20px 22px 16px;
  gap: 0;
}

#storyboardDeskPromptModal .sb-desk-prompt-card > b {
  margin: 0;
  line-height: 1.35;
}

#storyboardDeskPromptModal .sb-desk-prompt-lead {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #c7c7cc;
}

#storyboardDeskPromptModal .sb-desk-prompt-skip {
  margin: 12px 0 0;
  align-items: center;
  color: #8e8e93;
  font-size: 12px;
}

#storyboardDeskPromptModal .sb-desk-prompt-skip input {
  margin-top: 0;
}

#storyboardDeskPromptModal .sb-desk-prompt-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-detect-dialog-primary {
  background: var(--cg-brand, #a3e635) !important;
  color: #0a0a0c !important;
  border: 1px solid rgba(163, 230, 53, 0.55) !important;
  font-weight: 700;
}

.scene-detect-dialog-primary:hover:not(:disabled),
.scene-detect-dialog-primary:focus-visible:not(:disabled),
.scene-detect-dialog-primary:active:not(:disabled) {
  background: var(--cg-brand-hover, #b8f04a) !important;
  border-color: var(--cg-brand-hover, #b8f04a) !important;
  color: #0a0a0c !important;
}

.scene-detect-dialog-primary:disabled {
  background: #2c2c2e !important;
  color: #555 !important;
  cursor: not-allowed;
}

.scout-more-wrap {
  position: relative;
}

.scout-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8000;
  min-width: 188px;
  padding: 6px;
  border-radius: 10px;
  background: #2c2c2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.scout-more-menu[hidden] {
  display: none !important;
}

.scout-more-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #f5f5f7;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.scout-more-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.loading-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  text-align: left;
  font-size: 11px;
  line-height: 1.6;
  color: #8e8e93;
}

.loading-steps li.is-done {
  color: var(--cg-brand, #a3e635);
}

.loading-steps li.is-active {
  color: #f5f5f7;
}

.loading-cancel {
  display: block;
  margin: 14px auto 0;
  min-width: 88px;
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--cg-line, #28282a);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cg-text-secondary, #d1d1d6);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.loading-cancel:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--cg-text, #f5f5f7);
  background: rgba(255, 255, 255, 0.09);
}

.loading-cancel[hidden] {
  display: none !important;
}

.scene-detect-cancel {
  display: block;
  margin: 16px auto 0;
  min-width: 96px;
  padding: 7px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #d1d1d6;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.scene-detect-cancel:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.1);
}

.scene-detect-cancel[hidden] {
  display: none !important;
}

/* Init scan — video stays visible; light banner only */
.init-scan-banner {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 12;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
}

body.is-init-scan #video {
  visibility: visible !important;
  opacity: 1 !important;
}

body.is-init-scan #playerBox::after {
  display: none !important;
}

/* Web preview failed — explain black player without looking like a bug */
.web-playback-alert {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 14;
  max-width: min(92%, 420px);
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(18, 18, 22, 0.92);
  border: 1px solid rgba(255, 69, 58, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  text-align: center;
  pointer-events: none;
}

.web-playback-alert-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #ff6961;
  margin-bottom: 6px;
}

.web-playback-alert-body {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: #d1d1d6;
}


body.is-init-scan #loading[hidden] {
  display: none !important;
}
