/* ===== 创作视频（原型② 创作流程页样式，作用域限定 #vgCreative） ===== */
#vgCreative {
  --c-indigo: #6366f1;
  --c-indigo-deep: #4f46e5;
  --c-violet: #7c3aed;
  --c-ink: #0f172a;
  --c-s7: #334155;
  --c-s5: #64748b;
  --c-s4: #7d8797;
  --c-line: #e6eaf2;
  --c-bg: #f7f9fc;
  --c-card: #fff;
}

#vgCreative .hidden { display: none !important; }
#vgCreative * { box-sizing: border-box; }

/* 卡片 */
#vgCreative .c-card {
  background: var(--c-card); border: 1px solid #e9edf5; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 20px 44px -32px rgba(15, 23, 42, .5);
  padding: 18px; margin-bottom: 16px;
}

/* 输入区 */
#vgCreative .c-input-box { border: 1.5px solid #c7d2fe; border-radius: 12px; background: #fff; }
#vgCreative .c-input-box textarea {
  width: 100%; border: none; outline: none; resize: vertical; min-height: 84px; display: block;
  padding: 13px 15px 4px; font-size: 14px; font-family: inherit; color: var(--c-s7); line-height: 1.8;
}
#vgCreative .c-input-count { text-align: right; font-size: 12px; color: var(--c-s4); padding: 2px 14px 9px; }
#vgCreative .c-input-count b { color: var(--c-indigo); }
#vgCreative .c-input-opts { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-top: 14px; }
#vgCreative .c-opt { display: flex; flex-direction: column; gap: 5px; min-width: 118px; }
#vgCreative .c-opt label { font-size: 12px; color: var(--c-s5); }
#vgCreative .c-opt-grow { flex: 1 1 200px; }
#vgCreative .c-tpl-opt { display: none !important; }
#vgCreative .c-select, #vgCreative .c-input {
  width: 100%; border: 1px solid #dfe5ee; border-radius: 9px; padding: 8px 10px; font-size: 13px;
  background: #fff; color: var(--c-s7); font-family: inherit; height: 38px;
}
#vgCreative .c-select:focus, #vgCreative .c-input:focus { outline: none; border-color: var(--c-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, .13); }
#vgCreative .c-generate-btn {
  height: 38px; padding: 0 22px; border: none; border-radius: 10px; cursor: pointer; color: #fff;
  font-size: 13.5px; font-weight: 600; font-family: inherit; white-space: nowrap;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 52%, #7c3aed 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 24px -14px rgba(79, 70, 229, .95);
}
#vgCreative .c-generate-btn:hover { filter: brightness(1.06); }
#vgCreative .c-generate-btn:disabled { opacity: .6; cursor: not-allowed; filter: none; }
/* 输入台：附件条 / 手动-自动 / 上传按钮 */
#vgCreative .c-attach-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
#vgCreative .c-attach-strip:empty { display: none; }
#vgCreative .c-attach { position: relative; width: 56px; height: 56px; border-radius: 10px; background: #f1f5f9 center/cover; display: flex; align-items: center; justify-content: center; font-size: 22px; border: 1px solid var(--c-line); }
#vgCreative .c-attach-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border: none; border-radius: 99px; background: #f43f5e; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#vgCreative .c-mode-seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 9px; border: 1px solid var(--c-line); background: #f9fafb; height: 38px; }
#vgCreative .c-mode-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 7px; border: 1px solid transparent; background: transparent; font-family: inherit; font-size: 13px; color: var(--c-s5); cursor: pointer; }
#vgCreative .c-mode-seg button.active { background: #fff; color: var(--c-indigo); border-color: #c7d2fe; font-weight: 600; box-shadow: 0 2px 8px -4px rgba(79, 70, 229, .5); }
#vgCreative .c-upload-btns { display: flex; gap: 8px; flex-wrap: wrap; }
#vgCreative .c-upload-btn { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--c-line); background: #fff; color: var(--c-s7); font-family: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
#vgCreative .c-upload-btn:hover { border-color: var(--c-indigo); color: var(--c-indigo); background: #f8faff; }
/* 资源数据 */
#vgCreative .c-res-group { margin-bottom: 14px; }
#vgCreative .c-res-title { font-size: 12.5px; font-weight: 600; color: var(--c-s7); margin-bottom: 8px; }
#vgCreative .c-res-grid { display: flex; flex-wrap: wrap; gap: 10px; }
#vgCreative .c-res-item { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--c-line); background: #f1f5f9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
#vgCreative .c-res-item:hover { box-shadow: 0 0 0 2px #8b5cf6 inset, 0 8px 18px -8px rgba(109, 40, 217, .55); transform: translateY(-1px); }
#vgCreative .c-res-item .res-badge { position: absolute; top: 3px; right: 3px; font-size: 9px; line-height: 1; padding: 2px 4px; border-radius: 4px; background: rgba(15, 23, 42, .66); color: #fff; letter-spacing: .3px; }
#vgCreative .c-res-item .res-badge-play { background: rgba(109, 40, 217, .85); }
#vgCreative .c-res-item .glyph { font-size: 26px; }
#vgCreative .c-res-item .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff; background: rgba(15, 23, 42, .55); padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-tip { font-size: 12px; color: var(--c-s4); margin: 12px 0 0; }
#vgCreative .c-tip b { color: var(--c-s7); }
#vgCreative .c-tpl-panel { margin-top: 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
#vgCreative .c-tpl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
#vgCreative .c-tpl-head b { color: #0f172a; font-size: 13px; }
#vgCreative .c-tpl-note { margin-left: auto; color: #94a3b8; font-size: 11px; }
#vgCreative .c-tpl-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
#vgCreative .c-tpl-card { width: 107px; }
#vgCreative .c-tpl-img { width: 107px; height: 107px; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; background: #f1f5f9; cursor: zoom-in; }
#vgCreative .c-tpl-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
#vgCreative .c-tpl-card b { display: block; margin-top: 4px; font-size: 11px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-tpl-replace { margin-top: 3px; border: 0; background: transparent; color: #4f46e5; font-size: 11px; cursor: pointer; padding: 0; }
#vgCreative .c-tpl-replace:hover { text-decoration: underline; }

/* 源文案 */
#vgCreative .c-source-row { margin-bottom: 14px; }
#vgCreative .copy-src {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border: 1px dashed rgba(99, 102, 241, .5); border-radius: 9px; background: #fff;
  color: var(--c-indigo); font-family: inherit; font-size: 13px; cursor: pointer;
}
#vgCreative .copy-src i { font-style: normal; font-size: 11.5px; opacity: .8; }
#vgCreative .copy-src:hover { background: #eef2ff; border-style: solid; border-color: var(--c-indigo); }

/* 分段标题 */
#vgCreative .sec-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
#vgCreative .sec-head .sec-tag {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 14px; font-weight: 700; color: var(--c-s7);
}
#vgCreative .sec-head .sec-tag::before {
  content: ""; width: 4px; height: 15px; border-radius: 99px; flex-shrink: 0;
  background: linear-gradient(180deg, #6366f1, #7c3aed);
}
#vgCreative .sec-head em { font-style: normal; font-size: 12.5px; color: var(--c-s4); }
#vgCreative .sec-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #e7ebf3, rgba(231, 235, 243, 0)); }

/* 下划线式页签 */
#vgCreative .page-tabs { display: flex; align-items: flex-end; gap: 2px; flex-wrap: wrap; margin: 0 0 12px; padding: 0 2px; border-bottom: 1px solid var(--c-line); }
#vgCreative .ptab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px 11px; border: 0; border-radius: 10px 10px 0 0; background: transparent;
  color: var(--c-s5); font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
#vgCreative .ptab:hover { color: var(--c-indigo); }
#vgCreative .ptab.active { color: var(--c-indigo); font-weight: 700; }
#vgCreative .ptab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #6366f1, #7c3aed);
}
#vgCreative .ptab-num { background: #eef2ff; color: var(--c-indigo); border-radius: 99px; font-size: 11px; padding: 0 7px; line-height: 16px; font-weight: 700; }
#vgCreative .flow-mat-tabs { margin: 16px 0 12px; }
#vgCreative .flow-mat-tabs .ptab { padding: 6px 13px; font-size: 12.5px; }

/* 全局设定表单 */
#vgCreative .global-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
#vgCreative .global-form .gf { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
#vgCreative .global-form .gf > label { font-size: 12.5px; color: var(--c-s5); white-space: nowrap; text-align: right; }
#vgCreative .global-form .gf.has-extra { grid-template-columns: 92px minmax(0, 1fr) auto; }
#vgCreative .tib-static {
  display: flex; align-items: center; height: 38px; padding: 0 12px; border: 1px solid var(--c-line);
  border-radius: 9px; background: var(--c-bg); color: var(--c-s7); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#vgCreative .tib-static.accent { color: var(--c-indigo); font-weight: 600; background: #eef2ff; border-color: #c7d2fe; }
#vgCreative .global-form .gf .c-select, #vgCreative .global-form .gf .c-input { height: 38px; }
@media (max-width: 1023px) { #vgCreative .global-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 659px) { #vgCreative .global-form { grid-template-columns: minmax(0, 1fr); } }

/* 面板头 */
#vgCreative .c-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
#vgCreative .c-panel-head em { font-style: normal; font-size: 12px; color: var(--c-s4); }
#vgCreative .c-panel-acts { margin-left: auto; display: inline-flex; gap: 8px; }
#vgCreative .tib-tag {
  font-size: 13px; font-weight: 700; color: var(--c-indigo); background: #eef2ff;
  padding: 7px 13px; border-radius: 9px; white-space: nowrap;
}
#vgCreative .c-mini-btn {
  border: 1px solid #c7d2fe; background: #eef2ff; color: var(--c-indigo); font-family: inherit;
  padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
#vgCreative .c-mini-btn:hover { background: var(--c-indigo); color: #fff; border-color: transparent; }
#vgCreative .c-mini-btn.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, #6366f1, #7c3aed); }

/* 角色卡 */
#vgCreative .role-cards { display: flex; flex-wrap: wrap; gap: 12px; }
#vgCreative .role-card {
  position: relative; width: 170px; border: 1px solid var(--c-line); border-radius: 12px; padding: 8px;
  background: #fff; cursor: pointer; transition: all .15s;
}
#vgCreative .role-card:hover { border-color: var(--c-indigo); box-shadow: 0 12px 26px -18px rgba(99, 102, 241, .9); }
#vgCreative .role-avatar {
  position: relative; height: 100px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: linear-gradient(160deg, #818cf8, #6d28d9);
}
#vgCreative .role-avatar .head { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; width: 40px; height: 40px; border-radius: 99px; background: rgba(255, 255, 255, .25); }
#vgCreative .role-avatar .body { position: absolute; left: 50%; transform: translateX(-50%); bottom: -16px; width: 70px; height: 40px; border-radius: 99px 99px 0 0; background: rgba(255, 255, 255, .25); }
#vgCreative .role-card b { font-size: 12.5px; display: block; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .role-card em { font-style: normal; font-size: 10.5px; color: var(--c-s4); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .role-del {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 20px; height: 20px; border-radius: 99px;
  border: none; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; transition: all .15s;
}
#vgCreative .role-card:hover .role-del { opacity: 1; }
#vgCreative .role-del:hover { background: #ef4444; }
#vgCreative .role-add {
  width: 170px; min-height: 160px; border: 1px dashed #d1d5db; border-radius: 12px; background: transparent;
  color: var(--c-s4); cursor: pointer; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
#vgCreative .role-add:hover { border-color: #a5b4fc; color: var(--c-indigo); }
#vgCreative .role-add .plus { font-size: 24px; line-height: 1; }

/* 场景卡 */
#vgCreative .scene-cards { display: flex; flex-wrap: wrap; gap: 12px; }
#vgCreative .scene-sel {
  position: relative; width: 176px; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden;
  padding: 0; background: #fff; cursor: pointer; transition: all .15s;
}
#vgCreative .scene-sel:hover { border-color: var(--c-indigo); box-shadow: 0 12px 26px -18px rgba(99, 102, 241, .9); }
#vgCreative .scene-sel .scene-img { width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 42px; }
#vgCreative .scene-sel b { display: block; font-size: 13px; padding: 8px 8px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .scene-sel em { font-style: normal; font-size: 10.5px; color: var(--c-s4); display: block; padding: 0 8px 9px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .scene-add {
  width: 176px; min-height: 150px; border: 1px dashed #d1d5db; border-radius: 12px; background: transparent;
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  color: var(--c-s4); cursor: pointer; font-size: 13px;
}
#vgCreative .scene-add:hover { border-color: #a5b4fc; color: var(--c-indigo); }

/* 道具卡 */
#vgCreative .prop-cards { display: flex; flex-wrap: wrap; gap: 12px; }
#vgCreative .prop-card {
  position: relative; width: 150px; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden;
  padding: 0; background: #fff; cursor: pointer; transition: all .15s;
}
#vgCreative .prop-card:hover { border-color: var(--c-indigo); box-shadow: 0 12px 26px -18px rgba(99, 102, 241, .9); }
#vgCreative .prop-card .prop-img { width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 40px; }
#vgCreative .prop-card b { display: block; font-size: 12.5px; padding: 8px 8px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .prop-card em { font-style: normal; font-size: 10.5px; color: var(--c-s4); display: block; padding: 0 8px 9px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .prop-card .x {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 20px; height: 20px; border-radius: 99px;
  border: none; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; transition: all .15s;
}
#vgCreative .prop-card:hover .x, #vgCreative .scene-sel:hover .x { opacity: 1; }
#vgCreative .prop-card .x:hover, #vgCreative .scene-sel .x:hover { background: #ef4444; }
#vgCreative .scene-sel .x {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 20px; height: 20px; border-radius: 99px;
  border: none; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; transition: all .15s;
}
#vgCreative .prop-add {
  width: 140px; min-height: 150px; border: 1px dashed #d1d5db; border-radius: 12px; background: transparent;
  color: var(--c-s4); cursor: pointer; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
#vgCreative .prop-add:hover { border-color: #a5b4fc; color: var(--c-indigo); }

/* 分镜三栏 */
#vgCreative .flow-grid { display: grid; grid-template-columns: 268px minmax(0, 1.18fr) minmax(0, 1.02fr); gap: 16px; align-items: start; }
@media (max-width: 1200px) { #vgCreative .flow-grid { grid-template-columns: minmax(0, 1fr); } }

/* 分镜列表 */
#vgCreative .c-zone-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#vgCreative .c-zone-no {
  width: 26px; height: 26px; border-radius: 99px; flex-shrink: 0; color: #fff; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #7c3aed); display: flex; align-items: center; justify-content: center;
}
#vgCreative .c-zone-head b { font-size: 14.5px; }
#vgCreative .c-zone-meta { font-size: 12px; color: var(--c-s4); margin-left: auto; }
#vgCreative .c-shot-row {
  display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; border-radius: 12px;
  border: 1px solid #f3f4f6; cursor: pointer; margin-bottom: 8px; background: #fff; transition: all .15s;
}
#vgCreative .c-shot-row:hover { border-color: #c7d2fe; }
#vgCreative .c-shot-row.active { border-color: var(--c-indigo); background: #eef2ff66; box-shadow: 0 0 0 3px rgba(99, 102, 241, .08); }
#vgCreative .shot-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
#vgCreative .shot-l2 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
#vgCreative .shot-no {
  width: 30px; height: 24px; border-radius: 7px; flex-shrink: 0; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; background: #fff; border: 1px solid #d9dff2; color: #5b64d8;
  display: flex; align-items: center; justify-content: center;
}
#vgCreative .c-shot-row.active .shot-no { background: linear-gradient(135deg, #6366f1, #7c3aed); border-color: transparent; color: #fff; }
#vgCreative .c-shot-row .shot-main { flex: 1; min-width: 0; }
#vgCreative .c-shot-row .shot-main b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-shot-row .shot-main em { font-style: normal; font-size: 11px; color: var(--c-s4); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .shot-del { width: 19px; height: 19px; border-radius: 99px; border: none; flex-shrink: 0; background: #f1f5f9; color: var(--c-s4); font-size: 10px; cursor: pointer; }
#vgCreative .shot-del:hover { background: #fb7185; color: #fff; }
#vgCreative .jb-tag { font-size: 10.5px; color: var(--c-indigo); background: #eef2ff; padding: 3px 7px; border-radius: 6px; font-weight: 600; }
#vgCreative .gen-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; padding: 3px 7px; border-radius: 6px; font-weight: 600; color: var(--c-s4); background: #f1f5f9; }
#vgCreative .gen-dot i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; font-style: normal; }
#vgCreative .shot-qc-sel {
  font-size: 10.5px; font-weight: 700; padding: 2px 5px; height: 22px; border-radius: 6px;
  border: 1px solid #fde68a; background: #fffbeb; color: #b45309; cursor: pointer;
  font-family: inherit; outline: none;
}
#vgCreative .shot-qc-sel.approved { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
#vgCreative .shot-qc-sel.qc { border-color: #fde68a; background: #fffbeb; color: #b45309; }
#vgCreative .shot-qc-sel:focus { border-color: var(--c-indigo); }
#vgCreative .shot-dur { font-size: 11px; color: var(--c-s4); background: #f1f5f9; padding: 3px 7px; border-radius: 6px; }
#vgCreative .shot-size-sel {
  font-size: 11px; color: var(--c-s7); background: #f1f5f9; border: 1px solid var(--c-line);
  border-radius: 6px; padding: 2px 5px; height: 22px; cursor: pointer; font-family: inherit;
}
#vgCreative .shot-size-sel:focus { outline: none; border-color: var(--c-indigo); }
#vgCreative .dur-edit { display: inline-flex; align-items: center; gap: 2px; background: #f1f5f9; border-radius: 7px; padding: 2px; }
#vgCreative .dur-edit button {
  width: 16px; height: 16px; border: none; border-radius: 5px; background: #fff; color: var(--c-s5);
  font-size: 10px; cursor: pointer; line-height: 1; padding: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
#vgCreative .dur-edit button:hover { color: var(--c-indigo); }
#vgCreative .dur-edit b { font-size: 10.5px; color: var(--c-s5); min-width: 22px; text-align: center; font-weight: 600; }
#vgCreative .c-shot-foot { display: flex; gap: 8px; margin-top: 8px; }
#vgCreative .c-add-shot {
  flex: 1; padding: 9px 0; border-radius: 11px; border: 1px dashed #d1d5db; background: transparent;
  color: var(--c-s4); font-size: 13px; cursor: pointer; font-family: inherit;
}
#vgCreative .c-add-shot:hover { border-color: #a5b4fc; color: var(--c-indigo); }

/* 分镜编辑 */
#vgCreative .c-editing-badge {
  margin-left: auto; padding: 5px 12px; border-radius: 99px; border: 1px solid #c7d2fe; background: #eef2ff;
  color: var(--c-indigo); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
#vgCreative .c-empty { text-align: center; color: var(--c-s4); font-size: 13px; padding: 30px 0; }
#vgCreative .c-empty i { display: block; font-size: 26px; margin-bottom: 8px; color: #cbd5e1; }

#vgCreative .tpl-edit-tabs { display: flex; gap: 3px; margin: 0 0 12px; padding: 3px; background: #f1f5f9; border: 1px solid #e9edf5; border-radius: 12px; }
#vgCreative .tpl-edit-tab {
  flex: 1 1 0; min-width: 0; text-align: center; font-family: inherit; cursor: pointer; padding: 7px 8px;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--c-s5); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
#vgCreative .tpl-edit-tab:hover { color: var(--c-indigo); background: #ffffff99; }
#vgCreative .tpl-edit-tab.active { background: #fff; color: var(--c-indigo); border-color: #c7d2fe; box-shadow: 0 2px 6px -2px rgba(15, 23, 42, .18); }

#vgCreative .flow-mat-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { #vgCreative .flow-mat-cols { grid-template-columns: minmax(0, 1fr); } }

/* 分镜编辑：左侧人物台词，右侧可直接编辑的「生成提示词」，两列等高 */
#vgCreative .flow-mat-cols.shot-prompt-cols { grid-template-columns: minmax(0, .82fr) minmax(0, 1.35fr); align-items: stretch; }
#vgCreative .fmc-stack { display: flex; flex-direction: column; gap: 10px; min-height: 300px; height: 100%; }
#vgCreative .fmc-stack > .fmc { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#vgCreative .fmc-stack > .fmc .fmc-ta-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#vgCreative .fmc-stack > .fmc .c-textarea { flex: 1 1 auto; min-height: 0; height: 100%; resize: none; }
#vgCreative .shot-prompt-cols > .fmc { min-height: 0; display: flex; flex-direction: column; }
#vgCreative .gen-prompt-wrap { flex: 1 1 auto; min-height: 300px; display: flex; flex-direction: column; }
#vgCreative .gen-prompt-ta {
  flex: 1 1 auto; min-height: 0; height: 100%; resize: none; padding-bottom: 12px;
  background: #fff; color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px; line-height: 1.7; white-space: pre-wrap;
}
#vgCreative .prompt-mode {
  margin-left: auto; padding: 1px 7px; border-radius: 99px;
  background: #eef2ff; color: #6366f1; font-size: 10.5px; font-weight: 600;
}
#vgCreative .prompt-mode.manual { background: #fef3c7; color: #b45309; }
#vgCreative .fmc-prompt-tip { margin-top: 6px; font-size: 11px; line-height: 1.5; color: #94a3b8; }
@media (max-width: 900px) {
  #vgCreative .flow-mat-cols.shot-prompt-cols { grid-template-columns: minmax(0, 1fr); }
  #vgCreative .fmc-stack, #vgCreative .gen-prompt-wrap { min-height: 280px; }
}

#vgCreative .fmc { min-width: 0; }
#vgCreative .fmc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; }
#vgCreative .fmc-head .label { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--c-s7); display: inline-flex; align-items: center; gap: 6px; }
#vgCreative .fmc-head .label::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: linear-gradient(135deg, #6366f1, #7c3aed); }
#vgCreative .flow-mat-cols .fmc:nth-child(2) .fmc-head .label::before { background: linear-gradient(135deg, #ec4899, #f43f5e); }
#vgCreative .c-textarea {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 11px; background: #fbfcff; color: var(--c-s7);
  font-family: inherit; font-size: 13px; line-height: 1.8; padding: 10px 12px; min-height: 132px; resize: vertical;
}
#vgCreative .c-textarea:focus { outline: none; background: #fff; border-color: var(--c-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, .13); }
#vgCreative .fmc-role-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
#vgCreative .fmc-role-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid #c7d2fe; background: #eef2ff; color: var(--c-indigo); font-size: 11px; font-weight: 600; cursor: pointer;
}
#vgCreative .fmc-role-chip:hover { background: var(--c-indigo); color: #fff; border-color: transparent; }
#vgCreative .fmc-role-chip.on { background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff; border-color: transparent; }
/* 输入框内底部的角色快捷插入 chips */
#vgCreative .fmc-ta-wrap { position: relative; }
#vgCreative .fmc-ta-wrap .c-textarea { padding-bottom: 46px; }
#vgCreative .fmc-ta-chips { position: absolute; left: 8px; right: 8px; bottom: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

#vgCreative .ir-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-s5); font-weight: 600; margin-top: 14px; }
#vgCreative .ir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 本镜素材大图卡片 */
#vgCreative .ir-media-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
#vgCreative .ir-media-card { width: 118px; display: flex; flex-direction: column; gap: 4px; }
#vgCreative .ir-media-img {
  position: relative; width: 118px; height: 118px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--c-line); background: #f1f5f9; cursor: zoom-in;
}
#vgCreative .ir-media-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #f8fafc; }
#vgCreative .ir-media-img.empty { cursor: default; }
#vgCreative .ir-media-glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
#vgCreative .ir-media-replace {
  position: absolute; left: 6px; bottom: 6px; right: 6px; border: none; border-radius: 8px;
  padding: 5px 0; font-size: 11px; font-weight: 600; color: #fff; cursor: pointer;
  background: rgba(15, 23, 42, .62); backdrop-filter: blur(2px);
}
#vgCreative .ir-media-replace:hover { background: rgba(79, 70, 229, .85); }
#vgCreative .ir-media-card > b {
  font-size: 11.5px; color: var(--c-s7); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#vgCreative .ir-media-model {
  font-size: 10.5px; font-style: normal; color: var(--c-indigo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#vgCreative .ir-media-del {
  border: none; background: none; color: #ef4444; font-size: 11px; padding: 0; cursor: pointer; text-align: left;
}
#vgCreative .ir-media-add {
  width: 118px; height: 118px; border: 1.5px dashed var(--c-line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--c-s4); cursor: pointer;
  flex-direction: column; gap: 6px; font-size: 12px; align-self: flex-start;
}
#vgCreative .ir-media-add:hover { border-color: var(--c-indigo); color: var(--c-indigo); }
#vgCreative .ir-media-add .plus { font-size: 22px; line-height: 1; }

/* 素材替换弹窗 */
#vgCreative .ir-pick-group { margin-bottom: 6px; }
#vgCreative .ir-pick-group .ir-head { margin-top: 10px; }
#vgCreative .ir-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 8px; }
#vgCreative .ir-pick-card {
  border: 1.5px solid var(--c-line); border-radius: 12px; padding: 8px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 5px; background: #fff;
}
#vgCreative .ir-pick-card:hover { border-color: var(--c-indigo); }
#vgCreative .ir-pick-card.on { border-color: var(--c-indigo); background: #eef2ff; }
#vgCreative .ir-pick-img { width: 100%; aspect-ratio: 1; border-radius: 9px; overflow: hidden; position: relative; background: #f1f5f9; }
#vgCreative .ir-pick-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#vgCreative .ir-pick-img .ir-media-glyph { font-size: 26px; }
#vgCreative .ir-pick-card b { font-size: 12px; color: var(--c-s7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .ir-pick-cur {
  position: absolute; top: 6px; right: 6px; background: var(--c-indigo); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 99px;
}

/* 模型选择：可搜索下拉 */
#vgCreative .c-search-select { position: relative; }

/* 上次生成效果回显（生成弹窗内） */
#vgCreative .c-prev-gen {
  margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--c-line);
  border-radius: 12px; background: #f8fafc;
}
#vgCreative .c-prev-gen-head {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  color: var(--c-s7); margin-bottom: 8px;
}
#vgCreative .c-prev-gen-head i { color: var(--c-indigo); }
#vgCreative .c-prev-gen-head em {
  font-style: normal; font-weight: 500; color: var(--c-indigo);
  margin-left: auto; max-width: 55%; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: #eef2ff; padding: 2px 8px; border-radius: 6px;
}
#vgCreative .c-prev-gen-media {
  display: flex; justify-content: center; align-items: center;
  background: #0f172a; border-radius: 10px; overflow: hidden; min-height: 120px;
}
#vgCreative .c-prev-gen-media img {
  max-width: 100%; max-height: 260px; object-fit: contain; cursor: zoom-in; display: block;
}
#vgCreative .c-prev-gen-media video { max-width: 100%; max-height: 260px; display: block; }
#vgCreative .c-ss-input {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1.5px solid var(--c-line); border-radius: 12px;
  cursor: pointer; background: #fff;
}
#vgCreative .c-ss-input:hover { border-color: var(--c-indigo); }
#vgCreative .c-ss-label { font-size: 13px; color: var(--c-s7); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vgCreative .c-ss-input i { color: var(--c-s4); font-size: 12px; flex-shrink: 0; }
#vgCreative .c-ss-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff;
  border: 1px solid var(--c-line); border-radius: 12px; z-index: 40;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
#vgCreative .c-ss-drop.hidden { display: none; }
#vgCreative .c-ss-search {
  width: 100%; border: none; border-bottom: 1px solid var(--c-line);
  padding: 11px 14px; font-size: 13px; outline: none; border-radius: 12px 12px 0 0;
  font-family: inherit; box-sizing: border-box; background: #fafbfd;
}
#vgCreative .c-ss-list { max-height: 42vh; overflow: auto; padding: 6px; }
#vgCreative .c-ss-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 9px; cursor: pointer;
}
#vgCreative .c-ss-item:hover { background: #f8faff; }
#vgCreative .c-ss-item.on { background: #eef2ff; }
#vgCreative .c-ss-item-name { font-weight: 600; font-size: 13px; color: var(--c-s8); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-ss-item-meta { font-size: 11px; color: var(--c-s4); max-width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-badge-points {
  background: #eef2ff; color: var(--c-indigo); font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; white-space: nowrap; flex-shrink: 0;
}
#vgCreative .c-badge-points.gray { background: #f1f5f9; color: #94a3b8; }
/* 模型选择项：【厂商】- 模型名称- 点数，单行展示 */
#vgCreative .c-ss-item-line { flex: 1; min-width: 0; font-size: 13px; color: var(--c-s8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .c-ss-item-title { font-weight: 600; color: var(--c-s8); }
#vgCreative .c-ss-item-prov { font-size: 12px; color: var(--c-s4); }
#vgCreative .c-ss-item-pts { color: var(--c-indigo); font-weight: 700; }
#vgCreative .c-ss-item-dash { color: var(--c-s4); margin: 0; }
#vgCreative .ir-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--c-line);
  border-radius: 99px; background: #fff; color: var(--c-s7); font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
#vgCreative .ir-chip:hover { border-color: var(--c-indigo); color: var(--c-indigo); background: #f8faff; }
#vgCreative .ir-chip.is-on { border-color: var(--c-indigo); background: #eef2ff; color: var(--c-indigo); font-weight: 600; }
#vgCreative .ir-chip.is-on::after { content: "✓"; font-size: 11px; font-weight: 700; }
#vgCreative .c-shot-actions { display: flex; gap: 10px; margin-top: 16px; }
#vgCreative .c-shot-actions .c-mini-btn, #vgCreative .c-shot-actions .c-save-btn { flex: 1; justify-content: center; padding: 10px 0; border-radius: 10px; }
#vgCreative .c-save-btn {
  border: none; color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5 52%, #7c3aed);
}
#vgCreative .c-save-btn:hover { filter: brightness(1.06); }

/* 预览 */
#vgCreative .canvas-wrap { border-radius: 14px; padding: 14px; background: linear-gradient(135deg, #64748b, #475569 60%, #334155); }
#vgCreative .canvas-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; color: rgba(255, 255, 255, .75); }
#vgCreative .canvas-toggle { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 99px; padding: 2px; }
#vgCreative .canvas-toggle span { padding: 4px 12px; border-radius: 99px; font-size: 12px; cursor: pointer; color: rgba(255, 255, 255, .7); }
#vgCreative .canvas-toggle span.active { background: #fff; color: #1e293b; font-weight: 600; }
#vgCreative .flow-canvas-screen { position: relative; border-radius: 10px; overflow: hidden; width: 100%; aspect-ratio: 16/9; outline: 1px solid rgba(255, 255, 255, .12); background: linear-gradient(160deg, #f97316, #f59e0b); }
#vgCreative .flow-canvas-screen .p-tag { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .32); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 7px; }
#vgCreative .flow-canvas-screen .p-dur { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .4); color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; }
#vgCreative .flow-canvas-screen .p-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#vgCreative .flow-canvas-screen .p-play i { font-style: normal; width: 52px; height: 52px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--c-indigo); display: flex; align-items: center; justify-content: center; font-size: 18px; }
#vgCreative .flow-canvas-screen .p-progress { position: absolute; bottom: 10px; left: 10px; right: 10px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
#vgCreative .flow-canvas-screen .p-progress i { display: block; width: 0%; height: 100%; border-radius: 99px; background: #fff; }
#vgCreative .flow-canvas-screen .p-time { position: absolute; bottom: 24px; right: 10px; color: rgba(255, 255, 255, .9); font-size: 11.5px; }
#vgCreative .flow-canvas-screen .p-hover-tools { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: all .18s; }
#vgCreative .flow-canvas-screen:hover .p-hover-tools { opacity: 1; }
#vgCreative .flow-canvas-screen:hover .p-tag { opacity: 0; }
#vgCreative .pv-tool { display: inline-flex; align-items: center; gap: 4px; font-family: inherit; background: rgba(15, 23, 42, .6); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; cursor: pointer; }
#vgCreative .pv-tool:hover { background: rgba(15, 23, 42, .85); }
#vgCreative .pv-video, #vgCreative .pv-image { position: absolute; inset: 0; }
#vgCreative .pv-image .pv-img-frame { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
#vgCreative .pv-img-glyph { font-size: 54px; }
#vgCreative .pv-img-tag { position: absolute; left: 8px; bottom: 8px; background: rgba(15, 23, 42, .6); color: #fff; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; }
#vgCreative .pv-switch { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 6px; }
#vgCreative .pv-switch span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; background: rgba(15, 23, 42, .45); color: rgba(255, 255, 255, .9); font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); cursor: pointer; }
#vgCreative .pv-switch span:hover { background: rgba(15, 23, 42, .7); color: #fff; }
#vgCreative .pv-switch span.active { background: #fff; color: #1e293b; border-color: transparent; }
#vgCreative .pv-hover-tools { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: all .18s; }
#vgCreative .flow-canvas-screen:hover .pv-hover-tools { opacity: 1; transform: none; }
#vgCreative .pv-tool {
  display: inline-flex; align-items: center; gap: 4px; font-family: inherit;
  background: rgba(15, 23, 42, .6); border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; cursor: pointer; transition: all .15s;
}
#vgCreative .pv-tool:hover { background: rgba(15, 23, 42, .85); border-color: rgba(255, 255, 255, .45); }
#vgCreative .pv-toast {
  position: absolute; left: 50%; bottom: 40px; transform: translate(-50%, 6px); z-index: 4;
  background: rgba(15, 23, 42, .82); color: #fff; font-size: 11.5px; padding: 5px 12px; border-radius: 99px;
  opacity: 0; pointer-events: none; transition: all .2s; white-space: nowrap;
}
#vgCreative .pv-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 本镜音色 / 语速 */
#vgCreative .voice-speed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
#vgCreative .voice-speed-grid > div { min-width: 0; }
#vgCreative .voice-speed-grid .label { margin: 0 0 6px; font-size: 12.5px; }
#vgCreative .voice-select-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--c-line); border-radius: 9px; padding: 9px 12px; background: #fff;
  font-size: 13px; color: var(--c-s7); cursor: pointer; font-family: inherit;
}
#vgCreative .voice-select-btn:hover { border-color: var(--c-indigo); }
#vgCreative .voice-select-btn i { font-style: normal; color: #cbd5e1; }
#vgCreative .voice-tts-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
#vgCreative .voice-tts-actions .c-mini-btn { flex: 1; justify-content: center; padding: 7px 8px; font-size: 12px; }
#vgCreative .voice-tts-actions .c-mini-btn:disabled { opacity: .45; cursor: not-allowed; }
#vgCreative .voice-tts-hint { margin-top: 7px; font-size: 11.5px; line-height: 1.45; color: #94a3b8; }
#vgCreative .voice-tts-hint.warn { color: #d97706; }
#cModal .voice-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#cModal .voice-cats { display: inline-flex; gap: 4px; background: #f1f5f9; border-radius: 99px; padding: 3px; }
#cModal .voice-cat { border: none; background: transparent; color: #64748b; font-size: 12.5px; font-family: inherit; padding: 5px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
#cModal .voice-cat:hover { color: #4f46e5; }
#cModal .voice-cat.active { background: #fff; color: #4f46e5; font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
#cModal .voice-search { position: relative; flex: 1; min-width: 190px; display: flex; align-items: center; }
#cModal .voice-search .vs-icon { position: absolute; left: 11px; font-size: 12.5px; opacity: .6; }
#cModal .voice-search .vs-input { width: 100%; height: 34px; border: 1px solid #e5e7eb; border-radius: 99px; padding: 0 32px; font-size: 12.5px; font-family: inherit; color: #334155; outline: none; }
#cModal .voice-search .vs-input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .08); }
#cModal .voice-count { font-size: 11.5px; color: #94a3b8; margin: 0 0 8px; }
#cModal .voice-count b { color: #4f46e5; }
#cModal .voice-grid { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
#cModal .voice-card { display: flex; align-items: center; gap: 10px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 9px 12px; background: #fff; }
#cModal .voice-card.active { border-color: #4f46e5; background: #eef2ff; }
#cModal .voice-avatar { width: 38px; height: 38px; border-radius: 99px; background: #eef2ff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
#cModal .voice-card b { font-size: 13px; display: block; color: #0f172a; }
#cModal .voice-card em { font-style: normal; font-size: 11px; color: #94a3b8; display: block; }
#cModal .voice-play { border: 1px solid #c7d2fe; background: #eef2ff; color: #4f46e5; border-radius: 99px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
#cModal .voice-play:hover { background: #4f46e5; color: #fff; border-color: transparent; }
#cModal .voice-empty { padding: 26px 0; text-align: center; font-size: 12.5px; color: #94a3b8; border: 1px dashed #e5e7eb; border-radius: 12px; }

/* 弹窗 */
.c-modal-mask {
  position: fixed; inset: 0; z-index: 120; background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 12px; overflow-y: auto;
}
.c-modal-mask.hidden { display: none !important; }
.c-modal-box { width: 760px; max-width: 94vw; background: #fff; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .5); padding: 22px; }
.c-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.c-modal-head b { font-size: 16px; }
.c-modal-close { border: none; background: transparent; font-size: 15px; color: var(--c-s4, #94a3b8); cursor: pointer; }
.c-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.c-field { margin-bottom: 12px; }
.c-field label { display: block; font-size: 12.5px; color: #64748b; margin-bottom: 5px; }
.c-field input, .c-field textarea, .c-field select {
  width: 100%; border: 1px solid #dfe5ee; border-radius: 9px; padding: 9px 11px; font-size: 13px;
  color: #334155; font-family: inherit; background: #fff;
}
.c-field textarea { min-height: 96px; resize: vertical; line-height: 1.8; }
.c-field input:focus, .c-field textarea:focus, .c-field select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .13); }
.c-btn-ghost { border: 1px solid #dfe5ee; background: #fff; color: #334155; padding: 8px 16px; border-radius: 9px; font-size: 13px; cursor: pointer; }
.c-btn-ghost:hover { border-color: #c7d2fe; color: #4f46e5; }
.c-btn-grad { border: none; color: #fff; background: linear-gradient(135deg, #6366f1, #7c3aed); padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.c-btn-grad:hover { filter: brightness(1.06); }
.c-story-view { display: flex; flex-direction: column; gap: 8px; }
.c-story-view .sv-para { font-size: 13px; line-height: 1.85; color: #334155; background: #f7f9fc; border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; }
.c-story-view .sv-meta { font-size: 12px; color: #94a3b8; }
.c-story-view .sv-title { font-size: 15px; font-weight: 700; color: #0f172a; }

/* 资源数据预览（视频 / 文档） */
.c-res-viewer { max-height: 68vh; overflow: auto; }
.c-res-viewer video.c-res-video { width: 100%; max-height: 62vh; background: #000; border-radius: 10px; display: block; }
.c-res-pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.8; color: #334155; background: #f7f9fc; border: 1px solid #e6eaf2; border-radius: 10px; padding: 12px 14px; margin: 0; font-family: inherit; }
.c-res-hint { font-size: 12px; color: #94a3b8; margin-top: 10px; }
.c-res-hint a { color: #6d28d9; }

/* loading（挂在 body 上，需全局样式） */
.c-loading-mask {
  position: fixed; inset: 0; z-index: 130; background: rgba(255, 255, 255, .6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
}
.c-loading-mask .spinner {
  width: 40px; height: 40px; border-radius: 99px; border: 3px solid #e0e7ff; border-top-color: #6366f1; animation: cspin .8s linear infinite;
}
.c-loading-mask span { font-size: 13px; color: #4f46e5; font-weight: 600; }
@keyframes cspin { to { transform: rotate(360deg); } }

/* ===== 预览：真实视频 / 图片轮播 ===== */
#vgCreative .pv-video-el { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#vgCreative .pv-img-el { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#vgCreative .pv-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 4; }
#vgCreative .pv-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .45); cursor: pointer; }
#vgCreative .pv-dots i.on { background: #fff; }

/* ===== 本镜素材：带缩略图的 chips ===== */
#vgCreative .ir-chip { padding-left: 4px; }
#vgCreative .ir-chip .ir-thumb { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #e8ecfa; }
#vgCreative .ir-chip .ir-thumb.glyph { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

/* ===== 步骤条（下一步/上一步/生成） · 吸底白底边框 ===== */
#vgCreative .c-stepbar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin: 18px -4px 0; padding: 13px 24px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border-top: 1px solid #f3f4f6;
}
#vgCreative .c-stepbar .c-save-btn { padding: 11px 22px; border-radius: 99px; }
#vgCreative .c-stepbar .c-mini-btn { padding: 10px 18px; border-radius: 99px; }
#vgCreative .c-stepbar .c-mini-btn:disabled { opacity: .55; cursor: wait; }
#vgCreative .c-render-status { font-size: 12.5px; color: #64748b; font-weight: 500; }
#vgCreative .c-render-status.is-running { color: #4f46e5; }
#vgCreative .c-render-status.is-ok { color: #059669; }
#vgCreative .c-render-status.is-error { color: #dc2626; }

/* ===== 封面编辑 ===== */
#vgCreative .cover-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr) minmax(0, .95fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { #vgCreative .cover-grid { grid-template-columns: minmax(0, 1fr); } }
#vgCreative .c-cover-bg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#vgCreative .c-cover-bg .c-select { flex: 1 1 160px; }
#vgCreative .c-cover-canvas-wrap { display: flex; justify-content: center; }
#vgCreative #cCoverCanvas { width: 300px; height: 400px; border-radius: 12px; border: 1px solid #e5e7eb; box-shadow: 0 10px 30px -20px rgba(15, 23, 42, .5); }
#vgCreative input[type=range] { width: 100%; accent-color: #6366f1; }
#vgCreative input[type=color] { width: 48px; height: 32px; padding: 0; border: 1px solid #dfe5ee; border-radius: 8px; background: #fff; }

/* ===== 资产编辑弹窗：图片管理 ===== */
.c-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 8px; }
.c-img-card { position: relative; border: 1px solid #e6eaf2; border-radius: 10px; overflow: hidden; background: #f7f9fc; aspect-ratio: 1/1; cursor: zoom-in; }
.c-img-card img { width: 100%; height: 100%; object-fit: contain; background: #f8fafc; display: block; }
.c-img-card .c-img-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 99px;
  background: rgba(244, 63, 94, .92); color: #fff; font-size: 11px; cursor: pointer; line-height: 1;
}
.c-img-card .c-img-tag { position: absolute; left: 4px; bottom: 4px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 5px; }
.c-img-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1/1;
  border: 1.5px dashed #c7d2fe; border-radius: 10px; background: #f8faff; color: #6366f1; font-size: 11.5px; cursor: pointer;
}
.c-img-add:hover { background: #eef2ff; }
.c-img-add .plus { font-size: 20px; line-height: 1; }
.c-img-status { font-size: 12px; color: #64748b; margin-top: 6px; }
.c-img-status.run { color: #2563eb; }
.c-img-status.err { color: #dc2626; }
.c-voice-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

/* 灯箱 */
.c-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(17, 24, 39, .8); display: none; align-items: center; justify-content: center; }
.c-lightbox.on { display: flex; }
.c-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; background: #fff; }
.c-lightbox .c-lb-close { position: fixed; top: 18px; right: 22px; width: 34px; height: 34px; border-radius: 99px; border: none; background: #fff; color: #334155; font-size: 16px; cursor: pointer; }

/* ===== 选择模板 ===== */
#vgCreative .tpl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#vgCreative .tpl-title { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--c-ink); margin: 0; }
#vgCreative .tpl-ico { width: 26px; height: 26px; border-radius: 8px; background: #eef2ff; color: var(--c-indigo); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
#vgCreative .tpl-tools { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
#vgCreative .tpl-chip { height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--c-line); background: #fff; color: var(--c-s5); font-family: inherit; font-size: 13px; cursor: pointer; }
#vgCreative .tpl-chip.active { background: var(--c-indigo); border-color: var(--c-indigo); color: #fff; font-weight: 600; }
#vgCreative .tpl-search { position: relative; width: 220px; }
#vgCreative .tpl-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-s4); font-size: 12px; }
#vgCreative .tpl-search input { width: 100%; height: 34px; border: 1px solid var(--c-line); border-radius: 99px; padding: 0 14px 0 32px; font-family: inherit; font-size: 13px; outline: none; }
#vgCreative .tpl-search input:focus { border-color: #c7d2fe; }
#vgCreative .tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
#vgCreative .tpl-card { background: #fff; border: 1.5px solid transparent; border-radius: 16px; overflow: hidden; cursor: pointer; transition: all .15s; box-shadow: 0 10px 30px -24px rgba(15, 23, 42, .35); }
#vgCreative .tpl-card:hover { transform: translateY(-2px); }
#vgCreative .tpl-card.selected { border-color: var(--c-indigo); box-shadow: 0 14px 30px -16px rgba(99, 102, 241, .85); }
#vgCreative .tpl-cover { position: relative; width: 100%; background: #4f46e5 center/cover no-repeat; }
#vgCreative .tpl-tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 7px; background: rgba(0, 0, 0, .32); color: #fff; font-size: 12px; }
#vgCreative .tpl-dur { position: absolute; bottom: 10px; right: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11.5px; }
#vgCreative .tpl-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .92); font-size: 30px; text-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
#vgCreative .tpl-meta { display: flex; align-items: center; gap: 8px; padding: 11px 16px; }
#vgCreative .tpl-meta b { font-size: 14px; color: var(--c-ink); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vgCreative .tpl-ratio { font-size: 11px; color: var(--c-s4); background: #f1f5f9; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
#vgCreative .tpl-dot { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #d1d5db; display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; flex-shrink: 0; }
#vgCreative .tpl-card.selected .tpl-dot { background: var(--c-indigo); border-color: var(--c-indigo); color: #fff; }
#vgCreative .tpl-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--c-s4); font-size: 13px; }
#vgCreative .tpl-pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 18px; font-size: 12.5px; color: var(--c-s4); }
#vgCreative .tpl-pager .pg { min-width: 28px; height: 28px; border: 1px solid var(--c-line); border-radius: 7px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#vgCreative .tpl-pager .pg.active { background: var(--c-indigo); border-color: var(--c-indigo); color: #fff; }
#vgCreative .tpl-pager .pg.dis { opacity: .45; cursor: default; }
@media (max-width: 900px) { #vgCreative .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #vgCreative .tpl-grid { grid-template-columns: minmax(0, 1fr); } }

/* 生成视频模型：素材后置 + 行内提示 */
#vgCreative .c-model-hint { font-size: 11px; color: #94a3b8; font-weight: 400; margin-left: 6px; white-space: normal; }