/* ══════════════════════════════════════════
   剧集工坊 · DramaForge
   浅色主题 / 卡片式 / 大字号，新手友好
   ══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e3e6eb;
  --border-light: #eef0f4;
  --text: #171a21;
  --text-muted: #656d7d;
  --text-faint: #9aa1af;

  --accent: #5b57f5;
  --accent-hover: #4a46e0;
  --accent-light: #ecebff;
  --accent-dim: rgba(91, 87, 245, .10);

  --success: #12915a;
  --success-light: #e3f8ee;
  --warn: #c2790a;
  --warn-light: #fdf3dc;
  --danger: #d63a3a;
  --danger-light: #fdeaea;
  --text-danger: #d63a3a;

  --sidebar-w: 236px;
  --topbar-h: 58px;
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 3px 12px rgba(16, 24, 40, .07);
  --shadow-lg: 0 14px 40px rgba(16, 24, 40, .14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --t: 150ms ease;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ══ 侧栏 ══ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--t), min-width var(--t);
  z-index: 20;
}
.sidebar.collapsed { width: 60px; min-width: 60px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .project-switcher { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 16px 0; }

.sidebar-logo {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 18px 14px;
  font-weight: 700; font-size: 15.5px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.logo-icon { font-size: 20px; }

.nav-block { padding: 8px 0; border-bottom: 1px solid var(--border-light); }

/* 剧集切换器 */
.project-switcher { padding: 10px 12px; position: relative; flex-shrink: 0; }
.project-current {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; user-select: none;
  transition: background var(--t), border-color var(--t);
}
.project-current:hover { background: var(--accent-dim); border-color: var(--accent); }
.pc-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.project-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-meta { font-size: 10.5px; color: var(--text-faint); }
.project-arrow { color: var(--text-faint); font-size: 10px; flex-shrink: 0; }

.project-dropdown {
  position: absolute; top: calc(100% - 6px); left: 12px; right: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 200; overflow: hidden;
}
.project-dropdown.hidden { display: none; }
.project-list { max-height: 240px; overflow-y: auto; }
.project-list-item {
  padding: 8px 12px; cursor: pointer; font-size: 12.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  transition: background var(--t);
}
.project-list-item:hover { background: var(--accent-dim); }
.project-list-item.active { color: var(--accent); font-weight: 600; }
.pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; }
.btn-create-project {
  width: 100%; padding: 9px 12px; text-align: left;
  background: none; border: none; border-top: 1px solid var(--border-light);
  color: var(--accent); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  transition: background var(--t);
}
.btn-create-project:hover { background: var(--accent-dim); }

/* 导航 */
.nav-main { flex: 1; padding: 6px 0; }
.nav-section-label {
  font-size: 10.5px; font-weight: 700; color: var(--text-faint);
  letter-spacing: .07em; text-transform: uppercase;
  padding: 14px 18px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background var(--t), color var(--t);
  position: relative;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 2px 2px 0; background: var(--accent);
}
.nav-icon { font-size: 15px; width: 19px; text-align: center; flex-shrink: 0; }
.nav-text { white-space: nowrap; }
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); margin-left: auto; flex-shrink: 0;
}
.nav-dot.hidden { display: none; }
.sidebar-footer { border-top: 1px solid var(--border-light); padding: 6px 0; flex-shrink: 0; }

/* 未进剧集时弱化工序导航 */
body:not(.in-project) .nav-main .nav-item[data-view="dashboard"],
body:not(.in-project) .nav-main .nav-item[data-view="characters"],
body:not(.in-project) .nav-main .nav-item[data-view="props"],
body:not(.in-project) .nav-main .nav-item[data-view="storyboard"],
body:not(.in-project) .nav-main .nav-item[data-view="output"] {
  opacity: .42;
}

/* ══ 主区 ══ */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-breadcrumb { font-size: 14.5px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.btn-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 15px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.btn-icon:hover { background: var(--bg); }

.demo-tag {
  padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: var(--warn-light); color: var(--warn);
}
.demo-tag.hidden { display: none; }

.credit-badge {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 20px;
  background: var(--success-light); color: var(--success);
  font-size: 12.5px; font-weight: 700;
  transition: background var(--t);
}
.credit-badge.over { background: var(--danger-light); color: var(--danger); }

.view-container { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

/* ══ 通用组件 ══ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }

.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.section-title { font-size: 17px; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; font-family: var(--font);
  transition: background var(--t), transform 80ms, box-shadow var(--t);
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg); }
.btn-secondary.danger { color: var(--danger); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px dashed var(--border); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b52f2f; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; border-radius: var(--radius); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.w-full { width: 100%; }

/* 表单 */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.form-label {
  font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.label-required {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--danger-light); color: var(--danger);
}
.label-hint { font-size: 11px; font-weight: 400; color: var(--text-faint); }
.form-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font); color: var(--text);
  background: var(--surface); outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-textarea { resize: vertical; min-height: 76px; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .form-group { margin-bottom: 13px; }

/* 徽标 / 标签 */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-purple { background: var(--accent-light); color: var(--accent); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-yellow { background: var(--warn-light); color: var(--warn); }
.badge-red { background: var(--danger-light); color: var(--danger); }

.tag-mini {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 4px;
  background: var(--bg); color: var(--text-muted);
  font-size: 10.5px; font-weight: 500;
}

/* 开关 */
.toggle-switch {
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer; user-select: none; flex-shrink: 0;
}
.toggle-switch input { display: none; }
.ts-track {
  width: 40px; height: 22px; border-radius: 20px;
  background: var(--border); position: relative;
  transition: background var(--t); flex-shrink: 0;
}
.ts-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--t);
}
.toggle-switch input:checked + .ts-track { background: var(--accent); }
.toggle-switch input:checked + .ts-track .ts-thumb { transform: translateX(18px); }
.ts-label { font-size: 12.5px; font-weight: 600; }
.toggle-switch.small .ts-track { width: 34px; height: 19px; }
.toggle-switch.small .ts-thumb { width: 15px; height: 15px; }
.toggle-switch.small input:checked + .ts-track .ts-thumb { transform: translateX(15px); }

.switch-row { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.switch-row input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

/* 分段标签 */
.seg-tabs {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--bg); border-radius: var(--radius);
  margin-bottom: 16px;
}
.seg-tab {
  padding: 7px 16px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font);
  transition: background var(--t), color var(--t);
  display: flex; align-items: center; gap: 6px;
}
.seg-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-count {
  font-size: 10.5px; padding: 0 5px; border-radius: 8px;
  background: var(--border-light); color: var(--text-faint);
}
.seg-tab.active .seg-count { background: var(--accent-light); color: var(--accent); }

/* 进度条 */
.progress-bar { height: 6px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }

/* 空状态 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 24px; text-align: center;
}
.empty-state-icon { font-size: 42px; margin-bottom: 12px; opacity: .9; }
.empty-state-title { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.empty-state-desc {
  font-size: 12.5px; color: var(--text-muted);
  max-width: 340px; line-height: 1.7; margin-bottom: 18px;
}

/* ══ 模态 ══ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(3px); padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 560px; max-width: 100%;
  max-height: 88vh; overflow-y: auto; position: relative;
  padding: 24px 26px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: var(--bg); cursor: pointer;
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.modal-close:hover { background: var(--border); }
.modal-title { font-size: 16.5px; font-weight: 700; margin-bottom: 16px; padding-right: 30px; }

/* Toast */
.toast-stack {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 8px; z-index: 2000;
  pointer-events: none;
}
.toast {
  padding: 11px 16px; border-radius: var(--radius);
  background: var(--text); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 13px;
  min-width: 200px; max-width: 380px;
  line-height: 1.5; white-space: pre-wrap;
  animation: toastIn .2s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 任务进度 */
.task-progress {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1500; backdrop-filter: blur(2px);
}
.task-progress.hidden { display: none; }
.tp-box {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 32px; box-shadow: var(--shadow-lg);
  text-align: center; min-width: 260px; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.tp-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tp-label { font-size: 14px; font-weight: 600; }
.tp-detail { font-size: 12px; color: var(--text-muted); line-height: 1.6; min-height: 19px; }

/* ══ 工具类 ══ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 14px; }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-sm { font-size: 12.5px; }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: 14px 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d7de; border-radius: 4px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bcc1cb; }

/* ══════════════════════════════════════════
   剧集库
   ══════════════════════════════════════════ */
.lib-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.lib-hero-text h1 { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.lib-hero-text p { font-size: 13px; color: var(--text-muted); line-height: 1.7; max-width: 620px; }

.lib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 16px; align-items: start;
}

.lib-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.lib-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d5d8e0; }

.lib-poster {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #6c63ff 0%, #a78bfa 100%);
  overflow: hidden;
}
.lib-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-poster-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; opacity: .55;
}
.lib-genre {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 9px; border-radius: 20px;
  background: rgba(0,0,0,.42); color: #fff;
  font-size: 11px; font-weight: 600; backdrop-filter: blur(4px);
}
.lib-stage {
  position: absolute; right: 10px; top: 10px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; backdrop-filter: blur(4px);
}
.stage-1 { background: rgba(214,58,58,.85); color: #fff; }
.stage-2 { background: rgba(194,121,10,.85); color: #fff; }
.stage-3 { background: rgba(91,87,245,.85); color: #fff; }
.stage-4 { background: rgba(18,145,90,.82); color: #fff; }
.stage-5 { background: rgba(18,145,90,.95); color: #fff; }

.lib-body { padding: 13px 15px 10px; flex: 1; }
.lib-name {
  font-size: 15px; font-weight: 700; margin-bottom: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-muted); margin-bottom: 10px; }
.lib-progress { display: flex; flex-direction: column; gap: 5px; }
.lib-pct { font-size: 11px; color: var(--text-muted); }
.lib-pct.muted { color: var(--text-faint); }

.lib-acts {
  display: flex; gap: 6px; padding: 0 15px 14px;
  border-top: 1px solid var(--border-light); padding-top: 11px;
}

.lib-new-card {
  min-height: 210px; border: 2px dashed var(--border);
  border-radius: var(--radius-lg); background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; color: var(--text-faint);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.lib-new-card:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.lnc-icon { font-size: 30px; }
.lnc-text { font-size: 13px; font-weight: 600; }

/* 借用分组 */
.borrow-groups { max-height: 52vh; overflow-y: auto; }
.borrow-group { margin-bottom: 18px; }
.borrow-group-title {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 9px; padding-bottom: 5px;
  border-bottom: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════
   进度总览
   ══════════════════════════════════════════ */
.dash-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.dash-title { font-size: 22px; font-weight: 800; margin-bottom: 3px; }
.dash-sub { font-size: 12.5px; color: var(--text-muted); }

.next-step {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
  flex-wrap: wrap;
}
.next-step.urgent {
  border-color: #d9d6ff;
  background: linear-gradient(120deg, #f4f3ff 0%, var(--surface) 70%);
}
.ns-icon { font-size: 32px; flex-shrink: 0; }
.ns-body { flex: 1; min-width: 200px; }
.ns-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 3px;
}
.ns-title { font-size: 15.5px; font-weight: 700; margin-bottom: 3px; }
.ns-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }

.dash-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 18px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow var(--t), transform var(--t);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 5px; }
.stat-value { font-size: 23px; font-weight: 800; line-height: 1.15; }
.stat-of { font-size: 13px; font-weight: 500; color: var(--text-faint); }
.stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

.ep-list { display: flex; flex-direction: column; }
.ep-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 8px; border-bottom: 1px solid var(--border-light);
  border-radius: 6px; cursor: pointer;
  transition: background var(--t);
}
.ep-row:hover { background: var(--bg); }
.ep-row:last-child { border-bottom: none; }
.ep-num {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.ep-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ep-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-stats { display: flex; gap: 11px; font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }
.ep-stats .over { color: var(--warn); font-weight: 700; }

.flow-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.flow-step {
  display: flex; gap: 12px; padding: 11px 9px;
  border-radius: 8px; cursor: pointer;
  transition: background var(--t);
}
.flow-step:hover { background: var(--bg); }
.fs-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.flow-step.ok .fs-num { background: var(--success-light); color: var(--success); }
.fs-main { flex: 1; min-width: 0; }
.fs-title {
  font-size: 13px; font-weight: 600; margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.fs-count { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.fs-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }

/* ══════════════════════════════════════════
   素材卡（角色 / 场景 / 道具）
   ══════════════════════════════════════════ */
.char-grid, .prop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 15px;
}

.char-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.char-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.char-card.locked { border-color: #d9d6ff; }

.char-photo {
  position: relative; aspect-ratio: 3 / 4;
  background: linear-gradient(150deg, #eeebff, #d8d4ff);
  overflow: hidden;
}
.char-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-photo-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #8a83d8;
}
.char-photo-empty span { font-size: 42px; opacity: .8; }
.char-photo-empty small { font-size: 10.5px; }

.char-badge-lock {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(16,24,40,.6); color: #fff;
  font-size: 10px; font-weight: 600; backdrop-filter: blur(4px);
}
.char-badge-borrow {
  position: absolute; left: 8px; bottom: 8px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(194,121,10,.88); color: #fff;
  font-size: 10px; font-weight: 600;
}
.char-badge-miss {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(214,58,58,.92); color: #fff;
  font-size: 10px; font-weight: 700;
}
.char-card.needs-fix { border-color: #f0c9c9; }

/* 一致性体检条 */
.health-bar {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--warn-light); border: 1px solid #f2e0b4;
  border-radius: var(--radius-lg); padding: 12px 15px;
  margin-bottom: 15px;
}
.hb-icon { font-size: 16px; flex-shrink: 0; padding-top: 1px; }
.hb-body { flex: 1; min-width: 0; }
.hb-title { font-size: 12.5px; font-weight: 700; color: #8a5c08; margin-bottom: 2px; }
.hb-sub { font-size: 11.5px; color: #a07a2e; line-height: 1.6; }
.char-quick-gen {
  position: absolute; right: 8px; bottom: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  transition: transform var(--t), background var(--t);
}
.char-quick-gen:hover { transform: scale(1.12); background: #fff; }

.char-info { padding: 11px 13px 8px; flex: 1; }
.char-name {
  font-size: 14px; font-weight: 700; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.char-role {
  font-size: 11.5px; color: var(--text-muted); margin-bottom: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.char-anchor-text {
  font-size: 11px; line-height: 1.55; color: var(--text-muted);
  background: var(--bg); border-radius: 6px; padding: 6px 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 7px; min-height: 40px;
}
.char-meta { font-size: 10.5px; color: var(--text-faint); }
.char-usage { color: var(--accent); font-weight: 600; }

.char-acts {
  display: flex; gap: 5px; padding: 0 13px 11px; flex-wrap: wrap;
}
.char-acts-secondary { padding: 0 13px 12px; }
.char-acts-secondary .btn { width: 100%; font-size: 11px; }

.char-add-card, .prop-add-card {
  min-height: 230px; border: 2px dashed var(--border);
  border-radius: var(--radius-lg); background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; cursor: pointer; color: var(--text-faint);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.char-add-card:hover, .prop-add-card:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
}
.cac-icon { font-size: 28px; }
.cac-text { font-size: 12.5px; font-weight: 600; }

/* 道具卡 */
.prop-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
  display: flex; flex-direction: column;
}
.prop-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.prop-photo {
  position: relative; aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #e6f4ec, #c8e9d8);
  overflow: hidden;
}
.prop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-photo-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; opacity: .6;
}
.prop-body { padding: 11px 13px 8px; flex: 1; }
.prop-name {
  font-size: 13.5px; font-weight: 700; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prop-desc {
  font-size: 11px; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px; min-height: 34px;
}
.prop-meta { font-size: 10.5px; color: var(--text-faint); }
.prop-acts { display: flex; gap: 5px; padding: 0 13px 12px; }

/* 上传区 */
.sheet-area { display: flex; gap: 10px; }
.sheet-main {
  width: 128px; height: 170px; border-radius: var(--radius);
  border: 2px dashed var(--border); overflow: hidden;
  cursor: pointer; background: var(--bg); flex-shrink: 0;
  transition: border-color var(--t), background var(--t);
}
.sheet-main.wide { width: 100%; height: 150px; }
.sheet-main:hover { border-color: var(--accent); background: var(--accent-dim); }
.sheet-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; color: var(--text-faint); text-align: center; padding: 8px;
}
.sheet-empty span { font-size: 25px; }
.sheet-empty small { font-size: 10.5px; line-height: 1.4; }

.sheet-strip { display: flex; gap: 7px; flex-wrap: wrap; }
.sheet-strip img {
  width: 56px; height: 72px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  cursor: pointer; transition: border-color var(--t), transform var(--t);
}
.sheet-strip img:hover { border-color: var(--accent); transform: scale(1.05); }

/* 提示词预览 */
.prompt-preview {
  background: var(--bg); border-radius: var(--radius);
  padding: 11px 13px; margin-bottom: 11px;
}
.pp-label {
  font-size: 10.5px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}
.pp-text {
  font-size: 12px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.stat-inline {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-muted);
  padding: 9px 0; margin-bottom: 6px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════
   素材选择器
   ══════════════════════════════════════════ */
.picker-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}
.pick-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; padding: 0;
  overflow: hidden; font-family: var(--font); text-align: left;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.pick-card:hover { border-color: #c3c0f8; transform: translateY(-1px); }
.pick-card.picked { border-color: var(--accent); background: var(--accent-dim); }

.pick-thumb {
  position: relative; width: 100%; aspect-ratio: 1;
  background: var(--bg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-ph { font-size: 22px; opacity: .5; }
.pick-lock {
  position: absolute; right: 3px; top: 3px;
  font-size: 9px; background: rgba(255,255,255,.9);
  border-radius: 50%; width: 15px; height: 15px;
  display: flex; align-items: center; justify-content: center;
}
.pick-name {
  font-size: 10.5px; font-weight: 600; padding: 4px 5px 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-sub {
  font-size: 9.5px; color: var(--text-faint); padding: 0 5px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker-empty {
  font-size: 11.5px; color: var(--text-faint);
  padding: 10px 12px; background: var(--bg); border-radius: 6px;
}
.picker-empty a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ══════════════════════════════════════════
   分镜编排
   ══════════════════════════════════════════ */
.ep-tabs {
  display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 15px;
}
.ep-tab {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-family: var(--font); text-align: left;
  transition: border-color var(--t), background var(--t);
}
.ep-tab:hover { border-color: #c3c0f8; }
.ep-tab.active { border-color: var(--accent); background: var(--accent-dim); }
.et-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.ep-tab.active .et-title { color: var(--accent); }
.et-sub { font-size: 10.5px; color: var(--text-faint); }

.ep-title-input {
  width: 100%; padding: 5px 9px; margin-bottom: 8px;
  border: 1px solid transparent; border-radius: 6px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  color: var(--text); background: transparent; outline: none;
  transition: border-color var(--t), background var(--t);
}
.ep-title-input:hover { background: var(--bg); }
.ep-title-input:focus { border-color: var(--accent); background: var(--surface); }

.ep-bar-row { display: flex; align-items: center; gap: 10px; }
.ep-bar-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.ep-bar-label.over { color: var(--warn); }
.ep-warn {
  font-size: 11.5px; color: var(--warn); margin-top: 7px;
  background: var(--warn-light); padding: 6px 10px; border-radius: 6px;
}

/* 胶片条 */
.film-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 10px; scrollbar-width: thin;
}
.film-shot {
  flex-shrink: 0; width: 154px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface);
  cursor: pointer; overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.film-shot:hover { border-color: #c3c0f8; }
.film-shot.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.film-shot.done { border-color: #a7dfc4; }
.film-shot.error { border-color: #f0b4b4; }
.film-shot.generating { border-color: var(--warn); animation: pulseSoft 1.5s infinite; }
@keyframes pulseSoft { 0%,100% { opacity: 1; } 50% { opacity: .65; } }

.fs-thumb {
  position: relative; width: 100%; height: 88px;
  background: var(--bg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.fs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-num { font-size: 24px; font-weight: 800; color: var(--text-faint); }
.fs-dur {
  position: absolute; left: 5px; bottom: 5px;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(16,24,40,.6); color: #fff;
  font-size: 9.5px; font-weight: 700;
}
.fs-badge {
  position: absolute; right: 5px; top: 5px;
  border-radius: 4px; font-size: 9px; font-weight: 700;
  padding: 1px 5px;
}
.fs-badge.ok { background: var(--success); color: #fff; }
.fs-badge.busy { background: var(--warn); color: #fff; }
.fs-badge.err { background: var(--danger); color: #fff; }
.fs-badge.ff { background: #fff; color: var(--accent); }

.fs-body { padding: 7px 9px 9px; }
.fs-text {
  font-size: 11px; line-height: 1.5; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 49px; margin-bottom: 5px;
}
.fs-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.film-add {
  flex-shrink: 0; width: 154px; min-height: 154px;
  border-radius: var(--radius); border: 2px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; color: var(--text-faint);
  font-size: 12px; transition: border-color var(--t), color var(--t), background var(--t);
}
.film-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.fa-icon { font-size: 24px; }
.fa-text { font-size: 12px; font-weight: 600; }

/* 这三个类名同时是 JS 的选择器钩子（.picker-character / .picker-scene / .picker-prop），
   必须保证容器上真实存在，样式本身不需要额外定义 */

/* 镜头详情面板 */
.shot-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.sp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.sp-title { font-size: 15px; font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sp-of { font-size: 12px; font-weight: 500; color: var(--text-faint); }

/* 一致性诊断 */
.diag-chip {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  letter-spacing: 0; cursor: default;
}
.diag-chip.good { background: var(--success-light); color: var(--success); }
.diag-chip.warn { background: var(--warn-light); color: var(--warn); cursor: help; }
.diag-chip.info { background: var(--bg); color: var(--text-faint); }

.diag-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--warn-light); border: 1px solid #f2e0b4;
  border-radius: var(--radius); padding: 9px 13px;
  margin-bottom: 15px; flex-wrap: wrap;
}
.db-icon { font-size: 15px; flex-shrink: 0; }
.db-text { flex: 1; min-width: 180px; font-size: 12px; line-height: 1.6; color: #7d5106; }

/* 进阶折叠区 */
.adv-box {
  border: 1px solid var(--border-light); border-radius: var(--radius);
  background: var(--surface-2); margin-bottom: 13px;
  overflow: hidden;
}
.adv-summary {
  padding: 9px 13px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 9px;
  user-select: none;
  transition: background var(--t), color var(--t);
}
.adv-summary::-webkit-details-marker { display: none; }
.adv-summary::before {
  content: '▸'; font-size: 10px; color: var(--text-faint);
  transition: transform var(--t); display: inline-block;
}
.adv-box[open] .adv-summary::before { transform: rotate(90deg); }
.adv-summary:hover { background: var(--bg); color: var(--text); }
.adv-hint { font-size: 11px; font-weight: 400; color: var(--text-faint); margin-left: auto; }
.adv-body { padding: 4px 13px 13px; border-top: 1px solid var(--border-light); padding-top: 13px; }

/* 参考锚 chips */
.ref-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ref-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 3px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 11px; position: relative;
}
.ref-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ref-chip .rc-ph {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.ref-chip.no-img { border-color: #f0d59b; background: #fffdf5; }
.rc-name { font-weight: 600; }
.rc-lock { font-size: 9px; opacity: .7; }

.sp-grid {
  display: grid; grid-template-columns: 1fr 292px;
  gap: 20px; align-items: start;
}
.sp-edit { min-width: 0; }

.dur-group { display: flex; gap: 6px; flex-wrap: wrap; }
.dur-btn {
  padding: 5px 13px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font); color: var(--text-muted);
  transition: all var(--t);
}
.dur-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.dur-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.sp-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding-top: 13px; border-top: 1px solid var(--border-light);
}
.est-tip { font-size: 11.5px; color: var(--text-faint); }
.warn-inline { font-size: 11px; color: var(--warn); font-weight: 600; }

/* 预览列 */
.sp-preview { display: flex; flex-direction: column; gap: 13px; }
.pv-block {
  background: var(--bg); border-radius: var(--radius);
  padding: 11px; border: 1px solid var(--border-light);
}
.pv-label {
  font-size: 10.5px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 7px;
}
.pv-media {
  border-radius: 8px; overflow: hidden; background: #000;
  aspect-ratio: 16 / 9;
}
.pv-media img, .pv-media video {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.pv-empty {
  aspect-ratio: 16 / 9; border-radius: 8px;
  border: 1.5px dashed var(--border); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px; text-align: center;
}
.pv-empty-icon { font-size: 26px; opacity: .5; }
.pv-error {
  background: var(--danger-light); border-radius: var(--radius);
  padding: 11px 13px;
}

/* 输入框内嵌按钮 */
.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-right: 38px; }
.eye-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; border-radius: 6px;
  background: transparent; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.eye-btn:hover { background: var(--bg); }

/* ══════════════════════════════════════════
   导出
   ══════════════════════════════════════════ */
.exp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 13px;
}
.exp-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.exp-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px);
}
.exp-icon { font-size: 24px; margin-bottom: 8px; }
.exp-title { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.exp-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.exp-badge {
  display: inline-block; margin-top: 9px;
  padding: 2px 8px; border-radius: 20px;
  background: var(--bg); color: var(--text-faint);
  font-size: 10.5px; font-weight: 600;
}

.out-ep-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  padding: 15px 2px 7px; border-bottom: 1px solid var(--border);
}
.out-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--border-light);
}
.out-thumb {
  width: 78px; height: 46px; border-radius: 6px;
  overflow: hidden; background: var(--bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-faint); font-weight: 700;
}
.out-thumb img, .out-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.out-main { flex: 1; min-width: 0; }
.out-title {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; margin-bottom: 3px;
}
.out-prompt {
  font-size: 11.5px; color: var(--text-muted); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.out-dialogue {
  font-size: 11px; color: var(--accent); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.out-acts { flex-shrink: 0; }

/* ══════════════════════════════════════════
   连播播放器
   ══════════════════════════════════════════ */
.player-wrap { border-radius: var(--radius); overflow: hidden; background: #0d0f14; }
.player-stage {
  position: relative; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background: #0d0f14; overflow: hidden;
}
.player-stage img, .player-stage video,
.player-media-slot img, .player-media-slot video {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.player-media-slot { width: 100%; height: 100%; }
.player-empty {
  color: #6b7280; font-size: 13px;
}
.player-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
  pointer-events: none;
}
.po-shot {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  color: #fff; background: rgba(255,255,255,.16);
  padding: 2px 8px; border-radius: 4px; letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.po-dialogue {
  color: #fff; font-size: 14px; font-weight: 600;
  margin-top: 7px; line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
}
.po-dialogue:empty { display: none; }

.player-bar { padding: 11px 14px; background: #151821; }
.pb-progress { height: 4px; background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden; }
.pb-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .25s linear; }
.pb-info {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #9aa1af; margin-top: 7px;
}

/* ══════════════════════════════════════════
   出片自检
   ══════════════════════════════════════════ */
.audit-box {
  border-radius: var(--radius-lg); padding: 14px 17px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.audit-box.block { background: #fdf6f6; border-color: #f3cccc; }
.audit-box.warn { background: #fffdf5; border-color: #f2e0b4; }
.audit-box.ok { background: #f4fcf8; border-color: #b8e5cf; }

.ab-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; margin-bottom: 9px;
}
.audit-box.block .ab-head { color: #a52626; }
.audit-box.warn .ab-head { color: #8a5c08; }
.audit-box.ok .ab-head { color: #0d7247; }
.ab-icon { font-size: 15px; }
.ab-title { flex: 1; min-width: 0; }

.ab-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 1.6; padding: 5px 0;
}
.abi-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-faint); margin-top: 1px;
}
.ab-item.block .abi-dot { background: var(--danger); }
.ab-item.warn .abi-dot { background: var(--warn); }
.abi-text { flex: 1; min-width: 0; color: var(--text); }
.abi-go {
  flex-shrink: 0; border: none; background: transparent;
  color: var(--accent); font-size: 11.5px; font-weight: 700;
  cursor: pointer; font-family: var(--font); padding: 2px 4px;
  border-radius: 4px; transition: background var(--t);
}
.abi-go:hover { background: var(--accent-dim); }

/* ══════════════════════════════════════════
   快速试片
   ══════════════════════════════════════════ */
.qv-layout {
  display: grid; grid-template-columns: 1fr 316px;
  gap: 16px; align-items: start;
}
.prompt-area { position: relative; }
.char-count {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 10.5px; color: var(--text-faint);
  background: var(--surface); padding: 1px 5px; border-radius: 4px;
}
.est-line {
  font-size: 11.5px; color: var(--text-faint);
  padding: 7px 0; margin-bottom: 6px;
}
.qv-loading {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 20px;
}
.qv-result { display: flex; flex-direction: column; gap: 10px; }
.qr-media {
  position: relative; border-radius: var(--radius);
  overflow: hidden; background: #000; aspect-ratio: 16 / 9;
}
.qr-media img, .qr-media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-tag {
  position: absolute; left: 9px; top: 9px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(16,24,40,.62); color: #fff;
  font-size: 10.5px; font-weight: 600;
}
.qr-note { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }

.qv-hist {
  display: flex; gap: 9px; padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; border-radius: 6px;
  transition: background var(--t);
}
.qv-hist:hover { background: var(--bg); }
.qh-thumb {
  width: 62px; height: 38px; border-radius: 5px;
  overflow: hidden; background: var(--bg); flex-shrink: 0;
}
.qh-thumb img, .qh-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qh-body { flex: 1; min-width: 0; }
.qh-text { font-size: 11.5px; line-height: 1.5; margin-bottom: 2px; }
.qh-meta { font-size: 10px; color: var(--text-faint); }

.qv-samples { display: flex; flex-direction: column; gap: 6px; }
.qv-sample {
  text-align: left; padding: 7px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 11.5px; font-family: var(--font); color: var(--text-muted);
  cursor: pointer; line-height: 1.5;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.qv-sample:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ══════════════════════════════════════════
   风格预设
   ══════════════════════════════════════════ */
.card.has-prefix { border-color: #d9d6ff; background: linear-gradient(120deg, #f6f5ff, var(--surface) 80%); }
.prefix-text {
  font-size: 12.5px; line-height: 1.7; color: var(--text);
  font-family: var(--mono); word-break: break-word;
}
.prefix-mini {
  font-size: 10.5px; color: var(--text-faint); font-family: var(--mono);
  margin-bottom: 9px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.market-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.market-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.market-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.market-thumb {
  aspect-ratio: 16 / 9; background: linear-gradient(140deg, #f3eeff, #ddd6ff);
  display: flex; align-items: center; justify-content: center; font-size: 38px;
}
.market-info { padding: 13px 14px 14px; }
.market-name { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }

/* ══════════════════════════════════════════
   API 配置
   ══════════════════════════════════════════ */
.mode-card.is-demo { border-color: #f0dfa8; background: linear-gradient(120deg, #fffdf4, var(--surface) 70%); }
.mode-card.is-live { border-color: #a7dfc4; background: linear-gradient(120deg, #f3fdf8, var(--surface) 70%); }

.api-list { display: flex; flex-direction: column; gap: 11px; }
.api-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 15px 17px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.api-card:hover { box-shadow: var(--shadow); }
.api-card.configured { border-color: #b8e5cf; }

.api-card-head { display: flex; align-items: flex-start; gap: 13px; flex-wrap: wrap; }
.api-icon { font-size: 24px; width: 34px; text-align: center; flex-shrink: 0; padding-top: 2px; }
.api-main { flex: 1; min-width: 190px; }
.api-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.api-name { font-size: 13.5px; font-weight: 700; }
.api-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.api-dot.ok { background: var(--success); }
.api-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin-bottom: 7px; }
.api-caps { display: flex; gap: 5px; flex-wrap: wrap; }
.cap-chip {
  padding: 1px 7px; border-radius: 20px; font-size: 10px; font-weight: 600;
}
.cap-text { background: #eef2ff; color: #4f5bd5; }
.cap-img { background: #f0fdf4; color: #12864f; }
.cap-vid { background: #fef3f2; color: #c2410c; }

.api-acts { display: flex; gap: 7px; flex-shrink: 0; }
.api-card-foot {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--border-light);
}
.api-key-preview { font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); }
.api-acts .btn.ok { color: var(--success); border-color: var(--success); }

.test-result {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 9px 12px; border-radius: 7px; font-size: 12px; line-height: 1.6;
}
.test-result.ok { background: var(--success-light); color: #0d7247; }
.test-result.err { background: var(--danger-light); color: #a52626; }

.price-table {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.pt-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  padding: 9px 13px; font-size: 12px;
  border-bottom: 1px solid var(--border-light);
}
.pt-row:last-child { border-bottom: none; }
.pt-head { background: var(--bg); font-weight: 700; font-size: 11.5px; color: var(--text-muted); }
.pt-total { background: var(--accent-dim); font-weight: 700; color: var(--accent); }

/* ══════════════════════════════════════════
   设置
   ══════════════════════════════════════════ */
.budget-bar-wrap { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.budget-bar { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.budget-fill { height: 100%; background: var(--success); border-radius: 4px; transition: width .4s; }

.ledger-list { max-height: 260px; overflow-y: auto; }
.ledger-row {
  display: grid; grid-template-columns: 88px 1fr 82px 68px;
  gap: 10px; padding: 7px 2px; font-size: 11.5px;
  border-bottom: 1px solid var(--border-light); align-items: center;
}
.ledger-row:last-child { border-bottom: none; }
.lr-time { color: var(--text-faint); font-family: var(--mono); font-size: 10.5px; }
.lr-what { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-provider { color: var(--text-faint); font-size: 10.5px; }
.lr-cost { color: var(--text); font-weight: 700; text-align: right; }

.storage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.storage-item {
  background: var(--bg); border-radius: var(--radius); padding: 13px 15px;
}
.si-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.si-value { font-size: 17px; font-weight: 800; }
.si-sub { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }

/* ══════════════════════════════════════════
   引导 / 其他
   ══════════════════════════════════════════ */
.guide-title { font-size: 18px; font-weight: 800; margin-bottom: 5px; }
.guide-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; margin-bottom: 18px; }
.guide-steps { display: flex; flex-direction: column; gap: 13px; }
.guide-step { display: flex; gap: 13px; }
.gs-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.gs-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.gs-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.guide-note {
  margin-top: 16px; padding: 11px 13px; border-radius: var(--radius);
  background: var(--warn-light); color: #8a5c08;
  font-size: 11.5px; line-height: 1.7;
}

.ai-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ap-head {
  padding: 9px 13px; background: var(--bg);
  font-size: 12px; font-weight: 700; color: var(--text-muted);
}
.ap-item {
  display: flex; gap: 10px; padding: 10px 13px;
  border-top: 1px solid var(--border-light);
}
.ap-num {
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700;
}
.ap-body { flex: 1; min-width: 0; }
.ap-prompt { font-size: 11.5px; line-height: 1.55; margin-bottom: 5px; }
.ap-tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* 响应式 */
@media (max-width: 1180px) {
  .sp-grid { grid-template-columns: 1fr; }
  .qv-layout { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .storage-grid { grid-template-columns: 1fr; }
  .view-container { padding: 16px 14px 32px; }
}



/* ══════════════════════════════════════════
   起剧向导
   ══════════════════════════════════════════ */
.wiz-head { margin-bottom: 20px; }
.wiz-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; margin-bottom: 16px;
}
.wiz-back {
  cursor: pointer; color: var(--text-faint); font-size: 17px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t);
}
.wiz-back:hover { background: var(--bg); color: var(--text); }

.wiz-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wiz-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-faint);
  white-space: nowrap;
}
.ws-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700;
}
.wiz-step.active { color: var(--accent); }
.wiz-step.active .ws-num { background: var(--accent); color: #fff; }
.wiz-step.done { color: var(--success); }
.wiz-step.done .ws-num { background: var(--success-light); color: var(--success); }
.wiz-line { flex: 1; min-width: 14px; height: 1px; background: var(--border); }

.wiz-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 26px;
  box-shadow: var(--shadow-sm); max-width: 800px;
}
.wiz-h { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.wiz-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; margin-bottom: 18px; }
.wiz-head-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 4px;
}

.wiz-samples {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-light);
}
.ws-label { font-size: 11.5px; color: var(--text-faint); margin-right: 2px; }
.wiz-sample {
  padding: 5px 11px; border-radius: 20px; font-size: 11.5px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer; font-family: var(--font);
  transition: all var(--t);
}
.wiz-sample:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.wiz-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; max-width: 800px; margin-top: 16px; flex-wrap: wrap;
}

.wiz-section { margin-top: 20px; }
.wiz-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--border-light);
}
.wiz-list { display: flex; flex-direction: column; gap: 10px; }
.wiz-empty {
  font-size: 12px; color: var(--text-faint);
  padding: 14px; background: var(--bg); border-radius: var(--radius); text-align: center;
}
.wiz-item {
  position: relative;
  background: var(--surface-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 12px;
}
.wi-main { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }
.wi-name { font-weight: 700; }
.wi-del {
  position: absolute; right: 8px; top: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text-faint);
  cursor: pointer; font-size: 10px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--t), background var(--t);
}
.wiz-item:hover .wi-del { opacity: 1; }
.wi-del:hover { background: var(--danger-light); color: var(--danger); }

.wiz-note {
  margin-top: 18px; padding: 11px 14px; border-radius: var(--radius);
  background: var(--accent-dim); color: var(--text-muted);
  font-size: 11.5px; line-height: 1.7;
}

.wiz-shots { display: flex; flex-direction: column; gap: 10px; }
.wiz-shot {
  background: var(--surface-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 11px 12px;
}
.wshot-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
}
.wshot-num { font-size: 10.5px; font-weight: 800; color: var(--text-faint); letter-spacing: .04em; }
.wshot-dur {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--accent-light); color: var(--accent);
}
.wshot-del {
  margin-left: auto; border: none; background: transparent;
  color: var(--text-faint); cursor: pointer; font-size: 11px;
  width: 20px; height: 20px; border-radius: 4px;
  transition: background var(--t), color var(--t);
}
.wshot-del:hover { background: var(--danger-light); color: var(--danger); }
.wshot-text { font-size: 12.5px; }
.wshot-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }

.wiz-summary {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-top: 6px;
}
.wsum-row {
  display: grid; grid-template-columns: 68px 1fr;
  padding: 10px 14px; font-size: 12.5px;
  border-bottom: 1px solid var(--border-light);
}
.wsum-row:last-child { border-bottom: none; }
.wsum-row span { color: var(--text-muted); }
.wsum-row b { font-weight: 600; word-break: break-word; }

/* 补充类 */
.wi-anchor { font-size: 12px; line-height: 1.6; }
.wi-role { font-size: 12px; }
.wiz-body { min-height: 200px; }
.ws-text { white-space: nowrap; }

/* ══════════════════════════════════════════
   导入文案
   ══════════════════════════════════════════ */
.imp-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 16px; align-items: start;
}
.imp-text {
  min-height: 340px !important;
  font-size: 13px; line-height: 1.85;
  font-family: var(--font);
}
.imp-count {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 10.5px; color: var(--text-faint);
  background: var(--surface); padding: 1px 6px; border-radius: 4px;
}
.imp-opts {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; background: var(--bg);
  border-radius: var(--radius); flex-wrap: wrap;
}
.imp-opts .text-sm { flex: 1; min-width: 180px; }

.imp-steps { display: flex; flex-direction: column; gap: 13px; }
.imp-step { display: flex; gap: 11px; }
.is-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.is-title { font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.is-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }

.imp-note {
  margin-top: 16px; padding: 12px 14px;
  background: var(--accent-dim); border-radius: var(--radius);
  font-size: 11.5px; line-height: 1.75; color: var(--text-muted);
}
.imp-stat {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}

/* 确认区 */
.imp-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
.imp-sec-count {
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  margin-left: 6px; padding: 1px 7px;
  background: var(--bg); border-radius: 10px;
}
.imp-item {
  background: var(--surface-2); border: 1.5px solid var(--border-light);
  border-radius: var(--radius); padding: 11px;
  display: flex; flex-direction: column; gap: 7px;
  transition: border-color var(--t), opacity var(--t);
}
.imp-item.has-img { border-color: #b8e5cf; }
.imp-item.skipped { opacity: .38; }

.ic-head { display: flex; align-items: center; gap: 6px; }
.ic-name {
  font-size: 13px; font-weight: 700; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ic-src {
  font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 3px;
  background: var(--accent-light); color: var(--accent); flex-shrink: 0;
}
.ic-skip {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: var(--bg); color: var(--text-faint);
  cursor: pointer; font-size: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t);
}
.ic-skip:hover { background: var(--danger-light); color: var(--danger); }

.ic-meta { font-size: 10px; color: var(--text-faint); }
.ic-evidence {
  font-size: 10px; color: var(--text-muted); line-height: 1.5;
  background: var(--bg); padding: 4px 7px; border-radius: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-style: italic;
}

.ic-preview { }
.ic-drop {
  width: 100%; aspect-ratio: 4 / 3;
  border: 1.5px dashed var(--border); border-radius: 6px;
  overflow: hidden; cursor: pointer; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t), background var(--t);
}
.ic-drop:hover { border-color: var(--accent); background: var(--accent-dim); }
.ic-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-drop-empty {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-faint); pointer-events: none;
}
.ic-drop-empty span { font-size: 20px; opacity: .6; }
.ic-drop-empty small { font-size: 9.5px; }

.ic-mode { display: flex; gap: 5px; }
.ic-mode-btn {
  flex: 1; padding: 5px 4px; border-radius: 5px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 10.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font); color: var(--text-muted);
  transition: all var(--t);
}
.ic-mode-btn:hover { border-color: var(--accent); color: var(--accent); }
.ic-mode-btn.active {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent);
}

.ic-input { font-size: 11.5px !important; padding: 5px 8px !important; }

.imp-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}

/* 完成页 */
.imp-done { text-align: center; padding: 40px 24px; max-width: 560px; margin: 0 auto; }
.imp-done-icon { font-size: 46px; margin-bottom: 12px; }
.imp-done-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.imp-done-sub { font-size: 13px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.imp-done-note {
  font-size: 12px; line-height: 1.8; color: var(--text-muted);
  background: var(--success-light); color: #0d7247;
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px;
}

/* ══════════════════════════════════════════
   全局素材库
   ══════════════════════════════════════════ */
.asset-panel { border-color: #d9d6ff; background: linear-gradient(120deg, #f6f5ff, var(--surface) 75%); }

.as-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.as-search { max-width: 300px; }

.as-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
}
.as-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.as-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.as-card.no-img { border-color: #f0d59b; }

.as-photo {
  position: relative; aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #eef0f6, #dfe3ec);
  overflow: hidden;
}
.as-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-photo-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; color: var(--text-faint);
}
.as-photo-empty span { font-size: 32px; opacity: .55; }
.as-photo-empty small { font-size: 10px; }

.as-badge-miss {
  position: absolute; left: 7px; top: 7px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(214,58,58,.92); color: #fff;
  font-size: 9.5px; font-weight: 700;
}
.as-badge-lock {
  position: absolute; right: 7px; top: 7px;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(16,24,40,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
}
.as-badge-use {
  position: absolute; left: 7px; bottom: 7px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(16,24,40,.6); color: #fff;
  font-size: 9.5px; font-weight: 600; backdrop-filter: blur(4px);
}
.as-quick {
  position: absolute; right: 7px; bottom: 7px;
  width: 27px; height: 27px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.93);
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  transition: transform var(--t);
}
.as-quick:hover { transform: scale(1.12); }

.as-body { padding: 10px 12px 6px; flex: 1; }
.as-name {
  font-size: 13.5px; font-weight: 700; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-sub {
  font-size: 11px; color: var(--text-muted); margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-desc {
  font-size: 10.5px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 31px;
}
.as-alias { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.as-acts { display: flex; gap: 5px; padding: 0 12px 11px; }

@media (max-width: 1180px) {
  .imp-layout { grid-template-columns: 1fr; }
}
