/* ==========================================================
   v4.43 剪映式剪辑台 — 独立主题 (赛博风 / 不透明实色面板)
   面板背景一律 #101a2e / #0c1526 实色, 不用半透明变量
   ========================================================== */
.ed-overlay {
  /* v4.44: 低于主程序弹窗 (1000~1400), 否则从剪辑台点文案库/风格预览会被挡住 */
  position: fixed; inset: 0; z-index: 900;
  background: rgba(3, 7, 18, .86);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ed-overlay[hidden] { display: none; }

.ed-shell {
  position: relative;                  /* 剪辑设置抽屉的定位基准 */
  width: min(1560px, calc(100vw - 40px));
  height: calc(100vh - 40px);
  background: #101a2e;                 /* 不透明实色 */
  border: 1px solid rgba(0, 240, 255, .34);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 43, 214, .10), 0 24px 80px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column; overflow: hidden;
  color: #dceaf7; font-size: 12.5px;
}

/* ---------- 顶栏 ---------- */
.ed-top {
  flex: 0 0 56px; display: flex; align-items: center; gap: 16px;
  padding: 0 16px; border-bottom: 1px solid rgba(0, 240, 255, .16);
  background: #101a2e;
}
.ed-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.ed-title .ic { width: 18px; height: 18px; color: #00f0ff; }
.ed-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border: 1px solid rgba(255, 43, 214, .5); border-radius: 999px;
  color: #ff7ae4; font-size: 10.5px; font-weight: 600; background: #1a1030;
}
.ed-top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.ed-top-actions select, .ed-top-actions .btn { height: 30px; }

.ed-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(0, 240, 255, .28); background: #16233c; color: #cfe8f7;
  font-size: 12px; font-weight: 600; white-space: nowrap; transition: .15s;
}
.ed-btn:hover { border-color: #00f0ff; color: #fff; background: #1b3050; }
.ed-btn:active { transform: scale(.97); }
.ed-btn.primary { background: #00c8dd; border-color: #00e0f5; color: #04121c; }
.ed-btn.primary:hover { background: #38e2f2; color: #04121c; }
.ed-btn.danger { border-color: rgba(255, 90, 110, .5); color: #ff8a9c; }
.ed-btn.ghost { background: transparent; }
.ed-btn:disabled { opacity: .4; cursor: not-allowed; }
.ed-btn .ic { width: 14px; height: 14px; flex: 0 0 14px; }
.ed-sel {
  height: 30px; padding: 0 8px; border-radius: 7px;
  border: 1px solid rgba(0, 240, 255, .28); background: #16233c; color: #dceaf7;
  font-size: 12px; outline: none; max-width: 180px;
}

/* ---------- 三栏主体 ---------- */
.ed-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr) 258px; }
.ed-pane { background: #0c1526; overflow-y: auto; min-height: 0; }
.ed-pane.left { border-right: 1px solid rgba(0, 240, 255, .13); }
.ed-pane.right { border-left: 1px solid rgba(0, 240, 255, .13); }
.ed-pane::-webkit-scrollbar { width: 8px; }
.ed-pane::-webkit-scrollbar-thumb { background: #27405e; border-radius: 8px; }
.ed-pane::-webkit-scrollbar-track { background: #0c1526; }

.ed-pane-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  background: #12203a; border-bottom: 1px solid rgba(0, 240, 255, .14);
  color: #7fe6f5; font-size: 11px; font-weight: 700; letter-spacing: .6px;
}
.ed-pane-head .ed-mini { margin-left: auto; font-size: 10px; color: #7a93ad; font-weight: 500; }

.ed-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ed-src, .ed-preset-item {
  display: flex; align-items: center; gap: 8px; min-height: 34px;
  padding: 6px 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; background: #14213a; color: #cbdcec;
  transition: .14s;
}
.ed-src:hover, .ed-preset-item:hover { border-color: rgba(0, 240, 255, .45); background: #182b49; }
.ed-src.sel, .ed-preset-item.sel { border-color: #00f0ff; background: #123a4c; color: #fff; }
.ed-src .ic, .ed-preset-item .ic { width: 14px; height: 14px; flex: 0 0 14px; color: #4bc8e0; }
.ed-src-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.ed-tag { flex: 0 0 auto; font-size: 9.5px; color: #7fe6f5; border: 1px solid rgba(0,240,255,.3); border-radius: 4px; padding: 1px 4px; }
.ed-empty { padding: 14px 10px; color: #7089a3; font-size: 11px; line-height: 1.7; }

/* ---------- 中间预览 ---------- */
/* 覆盖主程序全局 main{max-width:1100px;margin:24px auto;padding:0 32px} —
   否则 margin:auto 会让 grid 列不拉伸, 中间预览区被压到 458px */
.ed-main {
  background: #070d18; display: flex; flex-direction: column;
  min-width: 0; min-height: 0; width: auto; max-width: none;
  margin: 0; padding: 0; flex: 1 1 auto;
}
.ed-preview { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
/* v4.43.1: 尺寸由 JS 按「可用宽 + 可用高」精确计算。
   不能同时用 aspect-ratio + max-height:100% —— Chrome 会用 max-height 反推宽度,
   结果所有尺寸选项都被压成同一个小框 (实测 331px)。 */
.ed-stage {
  position: relative; flex: 0 0 auto;
  width: 640px; height: 360px; max-width: 100%;
  background: #000;
  border: 1px solid rgba(0,240,255,.28); border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,43,214,.08), 0 10px 40px rgba(0,0,0,.55);
  overflow: hidden;
}
.ed-stage video, .ed-stage .ed-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; border: 0;
}
.ed-stage video[hidden], .ed-stage .ed-frame[hidden] { display: none; }
.ed-stage-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: #6f8ba5; font-size: 11.5px;
}
.ed-stage-empty[hidden] { display: none; }
.ed-stage-empty .ic { width: 42px; height: 42px; color: #00f0ff; opacity: .6; }
/* v4.44.5: 常态只留 22x22 小钮 (原 200x34 → 108x24 → 22x22), 点开才出选项, 基本不挡画面 */
.ed-size-ctl {
  position: absolute; right: 6px; bottom: 6px; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end;
}
.ed-size-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  background: #101a2e;                 /* 不透明实色 */
  border: 1px solid rgba(0,240,255,.34); border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,.6); color: #7fe6f5; cursor: pointer;
}
.ed-size-toggle:hover, .ed-size-ctl.open .ed-size-toggle { border-color: #00f0ff; color: #fff; }
.ed-size-toggle .ic { width: 12px; height: 12px; }
/* 展开的选项板: 不透明实色, 在小钮正上方, 只在用户主动点开时出现 */
.ed-size-panel {
  position: absolute; right: 0; bottom: 28px;
  display: none; align-items: center; gap: 6px; height: 28px; padding: 0 7px;
  background: #101a2e;                 /* 不透明实色 */
  border: 1px solid rgba(0,240,255,.34); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.7); color: #9fc6dc; font-size: 10px; white-space: nowrap;
}
.ed-size-ctl.open .ed-size-panel { display: flex; }
.ed-size-panel .ed-sel { height: 20px; min-width: 62px; max-width: 74px; font-size: 10px; padding: 0 3px; border-radius: 5px; }
.ed-size-ico { display: inline-flex; align-items: center; color: #6fa8c4; }
.ed-size-ico .ic { width: 12px; height: 12px; }
.ed-size-drag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px; cursor: nwse-resize;
  color: #00f0ff; touch-action: none; user-select: none;
}
.ed-size-drag:hover { background: #1b3050; }
.ed-size-drag .ic { width: 11px; height: 11px; }
.ed-preview-bar {
  flex: 0 0 34px; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  border-top: 1px solid rgba(0,240,255,.12); background: #0c1526; color: #8fb0c9; font-size: 11px;
}
.ed-preview-bar b { color: #00f0ff; font-variant-numeric: tabular-nums; }

/* ---------- 右侧属性 ---------- */
.ed-props { padding: 10px 12px 20px; display: flex; flex-direction: column; gap: 12px; }
.ed-prop-row { display: flex; flex-direction: column; gap: 5px; }
.ed-prop-row > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #93b2cb; font-size: 11px; }
.ed-prop-row > label b { color: #00f0ff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-prop-row input[type=text], .ed-prop-row input[type=number],
.ed-prop-row select, .ed-prop-row textarea {
  width: 100%; height: 30px; padding: 0 8px; box-sizing: border-box;
  background: #14213a; color: #e3f2ff; border: 1px solid rgba(0,240,255,.24);
  border-radius: 6px; font-size: 12px; outline: none;
}
.ed-prop-row textarea { height: 58px; padding: 6px 8px; resize: vertical; }
.ed-prop-row input[type=range] { width: 100%; accent-color: #00f0ff; }
.ed-prop-sep { height: 1px; background: rgba(0,240,255,.12); margin: 2px 0; }
.ed-prop-hint { color: #6f8ba5; font-size: 10.5px; line-height: 1.6; }
.ed-clip-meta { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 7px; background: #14213a; border: 1px solid rgba(0,240,255,.18); }
.ed-clip-meta .ic { width: 16px; height: 16px; color: #00f0ff; flex: 0 0 16px; }
.ed-clip-meta span { font-size: 11.5px; color: #cfe8f7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 底部时间线 ---------- */
.ed-tl { flex: 0 0 252px; display: flex; flex-direction: column; background: #0c1526; border-top: 1px solid rgba(0,240,255,.2); min-height: 0; }
.ed-tl-head { flex: 0 0 42px; display: flex; align-items: center; gap: 14px; padding: 0 12px; border-bottom: 1px solid rgba(0,240,255,.12); }
.ed-tl-head .ed-sep { width: 1px; height: 20px; background: rgba(0,240,255,.18); margin: 0 4px; }
.ed-tl-head .ed-tl-info { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #8fb0c9; font-size: 11px; }
.ed-tl-head .ed-tl-info b { color: #00f0ff; font-variant-numeric: tabular-nums; }

.ed-tl-scroll { flex: 1 1 auto; overflow: auto; position: relative; }
.ed-tl-inner { position: relative; min-width: 100%; }
.ed-ruler { position: relative; height: 24px; background: #101d33; border-bottom: 1px solid rgba(0,240,255,.14); }
.ed-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(0,240,255,.16); }
.ed-tick span { position: absolute; top: 4px; left: 4px; color: #6f8ba5; font-size: 9.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-tick.major { border-left-color: rgba(0,240,255,.42); }
.ed-tick.major span { color: #9fd8e8; }

.ed-track { position: relative; height: 46px; border-bottom: 1px solid rgba(0,240,255,.08); }
.ed-track:nth-child(even) { background: rgba(255,255,255,.012); }
.ed-track-label {
  position: sticky; left: 0; z-index: 3; float: left;
  display: flex; align-items: center; gap: 6px;
  width: 92px; height: 46px; padding: 0 8px; box-sizing: border-box;
  background: #12203a; border-right: 1px solid rgba(0,240,255,.16);
  color: #9fd8e8; font-size: 10.5px; font-weight: 600;
}
.ed-track-label .ic { width: 13px; height: 13px; flex: 0 0 13px; color: #4bc8e0; }
.ed-track-canvas { position: absolute; left: 92px; top: 0; height: 46px; }
.ed-clip {
  position: absolute; top: 6px; height: 34px; box-sizing: border-box;
  border-radius: 5px; border: 1px solid rgba(0,240,255,.4);
  border-left: 3px solid #00f0ff; background: #193a55;
  color: #e6f6ff; font-size: 10.5px; line-height: 32px; padding: 0 7px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: grab; user-select: none;
}
.ed-clip:hover { border-color: #00f0ff; background: #20506f; }
.ed-clip.selected { outline: 2px solid #ff2bd6; outline-offset: 1px; background: #20506f; z-index: 2; }
.ed-clip.dragging { opacity: .7; cursor: grabbing; }
.ed-clip[data-kind=text] { border-left-color: #ffd166; background: #4a3a1c; }
.ed-clip[data-kind=effect] { border-left-color: #a78bfa; background: #332a55; }
.ed-clip[data-kind=audio] { border-left-color: #34d399; background: #164536; }
.ed-clip .ed-clip-badge { display: inline-block; margin-left: 6px; padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.3); font-size: 9px; line-height: 16px; vertical-align: 1px; }
.ed-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #ff2bd6; pointer-events: none; z-index: 5; }
.ed-playhead::before { content: ''; position: absolute; top: 0; left: -5px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid #ff2bd6; }
.ed-track-empty { position: absolute; left: 100px; top: 14px; color: #4d6883; font-size: 10.5px; pointer-events: none; }

.ed-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 1600; padding: 10px 18px; border-radius: 8px;
  background: #101a2e; border: 1px solid #00f0ff; color: #e6f6ff;
  box-shadow: 0 8px 30px rgba(0,0,0,.6); font-size: 12.5px;
}

/* 第 4 步预设卡片 + 第 5 步迁移提示 */
.ed-preset-section { margin: 18px 0; }
.ed-preset-cards { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.ed-preset-card {
  display: flex; align-items: center; gap: 12px; min-width: 240px;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(0,240,255,.28); background: #14213a; transition: .15s;
}
.ed-preset-card:hover { border-color: #00f0ff; background: #182b49; }
.ed-preset-card.sel { border-color: #00f0ff; background: #123a4c; box-shadow: 0 0 0 1px rgba(0,240,255,.25); }
.ed-preset-card .ed-pc-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; background: #123a4c; color: #00f0ff; }
.ed-preset-card .ed-pc-icon .ic { width: 18px; height: 18px; }
.ed-preset-card .ed-pc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ed-preset-card .ed-pc-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #e6f6ff; }
.ed-preset-card .ed-pc-desc { font-size: 11px; color: #93b2cb; line-height: 1.5; }
.ed-preset-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.ed-moved-hint {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 14px;
  border: 1px dashed rgba(0,240,255,.34); border-radius: 9px; background: #101a2e;
  color: #9fd8e8; font-size: 11.5px;
}
.ed-moved-hint .ed-moved-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

@media (max-width: 1100px) {
  .ed-body { grid-template-columns: 170px minmax(0,1fr) 210px; }
  .ed-tl { flex-basis: 220px; }
}
@media (max-width: 800px) {
  .ed-body { grid-template-columns: 1fr; grid-template-rows: minmax(180px, 1fr) auto; }
  .ed-pane.left, .ed-pane.right { display: none; }
  .ed-overlay { padding: 6px; }
  .ed-shell { width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .ed-top { gap: 8px; padding: 0 8px; }
  .ed-title { font-size: 12px; }
  .ed-badge { display: none; }
}

/* ==========================================================
   v4.43.1 — 素材由用户自选 (初始为空) + 预览窗口尺寸可选
   ========================================================== */
.ed-src-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 8px 4px; }
.ed-src-tools .ed-btn { height: 28px; padding: 0 9px; font-size: 11px; gap: 4px; }
.ed-src-tools .ed-btn .ic { width: 12px; height: 12px; flex-basis: 12px; }
.ed-src-dir {
  margin: 0 8px 6px; padding: 5px 8px;
  border: 1px solid rgba(0,240,255,.16); border-radius: 6px;
  background: #101a2e; color: #7fb8cf; font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ed-src-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 150px; padding: 18px 10px; text-align: center;
  border: 1px dashed rgba(0,240,255,.3); border-radius: 9px;
  background: #101a2e; color: #7d9ab4;
}
.ed-src-empty .ic { width: 30px; height: 30px; color: #00f0ff; opacity: .7; }
.ed-src-empty b { color: #cfe8f7; font-size: 12px; }
.ed-src-empty span { font-size: 11px; line-height: 1.7; }
.ed-src-x {
  flex: 0 0 18px; width: 18px; height: 18px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 4px; background: transparent;
  color: #6f8ba5; font-size: 14px; line-height: 1; cursor: pointer;
}
.ed-src-x:hover { background: rgba(255,90,110,.18); color: #ff8a9c; }
.ed-tl-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; height: 150px; color: #6f8ba5;
}
.ed-tl-empty .ic { width: 26px; height: 26px; color: #00f0ff; opacity: .55; }
.ed-tl-empty b { color: #cfe8f7; font-size: 12px; }
.ed-tl-empty span { font-size: 11px; }

/* 选素材位置弹窗 — 面板不透明实色, 遮罩 0.86 */
.ed-modal { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center; }
.ed-modal[hidden] { display: none; }
.ed-modal-mask { position: absolute; inset: 0; background: rgba(3,7,18,.86); }
.ed-modal-card {
  position: relative; z-index: 1; width: min(560px, calc(100vw - 40px));
  padding: 18px 20px 16px; background: #101a2e;
  border: 1px solid rgba(0,240,255,.42); border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75);
}
.ed-modal-title { font-size: 15px; font-weight: 700; color: #e6f6ff; }
.ed-modal-sub { margin-top: 6px; font-size: 11.5px; color: #8fb0c9; line-height: 1.6; }
.ed-modal-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ed-modal-row .ed-sel { flex: 1 1 auto; min-width: 0; max-width: none; height: 32px; font-size: 12px; }
.ed-modal-row .ed-btn { height: 32px; }
.ed-modal-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #b9d4e6; font-size: 11.5px; cursor: pointer; }
.ed-modal-check input { accent-color: #00f0ff; }
.ed-modal-hint { margin-top: 6px; color: #6f8ba5; font-size: 10.5px; }
.ed-modal-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.ed-modal-spacer { flex: 1 1 auto; }

/* 第 4 步: 素材来源行 (与剪辑台共用同一状态) */
.ed-src-brief {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 14px; padding: 9px 12px;
  border: 1px solid rgba(0,240,255,.24); border-radius: 9px; background: #101a2e;
}
.ed-src-brief-label { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #7fe6f5; letter-spacing: .5px; }
.ed-src-brief-text {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; color: #b9d4e6;
}
.ed-src-brief .btn { flex: 0 0 auto; height: 30px; padding: 0 12px; font-size: 11.5px; white-space: nowrap; }
@media (max-width: 640px) {
  .ed-src-brief { flex-wrap: wrap; gap: 10px; }
  .ed-size-ctl { right: 6px; bottom: 6px; }
}

/* 影院模式: 选大尺寸时收起左右栏与时间线, 把面积全给预览 */
.ed-shell.ed-cinema .ed-body { grid-template-columns: minmax(0, 1fr); }
.ed-shell.ed-cinema .ed-pane.left,
.ed-shell.ed-cinema .ed-pane.right,
.ed-shell.ed-cinema .ed-tl { display: none; }
.ed-size-back {
  display: none; align-items: center; justify-content: center;
  height: 18px; padding: 0 6px; border-radius: 999px;
  border: 1px solid rgba(0,240,255,.4); background: #16233c;
  color: #7fe6f5; font-size: 10px; cursor: pointer; white-space: nowrap;
}
.ed-size-back:hover { border-color: #00f0ff; color: #fff; }
.ed-shell.ed-cinema .ed-size-back { display: inline-flex; }

/* ==========================================================
   v4.44 — 第 4 步全部功能集成进剪辑台
   顶栏: 剪辑模式 / 剪辑风格 / 剪辑效果 ; 右侧抽屉: 原板块 DOM
   ========================================================== */
.ed-mode-box { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ed-box-label, .ed-field > span {
  font-size: 10.5px; color: #7fe6f5; white-space: nowrap; letter-spacing: .3px;
}
.ed-mode-box .ed-sel { min-width: 118px; }
.ed-field { display: inline-flex; align-items: center; gap: 8px; }
.ed-field .ed-sel { min-width: 104px; max-width: 152px; }
.ed-btn.on { border-color: #00f0ff; background: #123a4c; color: #fff; }

/* 剪辑设置抽屉 — 不透明实色, 贴右侧, 内部独立滚动 */
.ed-settings {
  position: absolute; top: 56px; right: 0; bottom: 0; z-index: 20;
  width: min(660px, 52vw); min-width: 400px;
  display: flex; flex-direction: column;
  background: #101a2e;
  border-left: 1px solid rgba(0,240,255,.34);
  box-shadow: -18px 0 48px rgba(0,0,0,.6);
}
.ed-settings[hidden] { display: none; }
/* 抽屉打开时舞台靠左, 配合 JS 收缩宽度, 画面不会被面板盖住 */
.ed-shell.ed-settings-open .ed-preview { justify-content: flex-start; }
.ed-settings-head {
  flex: 0 0 48px; display: flex; align-items: center; gap: 14px;
  padding: 0 16px; background: #12203a;
  border-bottom: 1px solid rgba(0,240,255,.16);
}
.ed-settings-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #e6f6ff; }
.ed-settings-head b .ic { width: 15px; height: 15px; color: #00f0ff; }
.ed-settings-head > span { flex: 1 1 auto; color: #7a93ad; font-size: 10.5px; }
.ed-settings-head #ed-settings-close { margin-left: auto; }
.ed-settings-head .ed-proj-jump {
  flex: 0 0 auto; height: 28px; padding: 0 12px;
  font-size: 11px; white-space: nowrap; color: #7fe6f5;
  border-color: rgba(0,240,255,.5);
}
.ed-settings-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px 40px; }
.ed-settings-body::-webkit-scrollbar { width: 8px; }
.ed-settings-body::-webkit-scrollbar-thumb { background: #27405e; border-radius: 8px; }
.ed-settings-body::-webkit-scrollbar-track { background: #0c1526; }

/* 抽屉内继承主程序板块, 统一成剪辑台的赛博配色 + 24px 板块间距 */
.ed-settings-body [hidden] { display: none !important; }
.ed-settings-body h3 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px; color: #d8ecfa; font-size: 14px; font-weight: 700;
}
.ed-settings-body h3 .ic { width: 16px; height: 16px; color: #00f0ff; }
.ed-settings-body .hint { color: #8fb0c9; line-height: 1.7; }
.ed-settings-body .style-section { border-bottom-color: rgba(0,240,255,.14); }
.ed-settings-body .lut-section,
.ed-settings-body .bgm-section,
.ed-settings-body .render-options {
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,240,255,.14);
}
/* v4.46.0: actions 合并一行 — 上一步 | 就绪提示(弹性省略) | 开始智能剪辑 */
.ed-settings-body .step-actions { flex-wrap: nowrap; gap: 12px; margin-top: 8px; }
.ed-settings-body .step-actions .hint {
  flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.ed-settings-body .step-actions .btn { flex: 0 0 auto; white-space: nowrap; }
.ed-settings-body .style-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.ed-settings-body .style-card {
  background: #14213a; border-color: rgba(0,240,255,.20); color: #dceaf7;
}
.ed-settings-body .style-card:hover { border-color: #00f0ff; }
.ed-settings-body .style-card.selected { background: #123a4c; border-color: #00f0ff; }
.ed-settings-body #bgm-lib-list { max-height: 240px; overflow-y: auto; }
.ed-settings-body #lut-grid { max-height: 280px; overflow-y: auto; }
.ed-settings-body .bgm-lib-list::-webkit-scrollbar,
.ed-settings-body .lut-grid::-webkit-scrollbar { width: 6px; }
.ed-settings-body .bgm-lib-list::-webkit-scrollbar-thumb,
.ed-settings-body .lut-grid::-webkit-scrollbar-thumb { background: #27405e; border-radius: 6px; }
.ed-settings-body .ed-src-brief { margin-top: 4px; }
.ed-settings-body .ed-preset-section { margin: 0 0 24px; }

/* 第 4 步页面: 剪辑台入口卡 */
.ed-entry-card {
  display: flex; align-items: center; gap: 18px;
  margin: 20px 0 8px; padding: 18px 20px;
  border: 1px solid rgba(0,240,255,.32); border-radius: 12px;
  background: #101a2e;
  box-shadow: 0 0 0 1px rgba(255,43,214,.06), 0 10px 30px rgba(0,0,0,.28);
}
.ed-entry-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 12px; background: #123a4c; color: #00f0ff;
}
.ed-entry-icon .ic { width: 24px; height: 24px; }
.ed-entry-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-entry-body b { font-size: 15px; color: #e6f6ff; }
.ed-entry-body span { font-size: 11.5px; color: #8fb0c9; line-height: 1.7; }
.ed-entry-status { color: #00f0ff !important; font-size: 11px !important; }
.ed-entry-card > .btn { flex: 0 0 auto; }

/* 空态: 去掉原生 video 的第二个播放按钮, 只留静帧提示 */
.ed-stage video:not([src]) { display: none; }

@media (max-width: 1280px) {
  .ed-top { gap: 10px; }
  .ed-top-actions { gap: 8px; }
  .ed-box-label, .ed-field > span { display: none; }
  .ed-mode-box .ed-sel, .ed-field .ed-sel { min-width: 96px; max-width: 122px; }
  .ed-settings { width: min(600px, 62vw); min-width: 360px; }
}
@media (max-width: 900px) {
  .ed-top { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 12px; }
  .ed-top-actions { margin-left: 0; flex-wrap: wrap; }
  .ed-settings { top: 0; width: 100%; min-width: 0; }
  .ed-entry-card { flex-wrap: wrap; gap: 12px; }
}

/* ==========================================================
   v4.44.2: 剪辑台直接内嵌第 4 步页面 (不再有「打开剪辑台」二次点击)
   - 宿主放在 <main> 外, 突破 main 的 1100px 限宽, 与页面居中对齐
   - 不用 transform 做全宽位移: 否则内部 position:fixed 的模态框会错定位
   - 全屏切换只是给同一个 overlay 加 .ed-full, DOM 与事件全部保留
   ========================================================== */
#step2.ed-host-section {
  width: min(1560px, calc(100vw - 48px));
  max-width: none;
  margin-left: calc(50% - min(780px, calc(50vw - 24px)));
  padding: 18px 22px 20px;
  background: #0c1526;                 /* 不透明实色 */
  border-color: rgba(0, 240, 255, .24);
}
#step2.ed-host-section.active { animation: none; }
.ed-inline-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.ed-inline-head h2 {
  display: flex; align-items: center; gap: 16px;
  margin: 0; white-space: nowrap;
}
.ed-inline-status { color: #00f0ff; font-size: 11px; white-space: nowrap; }

#ed-inline-host {
  width: min(1560px, calc(100vw - 48px));
  margin: 12px auto 40px;
}
#ed-inline-host[hidden] { display: none; }

.ed-overlay.ed-inline {
  position: relative; inset: auto; z-index: 1;
  display: block; padding: 0; background: transparent;
}
.ed-overlay.ed-inline[hidden] { display: none; }
/* 高度跟着可见区走: 切到第 4 步会自动滚到剪辑台顶部, 首屏即可看全三栏 + 时间线 */
.ed-overlay.ed-inline:not(.ed-full) .ed-shell {
  width: 100%;
  height: clamp(560px, calc(100vh - 190px), 900px);
  border-radius: 12px;
}
/* 页面内空间有限, 时间线收紧一点, 把高度让给预览 (全屏时恢复 252px) */
.ed-overlay.ed-inline:not(.ed-full) .ed-tl { flex: 0 0 196px; }
/* 顶栏控件保持 16px 间距 (窄屏原规则会压到 8px) */
.ed-overlay.ed-inline .ed-top { gap: 16px; }
.ed-overlay.ed-inline .ed-top-actions { gap: 16px; }
/* 一键放大: 仍低于主程序弹窗 (z 1300), 文案库等浮层可正常覆盖 */
.ed-overlay.ed-inline.ed-full {
  position: fixed; inset: 0; z-index: 1250;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3, 7, 18, .94);
}
.ed-overlay.ed-inline.ed-full .ed-shell {
  width: min(1560px, calc(100vw - 40px));
  height: calc(100vh - 40px);
}

@media (max-width: 900px) {
  #step2.ed-host-section {
    width: calc(100vw - 24px);
    margin-left: calc(50% - 50vw + 12px);
    padding: 14px;
  }
  #ed-inline-host { width: calc(100vw - 24px); margin: 10px auto 24px; }
  .ed-overlay.ed-inline:not(.ed-full) .ed-shell { height: clamp(520px, calc(100vh - 200px), 720px); }
  .ed-body { grid-template-columns: 1fr; }
  .ed-pane.left, .ed-pane.right { display: none; }
  .ed-inline-head { gap: 10px; }
  .ed-inline-head h2 { gap: 10px; white-space: normal; }
}

/* ==========================================================
   v4.44.3 — 教程学效果弹窗 + 顶栏小按钮
   面板不透明实色 #101a2e, 遮罩 .86, 手机端文案保持短句
   ========================================================== */
.ed-mini-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; border-radius: 7px;
  border: 1px solid rgba(0,240,255,.36); background: #16233c;
  color: #7fe6f5; font-size: 16px; line-height: 1; cursor: pointer;
}
.ed-mini-btn:hover { border-color: #00f0ff; color: #fff; background: #1b3050; }

.ed-learn-card { width: min(620px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; }
.ed-learn-card::-webkit-scrollbar { width: 8px; }
.ed-learn-card::-webkit-scrollbar-thumb { background: #27405e; border-radius: 8px; }
.ed-learn-mine { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ed-learn-mine[hidden] { display: none; }
.ed-learn-mine-label { font-size: 10.5px; color: #7fe6f5; letter-spacing: .4px; }
.ed-learn-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 10px;
  border: 1px solid rgba(0,240,255,.3); border-radius: 999px;
  background: #14213a; color: #cbdcec; font-size: 11px;
}
.ed-learn-x {
  width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%;
  background: #243b58; color: #9fc6dc; font-size: 12px; line-height: 16px; cursor: pointer;
}
.ed-learn-x:hover { background: #7a2130; color: #fff; }

.ed-learn-tabs { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ed-learn-tabs .ed-btn { height: 28px; font-size: 11px; }
.ed-learn-pane { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ed-learn-pane[hidden] { display: none; }
.ed-learn-pane .ed-btn { height: 30px; }
.ed-learn-file {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: #8fb0c9;
}
#ed-learn-textarea {
  width: 100%; height: 118px; resize: vertical; box-sizing: border-box;
  padding: 9px 10px; border-radius: 8px;
  border: 1px solid rgba(0,240,255,.28); background: #14213a; color: #e3f2ff;
  font-size: 11.5px; line-height: 1.7; outline: none;
}
#ed-learn-textarea::placeholder { color: #6f8ba5; }
.ed-learn-status { margin-top: 12px; min-height: 16px; font-size: 11px; color: #8fb0c9; line-height: 1.6; }
.ed-learn-status.ok { color: #7fe6f5; }
.ed-learn-status.err { color: #ff8fa8; }
.ed-learn-result { margin-top: 8px; padding: 12px; border-radius: 9px; border: 1px solid rgba(0,240,255,.2); background: #0c1526; }
.ed-learn-result[hidden] { display: none; }
.ed-learn-row { display: flex; align-items: center; gap: 12px; }
.ed-learn-row label { flex: 0 0 auto; font-size: 11px; color: #7fe6f5; }
.ed-learn-row .ed-sel { flex: 1 1 auto; min-width: 0; max-width: none; height: 30px; }
.ed-learn-params { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ed-learn-param {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px;
  border-radius: 6px; background: #14213a; color: #8fb0c9; font-size: 10.5px;
}
.ed-learn-param b { color: #00f0ff; font-size: 12px; font-weight: 700; }
.ed-learn-subttl { margin: 12px 0 6px; font-size: 10.5px; font-weight: 700; color: #7fe6f5; letter-spacing: .5px; }
.ed-learn-steps ol { margin: 0; padding-left: 20px; color: #cbdcec; font-size: 11.5px; line-height: 1.85; }
.ed-learn-evidence { color: #7f9ab3; font-size: 10.5px; line-height: 1.7; word-break: break-word; }
.ed-modal-actions .ed-btn[hidden] { display: none; }

/* ==========================================================
   v4.44.4 剪辑工程卡片 (在「剪辑设置」抽屉内)
   不透明实色 / 行内元素统一中线 / 列表定高滚动
   ========================================================== */
.ed-proj-card {
  margin: 24px 0 0; padding: 16px;
  border: 1px solid rgba(0,240,255,.28); border-radius: 10px;
  background: #101a2e;                 /* 不透明实色, 不透出背后文字 */
}
.ed-proj-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ed-proj-head b { flex: 0 0 auto; font-size: 13px; color: #e6f6ff; }
.ed-proj-head span { flex: 1 1 auto; min-width: 0; font-size: 11px; color: #8fb0c9; line-height: 1.5; }
.ed-proj-row { display: flex; align-items: center; gap: 16px; }
.ed-proj-row .ed-sel { flex: 1 1 auto; min-width: 0; max-width: none; height: 30px; font-size: 11.5px; }
.ed-proj-row .ed-btn { flex: 0 0 auto; height: 30px; white-space: nowrap; }
.ed-proj-list {
  margin-top: 16px; height: 132px; overflow-y: auto;   /* 定高, 内容增减不推整页 */
  border: 1px solid rgba(0,240,255,.14); border-radius: 8px; background: #0c1526;
}
.ed-proj-list .ed-empty { padding: 28px 12px; text-align: center; }
.ed-proj-item {
  display: flex; align-items: center; gap: 16px;
  height: 40px; padding: 0 12px;
  border-bottom: 1px solid rgba(0,240,255,.08);
}
.ed-proj-item:last-child { border-bottom: 0; }
.ed-proj-name {
  flex: 0 1 auto; min-width: 0; max-width: 34%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; color: #dcecf8;
}
.ed-proj-meta, .ed-proj-date {
  flex: 0 0 auto; font-size: 10.5px; color: #7f9ab3; white-space: nowrap;
}
.ed-proj-spacer { flex: 1 1 auto; }
.ed-proj-item .ed-btn { flex: 0 0 auto; height: 24px; padding: 0 9px; font-size: 10.5px; }
.ed-proj-item .ed-btn[data-act="del"] { color: #ff8fa8; }
@media (max-width: 900px) {
  .ed-proj-head, .ed-proj-row { flex-wrap: wrap; gap: 10px; }
  .ed-proj-item { gap: 10px; }
  .ed-proj-date { display: none; }
}

/* ===== v4.49 二次加工 · 审美导演弹窗 ===== */
.ed-style-card { width: min(680px, calc(100vw - 40px)); }
.ed-style-card .ed-modal-title { display: flex; align-items: center; gap: 8px; }
.ed-style-verdict {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 9px 12px; border-radius: 8px;
  background: rgba(0,240,255,.08); border: 1px solid rgba(0,240,255,.22);
}
.ed-style-vd-tag { display: inline-flex; align-items: center; color: #00f0ff; }
.ed-style-vd-text { font-size: 13px; font-weight: 700; color: #d9f6ff; }
.ed-style-vd-model { margin-left: auto; font-size: 10.5px; color: #6f8ba5; }
.ed-style-list {
  margin-top: 14px; max-height: min(48vh, 360px); overflow-y: auto;
  overscroll-behavior: contain; padding-right: 4px;
}
.ed-style-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 11px; margin-bottom: 8px; border-radius: 8px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
}
.ed-style-item.off { opacity: .45; }
.ed-style-check { flex: 0 0 auto; padding-top: 2px; }
.ed-style-check input { accent-color: #00f0ff; width: 15px; height: 15px; cursor: pointer; }
.ed-style-body { flex: 1 1 auto; min-width: 0; }
.ed-style-item-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-style-chip {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; color: #06131e; background: #00f0ff; font-weight: 700;
}
.ed-style-time { flex: 0 0 auto; font-size: 11px; color: #8fb0c9; font-variant-numeric: tabular-nums; }
.ed-style-text {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: #e6f6ff; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ed-style-why { margin-top: 6px; font-size: 11px; color: #9fbdd2; line-height: 1.55; }
.ed-style-warn {
  margin-top: 5px; font-size: 10.5px; color: #ffcf8a;
  display: inline-flex; align-items: center; gap: 5px;
}
.ed-style-warn::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #ffcf8a; }
.ed-style-notes {
  margin-top: 10px; padding: 8px 11px; border-radius: 7px;
  font-size: 11px; line-height: 1.6; color: #ffcf8a;
  background: rgba(255,190,90,.08); border: 1px solid rgba(255,190,90,.2);
}
.ed-style-count { flex: 0 0 auto; font-size: 11px; color: #8fb0c9; }

/* ===== v4.50 工程导出弹窗 ===== */
.ed-export-card { width: min(620px, calc(100vw - 40px)); }
.ed-export-card .ed-modal-title { display: flex; align-items: center; gap: 8px; }
.ed-export-info {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: rgba(0,240,255,.07); border: 1px solid rgba(0,240,255,.2);
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: #cfeaf6;
}
.ed-export-warn { font-size: 11px; color: #ffcf8a; font-style: normal; line-height: 1.5; }
.ed-export-opts { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ed-export-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  color: #dcecf8; text-align: left; font-family: inherit;
  transition: background .18s, border-color .18s;
}
.ed-export-opt:hover { background: rgba(0,240,255,.1); border-color: rgba(0,240,255,.45); }
.ed-export-opt-ic {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,240,255,.12); color: #00f0ff;
}
.ed-export-opt-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ed-export-opt-body b { font-size: 13.5px; color: #e6f6ff; }
.ed-export-opt-body em { font-size: 11px; color: #8fb0c9; font-style: normal; line-height: 1.5; }
.ed-export-opt-go {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #00f0ff; font-weight: 600;
}
.ed-export-hint {
  margin-top: 12px; padding: 9px 11px; border-radius: 7px;
  font-size: 11px; line-height: 1.6; color: #9fbdd2;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
}
.ed-export-opt:disabled { opacity: .55; cursor: wait; }
