﻿/* ====================================================================
   DramaBoard · 短剧制作平台 · 样式表
   最后整合: v42 恢复重建
   ==================================================================== */

/* === 基础 === */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #e8ebf0;
  background: #0f1116;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: #2a2e37;
  color: #e8ebf0;
  border: 1px solid #3a3e47;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: background 0.12s, border-color 0.12s;
}
button:hover { background: #3a3e47; }

main { flex: 1; min-height: 0; display: flex; flex-direction: row; overflow: hidden; }  /* 2026-06-18 改：row 让 fileTree 在左、content 在右 */
button.primary { background: #4fc3f7; color: #0f1116; border-color: #4fc3f7; font-weight: 500; }
button.primary:hover { background: #29b6f6; }
button.secondary { background: #1a1d24; color: #c3c8d2; }
button.secondary:hover { background: #2a2e37; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input, textarea {
  font-family: inherit;
  background: #1a1d24;
  color: #e8ebf0;
  border: 1px solid #2a2e37;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}
input:focus, textarea:focus { border-color: #4fc3f7; }

/* === 顶栏 === */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: #14171d;
  border-bottom: 1px solid #1f232b;
  flex: 0 0 auto;
}
.topbar .logo { font-weight: 600; color: #f0f2f5; }
.topbar .breadcrumbs { color: #6a7080; font-size: 12px; flex: 1; }
.topbar .breadcrumbs a { color: #8b909c; text-decoration: none; }
.topbar .breadcrumbs a:hover { color: #4fc3f7; }
.topbar .actions { display: flex; align-items: center; gap: 8px; }
.topbar .actions #search {
  width: 240px;
  padding: 6px 10px;
}

/* === Tab === */
.tabs {
  display: flex;
  background: #14171d;
  border-bottom: 1px solid #1f232b;
  flex: 0 0 auto;
}
.tab {
  background: transparent;
  border: none;
  color: #8b909c;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tab:hover { background: #1a1d24; color: #c3c8d2; }
.tab.active { color: #4fc3f7; border-bottom-color: #4fc3f7; background: #1a1d24; }

/* === Tab panels === */
.tab-panel { display: flex; flex: 1; overflow: hidden; position: relative; }
.tab-panel.hidden { display: none; }
/* 2026-06-16：通用 .hidden class 让任何元素都能隐藏（不只是特定选择器）*/
.hidden { display: none !important; }

/* === 资产浏览器 === */
.sidebar {
  width: 260px;
  background: #14171d;
  border-right: 1px solid #1f232b;
  overflow-y: auto;
  flex: 0 0 auto;
}
.file-tree { padding: 10px 0; }
.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #c3c8d2;
  user-select: none;
  border-radius: 0;
  transition: background 0.1s;
}
.tree-item:hover { background: #1f232b; }
.tree-item.active { background: #2a2e37; color: #f0f2f5; }
.tree-item .icon { flex: 0 0 18px; text-align: center; }
.tree-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { flex: 1; padding: 20px; overflow-y: auto; }
.welcome { text-align: center; padding: 80px 20px; color: #8b909c; }
.welcome h1 { color: #f0f2f5; margin-bottom: 12px; }
.welcome p { margin: 6px 0; }

/* 文件预览 */
.preview-info { background: #1a1d24; border: 1px solid #2a2e37; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.preview-info h3 { margin: 0 0 8px; color: #f0f2f5; }
.preview-info code { background: #0f1116; padding: 2px 6px; border-radius: 3px; font-size: 12px; }
.preview-image { max-width: 100%; max-height: 70vh; display: block; border-radius: 8px; }
.preview-video, .preview-audio { max-width: 100%; }

/* 文本编辑器 */
.editor-wrap { background: #1a1d24; border: 1px solid #2a2e37; border-radius: 8px; }
.editor-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #2a2e37; }
.dirty-indicator { color: #ff9800; }
.saved { color: #6a7080; font-size: 12px; }
.editor-textarea {
  width: 100%;
  min-height: 60vh;
  padding: 14px;
  background: #14171d;
  color: #e8ebf0;
  border: none;
  border-radius: 0 0 8px 8px;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

/* === 状态栏（顶部导航栏） === */
.statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: #14171d;
  border-bottom: 1px solid #1f232b;
  min-height: 36px;
  flex: 0 0 auto;
  color: #e8ebf0;
  font-size: 13px;
}
.sb-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; overflow: hidden; }
.sb-logo { font-weight: 600; color: #f0f2f5; font-size: 13px; white-space: nowrap; }
#breadcrumbs { color: #6a7080; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#breadcrumbs a { color: #8b909c; text-decoration: none; }
#breadcrumbs a:hover { color: #4fc3f7; }
.sb-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status-text { color: #6a7080; font-family: monospace; font-size: 12px; }

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;  /* 2026-06-18 调高到 1100，确保在 .bottom-toolbar(z-index: 999) 之上，避免画布资产、素材库、画布预览等 modal 的下拉菜单被遮 */
}
.modal.hidden { display: none; }
/* 文件夹/资产 modal 层级更高 */
.modal#assets-modal { z-index: 2000; }
.modal#asset-preview-modal { z-index: 2500; }
.modal#folder-modal { z-index: 3000; }
.modal#asset-edit-modal { z-index: 2600; }
.modal-content {
  background: #1a1d24;
  border: 1px solid #2f343d;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal#folder-modal .modal-content {
  background: #1a1d24;
  border: 1px solid #2f343d;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2e37;
}
.modal-header h2 { font-size: 15px; color: #f0f2f5; margin: 0; }
.modal-header button { background: transparent; border: none; color: #888; font-size: 18px; }
.modal-header button:hover { color: #fff; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal#asset-edit-modal .modal-body { overflow-y: visible; }
.hint { color: #6a7080; font-size: 12px; margin-top: 4px; }
.hint-inline { color: #6a7080; font-size: 12px; font-weight: normal; margin-left: 6px; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; color: #c3c8d2; font-size: 13px; margin-bottom: 4px; }
.form-group input { width: 100%; }
.media-model-center { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
#settings-modal .modal-content { width: min(760px, calc(100vw - 32px)); max-width: 760px; }
.model-center-intro { margin: 0; }
.model-kind-card { min-width: 0; display: grid; grid-template-columns: minmax(160px, 210px) minmax(0, 1fr) 140px; align-items: center; gap: 14px; padding: 14px; border: 1px solid #30343d; border-radius: 12px; background: #17191f; }
.model-kind-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0; }
.model-kind-head b { display: block; color: #eef1f6; font-size: 14px; }
.model-kind-head small { display: block; margin-top: 3px; color: #818b9a; font-size: 11px; line-height: 1.4; }
.model-kind-head button, .model-kind-edit { border: 1px solid #3c4350; border-radius: 7px; padding: 5px 8px; background: #242832; color: #cbd2dc; cursor: pointer; white-space: nowrap; }
.model-kind-select { width: 100%; min-width: 0; height: 36px; padding: 0 30px 0 10px; border: 1px solid #3b414d; border-radius: 8px; background: #101217; color: #f0f2f5; }
.model-default-row { min-width: 0; display: flex; align-items: center; gap: 9px; }
.model-default-label { flex: 0 0 auto; color: #aab2bf; font-size: 12px; }
.model-kind-edit { width: 100%; margin: 0; background: transparent; color: #969fad; }
.model-kind-empty { min-width: 0; flex: 1; height: 36px; display: flex; align-items: center; padding: 0 10px; border: 1px dashed #343a45; border-radius: 8px; color: #727c8b; font-size: 12px; }
.media-model-editor { margin-top: 14px; padding: 16px; border: 1px solid #3a424f; border-radius: 12px; background: #14171d; }
.media-model-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.media-model-editor-head b, .media-model-editor-head small { display: block; }
.media-model-editor-head small { margin-top: 3px; color: #7e8898; font-size: 11px; }
.model-manager-content { width: min(620px, calc(100vw - 32px)); max-width: 620px; overflow: visible; }
#media-model-manager-modal .modal-body { overflow: visible; }
.model-manager-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.model-manager-toolbar b, .model-manager-toolbar small { display: block; }
.model-manager-toolbar small { margin-top: 3px; color: #7d8795; font-size: 11px; }
.model-manager-list { display: flex; flex-direction: column; gap: 8px; }
.model-manager-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #303640; border-radius: 9px; background: #171a20; }
.model-manager-row.active { border-color: #b99a55; background: rgba(185,154,85,.08); }
.model-manager-row-info { min-width: 0; flex: 1; }
.model-manager-row-info b { display: flex; align-items: center; gap: 7px; color: #eef1f5; font-size: 13px; }
.model-manager-row-info b span { padding: 2px 6px; border-radius: 999px; background: rgba(185,154,85,.16); color: #d9bc78; font-size: 10px; }
.model-manager-row-info small { display: block; overflow: hidden; margin-top: 3px; color: #7f8998; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-manager-empty { padding: 28px 16px; border: 1px dashed #353b46; border-radius: 9px; color: #778190; text-align: center; }
.model-manager-more { position: relative; flex: 0 0 auto; }
.model-manager-more-trigger { width: 30px; height: 28px; padding: 0; border: 1px solid #363c47; border-radius: 7px; background: transparent; color: #a2abb8; cursor: pointer; letter-spacing: 1px; }
.model-manager-more-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: 112px; padding: 5px; border: 1px solid #363c47; border-radius: 8px; background: #181b21; box-shadow: 0 12px 34px rgba(0,0,0,.45); opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity 120ms, transform 120ms, visibility 120ms; }
.model-manager-more:hover .model-manager-more-menu,
.model-manager-more:focus-within .model-manager-more-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.model-manager-more-menu button { width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: #c2c9d3; text-align: left; cursor: pointer; }
.model-manager-more-menu button:hover { background: rgba(255,255,255,.06); }
.model-manager-more-menu button.danger { color: #ff7474; }
.media-model-group { min-width: 0; padding: 10px; border: 1px solid #30343d; border-radius: 10px; background: #17191f; }
.media-model-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #eef1f6; font-size: 13px; font-weight: 700; }
.media-model-title button { border: 1px solid #3c4350; border-radius: 6px; padding: 4px 7px; background: #242832; color: #cbd2dc; cursor: pointer; }
.media-model-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; margin-top: 6px; padding: 8px; text-align: left; border: 1px solid #30343d; border-radius: 8px; background: #20232b; color: #e7eaf0; cursor: pointer; }
.media-model-row b, .media-model-row small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-model-row small { grid-column: 1; color: #8993a3; }
.media-model-row span { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #9da7b6; font-size: 11px; }
.media-model-row.active { border-color: #4fc3f7; background: rgba(79,195,247,.09); }
.media-model-row.active span { color: #72d4ff; }
@media (max-width: 760px) {
  .media-model-center { grid-template-columns: 1fr; }
  .model-kind-card { grid-template-columns: 1fr; gap: 10px; }
}
.form-group .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 6px;
  padding: 0 10px;
  height: 36px;
  box-sizing: border-box;
  transition: border-color 0.12s;
}
.form-group .input-wrap:focus-within { border-color: #4fc3f7; }
.form-group .input-wrap .left-icon {
  width: 16px;
  height: 16px;
  color: #6a7080;
  flex: 0 0 auto;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.form-group .input-wrap .left-icon svg { width: 16px; height: 16px; display: block; }
.form-group .input-wrap input,
.form-group .input-wrap select {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #e8ebf0;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
.form-group .input-wrap select { padding-right: 24px; }
.form-group .input-wrap .right-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #8b909c;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-group .input-wrap .right-chevron svg { width: 14px; height: 14px; display: block; }
.custom-select { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; }
.cs-trigger {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  color: #e8ebf0;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  user-select: none;
}
.cs-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1d24;
  border: 1px solid #2f343d;
  border-radius: 8px;
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.cs-options.hidden { display: none; }
.cs-options li {
  padding: 8px 14px;
  color: #e8ebf0;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cs-options li:hover { background: #2a2e37; color: #f0f2f5; }
.cs-options li.selected { background: #2a2e37; color: #f0f2f5; }
.right-chevron { transition: transform 0.15s; }
.right-chevron.open { transform: translateY(-50%) rotate(180deg); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* === 个人画布列表页 === */
.canvas-list-page {
  position: absolute;
  inset: 0;
  background: #0f1116;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.canvas-list-page.hidden { display: none; }

/* 2026-06-22 16:00：clp-header 进一步压缩，padding 16→10，给 wrap 多腾 12px */
.clp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid #1f232b;
  flex: 0 0 auto;
}
.clp-tabs { display: flex; gap: 4px; }
.clp-tab {
  background: transparent;
  border: none;
  color: #6a7080;
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
  font-weight: 500;
}
.clp-tab:hover { color: #c3c8d2; background: #1a1d24; }
.clp-tab.active { color: #f0f2f5; background: #1f232b; }

.clp-right { display: flex; align-items: center; gap: 8px; }
.clp-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1d24;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 6px 10px;
  color: #8b909c;
  width: 240px;
}
.clp-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8ebf0;
  font-size: 13px;
  padding: 0;
}
.clp-search input:focus { border: none; }
.clp-search input::placeholder { color: #555a66; }
.clp-search-clear {
  background: transparent;
  border: none;
  color: #6a7080;
  font-size: 16px;
  line-height: 1;
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.clp-search-clear:hover { background: #2a2e37; color: #c3c8d2; }
.clp-search.has-text .clp-search-clear { display: inline-flex; }
.clp-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #8b909c;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.clp-icon-btn:hover { background: #1a1d24; color: #e8ebf0; }
.clp-icon-btn.active { color: #4fc3f7; background: #1a1d24; border-color: #2a2e37; }

/* 2026-06-22：clp-cards-wrap 撑满 + 垂直滚动（不分页，画布多了自然向下堆） */
.clp-cards-wrap {
  flex: 1 1 auto;
  min-height: 0;  /* 关键：允许 flex item 收缩，否则 wrap 高度 = 内容高度，把 clp-pagination 挤出去 */
  overflow-x: hidden;
  overflow-y: auto;
  /* 2026-06-22 16:00：wrap padding 4→2，再让出 4px 给卡片 */
  padding: 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: #4fc3f7 #1a1d24;
}
.clp-cards-wrap::-webkit-scrollbar { width: 10px; background: #1a1d24; }
.clp-cards-wrap::-webkit-scrollbar-thumb { background: #4fc3f7; border-radius: 5px; }
.clp-cards-wrap::-webkit-scrollbar-thumb:hover { background: #6dd5fa; }

.clp-cards {
  display: grid;
  grid-auto-flow: row;                             /* 行方向自动增加 */
  column-gap: 12px;                                /* 卡片间水平间距 */
  row-gap: 12px;                                   /* 卡片间垂直间距 */
  align-items: start;
  align-content: start;
  /* 2026-06-22：去掉 height: 100% + grid-auto-rows 固定值——之前 220px row 装不下 1:1 卡片的 240px 高度，导致上下卡片重叠 */
  /* row 高度 = 卡片本身高度（aspect-ratio 决定），卡片间用 row-gap 12px 隔开 */
  /* 密度变体只设 grid-template-columns */
}

/* 小：8 列，卡片 thumb 16:10 + info 约 49px */
.clp-cards.density-small {
  grid-template-columns: repeat(8, 1fr);
}
/* 默认：5 列，卡片 1:1 正方形（高度=宽度=容器宽/5） */
.clp-cards.density-default {
  grid-template-columns: repeat(5, 1fr);
}
/* 大：4 列，卡片 1:1 正方形（高度=宽度=容器宽/4） */
.clp-cards.density-large {
  grid-template-columns: repeat(4, 1fr);
}
/* 2026-06-21：中、大密度下卡片强制正方形（缩略图 cover 填充） */
.clp-cards.density-default .clp-card,
.clp-cards.density-large .clp-card {
  aspect-ratio: 1 / 1;
}
.clp-cards.density-default .clp-thumb,
.clp-cards.density-large .clp-thumb {
  flex: 1 1 0;
  min-height: 0;
  aspect-ratio: auto;
}
.clp-card {
  /* 2026-06-21：宽高由 grid 1fr 决定 + 缩略图 aspect-ratio 锁住 16:10（小密度） */
  background: #1a1d24;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 2026-06-21：画布列表页右上角的密度切换器（个人画布右侧） */
.clp-density {
  display: inline-flex;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 2px;
  gap: 0;
}
.clp-density button {
  background: transparent;
  border: none;
  color: #6a7080;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.clp-density button:hover { color: #c3c8d2; background: #1a1d24; }
.clp-density button.active { color: #4fc3f7; background: #1f232b; }
.clp-density button svg { display: block; }

/* 2026-06-21：密度按钮 hover tooltip（在按钮下方弹出，避免超出 header） */
.clp-density button[data-tip] { position: relative; }
.clp-density button[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1116;
  color: #e8ebf0;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #2a2e37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 10001;
}
.clp-density button[data-tip]:hover::after { opacity: 1; visibility: visible; }

/* 2026-06-21：小模式下的翻页器（页脚） */
.clp-pagination {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* 2026-06-22：压缩高度，腾出 wrap 空间让小密度 4 行卡片不滚——padding 12→6，按钮 32→26，input 30→22 */
  /* 2026-06-22 16:00：二轮再压——padding 6/8→4/5，按钮 28/26→24/22，input 40/22→36/20，让分页栏更贴底 */
  padding: 4px 20px 5px;
  background: #14171d;
  border-top: 1px solid #1f232b;
  color: #8b909c;
  font-size: 12px;
}
.clp-pagination.hidden { display: none; }
.clp-page-btn {
  background: transparent;
  border: 1px solid #2a2e37;
  color: #c3c8d2;
  /* 2026-06-22 16:00：按钮尺寸 28×26→24×22，整体紧凑 */
  width: 24px;
  height: 22px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.clp-page-btn:hover:not(:disabled) { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.clp-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.clp-page-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.clp-page-info input {
  /* 2026-06-22 16:00：输入框尺寸 40×22→36×20，再省 2px */
  width: 36px;
  height: 20px;
  background: #1a1d24;
  border: 1px solid #2a2e37;
  color: #f0f2f5;
  border-radius: 5px;
  text-align: center;
  font-size: 12px;
  padding: 0 3px;
  outline: none;
}
.clp-page-info input:focus { border-color: #4fc3f7; }

.clp-card:hover {
  transform: translateY(-2px);
  border-color: #4fc3f7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.clp-thumb {
  width: 100%;
  /* 2026-06-22 16:00：小密度卡片缩略图从 16/10→16/9，让 4 行不滚动（default/large 已被重置成 auto，不受影响） */
  aspect-ratio: 16 / 9;      /* 2026-06-21：高度 = 宽 × 10/16，密度切换时跟着变 */
  flex: 0 0 auto;              /* 2026-06-21：flex 不拉伸/压缩，让 aspect-ratio 决定高度 */
  background: #0f1116;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.clp-thumb-empty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 18px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.clp-thumb-empty-cell { background: #2a2e37; border-radius: 4px; }
.clp-thumb-new {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px dashed #2a2e37;
  border-radius: 10px;
  margin: 0;
  box-sizing: border-box;
  color: #6a7080;
  transition: color 0.12s, border-color 0.12s;
}
.clp-card-new:hover .clp-thumb-new { color: #4fc3f7; border-color: #4fc3f7; }

.clp-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.clp-info-name {
  color: #f0f2f5;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clp-info-time {
  color: #6a7080;
  font-size: 11px;
}

/* 卡片右上角 ··· 按钮 */
.clp-card-more {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(15, 17, 22, 0.85);
  color: #c3c8d2;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  padding: 0;
  z-index: 2;
}
.clp-card:hover .clp-card-more { display: inline-flex; }
.clp-card-more:hover { background: #2a2e37; color: #4fc3f7; }

/* 卡片下拉菜单 */
.clp-card-menu {
  position: absolute;
  top: 40px;
  right: 8px;
  min-width: 168px;
  background: rgba(26, 29, 36, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2f343d;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  z-index: 100;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.clp-card-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.clp-card-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #e8ebf0;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
  font-weight: normal;
}
.clp-card-menu button:hover { background: rgba(255, 255, 255, 0.07); }
.clp-card-menu button svg { display: block; pointer-events: none; flex: 0 0 auto; color: #8b909c; }
.clp-card-menu button:hover svg { color: #4fc3f7; }
.clp-card-menu-danger { color: #f44336 !important; }
.clp-card-menu-danger svg { color: #f44336 !important; }
.clp-card-menu-danger:hover { background: rgba(244, 67, 54, 0.12) !important; }
.clp-card-menu-danger:hover svg { color: #f44336 !important; }
.clp-card-menu-sep {
  height: 1px;
  background: #2a2e37;
  margin: 4px 6px;
}

/* 搜索无结果提示 */
.clp-empty-hint {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px 24px;
  color: #8b909c;
  font-size: 14px;
  text-align: center;
}
.clp-empty-hint .clp-empty-icon { opacity: 0.5; }
.clp-empty-hint .clp-empty-sub { font-size: 12px; color: #555a66; }

/* === 编辑画布页 === */
.canvas-edit-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.canvas-edit-page.hidden { display: none; }
/* 2026-06-21：画布顶栏按钮改为悬浮，去掉整条黑底横栏 */
.cep-float {
  position: absolute;
  top: 12px;
  z-index: 60;
  backdrop-filter: blur(6px);
  background: rgba(20, 23, 29, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.cep-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #2a2e37;
  color: #c3c8d2;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cep-back.cep-float { left: 12px; }
.cep-back:hover { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.cep-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2a2e37;
  color: #c3c8d2;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cep-settings.cep-float { right: 12px; }
.cep-settings:hover { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.canvas-edit-page .canvas-viewport { flex: 1 1 auto; }
.canvas-edit-page .bottom-toolbar { z-index: 51; }

/* === 画布视口 === */
.canvas-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0d0f13;
  overflow: hidden;
  user-select: none;
  cursor: default;
}
.canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  /* 背景点阵 */
  /* 2026-06-28: 点更小(直径 1px 而不是 2px),不那么显眼 */
  background-image: radial-gradient(circle, #2a2e37 0.5px, transparent 0.7px);
  background-size: 20px 20px;
  pointer-events: none;
}
/* === 2026-06-23: canvas drag-over hint === */
.canvas-viewport.canvas-drag-over::after {
  content: '松开鼠标导入到画布';
  position: absolute;
  inset: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 22, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 3px dashed #4fc3f7;
  border-radius: 16px;
  color: #4fc3f7;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 200;
  animation: dropPulse 1.4s ease-in-out infinite;
}
@keyframes dropPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* === 2026-06-23: node top toolbar (click to expand, same lifecycle as input-panel) === */
.node-toolbar {
  position: absolute;
  /* 2026-06-28: top 用 calc + var(--canvas-scale),间距在 viewport 固定 */
  top: calc(-52px / var(--canvas-scale, 1));
  /* 2026-06-28: 关键 — transform-origin 从顶部 50% 0%,scale(1/s) 只缩内容不移动顶部位置 */
  transform-origin: 50% 0%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1px;
  background: rgba(20, 23, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #2a2e37;
  border-radius: 999px;
  padding: 5px 7px;
  z-index: 6; /* above node-anchor (5), below modal */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  /* 2026-06-27 fix:改 overflow-x: auto 为 overflow: visible,避免 CSS 规范把 overflow-y 强制变 auto 而裁掉 .ntb-menu 下拉 */
  overflow: visible;
  transition: top 0.18s ease, opacity 0.18s ease;
}
.node-toolbar[style*="display:none"] { display: none !important; }
.node-toolbar.hidden { display: none !important; }

.ntb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #c3c8d2;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
  line-height: 1.2;
}
.ntb-btn:hover { background: rgba(79, 195, 247, 0.15); color: #4fc3f7; }
.ntb-btn:active { background: rgba(79, 195, 247, 0.3); }
.ntb-btn.active { background: #4fc3f7; color: #0f1116; }

.ntb-sep {
  width: 1px;
  height: 16px;
  background: #2a2e37;
  margin: 0 2px;
  flex: 0 0 auto;
}

.ntb-dropdown { position: relative; }
.ntb-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 23, 29, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2f343d;
  border-radius: 10px;
  padding: 4px;
  min-width: 88px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 7;
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ntb-menu.hidden { display: none !important; }
.ntb-menu button {
  background: transparent;
  border: none;
  color: #e8ebf0;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}
.ntb-menu button:hover { background: rgba(79, 195, 247, 0.15); color: #4fc3f7; }
.canvas-edges { position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.canvas-world { z-index: 3; }
.edge-group { pointer-events: auto; }
.edge-group .edge-line { transition: stroke 0.15s, opacity 0.15s; pointer-events: none; }
.edge-group .edge-hit { pointer-events: stroke; cursor: pointer; }
.edge-group:hover .edge-line { stroke: #4fc3f7; opacity: 1; }
.edge-group .edge-del { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.edge-group:hover .edge-del { opacity: 1; pointer-events: auto; }
.canvas-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #555a66;
  pointer-events: none;
}
.canvas-hint.hidden { display: none; }
.canvas-hint-icon { font-size: 48px; opacity: 0.5; }
.canvas-hint-text { font-size: 16px; margin-top: 10px; color: #8b909c; }
.canvas-hint-sub { font-size: 12px; margin-top: 4px; color: #555a66; }

/* === 节点（canvas-node 是定位容器；.node-body 是显示窗口） === */
.canvas-node {
  position: absolute;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  /* 2026-06-16：所有子元素左对齐（不 stretch），让 node-body 左上角固定 */
  align-items: flex-start;
  overflow: visible;
  cursor: grab;
  z-index: 1;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.12s;
}
.canvas-node.selected { outline-color: #4fc3f7; }
.canvas-node:active { cursor: grabbing; }
.canvas-node.dragging { opacity: 0.92; z-index: 50; }
.canvas-asset-group { box-sizing:border-box; display:block; z-index:0; border:1px solid rgba(137,163,205,.28); border-radius:18px; background:rgba(81,105,143,.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,.025); cursor:grab; }
.canvas-asset-group.selected { outline-color:rgba(164,190,232,.65); }
.canvas-asset-group-title { position:absolute; left:18px; top:14px; color:#c8d3e5; font-size:13px; font-weight:600; letter-spacing:.02em; }
.canvas-asset-group-hint { position:absolute; right:16px; top:15px; color:#77849a; font-size:11px; }

.node-corner-label {
  position: absolute;
  /* 2026-06-16：标签紧贴 node-body 顶部（原 -28px 太靠上）*/
  top: -18px;
  left: 0;
  /* 2026-06-17：去掉 z-index:4，跟节点窗口同一显示层级，不浮在图片上层 */
  /* 2026-06-16：标签字缩小到 50%（原 13px → 6.5px）*/
  font-size: 6.5px;
  color: #e8ebf0;
  background: transparent;
  padding: 0;
  border-radius: 4px;
  cursor: text;
  user-select: none;
  /* 2026-06-16：去掉 max-width 限制，让字能完整显示不出现省略号 */
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}
.node-corner-label .node-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 2026-06-16：图标尺寸缩小（跟标签字同步）*/
  width: 12px;
  height: 12px;
  border-radius: 3px;
  font-size: 6.5px;
  line-height: 1;
  flex: 0 0 auto;
  /* 2026-06-16：去掉图标底色，透明 */
  background: transparent !important;
}
/* 2026-06-16：node-type-icon 里的简笔画 SVG（镜头相机 / 播放图标）尺寸控制 */
.node-corner-label .node-type-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}
/* 2026-06-16：移除 icon-image / icon-video 的底色，保留 class 用于语义区分 */
.node-corner-label .icon-image { background: transparent !important; color: inherit; }
.node-corner-label .icon-video { background: transparent !important; color: inherit; }
.node-corner-label .node-corner-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: #e8ebf0;
}
.node-corner-label:hover .node-corner-text { color: #4fc3f7; }

.node-body {
  background: #15181f !important;
  border: 1px solid #2a2e37 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35) !important;
  /* 2026-06-16：overflow 改为 visible，让 corner-label (top:-24px) 和 node-anchor (left/right:-12px) 能冲出去不被裁 */
  overflow: visible !important;
  flex: 0 0 auto;
  /* 2026-06-16：改为 absolute，贴 canvas-node 左上角 (left:0, top:0)，左上角固定不随切 ratio 漂移 */
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.node-body:hover { border-color: #3a3e47 !important; }

.node-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: #6a7080;
  text-align: center;
  padding: 24px;
}
.node-placeholder-art { opacity: 0.55; }
.node-placeholder .node-text { font-size: 14px; color: #8b909c; }
.node-placeholder .node-dims { font-size: 11px; color: #555a66; font-family: monospace; }
.node-placeholder.hidden { display: none; }

.node-result { position: relative; width: 100%; height: 100%; background: #0a0c10; border-radius: 16px; overflow: hidden; }
.node-result img, .node-result video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0a0c10;
  /* 2026-06-16：node-body 改 overflow:visible 后，img/视频的圆角需要自己加 */
  border-radius: 16px;
}
.node-result.hidden { display: none; }

.node-status { text-align: center; color: #aab0bc; padding: 16px; }
.node-status .spinner {
  width: 32px; height: 32px;
  border: 3px solid #2a2e37;
  border-top-color: #4fc3f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 节点浮动工具条（生成后） */
.node-action-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(20, 23, 29, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #2a2e37;
  border-radius: 10px;
  padding: 4px;
  z-index: 5;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.node-action-bar::-webkit-scrollbar { display: none; }

.nab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: transparent;
  border: none;
  color: #c3c8d2;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.nab-btn:hover { background: rgba(79, 195, 247, 0.15); color: #4fc3f7; }
.nab-ico { display: flex; align-items: center; }
.nab-text { line-height: 1; }
.nab-caret { font-size: 9px; opacity: 0.7; margin-left: 1px; }
.nab-sep { width: 1px; height: 16px; background: #2a2e37; margin: 0 2px; }

/* 节点锚点（左右连线点） */
.node-anchor {
  position: absolute;
  width: 24px; height: 24px;
  background: #2a2e37;
  border: 1px solid #4fc3f7;
  color: #4fc3f7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  cursor: crosshair;
  user-select: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.canvas-node:hover .node-anchor { opacity: 1; }
.node-anchor-left  { left: -12px; top: 50%; transform: translateY(-50%); }
.node-anchor-right { right: -12px; top: 50%; transform: translateY(-50%); }
.node-anchor:hover { background: #4fc3f7; color: #0f1116; border-color: #4fc3f7; }
.node-anchor.dragging { background: #ff9800; border-color: #ff9800; }

/* === 输入面板（节点下方） === */
.node-input-panel {
  background: #1a1d24 !important;
  border: 1px solid #2a2e37 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35) !important;
  padding: 12px 14px !important;
  position: absolute;
  /* 2026-06-28: top = node.h + gap/scale → 视觉 = node.h*scale + gap(固定 8px viewport 间距) */
  top: calc(var(--node-h, 180px) + 8px / var(--canvas-scale, 1));
  /* 2026-06-28: 关键 — transform-origin 从顶部,scale(1/s) 只缩内容不移动位置 */
  transform-origin: 50% 0%;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 2026-06-28:固定面板尺寸,点击节点/切换节点时大小不变 */
.node-input-panel {
  width: 640px !important;
  min-width: 640px !important;
  max-width: 640px !important;
}
.nip-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nip-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.nip-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #2a2e37;
  color: #aab0bc;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, color 0.12s;
}
.nip-pill:hover { background: #3a3e47; color: #e4e6eb; }
.nip-toggle {
  width: 26px; height: 26px;
  border: none; background: transparent;
  color: #6a7080; font-size: 16px;
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.nip-toggle:hover { background: #2a2e37; color: #4fc3f7; }

.node-assets {
  background: #14171d;
  border: 1px dashed #2a2e37;
  border-radius: 8px;
  padding: 8px;
  min-height: 50px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
  color: #6a7080;
  font-size: 12px;
  transition: border-color 0.12s, color 0.12s;
}
.node-assets:hover { border-color: #4fc3f7; color: #aab0bc; }
.node-assets.has-items { border-style: solid; padding: 6px; }
.node-assets.hidden { display: none; }
.node-assets-thumb {
  display: inline-block;
  width: 36px; height: 36px;
  background-size: cover;
  background-position: center;
  background-color: #2a2e37;
  border-radius: 4px;
  position: relative;
}
.node-assets-thumb .remove {
  display: none;
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.node-assets-thumb:hover .remove { display: flex; }

.node-prompt {
  width: 100%;
  min-height: 60px;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e8ebf0;
  font-size: 13px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}
.node-prompt:focus { border-color: #4fc3f7; }
.node-prompt::placeholder { color: #555a66; }

.node-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.node-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.node-tag {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  background: #2a2e37 !important;
  color: #c3c8d2 !important;
  border: none !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.node-tag:hover { background: #3a3e47 !important; color: #e4e6eb !important; }
.node-tag.active { background: #4fc3f7 !important; color: #0f1116 !important; }

.node-send {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: none !important;
  background: #2a2e37 !important;
  color: #c3c8d2 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.1s;
  margin-left: auto;
}
.node-send:hover { background: #4fc3f7 !important; color: #0f1116 !important; transform: scale(1.05); }
.node-send:disabled { opacity: 0.5; cursor: not-allowed; }
.node-send:disabled:hover { transform: none; background: #2a2e37 !important; color: #c3c8d2 !important; }

/* 节点 tab（视频节点用）*/
.node-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.node-tab {
  background: transparent;
  border: none;
  color: #8b909c;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
}
.node-tab:hover { background: #2a2e37; color: #c3c8d2; }
.node-tab.active { background: #4fc3f7; color: #0f1116; }
.node-tab.disabled { opacity: 0.4; cursor: not-allowed; }

/* === 底部工具栏 === */
.bottom-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 999;
}
.toolbar-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #aab0bc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}
.toolbar-btn:hover { background: #2a2e37; color: #4fc3f7; }
.toolbar-btn svg { display: block; pointer-events: none; }
.toolbar-btn.primary {
  background: #14161b;
  color: #0f1116;
  font-weight: bold;
  font-size: 22px;
}
.toolbar-btn.primary:hover { background: #4fc3f7; color: #0f1116; }
.toolbar-btn.active { background: #4fc3f7; color: #0f1116; }
.toolbar-divider { width: 1px; background: #2a2e37; margin: 4px 4px; }

/* 工具栏按钮即时 tooltip（data-tip） */
.toolbar-btn[data-tip] { position: relative; }
.toolbar-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1116;
  color: #e8ebf0;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #2a2e37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 10001;
}
.toolbar-btn[data-tip]:hover::after { opacity: 1; visibility: visible; }

/* === 添加节点菜单 === */
.add-menu {
  position: fixed;
  /* 位置由 JS 根据鼠标坐标动态设置(top/left);
     不传坐标时走居中底部模式(给底部 ➕ 按钮用) */
  top: 0;
  left: 0;
  background: rgba(26, 29, 36, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2f343d;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 1000;
  min-width: 248px;
  max-height: 78vh;
  overflow-y: auto;
}
.add-menu.hidden { display: none; }
.add-menu-title {
  font-size: 12px;
  color: #8b909c;
  padding: 8px 12px 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.add-menu .add-menu-item {
  background: transparent !important;
  border: none !important;
  color: #e8ebf0 !important;
  padding: 9px 12px !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  transition: background 0.12s ease !important;
  width: 100%;
  font-weight: normal;
}
.add-menu .add-menu-item:hover { background: rgba(255, 255, 255, 0.07) !important; }
.add-menu .add-menu-item .ami-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3c8d2;
}
.add-menu .add-menu-item:hover .ami-icon { color: #4fc3f7; }
.add-menu .add-menu-item svg { display: block; pointer-events: none; }
.add-menu .add-menu-item .ami-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.add-menu .add-menu-item .ami-title { font-size: 14px; font-weight: 500; color: #f0f2f5; }
.add-menu .add-menu-item .ami-sub { font-size: 11px; color: #777d89; white-space: nowrap; }
.add-menu .add-menu-item.disabled .ami-title { color: #9aa0ab; }
.add-menu .add-menu-item.disabled .ami-icon { color: #6a7080; }
.add-menu .add-menu-item.disabled:hover .ami-icon { color: #8b909c; }
.add-menu .add-menu-item[data-tip] { position: relative; }
.add-menu .add-menu-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1116;
  color: #e8ebf0;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid #2a2e37;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 10001;
}
.add-menu .add-menu-item[data-tip]:hover::after { opacity: 1; visibility: visible; }

/* 语音生成节点：沿用图片/视频节点的上下窗结构 */
.audio-node-body { background:#11141a; border:1px solid #343945; border-radius:12px; overflow:hidden; }
.node-type-icon.icon-audio { color:#d8c7ff; }
.audio-node-body audio { width:calc(100% - 28px); margin:78px 14px 0; height:38px; }
.audio-node-empty { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#8e94a2; }
.audio-node-empty span { font-size:34px; color:#bda7f0; }
.audio-node-empty b { font-size:13px; font-weight:500; }
.audio-node-panel { min-width:760px!important; max-width:860px!important; padding:12px!important; overflow:visible!important; }
.audio-mode-tabs { display:flex; gap:4px; margin-bottom:10px; }
.audio-mode-tabs button { border:0; border-radius:18px; padding:7px 15px; background:#252933; color:#9ea4b2; cursor:pointer; }
.audio-mode-tabs button.active { background:#eee; color:#17191e; }
.audio-prompt { width:100%; min-height:108px!important; box-sizing:border-box; }
.audio-node-controls { position:relative; display:flex; gap:4px; align-items:center; width:100%; min-width:0; margin-top:9px; overflow:visible; }
.audio-node-controls select,.audio-node-controls button { height:29px; min-width:0; border:1px solid #363b46; border-radius:15px; background:#20242c; color:#e6e9ef; padding:0 7px; font-size:10px; }
.audio-node-controls select { white-space:nowrap; }
.audio-node-controls select:first-child { width:auto; max-width:none; flex:0 1 auto; }
.audio-node-controls [data-audio-voice] { width:auto; max-width:none; overflow:visible; }
.audio-node-controls [data-audio-emotion] { width:auto; flex:0 0 auto; }
.audio-node-controls [data-audio-advanced] { width:auto; flex:0 0 auto; }
.audio-node-controls [data-audio-polyphone] { width:auto; flex:0 0 auto; }
.audio-node-controls .nip-send { margin-left:0; width:32px; min-width:32px; flex:0 0 32px; padding:0; }
.audio-node-hint { display:block; color:#777f8d; margin-top:8px; }
.audio-node-controls button { white-space:nowrap; cursor:pointer; }
.audio-node-controls button:disabled { opacity:.45; cursor:not-allowed; }
.audio-credit { margin-left:auto; min-width:22px; color:#b9a46e; font-size:12px; white-space:nowrap; text-align:center; }
.audio-node-controls .audio-credit+.nip-send { margin-left:0; }
.audio-inline-popover { position:absolute; z-index:45; width:max-content; max-width:460px; margin:0; padding:12px; border:1px solid #373c47; border-radius:10px; background:#16191f; box-shadow:0 12px 35px rgba(0,0,0,.5); }
.audio-control-dropdown { z-index:80; }
.audio-model-popover,.audio-emotion-popover { display:flex; flex-direction:column; gap:2px; min-width:130px; max-height:260px; overflow-y:auto; padding:6px; }
.audio-model-popover { min-width:210px; }
.audio-control-option { width:100%; min-height:31px; padding:6px 10px!important; border:0!important; border-radius:7px!important; background:transparent!important; color:#d9dde5!important; text-align:left; white-space:nowrap; cursor:pointer; }
.audio-control-option:hover,.audio-control-option.active { background:#343840!important; color:#fff!important; }
.audio-control-empty { padding:9px 10px; color:#858b96; font-size:11px; white-space:nowrap; }
.audio-inline-popover.hidden { display:none; }
.audio-inline-popover label { display:block; color:#c9cdd5; font-size:12px; margin-bottom:8px; }
.audio-inline-popover textarea { width:100%; min-height:72px; box-sizing:border-box; border:1px solid #353a45; border-radius:8px; background:#101318; color:#eff1f4; padding:9px; resize:vertical; }
.audio-inline-popover>button { float:right; margin-top:8px; border:0; border-radius:7px; padding:7px 15px; background:#eee; color:#17191d; cursor:pointer; }
.audio-inline-popover::after { content:""; display:block; clear:both; }
.audio-voice-popover { width:260px; max-height:330px; overflow:hidden; padding:7px; }
.audio-voice-popover nav { display:flex; gap:4px; margin-bottom:7px; }
.audio-voice-popover nav button { border:0; border-radius:14px; background:transparent; color:#a8adb7; padding:6px 10px; font-size:11px; cursor:pointer; }
.audio-voice-popover nav button.active { background:#3a3d44; color:#fff; }
.audio-voice-list { display:flex; flex-direction:column; gap:2px; max-height:272px; overflow-y:auto; }
.audio-voice-list.hidden,.audio-voice-custom.hidden { display:none; }
.audio-voice-list.empty { min-height:100px; align-items:center; justify-content:center; color:#777d89; font-size:11px; }
.audio-voice-option { width:100%; display:flex; align-items:center; justify-content:space-between; border:0; border-radius:18px; background:transparent; color:#e5e7eb; padding:8px 11px; font-size:12px; cursor:pointer; }
.audio-voice-option:hover,.audio-voice-option.active { background:#3a3d44; }
.audio-voice-option i { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#34373e; color:#aeb3bd; font-size:9px; font-style:normal; }
.audio-voice-custom textarea { min-height:95px; }
.audio-polyphone-popover { width:430px; padding:7px; }
.audio-polyphone-help { display:flex; flex-direction:column; gap:7px; padding:12px; border-left:3px solid #ddd; border-radius:7px; background:#292b30; color:#dfe2e8; font-size:11px; }
.audio-polyphone-help b { font-size:12px; }.audio-polyphone-help span { color:#c2c6cf; }
.audio-polyphone-form { display:grid; grid-template-columns:1fr 16px 1fr 48px; align-items:center; gap:7px; margin-top:10px; }
.audio-polyphone-form input { min-width:0; height:34px; border:0; border-bottom:1px solid #414650; background:transparent; color:#eee; padding:0 8px; font-size:11px; }
.audio-polyphone-form i { color:#777d88; text-align:center; }.audio-polyphone-form button { height:32px; border:1px solid #3c414b; border-radius:7px; background:#22262d; color:#aeb3bd; font-size:11px; }
.audio-polyphone-items { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }.audio-polyphone-items span { padding:4px 7px; border-radius:10px; background:#292d35; color:#cfd3da; font-size:10px; }
.audio-params-popover { display:grid; gap:10px; max-width:350px; }
.audio-params-popover.hidden { display:none; }
.audio-params-popover label { display:grid; grid-template-columns:46px 1fr 42px; align-items:center; gap:9px; margin:0; }
.audio-params-popover input { accent-color:#eee; }.audio-params-popover b { text-align:right; font-weight:500; }

.eps-voice-source-modal { position:fixed; inset:0; z-index:10080; background:rgba(5,7,10,.62); display:flex; align-items:center; justify-content:center; }
.eps-voice-source-card { width:min(680px,calc(100vw - 40px)); background:#171a20; border:1px solid #353a45; border-radius:14px; box-shadow:0 24px 80px rgba(0,0,0,.55); overflow:hidden; }
.eps-voice-source-card header { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; border-bottom:1px solid #2d313a; }
.eps-voice-source-card header small { color:#8d94a2; }.eps-voice-source-card header h3 { margin:2px 0 0; font-size:17px; }
.eps-voice-source-card header button { border:0; background:transparent; color:#c6cad3; font-size:24px; cursor:pointer; }
.eps-voice-source-card nav { display:flex; gap:18px; padding:0 18px; border-bottom:1px solid #2d313a; }
.eps-voice-source-card nav button { padding:12px 2px 10px; border:0; border-bottom:2px solid transparent; background:none; color:#8e95a3; cursor:pointer; }
.eps-voice-source-card nav button.active { color:#fff; border-bottom-color:#fff; }
.eps-voice-source-card section { padding:18px; }.eps-voice-source-card section.hidden { display:none; }
.eps-voice-source-card label { display:block; color:#b9bec8; font-size:13px; margin:0 0 7px; }
.eps-voice-source-card textarea { width:100%; min-height:128px; box-sizing:border-box; margin-bottom:14px; border:1px solid #383d48; border-radius:9px; background:#11141a; color:#eef0f4; padding:12px; resize:vertical; }
.eps-voice-source-card input[data-voice-speaker-id] { width:100%; height:38px; box-sizing:border-box; margin-bottom:8px; border:1px solid #383d48; border-radius:9px; background:#11141a; color:#eef0f4; padding:0 12px; outline:none; }
.eps-voice-source-card input[data-voice-speaker-id]:focus { border-color:#777e8b; }
.eps-voice-preview-rule { margin:0 0 12px!important; color:#9ba1ac!important; }
.eps-voice-source-card textarea.short { min-height:62px; }
.eps-voice-source-controls { display:flex; gap:10px; }.eps-voice-source-controls select { flex:1; }
.eps-voice-source-controls select,.eps-voice-source-controls button,.eps-voice-upload-drop button { min-height:38px; border:1px solid #3b404c; border-radius:8px; padding:0 13px; background:#232730; color:#eef0f4; }
.eps-voice-source-controls button.primary,.eps-voice-upload-drop button.primary { background:#f3f3f3; color:#15171b; cursor:pointer; }
.eps-voice-source-card section>small { display:block; margin-top:10px; color:#777f8d; }
.eps-voice-upload-drop { min-height:190px; border:1px dashed #414754; border-radius:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:#8f96a4; }
.eps-voice-upload-drop b { font-size:30px; font-weight:300; }

/* === 单集短剧制作 · 阶段 0 可点击 UI 原型 === */
.ep-production-node .epn-card{position:relative;width:360px;height:240px;box-sizing:border-box;padding:18px;background:linear-gradient(145deg,#17191f,#101115);border:1px solid #3d414b;border-radius:14px;box-shadow:0 18px 45px rgba(0,0,0,.42);color:#edf0f5}
.epn-head,.epn-meta,.epn-stage{display:flex;align-items:center;justify-content:space-between}.epn-kicker{font-size:10px;letter-spacing:1.4px;color:#a9a06e}.epn-state{padding:3px 7px;border:1px solid #655c36;border-radius:99px;color:#d4c779;font-size:10px}.epn-title{font-size:18px;font-weight:650;margin:18px 0 14px}.epn-progress{height:5px;background:#292c33;border-radius:99px;overflow:hidden}.epn-progress span{display:block;height:100%;background:linear-gradient(90deg,#8e8149,#d2c36c)}.epn-meta{font-size:11px;color:#8f949f;margin:10px 0 16px}.epn-stage{padding:10px 12px;background:#0c0d10;border:1px solid #292c33;border-radius:8px;font-size:12px}.epn-stage b{color:#888e99}.epn-stage span{color:#d8ca7b}.epn-open{width:100%;height:34px;margin-top:12px;border:1px solid #675f3c;border-radius:8px;background:#292719;color:#e7da8d;cursor:pointer}.epn-open:hover{background:#393522}
.eps-overlay{position:fixed;inset:0;z-index:20000;background:#0d0f12;display:flex;align-items:stretch;justify-content:stretch;padding:0;color:#e8ebf1}.eps-shell{width:100vw;height:100vh;display:flex;flex-direction:column;background:#0d0f12;border:0;border-radius:0;box-shadow:none;overflow:hidden}.eps-head{height:74px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #292c33;background:#111318}.eps-head h2{margin:4px 0 0;font-size:19px}.eps-eyebrow{font-size:10px;color:#a89d62;letter-spacing:1.3px}.eps-head-actions{display:flex;align-items:center;gap:18px;color:#9096a1;font-size:12px}.eps-head-actions button{width:30px;height:30px;border:0;background:transparent;color:#aaa;font-size:24px;cursor:pointer}.eps-head-actions .eps-back-canvas{width:auto;height:34px;padding:0 12px;border:1px solid #343943;border-radius:8px;background:#1a1e25;color:#e8eaf0;font-size:12px;white-space:nowrap}.eps-steps{height:70px;flex:0 0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#24272e;border-bottom:1px solid #292c33}.eps-steps button{border:0;background:#13151a;color:#a0a5af;display:flex;align-items:center;justify-content:center;gap:11px;cursor:pointer}.eps-steps button.active{background:#22231f;color:#f0e3a0}.eps-steps i{width:28px;height:28px;border:1px solid #555b66;border-radius:50%;display:grid;place-items:center;font-style:normal}.eps-steps button.active i{background:#eee5bd;color:#171710;border-color:#eee5bd}.eps-steps span{display:flex;flex-direction:column;text-align:left;font-size:13px}.eps-steps small{font-size:10px;color:#707681;margin-top:3px}.eps-body{flex:1;min-height:0;overflow:auto;padding:22px 24px 34px}.eps-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.eps-toolbar h3{margin:0 0 5px;font-size:18px}.eps-toolbar p{margin:0;color:#8c929d;font-size:12px}.eps-primary{padding:10px 16px;border:1px solid #6e6540;border-radius:8px;background:#d7c977;color:#17170f;font-weight:650;cursor:pointer}.eps-table{min-width:1100px;border:1px solid #30343c;border-radius:9px;overflow:hidden}.eps-tr{display:grid;grid-template-columns:62px 65px 2.2fr 1.1fr 1.4fr 95px;align-items:stretch;background:#111318;border-top:1px solid #282b32}.eps-tr:first-child{border-top:0}.eps-tr>span{padding:13px;border-left:1px solid #282b32;font-size:12px;line-height:1.55}.eps-tr>span:first-child{border-left:0;text-align:center}.eps-th{background:#191c21;color:#8f95a0}.eps-status{margin:10px;padding:4px!important;border:0!important;border-radius:5px;text-align:center!important;align-self:start}.eps-status.ok,.eps-prompt-card em.ok{color:#68c995;background:#143326}.eps-status.warn,.eps-prompt-card em.warn{color:#e1bf67;background:#392f16}.eps-status.missing,.eps-prompt-card em.missing{color:#ef7777;background:#3a191b}.eps-asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:16px}.eps-asset-card{background:#121419;border:1px solid #30343c;border-radius:10px;overflow:hidden}.eps-asset-visual{height:145px;background:#0a0b0e;border-bottom:1px solid #292c33;display:grid;place-items:center}.eps-asset-visual button{border:0;background:none;color:#777;display:flex;flex-direction:column;align-items:center;gap:8px;font-size:26px;cursor:pointer}.eps-asset-visual small{font-size:10px}.eps-demo-image{width:78px;height:78px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#d3c695,#554f35 48%,#1b1a16 75%);font-size:28px;color:#111}.eps-asset-head{display:flex;justify-content:space-between;padding:12px 13px 0}.eps-asset-head span{font-size:10px;color:#a59b65}.eps-asset-card>p{min-height:43px;margin:8px 13px;color:#969ca7;font-size:11px;line-height:1.55}.eps-voice{margin:10px 12px 12px;padding:8px 9px;border:1px solid #294536;background:#10271d;border-radius:7px;display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#7ed0a2}.eps-voice.missing{border-color:#5e4827;background:#2d2413;color:#dfbd67}.eps-voice button{border:0;background:transparent;color:inherit;cursor:pointer}.eps-view-toggle{display:flex;padding:3px;background:#17191e;border:1px solid #2c3038;border-radius:8px}.eps-view-toggle button{padding:7px 11px;border:0;background:transparent;color:#858b95;border-radius:6px}.eps-view-toggle button.active{background:#343226;color:#e0d486}.eps-prompt-list{max-width:1100px;margin:auto;display:flex;flex-direction:column;gap:14px}.eps-prompt-card{background:#121419;border:1px solid #30343c;border-radius:10px;padding:16px 18px}.eps-prompt-card header{display:flex;align-items:center;gap:9px;color:#a49a63;font-size:11px}.eps-prompt-card header b{color:#e5e8ed}.eps-prompt-card em{margin-left:auto;padding:4px 7px;border-radius:5px;font-style:normal}.eps-prompt-card h4{margin:11px 0 8px;font-size:14px}.eps-prompt-text{font-size:12px;line-height:1.75;color:#c5c9d0;padding:12px;background:#0c0e11;border-radius:7px}.eps-bindings{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}.eps-bindings span{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:6px;font-size:10px}.eps-bindings .ready{background:#12291f;color:#78c69b;border:1px solid #284636}.eps-bindings .missing{background:#32181a;color:#ef8585;border:1px solid #5a292d}.eps-bindings i{width:19px;height:19px;border-radius:4px;background:#514b31;color:#eee0a2;display:grid;place-items:center;font-style:normal}.eps-prompt-card footer{display:flex;align-items:center;gap:8px;margin-top:12px;color:#747a84;font-size:10px}.eps-prompt-card footer span{margin-right:auto}.eps-prompt-card footer button{border:1px solid #30343c;background:#17191e;color:#aaa;padding:6px 9px;border-radius:6px;cursor:pointer}.eps-generate-empty{height:65%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8e949e}.eps-generate-empty strong{font-size:24px;color:#e4d88f}.eps-generate-empty div{display:flex;gap:18px;margin-top:20px;font-size:11px}
.eps-shell > .eps-body{display:block!important}
.epn-analysis-error{margin:9px 0;padding:8px;border:1px solid #66343a;border-radius:7px;background:#321a1d;color:#ef9297;font-size:10px;line-height:1.45;max-height:58px;overflow:auto}.eps-analysis-shell{width:min(760px,calc(100vw - 36px));height:auto;min-height:410px}.eps-analysis-body{padding:34px;display:flex;flex-direction:column;gap:22px}.eps-analysis-status{display:flex;align-items:center;justify-content:space-between;font-size:16px}.eps-analysis-status span{color:#d9cb7e;font-weight:700}.eps-analysis-progress{height:10px;border-radius:999px;background:#242830;overflow:hidden}.eps-analysis-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8f8148,#e1d17d);transition:width .25s ease}.eps-analysis-stages{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.eps-analysis-stages span{padding:13px;border:1px solid #30343c;border-radius:8px;background:#14171b;color:#777f8b;text-align:center;font-size:12px}.eps-analysis-stages span.active{border-color:#8c804c;background:#282518;color:#e6d98e}.eps-analysis-error{padding:13px;border:1px solid #65353a;border-radius:8px;background:#321b1e;color:#ef969a;white-space:pre-wrap;word-break:break-word}.eps-analysis-body>p{margin:0;color:#878e99;font-size:12px}.eps-analysis-actions{display:flex;justify-content:flex-end}.eps-analysis-actions button:not(.eps-primary){padding:9px 14px;border:1px solid #4a4f59;border-radius:7px;background:#191c21;color:#c4c8cf;cursor:pointer}
.eps-analysis-timings{display:grid;gap:7px;padding:12px 14px;border:1px solid #30343c;border-radius:9px;background:#12151a}.eps-analysis-timings>div{display:flex;align-items:center;justify-content:space-between;gap:18px;color:#8f96a1;font-size:12px}.eps-analysis-timings b{color:#d8dce2;font-size:12px;font-weight:600;text-align:right}
.epn-analysis-detail,.eps-analysis-detail{padding:7px 10px;border:1px solid #4b5059;border-radius:6px;background:#191c21;color:#bdc2ca;cursor:pointer}.epn-analysis-detail{width:100%;margin:0 0 8px}.eps-analysis-detail{align-self:flex-start}.episode-text-viewer{position:fixed;inset:0;z-index:100120;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(3,4,6,.82);backdrop-filter:blur(8px);color:#e8ebf0}.episode-text-viewer>section{width:min(1040px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));display:flex;flex-direction:column;border:1px solid #383d47;border-radius:13px;background:#0d0f13;box-shadow:0 28px 90px #000;overflow:hidden}.episode-text-viewer header{height:68px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #2c3038}.episode-text-viewer header small{color:#a89c62;font-size:10px;letter-spacing:1px}.episode-text-viewer header h3{margin:4px 0 0;font-size:17px}.episode-text-viewer header button{width:32px;height:32px;border:0;background:transparent;color:#aaa;font-size:25px;cursor:pointer}.episode-text-viewer textarea{flex:1;min-height:0;box-sizing:border-box;width:100%;padding:20px;border:0;outline:0;resize:none;background:#090b0e;color:#d8dce3;font:13px/1.75 Consolas,"Microsoft YaHei",monospace;white-space:pre-wrap}.episode-text-viewer footer{height:58px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-top:1px solid #2c3038;color:#7e8590;font-size:11px}.episode-text-viewer footer button{padding:8px 14px;border:1px solid #6d633d;border-radius:7px;background:#d8ca78;color:#17170f;font-weight:650;cursor:pointer}
.eps-detail-drawer{top:144px!important}
.epn-script-entry{height:310px!important}.epn-script-text{width:100%;height:112px;box-sizing:border-box;resize:none;padding:10px;margin:2px 0 8px;background:#0b0d10;border:1px solid #2d3139;border-radius:8px;color:#d7dbe2;font:12px/1.55 inherit;outline:none}.epn-script-text:focus{border-color:#716842}.epn-source-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.epn-source-actions button{height:31px;border:1px solid #30343c;border-radius:7px;background:#17191e;color:#aeb3bd;cursor:pointer}
.eps-steps{grid-template-columns:repeat(3,1fr)!important}.eps-shell{position:relative}.eps-detail-drawer{position:absolute;z-index:5;top:74px;right:0;bottom:0;width:min(430px,90vw);box-sizing:border-box;background:#121419;border-left:1px solid #343841;box-shadow:-20px 0 55px rgba(0,0,0,.45);transform:translateX(105%);transition:transform .2s ease;display:flex;flex-direction:column}.eps-detail-drawer.open{transform:translateX(0)}.eps-detail-head{display:flex;justify-content:space-between;align-items:flex-start;padding:20px;border-bottom:1px solid #2b2f36}.eps-detail-head small{color:#a79b60}.eps-detail-head h3{margin:5px 0 0}.eps-detail-head button{border:0;background:none;color:#aaa;font-size:24px}.eps-detail-body{padding:17px 20px;overflow:auto;display:flex;flex-direction:column;gap:13px}.eps-detail-body label{display:flex;flex-direction:column;gap:6px;color:#9197a2;font-size:11px}.eps-detail-body textarea,.eps-detail-body input{box-sizing:border-box;width:100%;padding:9px 10px;background:#0b0d10;border:1px solid #30343c;border-radius:7px;color:#d9dde4;font:12px/1.55 inherit}.eps-detail-body textarea{min-height:70px;resize:vertical}.eps-detail-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}.eps-detail-foot{margin-top:auto;padding:15px 20px;border-top:1px solid #2b2f36;display:flex;justify-content:flex-end;gap:8px}.eps-detail-foot>button:not(.eps-primary),.eps-detail-btn{border:1px solid #353941;background:#191b20;color:#aeb3bc;border-radius:6px;padding:6px 8px;cursor:pointer}.eps-tr>span:last-child{display:flex;flex-direction:column;align-items:stretch;gap:5px}.eps-tr .eps-status{margin:0!important;display:block;padding:4px!important}.eps-video-actions{display:flex;align-items:center;gap:10px}.eps-inline-asset,.eps-inline-voice,.eps-inline-missing{display:inline-flex;vertical-align:middle;align-items:center;gap:4px;margin:0 3px;padding:3px 5px;border-radius:5px;font-size:9px;white-space:nowrap}.eps-inline-asset{border:1px solid #35513f;background:#14271d;color:#81c89f}.eps-inline-asset i{width:19px;height:19px;display:grid;place-items:center;border-radius:4px;background:#514b31;color:#efe2a6;font-style:normal}.eps-inline-asset b{font-weight:500}.eps-inline-voice{border:1px solid #35513f;background:#14271d;color:#81c89f}.eps-inline-missing{border:1px solid #67343a;background:#351a1d;color:#ef8c91}.eps-generate-one{color:#e1d58a!important;border-color:#615b3b!important}
@media(max-width:900px){.eps-overlay{padding:0}.eps-shell{width:100vw;height:100vh;border-radius:0}.eps-steps span small{display:none}.eps-body{padding:14px}.eps-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.eps-generate-empty div{flex-direction:column}.eps-head-actions>span{display:none}}

/* 单集资产准备：人物、场景、道具分组共用页面滚动，卡片展示可直接发送的完整图片提示词。 */
.eps-asset-sections{display:flex;flex-direction:column;gap:28px;padding-bottom:18px}
.eps-asset-section{min-width:0}
.eps-asset-section>header{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding-bottom:9px;border-bottom:1px solid #30343c}
.eps-asset-section>header h4{margin:0;color:#e7e9ee;font-size:15px}
.eps-asset-section>header span{padding:3px 7px;border:1px solid #3b3f48;border-radius:999px;color:#8d939e;font-size:10px}
.eps-asset-section .eps-asset-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));align-items:stretch}
.eps-asset-card{display:flex;flex-direction:column}
.eps-asset-head{padding:12px 13px 0}
.eps-asset-prompt-label{margin:10px 13px 0;color:#a79b60;font-size:10px;letter-spacing:.04em}
.eps-asset-card>p{min-height:132px;margin:6px 13px 12px;padding:10px 11px;border:1px solid #292d35;border-radius:7px;background:#0d0f13;color:#b9bec7;font-size:11px;line-height:1.7;white-space:pre-wrap}
.eps-voice{margin-top:auto}
.eps-voice.ready{border-color:#294536;background:#10271d;color:#7ed0a2}
.eps-voice.missing{border-color:#5e4827;background:#2d2413;color:#dfbd67}
@media(max-width:900px){.eps-asset-section .eps-asset-grid{grid-template-columns:1fr}.eps-asset-card>p{min-height:100px}}

/* 单集资产准备：卡片只展示一行摘要，点击整卡后从左侧打开统一编辑器。 */
.eps-progress-steps{height:82px;background:#20232a}
.eps-progress-steps button{position:relative;gap:14px;padding:8px 18px;overflow:hidden;transition:background .18s ease,color .18s ease}
.eps-progress-steps button:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,#d8cb7c,transparent);opacity:0;transition:opacity .18s ease}
.eps-progress-steps button.active:after{opacity:1}
.eps-progress-steps .eps-step-progress{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;flex:0 0 auto}
.eps-progress-steps .eps-step-copy{display:flex;flex-direction:column;min-width:92px;text-align:left;font-size:13px}
.eps-progress-steps .eps-step-copy small{font-variant-numeric:tabular-nums}
.eps-segment-ring{display:flex!important;flex-direction:column!important;align-items:center;gap:2px;min-width:50px}
.eps-ring-grid{position:relative;display:block!important;width:48px;height:48px;flex:0 0 48px}
.eps-ring-grid u{position:absolute;left:23px;top:1px;width:2px;height:6px;border-radius:2px;background:#343943;text-decoration:none;transform:rotate(calc(var(--segment) * 18deg));transform-origin:1px 23px;transition:background .2s ease,box-shadow .2s ease}
.eps-ring-grid u.filled{background:#fff;box-shadow:0 0 6px rgba(255,255,255,.62)}
.eps-ring-grid strong{position:absolute;inset:0;display:grid;place-items:center;color:#aeb4be;font-size:11px;font-variant-numeric:tabular-nums}
.eps-segment-ring em{color:#747b86;font-size:8px;font-style:normal;white-space:nowrap}
.eps-progress-steps button.active .eps-ring-grid u.filled{background:#fff;box-shadow:0 0 8px rgba(255,255,255,.86)}
.eps-progress-steps button.active .eps-ring-grid strong{color:#fff}
.eps-segment-ring.compact{min-width:40px}
.eps-segment-ring.compact .eps-ring-grid{width:38px;height:38px;flex-basis:38px}
.eps-segment-ring.compact .eps-ring-grid u{left:18px;top:1px;width:2px;height:5px;transform-origin:1px 18px}
.eps-segment-ring.compact .eps-ring-grid strong{font-size:9px}
.eps-progress-pair{gap:3px!important}
.eps-prompt-editable{cursor:text;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;border:1px solid transparent}
.eps-prompt-editable:hover{border-color:#5b5438;background:#11130f;box-shadow:inset 0 0 0 1px rgba(207,193,111,.06)}
.eps-video-prompt-editor-scroll{padding-top:16px}
.eps-video-prompt-meta{display:flex;gap:7px;width:500px;max-width:calc(94vw - 40px)}
.eps-video-prompt-meta span{padding:5px 8px;border:1px solid #373c45;border-radius:6px;background:#1a1d23;color:#9fa5af;font-size:10px}
.eps-video-prompt-workspace{width:500px;max-width:calc(94vw - 40px);height:calc(100vh - 220px);max-height:650px;min-height:420px;flex:0 0 auto;box-sizing:border-box}
.eps-asset-card{cursor:pointer;transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.eps-asset-card:hover{border-color:#57513a;transform:translateY(-1px);box-shadow:0 12px 28px rgba(0,0,0,.22)}
.eps-asset-card>p.eps-asset-prompt-preview{min-height:0;margin:6px 13px 10px;padding:0;border:0;background:transparent;color:#9298a3;font-size:11px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eps-asset-card .eps-voice{margin:0 12px 12px;padding:6px 8px;min-width:0}
.eps-asset-card .eps-voice span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eps-voice-actions,.eps-asset-editor-voice-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.eps-asset-card .eps-voice button{padding:3px 5px;border:1px solid currentColor;border-radius:5px;background:transparent;color:inherit;font-size:9px;line-height:1.2}

.eps-detail-drawer.eps-asset-editor-drawer{z-index:12;top:0!important;right:auto;left:0;bottom:0;width:min(540px,94vw);border-left:0;border-right:1px solid #343841;box-shadow:20px 0 55px rgba(0,0,0,.52);transform:translateX(-105%)}
.eps-asset-editor-scrim{position:absolute;z-index:11;inset:0;background:rgba(0,0,0,.18)}
.eps-detail-drawer.eps-asset-editor-drawer.open{transform:translateX(0)}
.eps-prompt-ref.image-missing{cursor:pointer;border-color:#6c5732;background:#2b2317;color:#e4bf75}
.eps-detail-drawer.eps-asset-editor-drawer:has(.eps-asset-prompt-workspace.ai-open){width:min(1040px,calc(100vw - 72px))}
.eps-detail-drawer.eps-asset-editor-drawer>.eps-detail-head{width:540px;max-width:94vw;box-sizing:border-box}
.eps-asset-editor-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:18px 20px 24px;box-sizing:border-box}
.eps-asset-editor-scroll>.eps-asset-editor-label,.eps-asset-editor-scroll>.eps-asset-editor-image,.eps-asset-editor-scroll>.eps-asset-name-input,.eps-asset-editor-scroll>.eps-asset-prompt-workspace,.eps-asset-editor-scroll>.eps-asset-editor-voice{width:500px;max-width:calc(94vw - 40px);box-sizing:border-box}
.eps-asset-source-tabs{display:flex;width:540px;max-width:94vw;height:46px;box-sizing:border-box;padding:0 18px;border-bottom:1px solid #2c3038;background:#15171b}
.eps-asset-source-tabs button{position:relative;padding:0 10px;border:0;background:transparent;color:#858b96;font-size:12px;cursor:pointer}
.eps-asset-source-tabs button.active{color:#f0f2f5;font-weight:650}
.eps-asset-source-tabs button.active:after{content:"";position:absolute;left:9px;right:9px;bottom:0;height:2px;background:#fff;border-radius:2px}
.eps-asset-generator-scroll{padding-top:14px}
.eps-asset-source-panel{display:none;width:500px;max-width:calc(94vw - 40px)}
.eps-asset-source-panel.active{display:block;min-height:100%}
.eps-asset-source-panel .eps-asset-name-input,.eps-asset-source-panel .eps-asset-prompt-workspace{width:100%;max-width:none}
.eps-asset-generator-image{width:100%;height:205px;box-sizing:border-box;border:1px dashed #484d56;border-radius:9px;background:#17191d;display:flex;align-items:center;justify-content:center;overflow:hidden}
.eps-asset-generator-image img{position:static!important;display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;background:#0d0f12;cursor:zoom-in}
.eps-asset-generator-image>div{display:flex;flex-direction:column;align-items:center;gap:8px;color:#7f858e}.eps-asset-generator-image b{font-size:34px;font-weight:300;color:#9298a1}.eps-asset-generator-image span{font-size:11px}
.eps-asset-generation-prompt{height:285px;min-height:250px}
.eps-asset-generation-controls{display:flex;align-items:flex-end;gap:7px;margin-top:12px}
.eps-asset-generation-controls label{display:flex;flex-direction:column;gap:5px;min-width:0;color:#777e89;font-size:9px}
.eps-asset-generation-controls label:first-child{flex:1}
.eps-asset-generation-controls select{height:34px;max-width:165px;padding:0 25px 0 9px;border:1px solid #353a44;border-radius:7px;background:#191c22;color:#d9dde4;font-size:10px;outline:0}
.eps-asset-generation-controls .eps-primary{height:34px;margin-left:auto;padding:0 13px;white-space:nowrap}
.eps-canvas-image-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:570px;overflow:auto}
.eps-canvas-image-picker>button{padding:0;overflow:hidden;border:1px solid #343944;border-radius:8px;background:#15181d;color:#b7bdc7;text-align:left;cursor:pointer}
.eps-canvas-image-picker>button.selected{border-color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.18)}
.eps-canvas-image-picker img{display:block;width:100%;height:135px;object-fit:cover;background:#0b0d10}
.eps-canvas-image-picker span{display:block;padding:7px 9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.eps-source-empty{grid-column:1/-1;padding:70px 20px;border:1px dashed #3a3f48;border-radius:9px;color:#777e89;text-align:center;font-size:11px}
.eps-use-canvas-image{float:right;margin-top:12px}.eps-use-canvas-image:disabled{opacity:.45;cursor:not-allowed}
.eps-local-image-upload{width:100%;height:420px;border:1px dashed #454b55;border-radius:10px;background:#15181d;color:#89909a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;cursor:pointer}
.eps-local-image-upload:hover{border-color:#777e89;background:#191c21}.eps-local-image-upload b{font-size:38px;font-weight:300}.eps-local-image-upload span{color:#d6dae1;font-size:13px}.eps-local-image-upload small{font-size:9px}
.eps-asset-card .eps-asset-visual{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 145px;height:145px;min-height:145px;max-height:145px;overflow:hidden}
.eps-asset-card .eps-asset-result-image{position:static!important;display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:145px!important;object-fit:contain!important;flex:0 0 auto;background:#0d0f12}
.eps-asset-generating{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#d8ca7b;text-align:center}
.eps-asset-generating i{width:22px;height:22px;border:2px solid rgba(216,202,123,.25);border-top-color:#d8ca7b;border-radius:50%;animation:epsAssetSpin .8s linear infinite}
.eps-asset-generating b{font-size:11px;font-weight:650}.eps-asset-generating small{color:#7f858e;font-size:9px}
.eps-asset-visual.generating,.eps-asset-generator-image.generating{background:linear-gradient(145deg,#12140f,#0c0e11)}
.eps-asset-batchbar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:-5px 0 18px;padding:9px 11px;border:1px solid #292d34;border-radius:8px;background:#111318;color:#858c97;font-size:10px}
.eps-asset-batchbar .eps-primary{padding:7px 13px;font-size:11px}.eps-primary:disabled{opacity:.5;cursor:not-allowed}
.eps-batch-stop{height:30px;padding:0 12px;border:1px solid rgba(255,105,105,.45);border-radius:7px;background:rgba(110,31,31,.22);color:#ff8585;font:600 11px/1 inherit;cursor:pointer;white-space:nowrap}
.eps-batch-stop:hover{background:rgba(140,38,38,.34);border-color:rgba(255,105,105,.7);color:#ffabab}
.eps-batch-stop:disabled{opacity:.55;cursor:default}
.eps-global-stylebar{display:flex;align-items:center;gap:16px;margin:0 0 20px;padding:10px 12px;border-bottom:1px solid #252930;background:#0c0e11}
.eps-global-style-content{flex:1;min-width:0;padding:0;border:0;background:transparent;color:#b8bdc6;display:flex;align-items:flex-start;gap:9px;text-align:left;cursor:pointer}
.eps-global-style-content b{flex:0 0 auto;padding:3px 7px;border-radius:4px;background:#073443;color:#65d8f1;font-size:10px;font-weight:600}
.eps-global-style-content span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:18px}
.eps-global-style-content:hover span{color:#eef1f5}.eps-global-style-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}.eps-global-style-actions small{color:#777e89;font-size:10px}.eps-global-style-actions .eps-primary{padding:8px 13px;white-space:nowrap;font-size:11px}
.eps-global-style-workspace{height:420px;min-height:320px}
.eps-asset-add-card{height:145px;align-self:start;border:1px dashed #3d424b;border-radius:10px;background:linear-gradient(145deg,#111318,#0c0e11);color:#6f7580;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease}
.eps-asset-add-card:hover{border-color:#777e89;background:#15181d;color:#b9bec7}.eps-asset-add-card b{font-size:28px;line-height:1;font-weight:300}.eps-asset-add-card span{font-size:10px}
.eps-asset-card-more{position:absolute;z-index:3;top:8px;right:8px;width:25px;height:22px!important;padding:0!important;border:1px solid #282c33!important;border-radius:5px!important;background:#08090b!important;color:#d7dae0!important;display:grid!important;place-items:center!important;font-size:11px!important;line-height:1!important;letter-spacing:1px;cursor:pointer}
.eps-asset-card-more:hover{background:#17191d!important;border-color:#4b5059!important}
.eps-asset-card-menu{display:none;position:absolute;z-index:4;top:34px;right:8px;width:145px;padding:6px;border:1px solid #30343c;border-radius:9px;background:#202124;box-shadow:0 14px 34px rgba(0,0,0,.56)}
.eps-asset-card-menu.open{display:block}.eps-asset-card-menu button{width:100%;padding:9px 10px;border:0!important;border-radius:6px!important;background:transparent!important;color:#e1e3e7!important;text-align:left;font-size:11px!important;cursor:pointer}.eps-asset-card-menu button:hover{background:#303136!important}.eps-asset-card-menu>i{display:block;height:1px;margin:5px -6px;background:#35363a}.eps-asset-card-menu button.danger{color:#ff6d71!important}.eps-asset-card-menu button.danger:hover{background:rgba(240,84,89,.12)!important}
.eps-asset-section:has(.eps-asset-card-menu.open){position:relative;z-index:40}
.eps-asset-card:has(.eps-asset-card-menu.open){position:relative;z-index:50;overflow:visible!important}
.eps-asset-card:has(.eps-asset-card-menu.open) .eps-asset-visual{overflow:visible!important}
.eps-asset-card:has(.eps-asset-card-menu.open) .eps-asset-result-image{border-radius:9px 9px 0 0}
.eps-asset-card:has(.eps-asset-card-menu.open) .eps-asset-card-menu{z-index:60}
@keyframes epsAssetSpin{to{transform:rotate(360deg)}}
.eps-asset-editor-label{display:block;margin:15px 0 8px;color:#e4e7ec;font-size:12px;font-weight:650}
.eps-asset-editor-label:first-child{margin-top:0}
.eps-asset-editor-image{height:340px;border:1px dashed #484d56;border-radius:9px;background:#17191d;display:grid;place-items:center;overflow:hidden}
.eps-asset-editor-image button{border:0;background:transparent;color:#7f858e;display:flex;flex-direction:column;align-items:center;gap:9px;cursor:pointer}
.eps-asset-editor-image button b{font-size:34px;font-weight:300;color:#9298a1}
.eps-asset-editor-image button span{font-size:11px}
.eps-asset-name-input{width:100%;height:38px;box-sizing:border-box;padding:0 12px;border:1px solid #30343c;border-radius:8px;outline:0;background:#202228;color:#edf0f4;font:12px/1.4 inherit}
.eps-asset-name-input:focus{border-color:#706744}
.eps-asset-prompt-workspace{height:330px;min-height:260px;border:1px solid #30343c;border-radius:8px;overflow:hidden;background:#15171c}
.eps-asset-prompt-workspace .ep-ai-text-main{height:100%;min-width:0}
.eps-asset-prompt-workspace .ep-ai-text-main>textarea{width:100%;height:100%;box-sizing:border-box;resize:none;border:0;outline:0;padding:14px;background:#191b20;color:#d8dce3;font:12px/1.75 "Microsoft YaHei",sans-serif;white-space:pre-wrap}
.eps-asset-prompt-workspace.ai-open{display:block;border:1px solid #30343c;background:#15171c;overflow:visible}
.eps-asset-prompt-workspace.ai-open .ep-ai-text-main{border:1px solid #30343c;border-radius:8px;overflow:hidden;background:#15171c}
.eps-asset-prompt-workspace.ai-open .ep-ai-text-main{height:100%;border:0}
.eps-asset-editor-drawer>.ep-ai-text-side{position:absolute;left:552px;right:18px;top:76px;bottom:18px;width:0;min-width:0;height:auto;margin:0;z-index:3;pointer-events:none}
.eps-asset-editor-drawer>.ep-ai-text-side.show{width:auto;min-width:360px;overflow:visible;pointer-events:auto}
.eps-asset-editor-voice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid #5e4827;border-radius:8px;background:#2d2413;color:#dfbd67;font-size:11px}
.eps-asset-editor-voice.ready{border-color:#294536;background:#10271d;color:#7ed0a2}
.eps-asset-editor-voice span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eps-asset-editor-voice button{flex:0 0 auto;padding:6px 9px;border:1px solid currentColor;border-radius:6px;background:transparent;color:inherit;font-size:10px;cursor:pointer}
.eps-asset-editor-voice button:disabled{opacity:.55;cursor:wait}
@media(max-width:900px){
  .eps-detail-drawer.eps-asset-editor-drawer:has(.eps-asset-prompt-workspace.ai-open){width:100vw}
  .eps-asset-prompt-workspace.ai-open{height:330px}
  .eps-asset-editor-drawer>.ep-ai-text-side.show{position:fixed;left:12px;right:12px;top:86px;bottom:12px;min-width:0}
  .eps-asset-editor-image{height:260px}
  .eps-asset-card>p.eps-asset-prompt-preview{min-height:0}
}

/* 单集视频提示词：按场景排列的视频卡片与右侧合成预览。 */
.eps-video-stylebar{position:sticky;top:-22px;z-index:4;margin-bottom:18px}
.eps-video-workbench{display:grid;grid-template-columns:184px minmax(0,1fr);gap:16px;align-items:start}.eps-video-asset-rail{position:sticky;top:48px;min-height:420px;max-height:calc(100vh - 265px);overflow:hidden;border:1px solid #30343c;border-radius:11px;background:#101216}.eps-video-asset-rail>header{position:sticky;top:0;z-index:2;padding:10px;border-bottom:1px solid #292d34;background:#101216}.eps-video-scope,.eps-video-asset-tabs{display:flex;gap:5px}.eps-video-scope{margin-bottom:8px}.eps-video-scope button,.eps-video-asset-tabs button{flex:1;height:27px;border:1px solid transparent;border-radius:6px;background:#171a20;color:#7d8490;font-size:9px;cursor:pointer}.eps-video-scope button.active,.eps-video-asset-tabs button.active{border-color:#625a3d;background:#292719;color:#e9d98e}.eps-video-asset-list{max-height:calc(100vh - 360px);padding:9px;overflow:auto}.eps-video-asset-item{width:100%;margin:0 0 9px;padding:0 0 8px;border:0;border-bottom:1px solid #252932;background:transparent;color:#cfd3d9;text-align:left;cursor:pointer}.eps-video-asset-item>span{height:86px;display:grid;place-items:center;overflow:hidden;border:1px solid #292e36;border-radius:7px;background:#080a0d}.eps-video-asset-item img{width:100%;height:100%;object-fit:cover}.eps-video-asset-item i{color:#735d33;font-size:10px;font-style:normal}.eps-video-asset-item b,.eps-video-asset-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eps-video-asset-item b{margin-top:6px;font-size:10px}.eps-video-asset-item small{margin-top:3px;color:#717884;font-size:8px}.eps-video-asset-empty{padding:30px 8px;color:#676e79;font-size:10px;text-align:center}
.eps-video-production-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:22px;align-items:start}
.eps-video-focus{min-width:0;height:calc(100vh - 300px);min-height:430px;overflow:hidden}.eps-video-focus-empty{height:100%;display:grid;place-items:center;border:1px dashed #363b44;border-radius:11px;color:#747b86;background:#0e1014}.eps-video-focus-card{height:100%;min-height:0!important;display:flex!important;flex-direction:column!important;transform:none!important}.eps-video-focus-head{position:relative;flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 18px 13px;border-bottom:1px solid #2c3038}.eps-video-focus-head span{color:#9d925e;font-size:9px}.eps-video-focus-head h3{margin:4px 0 5px;color:#eef0f4;font-size:18px}.eps-video-focus-head small{color:#777e89;font-size:10px}.eps-video-focus-actions{display:flex;align-items:center;gap:7px;padding-right:30px}.eps-video-focus-actions>button{height:30px;padding:0 10px;border:1px solid #373c46;border-radius:6px;background:#181b20;color:#c5c9d0;font-size:9px;cursor:pointer}.eps-video-focus-actions>.eps-primary{border-color:#6e6540;background:#d7c977;color:#17170f}.eps-video-focus-actions>span{padding:5px 8px;border-radius:5px;background:#153025;color:#78c99a}.eps-video-focus-head .eps-video-card-more{top:16px;right:15px}.eps-video-focus-head .eps-video-card-menu{top:44px;right:15px}.eps-video-focus-assets{flex:0 0 auto;display:flex;align-items:center;gap:7px;min-height:50px;padding:9px 18px;border-bottom:1px solid #252a31;overflow-x:auto}.eps-video-focus-assets>span{position:relative;flex:0 0 42px;height:42px;border:1px solid #343943;border-radius:7px;overflow:hidden;background:#090b0e}.eps-video-focus-assets img{width:100%;height:100%;object-fit:cover}.eps-video-focus-assets i{height:100%;display:grid;place-items:center;color:#815f34;font-size:8px;font-style:normal}.eps-video-focus-assets b{display:none}.eps-video-focus-assets>small{color:#6e7580;font-size:10px}.eps-video-focus-card>.eps-video-card-prompt{flex:1;min-height:0!important;max-height:none!important;margin:13px 17px 17px!important;padding:18px!important;overflow-y:auto!important;overflow-x:hidden;font-size:13px!important;line-height:2!important;scrollbar-gutter:stable;background:#0b0d10}
.eps-video-scenes{min-width:0;display:flex;flex-direction:column;gap:28px}
.eps-video-scene{min-width:0}
.eps-video-scene>header{display:flex;align-items:center;gap:9px;margin-bottom:12px;padding-bottom:9px;border-bottom:1px solid #30343c}
.eps-video-scene>header h4{margin:0;color:#e8ebf0;font-size:14px}
.eps-video-scene>header span{padding:3px 7px;border:1px solid #3a3f48;border-radius:99px;color:#858c97;font-size:9px}
.eps-video-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:15px;align-items:start}
.eps-video-workbench .eps-video-grid{grid-template-columns:1fr}
.eps-video-card{position:relative;min-width:0;overflow:hidden;border:1px solid #30343c;border-radius:10px;background:#121419;transition:border-color .16s ease,transform .16s ease}
.eps-video-card:hover{border-color:#57513a;transform:translateY(-1px)}
.eps-video-card.composed{background:linear-gradient(145deg,#171a21,#171711);border-color:#5b5438}
.eps-video-card-visual{height:158px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-bottom:1px solid #292d34;background:#090b0e}
.eps-video-card-visual video{display:block;width:100%;height:100%;object-fit:contain;background:#060709}
.eps-video-card-visual>button{width:100%;height:100%;border:0;background:transparent;color:#7f858f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer}
.eps-video-card-visual>button b,.eps-composition-empty b{font-size:28px;font-weight:300}.eps-video-card-visual>button span{font-size:10px}
.eps-video-card>h4{margin:11px 13px 7px;padding-right:58px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e3e6eb;font-size:12px}
.eps-video-card-more{position:absolute;z-index:4;top:8px;right:8px;width:25px!important;height:22px!important;padding:0!important;border:1px solid #282c33!important;border-radius:5px!important;background:#08090b!important;color:#d7dae0!important;display:grid!important;place-items:center!important;font-size:11px!important;letter-spacing:1px;cursor:pointer}
.eps-video-card-menu{display:none;position:absolute;z-index:8;top:34px;right:8px;width:145px;padding:6px;border:1px solid #30343c;border-radius:9px;background:#202124;box-shadow:0 14px 34px rgba(0,0,0,.56)}
.eps-video-card-menu.open{display:block}.eps-video-card-menu button{width:100%!important;height:auto!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#e1e3e7!important;display:block!important;text-align:left;font-size:11px!important;cursor:pointer}.eps-video-card-menu button:hover{background:#303136!important}.eps-video-card-menu>i{display:block;height:1px;margin:5px -6px;background:#35363a}.eps-video-card-menu button.danger{color:#ff6d71!important}.eps-video-card-menu button.danger:hover{background:rgba(240,84,89,.12)!important}
.eps-video-card:has(.eps-video-card-menu.open){z-index:50;overflow:visible!important}.eps-video-card:has(.eps-video-card-menu.open) .eps-video-card-visual{overflow:visible!important}.eps-video-card:has(.eps-video-card-menu.open) .eps-video-card-menu{z-index:60}
.eps-compose-check{position:absolute;z-index:5;top:8px;left:8px;width:25px;height:25px;border-radius:50%;background:#fff;color:#111;display:grid;place-items:center;font-size:15px;font-weight:800;box-shadow:0 3px 12px rgba(0,0,0,.45)}
.eps-video-card-prompt{min-height:60px;max-height:92px;margin:0 13px 13px;padding:9px 10px;overflow:auto;border:1px solid #292d35;border-radius:7px;background:#0c0e11;color:#bec3cb;font-size:11px;line-height:1.7}
.eps-prompt-mention{color:#71d6ef}.eps-prompt-ref-image,.eps-prompt-ref-voice{display:inline-grid;vertical-align:middle;place-items:center;margin:0 3px;padding:0;border:1px solid #3b5042;border-radius:5px;background:#14271d;color:#8fd1aa;cursor:pointer}
.eps-prompt-ref-image{width:28px;height:22px;overflow:hidden}.eps-prompt-ref-image img{display:block;width:100%;height:100%;object-fit:cover}.eps-prompt-ref-voice{width:22px;height:22px;font-size:11px}
.eps-prompt-ref.missing{display:inline-block;vertical-align:middle;margin:0 3px;padding:3px 5px;border:1px solid #67343a;border-radius:5px;background:#351a1d;color:#ef8c91;font-size:8px}
.eps-prompt-ref.missing.voice-missing{margin:0 2px;padding:1px 3px;border-radius:4px;font:inherit;font-size:7px;line-height:1.35;cursor:pointer}
.eps-video-add-card{height:158px;border:1px dashed #3d424b;border-radius:10px;background:linear-gradient(145deg,#111318,#0c0e11);color:#707681;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer}
.eps-video-add-card:hover{border-color:#777e89;color:#b9bec7}.eps-video-add-card b{font-size:28px;font-weight:300}.eps-video-add-card span{font-size:10px}
.eps-composed-mark{padding:8px 12px;border:1px solid #675f3b;border-radius:8px;background:#262319;color:#dccf82;font-size:11px}
.eps-composition-column{position:sticky;top:48px;height:calc(100vh - 300px);min-height:430px;padding:13px;overflow:hidden;border:1px solid #30343c;border-radius:11px;background:#101216}
.eps-composition-column>header{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;margin-bottom:11px}.eps-composition-column h4{margin:0 0 4px;font-size:13px}.eps-composition-column small{color:#747b86;font-size:9px}.eps-compose-actions{display:flex;align-items:center;gap:6px}.eps-compose-actions button{height:29px;padding:0 9px;border:1px solid #3a3f48;border-radius:6px;background:#191c21;color:#aeb4bd;font-size:9px;white-space:nowrap;cursor:pointer}.eps-compose-actions .eps-primary{border-color:#6e6540;background:#d7c977;color:#17170f}
.eps-composition-empty{height:250px;border:1px dashed #3c414a;border-radius:9px;color:#717883;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;font-size:10px}
.eps-composition-preview{overflow:hidden;border:1px solid #494e58;border-radius:9px;background:#0a0c0f}.eps-composition-preview video,.eps-composition-preview>div{display:flex;width:100%;height:min(360px,calc(100vh - 420px));align-items:center;justify-content:center;object-fit:contain;background:#060709;color:#737a84;font-size:10px}.eps-composition-preview b{display:block;padding:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.eps-video-editor-bindings{display:flex;flex-wrap:wrap;gap:7px;width:500px;max-width:calc(94vw - 40px);padding:9px;border:1px solid #2e323a;border-radius:8px;background:#0d0f13}
.eps-video-editor-bindings>span{display:inline-flex;align-items:center;gap:3px;color:#87d3e6;font-size:9px}.eps-video-editor-bindings small{color:#777e88}
.eps-video-editor-preview{width:100%;height:205px;box-sizing:border-box;border:1px dashed #484d56;border-radius:9px;background:#111318;display:flex;align-items:center;justify-content:center;overflow:hidden}
.eps-video-editor-preview video{display:block;width:100%;height:100%;object-fit:contain;background:#07080a}
.eps-video-editor-preview.ready.ratio-9-16,.eps-video-editor-preview.ready.ratio-3-4{height:min(46vh,460px)}
.eps-video-editor-preview.ready.ratio-9-16 video,.eps-video-editor-preview.ready.ratio-3-4 video{width:auto;max-width:100%;height:100%;margin:auto;object-fit:contain}
.eps-video-editor-preview>div{display:flex;flex-direction:column;align-items:center;gap:8px;color:#7f858e}.eps-video-editor-preview>div b{font-size:34px;font-weight:300;color:#9298a1}.eps-video-editor-preview>div span{font-size:11px}
.eps-video-prompt-workspace .ep-ai-text-main{flex:1 1 auto;width:100%;min-width:0;max-width:100%;height:100%;overflow:hidden;box-sizing:border-box}
.eps-video-rich-prompt{display:block;width:100%;min-width:100%;max-width:100%;height:100%;min-height:100%;box-sizing:border-box;overflow:auto;padding:14px;outline:0;background:#191b20;color:#d8dce3;font:12px/1.75 "Microsoft YaHei",sans-serif;white-space:pre-wrap;word-break:break-word}
.eps-video-rich-prompt:focus{background:#1b1e24}

/* 视频制作中央提示词区：尺寸由工作台决定，不随提示词字数收缩。 */
.eps-prompts-workspace .eps-video-workbench{width:100%;min-width:0;min-height:0;align-items:stretch!important}
.eps-prompts-workspace .eps-video-production-layout{width:100%;height:100%;min-width:0;min-height:0;grid-template-rows:minmax(430px,1fr);align-items:stretch!important}
.eps-prompts-workspace .eps-video-focus{width:100%;height:100%;min-width:0;min-height:430px;align-self:stretch;overflow:hidden}
.eps-prompts-workspace .eps-video-focus-card{width:100%;height:100%;min-width:0;align-self:stretch}
.eps-prompts-workspace .eps-video-focus-card>.eps-video-card-prompt{width:auto;min-width:0;box-sizing:border-box;flex:1 1 auto}
.eps-canvas-video-picker video{display:block;width:100%;height:135px;object-fit:cover;background:#0b0d10;pointer-events:none}
.eps-use-canvas-video{margin-top:12px}
.eps-video-generation-controls{display:flex;align-items:flex-end;gap:7px;width:500px;max-width:calc(94vw - 40px);margin-top:12px}
.eps-video-generation-controls label{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;color:#777e89;font-size:9px}
.eps-video-generation-controls label:first-child{flex:1.5}.eps-video-generation-controls select{height:34px;min-width:0;padding:0 24px 0 8px;border:1px solid #353a44;border-radius:7px;background:#191c22;color:#d9dde4;font-size:9px}.eps-video-generation-controls .eps-primary{height:34px;padding:0 12px;white-space:nowrap}
.eps-video-missing-count{color:#7f8690;font-size:10px;white-space:nowrap}.eps-video-actions>.eps-primary{white-space:nowrap}
.eps-video-production-layout.compose-mode .eps-video-card{opacity:.28;filter:saturate(.35);cursor:pointer;transition:opacity .16s ease,filter .16s ease,border-color .16s ease,box-shadow .16s ease}
.eps-video-segment-strip{position:sticky;bottom:-34px;z-index:5;display:flex;gap:9px;margin:18px -24px -34px;padding:11px 24px 13px;overflow-x:auto;border-top:1px solid #30343c;background:rgba(10,12,15,.96);box-shadow:0 -12px 28px rgba(0,0,0,.28);backdrop-filter:blur(10px)}.eps-video-segment-strip>button{flex:0 0 118px;padding:5px;border:1px solid #30343c;border-radius:8px;background:#13161b;color:#c8ccd3;text-align:left;cursor:pointer}.eps-video-segment-strip>button:hover{border-color:#756b48}.eps-video-segment-strip>button.ready{border-color:#4c5944}.eps-video-segment-strip span{height:58px;display:grid;place-items:center;overflow:hidden;border-radius:5px;background:#08090c}.eps-video-segment-strip video{width:100%;height:100%;object-fit:cover;pointer-events:none}.eps-video-segment-strip i{color:#666d78;font-size:9px;font-style:normal}.eps-video-segment-strip b,.eps-video-segment-strip small{display:inline-block;margin-top:5px;font-size:9px}.eps-video-segment-strip small{float:right;color:#777e89}
.eps-video-segment-strip>button.active{border-color:#d8ca7b;box-shadow:0 0 0 2px rgba(216,202,123,.15);background:#222116}
.eps-video-segment-strip>.eps-segment-insert{position:relative;z-index:2;flex:0 0 0;width:0;height:0;margin:34px -4px 0;padding:0;border:0;background:transparent;overflow:visible;opacity:0;transform:scale(.72);transition:opacity .14s ease,transform .14s ease}
.eps-video-segment-strip>.eps-segment-insert::before{content:'+';position:absolute;left:50%;top:50%;width:20px;height:20px;display:grid;place-items:center;border:1px solid #d8dbe0;border-radius:50%;background:#f6f7f8;color:#17191d;font-size:17px;line-height:1;box-shadow:0 3px 12px rgba(0,0,0,.5);transform:translate(-50%,-50%)}
.eps-video-segment-strip>button:hover+.eps-segment-insert,.eps-video-segment-strip>.eps-segment-insert:hover,.eps-video-segment-strip>.eps-segment-insert:focus-visible{opacity:1;transform:scale(1)}
.eps-composition-slots{position:relative;display:flex;align-items:flex-start;gap:8px;margin-top:12px;padding:9px 7px 22px;border:1px solid #282d35;border-radius:7px;background:#0a0c0f;overflow:visible}
.eps-timeline-play{flex:0 0 25px;width:25px;height:25px;margin-top:-5px;padding:0;border:0;background:transparent;color:#e2e5e9;font-size:16px;line-height:25px;cursor:pointer}
.eps-timeline-play:hover{color:#e3d685}.eps-composition-track{position:relative;display:flex;align-items:center;gap:2px;min-width:0;flex:1;height:14px;cursor:crosshair}
.eps-timeline-actions{display:flex;align-items:center;gap:4px;flex:0 0 58px;width:58px;margin-top:-6px;overflow:hidden;opacity:1;transition:flex-basis .18s ease,width .18s ease,opacity .12s ease,transform .18s ease}
.eps-timeline-actions button{flex:0 0 27px;width:27px;height:27px;padding:0;border:0;border-radius:5px;background:transparent;color:#c8cdd4;font-size:14px;cursor:pointer}.eps-timeline-actions button:hover,.eps-timeline-actions button.active{background:#252a31;color:#e3d685}
.eps-composition-track:hover+.eps-timeline-actions{flex-basis:0;width:0;opacity:0;transform:translateX(8px);pointer-events:none}
.eps-composition-track button{position:relative;min-width:3px;height:3px;flex-grow:var(--segment-weight,5);flex-shrink:1;flex-basis:0;padding:0;border:0;border-radius:1px;background:linear-gradient(to right,#b8bdc5 0 var(--played,0%),#4b5058 var(--played,0%) 100%);cursor:crosshair}
.eps-composition-track button.ready{background:linear-gradient(to right,#c4c8ce 0 var(--played,0%),#737a6a var(--played,0%) 100%)}.eps-composition-track button.active{height:5px;box-shadow:0 0 0 1px rgba(227,214,133,.18)}
.eps-composition-track::before,.eps-composition-track::after{content:'';position:absolute;z-index:5;top:0;width:1px;height:14px;pointer-events:none}.eps-composition-track::before{left:var(--playhead-x,0%);background:#a98cff}.eps-composition-track::after{left:var(--hover-x,0%);background:#eef0f3;opacity:0}.eps-composition-track.hovering::after{opacity:.85}
.eps-composition-track button::after{content:attr(data-time);position:absolute;left:50%;top:14px;z-index:4;padding:3px 5px;border:1px solid #353a43;border-radius:4px;background:#1b1e23;color:#c9ced6;font-size:8px;line-height:1;white-space:nowrap;opacity:0;pointer-events:none;transform:translateX(-50%) translateY(-2px);transition:opacity .12s ease,transform .12s ease}
.eps-composition-track button:hover::after,.eps-composition-track button:focus-visible::after{opacity:1;transform:translateX(-50%) translateY(0)}
.eps-video-production-layout.compose-mode .eps-video-card:hover{opacity:.55}.eps-video-production-layout.compose-mode .eps-video-card.compose-selected{opacity:1;filter:none;border-color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.2),0 14px 32px rgba(0,0,0,.36)}
.eps-video-production-layout.compose-mode .eps-video-add-card{opacity:.22;pointer-events:none}.eps-video-production-layout.compose-mode .eps-video-card-more{pointer-events:none;opacity:.35}
@media(max-width:1180px){.eps-video-workbench{grid-template-columns:150px minmax(0,1fr)}.eps-video-workbench .eps-video-card{grid-template-columns:160px minmax(0,1fr)}}@media(max-width:1050px){.eps-video-workbench{grid-template-columns:1fr}.eps-video-asset-rail{position:static;min-height:0;max-height:none}.eps-video-asset-list{display:flex;gap:8px;max-height:none;overflow-x:auto}.eps-video-asset-item{flex:0 0 130px}.eps-video-production-layout{grid-template-columns:1fr}.eps-composition-column{position:static}.eps-composition-empty{height:150px}}
@media(max-width:720px){.eps-video-grid{grid-template-columns:1fr}.eps-video-generation-controls{flex-wrap:wrap}.eps-video-generation-controls label{flex:1 1 42%}}

/* 视频提示词工作台：外层与右侧固定，纵向滚动只留在中间提示词正文。 */
.eps-body.eps-prompts-workspace{display:flex!important;flex-direction:column;overflow:hidden;padding-bottom:0}
.eps-prompts-workspace .eps-video-stylebar{position:relative;top:auto;flex:0 0 auto;margin-bottom:14px}
.eps-prompts-workspace .eps-video-workbench{flex:1;min-height:0}
.eps-prompts-workspace .eps-video-production-layout{height:100%;min-height:0}
.eps-prompts-workspace .eps-video-focus{height:100%;min-height:0;overflow:hidden}
.eps-prompts-workspace .eps-video-focus-card>.eps-video-card-prompt{overflow-y:scroll!important;overflow-x:hidden!important;scrollbar-gutter:stable}
.eps-prompts-workspace .eps-composition-column{position:relative;top:auto;height:100%;min-height:0;overflow:hidden}
.eps-prompts-workspace+.eps-video-segment-strip,.eps-prompts-workspace .eps-video-segment-strip{position:relative;bottom:auto;flex:0 0 auto;margin:12px -24px 0;padding:10px 24px 11px;overflow-x:auto;overflow-y:hidden}
@media(min-width:1181px){.eps-video-workbench{grid-template-columns:300px minmax(0,1fr)}.eps-video-production-layout{grid-template-columns:minmax(0,1fr) 360px}.eps-video-asset-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-content:start}.eps-video-asset-item{min-width:0;margin:0;padding-bottom:7px}.eps-video-asset-item>span{height:74px}}
@media(min-width:1051px) and (max-width:1180px){.eps-video-workbench{grid-template-columns:240px minmax(0,1fr)}.eps-video-production-layout{grid-template-columns:minmax(0,1fr) 320px}.eps-video-asset-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.eps-video-asset-item{min-width:0;margin:0}.eps-video-asset-item>span{height:64px}}

/* 剧本大纲：摘要与正式剧本前置，高级镜头规划默认收起。 */
.eps-outline-toolbar{align-items:flex-start}.eps-outline-document,.eps-outline-script,.eps-advanced-shots{max-width:1180px;margin:0 auto 14px;border:1px solid #30343c;border-radius:10px;background:#121419;color:#d8dce3;overflow:hidden}
.eps-outline-document>header,.eps-outline-script>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 17px;border-bottom:1px solid #292d34}.eps-outline-document h4,.eps-outline-script h4{margin:3px 0 0;font-size:14px}.eps-outline-document small,.eps-outline-script small{color:#9d925e;font-size:9px}.eps-outline-document>header>span{padding:4px 7px;border-radius:5px;background:#20242a;color:#8f96a1;font-size:9px}.eps-outline-document>p{margin:0;padding:16px 17px;color:#c3c8d0;font-size:12px;line-height:1.8;white-space:pre-wrap}
.eps-outline-script>header>div:last-child{display:flex;gap:7px}.eps-outline-script>header button,.eps-outline-stale button{height:29px;padding:0 10px;border:1px solid #383d46;border-radius:6px;background:#1a1d22;color:#bac0c9;font-size:10px;cursor:pointer}.eps-outline-script>header .eps-outline-ai{border-color:#665e3d;background:#282518;color:#e4d789}.eps-outline-script-text{max-height:390px;padding:18px 20px;overflow-y:auto;overflow-x:hidden;background:#0d0f12;color:#d5d9df;font-size:12px;line-height:1.85;white-space:pre-wrap;word-break:break-word;scrollbar-gutter:stable}
.eps-advanced-shots>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 17px;list-style:none;cursor:pointer}.eps-advanced-shots>summary::-webkit-details-marker{display:none}.eps-advanced-shots>summary span{display:flex;min-width:0;flex-direction:column;gap:4px}.eps-advanced-shots>summary b{font-size:13px}.eps-advanced-shots>summary small{color:#7f8691;font-size:10px}.eps-advanced-shots>summary em{flex:0 0 auto;padding:5px 8px;border-radius:5px;font-size:9px;font-style:normal}.eps-advanced-shots>summary em.ok{background:#143326;color:#68c995}.eps-advanced-shots>summary em.warn{background:#392f16;color:#e1bf67}.eps-advanced-shots[open]>summary{border-bottom:1px solid #292d34}.eps-advanced-table-wrap{overflow:auto;padding:14px}.eps-advanced-table-wrap .eps-table{margin:0}
.eps-outline-stale{display:flex;align-items:center;gap:9px;width:max-content;max-width:100%;margin-top:8px;padding:7px 9px;border:1px solid #654c24;border-radius:6px;background:#2c2212;color:#dfbd67;font-size:10px}.eps-outline-stale button{height:25px;border-color:#7a6030;color:#efd681}

/* === 我的资产 modal 卡片 === */
.project-assets-view,.audio-library-view{height:100%;min-height:420px;overflow:auto;color:#e8eaed}
.project-assets-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:12px;padding:14px 18px;background:#111317;border-bottom:1px solid #292d35}
.project-assets-toolbar label{display:flex;align-items:center;gap:8px;color:#989da7;font-size:12px}
.project-assets-toolbar select,.project-assets-toolbar input{height:34px;border:1px solid #343943;border-radius:8px;background:#191c22;color:#eef0f4;padding:0 11px;outline:none}
.project-assets-toolbar select{min-width:190px}.project-assets-toolbar input{margin-left:auto;min-width:230px}
.project-assets-toolbar select:focus,.project-assets-toolbar input:focus{border-color:#686f7d}
.project-assets-more{position:relative}.project-assets-more summary{height:34px;display:flex;align-items:center;padding:0 11px;border:1px solid #343943;border-radius:8px;background:#191c22;color:#aeb3bc;font-size:12px;cursor:pointer;list-style:none}.project-assets-more summary::-webkit-details-marker{display:none}.project-assets-more[open] summary{border-color:#5b626f;color:#fff}.project-assets-more>div{position:absolute;right:0;top:40px;z-index:20;width:260px;padding:12px;border:1px solid #353a44;border-radius:10px;background:#181b20;box-shadow:0 16px 40px rgba(0,0,0,.55)}.project-assets-more label{display:flex;flex-direction:column;align-items:stretch;gap:7px}.project-assets-more select{width:100%;min-width:0}
.project-assets-types,.audio-library-types{display:flex;gap:4px;padding:3px;border:1px solid #2d3139;border-radius:9px;background:#17191e}
.project-assets-types button,.audio-library-types button{border:0;border-radius:6px;background:transparent;color:#9da2ac;padding:7px 12px;cursor:pointer}
.project-assets-types button.active,.audio-library-types button.active{background:#343840;color:#fff}
.project-assets-summary{padding:11px 18px;color:#858b95;font-size:12px;border-bottom:1px solid #242831}
.project-assets-grid{padding:16px!important;align-content:start}
.project-assets-filter-bar{display:flex!important;margin:0;border-bottom:1px solid #292d35}
.project-assets-toolbar-secondary{position:relative;top:auto;padding:10px 18px;background:#111317}
.project-assets-toolbar-secondary input{margin-left:auto}
.project-asset-card .assets-thumb{position:relative;background-size:contain;background-position:center;background-repeat:no-repeat;background-color:#101216}
.project-asset-card .assets-info{height:24px;min-height:24px;padding:4px 8px;overflow:hidden}
.assets-thumb-actions.project-asset-actions{flex-direction:column;align-items:stretch;justify-content:center;gap:7px;padding:14px}
.project-asset-main-actions{display:flex;gap:8px}.project-asset-main-actions .atat-btn{flex:1}
.project-asset-card .project-asset-badge{position:absolute;left:8px;top:8px;padding:3px 7px;border-radius:5px;background:rgba(8,10,14,.82);color:#f1f2f4;font-size:11px}
.project-asset-card .project-asset-prompt{margin-top:4px;color:#777e89;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-asset-tags{display:flex;gap:4px;margin-top:6px;min-height:20px;overflow:hidden}.project-asset-tags span,.project-asset-prompt-tags span{display:inline-flex;align-items:center;height:20px;padding:0 7px;border:1px solid #343943;border-radius:5px;background:#20232a;color:#aeb4bf;font-size:10px;white-space:nowrap}
.project-asset-prompt-button{width:100%;height:28px;border:1px solid rgba(255,255,255,.22);border-radius:6px;background:rgba(20,23,29,.88);color:#e1e4e9;font-size:11px;cursor:pointer}.project-asset-prompt-button:hover{background:#30353e;color:#fff}
.project-asset-prompt-modal{position:fixed;inset:0;z-index:2400;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.66);backdrop-filter:blur(3px)}.project-asset-prompt-modal.hidden{display:none}
.project-asset-prompt-panel{width:min(760px,calc(100vw - 48px));max-height:82vh;display:flex;flex-direction:column;border:1px solid #343943;border-radius:13px;background:#17191e;box-shadow:0 28px 80px rgba(0,0,0,.68);overflow:hidden}
.project-asset-prompt-panel header{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid #2a2e36}.project-asset-prompt-panel header>div{display:flex;align-items:baseline;gap:9px}.project-asset-prompt-panel header b{font-size:15px}.project-asset-prompt-panel header span{color:#858b95;font-size:11px}.project-asset-prompt-panel header button{border:0;background:transparent;color:#aeb3bc;font-size:22px;cursor:pointer}
.project-asset-prompt-tags{display:flex;gap:6px;flex-wrap:wrap;padding:13px 18px 0}.project-asset-prompt-panel label{display:flex;flex-direction:column;gap:8px;padding:14px 18px;color:#aeb3bc;font-size:12px}.project-asset-prompt-panel textarea{min-height:260px;max-height:48vh;resize:vertical;border:1px solid #30353e;border-radius:9px;background:#111318;color:#e2e5ea;padding:13px;line-height:1.7;outline:none}
.project-asset-prompt-panel footer{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;border-top:1px solid #2a2e36}.project-asset-prompt-panel footer span{color:#777e88;font-size:11px}.project-asset-prompt-panel footer button{height:32px;padding:0 13px;border:1px solid #444a55;border-radius:7px;background:#2b3038;color:#fff;cursor:pointer}
.audio-library-head{display:flex;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid #292d35}
.audio-library-head>div:first-child{display:flex;align-items:baseline;gap:10px}.audio-library-head b{font-size:16px}.audio-library-head span{color:#858b95;font-size:12px}
.audio-library-upload{height:32px;padding:0 13px;border:1px solid #434955;border-radius:7px;background:#292e36;color:#f0f2f5;cursor:pointer}.audio-library-upload:hover{background:#353b45}
.audio-library-toolbar{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid #252931;background:#111317}.audio-library-toolbar input{height:34px;min-width:260px;margin-left:auto;padding:0 11px;border:1px solid #343943;border-radius:8px;background:#191c22;color:#eef0f4;outline:none}.audio-library-toolbar input:focus{border-color:#626a77}
.audio-library-summary{padding:10px 18px;color:#858b95;font-size:12px;border-bottom:1px solid #242831}
.audio-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;padding:16px;align-content:start}
.audio-library-card{min-width:0;border:1px solid #2d323b;border-radius:10px;background:#171a1f;overflow:hidden}.audio-library-card:hover{border-color:#464d59}.audio-library-card-main{display:flex;align-items:center;gap:12px;padding:14px}.audio-library-play{width:42px;height:42px;flex:0 0 42px;border:1px solid #414752;border-radius:50%;background:#252a32;color:#fff;font-size:15px;cursor:pointer}.audio-library-play.playing{background:#eee;color:#111}.audio-library-info{min-width:0;flex:1}.audio-library-name{font-size:13px;color:#f0f1f3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.audio-library-meta{display:flex;gap:8px;margin-top:6px;color:#858b95;font-size:11px}.audio-library-kind{color:#c6ccd5}.audio-library-card-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #282d35}.audio-library-card-actions button{height:34px;border:0;background:transparent;color:#aeb4bd;font-size:11px;cursor:pointer}.audio-library-card-actions button+button{border-left:1px solid #282d35}.audio-library-card-actions button:hover{background:#252a31;color:#fff}
.audio-library-detail{position:fixed;inset:0;z-index:2450;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.66)}.audio-library-detail.hidden{display:none}.audio-library-detail-panel{width:min(520px,calc(100vw - 40px));border:1px solid #373d47;border-radius:12px;background:#181b20;box-shadow:0 28px 80px rgba(0,0,0,.65);overflow:hidden}.audio-library-detail-panel header{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #2c3139}.audio-library-detail-panel header button{border:0;background:transparent;color:#aaa;font-size:22px;cursor:pointer}.audio-library-detail-panel section{display:flex;flex-direction:column;gap:13px;padding:16px}.audio-library-detail-panel label{display:flex;flex-direction:column;gap:7px;color:#aeb3bc;font-size:12px}.audio-library-detail-panel input,.audio-library-detail-panel select,.audio-library-detail-panel textarea{border:1px solid #343a44;border-radius:7px;background:#111419;color:#eef0f3;padding:9px;outline:none}.audio-library-detail-panel textarea{min-height:76px;resize:vertical}.audio-library-detail-panel audio{width:100%}.audio-library-detail-panel footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid #2c3139}.audio-library-detail-panel footer button{height:32px;padding:0 14px;border:1px solid #414854;border-radius:7px;background:#2b3038;color:#fff;cursor:pointer}
.assets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.assets-empty { text-align: center; padding: 60px 20px; color: #6a7080; grid-column: 1/-1; }
.assets-empty-icon { font-size: 48px; opacity: 0.4; margin-bottom: 16px; }
.assets-empty-title { font-size: 15px; color: #8b909c; margin-bottom: 8px; font-weight: 500; }
.assets-empty-hint { font-size: 12px; color: #6a7080; line-height: 1.6; }
.assets-card {
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.12s;
}
.assets-card:hover { border-color: #4fc3f7; }
/* 2026-06-16：select 模式下素材卡片可点击添加到节点参考图——hover 加发光背景提示 */
/* 2026-06-17：select 模式下也显示预览/应用按钮，行为由 applyAsset 内部区分 */
.assets-card.selectable:hover {
  background: rgba(79, 195, 247, 0.08);
  border-color: #4fc3f7;
  box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.25);
}
.assets-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0f1116;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.assets-thumb > .assets-thumb-actions {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.assets-thumb > .assets-thumb-corner {
  position: absolute;
  top: 2px;
  bottom: auto;
  right: 6px;
  display: none;
  z-index: 3;
}
.assets-thumb-corner { position: relative; }
.assets-info { padding: 2px 8px; font-size: 11px; color: #aab0bc; line-height: 1.1; height: 18px; box-sizing: border-box; overflow: hidden; }

/* 2026-06-17：磨砂玻璃按钮（查看 + 应用）*/
.assets-thumb { position: relative; }
.assets-thumb-actions {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: inherit;
}
.assets-card:hover .assets-thumb-actions { display: flex; }
.atat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 8px 13px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 45px;
  font-family: inherit;
}
.atat-btn:hover { background: rgba(0,0,0,0.7); border-color: rgba(255,255,255,0.45); }
.atat-icon { width: 18px; height: 18px; display: block; }
.atat-label { font-size: 9px; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.assets-info-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.assets-actions {
  position: absolute;
  top: 4px; right: 4px;
  display: none;
  gap: 4px;
}
.assets-card:hover .assets-actions { display: flex; }
.assets-actions button {
  background: rgba(15, 17, 22, 0.9);
  color: #c3c8d2;
  border: none;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.assets-actions button:hover { background: #4fc3f7; color: #0f1116; }
.assets-actions .danger:hover { background: #f44336; color: #fff; }

.assets-tabs { display: flex; gap: 2px; }
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 11px;
  color: #aab0bc;
}
.assets-thumb-corner {
  position: absolute;
  top: 2px;
  bottom: auto;
  right: 6px;
  display: none;
  z-index: 3;
}
.assets-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #d0d4dd;
  cursor: pointer;
  padding: 0;
  transition: background 0.1s, color 0.1s;
  z-index: 3;
}
.assets-card:hover .assets-thumb-corner { display: block; }
.assets-library-card { overflow: visible; }
.assets-library-card > .assets-thumb { border-radius: 7px 7px 0 0; }
.assets-library-card .assets-thumb > .assets-thumb-corner { top: -10px; }
.assets-more-btn:hover { background: rgba(0,0,0,0.7); color: #fff; border-color: rgba(255,255,255,0.4); }
.assets-more-btn svg { display: block; pointer-events: none; }
.assets-more-menu {
  position: absolute;
  top: 30px;
  bottom: auto;
  right: 6px;
  background: #1a1d24;
  border: 1px solid #2f343d;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  z-index: 50;
  min-width: 100px;
}
.assets-more-menu button {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: #e8ebf0;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.assets-more-menu button:hover { background: rgba(255,255,255,0.07); }
.assets-more-menu button.danger { color: #f44336; }
.assets-more-menu button.danger:hover { background: rgba(244,67,54,0.12); }

.assets-tabs .tab {
  background: transparent;
  border: none;
  color: #8b909c;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  border-bottom: none;
}
/* === 资产库 filter bar(参考原设计:全部分类 + 5 filter tab) === */
/* 注意：下面 line 1645+ 有另一个 .assets-filter-bar 定义会覆盖这里，实际生效是后者。 */

/* .assets-filter-bar 被覆盖了：左边 cat-filter-wrap + 右边 assets-filter-tabs(右对齐) */
.cat-filter-wrap { position: relative; flex: 0 0 auto; }
.cat-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #2a2e37;
  color: #c3c8d2;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  height: 26px;
  box-sizing: border-box;
  white-space: nowrap;
}
.cat-filter-btn:hover { background: #2a2e37; color: #f0f2f5; }
.cat-filter-btn svg { color: #8b909c; }
.cat-filter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #1a1d24;
  border: 1px solid #2f343d;
  border-radius: 8px;
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  min-width: 110px;
  max-height: 240px;
  overflow-y: auto;
}
.cat-filter-options.hidden { display: none; }
.cat-filter-options li {
  padding: 6px 14px;
  color: #e8ebf0;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cat-filter-options li:hover { background: #2a2e37; color: #f0f2f5; }
.cat-filter-options li.selected { background: #2a2e37; color: #4fc3f7; }

.assets-tabs .tab.active { background: #2a2e37; color: #4fc3f7; }

/* 2026-06-17：预览 viewer 样式 */
.modal#asset-preview-modal {
  z-index: 2500;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal#asset-preview-modal.hidden { display: none; }
.apt-mask { position: absolute; inset: 0; z-index: 0; }
.apt-image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  cursor: default;
}
#apt-image {
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.apt-toolbar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30,33,42,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 6px 14px;
  z-index: 10;
}
.apt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(20, 23, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0f2f5;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.apt-btn:hover { background: rgba(40, 46, 56, 0.85); color: #4fc3f7; border-color: rgba(79, 195, 247, 0.4); }
.apt-btn svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.apt-zoom-label {
  color: #d0d4dd;
  font-size: 12px;
  min-width: 32px;
  text-align: center;
  font-family: monospace;
}
.apt-zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.apt-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d0d4dd;
  cursor: pointer;
}
.apt-zoom-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d0d4dd;
  cursor: pointer;
  border: none;
}
.apt-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
}
.apt-top-left {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.apt-info-tooltip {
  position: absolute;
  top: 44px;
  left: 0;
  background: rgba(15,17,22,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e8ebf0;
  font-size: 12px;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  pointer-events: none;
  z-index: 11;
  min-width: 160px;
}
.apt-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  line-height: 1.6;
}
.apt-info-label {
  color: #8b909c;
  font-size: 12px;
}
.apt-info-value {
  color: #f0f2f5;
  font-size: 12px;
  font-weight: 500;
}
.apt-info-sep {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 5px 0;
}
.apt-top-right {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.apt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(20, 23, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0f2f5;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.apt-icon-btn:hover { background: rgba(40, 46, 56, 0.85); color: #4fc3f7; border-color: rgba(79, 195, 247, 0.4); }
.apt-icon-btn svg { width: 20px; height: 20px; display: block; pointer-events: none; }
.apt-close-btn { width: 38px; height: 38px; }
.apt-close-btn svg { width: 22px; height: 22px; }
.apt-download-btn { background: rgba(20, 23, 29, 0.65); }
.apt-download-btn:hover { background: rgba(79, 195, 247, 0.85); color: #fff; }
.apt-esc-hint {
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* 2026-06-16：资产 modal 重做——高度初始充满整个界面 */
.assets-modal-content { width: 95vw; max-width: 1280px; height: 95vh; max-height: 95vh; padding: 0; overflow: hidden; display: flex; flex-direction: column; border-radius: 8px; }

/* === 保存到素材库 Modal === */
.save-to-library-content {
  width: 480px;
  max-width: 95vw;
  background: #1a1d24;
  border-radius: 8px;
  padding: 0;
  border: 1px solid #2a2e37;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  max-height: 95vh;
}
.stl-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #2a2e37;
}
.stl-title { font-size: 16px; font-weight: 600; color: #f0f2f5; flex: 1; }
.stl-type-badge {
  font-size: 11px;
  padding: 3px 10px;
  background: #1f232b;
  color: #8b909c;
  border-radius: 10px;
  border: 1px solid #2a2e37;
}
.stl-close {
  background: transparent;
  border: none;
  color: #6a7080;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
}
.stl-close:hover { background: #2a2e37; color: #f0f2f5; }
.stl-preview {
  background: #0d0f13;
  margin: 16px 20px 0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  max-height: 300px;
}
.stl-preview img,
.stl-preview video {
  max-width: 100%;
  max-height: 300px;
  display: block;
}
.stl-form { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.stl-field { display: flex; flex-direction: column; gap: 6px; }
.stl-label { font-size: 12px; color: #8b909c; }
.stl-input {
  background: #14171d;
  border: 1px solid #2a2e37;
  color: #f0f2f5;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s;
}
.stl-input:focus { border-color: #4fc3f7; }
.stl-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.stl-cat-btn {
  background: transparent;
  border: 1px solid #2a2e37;
  color: #c3c8d2;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}
.stl-cat-btn:hover { border-color: #4fc3f7; color: #f0f2f5; }
.stl-cat-btn.selected { background: #1a3a52; border-color: #4fc3f7; color: #4fc3f7; }
.stl-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #2a2e37;
}
.stl-btn {
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.stl-btn-cancel { background: transparent; border: 1px solid #2a2e37; color: #c3c8d2; }
.stl-btn-cancel:hover { background: #2a2e37; color: #f0f2f5; }
.stl-btn-save { background: #4fc3f7; border: 1px solid #4fc3f7; color: #0f1116; font-weight: 500; }
.stl-btn-save:hover { background: #29b6f6; border-color: #29b6f6; }
.assets-main-tabs { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0 20px; border-bottom: 1px solid #2a2e37; gap: 16px; }
.assets-main-tabs-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* 2026-06-16：「📦 素材库」是 modal 标题标签，不可点击 */
.assets-main-title { font-size: 16px; font-weight: 600; color: #f0f2f5; padding: 0 8px 0 0; cursor: default; }
.assets-main-tabs-right { display: flex; align-items: center; gap: 12px; }
.main-tab {
  background: transparent;
  border: none;
  color: #6a7080;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.1s;
}
.main-tab:hover { color: #aab0bc; }
.main-tab.active { color: #f0f2f5; }
.main-tab.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: #f0f2f5; border-radius: 2px 2px 0 0; }
.main-tab .badge { display: inline-block; margin-left: 6px; padding: 1px 6px; background: #2a2e37; color: #8b909c; border-radius: 8px; font-size: 10px; font-weight: 400; }
.assets-icon-btn { background: transparent; border: none; color: #8b909c; cursor: pointer; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.assets-icon-btn:hover { background: #2a2e37; color: #f0f2f5; }
.assets-batch-btn { background: #1f232b; border: 1px solid #2a2e37; color: #aab0bc; padding: 6px 12px; border-radius: 16px; cursor: pointer; font-size: 12px; transition: all 0.1s; }
.assets-batch-btn:hover { background: #2a2e37; color: #f0f2f5; border-color: #3a3e47; }
.assets-close-btn { background: transparent; border: none; color: #8b909c; font-size: 20px; cursor: pointer; padding: 0 8px; line-height: 1; }
.assets-close-btn:hover { color: #f0f2f5; }
.assets-realtime-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #aab0bc; font-size: 12px; user-select: none; }
.assets-realtime-toggle input { display: none; }
.assets-realtime-toggle .switch-track { width: 28px; height: 16px; background: #2a2e37; border-radius: 999px; position: relative; transition: background 0.15s; }
.assets-realtime-toggle .switch-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: #8b909c; border-radius: 50%; transition: all 0.15s; }
.assets-realtime-toggle input:checked + .switch-track { background: #1a3a52; }
.assets-realtime-toggle input:checked + .switch-track .switch-thumb { left: 14px; background: #4fc3f7; }

/* 分类筛选行（恢复以前：全部分类 + 5 个 tab 紧挨着在左对齐） */
.assets-filter-bar { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #2a2e37; }
.assets-filter-tabs { display: flex; gap: 2px; }
.assets-category-dropdown { position: relative; }
.assets-category-btn { background: #1f232b; border: 1px solid #2a2e37; color: #aab0bc; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.assets-category-btn:hover { background: #2a2e37; color: #f0f2f5; }
.assets-category-menu { position: absolute; top: calc(100% + 4px); left: 0; background: #1a1d24; border: 1px solid #2a2e37; border-radius: 6px; padding: 4px; min-width: 120px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); z-index: 10; }
.assets-category-menu.hidden { display: none; }
.category-option { display: block; width: 100%; background: transparent; border: none; color: #aab0bc; padding: 6px 12px; font-size: 12px; border-radius: 4px; cursor: pointer; text-align: left; }
.category-option:hover { background: #2a2e37; color: #f0f2f5; }
.category-option.active { background: #1a3a52; color: #4fc3f7; }
.filter-tab { background: transparent; border: none; color: #8b909c; padding: 6px 14px; font-size: 13px; cursor: pointer; border-radius: 6px; transition: all 0.1s; }
.filter-tab:hover { background: #1f232b; color: #e8ebf0; }
.filter-tab.active { background: #2a2e37; color: #4fc3f7; }

/* 2026-06-16：画布资产视图（顶部下拉选画布 + 横向网格） */
.canvas-assets-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.canvas-assets-view.hidden { display: none; }
.canvas-assets-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #2a2e37; margin-top: -16px; }
.canvas-current-dropdown { position: relative; }
/* 2026-06-16：下拉按钮箭头随展开状态切换（ ▼ 关闭 / ▲ 打开 ）*/
#canvas-current-btn.open::after { content: ' ▲'; }
#canvas-current-btn:not(.open)::after { content: ' ▼'; }
#canvas-current-btn::after { color: #8b909c; font-size: 10px; margin-left: 4px; }
#canvas-current-btn { font-size: 13px; }
.canvas-current-menu { min-width: 280px; max-height: calc(100vh - 60px); overflow-y: auto; padding: 4px 0; position: fixed; z-index: 1200; }
.canvas-current-group-title { font-size: 11px; color: #6a7080; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 14px 4px 14px; }
.canvas-current-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; background: transparent; border: none; color: #e8ebf0; font-size: 12px; cursor: pointer; text-align: left; transition: background 0.1s; }
.canvas-current-option:hover { background: #1f232b; }
.canvas-current-option.current { background: #1a3a52; }
/* 2026-06-16：画布选项高亮（初始指向当前画布，跟随点击移动；浅蓝背景+蓝边）*/
.canvas-current-option.highlighted { background: rgba(79, 195, 247, 0.1); border-left: 3px solid #4fc3f7; padding-left: 11px; }

/* 2026-06-16：查看 / 应用 按钮（hover 资产卡时显示）*/
/* 2026-06-17：旧的 assets-actions 替换为磨砂玻璃按钮（见上面 .assets-thumb-actions）*/
/* 2026-06-16：应用目标节点选择 modal 里的按钮 */
.apply-target-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: #14171d; border: 1px solid #2a2e37; border-radius: 6px; cursor: pointer; transition: all 0.1s; color: #e8ebf0; }
.apply-target-item:hover { background: #1f232b; border-color: #4fc3f7; }
.apply-target-item + .apply-target-item { margin-top: 0; }

/* 2026-06-16：批量选择模式 */
/* 批量模式下，卡片整体点击可选 + 默认变灰，选中后恢复正常亮度 */
.assets-card.batch-mode { cursor: pointer; filter: grayscale(0.8) brightness(0.7) opacity(0.55); transition: filter 0.18s; }
.assets-card.batch-mode:hover { filter: grayscale(0.6) brightness(0.85) opacity(0.75); }
.assets-card.batch-mode.selected { filter: grayscale(0) brightness(1) opacity(1); border-color: #4fc3f7 !important; box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.35); position: relative; }
.assets-card.batch-mode .assets-thumb-actions { display: none !important; }
.assets-card.batch-mode .assets-thumb-corner  { display: none !important; }  /* 2026-06-19：同时隐藏三点按钮 */
.assets-card.batch-mode.selected::before { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #4fc3f7; color: #0f1116; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(79, 195, 247, 0.5); z-index: 2; }
/* select 模式下隐藏 ✓（避免跟 selectable 冲突） */
.assets-card.selectable.selected::before { display: none; }

/* 批量模式工具栏 */
.assets-toolbar-normal,
.assets-toolbar-batch { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: transparent; border-bottom: none; }
.assets-toolbar-batch.hidden { display: none; }
.assets-toolbar-normal.hidden { display: none; }
.assets-batch-count { font-size: 13px; color: #aab0bc; padding: 0 6px; }
/* 2026-06-19：素材库 toolbar 新设计（参考图） */
.density-group { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; }
.density-group:hover { background: rgba(255, 255, 255, 0.04); }
.assets-density-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: transparent; border: none; color: #c3c8d2; border-radius: 6px; cursor: default; }
.assets-density-btn:hover { background: transparent; }
.assets-density-slider { -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important; width: 80px; height: 4px; background: #3a3f4b !important; border: none !important; border-radius: 2px !important; outline: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; margin: 0; padding: 0; }
.assets-density-slider::-webkit-slider-thumb { -webkit-appearance: none !important; -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.4) !important; appearance: none !important; width: 10px !important; height: 10px !important; border-radius: 50% !important; background: #f0f2f5 !important; cursor: pointer; margin-top: -3px; }
.assets-density-slider::-moz-range-thumb { width: 10px !important; height: 10px !important; border-radius: 50% !important; background: #f0f2f5 !important; cursor: pointer; border: none !important; box-shadow: 0 0 0 1px rgba(0,0,0,0.4) !important; }
.assets-density-slider::-webkit-slider-runnable-track { background: #3a3f4b !important; height: 4px !important; border: none !important; }
.assets-density-slider::-moz-range-track { background: #3a3f4b !important; height: 4px !important; border: none !important; }
.assets-realtime-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 12px; color: #c3c8d2; }
.assets-realtime-toggle input[type="checkbox"] { display: none; }
.art-toggle-track { position: relative; width: 36px; height: 20px; background: #3a3f4b; border-radius: 10px; transition: background 0.15s; flex-shrink: 0; }
.art-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #f0f2f5; border-radius: 50%; transition: transform 0.15s; }
.assets-realtime-toggle input:checked + .art-toggle-track { background: #4fc3f7; }
.assets-realtime-toggle input:checked + .art-toggle-track::after { transform: translateX(16px); }
.assets-batch-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: #2a2e37; border: 1px solid #3a3f4b; color: #f0f2f5; border-radius: 20px; cursor: pointer; font-size: 12px; font-family: inherit; transition: all 0.12s; }
.assets-batch-btn:hover { background: #3a3f4b; border-color: #4fc3f7; }
.assets-batch-btn{white-space:nowrap;flex-wrap:nowrap}
.assets-batch-btn.active { background: #4fc3f7; color: #0f1116; border-color: #4fc3f7; }
.assets-batch-count #batch-count { color: #4fc3f7; font-weight: 600; padding: 0 2px; }
.assets-batch-action { background: #1f232b; border: 1px solid #2a2e37; color: #e8ebf0; padding: 6px 12px; border-radius: 16px; cursor: pointer; font-size: 12px; transition: all 0.1s; }
.assets-batch-action:hover { background: #2a2e37; border-color: #4fc3f7; }
.assets-batch-action.danger { color: #f44336; border-color: #5a2a2a; }
.assets-batch-action.danger:hover { background: #5a2a2a; color: #fff; border-color: #f44336; }
.canvas-current-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-current-date { font-size: 11px; color: #6a7080; flex: 0 0 auto; min-width: 36px; text-align: right; }
/* 2026-06-16：画布选项缩略图（跟画布选择界面一样的图片）*/
.canvas-current-thumb { width: 28px; height: 28px; border-radius: 4px; background: #2a2e37; background-size: cover; background-position: center; flex: 0 0 auto; }
.canvas-current-thumb.empty { background: linear-gradient(135deg, #2a2e37 0%, #1f232b 100%); display: flex; align-items: center; justify-content: center; color: #555a66; font-size: 10px; }
/* 2026-06-16：协作画布分组下的占位（功能未开通）*/
.canvas-current-empty { padding: 10px 14px 14px 42px; font-size: 11px; color: #6a7080; font-style: italic; }
/* 2026-06-16：个人画布 / 协作画布 两个并列的源 Tab（小占位，纯文字无图标）*/
.canvas-source-tabs { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid #2a2e37; }
.canvas-source-tab { padding: 4px 10px; background: transparent; border: none; color: #8b909c; font-size: 12px; cursor: pointer; border-radius: 4px; transition: all 0.1s; }
.canvas-source-tab:hover { background: #1f232b; color: #e8ebf0; }
.canvas-source-tab.active { background: #2a2e37; color: #4fc3f7; }
.canvas-source-list { max-height: 360px; overflow-y: auto; padding: 4px 0; }  /* 2026-06-18：11 个画布以内不滚，12+ 才出现滚轮（每个 option ~30-32px × 11 + padding = 360px） */
.canvas-source-list .canvas-current-option { padding: 6px 14px; }
/* 2026-06-16：协作画布空状态 */
.canvas-source-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; color: #6a7080; text-align: center; }
.canvas-source-empty-icon { font-size: 32px; opacity: 0.6; }
.canvas-source-empty-text { font-size: 13px; color: #8b909c; }
.canvas-source-empty-hint { font-size: 11px; color: #555a66; }
.canvas-assets-grid-wrap { flex: 1; padding: 16px; overflow-y: auto; min-height: 0; }
.canvas-assets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

/* === 右键菜单（浏览器风格） === */
.node-context-menu {
  position: fixed;
  background: #1a1d24;
  border: 1px solid #4fc3f7;
  border-radius: 10px;
  padding: 5px;
  z-index: 10000;
  min-width: 220px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  user-select: none;
}
.node-context-menu.hidden { display: none; }
.node-context-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #c3c8d2;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, color 0.1s;
  line-height: 1;
}
.node-context-menu button:hover { background: rgba(79, 195, 247, 0.12); color: #f0f2f5; }
.node-context-menu button::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #6a7080;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex: 0 0 auto;
  opacity: 0.85;
}
.node-context-menu button:hover::before { opacity: 1; }
.node-context-menu button[data-ctx-act="save"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/><polyline points='17 21 17 13 7 13 7 21'/><polyline points='7 3 7 8 15 8'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/><polyline points='17 21 17 13 7 13 7 21'/><polyline points='7 3 7 8 15 8'/></svg>");
}
.node-context-menu button[data-ctx-act="copy"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>");
}
.node-context-menu button[data-ctx-act="paste"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><rect x='8' y='2' width='8' height='4' rx='1'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><rect x='8' y='2' width='8' height='4' rx='1'/></svg>");
}
.node-context-menu button[data-ctx-act="duplicate"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='8' y='8' width='12' height='12' rx='2'/><path d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='8' y='8' width='12' height='12' rx='2'/><path d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/></svg>");
}
.node-context-menu button[data-ctx-act="rename"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/></svg>");
}
.node-context-menu button[data-ctx-act="delete"]::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6M14 11v6'/><path d='M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6M14 11v6'/><path d='M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/></svg>");
}
.node-context-menu .cm-shortcut {
  margin-left: auto;
  color: #6a7080;
  font-size: 12px;
  font-family: monospace;
}
.node-context-menu .cm-sep {
  height: 1px;
  background: #2a2e37;
  margin: 4px 6px;
}
.node-context-menu .cm-danger { color: #f44336 !important; }
.node-context-menu .cm-danger:hover { background: rgba(244, 67, 54, 0.15) !important; color: #ff6b6b !important; }
.node-context-menu .cm-danger::before { background: #f44336 !important; }

/* === 画布框选与批量操作组件 === */
.canvas-marquee-box,.canvas-multi-outline{position:fixed;z-index:9990;pointer-events:none;box-sizing:border-box;border:1px solid rgba(232,235,241,.9);background:rgba(220,225,235,.08)}
.canvas-marquee-box{border-style:dashed;background:rgba(214,218,226,.1)}
.canvas-multi-outline{border-radius:8px;box-shadow:0 0 0 1px rgba(0,0,0,.35)}
.canvas-marquee-box.hidden,.canvas-multi-outline.hidden,.canvas-multi-toolbar.hidden{display:none!important}
.canvas-node.multi-selected{outline:1px solid rgba(236,239,245,.95);outline-offset:2px}
.canvas-multi-toolbar{position:fixed;z-index:10020;display:flex;align-items:center;gap:3px;min-height:40px;padding:4px 7px;border:1px solid #373b44;border-radius:10px;background:#1b1d22;box-shadow:0 12px 34px rgba(0,0,0,.48);user-select:none}
.canvas-multi-toolbar>i{width:1px;height:22px;margin:0 4px;background:#343740}
.canvas-multi-toolbar button{height:31px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:#e2e5eb;font:12px/1 inherit;white-space:nowrap;cursor:pointer}
.canvas-multi-toolbar button:hover{background:#2a2d34}
.canvas-multi-toolbar button:disabled{color:#646973;cursor:not-allowed}.canvas-multi-toolbar button:disabled:hover{background:transparent}
.canvas-multi-toolbar .canvas-multi-grid{display:grid;grid-template-columns:repeat(2,5px);grid-auto-rows:5px;gap:2px;width:30px;padding:0 8px}
.canvas-multi-grid span{display:block;border-radius:1px;background:#dfe3e9}
.canvas-multi-context-menu{min-width:210px;border-color:#343841;background:#1d1f24}.canvas-multi-context-menu button::before{display:none}

/* === 工作流时间线 === */
.workflow-timeline {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}
.workflow-item {
  flex: 0 0 200px;
  background: #1a1d24;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.workflow-item:hover { border-color: #4fc3f7; }

/* === option-picker（节点 tag 下拉） === */
.option-picker {
  position: fixed;
  background: #1a1d24;
  border: 1px solid #4fc3f7;
  border-radius: 8px;
  padding: 3px;
  min-width: 100px;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.55);
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.option-picker-item {
  padding: 6px 14px;
  font-size: 12px;
  color: #c3c8d2;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
  user-select: none;
  line-height: 1.3;
}
.option-picker, .option-picker * { pointer-events: auto; }
.option-picker-item:hover { background: rgba(79,195,247,0.15); color: #f0f2f5; }
.option-picker-item.active { color: #4fc3f7; font-weight: 500; }

/* === workflow 缩略图 === */
.wf-thumb {
  width: 100%; aspect-ratio: 1/1;
  background: #0f1116; background-size: cover; background-position: center;
  border-radius: 6px; margin-bottom: 4px;
}

/* === 滚动条样式（全局深色） === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f1116; }
::-webkit-scrollbar-thumb { background: #2a2e37; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a3e47; }

/* === JS 错误显示 === */
.js-error { color: #f44336; font-weight: bold; }


/* === 节点面板 v2 - 复古简洁风（参考原设计） === */
.nip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #e8ebf0;
}
.nip-icon {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.nip-text { letter-spacing: 0.3px; }

/* 资源行（+、缩略图）—— 2026-06-16 改为「图片显示框」放在 panel 左上角，缩略图依次往右排列 */
.nip-assets {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 64px;
  padding: 6px;
  /* 2026-06-16：去掉 dashed 边框，功能区不画线划分 */
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  overflow-x: auto;  /* 缩略图多了水平滚动，不换行 */
  overflow-y: hidden;
}
.nip-asset-add {
  /* 2026-06-16：+ 方框变大（28→50），参考设计图更突出 */
  width: 50px; height: 50px;
  background: #14171d;
  border: 1.5px dashed #3a3e47;
  color: #8b909c;
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.12s;
  flex: 0 0 auto;
}
.nip-asset-add:hover {
  background: #1a1d24;
  border-color: #4fc3f7;
  border-style: solid;
  color: #4fc3f7;
}
.nip-asset-cat {
  background: #1f232b;
  color: #aab0bc;
  border: 1px solid #2a2e37;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s;
  font-weight: 400;
}
/* 2026-06-16：风格转绘 / 调色盘外层容器（独立一行，在参考图下方） */
.nip-asset-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nip-asset-cat:hover {
  background: #2a2e37;
  color: #e4e6eb;
  border-color: #3a3e47;
}
.nip-asset-thumb {
  /* 2026-06-16：缩略图从 32x32 放大到 64x64，参考图预览更清楚 */
  width: 64px; height: 64px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #2a2e37;
  position: relative;
  cursor: pointer;
  border: 1px solid #2a2e37;
}
.nip-asset-thumb:hover { border-color: #4fc3f7; }
/* 2026-06-17：参考图缩略图上的 × 删除按钮（hover 显示） */
.nip-asset-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; background: rgba(0,0,0,0.7); border: none; border-radius: 4px; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; transition: background 0.1s; z-index: 2; }
.nip-asset-thumb:hover .nip-asset-del { display: flex; }
.nip-asset-del:hover { background: #f44336; }

/* 提示词输入框 v2 —— 2026-06-16：去掉功能区边框，仅保留按钮/输入框本身的线框 */
.nip-prompt {
  width: 100%;
  min-height: 80px;
  /* 2026-06-16：提示词 textarea 初始 2 行（min 56px），随内容增长，最多 14 行（293px ≈ 14*19.5+padding），再长出滚动条 */
  max-height: 80px;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e8ebf0;
  font-size: 13px;
  /* 2026-06-16：不许用户手动拖拽高度，内容超出 max-height 后出现滚动条 */
  resize: none;
  overflow-y: auto;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}
.nip-prompt:focus { border-color: #4fc3f7; }
.nip-prompt::placeholder { color: #555a66; }

/* 2026-06-16：右上角展开按钮（点击后弹出全屏 modal） */
.nip-expand-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px; height: 24px;
  background: #1f232b;
  border: 1px solid #2a2e37;
  border-radius: 4px;
  color: #aab0bc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  transition: all 0.12s;
}
.nip-expand-btn:hover { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.nip-expand-btn svg { width: 14px; height: 14px; display: block; }

/* 2026-06-16：展开 modal 内的 textarea（不限制高度，可手动拖拽） */
.nip-expand-modal-textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 200px;
  max-height: 60vh;
  background: #14171d;
  color: #e8ebf0;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.nip-expand-modal-textarea:focus { border-color: #4fc3f7; }
.nip-expand-modal-textarea::placeholder { color: #555a66; }

/* 信息行（模型、比例、分辨率、数量 + 发送按钮）*/
.nip-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nip-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1f232b;
  color: #aab0bc;
  /* 2026-06-16：恢复按钮边框（之前误去掉了，需要保留按钮线框）*/
  border: 1px solid #2a2e37;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  user-select: none;
  font-family: inherit;
  line-height: 1;
}
.nip-info:hover {
  background: #2a2e37;
  color: #e4e6eb;
  border-color: #3a3e47;
}
.nip-info.active {
  background: #1a3a52;
  color: #4fc3f7;
  border-color: #4fc3f7;
}
.nip-info-icon,
.nip-info-icon * {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  opacity: 0.65;
  pointer-events: none;
}
/* SVG 内部所有元素都不接收事件 */
.nip-info svg, .nip-info svg *,
.nip-send svg, .nip-send svg * {
  pointer-events: none;
}
.nip-info:hover .nip-info-icon { opacity: 1; }
.nip-info-text { line-height: 1; white-space: nowrap; }

/* 渐变发送按钮 */
.nip-send {
  margin-left: auto;
  width: 34px; height: 34px;
  border: none;
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
  color: #14161b;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}
.nip-send:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.55);
}
.nip-send:active { transform: scale(0.96); }
.nip-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.nip-send-icon { width: 16px; height: 16px; display: block; pointer-events: none; }


/* === 2026-06-28:画布左下角快捷工具栏(独立于底部 8 个按键) === */
.canvas-corner-toolbar {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
}
.cct-pill {
  position: relative;
  display: flex;
  align-items: center;
  /* 2026-06-28:4 个按钮独立,不再用 pill 底色连一起 */
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.cct-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid #2a2e37;
  background: rgba(20, 23, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #aab0bc;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cct-btn:hover { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.cct-btn.active { background: #4fc3f7; color: #0f1116; border-color: #4fc3f7; }
.cct-btn svg { display: block; pointer-events: none; flex: 0 0 auto; }
.cct-btn[data-tip] { position: relative; }
.cct-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1116;
  color: #e8ebf0;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #2a2e37;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 10001;
}
.cct-btn[data-tip]:hover::after { opacity: 1; visibility: visible; }
.cct-zoom-btn { width: auto; min-width: 36px; border-radius: 999px; padding: 0 14px; }
.cct-zoom-label { font-family: monospace; font-weight: 500; }

.cct-help-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #2a2e37;
  background: rgba(20, 23, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #aab0bc;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  position: relative;
}
.cct-help-btn:hover { background: #2a2e37; color: #4fc3f7; border-color: #4fc3f7; }
.cct-help-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1116;
  color: #e8ebf0;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #2a2e37;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 10001;
}
.cct-help-btn[data-tip]:hover::after { opacity: 1; visibility: visible; }

.cct-zoom-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(26, 29, 36, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2f343d;
  border-radius: 12px;
  padding: 6px;
  z-index: 61;
  min-width: 240px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cct-zoom-dropdown.hidden { display: none; }
/* === 2026-06-28:顶部 slider 行(实时拖动缩放) === */
.cct-zoom-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 10px;
}
.cct-zoom-slider {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #2a2e37;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.cct-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4fc3f7;
  cursor: pointer;
  border: 2px solid #14171d;
  box-shadow: 0 0 0 1px #4fc3f7;
}
.cct-zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4fc3f7;
  cursor: pointer;
  border: 2px solid #14171d;
  box-shadow: 0 0 0 1px #4fc3f7;
}
.cct-zoom-slider-val {
  color: #f0f2f5;
  font-size: 13px;
  font-weight: 500;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  min-width: 46px;
  text-align: right;
  flex: 0 0 auto;
}
/* === 2026-06-28:行 item(图标 + 文字 + 空格 + kbd + 右侧图标) === */
.cct-zoom-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #e8ebf0;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s, color 0.1s;
  font-family: inherit;
  line-height: 1.2;
}
.cct-zoom-item:hover { background: rgba(79, 195, 247, 0.12); color: #f0f2f5; }
.cct-zoom-item.active { background: #2a2e37; color: #4fc3f7; }
.cct-zi-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b909c;
  flex: 0 0 auto;
}
.cct-zi-icon svg { display: block; }
.cct-zi-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.cct-zi-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 4px;
  color: #8b909c;
  font-size: 11px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-weight: 500;
  flex: 0 0 auto;
  line-height: 1;
}
.cct-zi-icon-r {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aab0bc;
  background: #14171d;
  border: 1px solid #2a2e37;
  border-radius: 5px;
  flex: 0 0 auto;
}
.cct-zi-icon-r svg { display: block; }
.cct-zoom-sep {
  height: 1px;
  background: #2a2e37;
  margin: 4px 6px;
  flex: 0 0 auto;
}

/* === 2026-06-28:画布小地图(占位,后续接真实渲染) === */
.canvas-minimap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 200px;
  height: 140px;
  background: rgba(20, 23, 29, 0.92);
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.canvas-minimap.hidden { display: none; }
.minimap-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0d0f13;
  border-radius: 4px;
  overflow: hidden;
  color: #555a66;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === 2026-06-28:网格开关(默认开,关掉就隐藏背景点阵) === */
/* === 2026-06-28:canvas-world 必须 position: absolute,否则 JS 设的 left/top 不生效(默认 static) ===
.canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  /* width/height 由 updateCanvasView 动态设置 (= bbox + padding) */
  /* transform: scale 由 updateCanvasView 动态应用 */
}

/* === 2026-06-28:grid 开关 ===
.canvas-viewport:not(.grid-on) .canvas-bg { display: none; }
/* =====================================================================
 * 提示词工作流 (Prompt Workflow) - 2026-07-16 Phase 1
 * 完全独立的视觉系统, 主色 #5fd1ff 紫色, 跟画布样式不冲突
 * ===================================================================== */

:root {
  --pw-primary: #5fd1ff;
  --pw-primary-light: #1a2540;
  --pw-primary-dark: #2a4a7a;
  --pw-bg: #0a0a0d;
  --pw-bg-deep: #0f1116;
  --pw-card-bg: #14161b;
  --pw-card-bg-2: #1a1c22;
  --pw-border: #2a2e37;
  --pw-border-light: #1f2530;
  --pw-text: #f0f2f5;
  --pw-text-secondary: #c3c8d2;
  --pw-text-hint: #8b909c;
  --pw-text-muted: #6a7080;
  --pw-success: #4ade80;
  --pw-success-bg: #1a3320;
  --pw-error: #f44336;
  --pw-error-bg: #3a1a1a;
  --pw-warning: #fbbf24;
  --pw-warning-bg: #3a2e1a;
  --pw-purple: #a78bfa;
  --pw-purple-bg: #1f1a3a;
  --pw-cyan: #5fd1ff;
  --pw-cyan-bg: #0a1a2a;
  --pw-blue-deep: #1e3a5f;
  --pw-blue-light: #2a4a7a;
  --pw-radius: 8px;
  --pw-radius-sm: 4px;
  --pw-radius-lg: 12px;
}

.pw-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(180deg, #1a1c22 0%, #14161b 100%);
  border-bottom: 1px solid var(--pw-border);
  border-radius: 0 0 12px 12px;
}

.pw-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--pw-text);
  margin: 0;
  flex: 1;
}

.pw-toolbar-actions {
  display: flex;
  gap: 8px;
}

.pw-btn {
  padding: 9px 16px;
  border-radius: var(--pw-radius);
  border: 1px solid var(--pw-border);
  background: var(--pw-card-bg);
  color: var(--pw-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
  border: 1px solid var(--pw-border);
  background: var(--pw-card-bg);
  color: var(--pw-text);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.pw-btn:hover { background: #1a2540; border-color: #5fd1ff; color: #5fd1ff; }
.pw-btn-primary {
  background: var(--pw-primary);
  color: #0a0a0d;
  border-color: var(--pw-primary);
  font-weight: 600;
}
.pw-btn-primary:hover { background: var(--pw-primary-dark); border-color: var(--pw-primary-dark); }
.pw-btn-secondary {
  background: var(--pw-card-bg-2);
  color: var(--pw-text-secondary);
  border-color: var(--pw-border);
}
.assets-video-thumb-wrap { overflow: hidden; }
.assets-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #090b0f;
  pointer-events: none;
}
.assets-video-play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
  color: #fff;
  background: rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  pointer-events: none;
}
.assets-card:hover .assets-video-play-mark { opacity: 0; }
.asset-video-preview-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; }
.asset-video-preview-mask { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.asset-video-preview-panel { position: relative; z-index: 1; width: min(920px, 88vw); max-height: 88vh; padding: 12px; border: 1px solid #303642; border-radius: 12px; background: #11141a; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.asset-video-preview-panel video { width: 100%; max-height: calc(88vh - 58px); display: block; object-fit: contain; background: #050608; border-radius: 8px; }
.asset-video-preview-head { height: 34px; display: flex; align-items: center; gap: 10px; color: #e8ebf0; font-size: 13px; }
.asset-video-preview-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-video-preview-head span { margin-left: auto; color: #7f8795; font-size: 12px; }
.asset-video-preview-head button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #b8bec9; font-size: 22px; cursor: pointer; }
.asset-video-preview-head button:hover { background: #252a34; color: #fff; }
.pw-btn-secondary:hover {
  background: var(--pw-card-bg);
  color: var(--pw-text);
  border-color: var(--pw-border-light);
}
.pw-btn-block { width: 100%; margin-top: 8px; }
.pw-btn-small { padding: 4px 8px; font-size: 11px; }
.pw-btn-tiny { padding: 2px 6px; font-size: 10px; }

.pw-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 24px;
}

.pw-card {
  background: linear-gradient(180deg, #1a1c22 0%, #14161b 100%);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.pw-card:hover {
  border-color: var(--pw-cyan);
  box-shadow: 0 4px 20px rgba(95, 209, 255, 0.15);
  transform: translateY(-2px);
}
.pw-card-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.pw-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--pw-text);
  margin-bottom: 6px;
  word-break: break-word;
}
.pw-card-meta {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: var(--pw-text-hint);
  margin-bottom: 12px;
}
.pw-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--pw-border);
}
.pw-card-status { font-weight: 600; }
.pw-card-time { color: var(--pw-text-hint); }
.pw-card-del {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  padding: 4px;
}
.pw-card:hover .pw-card-del { opacity: 1; }

.pw-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--pw-text-hint);
}
.pw-empty-icon { font-size: 64px; margin-bottom: 16px; }
.pw-empty-title { font-size: 18px; color: var(--pw-text-secondary); margin-bottom: 8px; }
.pw-empty-hint { font-size: 13px; color: var(--pw-text-hint); }
.pw-empty-inline {
  text-align: center;
  padding: 32px 16px;
  color: var(--pw-text-hint);
  font-size: 13px;
}
.pw-empty-inline-sm {
  text-align: center;
  padding: 12px;
  color: var(--pw-text-hint);
  font-size: 11px;
  font-style: italic;
}

/* 三栏布局 */
.pw-3col {
  display: grid;
  grid-template-columns: 280px 440px 1fr;
  gap: 16px;
  padding: 16px 24px;
  min-height: calc(100vh - 200px);
}
.pw-col {
  background: var(--pw-card-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pw-col-header {
  padding: 10px 14px;
  background: var(--pw-bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  border-bottom: 1px solid var(--pw-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pw-col-header-spacer { flex: 1; }
.pw-badge {
  background: var(--pw-primary-light);
  color: var(--pw-primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ① 源文本 */
.pw-col-source { padding: 0; }
.pw-file-tree { padding: 8px; flex: 0 0 auto; }
.pw-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--pw-radius-sm);
  margin-bottom: 4px;
  background: var(--pw-bg);
}
.pw-file-icon { font-size: 20px; }
.pw-file-name {
  font-size: 12px;
  color: var(--pw-text);
  word-break: break-word;
}
.pw-file-meta {
  font-size: 10px;
  color: var(--pw-text-hint);
}
.pw-source-actions {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--pw-border);
}
.pw-source-preview {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--pw-text-secondary);
  font-family: 'Courier New', monospace;
}
.pw-source-preview-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--pw-text-hint);
}
.pw-source-preview-empty > div:first-child { font-size: 48px; margin-bottom: 12px; }

/* ② AI 流水线 */
.pw-col-pipeline { padding: 0; }
.pw-pipeline-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.pw-pipeline-node {
  border: 2px solid var(--pw-primary-light);
  border-radius: var(--pw-radius);
  padding: 10px;
  margin-bottom: 8px;
  background: var(--pw-card-bg);
}
.pw-pipeline-node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pw-pipeline-node-index {
  background: var(--pw-primary);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.pw-pipeline-node-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-primary);
  flex: 1;
}
.pw-pipeline-node-status {
  font-size: 11px;
  font-weight: 600;
}
.pw-pipeline-node-meta {
  font-size: 11px;
  color: var(--pw-text-hint);
}
.pw-pipeline-divider { border-top: 1px solid var(--pw-border); margin: 12px 0; }
.pw-pipeline-logs-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--pw-text-secondary);
  padding: 0 12px 6px;
}
.pw-pipeline-logs {
  background: #1e1e1e;
  color: #888;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 8px 12px;
  height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--pw-border);
}
.pw-log-line { line-height: 1.5; word-break: break-word; }

/* ③ 分镜卡片 */
.pw-col-stories { padding: 0; }
.pw-storyboard {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-content: start;
}
.pw-story-card {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 10px;
  background: var(--pw-card-bg);
}
.pw-story-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--pw-text-hint);
  margin-bottom: 6px;
}
.pw-story-card-index { color: var(--pw-primary); font-weight: 600; }
.pw-story-card-duration { background: var(--pw-bg); padding: 1px 6px; border-radius: 8px; }
.pw-story-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  margin-bottom: 4px;
}
.pw-story-card-desc {
  font-size: 11px;
  color: var(--pw-text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}
.pw-story-card-prompt {
  font-size: 10px;
  color: var(--pw-text-hint);
  font-family: 'Courier New', monospace;
  background: var(--pw-bg);
  padding: 4px 6px;
  border-radius: var(--pw-radius-sm);
  margin-bottom: 8px;
}
.pw-story-card-actions {
  display: flex;
  gap: 4px;
}
.pw-story-card-actions .pw-btn { flex: 1; }

/* AI 模型配置 modal */
.pw-settings-content { max-width: 560px; }
.pw-info-box {
  background: var(--pw-primary-light);
  border-left: 4px solid var(--pw-primary);
  padding: 12px 16px;
  border-radius: var(--pw-radius-sm);
  margin-bottom: 16px;
}
.pw-info-box strong { color: var(--pw-primary); display: block; margin-bottom: 4px; }
.pw-info-box p { margin: 4px 0; font-size: 12px; color: var(--pw-text-secondary); }
.pw-required { color: var(--pw-error); }
.pw-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pw-border);
}
.pw-hint { font-size: 11px; color: var(--pw-text-hint); margin-top: 4px; }

/* =====================================================================
 * 提示词工作流 · 单集详情视图(深色 + 蓝色 · 2026-07-19 重设计)
 * ===================================================================== */

/* === 主工作区布局 === */
.pw-workspace-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--pw-bg);
}
.pw-ws-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--pw-bg-deep);
  border-bottom: 1px solid var(--pw-border);
}
.pw-ws-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--pw-text);
  margin: 0;
}
.pw-ws-meta {
  font-size: 11px;
  color: var(--pw-text-hint);
}
.pw-ws-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.pw-ws-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.pw-ws-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--pw-bg);
}
.pw-ws-ai {
  width: 380px;
  background: var(--pw-bg-deep);
  border-left: 1px solid var(--pw-border);
  display: flex;
  flex-direction: column;
}

/* === 区段(纵向三段) === */
.pw-section {
  background: linear-gradient(180deg, rgba(26,28,34,0.85) 0%, rgba(20,22,27,0.92) 100%);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.pw-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--pw-bg-deep);
  border-bottom: 1px solid var(--pw-border);
}
.pw-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-cyan);
  margin: 0;
}
.pw-section-hint {
  font-size: 11px;
  color: var(--pw-text-hint);
}
.pw-section-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* === 区段 1: 小说导入 === */
.pw-novel-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  padding: 18px;
}
.pw-novel-input {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
}
.pw-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--pw-text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.pw-novel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pw-novel-config {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 10px;
  align-items: center;
}
.pw-novel-config label {
  font-size: 11px;
  color: var(--pw-text-secondary);
}
.pw-progress {
  height: 6px;
  background: var(--pw-bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.pw-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pw-cyan), var(--pw-blue-light));
  border-radius: 3px;
}
.pw-input-sm {
  padding: 6px 10px;
  background: var(--pw-bg-deep);
  border: 1px solid var(--pw-border);
  border-radius: 4px;
  color: var(--pw-text);
  font-size: 11px;
  outline: none;
}
.pw-input-sm:focus {
  border-color: var(--pw-cyan);
}
.pw-novel-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

/* === 区段 2: 分集剧本 === */
.pw-ep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 18px;
  background: var(--pw-bg);
  border-bottom: 1px solid var(--pw-border);
}
.pw-ep-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 44px;
  padding: 0 10px;
  background: var(--pw-bg-deep);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  color: var(--pw-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.pw-ep-tab:hover {
  border-color: var(--pw-cyan);
}
.pw-ep-tab.active {
  background: linear-gradient(135deg, var(--pw-blue-light), var(--pw-blue-deep));
  border-color: var(--pw-cyan);
  color: var(--pw-cyan);
  font-weight: 600;
}
.pw-ep-tab.done {
  background: var(--pw-success-bg);
  border-color: var(--pw-success);
  color: var(--pw-success);
}
.pw-ep-tab-num {
  font-size: 14px;
  font-weight: 600;
}
.pw-ep-tab-status {
  font-size: 9px;
  margin-top: 2px;
  opacity: 0.8;
}
.pw-script-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  padding: 18px;
}
.pw-script-edit {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
}
.pw-script-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--pw-bg-deep);
  border-bottom: 1px solid var(--pw-border);
  font-size: 11px;
  color: var(--pw-text-secondary);
}
.pw-script-info {
  font-weight: 600;
  color: var(--pw-text);
}
.pw-script-stats {
  color: var(--pw-text-hint);
}
.pw-script-stats b {
  color: var(--pw-cyan);
  font-weight: 600;
}
.pw-script-textarea {
  width: 100%;
  min-height: 320px;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--pw-text);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.pw-script-meta {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 14px;
}
.pw-script-meta h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-text);
  margin: 0 0 10px 0;
}
.pw-script-meta h4:not(:first-child) {
  margin-top: 14px;
}
.pw-btn-block {
  width: 100%;
  margin-bottom: 6px;
  justify-content: center;
}
.pw-hr {
  border: none;
  border-top: 1px solid var(--pw-border);
  margin: 14px 0;
}
.pw-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  color: var(--pw-text-secondary);
}
.pw-meta-row > span:last-child {
  color: var(--pw-cyan);
}
.pw-meta-tags {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.pw-meta-tag {
  display: inline-block;
  padding: 2px 6px;
  background: var(--pw-purple-bg);
  color: var(--pw-purple);
  border-radius: 3px;
  font-size: 10px;
  margin-left: 4px;
}

/* === 区段 3: 提示词成果 === */
.pw-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
  padding: 18px;
}
.pw-prompt-card {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 14px;
  border-left: 3px solid var(--pw-cyan);
  transition: all 0.15s;
}
.pw-prompt-card:hover {
  border-color: var(--pw-cyan);
}
.pw-prompt-card.pw-type-scene { border-left-color: var(--pw-cyan); }
.pw-prompt-card.pw-type-character { border-left-color: var(--pw-purple); }
.pw-prompt-card.pw-type-prop { border-left-color: var(--pw-warning); }
.pw-prompt-card.pw-type-video { border-left-color: var(--pw-cyan); border-color: var(--pw-cyan); }

.pw-prompt-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 10px;
}
.pw-prompt-type {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}
.pw-prompt-type.scene { background: var(--pw-cyan-bg); color: var(--pw-cyan); }
.pw-prompt-type.character { background: var(--pw-purple-bg); color: var(--pw-purple); }
.pw-prompt-type.prop { background: var(--pw-warning-bg); color: var(--pw-warning); }
.pw-prompt-type.video { background: var(--pw-cyan-bg); color: var(--pw-cyan); }
.pw-prompt-ep {
  font-size: 9px;
  padding: 2px 6px;
  background: var(--pw-blue-deep);
  color: var(--pw-cyan);
  border-radius: 3px;
}
.pw-prompt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  margin: 4px 0;
}
.pw-prompt-meta {
  font-size: 10px;
  color: var(--pw-text-hint);
  margin-bottom: 8px;
}
.pw-prompt-content {
  font-size: 11px;
  line-height: 1.5;
  color: var(--pw-text-secondary);
  margin-bottom: 8px;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pw-prompt-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--pw-cyan-bg);
  border: 1px solid var(--pw-blue-deep);
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 11px;
}
.pw-prompt-duration b {
  color: var(--pw-cyan);
  font-weight: 700;
}
.pw-prompt-duration span {
  color: var(--pw-text-secondary);
  font-size: 10px;
}
.pw-prompt-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pw-prompt-actions .pw-btn {
  font-size: 10px;
  padding: 3px 8px;
}

/* === 右侧 AI 面板 === */
.pw-ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--pw-bg);
  border-bottom: 1px solid var(--pw-border);
}
.pw-ai-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
}
.pw-ai-status {
  margin-left: auto;
  font-size: 10px;
  color: var(--pw-success);
}
.pw-ai-binding {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--pw-bg);
  border-bottom: 1px solid var(--pw-border);
  font-size: 11px;
}
.pw-ai-binding-label {
  color: var(--pw-text-hint);
}
.pw-ai-binding-target {
  color: var(--pw-cyan);
  font-weight: 600;
}
.pw-ai-secret {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--pw-cyan-bg);
  border-bottom: 1px solid var(--pw-blue-deep);
  font-size: 11px;
  flex-wrap: wrap;
}
.pw-ai-secret-label {
  color: var(--pw-cyan);
  font-weight: 600;
}
.pw-ai-secret-hint {
  color: var(--pw-text-secondary);
  font-size: 10px;
}
.pw-btn-secret {
  background: var(--pw-blue-light) !important;
  border-color: var(--pw-cyan) !important;
  color: var(--pw-cyan) !important;
}
.pw-ai-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pw-ai-msg {
  padding: 10px 12px;
  border-radius: var(--pw-radius);
  font-size: 12px;
  line-height: 1.5;
}
.pw-ai-msg.user {
  background: var(--pw-cyan-bg);
  border: 1px solid var(--pw-blue-deep);
  align-self: flex-end;
  max-width: 90%;
}
.pw-ai-msg.ai {
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
}
.pw-ai-msg-head {
  font-size: 10px;
  margin-bottom: 4px;
  opacity: 0.8;
}
.pw-ai-msg.user .pw-ai-msg-head { color: var(--pw-cyan); }
.pw-ai-msg.ai .pw-ai-msg-head { color: var(--pw-cyan); }
.pw-ai-msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.pw-ai-input {
  border-top: 1px solid var(--pw-border);
  padding: 12px 16px;
  background: var(--pw-bg);
}
.pw-ai-input-tools {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.pw-ai-input-text {
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  background: var(--pw-bg-deep);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  color: var(--pw-text);
  font-size: 12px;
  resize: vertical;
  outline: none;
  margin-bottom: 8px;
}
.pw-ai-input-text:focus {
  border-color: var(--pw-cyan);
}

/* === 弹窗(记住这些 / AI 修改确认) === */
.pw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.pw-modal {
  background: linear-gradient(180deg, #1c1f26, #14161b);
  border: 2px solid var(--pw-cyan);
  border-radius: 14px;
  min-width: 520px;
  max-width: 720px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pw-modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--pw-bg);
  border-bottom: 1px solid var(--pw-border);
}
.pw-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pw-cyan);
  margin: 0;
  flex: 1;
}
.pw-modal-close {
  background: transparent;
  border: none;
  color: var(--pw-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
}
.pw-modal-close:hover { color: var(--pw-text); }
.pw-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}
.pw-modal-row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
}
.pw-modal-row-label {
  color: var(--pw-text-hint);
  min-width: 80px;
}
.pw-modal-row-value {
  color: var(--pw-text);
  font-weight: 600;
}
.pw-modal-row-value.accent { color: var(--pw-cyan); }
.pw-modal-content-preview {
  padding: 10px 12px;
  background: var(--pw-cyan-bg);
  border: 1px solid var(--pw-blue-deep);
  border-radius: var(--pw-radius-sm);
  margin-top: 8px;
  font-size: 12px;
  color: var(--pw-text);
}
.pw-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--pw-border);
  background: var(--pw-bg);
  justify-content: flex-end;
}

/* === 通用按钮扩展 === */
.pw-btn-lg {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 600;
}
.pw-btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}
.pw-btn-ghost {
  background: transparent;
  border: none;
  color: var(--pw-text-secondary);
  padding: 4px 8px;
  border-radius: var(--pw-radius-sm);
}
.pw-btn-ghost:hover {
  background: var(--pw-bg-deep);
  color: var(--pw-text);
}



/* ════════ 提示词工作流 v2 · 冷灰暗金 (2026-07-20, 隔离追加, 不删旧 pw-* 样式) ════════ */

#pw2-root {
  --pw2-gold: #C6A15B;
  --pw2-gold-l: #D6B573;
  --pw2-gold-d: #A9853F;
  --pw2-gold-glow: rgba(198,161,91,0.18);
  --pw2-cyan: #4FD1C5;
  --pw2-cyan-l: #6FE0D5;
  --pw2-cyan-glow: rgba(79,209,197,0.16);
  --pw2-bg: #0A0A0D;
  --pw2-sunken: #08080B;
  --pw2-s1: #131318;
  --pw2-s2: #1A1B21;
  --pw2-s3: #22242B;
  --pw2-bs: #2A2C33;
  --pw2-bd: #3A3D45;
  --pw2-tp: #F2F3F5;
  --pw2-ts: #A8ACB5;
  --pw2-tt: #6E727C;
  --pw2-td: #4A4D55;
  --pw2-success: #6FD3A3;
  --pw2-success-bg: rgba(63,178,127,0.14);
  --pw2-error: #E88484;
  --pw2-error-bg: rgba(217,87,87,0.14);
  --pw2-mono: "JetBrains Mono","Cascadia Code","SF Mono",Consolas,monospace;
  --pw2-r-xs: 4px; --pw2-r-sm: 6px; --pw2-r-md: 10px; --pw2-r-lg: 14px;
  --pw2-sh-md: 0 4px 14px rgba(0,0,0,0.38);
  --pw2-sh-lg: 0 10px 34px rgba(0,0,0,0.50);
  --pw2-sh-gold: 0 0 0 3px rgba(198,161,91,0.28);
}

#pw2-root * { box-sizing: border-box; margin: 0; padding: 0; }
#pw2-root .pw2-hidden { display: none !important; }
#pw2-root .pw2-tp { color: var(--pw2-tp); }
#pw2-root .pw2-ts { color: var(--pw2-ts); }
#pw2-root .pw2-tt { color: var(--pw2-tt); }
#pw2-root .pw2-gold-text { color: var(--pw2-gold-l); }
#pw2-root .pw2-caption { font-size: 12px; line-height: 18px; }
#pw2-root .pw2-body { font-size: 14px; line-height: 22px; }
#pw2-root .pw2-mono { font-family: var(--pw2-mono); }
#pw2-root .pw2-h1 { font-size: 22px; font-weight: 700; color: var(--pw2-tp); line-height: 30px; }
#pw2-root .pw2-h2 { font-size: 18px; font-weight: 600; color: var(--pw2-tp); line-height: 26px; }
#pw2-root .pw2-h3 { font-size: 15px; font-weight: 600; color: var(--pw2-tp); line-height: 22px; }

#pw2-root .pw2-topbar { height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(10,10,13,0.80); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--pw2-bs); z-index: 10; }
#pw2-root .pw2-topbar-left { display: flex; align-items: baseline; gap: 12px; }
#pw2-root .pw2-topbar-sub { font-size: 12px; color: var(--pw2-tt); }
#pw2-root .pw2-topbar-right { display: flex; align-items: center; gap: 12px; }
.pw2-ai-create-wrap { position: relative; }
#pw2-root .pw2-ai-create-caret { font-size: 11px; opacity: .75; margin-left: 3px; }
#pw2-root .pw2-ai-create-menu { position: absolute; top: 34px; right: 0; z-index: 80; width: 190px; padding: 7px; border: 1px solid var(--pw2-bs); border-radius: 9px; background: #18191f; box-shadow: 0 16px 42px rgba(0,0,0,.52); }
#pw2-root .pw2-ai-create-menu button { width: 100%; height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 6px; background: transparent; color: var(--pw2-ts); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
#pw2-root .pw2-ai-create-menu button:hover { background: var(--pw2-s3); color: var(--pw2-tp); }
#pw2-root .pw2-ai-create-menu small { color: var(--pw2-tt); font-size: 10px; }
#pw2-root .pw2-ai-create-sep { height: 1px; margin: 5px 4px; background: var(--pw2-bs); }
#pw2-root .pw2-shelf-tabs { height: 48px; flex-shrink: 0; display: flex; align-items: flex-end; gap: 26px; padding: 0 32px; border-bottom: 1px solid var(--pw2-bs); background: rgba(13,13,17,.55); }
#pw2-root .pw2-shelf-tabs button { position: relative; height: 48px; padding: 0 2px; border: 0; background: transparent; color: var(--pw2-tt); font-size: 14px; font-weight: 600; cursor: pointer; }
#pw2-root .pw2-shelf-tabs button:hover { color: var(--pw2-ts); }
#pw2-root .pw2-shelf-tabs button.active { color: var(--pw2-tp); }
#pw2-root .pw2-shelf-tabs button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--pw2-gold); }
#pw2-root .pw2-shelf-loading { padding: 60px 0; color: var(--pw2-tt); text-align: center; }
#pw2-root .pw2-shelf-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
#pw2-root .pw2-shelf-summary strong { color: var(--pw2-tp); font-size: 16px; }
#pw2-root .pw2-shelf-summary span { color: var(--pw2-tt); font-size: 12px; }
#pw2-root .pw2-book-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 24px; }
#pw2-root .pw2-book-card { min-width: 0; cursor: pointer; }
#pw2-root .pw2-book-cover { position: relative; aspect-ratio: 3/4; min-height:340px; padding: 24px 18px 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: radial-gradient(circle at 72% 18%,rgba(198,161,91,.27),transparent 30%),linear-gradient(155deg,#24212a 0%,#15161c 52%,#292016 100%); box-shadow: 0 10px 28px rgba(0,0,0,.34); transition: transform .18s,border-color .18s; }
#pw2-root .pw2-book-card:hover .pw2-book-cover { transform: translateY(-3px); border-color: rgba(198,161,91,.55); }
#pw2-root .pw2-book-cover::before { content:''; position:absolute; inset:10px; border:1px solid rgba(198,161,91,.16); border-radius:6px; pointer-events:none; }
#pw2-root .pw2-book-cover-mark { position:absolute; left:18px; top:18px; color:var(--pw2-gold-l); font-size:10px; letter-spacing:2px; }
#pw2-root .pw2-book-bottom { position:relative; z-index:2; padding:14px 2px 2px; background:linear-gradient(0deg,rgba(7,7,10,.72),transparent); }
#pw2-root .pw2-book-cover strong { display:block; color:#f5ead4; font-size:15px; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#pw2-root .pw2-book-cover small { display:block; margin-top:5px; color:rgba(255,255,255,.58); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#pw2-root .pw2-book-cover em { position:absolute; right:12px; top:12px; padding:3px 7px; border-radius:10px; background:rgba(72,148,108,.82); color:#fff; font-size:10px; font-style:normal; }
#pw2-root .pw2-book-hover { position:absolute; z-index:4; inset:0; padding:24px 20px; overflow:auto; opacity:0; transform:translateY(8px); pointer-events:none; background:linear-gradient(155deg,rgba(55,29,18,.97),rgba(24,19,20,.98)); transition:opacity .18s,transform .18s; }
#pw2-root .pw2-book-card:hover .pw2-book-hover { opacity:1; transform:translateY(0); }
#pw2-root .pw2-book-hover h3 { margin:0 0 20px; color:#fff1df; font-size:16px; line-height:1.55; }
#pw2-root .pw2-book-hover label { display:block; margin-top:13px; color:rgba(255,255,255,.45); font-size:10px; }
#pw2-root .pw2-book-hover p { margin:4px 0 0; color:#f1e7de; font-size:12px; line-height:1.55; }
#pw2-root .pw2-book-hover-desc { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
#pw2-root .pw2-book-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
#pw2-root .pw2-book-tags span { padding:3px 9px; border-radius:12px; background:rgba(255,255,255,.11); color:#f5e8dc; font-size:10px; }
#pw2-root .pw2-reader-loading { height:100%; display:grid; place-items:center; color:var(--pw2-tt); }
#pw2-root .pw2-reader-page { height:100%; min-height:0; display:grid; grid-template-columns:360px minmax(0,1fr); gap:32px; padding:24px; background:#090a0c; color:#f4f4f5; }
#pw2-root .pw2-reader-side { min-height:0; overflow-y:auto; padding:8px 12px 20px 0; }
#pw2-root .pw2-reader-back { margin-bottom:18px; border:0; background:transparent; color:#a1a1aa; cursor:pointer; }
#pw2-root .pw2-reader-back:hover { color:#fff; }
#pw2-root .pw2-reader-cover { width:132px; aspect-ratio:3/4; padding:15px; display:flex; flex-direction:column; justify-content:space-between; border-radius:9px; background:radial-gradient(circle at 70% 15%,rgba(198,161,91,.42),transparent 32%),linear-gradient(155deg,#4a2419,#191316 62%,#8f4f25); box-shadow:0 12px 30px rgba(0,0,0,.4); }
#pw2-root .pw2-reader-cover span { color:#e9c995; font-size:10px; }
#pw2-root .pw2-reader-cover strong { color:#fff4df; font-size:17px; line-height:1.45; }
#pw2-root .pw2-reader-side h1 { margin:15px 0 6px; font-size:20px; line-height:1.5; }
#pw2-root .pw2-reader-author,#pw2-root .pw2-reader-category { margin:4px 0; color:#b4c5cf; font-size:12px; }
#pw2-root .pw2-reader-side h2 { margin:24px 0 10px; font-size:16px; }
#pw2-root .pw2-reader-summary { margin:0; max-height:44px; overflow:hidden; color:#cbd5e1; font-size:12px; line-height:1.8; }
#pw2-root .pw2-reader-summary.expanded { max-height:none; }
#pw2-root .pw2-reader-expand { width:100%; height:30px; margin-top:8px; border:0; border-radius:6px; background:#17181d; color:#e5e7eb; cursor:pointer; }
#pw2-root .pw2-reader-directory { max-height:300px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
#pw2-root .pw2-reader-dir-item { width:100%; min-height:40px; padding:0 10px; display:flex; align-items:center; justify-content:space-between; border:0; border-radius:6px; background:transparent; color:#a1a1aa; cursor:pointer; text-align:left; }
#pw2-root .pw2-reader-dir-item:hover,#pw2-root .pw2-reader-dir-item.active { background:#1a1b20; color:#fff; }
#pw2-root .pw2-reader-dir-item i { color:#71717a; font-style:normal; }
#pw2-root .pw2-reader-edit { width:100%; height:36px; margin-top:16px; border:1px solid rgba(198,161,91,.45); border-radius:7px; background:rgba(198,161,91,.1); color:var(--pw2-gold-l); cursor:pointer; }
#pw2-root .pw2-reader-main { min-width:0; min-height:0; padding:20px 32px; display:flex; flex-direction:column; border:1px solid #292a30; border-radius:14px; background:#0e0f11; }
#pw2-root .pw2-reader-main header { height:46px; flex-shrink:0; display:flex; align-items:flex-start; justify-content:space-between; }
#pw2-root .pw2-reader-main header h2 { margin:0; font-size:21px; }
#pw2-root .pw2-reader-main header button { border:0; background:transparent; color:#cbd5e1; cursor:pointer; }
#pw2-root .pw2-reader-main header button:disabled { opacity:.35; cursor:default; }
#pw2-root .pw2-reader-main article { flex:1; min-height:0; overflow-y:auto; padding-right:14px; color:#f3f4f6; font-size:15px; line-height:1.78; white-space:normal; }
@media (max-width:900px) { #pw2-root .pw2-reader-page { grid-template-columns:260px minmax(0,1fr); gap:16px; padding:16px; } #pw2-root .pw2-reader-main { padding:18px; } }
#pw2-root .pw2-book-info { padding:10px 2px 0; }
#pw2-root .pw2-book-info h3 { overflow:hidden; color:var(--pw2-tp); font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
#pw2-root .pw2-book-info div { margin-top:6px; display:flex; gap:8px; color:var(--pw2-tt); font-size:10px; }
#pw2-root .pw2-book-info time { display:block; margin-top:5px; color:var(--pw2-td); font-size:10px; }
#pw2-root .pw2-license-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
#pw2-root .pw2-license-head h3 { color:var(--pw2-tp); font-size:16px; }
#pw2-root .pw2-license-head p { margin-top:4px; color:var(--pw2-tt); font-size:12px; }
#pw2-root .pw2-license-filter { display:flex; gap:6px; }
#pw2-root .pw2-license-filter button { height:28px; padding:0 12px; border:1px solid var(--pw2-bs); border-radius:6px; background:var(--pw2-s1); color:var(--pw2-tt); cursor:pointer; }
#pw2-root .pw2-license-filter button.active { border-color:rgba(198,161,91,.45); color:var(--pw2-gold-l); background:var(--pw2-gold-glow); }

#pw2-root .pw2-cue-bar { height: 36px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 32px; background: var(--pw2-gold-glow); border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-cue-icon { color: var(--pw2-gold-l); }
#pw2-root .pw2-cue-text { font-size: 12px; color: var(--pw2-ts); }

#pw2-root .pw2-view { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#pw2-root .pw2-projects-scroll { flex: 1; overflow-y: auto; padding: 20px 32px 24px; }
#pw2-root .pw2-projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
#pw2-root .pw2-proj-card { height: 200px; background: rgba(19,19,24,0.72); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--pw2-r-md); box-shadow: var(--pw2-sh-md); padding: 20px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: border-color 160ms, box-shadow 160ms; }
#pw2-root .pw2-proj-card:hover { border-color: var(--pw2-bd); box-shadow: var(--pw2-sh-lg); }
#pw2-root .pw2-proj-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
#pw2-root .pw2-proj-name { font-size: 15px; font-weight: 600; color: var(--pw2-tp); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
#pw2-root .pw2-proj-time { font-size: 12px; color: var(--pw2-tt); margin-top: 2px; }
#pw2-root .pw2-proj-desc { font-size: 14px; color: var(--pw2-ts); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#pw2-root .pw2-proj-foot { display: flex; align-items: center; justify-content: space-between; }
#pw2-root .pw2-proj-stats { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--pw2-tt); }
#pw2-root .pw2-proj-progress { height: 6px; border-radius: 999px; background: var(--pw2-s2); overflow: hidden; margin-top: 4px; }
#pw2-root .pw2-proj-progress-fill { height: 100%; border-radius: 999px; background: var(--pw2-gold); transition: width 240ms; }

#pw2-root .pw2-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; gap: 4px; }
#pw2-root .pw2-empty-icon { font-size: 32px; margin-bottom: 16px; }
#pw2-root .pw2-empty-title { font-size: 14px; color: var(--pw2-ts); margin-bottom: 4px; }
#pw2-root .pw2-empty-hint { font-size: 12px; color: var(--pw2-tt); margin-bottom: 16px; }

#pw2-root .pw2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; outline: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; height: 36px; padding: 0 16px; border-radius: var(--pw2-r-sm); transition: background 160ms, border-color 160ms, transform 120ms, color 160ms; white-space: nowrap; user-select: none; }
#pw2-root .pw2-btn:active { transform: translateY(1px); }
#pw2-root .pw2-btn:focus-visible { box-shadow: var(--pw2-sh-gold); }
#pw2-root .pw2-btn-primary { background: var(--pw2-gold); color: var(--pw2-bg); }
#pw2-root .pw2-btn-primary:hover { background: var(--pw2-gold-l); }
#pw2-root .pw2-btn-primary:active { background: var(--pw2-gold-d); }
#pw2-root .pw2-btn-primary:disabled { background: rgba(198,161,91,0.3); color: var(--pw2-gold-d); cursor: not-allowed; }
#pw2-root .pw2-btn-sec { background: var(--pw2-s2); color: var(--pw2-tp); border: 1px solid var(--pw2-bs); }
#pw2-root .pw2-btn-sec:hover { background: var(--pw2-s3); border-color: var(--pw2-bd); }
#pw2-root .pw2-btn-ghost { background: transparent; color: var(--pw2-ts); }
#pw2-root .pw2-btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--pw2-tp); }
#pw2-root .pw2-btn-sm { height: 28px; padding: 0 12px; font-size: 13px; font-weight: 500; }
#pw2-root .pw2-btn-lg { height: 44px; padding: 0 20px; }
#pw2-root .pw2-btn-icon { width: 26px; height: 26px; padding: 0; font-size: 12px; }

#pw2-root .pw2-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid; white-space: nowrap; }
#pw2-root .pw2-tag-default { background: var(--pw2-s2); color: var(--pw2-ts); border-color: var(--pw2-bs); }
#pw2-root .pw2-tag-gold { background: var(--pw2-gold-glow); color: var(--pw2-gold-l); border-color: rgba(198,161,91,0.3); }
#pw2-root .pw2-tag-cyan { background: var(--pw2-cyan-glow); color: var(--pw2-cyan-l); border-color: rgba(79,209,197,0.3); }
#pw2-root .pw2-tag-success { background: var(--pw2-success-bg); color: var(--pw2-success); border-color: rgba(63,178,127,0.3); }
#pw2-root .pw2-tag-warning { background: rgba(217,164,65,0.14); color: #E8BE6E; border-color: rgba(217,164,65,0.3); }

#pw2-root .pw2-ws-tabs { height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: rgba(13,13,17,0.5); border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-tab-group { display: flex; align-items: center; gap: 4px; }
#pw2-root .pw2-tab { position: relative; height: 48px; padding: 0 16px; border: none; background: transparent; color: var(--pw2-ts); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: color 160ms; font-family: inherit; }
#pw2-root .pw2-tab:hover { color: var(--pw2-tp); }
#pw2-root .pw2-tab.active { color: var(--pw2-tp); }
#pw2-root .pw2-tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--pw2-gold); }
#pw2-root .pw2-tab-center { display: flex; align-items: center; gap: 8px; }
#pw2-root .pw2-tab-sep { color: var(--pw2-tt); }
#pw2-root .pw2-tab-right { display: flex; align-items: center; gap: 8px; }

#pw2-root .pw2-ws-body { flex: 1; display: flex; overflow: hidden; }
#pw2-root .pw2-ep-sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid var(--pw2-bs); background: rgba(10,10,13,0.5); display: flex; flex-direction: column; overflow: hidden; }
#pw2-root .pw2-ep-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-ep-list { flex: 1; overflow-y: auto; padding: 8px; }
#pw2-root .pw2-ep-item { position: relative; width: 100%; height: 40px; padding: 0 12px; border: none; background: transparent; color: var(--pw2-ts); font-size: 14px; font-family: inherit; cursor: pointer; border-radius: var(--pw2-r-sm); display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; transition: background 120ms, color 120ms; }
#pw2-root .pw2-ep-item:hover { background: rgba(255,255,255,0.05); color: var(--pw2-tp); }
#pw2-root .pw2-ep-item.active { background: var(--pw2-gold-glow); color: var(--pw2-tp); }
#pw2-root .pw2-ep-item.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--pw2-gold); }
#pw2-root .pw2-ep-st-done { color: var(--pw2-success); }
#pw2-root .pw2-ep-st-running { color: var(--pw2-cyan-l); animation: pw2-pulse 1200ms ease-in-out infinite; }
#pw2-root .pw2-ep-st-pending { color: var(--pw2-tt); }
#pw2-root .pw2-ep-st-waiting { color: var(--pw2-td); }
#pw2-root .pw2-ep-arrow { color: var(--pw2-gold-l); font-size: 12px; }
@keyframes pw2-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

#pw2-root .pw2-content { flex: 1; overflow: hidden; position: relative; }
#pw2-root .pw2-page { height: 100%; display: flex; flex-direction: column; }
#pw2-root .pw2-page:not(.pw2-hidden) { animation: pw2-fade 160ms cubic-bezier(0.4,0,0.2,1); }
#pw2-root .pw2-page-scroll { flex: 1; overflow-y: auto; padding: 24px 24px 100px; }
@keyframes pw2-fade { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

#pw2-root .pw2-card { background: rgba(19,19,24,0.72); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--pw2-r-md); box-shadow: var(--pw2-sh-md); padding: 20px; margin-bottom: 20px; }
#pw2-root .pw2-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
#pw2-root .pw2-card-title-row { display: flex; align-items: center; gap: 12px; }
#pw2-root .pw2-card-actions { display: flex; align-items: center; gap: 4px; }
#pw2-root .pw2-card-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }

#pw2-root .pw2-text-block { background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 16px; font-size: 14px; line-height: 22px; color: var(--pw2-tp); white-space: pre-wrap; word-break: break-word; min-height: 60px; }
#pw2-root .pw2-textarea { width: 100%; background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px 14px; color: var(--pw2-tp); font-family: inherit; font-size: 14px; line-height: 22px; outline: none; resize: vertical; transition: border-color 160ms, box-shadow 160ms; }
#pw2-root .pw2-textarea:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-textarea:focus { border-color: var(--pw2-gold); box-shadow: var(--pw2-sh-gold); }
#pw2-root .pw2-textarea::placeholder { color: var(--pw2-tt); }
#pw2-root .pw2-textarea-mono { font-family: var(--pw2-mono); font-size: 13px; line-height: 21px; }
#pw2-root .pw2-textarea-lg { min-height: 320px; }
#pw2-root .pw2-textarea-xl { min-height: 500px; }
#pw2-root .pw2-textarea-sm { min-height: 44px; resize: none; }
#pw2-root .pw2-input { width: 100%; height: 36px; padding: 0 12px; background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); color: var(--pw2-tp); font-family: inherit; font-size: 14px; outline: none; transition: border-color 160ms, box-shadow 160ms; }
#pw2-root .pw2-input:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-input:focus { border-color: var(--pw2-gold); box-shadow: var(--pw2-sh-gold); }
#pw2-root .pw2-input::placeholder { color: var(--pw2-tt); }

#pw2-root .pw2-form-group { margin-bottom: 16px; }
#pw2-root .pw2-form-label { display: block; font-size: 12px; font-weight: 500; color: var(--pw2-ts); margin-bottom: 8px; }
#pw2-root .pw2-form-label-mono { font-family: var(--pw2-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--pw2-tt); }
#pw2-root .pw2-form-hint { font-size: 12px; color: var(--pw2-tt); margin-top: 4px; }
#pw2-root .pw2-form-row { display: flex; align-items: center; gap: 12px; }
#pw2-root .pw2-warn-box { background: var(--pw2-gold-glow); border: 1px solid rgba(198,161,91,0.2); border-radius: var(--pw2-r-sm); padding: 12px; margin-bottom: 16px; font-size: 12px; color: var(--pw2-gold-l); }

#pw2-root .pw2-stats-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
#pw2-root .pw2-stats-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
#pw2-root .pw2-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; gap: 12px; }
#pw2-root .pw2-spinner { border-radius: 50%; border: 2px solid var(--pw2-bs); animation: pw2-spin 900ms linear infinite; }
#pw2-root .pw2-spinner-gold { border-top-color: var(--pw2-gold); border-top-width: 2.5px; }
#pw2-root .pw2-spinner-cyan { border-top-color: var(--pw2-cyan); border-top-width: 2.5px; }
#pw2-root .pw2-spinner-sm { width: 16px; height: 16px; border-width: 2px; }
#pw2-root .pw2-spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes pw2-spin { to { transform: rotate(360deg); } }
#pw2-root .pw2-progress { height: 6px; border-radius: 999px; background: var(--pw2-s2); overflow: hidden; margin-bottom: 12px; }
#pw2-root .pw2-progress-fill { height: 100%; border-radius: 999px; background: var(--pw2-gold); transition: width 240ms; }

#pw2-root .pw2-sb-list { display: flex; flex-direction: column; gap: 12px; }
#pw2-root .pw2-sb-card { border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); background: rgba(19,19,24,0.6); padding: 16px; transition: border-color 160ms; }
#pw2-root .pw2-sb-card:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-sb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#pw2-root .pw2-sb-title { display: flex; align-items: center; gap: 8px; }
#pw2-root .pw2-sb-desc { font-size: 14px; color: var(--pw2-tp); margin-bottom: 4px; }
#pw2-root .pw2-sb-dialogue { font-size: 14px; color: var(--pw2-ts); font-style: italic; margin-bottom: 4px; }
#pw2-root .pw2-sb-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; }
#pw2-root .pw2-sb-camera { font-family: var(--pw2-mono); color: var(--pw2-gold-l); }

#pw2-root .pw2-asset-list { display: flex; flex-direction: column; gap: 12px; }
#pw2-root .pw2-asset-card { border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); background: rgba(19,19,24,0.6); padding: 16px; transition: border-color 160ms; }
#pw2-root .pw2-asset-card:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-asset-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#pw2-root .pw2-asset-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#pw2-root .pw2-asset-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#pw2-root .pw2-asset-prompt { font-family: var(--pw2-mono); font-size: 13px; line-height: 21px; color: var(--pw2-ts); white-space: pre-wrap; word-break: break-word; }
#pw2-root .pw2-asset-edit { background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px 14px; font-family: var(--pw2-mono); font-size: 13px; line-height: 21px; color: var(--pw2-tp); outline: none; resize: vertical; min-height: 80px; width: 100%; }
#pw2-root .pw2-asset-edit:focus { border-color: var(--pw2-gold); box-shadow: var(--pw2-sh-gold); }

#pw2-root .pw2-video-list { display: flex; flex-direction: column; gap: 16px; }
#pw2-root .pw2-video-card { background: rgba(19,19,24,0.72); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--pw2-r-md); box-shadow: var(--pw2-sh-md); padding: 20px; transition: border-color 160ms; }
#pw2-root .pw2-video-card:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-video-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#pw2-root .pw2-video-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#pw2-root .pw2-video-sb-ref { margin-bottom: 12px; padding-left: 12px; border-left: 2px solid var(--pw2-bs); }
#pw2-root .pw2-video-sb-desc { font-size: 14px; color: var(--pw2-ts); }
#pw2-root .pw2-video-sb-dlg { font-size: 14px; color: var(--pw2-tt); font-style: italic; margin-top: 4px; }
#pw2-root .pw2-video-prompt { font-family: var(--pw2-mono); font-size: 13px; line-height: 21px; color: var(--pw2-tp); white-space: pre-wrap; word-break: break-word; background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px; }
#pw2-root .pw2-video-dur-detail { margin-top: 8px; background: rgba(19,19,24,0.6); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px; }
#pw2-root .pw2-video-dur-label { font-size: 12px; color: var(--pw2-tt); font-family: var(--pw2-mono); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
#pw2-root .pw2-video-dur-text { font-size: 13px; color: var(--pw2-ts); font-family: var(--pw2-mono); white-space: pre-wrap; }

#pw2-root .pw2-next-step { position: absolute; bottom: 24px; right: 24px; z-index: 30; }

#pw2-root .pw2-modal-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4,4,6,0.60); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#pw2-root.pw2-modal-standalone > :not(.pw2-modal-overlay) { display: none !important; }
#pw2-root.pw2-modal-standalone { background: transparent !important; pointer-events: none; }
#pw2-root.pw2-modal-standalone > .pw2-modal-overlay { pointer-events: auto; }
#pw2-root .pw2-modal { width: min(92vw, 480px); max-height: 90vh; background: rgba(16,16,20,0.92); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--pw2-r-lg); box-shadow: var(--pw2-sh-lg); display: flex; flex-direction: column; overflow: hidden; animation: pw2-modal-in 320ms cubic-bezier(0.16,1,0.3,1); }
#pw2-root .pw2-modal:has(.pw2-model-list) { overflow: visible; }
#pw2-root .pw2-modal:has(.pw2-model-list) .pw2-modal-body { overflow: visible; }
@keyframes pw2-modal-in { from{opacity:0;transform:translateY(8px) scale(0.98)} to{opacity:1;transform:translateY(0) scale(1)} }
#pw2-root .pw2-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-modal-head h2 { font-size: 18px; font-weight: 600; color: var(--pw2-tp); margin: 0; }
#pw2-root .pw2-modal-close { width: 26px; height: 26px; border: none; background: transparent; color: var(--pw2-tt); cursor: pointer; border-radius: var(--pw2-r-xs); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: color 120ms, background 120ms; }
#pw2-root .pw2-modal-close:hover { color: var(--pw2-tp); background: rgba(255,255,255,0.05); }
#pw2-root .pw2-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
#pw2-root .pw2-modal-foot { padding: 20px 24px; border-top: 1px solid var(--pw2-bs); display: flex; justify-content: flex-end; gap: 12px; }

#pw2-root .pw2-batch-info { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#pw2-root .pw2-batch-log { font-family: var(--pw2-mono); font-size: 13px; color: var(--pw2-ts); background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px; max-height: 240px; overflow-y: auto; white-space: pre-wrap; margin-top: 12px; }
#pw2-root .pw2-remember-raw { background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px; margin-bottom: 16px; }
#pw2-root .pw2-remember-raw-label { font-size: 12px; color: var(--pw2-tt); font-family: var(--pw2-mono); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
#pw2-root .pw2-remember-reason { background: rgba(19,19,24,0.6); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 12px; margin-top: 16px; }

#pw2-root .pw2-chat-msgs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; min-height: 300px; max-height: 350px; overflow-y: auto; }
#pw2-root .pw2-chat-msg { max-width: 85%; border-radius: var(--pw2-r-sm); padding: 10px 14px; font-size: 14px; line-height: 22px; }
#pw2-root .pw2-chat-msg-user { align-self: flex-end; background: var(--pw2-gold-glow); color: var(--pw2-tp); border: 1px solid rgba(198,161,91,0.2); }
#pw2-root .pw2-chat-msg-ai { align-self: flex-start; background: var(--pw2-s2); color: var(--pw2-ts); border: 1px solid var(--pw2-bs); }
#pw2-root .pw2-chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--pw2-tt); }
#pw2-root .pw2-chat-input-row { display: flex; gap: 8px; align-items: flex-end; }

#pw2-root .pw2-rules-layout { display: flex; height: 100%; overflow: hidden; }
#pw2-root .pw2-rules-sidebar { width: 256px; flex-shrink: 0; border-right: 1px solid var(--pw2-bs); background: rgba(10,10,13,0.5); display: flex; flex-direction: column; overflow: hidden; }
#pw2-root .pw2-rules-sb-head { padding: 16px; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-rules-list { flex: 1; overflow-y: auto; padding: 8px; }
#pw2-root .pw2-rule-item { position: relative; width: 100%; padding: 10px 12px; border: none; background: transparent; cursor: pointer; border-radius: var(--pw2-r-sm); margin-bottom: 2px; text-align: left; display: flex; align-items: center; justify-content: space-between; transition: background 120ms, color 120ms; }
#pw2-root .pw2-rule-item:hover { background: rgba(255,255,255,0.05); }
#pw2-root .pw2-rule-item.active { background: var(--pw2-gold-glow); }
#pw2-root .pw2-rule-item.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--pw2-gold); }
#pw2-root .pw2-rule-label { font-size: 14px; font-weight: 600; color: var(--pw2-tp); }
#pw2-root .pw2-rule-item:not(.active) .pw2-rule-label { color: var(--pw2-ts); }
#pw2-root .pw2-rule-item:hover .pw2-rule-label { color: var(--pw2-tp); }
#pw2-root .pw2-rule-file { font-size: 12px; color: var(--pw2-tt); font-family: var(--pw2-mono); display: block; margin-top: 2px; }
#pw2-root .pw2-rules-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#pw2-root .pw2-rules-content-head { padding: 16px 24px; border-bottom: 1px solid var(--pw2-bs); display: flex; align-items: center; justify-content: space-between; }
#pw2-root .pw2-rules-acts { display: flex; align-items: center; gap: 8px; }
#pw2-root .pw2-rules-body { flex: 1; overflow-y: auto; padding: 24px; }
#pw2-root .pw2-rules-text { font-family: var(--pw2-mono); font-size: 13px; line-height: 21px; color: var(--pw2-tp); white-space: pre-wrap; background: var(--pw2-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 20px; max-width: 800px; margin: 0 auto; }

#pw2-root ::-webkit-scrollbar { width: 10px; height: 10px; }
#pw2-root ::-webkit-scrollbar-track { background: transparent; }
#pw2-root ::-webkit-scrollbar-thumb { background: var(--pw2-bs); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
#pw2-root ::-webkit-scrollbar-thumb:hover { background: var(--pw2-bd); }
#pw2-root ::selection { background: rgba(198,161,91,0.25); color: var(--pw2-tp); }
@media (prefers-reduced-motion: reduce) { #pw2-root *, #pw2-root *::before, #pw2-root *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }


/* 仿写工作台 */
#pw2-root .pw2-novel-layout { flex: 1; display: flex; overflow: hidden; }
#pw2-root .pw2-novel-sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid var(--pw2-bs); background: rgba(10,10,13,0.5); display: flex; flex-direction: column; overflow: hidden; }
#pw2-root .pw2-novel-sb-head { padding: 16px; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-novel-file-list { flex: 1; overflow-y: auto; padding: 8px; }
#pw2-root .pw2-novel-file { padding: 12px; border-radius: var(--pw2-r-sm); cursor: pointer; margin-bottom: 4px; transition: background 120ms; border: 1px solid transparent; }
#pw2-root .pw2-novel-file:hover { background: rgba(255,255,255,0.05); }
#pw2-root .pw2-novel-file.active { background: var(--pw2-gold-glow); border-color: rgba(198,161,91,0.2); }
#pw2-root .pw2-novel-file-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
#pw2-root .pw2-novel-file-icon { display: none; }
#pw2-root .pw2-novel-file-name { font-size: 13px; font-weight: 500; color: var(--pw2-tp); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
#pw2-root .pw2-novel-file-meta { display: flex; align-items: center; gap: 6px; }

#pw2-root .pw2-novel-workarea { flex: 1; display: flex; overflow: hidden; }
#pw2-root .pw2-novel-split { flex: 1; display: flex; overflow: hidden; }
#pw2-root .pw2-novel-pane { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
#pw2-root .pw2-novel-pane-head { height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--pw2-bs); background: rgba(13,13,17,0.5); }
#pw2-root .pw2-novel-pane-actions { display: flex; align-items: center; gap: 8px; }
#pw2-root .pw2-continue-menu { position: relative; display: inline-flex; padding-bottom: 8px; margin-bottom: -8px; }
#pw2-root .pw2-continue-menu-pop { position: absolute; z-index: 30; top: calc(100% - 2px); right: 0; width: 210px; padding: 6px; border: 1px solid rgba(198,161,91,0.24); border-radius: 8px; background: rgba(20,20,25,0.99); box-shadow: 0 14px 34px rgba(0,0,0,0.42); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 140ms, transform 140ms, visibility 140ms; }
#pw2-root .pw2-continue-menu:hover .pw2-continue-menu-pop, #pw2-root .pw2-continue-menu:focus-within .pw2-continue-menu-pop { opacity: 1; visibility: visible; transform: translateY(0); }
#pw2-root .pw2-continue-menu-pop button { width: 100%; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--pw2-tp); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
#pw2-root .pw2-continue-menu-pop button:hover { background: rgba(198,161,91,0.12); color: #f0d58b; }
#pw2-root .pw2-continue-menu-pop button span { color: var(--pw2-tt); font-size: 10px; }
#pw2-root .pw2-modal:has(.pw2-analysis-dialog) { width: min(92vw, 860px); }
#pw2-root .pw2-modal:has(.pw2-analysis-dialog) .pw2-modal-body { overflow-x: hidden; }
#pw2-root .pw2-analysis-dialog { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
#pw2-root .pw2-analysis-diagnosis { padding: 14px; margin-bottom: 14px; border: 1px solid var(--pw2-bs); border-radius: 8px; background: rgba(255,255,255,0.025); }
#pw2-root .pw2-analysis-loading { padding: 20px; color: var(--pw2-ts); text-align: center; }
#pw2-root .pw2-analysis-error { color: #fca5a5; line-height: 1.7; }
#pw2-root .pw2-analysis-recommend { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--pw2-ts); }
#pw2-root .pw2-analysis-recommend strong { color: #e6c978; font-size: 16px; }
#pw2-root .pw2-analysis-recommend span { margin-left: auto; color: var(--pw2-tt); font-size: 11px; }
#pw2-root .pw2-analysis-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; }
#pw2-root .pw2-analysis-score { display: grid; grid-template-columns: 68px 1fr 26px; align-items: center; gap: 8px; color: var(--pw2-ts); font-size: 11px; }
#pw2-root .pw2-analysis-score > div { height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,0.08); }
#pw2-root .pw2-analysis-score i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8f7340,#d5b66d); }
#pw2-root .pw2-analysis-score b { color: var(--pw2-tt); font-size: 10px; font-weight: 500; text-align: right; }
#pw2-root .pw2-analysis-reasons { margin-top: 10px; color: var(--pw2-ts); font-size: 11px; line-height: 1.65; }
#pw2-root .pw2-analysis-reasons p { margin: 2px 0; }
#pw2-root .pw2-analysis-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#pw2-root .pw2-analysis-mode-card { position: relative; min-height: 120px; padding: 17px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 1px solid var(--pw2-bs); border-radius: 9px; background: rgba(19,19,24,0.75); color: var(--pw2-tp); text-align: left; cursor: pointer; transition: border-color 150ms, background 150ms, transform 150ms; }
#pw2-root .pw2-analysis-mode-card:hover { transform: translateY(-1px); border-color: rgba(198,161,91,0.48); background: rgba(198,161,91,0.07); }
#pw2-root .pw2-analysis-mode-card.recommended { border-color: rgba(198,161,91,0.65); box-shadow: inset 0 0 0 1px rgba(198,161,91,0.12); }
#pw2-root .pw2-analysis-mode-card.recommended::after { content: 'AI 推荐'; position: absolute; top: 8px; right: 9px; padding: 2px 6px; border-radius: 8px; background: rgba(198,161,91,0.17); color: #e6c978; font-size: 9px; }
#pw2-root .pw2-analysis-mode-card strong { font-size: 15px; }
#pw2-root .pw2-analysis-mode-card span { color: var(--pw2-ts); font-size: 12px; }
#pw2-root .pw2-analysis-mode-card small { color: var(--pw2-tt); font-size: 10px; line-height: 1.5; }
#pw2-root .pw2-analysis-archive-btn { border: 0; cursor: pointer; font: inherit; }
#pw2-root .pw2-analysis-archive-btn:hover { filter: brightness(1.18); box-shadow: 0 0 0 1px rgba(198,161,91,.35); }
#pw2-root .pw2-source-archive-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#pw2-root .pw2-source-archive-summary span { padding: 4px 8px; border-radius: 12px; background: rgba(255,255,255,.06); color: var(--pw2-ts); font-size: 11px; }
#pw2-root .pw2-source-archive-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-source-archive-tabs button { border: 0; border-radius: 6px; padding: 7px 10px; background: rgba(255,255,255,.04); color: var(--pw2-tt); cursor: pointer; }
#pw2-root .pw2-source-archive-tabs button.active { background: rgba(198,161,91,.16); color: #e6c978; }
#pw2-root .pw2-source-archive-tabs small { margin-left: 4px; color: inherit; opacity: .72; }
#pw2-root .pw2-source-archive-content { min-height: 320px; max-height: 58vh; overflow: auto; margin-top: 12px; }
#pw2-root .pw2-source-archive-text { margin: 0; padding: 14px; border-radius: 8px; background: rgba(7,7,10,.55); color: #d6d9e0; font: 12px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#pw2-root .pw2-source-archive-empty { padding: 50px 20px; text-align: center; color: var(--pw2-tt); }
#pw2-root .pw2-source-chunks { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 10px; }
#pw2-root .pw2-source-chunks aside { max-height: 54vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
#pw2-root .pw2-source-chunks aside button { padding: 7px 8px; border: 0; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--pw2-tt); text-align: left; cursor: pointer; }
#pw2-root .pw2-source-chunks aside button.active { background: rgba(198,161,91,.16); color: #e6c978; }
#pw2-root .pw2-source-diagnostic { color: var(--pw2-ts); line-height: 1.7; }
#pw2-root .pw2-source-diagnostic h3 { margin: 0 0 6px; color: var(--pw2-tp); }
#pw2-root .pw2-source-diagnostic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
#pw2-root .pw2-source-diagnostic-grid span { padding: 8px; border-radius: 6px; background: rgba(255,255,255,.04); }
#pw2-root .pw2-analysis-mode-card,
#pw2-root .pw2-analysis-mode-card strong,
#pw2-root .pw2-analysis-mode-card span,
#pw2-root .pw2-analysis-mode-card small,
#pw2-root .pw2-analysis-reasons { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }

@media (max-width: 720px) {
  #pw2-root .pw2-modal-overlay { padding: 10px; }
  #pw2-root .pw2-modal:has(.pw2-analysis-dialog) { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  #pw2-root .pw2-modal:has(.pw2-analysis-dialog) .pw2-modal-head,
  #pw2-root .pw2-modal:has(.pw2-analysis-dialog) .pw2-modal-body,
  #pw2-root .pw2-modal:has(.pw2-analysis-dialog) .pw2-modal-foot { padding-left: 14px; padding-right: 14px; }
  #pw2-root .pw2-analysis-mode-grid,
  #pw2-root .pw2-analysis-scores { grid-template-columns: 1fr; }
  #pw2-root .pw2-analysis-mode-card { min-height: 0; }
  #pw2-root .pw2-source-chunks { grid-template-columns: 1fr; }
  #pw2-root .pw2-source-chunks aside { max-height: none; flex-direction: row; overflow-x: auto; }
  #pw2-root .pw2-source-chunks aside button { flex: 0 0 auto; }
  #pw2-root .pw2-source-diagnostic-grid { grid-template-columns: 1fr 1fr; }
}

/* 单集短剧制作 v2：制作类型、任务模型、台词节奏与程序校验 */
.ep-production-node .epn-script-v2{width:390px!important;height:590px!important;overflow-x:hidden;overflow-y:auto}
.ep-production-node .epn-script-v2 *{box-sizing:border-box;max-width:100%}
.epn-script-v2 .epn-title{margin:10px 0 8px}.epn-script-v2 .epn-script-text{height:92px}
.epn-section-title{margin:13px 0 7px;color:#d5d8df;font-size:11px;font-weight:650}.epn-section-title small{color:#747a85;font-weight:400}
.epn-profile-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.epn-profile-grid button{min-height:54px;padding:7px;border:1px solid #30343c;border-radius:7px;background:#121419;color:#aeb3bd;text-align:left;cursor:pointer}.epn-profile-grid button.active{border-color:#8c8050;background:#2c291b;color:#eee29a}.epn-profile-grid b,.epn-profile-grid small{display:block}.epn-profile-grid b{font-size:10px}.epn-profile-grid small{margin-top:5px;font-size:8px;color:#7d838e}
.epn-custom{display:none;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}.epn-custom.show{display:grid}.epn-custom select,.epn-model-grid select{min-width:0;width:100%;height:29px;border:1px solid #30343c;border-radius:6px;background:#0d0f12;color:#c7cbd2;font-size:9px}
.epn-model-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.epn-model-grid label{min-width:0;color:#858b96;font-size:8px}.epn-model-grid select{display:block;margin-top:4px}
.eps-role-summary{margin-top:5px;color:#747b87;font-size:9px}.eps-speech-summary{display:block;margin-top:7px;color:#c7ae67;font-size:9px}.eps-speech-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px;color:#9da3ae;font-size:10px}.eps-beat-chip{padding:3px 6px;border:1px solid #5f5130;border-radius:99px;background:#2a2416;color:#dfc270}.eps-prompt-text.compiled{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;white-space:normal}
.eps-basis-button{height:30px;padding:0 12px!important;border:1px solid rgba(213,188,111,.38)!important;border-radius:7px;background:rgba(201,172,93,.1)!important;color:#eadb9c!important;font-size:11px!important;white-space:nowrap}.eps-basis-button:hover{border-color:rgba(234,219,156,.72)!important;background:rgba(201,172,93,.18)!important}
.eps-model-overrides{display:flex;align-items:center;gap:6px;margin-top:6px;color:#7f8590;font-size:8px}.eps-model-overrides label{display:flex;align-items:center;gap:3px}.eps-model-overrides select{max-width:125px;height:22px;border:1px solid #30343c;border-radius:5px;background:#0b0d10;color:#c7cbd2;font-size:8px}
.eps-speech-editor{padding:12px;border:1px solid #403a26;border-radius:9px;background:#18160f}.eps-speech-editor h4{margin:0 0 11px;color:#e2d588}.eps-speech-editor>button{border:1px solid #47402a;border-radius:6px;background:#242015;color:#d5c577;padding:7px 9px;cursor:pointer}.eps-beat-list{display:flex;flex-direction:column;gap:6px;margin:9px 0}.eps-beat-edit{display:grid;grid-template-columns:1fr 1.2fr 62px 28px;gap:5px}.eps-beat-edit select,.eps-detail-body select{border:1px solid #30343c;border-radius:6px;background:#0b0d10;color:#d9dde4}.eps-beat-edit button{border:1px solid #4e3033;border-radius:6px;background:#271619;color:#df777e}.eps-speech-metric{color:#b8a760;font-size:10px;line-height:1.6}
.eps-validation-box{display:flex;flex-direction:column;gap:5px;padding:10px;border-radius:7px;font-size:10px}.eps-validation-box.ok{border:1px solid #315b43;background:#13281d;color:#7ed1a1}.eps-validation-box.warn{border:1px solid #665329;background:#302713;color:#e3c36b}.eps-validation-box.error{border:1px solid #67343a;background:#351a1d;color:#ef8c91}.eps-status.error,.eps-prompt-card em.error{color:#ef7777;background:#3a191b}
#pw2-root .pw2-analysis-progress { margin-top: 13px; color: var(--pw2-ts); font-size: 12px; line-height: 1.6; }
#pw2-root .pw2-analysis-progressbar { height: 6px; margin: 7px 0; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,0.08); }
#pw2-root .pw2-analysis-progressbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4f9b92,#68d4c7); transition: width 240ms; }
#pw2-root .pw2-novel-pane-body { flex: 1; overflow-y: auto; padding: 16px; font-size: 14px; line-height: 22px; color: var(--pw2-tp); white-space: pre-wrap; word-break: break-word; font-family: inherit; }
#pw2-root .pw2-novel-reading-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.8; color: #e5e7eb; }
#pw2-root .pw2-novel-chapter-anchor { display: inline-block; width: 100%; box-sizing: border-box; margin: 12px 0 4px; padding: 5px 8px; border-radius: 6px; color: #f3d694; font-size: 15px; font-weight: 650; scroll-margin-top: 18px; transition: background 240ms, color 240ms, box-shadow 240ms; }
#pw2-root .pw2-novel-chapter-anchor.located { color: #fff4cd; background: rgba(198,161,91,0.22); box-shadow: inset 3px 0 0 var(--pw2-gold-500), 0 0 18px rgba(198,161,91,0.12); }
#pw2-root .pw2-novel-toc-trigger span { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 9px; background: rgba(198,161,91,0.16); color: #e6c978; font-size: 10px; }
#pw2-root .pw2-novel-toc-trigger.active { border-color: rgba(198,161,91,0.55); color: #e6c978; }
#pw2-root .pw2-novel-toc { position: absolute; z-index: 12; top: 44px; right: 0; bottom: 0; width: min(330px, 82%); display: flex; flex-direction: column; background: rgba(16,16,21,0.985); border-left: 1px solid rgba(198,161,91,0.25); box-shadow: -16px 0 35px rgba(0,0,0,0.38); transform: translateX(102%); visibility: hidden; transition: transform 180ms ease, visibility 180ms; }
#pw2-root .pw2-novel-toc.open { transform: translateX(0); visibility: visible; }
#pw2-root .pw2-novel-toc-head { min-height: 54px; padding: 10px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--pw2-bs); }
#pw2-root .pw2-novel-toc-head strong { display: block; color: var(--pw2-tp); font-size: 14px; }
#pw2-root .pw2-novel-toc-head span { display: block; margin-top: 2px; color: var(--pw2-tt); font-size: 11px; }
#pw2-root .pw2-novel-toc-head button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--pw2-ts); font-size: 22px; cursor: pointer; }
#pw2-root .pw2-novel-toc-head button:hover { background: rgba(255,255,255,0.07); color: var(--pw2-tp); }
#pw2-root .pw2-novel-toc-list { flex: 1; overflow-y: auto; padding: 8px; }
#pw2-root .pw2-novel-toc-item { width: 100%; display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--pw2-ts); font: inherit; font-size: 12px; line-height: 18px; text-align: left; cursor: pointer; }
#pw2-root .pw2-novel-toc-item:hover { background: rgba(198,161,91,0.1); color: #f0d58b; }
#pw2-root .pw2-novel-toc-num { flex: 0 0 25px; color: var(--pw2-tt); font-size: 10px; text-align: right; }
#pw2-root .pw2-novel-divider { width: 4px; flex-shrink: 0; cursor: col-resize; background: var(--pw2-bs); transition: background 120ms; position: relative; }
#pw2-root .pw2-novel-divider:hover { background: var(--pw2-gold-d); }
#pw2-root .pw2-novel-divider::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 2px; height: 24px; background: var(--pw2-tt); border-radius: 2px; }
#pw2-root .pw2-files-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--pw2-bs); background: rgba(19,19,24,0.5); min-height: 36px; box-sizing: border-box; }#pw2-root .pw2-files-toolbar .pw2-btn { transition: opacity 150ms; }#pw2-root .pw2-files-toolbar.has-selection .pw2-btn#pw2-nv-delete { background: var(--pw2-error-bg); color: var(--pw2-error); border-color: rgba(217,87,87,0.3); }#pw2-root .pw2-files-toolbar.has-selection .pw2-btn#pw2-nv-delete:hover { background: rgba(217,87,87,0.22); }#pw2-root .pw2-files-checkall { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pw2-ts); cursor: pointer; opacity: 0.4; transition: opacity 150ms; }#pw2-root .pw2-novel-sidebar:hover .pw2-files-checkall { opacity: 1; }#pw2-root .pw2-files-checkall input { cursor: pointer; }#pw2-root .pw2-files-count { font-size: 11px; color: var(--pw2-tt); }#pw2-root .pw2-novel-file { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--pw2-r-sm); cursor: pointer; margin-bottom: 4px; transition: background 120ms; }#pw2-root .pw2-novel-file:hover { background: rgba(255,255,255,0.05); }#pw2-root .pw2-novel-file.active { background: var(--pw2-gold-glow); }#pw2-root .pw2-novel-file.checked { background: rgba(79,209,197,0.08); }#pw2-root .pw2-file-check { display: flex; align-items: center; padding: 4px 0; cursor: pointer; }#pw2-root .pw2-file-check { display: none; align-items: center; padding: 4px 0; cursor: pointer; }#pw2-root .pw2-novel-file:hover .pw2-file-check, #pw2-root .pw2-novel-file.checked .pw2-file-check { display: flex; }#pw2-root .pw2-file-check input { cursor: pointer; width: 14px; height: 14px; }#pw2-root .pw2-novel-file-main { flex: 1; min-width: 0; }#pw2-root .pw2-novel-file-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }#pw2-root .pw2-novel-file-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--pw2-tp); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }#pw2-root .pw2-file-del { width: 20px; height: 20px; border: none; background: transparent; color: var(--pw2-tt); font-size: 16px; line-height: 1; cursor: pointer; border-radius: 3px; flex-shrink: 0; opacity: 0; transition: opacity 120ms; }#pw2-root .pw2-novel-file:hover .pw2-file-del { opacity: 0.7; }#pw2-root .pw2-novel-file:hover .pw2-file-del { opacity: 1; }#pw2-root .pw2-file-del:hover { background: var(--pw2-error-bg); color: var(--pw2-error); }
/* 模型管理 */
#pw2-root .pw2-form-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--pw2-bs); }
#pw2-root .pw2-form-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#pw2-root .pw2-form-section-head .pw2-h3 { margin: 0; }
#pw2-root .pw2-model-list { display: flex; flex-direction: column; gap: 6px; }
#pw2-root .pw2-model-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--pw2-bg-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); }
#pw2-root .pw2-model-row.active { border-color: var(--pw2-gold-500); background: var(--pw2-gold-glow); }
#pw2-root .pw2-model-row-info { flex: 1; min-width: 0; }
#pw2-root .pw2-model-row-name { font-size: 13px; font-weight: 500; color: var(--pw2-tp); display: flex; align-items: center; gap: 6px; }
#pw2-root .pw2-model-row-meta { font-size: 11px; color: var(--pw2-tt); margin-top: 2px; font-family: var(--pw2-mono); }
#pw2-root .pw2-model-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
#pw2-root .pw2-model-more { position: relative; flex: 0 0 auto; }
#pw2-root .pw2-model-more-trigger { width: 30px; height: 28px; padding: 0; border: 1px solid var(--pw2-bs); border-radius: 7px; background: transparent; color: var(--pw2-ts); cursor: pointer; letter-spacing: 1px; }
#pw2-root .pw2-model-more-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 112px; padding: 5px; border: 1px solid var(--pw2-bs); border-radius: 8px; background: #18191e; box-shadow: var(--pw2-sh-lg); opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity 120ms, transform 120ms, visibility 120ms; }
#pw2-root .pw2-model-more:hover .pw2-model-more-menu,
#pw2-root .pw2-model-more:focus-within .pw2-model-more-menu { opacity: 1; visibility: visible; transform: translateY(0); }
#pw2-root .pw2-model-more-menu button { width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--pw2-ts); text-align: left; cursor: pointer; }
#pw2-root .pw2-model-more-menu button:hover { background: rgba(255,255,255,.06); color: var(--pw2-tp); }
#pw2-root .pw2-model-more-menu button.danger { color: var(--pw2-error); }
/* 仿写工作台 - 模型选择下拉框 */
#pw2-root .pw2-select-inline { background: var(--pw2-bg-sunken); color: var(--pw2-tp); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 4px 8px; font-size: 12px; font-family: inherit; cursor: pointer; outline: none; margin-right: 8px; }
#pw2-root .pw2-select-inline:hover { border-color: var(--pw2-bd); }
#pw2-root .pw2-select-inline:focus { border-color: var(--pw2-gold-500); }

/* 仿写注意事项 */
#pw2-root .pw2-novel-notes-wrap { padding: 0 16px; margin: 4px 0; }
#pw2-root .pw2-novel-notes-label { display: block; font-size: 11px; color: var(--pw2-tt); margin-bottom: 4px; font-weight: 500; }
#pw2-root .pw2-novel-notes { width: 100%; background: var(--pw2-bg-sunken); border: 1px solid var(--pw2-bs); border-radius: var(--pw2-r-sm); padding: 8px 10px; color: var(--pw2-tp); font-family: inherit; font-size: 12px; line-height: 18px; outline: none; resize: vertical; min-height: 60px; max-height: 120px; transition: border-color 160ms; }
#pw2-root .pw2-novel-notes:focus { border-color: var(--pw2-gold-500); box-shadow: var(--pw2-sh-gold); }
#pw2-root .pw2-novel-notes::placeholder { color: var(--pw2-tt); font-size: 11px; }
#pw2-root .pw2-novel-arrow { text-align: center; font-size: 20px; color: var(--pw2-tt); padding: 2px 0; opacity: 0.5; line-height: 1; }

/* 小说记忆中心（提示词工作流） */
.pw2-memory-overlay { position: fixed; inset: 0; z-index: 9999; padding: 32px; background: rgba(5, 6, 9, 0.76); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.pw2-memory-dialog { width: min(920px, 94vw); height: min(720px, 88vh); background: #111217; border: 1px solid rgba(198, 161, 91, 0.34); border-radius: 10px; color: #e8e9ed; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255,255,255,0.025) inset; }
.pw2-memory-head { min-height: 72px; padding: 16px 20px; border-bottom: 1px solid #292b33; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent); }
.pw2-memory-title { color: #d3b06c; font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.pw2-memory-file { max-width: 580px; margin-top: 4px; color: #858994; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw2-memory-head-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.pw2-memory-status { padding: 4px 9px; border: 1px solid; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.pw2-memory-status.synced { color: #6fcf9b; border-color: rgba(111,207,155,.3); background: rgba(111,207,155,.08); }
.pw2-memory-status.saving { color: #d3b06c; border-color: rgba(211,176,108,.32); background: rgba(211,176,108,.08); }
.pw2-memory-status.error { color: #f08383; border-color: rgba(240,131,131,.32); background: rgba(240,131,131,.08); }
.pw2-memory-close { width: 32px; height: 32px; border: 0; border-radius: 5px; background: transparent; color: #8e929d; font-size: 20px; cursor: pointer; }
.pw2-memory-close:hover { color: #fff; background: rgba(255,255,255,.06); }
.pw2-memory-tabs { height: 48px; padding: 0 20px; border-bottom: 1px solid #292b33; display: flex; align-items: end; gap: 24px; background: #0e0f13; }
.pw2-memory-tab { height: 48px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #858994; font-size: 13px; cursor: pointer; }
.pw2-memory-tab:hover { color: #c9cbd1; }
.pw2-memory-tab.active { color: #d3b06c; border-bottom-color: #c6a15b; }
.pw2-memory-content { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px; background: radial-gradient(circle at 90% 0, rgba(198,161,91,.035), transparent 34%), #121318; }
.pw2-memory-pre { min-height: 100%; margin: 0; color: #d8dae0; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.pw2-memory-document { max-width: 980px; margin: 0 auto; padding: 4px 6px 28px; line-height: 2; letter-spacing: .08px; tab-size: 2; }
.pw2-memory-editor { box-sizing: border-box; width: 100%; height: 100%; min-height: 430px; padding: 16px; resize: none; outline: none; border: 1px solid #373a44; border-radius: 6px; background: #0b0c10; color: #e5e7eb; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.8; }
.pw2-memory-editor:focus { border-color: #a8874b; box-shadow: 0 0 0 3px rgba(198,161,91,.08); }
.pw2-memory-empty { height: 100%; min-height: 360px; color: #777b86; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 12px; line-height: 1.8; }
.pw2-memory-empty-icon { margin-bottom: 12px; font-size: 30px; filter: grayscale(.15); opacity: .8; }
.pw2-memory-empty-title { margin-bottom: 4px; color: #b9bbc2; font-size: 14px; font-weight: 600; }
.pw2-memory-history { display: flex; flex-direction: column; gap: 12px; }
.pw2-memory-history-item { padding: 14px 16px; border: 1px solid #2e3139; border-radius: 6px; background: rgba(8,9,12,.5); }
.pw2-memory-history-head { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #272a31; color: #cdb072; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.pw2-memory-history-head time { color: #6f737e; font-family: var(--pw2-mono, monospace); font-size: 10px; font-weight: 400; }
.pw2-memory-history-item .pw2-memory-pre { min-height: 0; font-size: 12px; line-height: 1.75; }
.pw2-memory-foot { min-height: 58px; padding: 10px 20px; border-top: 1px solid #292b33; background: #0e0f13; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pw2-memory-footnote { color: #70747f; font-size: 11px; }
.pw2-memory-actions { display: flex; align-items: center; gap: 8px; }
.pw2-memory-actions .pw2-btn { min-height: 30px; padding: 5px 12px; border: 1px solid #343741; border-radius: 4px; background: #24262d; color: #d5d7dd; font-family: inherit; font-size: 12px; cursor: pointer; }
.pw2-memory-actions .pw2-btn:hover { border-color: #50535e; background: #2b2e36; }
.pw2-memory-actions .pw2-btn-primary { border-color: #b18e50; background: #c6a15b; color: #111217; font-weight: 600; }
.pw2-memory-actions .pw2-btn-primary:hover { background: #d3b06c; border-color: #d3b06c; }
.pw2-memory-actions .pw2-btn-ghost { border-color: transparent; background: transparent; color: #9296a0; }
@media (max-width: 720px) {
  .pw2-memory-overlay { padding: 10px; }
  .pw2-memory-dialog { width: 100%; height: 94vh; }
  .pw2-memory-status { display: none; }
  .pw2-memory-tabs { gap: 16px; }
  .pw2-memory-content { padding: 16px; }
  .pw2-memory-footnote { display: none; }
  .pw2-memory-foot { justify-content: flex-end; }
}
.episode-materials-overlay{position:fixed;inset:0;z-index:100080;background:rgba(3,7,18,.82);display:flex;align-items:center;justify-content:center;padding:28px}
.episode-materials-dialog{width:min(1120px,94vw);height:min(780px,90vh);display:grid;grid-template-rows:auto auto auto 1fr auto;background:#0d1119;border:1px solid #2a3444;border-radius:16px;box-shadow:0 28px 80px rgba(0,0,0,.55);overflow:hidden;color:#e5e7eb}
.episode-materials-dialog>header{display:flex;justify-content:space-between;gap:24px;padding:22px 26px 16px;border-bottom:1px solid #222c3a}
.episode-materials-dialog header small{color:#60a5fa}.episode-materials-dialog header h2{margin:4px 0 5px;font-size:22px}.episode-materials-dialog header p{margin:0;color:#94a3b8}
.episode-materials-dialog header>button{align-self:flex-start;width:34px;height:34px;border:0;border-radius:8px;background:#202938;color:#fff;font-size:22px;cursor:pointer}
.episode-materials-source{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 26px;background:#111827;color:#aebbd0}.episode-materials-source>div{display:flex;align-items:center;gap:10px;min-width:0}.episode-materials-file{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;background:transparent;color:#93c5fd;text-decoration:underline;cursor:pointer;font-weight:700}.episode-materials-file.empty{color:#fbbf24;text-decoration:none}.episode-materials-source small{color:#64748b}.episode-materials-tools{flex:1;justify-content:flex-end;flex-wrap:wrap}.episode-materials-tools label{display:flex;align-items:center;gap:7px;white-space:nowrap}.episode-materials-tools select{max-width:180px;border:1px solid #34445b;background:#0f1724;color:#e5e7eb;border-radius:8px;padding:7px 9px}.episode-materials-tools button{border:1px solid #34445b;background:#192333;color:#dbeafe;border-radius:8px;padding:8px 12px;cursor:pointer;white-space:nowrap}.episode-materials-tools button.eps-primary{background:#1d4ed8;border-color:#3b82f6;color:#fff}.episode-materials-tools button.eps-danger{background:#7f1d1d;border-color:#ef4444;color:#fff}.episode-materials-tools button:disabled{opacity:.55;cursor:wait}
.episode-materials-dialog>nav{display:flex;gap:7px;padding:12px 26px;border-bottom:1px solid #222c3a;overflow-x:auto}
.episode-materials-dialog>nav button{white-space:nowrap;border:1px solid #303b4d;background:#151c28;color:#aebbd0;border-radius:8px;padding:8px 12px;cursor:pointer}
.episode-materials-dialog>nav button.active{background:#1d4ed8;border-color:#3b82f6;color:#fff}
.episode-materials-dialog>main{box-sizing:border-box;width:100%;min-width:0;min-height:0;padding:18px 26px;overflow:auto}.episode-materials-dialog [data-material-panel]{display:none;box-sizing:border-box;width:100%;min-width:0;height:100%}.episode-materials-dialog [data-material-panel].active{display:block}
.episode-materials-dialog textarea{display:block;box-sizing:border-box;width:100%!important;max-width:none!important;height:100%;min-height:390px;resize:none;border:1px solid #2d394b;border-radius:10px;background:#090e16;color:#e5e7eb;padding:20px 22px;line-height:1.85;font:14px/1.85 "Microsoft YaHei",sans-serif;outline:none;white-space:pre-wrap;overflow-wrap:anywhere}
.episode-materials-dialog textarea:focus{border-color:#3b82f6}.episode-materials-dialog pre{white-space:pre-wrap;word-break:break-word;margin:0;padding:16px;border:1px solid #2d394b;border-radius:10px;background:#090e16;color:#dbeafe;line-height:1.65}
.episode-materials-generated-note{margin-bottom:10px;color:#93c5fd}.episode-materials-dialog>footer{display:flex;align-items:center;justify-content:space-between;padding:14px 26px;border-top:1px solid #222c3a;color:#94a3b8}
.episode-script-picker{grid-template-rows:auto 1fr}.episode-picker-loading{padding:36px;text-align:center;color:#94a3b8}.episode-picker-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.episode-picker-list button{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;text-align:left;border:1px solid #2b3749;border-radius:9px;background:#111827;color:#e5e7eb;cursor:pointer}.episode-picker-list button:hover{border-color:#3b82f6;background:#172033}.episode-picker-list span{color:#94a3b8;font-size:12px}
.eps-materials-button{width:auto!important;height:auto!important;border:1px solid #3b82f6!important;background:#172554!important;color:#dbeafe!important;border-radius:8px!important;padding:8px 12px!important;font-size:12px!important;white-space:nowrap;cursor:pointer}
.eps-context-chip{position:relative;display:inline-flex;max-width:100%;margin:6px 0;color:#bfdbfe;font-size:11px;line-height:1.35;z-index:30}
.eps-context-chip>span{display:block;max-width:100%;padding:6px 9px;border:1px solid #31507a;border-radius:7px;background:#111f34;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}
.eps-context-menu{display:none;position:absolute;z-index:100200;left:0;top:calc(100% + 5px);min-width:210px;max-width:320px;padding:9px;border:1px solid #3b4c67;border-radius:9px;background:#0b111c;box-shadow:0 16px 42px rgba(0,0,0,.55)}
.eps-context-chip:hover .eps-context-menu,.eps-context-chip:focus-within .eps-context-menu{display:flex;flex-direction:column}
.eps-context-menu b{padding:2px 5px 7px;color:#93c5fd;font-size:11px}.eps-context-menu i{padding:5px;border-top:1px solid #1f2937;color:#d5deeb;font-style:normal;white-space:normal}
.ep-production-node .eps-context-chip{display:flex;margin:8px 0 2px}.ep-production-node .eps-context-chip>span{width:100%;box-sizing:border-box}
/* 制作台标题栏提示只属于基础界面层，不能覆盖资产/提示词编辑器和 AI 对话层。 */
.eps-shell>.eps-head .eps-context-chip{z-index:2}
.eps-shell>.eps-head .eps-context-menu{z-index:4}

/* 单集短剧制作：创作素材 → 本集创作基准 → 正式剧本 */
.ep-production-node .epn-creative-source{width:440px!important;height:390px!important;padding:16px 18px 14px;overflow:visible}
.ep-production-node .epn-creative-source .epn-title{margin:8px 0 10px}
.ep-production-node .epn-source-text-wrap{position:relative;width:100%}
.ep-production-node .epn-creative-source .epn-script-text{display:block;width:100%;height:238px;margin:0;padding:12px 39px 12px 12px;resize:none;overflow:auto}
.ep-production-node .epn-expand-icon{position:absolute;z-index:3;top:8px;right:8px;width:27px;height:27px;padding:0;border:1px solid rgba(255,255,255,.09);border-radius:6px;background:rgba(17,20,27,.88);color:#aeb5c2;font-size:15px;line-height:25px;cursor:pointer}
.ep-production-node .epn-expand-icon:hover{border-color:#6c63d9;background:#24213d;color:#fff}
.ep-production-node .epn-compact-actions{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1.15fr) auto auto;gap:7px;width:100%;margin-top:10px}
.ep-production-node .epn-compact-actions select,.ep-production-node .epn-compact-actions button{min-width:0;height:34px;border:1px solid #343947;border-radius:7px;background:#171a21;color:#c8cdd7;font-size:10px;outline:none}
.ep-production-node .epn-compact-actions select{padding:0 7px;text-overflow:ellipsis;cursor:pointer}
.ep-production-node .epn-compact-actions button{padding:0 10px;white-space:nowrap;cursor:pointer}
.ep-production-node .epn-compact-actions button:hover,.ep-production-node .epn-compact-actions select:focus{border-color:#6960ca}
.ep-production-node .epn-compact-actions button.primary{border-color:#6f62e8;background:#6558df;color:#fff;font-weight:650}
.ep-production-node .epn-compact-actions button.primary:hover{background:#7568ee}
.ep-production-node .epn-formal-script{width:440px!important;height:390px!important;padding:16px 18px 14px;overflow:visible}
.ep-production-node .epn-formal-script .epn-title{margin:8px 0 10px}
.ep-production-node .epn-formal-script .epn-script-text{display:block;width:100%;height:238px;margin:0;padding:12px 39px 12px 12px;resize:none;overflow:auto}
.ep-production-node .epn-formal-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 10px}
.ep-production-node .epn-formal-title-row .epn-title{min-width:0;margin:0}
.ep-production-node .epn-formal-title-row button{height:27px;padding:0 9px;border:1px solid #3a4050;border-radius:6px;background:#171a21;color:#abb2bf;font-size:9px;white-space:nowrap;cursor:pointer}
.ep-production-node .epn-formal-title-row button:hover{border-color:#6960ca;color:#fff}
.ep-production-node .epn-formal-footer{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;margin-top:10px}
.ep-production-node .epn-formal-edit-hint{min-width:0;color:#717987;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-production-node .epn-formal-settings-wrap{position:relative}
.ep-production-node .epn-settings-trigger,.ep-production-node .epn-production-trigger{height:34px;padding:0 13px;border:1px solid #343947;border-radius:8px;background:#171a21;color:#c8cdd7;font-size:10px;white-space:nowrap;cursor:pointer}
.ep-production-node .epn-settings-trigger:hover,.ep-production-node .epn-settings-trigger.active{border-color:#7166dc;background:#242039;color:#fff}
.ep-production-node .epn-production-trigger{border-color:#6f62e8;background:#6558df;color:#fff;font-weight:650}
.ep-production-node .epn-production-trigger:hover{background:#7568ee}
.ep-production-node .epn-settings-popover{position:absolute;z-index:100500;left:0;top:calc(100% + 7px);width:260px;display:none;padding:10px;border:1px solid #3c414d;border-radius:11px;background:rgba(20,22,27,.98);box-shadow:0 18px 50px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.025) inset;backdrop-filter:blur(12px)}
.ep-production-node .epn-settings-popover.show{display:block}
.ep-production-node .epn-settings-popover-head{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 9px;border-bottom:1px solid #30343e}
.ep-production-node .epn-settings-popover-head b{color:#eef0f5;font-size:11px}.ep-production-node .epn-settings-popover-head span{color:#717887;font-size:8px}
.ep-production-node .epn-settings-popover label{display:grid;grid-template-columns:62px minmax(0,1fr);align-items:center;gap:8px;margin-top:9px;color:#9299a7;font-size:9px}
.ep-production-node .epn-settings-popover select{width:100%;height:34px;padding:0 28px 0 10px;border:1px solid #3b404a;border-radius:8px;background:#1b1d22;color:#eceef2;font-size:10px;outline:none;cursor:pointer;color-scheme:dark}
.ep-production-node .epn-settings-popover select:hover,.ep-production-node .epn-settings-popover select:focus{border-color:#73707c;background:#24262c;box-shadow:0 0 0 2px rgba(123,117,164,.12)}
.ep-production-node .epn-settings-popover select option{padding:9px;background:#181a1f;color:#e8eaf0}
.ep-production-node .epn-formal-script.node-body{background:linear-gradient(145deg,#17191f,#101115)!important}
.ep-production-node .epn-formal-bottom-panel{width:560px!important;min-width:560px!important;max-width:560px!important;display:flex;flex-direction:row;align-items:center;gap:8px;padding:10px 12px!important;background:#1a1d24!important;border-color:#30343d!important;z-index:100300}
.ep-production-node .epn-formal-bottom-panel[style*="display:none"]{display:none!important}
.ep-production-node .epn-formal-bottom-panel .nip-info{position:relative;min-width:0;height:44px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:6px 11px;border:1px solid #333842;border-radius:9px;background:#20232a;color:#d9dde5;text-align:left;cursor:pointer}
.ep-production-node .epn-formal-bottom-panel .nip-info:nth-child(1){flex:1.05}.ep-production-node .epn-formal-bottom-panel .nip-info:nth-child(2){flex:.65}.ep-production-node .epn-formal-bottom-panel .nip-info:nth-child(3){flex:1.5}
.ep-production-node .epn-formal-bottom-panel .nip-info:hover{border-color:#666c78;background:#272a31}
.ep-production-node .epn-formal-bottom-panel .nip-info-label{grid-column:1;color:#777f8e;font-size:8px;line-height:1}
.ep-production-node .epn-formal-bottom-panel .nip-info-text{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#edf0f5;font-size:10px;line-height:1.25}
.ep-production-node .epn-formal-bottom-panel .nip-info-arrow{grid-column:2;grid-row:1/3;color:#7f8794;font-size:13px}
.epn-formal-option-picker.option-picker{min-width:118px;border-color:#50555f;background:rgba(20,22,26,.98);border-radius:10px;padding:4px;box-shadow:0 16px 42px rgba(0,0,0,.62);color-scheme:dark}
.epn-formal-option-picker .option-picker-item{min-height:32px;display:flex;align-items:center;padding:5px 11px;border:1px solid transparent;border-radius:7px;color:#d7dbe3;font-size:11px}
.epn-formal-option-picker .option-picker-item:hover{background:rgba(255,255,255,.07);color:#fff}
.epn-formal-option-picker .option-picker-item.active{border-color:#676d77;background:rgba(255,255,255,.11);color:#fff;font-weight:500}
.canvas-unified-option-picker.option-picker{position:fixed;z-index:100900;max-width:min(360px,calc(100vw - 16px));max-height:min(360px,calc(100vh - 16px));overflow-y:auto;overscroll-behavior:contain}
.canvas-unified-option-picker .option-picker-item{white-space:normal;word-break:break-word}
.canvas-unified-option-picker .option-picker-item.disabled{opacity:.38;cursor:not-allowed}
.canvas-unified-option-picker .option-picker-item.disabled:hover{background:transparent;color:#d7dbe3}
.ep-production-node .epn-profile-pill{display:flex;align-items:center;min-width:0;height:34px;padding:0 10px;border:1px solid #343947;border-radius:7px;background:#14171d;color:#9fa6b3;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-production-node .epn-formal-wait{height:278px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;border:1px dashed #343947;border-radius:10px;background:rgba(12,14,19,.56);text-align:center}
.ep-production-node .epn-formal-wait-icon{width:38px;height:38px;display:flex;align-items:center;justify-content:center;margin-bottom:11px;border:1px solid #454b59;border-radius:50%;color:#ee8585;font-size:20px;font-weight:700}
.ep-production-node .epn-formal-wait-icon i{width:16px;height:16px;border:2px solid #474d5a;border-top-color:#7769ee;border-radius:50%;animation:epn-spin .85s linear infinite}
.ep-production-node .epn-formal-wait.baseline-ready .epn-formal-wait-icon{border-color:#5b53b9;color:#8e83ff}
.ep-production-node .epn-formal-wait.baseline-ready .epn-formal-wait-icon:before{content:'✓'}
.ep-production-node .epn-formal-wait b{color:#e7eaf0;font-size:14px}.ep-production-node .epn-formal-wait p{max-width:320px;margin:7px 0 15px;color:#858d9b;font-size:11px;line-height:1.55}
.ep-production-node .epn-formal-wait button{height:34px;padding:0 14px;border:1px solid #3b4050;border-radius:7px;background:#1a1d24;color:#cdd2dc;cursor:pointer}
.ep-production-node .epn-formal-wait button.primary{border-color:#6f62e8;background:#6558df;color:#fff}
@keyframes epn-spin{to{transform:rotate(360deg)}}
.ep-production-node .epn-mode-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;width:100%;margin:10px 0}
.ep-production-node .epn-mode-grid button{min-width:0;min-height:34px;padding:7px 8px;border:1px solid #343947;border-radius:8px;background:#171a21;color:#bdc3cf;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.ep-production-node .epn-mode-grid button.active{border-color:#6d5dfc;background:rgba(109,93,252,.16);color:#fff;box-shadow:0 0 0 1px rgba(109,93,252,.18) inset}
.episode-baseline-review{position:fixed;inset:0;z-index:100080;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(4,5,8,.78);backdrop-filter:blur(7px)}
.episode-baseline-review>section{width:min(980px,94vw);height:min(850px,92vh);display:flex;flex-direction:column;overflow:hidden;border:1px solid #333846;border-radius:16px;background:#101218;color:#eef1f7;box-shadow:0 28px 90px rgba(0,0,0,.62)}
.episode-baseline-review header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 24px 16px;border-bottom:1px solid #292d37}
.episode-baseline-review header small{color:#8f83ff}.episode-baseline-review header h2{margin:3px 0 6px;font-size:23px}.episode-baseline-review header p{margin:0;color:#9299a8;font-size:13px}
.episode-baseline-review header button{width:34px;height:34px;border:0;border-radius:8px;background:#20232c;color:#dce0e8;font-size:22px;cursor:pointer}
.episode-baseline-review .ebr-scroll{flex:1;overflow:auto;padding:20px 24px}
.episode-baseline-review .ebr-top{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;margin-bottom:16px}
.episode-baseline-review label{display:flex;flex-direction:column;gap:7px;color:#aeb5c2;font-size:12px}
.episode-baseline-review select,.episode-baseline-review input,.episode-baseline-review textarea{box-sizing:border-box;width:100%;border:1px solid #303541;border-radius:9px;background:#171a21;color:#edf0f5;outline:none}
.episode-baseline-review select,.episode-baseline-review input{height:38px;padding:0 11px}
.episode-baseline-review textarea:focus,.episode-baseline-review select:focus,.episode-baseline-review input:focus{border-color:#7567ff;box-shadow:0 0 0 2px rgba(117,103,255,.12)}
.episode-baseline-review .ebr-field{margin:0 0 13px}.episode-baseline-review .ebr-field b{color:#f1f3f7;font-size:14px}.episode-baseline-review .ebr-field textarea{min-height:92px;padding:11px 13px;resize:vertical;line-height:1.65}
.episode-baseline-review footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:15px 24px;border-top:1px solid #292d37;background:#0d0f14}
.episode-baseline-review footer span{margin-right:auto;color:#9299a8;font-size:12px}.episode-baseline-review footer button{height:38px;padding:0 16px;border:1px solid #353a47;border-radius:9px;background:#1b1e26;color:#dce1eb;cursor:pointer}
.episode-baseline-review footer button.primary{border-color:#7162ff;background:#6556ec;color:#fff}.episode-baseline-review footer button:disabled{opacity:.55;cursor:wait}
@media(max-width:720px){.episode-baseline-review{padding:8px}.episode-baseline-review>section{width:100%;height:96vh}.episode-baseline-review .ebr-top{grid-template-columns:1fr}.episode-baseline-review footer{flex-wrap:wrap}.episode-baseline-review footer span{width:100%}}
.episode-baseline-review>section>.ebr-top{padding:14px 24px 0}
.ebr-logic-review{display:none;margin:12px 24px 0;padding:14px;border:1px solid rgba(238,167,73,.46);border-radius:12px;background:linear-gradient(135deg,rgba(91,55,21,.34),rgba(45,32,35,.58));box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
.ebr-logic-review.show{display:block;max-height:42%;overflow:auto}
.ebr-logic-title{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:11px}.ebr-logic-title>div{display:flex;align-items:center;gap:9px}.ebr-logic-title b{color:#ffd28a;font-size:14px}.ebr-logic-title span{padding:3px 8px;border:1px solid rgba(240,171,76,.42);border-radius:999px;background:rgba(119,71,24,.36);color:#f3b963;font-size:10px}.ebr-logic-title p{margin:1px 0 0;color:#bda98e;font-size:10px}
.ebr-logic-item{margin-top:10px;padding:12px 13px;border:1px solid rgba(191,132,62,.3);border-radius:10px;background:rgba(17,18,23,.72)}.ebr-logic-item.confirmed{border-color:rgba(74,177,111,.42);background:rgba(18,48,31,.48)}.ebr-logic-item.rejected{opacity:.72;border-color:#444a55;background:rgba(29,31,37,.66)}
.ebr-logic-item>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.ebr-logic-item>header strong{color:#f2e4cf;font-size:12px;line-height:1.6}.ebr-logic-item>header em{flex:0 0 auto;padding:3px 7px;border-radius:999px;background:#3c3023;color:#eabb77;font-size:9px;font-style:normal}.ebr-logic-item.confirmed>header em{background:#183e28;color:#8be0a7}.ebr-logic-item.rejected>header em{background:#30333a;color:#aeb4c0}
.ebr-logic-meta{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.ebr-logic-meta span{padding:4px 7px;border:1px solid #363a43;border-radius:6px;background:#202229;color:#aeb4c0;font-size:9px}.ebr-logic-item p{margin:7px 0;color:#b7bdc7;font-size:10px;line-height:1.65}.ebr-logic-item p b{color:#d8c49f}
.ebr-logic-item label{display:block;margin-top:8px;color:#d8c49f;font-size:10px}.ebr-logic-item textarea{width:100%;min-height:92px;margin-top:6px;padding:9px 10px;box-sizing:border-box;border:1px solid #3e414a;border-radius:8px;background:#13151a;color:#edf0f5;font:11px/1.65 "Microsoft YaHei",sans-serif;resize:vertical;outline:none}.ebr-logic-item textarea:focus{border-color:#d2913c;box-shadow:0 0 0 2px rgba(210,145,60,.12)}
.ebr-logic-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}.ebr-logic-actions button{height:31px;padding:0 11px;border:1px solid #414650;border-radius:7px;background:#24272e;color:#c5cad3;font-size:10px;cursor:pointer}.ebr-logic-actions button.primary{border-color:#b87728;background:#9a5e1c;color:#fff}.ebr-logic-item.confirmed .ebr-logic-actions button.primary{border-color:#3d9d62;background:#236e41}
.ebr-document-workspace{flex:1;min-height:0;margin:14px 24px}
.ebr-document-editor{width:100%;height:100%;box-sizing:border-box;padding:20px 22px;border:1px solid #303541;border-radius:10px;background:#11141a;color:#e8ebf1;font:13px/1.9 "Microsoft YaHei",sans-serif;white-space:pre-wrap;resize:none;outline:none}
.ebr-document-editor:focus{border-color:#7567ff;box-shadow:0 0 0 2px rgba(117,103,255,.1)}
.ep-ai-text-workspace{display:flex;gap:0;min-width:0;min-height:0;overflow:hidden}
.ep-ai-text-main{flex:1;min-width:0;min-height:0;transition:width 180ms ease}
.ep-ai-text-side{width:0;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;gap:9px;overflow:hidden;opacity:0;transform:translateX(10px);transition:width 180ms ease,min-width 180ms ease,opacity 150ms ease,transform 180ms ease}
.ep-ai-text-side.show{width:400px;min-width:400px;margin-left:12px;overflow:visible;opacity:1;transform:translateX(0)}
.ep-ai-text-side.show{justify-content:stretch}
.ep-ai-chat-head{min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px;border:1px solid #363c48;border-radius:10px;background:#171a21;color:#dfe3ea;font-size:11px}
.ep-ai-chat-heading{min-width:0;display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:4px}
.ep-ai-chat-badge{display:inline-flex;align-items:center;min-height:23px;padding:0 9px;border:1px solid #d7b86f;border-radius:7px;background:linear-gradient(180deg,#f1dfae,#d8bd78);box-shadow:0 3px 10px rgba(212,177,91,.16);color:#3b2e12;font-size:10px;font-weight:700;line-height:1;pointer-events:none;user-select:none}
.ep-ai-chat-heading small{display:block;max-width:100%;overflow:hidden;color:#aaa28d;font-size:9px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.ep-ai-model-picker{position:relative;flex:0 0 190px;min-width:190px}
.ep-ai-model-picker>select{display:none}
.ep-ai-model-picker>button{width:100%;height:32px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border:1px solid #3b414e;border-radius:8px;background:#20232b;color:#e5e8ee;font-size:10px;outline:none;cursor:pointer}
.ep-ai-model-picker>button:hover,.ep-ai-model-picker>button:focus{border-color:#676d77;background:#272a31;box-shadow:0 0 0 2px rgba(123,117,164,.12)}
.ep-ai-model-picker>button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.ep-ai-model-picker>button i{flex:0 0 auto;color:#858c99;font-size:12px;font-style:normal}
.ep-ai-model-option-picker.option-picker{position:fixed;z-index:100800;min-width:190px;max-width:min(360px,calc(100vw - 16px));max-height:320px;overflow-y:auto}
.ep-ai-model-option-picker .option-picker-item{white-space:normal;word-break:break-word}
.ep-ai-conversation{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:11px;overflow:auto;border:1px solid #333946;border-radius:10px;background:#12151b}
.ep-ai-message{max-width:88%;padding:9px 10px;border-radius:10px;color:#e4e7ed;font-size:11px;line-height:1.65;white-space:normal;word-break:break-word}
.ep-ai-message small{display:block;margin-bottom:4px;color:#7f8795;font-size:8px}.ep-ai-message.user{align-self:flex-end;background:#292441;border:1px solid #48406e}.ep-ai-message.assistant{align-self:flex-start;background:#1d2027;border:1px solid #343944}
.ep-ai-message button{display:block;margin-top:8px;padding:5px 9px;border:1px solid #5f56bd;border-radius:6px;background:#2b2750;color:#dcd8ff;font-size:9px;cursor:pointer}.ep-ai-message button:disabled{opacity:.65;cursor:default}
.ep-ai-message button[data-ai-apply-message]{position:sticky;bottom:0}
.ep-ai-message button[data-ai-apply-message].applied,.ep-ai-message button[data-ai-apply-message].applied:disabled{border-color:#3c9a64;background:#175c39;color:#c9f7db;opacity:1;cursor:default}
.ep-ai-revision{display:none;min-height:0;max-height:58%;padding:11px;border:1px solid #3a4050;border-radius:10px;background:#151820;box-shadow:0 10px 30px rgba(0,0,0,.28)}
.ep-ai-revision.show{display:flex;flex-direction:column}
.ep-ai-revision-label{margin-bottom:8px;color:#8f83ff;font-size:11px;font-weight:700}
.ep-ai-revision pre{flex:1;min-height:70px;margin:0;padding:10px;overflow:auto;border:1px solid #2f3440;border-radius:8px;background:#0e1117;color:#e7eaf0;font:12px/1.7 "Microsoft YaHei",sans-serif;white-space:pre-wrap;word-break:break-word}
.ep-ai-revision-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}.ep-ai-revision-actions button{height:31px;padding:0 10px;border:1px solid #343a47;border-radius:7px;background:#20232b;color:#bdc3ce;font-size:10px;cursor:pointer}.ep-ai-revision-actions button.primary{border-color:#7164eb;background:#6558df;color:#fff}
.ep-ai-chat{display:flex;align-items:flex-end;gap:7px;padding:9px;border:1px solid #373d49;border-radius:10px;background:#171a21;box-shadow:0 12px 32px rgba(0,0,0,.32)}
.ep-ai-chat textarea{flex:1;min-width:0;height:74px;box-sizing:border-box;padding:9px;border:0;background:transparent;color:#edf0f5;font:11px/1.55 "Microsoft YaHei",sans-serif;resize:none;outline:none}
.ep-ai-chat button{height:31px;padding:0 11px;border:1px solid #7164eb;border-radius:7px;background:#6558df;color:#fff;font-size:10px;cursor:pointer}.ep-ai-chat button:disabled{opacity:.55;cursor:wait}
.ep-ai-track-view{display:none;width:100%;height:100%;box-sizing:border-box;padding:22px;overflow:auto;border:1px solid #303541;border-radius:10px;background:#11141a;color:#e8ebf1;font:13px/1.9 "Microsoft YaHei",sans-serif;white-space:normal;word-break:break-word}
.ep-ai-track-view.show{display:block}
.ep-ai-old-text{display:block;margin:7px 0 0;padding:8px 10px;border-left:3px solid #cf6666;border-radius:5px;background:rgba(174,67,67,.13);color:#efa2a2}
.ep-ai-new-text{display:block;margin:4px 0 8px;padding:8px 10px;border-left:3px solid #62bc83;border-radius:5px;background:rgba(65,157,98,.13);color:#b7edc9}.ep-ai-new-text b{display:block;margin-bottom:3px;color:#6fd293;font-size:10px}
.ep-ai-confirm-bar{position:absolute;z-index:4;left:18px;right:18px;bottom:16px;display:none;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #4a5060;border-radius:10px;background:rgba(24,27,34,.97);box-shadow:0 12px 35px rgba(0,0,0,.48);color:#dfe3ea;font-size:10px}
.ep-ai-confirm-bar.show{display:flex}.ep-ai-confirm-bar>div{display:flex;gap:7px}.ep-ai-confirm-bar button{height:30px;padding:0 10px;border:1px solid #3a404d;border-radius:7px;background:#22252d;color:#c7ccd5;font-size:9px;cursor:pointer}.ep-ai-confirm-bar button.primary{border-color:#6559d4;background:#5c50ca;color:#fff}
.ep-ai-text-main{position:relative}
.episode-ai-document-editor{position:fixed;inset:0;z-index:100090;display:flex;align-items:center;justify-content:center;padding:26px;background:rgba(4,5,8,.78);backdrop-filter:blur(7px)}
.episode-ai-document-editor>section{width:min(1120px,95vw);height:min(820px,92vh);display:flex;flex-direction:column;overflow:hidden;border:1px solid #343946;border-radius:16px;background:#101218;color:#eef1f7;box-shadow:0 28px 90px rgba(0,0,0,.62)}
.episode-ai-document-editor header{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 22px 14px;border-bottom:1px solid #292d37}.episode-ai-document-editor header small{color:#8f83ff}.episode-ai-document-editor header h3{margin:4px 0 0;font-size:20px}.episode-ai-document-editor header button{width:33px;height:33px;border:0;border-radius:8px;background:#20232c;color:#dce0e8;font-size:21px;cursor:pointer}
.episode-ai-document-editor .ep-ai-text-workspace{flex:1;margin:18px 22px}
.episode-ai-document-editor .ep-ai-text-side.show{align-self:stretch}
.episode-ai-document-editor .ep-ai-text-main>textarea{width:100%;height:100%;box-sizing:border-box;padding:22px;border:1px solid #303541;border-radius:10px;background:#11141a;color:#e8ebf1;font:13px/1.9 "Microsoft YaHei",sans-serif;white-space:pre-wrap;resize:none;outline:none}.episode-ai-document-editor .ep-ai-text-main>textarea:focus{border-color:#7567ff}
.episode-ai-document-editor footer{display:flex;align-items:center;justify-content:space-between;padding:12px 22px;border-top:1px solid #292d37;color:#858c99;font-size:11px}.episode-ai-document-editor footer button{height:34px;padding:0 14px;border:1px solid #7164eb;border-radius:8px;background:#6558df;color:#fff;cursor:pointer}
@media(max-width:820px){.ep-ai-text-side.show{width:320px;min-width:320px}.ep-ai-model-picker{flex-basis:150px;min-width:150px}.episode-ai-document-editor{padding:8px}.episode-baseline-review>section>.ebr-top{padding-left:14px;padding-right:14px}.ebr-document-workspace{margin-left:14px;margin-right:14px}}
.episode-baseline-review .ebr-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:16px 24px 22px}
.episode-baseline-review .ebr-scroll>.ebr-top{margin:0 0 18px;padding:0}
.episode-baseline-review .ebr-logic-review{display:none;margin:0 0 22px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.episode-baseline-review .ebr-logic-review.show{display:block;max-height:none;overflow:visible}
.episode-baseline-review .ebr-logic-title{display:flex;align-items:baseline;gap:9px;margin:0 0 14px}
.episode-baseline-review .ebr-logic-title b{color:#f0b35e;font-size:15px}
.episode-baseline-review .ebr-logic-title span{padding:0;border:0;background:none;color:#d79942;font-size:11px}
.episode-baseline-review .ebr-logic-title p{flex:1;margin:0;color:#9b8e7d;font-size:11px}
.episode-baseline-review .ebr-logic-item{margin:0 0 20px;padding:0;border:0;border-radius:0;background:none;opacity:1}
.episode-baseline-review .ebr-logic-item.confirmed,.episode-baseline-review .ebr-logic-item.rejected{border:0;background:none;opacity:1}
.episode-baseline-review .ebr-logic-item-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 7px}
.episode-baseline-review .ebr-logic-item-head strong{color:#f1f3f7;font-size:14px;line-height:1.65}
.episode-baseline-review .ebr-logic-item p{margin:5px 0;color:#b7bdc7;font-size:12px;line-height:1.75}
.episode-baseline-review .ebr-logic-item p b,.episode-baseline-review .ebr-logic-item label{color:#d7b984}
.episode-baseline-review .ebr-logic-item textarea{min-height:88px;margin-top:7px;border-color:#343943;border-radius:8px;background:#15181e;font-size:12px;line-height:1.75}
.episode-baseline-review .ebr-logic-actions{flex:0 0 auto;display:flex;gap:7px;margin:0}
.episode-baseline-review .ebr-logic-actions button{height:31px;padding:0 12px}
.episode-baseline-review .ebr-document-workspace{display:flex;align-items:flex-start;min-height:0;margin:0;overflow:visible}
.episode-baseline-review .ebr-document-workspace .ep-ai-text-main{flex:1;min-width:0;width:auto}
.episode-baseline-review .ebr-document-editor{display:block;height:auto;min-height:360px;overflow:hidden;resize:none}
.episode-baseline-review .ebr-document-workspace .ep-ai-text-side{position:sticky;top:0;align-self:flex-start;height:min(580px,calc(100vh - 220px));z-index:2;box-shadow:0 18px 55px rgba(0,0,0,.55)}
.episode-baseline-review .ebr-document-workspace.ai-open{align-items:stretch;height:min(580px,calc(100vh - 220px));overflow:hidden}
.episode-baseline-review .ebr-document-workspace.ai-open .ep-ai-text-main{height:100%;min-height:0}
.episode-baseline-review .ebr-document-workspace.ai-open .ebr-document-editor{height:100%!important;min-height:0;overflow-x:hidden;overflow-y:auto!important;scrollbar-gutter:stable}
.episode-baseline-review .ebr-document-workspace.ai-open .ep-ai-text-side{position:relative;top:auto;align-self:stretch;height:100%}
.episode-baseline-review.is-readonly header small{color:#79c998}.episode-baseline-review.is-readonly header small:after{content:' · 已确认，只读'}
.episode-baseline-review.is-readonly .ebr-top select:disabled,.episode-baseline-review.is-readonly .ebr-top input:disabled{opacity:1;border-color:#282d37;background:#13161c;color:#bfc5cf;cursor:default}
.episode-baseline-review.is-readonly .ebr-document-editor[readonly],.episode-baseline-review.is-readonly .ebr-logic-item textarea[readonly]{border-color:transparent;background:transparent;box-shadow:none;cursor:default}
@media(max-width:820px){.episode-baseline-review .ebr-scroll{padding-left:14px;padding-right:14px}.episode-baseline-review .ebr-logic-item-head{display:block}.episode-baseline-review .ebr-logic-actions{margin-top:8px}}
.episode-materials-source [data-material-context-chip]{display:inline-flex;margin-left:8px;vertical-align:middle}
.episode-materials-source{flex-wrap:wrap}.episode-materials-advanced{display:flex!important;flex:0 0 calc(100% + 52px)!important;box-sizing:border-box;width:calc(100% + 52px);margin:0 -26px -11px;align-items:center;justify-content:flex-end;gap:10px;padding:9px 26px;border-top:1px solid #202a38;background:#0a0f18;color:#8492a6;font-size:11px}
.episode-materials-advanced.hidden{display:none!important}.episode-materials-advanced label{display:flex;align-items:center;gap:6px;color:#aebbd0}.episode-materials-advanced select{max-width:220px}
.eps-dialogue-list{display:flex;flex-direction:column;gap:7px}.eps-dialogue-line{line-height:1.55}.eps-dialogue-line b{color:#93c5fd}.eps-dialogue-line>span{display:inline;outline:none}.eps-dialogue-line>span:focus{background:#172554}
.eps-coverage-ok{display:inline-flex;margin-top:7px;padding:5px 9px;border:1px solid #166534;border-radius:999px;background:#052e1a;color:#86efac;font-size:12px}
.audio-library-sources{display:flex;gap:6px;align-items:center}
.audio-library-sources button{border:1px solid #343943;background:#181b21;color:#aeb5c0;border-radius:8px;padding:7px 12px;cursor:pointer}
.audio-library-sources button.active{background:#f2f3f5;color:#16181d;border-color:#f2f3f5}
.audio-library-genders{display:flex;gap:4px;align-items:center;padding:3px;border:1px solid #343943;border-radius:8px;background:#17191e}
.audio-library-genders.hidden{display:none}
.audio-library-genders button{border:0;border-radius:6px;background:transparent;color:#9da2ac;padding:6px 10px;cursor:pointer;white-space:nowrap}
.audio-library-genders button.active{background:#454a54;color:#fff}
.audio-library-manage{position:relative;margin-left:auto}
.audio-library-manage-trigger{border:1px solid #383d47;border-radius:8px;background:#1d2026;color:#d6dae1;padding:7px 12px;cursor:pointer;white-space:nowrap}
.audio-library-manage-trigger:hover{background:#292d35;color:#fff}
.audio-library-manage-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:120;width:238px;padding:12px;border:1px solid #393e48;border-radius:10px;background:#181b21;box-shadow:0 16px 42px rgba(0,0,0,.5);display:grid;gap:9px}
.audio-library-manage-menu.hidden{display:none}
.audio-library-manage-menu>b{font-size:13px;color:#f0f2f5}
.audio-library-cache-progress{color:#969da8;font-size:12px;line-height:1.5}
.audio-library-cache,.audio-library-cache-stop{border:1px solid #383d47;border-radius:8px;background:#1d2026;color:#e8ebef;padding:7px 12px;cursor:pointer;white-space:nowrap}
.audio-library-cache:hover{background:#292d35}.audio-library-cache:disabled{opacity:.65;cursor:default}
.audio-library-cache-stop{border-color:#6b3c3c;color:#ffaaaa;background:#281b1d}
.audio-library-cache-stop.hidden{display:none}
.audio-library-card-official{border-color:#353b47}
.official-voice-badge{display:inline-flex;width:max-content;padding:5px 9px;border-radius:7px;background:#242b38;color:#dce6ff;font-size:12px}
.official-voice-note{color:#929aa8;font-size:12px;line-height:1.6;margin:4px 0 0}
.audio-legacy-auth{border:1px solid #363c47;border-radius:10px;padding:12px;margin:4px 0 10px;background:#171a20}
.audio-legacy-auth>small{display:block;color:#d7b86a;margin-bottom:10px;line-height:1.5}
.character-library-view{height:100%;min-height:0;overflow:auto;padding:18px 20px 26px;box-sizing:border-box}
.character-library-head,.character-library-toolbar{display:flex;align-items:center;gap:12px}
.character-library-head{justify-content:space-between;margin-bottom:14px}.character-library-head>div{display:flex;align-items:baseline;gap:10px}.character-library-head b{font-size:16px;color:#f0f2f5}.character-library-head span,.character-library-summary{color:#8f96a2;font-size:12px}
.character-library-add{border:1px solid #454b57;border-radius:8px;background:#f2f3f5;color:#16181d;padding:8px 14px;cursor:pointer}
.character-library-toolbar{margin-bottom:10px}.character-library-toolbar input{width:min(420px,100%);height:36px;border:1px solid #343943;border-radius:8px;background:#15181e;color:#e8ebef;padding:0 12px}
.character-picker-overlay{z-index:100300!important}
.character-picker-filter-group{display:flex;align-items:center;gap:4px;padding-right:8px;border-right:1px solid #303640}
.character-picker-filter-group button{white-space:nowrap}
.character-library-summary{margin:0 0 14px}.character-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;align-content:start}
.character-library-card{display:flex;flex-direction:column;min-width:0}.character-library-cover{height:auto!important;aspect-ratio:1/1;background-color:#101216!important;background-size:cover!important;background-position:center!important}.character-library-cover.has-image:before,.character-picker-image.has-image:before{content:'';position:absolute;inset:-2px;background:rgba(8,10,14,.36);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}.character-library-cover img{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain}.character-library-placeholder{color:#555e6b;font-size:14px}.character-library-name{flex:0 0 18px;white-space:nowrap;text-overflow:ellipsis}
.character-library-voice{display:flex;align-items:center;gap:5px;width:calc(100% - 10px);height:25px;margin:0 5px 5px;padding:0 7px;border:1px solid #2b4638;border-radius:5px;background:#11261d;color:#78c99d;cursor:pointer;min-width:0}.character-library-voice.missing{border-color:#594726;background:#2a2213;color:#d8b565}.character-library-voice span{flex:0 0 auto;font-size:9px}.character-library-voice em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:9px;text-align:left}
.character-library-editor-overlay{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.62)}.character-library-editor{width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;padding:18px;border:1px solid #3a404b;border-radius:13px;background:#171a20;box-shadow:0 22px 70px rgba(0,0,0,.65)}
.character-library-editor header,.character-library-editor footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.character-library-editor header{margin-bottom:14px}.character-library-editor header button{border:0;background:transparent;color:#aeb4bf;font-size:22px;cursor:pointer}.character-library-editor label{display:grid;gap:6px;margin:11px 0;color:#adb4bf;font-size:12px}.character-library-editor input{height:38px;border:1px solid #343a45;border-radius:8px;background:#11141a;color:#edf0f4;padding:0 11px}.character-library-editor footer{justify-content:flex-end;margin-top:16px}.character-library-editor footer button{border:1px solid #3b414c;border-radius:8px;background:#20242b;color:#dce0e7;padding:8px 15px;cursor:pointer}.character-library-editor footer button.primary{background:#f2f3f5;color:#16181d;border-color:#f2f3f5}
.character-editor-media{display:grid;gap:7px;margin:13px 0}.character-editor-media>b{color:#adb4bf;font-size:12px}.character-editor-media>button{width:100%;border:1px solid #343a45;border-radius:9px;background:#11141a;color:#b9c0cb;cursor:pointer;overflow:hidden}.character-editor-image{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px}.character-editor-image img{display:block;max-width:100%;height:145px;object-fit:contain}.character-editor-image i{font-size:28px;font-style:normal;color:#707784}.character-editor-image span,.character-editor-voice span{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.character-editor-voice{height:46px;display:flex;align-items:center;gap:10px;padding:0 13px;text-align:left}.character-editor-voice i{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#292e37;color:#fff;font-style:normal}
.character-picker-overlay{position:fixed;inset:0;z-index:10100;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.7)}.character-picker{width:min(900px,calc(100vw - 42px));height:min(680px,calc(100vh - 42px));display:flex;flex-direction:column;border:1px solid #3b414c;border-radius:13px;background:#15181e;box-shadow:0 26px 80px rgba(0,0,0,.7);overflow:hidden}.character-picker header{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid #2b3038}.character-picker header button{border:0;background:transparent;color:#aeb4bf;font-size:22px;cursor:pointer}.character-picker nav{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1px solid #282d35}.character-picker nav button{height:31px;padding:0 12px;border:1px solid #353b45;border-radius:7px;background:#20242b;color:#aeb4bd;cursor:pointer}.character-picker nav button.active{background:#f0f1f3;color:#15171b;border-color:#f0f1f3}.character-picker nav [data-picker-upload]{margin-left:auto}.character-picker-grid{flex:1;min-height:0;height:0;overflow-x:hidden;overflow-y:scroll;scrollbar-gutter:stable;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-auto-rows:max-content;align-content:start;align-items:start;gap:10px;padding:14px}.character-picker-grid::-webkit-scrollbar{width:9px}.character-picker-grid::-webkit-scrollbar-thumb{border:2px solid #15181e;border-radius:8px;background:#4a505b}.character-picker-card{align-self:start;min-width:0;height:max-content;padding:0;border:1px solid #2d323b;border-radius:9px;background:#171a20;color:#e7e9ed;overflow:hidden;cursor:pointer;text-align:left}.character-picker-card:hover{border-color:#626a77}.character-picker-image{position:relative;display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;background-color:#0f1116;background-size:cover;background-position:center;overflow:hidden}.character-picker-image img{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain}.character-picker-audio{display:grid;place-items:center;width:100%;height:70px;background:#11151b;color:#d8c783;font-size:25px}.character-picker-card b,.character-picker-card small{display:block;margin:7px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.character-picker-card b{font-size:11px}.character-picker-card small{margin-top:-3px;color:#7f8792;font-size:9px}
/* === 整季短剧创作 v1：全季基准、分集规划、分集剧本与按集制作 === */
.season-production-node .season-node-card{width:440px;min-height:390px;padding:16px;display:flex;flex-direction:column;gap:12px;overflow:visible}
.season-node-card>textarea{width:100%;height:190px;resize:none;border:1px solid #30343d;border-radius:10px;background:#11141a;color:#e9ebf0;padding:12px;line-height:1.65;box-sizing:border-box}
.season-node-actions button.danger{border-color:#713c3c;color:#ffb4b4;background:#281719}.season-console-card{width:390px;min-height:250px;padding:16px;display:flex;flex-direction:column;gap:16px}.season-console-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px}.season-console-stats span{border:1px solid #303640;border-radius:9px;padding:12px;color:#aeb4c0;font-size:12px}.season-console-stats b{font-size:20px;color:#fff;margin-right:3px}.season-console-card>button{margin-top:auto;height:38px;border:0;border-radius:9px;background:#f3f3f3;color:#111;cursor:pointer}
.production-node-settings-tray{width:560px!important;min-width:560px!important;max-width:560px!important;display:flex;flex-direction:row;align-items:center;gap:8px;padding:10px 12px!important;background:#1a1d24!important;border-color:#30343d!important;z-index:100300}
.production-node-settings-tray[style*="display:none"]{display:none!important}
.production-node-settings-tray .nip-info{position:relative;flex:1;min-width:0;height:44px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:6px 11px;border:1px solid #333842;border-radius:9px;background:#20232a;color:#d9dde5;text-align:left;cursor:pointer}
.production-node-settings-tray .nip-info:hover{border-color:#666c78;background:#272a31}.production-node-settings-tray .nip-info:disabled{opacity:.45;cursor:not-allowed}
.production-node-settings-tray .nip-info-label{grid-column:1;color:#777f8e;font-size:8px;line-height:1}.production-node-settings-tray .nip-info-text{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#edf0f5;font-size:10px;line-height:1.25}.production-node-settings-tray .nip-info-arrow{grid-column:2;grid-row:1/3;color:#7f8794;font-size:13px}
.production-node-settings-picker.option-picker{min-width:150px;max-height:min(360px,calc(100vh - 16px));overflow-y:auto}
.season-node-actions{display:flex;justify-content:flex-end;gap:8px}.season-node-actions button,.season-baseline button,.season-studio>header button,.season-workspace-bar button,.season-episode-info>button,.season-error>button{border:1px solid #343943;border-radius:8px;background:#1a1e25;color:#e8eaf0;padding:8px 13px;cursor:pointer}.season-node-actions button.primary,.season-baseline button.primary{background:#f3f3f3;color:#111;border-color:#f3f3f3}.season-node-actions button:disabled{opacity:.38;cursor:not-allowed}
.season-node-progress{display:grid;grid-template-columns:1fr;gap:6px;color:#9da4b0;font-size:12px}.season-node-progress:before{content:"";height:3px;border-radius:9px;background:#2b3039;grid-area:1/1}.season-node-progress i{height:3px;border-radius:9px;background:#fff;grid-area:1/1;z-index:1;max-width:100%}
.season-script-test-draft{margin:16px 0;border:1px solid #4b5565;border-radius:12px;background:#12161d;overflow:hidden}.season-script-test-draft>header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #303743}.season-script-test-draft>header div{display:flex;flex-direction:column;gap:3px}.season-script-test-draft>header small{color:#aeb5c2}.season-script-test-draft>header button{border:1px solid #6d7788;border-radius:8px;background:#eef1f5;color:#111;padding:7px 11px;cursor:pointer}.season-script-test-draft>pre{margin:0;padding:15px;max-height:420px;overflow:auto;white-space:pre-wrap;color:#e8ebf1;line-height:1.75;font:13px/1.75 inherit}
.season-overlay{position:fixed;inset:0;z-index:5600;background:#0e1014;display:flex;align-items:stretch;justify-content:stretch;padding:0;box-sizing:border-box}.season-studio{width:100vw;height:100vh}.season-studio,.season-baseline{background:#0e1014;border:0;border-radius:0;box-shadow:none;overflow:hidden;color:#e9ebf0;display:flex;flex-direction:column}.season-studio>header,.season-baseline>header{height:74px;flex:none;display:flex;align-items:center;gap:24px;padding:0 24px;border-bottom:1px solid #282c33}.season-studio>header>div{min-width:240px}.season-studio header small,.season-baseline header small{color:#b99b55}.season-studio header h2,.season-baseline header h2{margin:4px 0 0;font-size:18px}.season-studio header nav{display:flex;gap:8px;margin:auto}.season-studio header nav button{border-radius:999px;padding:9px 18px}.season-studio header nav button.active{background:#f5f5f5;color:#111}.season-studio header>.season-back-canvas{margin-left:auto;width:auto;height:34px;padding:0 12px;font-size:12px;border:1px solid #343943;background:#1a1e25}.season-baseline header>[data-close]{margin-left:auto;font-size:22px;border:0;background:transparent}.season-studio>main{flex:1;min-height:0;overflow:auto;padding:26px 30px}.season-section-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.season-section-head h3{margin:0 0 7px;font-size:24px}.season-section-head p{margin:0;color:#8e96a5}.season-section-head>span{border:1px solid #343a45;border-radius:999px;padding:6px 12px;color:#cdd1d9}.season-progress{height:4px;background:#262b33;border-radius:99px;margin-bottom:22px;overflow:hidden}.season-progress i{display:block;height:100%;background:#f4f4f4}.season-error{padding:12px;border:1px solid #6b3232;background:#2a1515;color:#ffb1b1;border-radius:9px;margin-bottom:16px}
.season-outline-list{display:flex;flex-direction:column;gap:8px}.season-outline-list details{border:1px solid #292e37;border-radius:10px;background:#12151a}.season-outline-list summary{list-style:none;display:flex;justify-content:space-between;padding:14px 16px;cursor:pointer}.season-outline-list summary::-webkit-details-marker{display:none}.season-outline-list summary span{color:#9098a6;font-size:12px}.season-outline-detail{border-top:1px solid #292e37;padding:16px;color:#c8ccd4;line-height:1.65}.season-outline-detail p{margin:0 0 9px}.season-outline-detail pre{white-space:pre-wrap;font-family:inherit;background:#0c0e12;border-radius:9px;padding:18px;max-height:560px;overflow:auto;color:#e8eaf0}
.season-outline-script{position:relative;cursor:text;border:1px solid transparent;border-radius:9px;transition:border-color .16s ease,box-shadow .16s ease}.season-outline-script:hover{border-color:#596273;box-shadow:0 0 0 1px rgba(255,255,255,.03)}.season-outline-script-hint{position:absolute;right:12px;top:10px;z-index:1;padding:4px 8px;border-radius:6px;background:#20252e;color:#aeb5c1;font-size:11px;opacity:0;pointer-events:none;transition:opacity .16s ease}.season-outline-script:hover .season-outline-script-hint{opacity:1}
.season-asset-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.season-asset-grid article{min-height:150px;border:1px solid #2a2f38;border-radius:12px;background:#13161b;padding:12px;display:flex;flex-direction:column;justify-content:space-between}.season-asset-grid article>div{height:96px;border:1px dashed #3a404b;border-radius:8px;display:grid;place-items:center;color:#777f8c}.season-empty{color:#8e96a5}.season-episode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.season-episode-grid article{display:flex;gap:14px;min-height:150px;border:1px solid #2a2f38;border-radius:14px;background:#13161b;padding:12px}.season-episode-cover{width:112px;flex:none;border-radius:10px;background:linear-gradient(145deg,#322519,#11161d);display:grid;place-items:center;font-size:30px;color:#d7bf88}.season-episode-info{flex:1;min-width:0}.season-episode-info h4{margin:8px 0;font-size:16px}.season-episode-info p{height:38px;overflow:hidden;margin:0 0 10px;color:#9098a6;line-height:1.5}.season-episode-info span{font-size:11px;border-radius:99px;padding:4px 8px}.season-episode-info span.ready{background:#193426;color:#8ee0ae}.season-episode-info span.pending{background:#302c20;color:#dbc885}.season-episode-info button:disabled{opacity:.4;cursor:not-allowed}
.season-asset-extraction{width:min(760px,calc(100% - 40px));margin:8vh auto 0;padding:42px 44px;border:1px solid #2b3039;border-radius:18px;background:#13161b;text-align:center;box-sizing:border-box}.season-asset-extraction-icon{width:54px;height:54px;margin:0 auto 18px;border:1px solid #4a5260;border-radius:50%;display:grid;place-items:center;color:#d6bc7b;font-size:25px}.season-asset-extraction h3{margin:0 0 12px;font-size:24px}.season-asset-extraction p{margin:0 auto 20px;max-width:650px;color:#9aa2af;line-height:1.75}.season-asset-rule-row{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-bottom:24px}.season-asset-rule-row span{padding:6px 11px;border:1px solid #343a45;border-radius:999px;color:#c9ced7;font-size:12px}.season-asset-extraction>button{display:block;margin:0 auto 11px;border:1px solid #f1f1f1;border-radius:9px;background:#f1f1f1;color:#111;padding:10px 22px;cursor:pointer}.season-asset-extraction>button:disabled{opacity:.4;cursor:not-allowed}.season-asset-extraction>small{color:#777f8c}.season-asset-evidence-actions{display:flex;align-items:center;gap:7px}.season-asset-evidence-actions small{margin-right:4px;color:#8e96a5}.season-asset-evidence-actions button{padding:6px 10px;font-size:12px}
.season-baseline{width:min(980px,94vw);height:min(860px,92vh)}.season-baseline header{height:auto;min-height:88px}.season-baseline header p{margin:5px 0 0;color:#929aa7}.season-baseline>main{flex:1;min-height:0;overflow:auto;padding:22px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.season-baseline label{display:flex;flex-direction:column;gap:7px;color:#cbd0d9;font-size:13px}.season-baseline input,.season-baseline textarea{border:1px solid #303640;border-radius:8px;background:#14171c;color:#f0f1f4;padding:10px;box-sizing:border-box}.season-baseline textarea{height:110px;resize:vertical;line-height:1.55}.season-baseline>footer{height:68px;flex:none;border-top:1px solid #282c33;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:0 22px}
.season-studio>main.season-embedded-workspace{overflow:hidden;padding:0;display:flex;flex-direction:column}.season-workspace-bar{height:56px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 20px;border-bottom:1px solid #282c33;background:#11141a}.season-workspace-bar>div{display:flex;align-items:center;gap:8px}.season-workspace-bar button{padding:7px 12px}.season-workspace-bar button.active{background:#f3f3f3;color:#111}.season-workspace-bar small{color:#8e96a5}.season-reuse-host.eps-shell{width:100%;height:auto;flex:1;min-height:0;position:relative;display:flex;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#0d0f12}.season-reuse-host>.eps-body{width:100%;flex:1;min-width:0;min-height:0;overflow:auto;box-sizing:border-box}.season-reuse-host>.eps-detail-drawer{z-index:8}.season-reuse-host .eps-asset-sections{width:100%;box-sizing:border-box}.season-reuse-host .eps-asset-grid{width:100%;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.season-reuse-host .eps-global-stylebar{margin-left:0;margin-right:0}.season-episode-workspace-bar b{max-width:380px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1000px){.season-asset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.season-episode-grid{grid-template-columns:1fr}.season-baseline>main{grid-template-columns:1fr}}

/* 生产工作台统一采用全屏承载；确认创作基准仍保留为居中弹窗。 */
.eps-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
.season-baseline-overlay{align-items:center;justify-content:center;padding:24px;background:rgba(5,7,10,.78)}
.season-baseline-overlay>.season-baseline{width:min(980px,94vw);height:min(860px,92vh);border:1px solid #2d3139;border-radius:16px;box-shadow:0 28px 90px rgba(0,0,0,.58)}

/* 整季复用单集资产组件时，编辑抽屉必须位于自身遮罩之上。 */
.season-reuse-host>.eps-asset-editor-scrim{z-index:31}
.season-reuse-host>.eps-detail-drawer.eps-asset-editor-drawer{z-index:32}
