/* ==========================================================================
   批量剧工作台 · 设计系统 v2
   深色画布 / 断框 V 标记 / 紫色强调 + 品红渐变主操作
   设计参照：VibeStory 的令牌体系（画布 #0d0f11、面板 #111214、
   字段 #262c36、强调 #7b57e0、确认型操作 #c026d3 → #6d28d9 渐变）
   ========================================================================== */

@font-face {
  font-family: "Audiowide";
  src: url("/fonts/Audiowide-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 让原生下拉框按深色渲染，否则选项列表是白底灰字，几乎看不清 */
  color-scheme: dark;
  /* 画布与面板 */
  --bg: #0d0f11;
  --bg-soft: #0a0c0e;
  --bg-deep: #07080a;
  --panel: #111214;
  --panel-2: #262c36;
  --panel-3: #2e3a45;
  --raise: #171a1e;
  --line: rgba(87, 103, 118, 0.22);
  --line-soft: rgba(87, 103, 118, 0.12);
  --hairline: rgba(87, 103, 118, 0.18);

  /* 文字 */
  --text: #e3e3e3;
  --text-2: #b8c0cc;
  --muted: rgba(184, 192, 204, 0.72);
  --dim: rgba(184, 192, 204, 0.44);

  /* 强调：实色只用于底与描边，浅色用于强调文字 */
  --accent: #7b57e0;
  --accent-text: #c9b6ff;
  --accent-soft: rgba(123, 87, 224, 0.16);
  --accent-line: rgba(123, 87, 224, 0.45);

  /* 主操作渐变（只给确认型操作） */
  --grad-from: #c026d3;
  --grad-to: #6d28d9;
  --grad-hover-from: #a121cc;
  --grad-hover-to: #5b21b6;
  --grad-glow: 0 4px 30px 0 rgba(192, 38, 211, 0.28);

  /* 状态 */
  --ok: #8fe084;
  --ok-soft: rgba(42, 163, 31, 0.16);
  --warn: #f5c451;
  --danger: #ff9c96;
  --danger-soft: rgba(245, 59, 48, 0.14);
  --teal: #7dd3fc;
  --teal-soft: rgba(125, 211, 252, 0.10);

  /* 形状 */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-panel: 16px;
  --radius-modal: 24px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-display: "Audiowide", "Bahnschrift", "DIN Alternate", var(--font);
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Microsoft YaHei", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow: hidden; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.34); }
::-webkit-scrollbar-corner { background: transparent; }
::selection { background: rgba(123, 87, 224, 0.5); color: #fff; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--grad-from); outline-offset: 2px; }

.hidden { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; }

/* 品牌标记随侧栏固定（与设计规范一致：标记 + Audiowide 字标在侧栏顶部） */
.side-brand {
  position: sticky; top: -16px; z-index: 3;
  margin: -16px -14px 18px;
  padding: 18px 14px 15px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--hairline);
}

/* 断开的画框顶边组成 V：白色描边 + 品红→紫 渐变 */
.brand-mark {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(192, 38, 211, 0.16), rgba(109, 40, 217, 0.10));
  border: 1px solid rgba(201, 182, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand-mark svg { width: 22px; height: 22px; display: block; }

.brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.15; }
.brand-text strong {
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.2px; color: #fff;
}
.brand-text span {
  font-family: var(--font-display);
  font-size: 8.5px; font-weight: 400; letter-spacing: 1.6px;
  color: var(--dim); text-transform: uppercase;
}

.topbar-center { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.project-switch, .text-model-switch {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 6px 0 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--raise);
}
.project-switch label, .text-model-switch label {
  font-size: 9.5px; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--dim); white-space: nowrap;
}
.project-switch select, .text-model-switch select {
  border: none; background: transparent; color: var(--text-2);
  font-size: 12px; height: 26px; outline: none; appearance: none;
  padding-right: 18px; max-width: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8c0cc' fill='none' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.project-switch select { min-width: 170px; }
.project-switch select:focus, .text-model-switch select:focus { color: var(--text); }
.project-switch .icon-btn { border: none; background: transparent; height: 26px; width: 26px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.service-badge {
  display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 11px;
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent;
}
.service-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 8px currentColor;
}
.service-badge.ok .dot { background: var(--ok); }
.service-badge.bad .dot { background: #f53b30; }

/* ---------------- 主布局 ---------------- */
.shell { display: flex; height: calc(100vh - 64px); }

.sidebar {
  width: 300px;
  flex: 0 0 300px;
  border-right: 1px solid var(--hairline);
  background: var(--bg-soft);
  overflow-y: auto;
  padding: 16px 14px 32px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------------- 侧栏 ---------------- */
.project-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  padding: 14px 15px 13px;
  margin-bottom: 20px;
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute; inset: -40% 30% auto -10%; height: 120px;
  background: radial-gradient(closest-side, rgba(123, 87, 224, 0.18), transparent);
  pointer-events: none;
}
.project-card h2 {
  position: relative;
  margin: 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: 0.1px; color: #fff;
}
.project-card .pc-meta {
  position: relative;
  color: var(--dim); font-size: 10.5px; letter-spacing: 0.3px;
}
.pc-stats { display: flex; gap: 6px; margin-top: 13px; position: relative; }
.pc-stat {
  flex: 1; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 7px 9px;
}
.pc-stat b {
  display: block; font-size: 16px; font-weight: 600; line-height: 1.15;
  color: #fff; font-family: var(--mono); letter-spacing: -0.4px;
}
.pc-stat span { font-size: 9px; color: var(--dim); letter-spacing: 0.4px; }
.pc-actions {
  display: flex; gap: 14px; margin-top: 11px; padding-top: 10px;
  border-top: 1px solid var(--line-soft); position: relative;
}
.pc-actions .mini-link { color: var(--dim); font-size: 10.5px; }
.pc-actions .mini-link:hover { color: var(--accent-text); background: transparent; }

.side-section { margin-bottom: 22px; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 9px;
  color: var(--dim); font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.3px; text-transform: uppercase;
}
.mini-link {
  background: none; border: none; color: var(--accent-text);
  font-size: 10.5px; padding: 3px 5px; border-radius: 5px;
  font-weight: 500; letter-spacing: 0; transition: background 0.15s;
}
.mini-link:hover { background: var(--accent-soft); }

.episode-list { display: flex; flex-direction: column; gap: 4px; }
.episode-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent;
  text-align: left; width: 100%; color: var(--text-2);
  transition: background 0.15s, border-color 0.15s;
}
.episode-item:hover { background: rgba(255, 255, 255, 0.035); }
.episode-item.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.episode-item.active::before {
  content: "";
  position: absolute; left: -1px; top: 20%; bottom: 20%; width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--grad-from), var(--grad-to));
}
.episode-item .ep-idx {
  width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center;
  border-radius: 6px; background: rgba(255, 255, 255, 0.05);
  color: var(--dim); font-size: 10px; font-weight: 600; font-family: var(--mono);
}
.episode-item.active .ep-idx { background: var(--accent); color: #fff; }
.episode-item .ep-body { flex: 1; min-width: 0; }
.episode-item .ep-title {
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); font-weight: 500;
}
.episode-item .ep-sub { font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.episode-item .ep-del {
  opacity: 0; color: var(--dim); background: none; border: none; padding: 2px;
  transition: opacity 0.15s;
}
.episode-item:hover .ep-del { opacity: 1; }
.episode-item .ep-del:hover { color: var(--danger); }

.asset-tabs {
  display: flex; gap: 2px; margin-bottom: 9px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px; border-radius: var(--radius);
  border: 1px solid var(--line-soft);
}
.asset-tabs button {
  flex: 1; border: none; background: transparent; color: var(--dim);
  font-size: 10.5px; padding: 5px 2px; border-radius: 5px; font-weight: 500;
  transition: 0.15s;
}
.asset-tabs button:hover { color: var(--text-2); }
.asset-tabs button.active { background: var(--panel-3); color: #fff; }

.asset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.asset-card {
  position: relative; border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow: hidden; background: var(--panel); cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.asset-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.asset-thumb {
  aspect-ratio: 4 / 3; background: var(--bg-deep) center/cover no-repeat;
  display: grid; place-items: center; color: var(--dim); font-size: 17px;
}
.asset-thumb img, .asset-thumb video {
  width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg-deep);
}
.asset-name {
  padding: 6px 7px; font-size: 10.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid var(--line-soft);
}
.asset-del {
  position: absolute; top: 5px; right: 5px; width: 18px; height: 18px;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff;
  font-size: 10px; display: grid; place-items: center; opacity: 0;
  transition: opacity 0.15s;
}
.asset-card:hover .asset-del { opacity: 1; }
.asset-add {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: transparent; color: var(--dim);
  min-height: 76px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-size: 10.5px;
  transition: 0.15s;
}
.asset-add:hover { border-color: var(--accent-line); color: var(--accent-text); }
.empty-mini { color: var(--dim); font-size: 11.5px; padding: 8px 2px; line-height: 1.7; }

/* ---------------- 步骤导航（侧栏竖向，参照 VibeStory 的左侧导航） ---------------- */
.side-nav-head {
  padding: 0 2px 8px;
  color: var(--dim); font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.3px; text-transform: uppercase;
}

.step-nav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 0 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  background: transparent; overflow: visible;
}

.step-nav button {
  position: relative;
  display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  width: 100%; padding: 9px 10px;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted);
  text-align: left; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.step-nav button i {
  grid-row: 1 / span 2;
  font-style: normal; font-family: var(--mono);
  font-size: 12px; font-weight: 600; letter-spacing: -0.3px;
  color: var(--dim); text-align: center;
}
.step-nav button span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.step-nav button small { font-size: 9px; color: var(--dim); letter-spacing: 0.2px; margin-top: 1px; }
.step-nav button:hover { background: rgba(255, 255, 255, 0.035); }
.step-nav button.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.step-nav button.active::after {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 16px; border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--grad-from), var(--grad-to));
}
.step-nav button.active i { color: var(--accent-text); }
.step-nav button.active span { color: #fff; }

.side-search { margin: 0 0 8px; }
.side-search .input { height: 28px; font-size: 11px; }

/* ---------------- 视图 ---------------- */
.views { flex: 1; min-height: 0; position: relative; }
.view {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 20px 24px 48px; display: none;
}
.view.active { display: block; }
.view-inner { max-width: 1560px; margin: 0 auto; }

.section-title { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 18px; padding-bottom: 15px; border-bottom: 1px solid var(--hairline); }
.section-title h1 { font-size: 22px; margin: 0; font-weight: 600; letter-spacing: -0.2px; color: #fff; }
.section-title .sub { color: var(--dim); font-size: 11px; margin-top: 4px; max-width: 760px; line-height: 1.6; }
.section-title .spacer { flex: 1; }

.panel {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-panel); overflow: hidden;
}
.panel + .panel { margin-top: 14px; }
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--hairline);
  background: transparent;
}
.panel-head h3 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0.2px; color: var(--text); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px; }
.panel-body.tight { padding: 0; }

/* ---------------- 按钮 / 表单 ---------------- */
.btn {
  height: 32px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.2s;
}
.btn:hover { border-color: rgba(87, 103, 118, 0.4); color: #fff; background: rgba(255, 255, 255, 0.055); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover { background: rgba(255, 255, 255, 0.02); border-color: var(--hairline); color: var(--text-2); }

/* 确认型主操作用渐变，其余一律描边 */
.btn-primary {
  background-image: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 2px 12px rgba(192, 38, 211, 0.18);
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, var(--grad-hover-from), var(--grad-hover-to));
  color: #fff; box-shadow: var(--grad-glow);
}
.btn-teal {
  background: var(--accent-soft); border-color: var(--accent-line);
  color: var(--accent-text); font-weight: 600;
}
.btn-teal:hover { background: rgba(123, 87, 224, 0.26); border-color: var(--accent); color: #fff; }
.btn-danger { color: var(--danger); border-color: rgba(245, 59, 48, 0.32); background: var(--danger-soft); }
.btn-danger:hover { background: rgba(245, 59, 48, 0.2); border-color: rgba(245, 59, 48, 0.5); color: #ffd0cd; }
.btn-sm { height: 27px; padding: 0 10px; font-size: 11px; border-radius: 6px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; }

/* 列表 / 卡片里的行级操作降级为描边，渐变只留给页面与弹窗的主确认操作 */
.pr-table .btn-primary,
.sb-table .btn-primary,
.aw-actions .btn-primary,
.skill-actions .btn-primary,
.pr-actions .btn-primary {
  background-image: none;
  background-color: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
  box-shadow: none;
}
.pr-table .btn-primary:hover,
.sb-table .btn-primary:hover,
.aw-actions .btn-primary:hover,
.skill-actions .btn-primary:hover,
.pr-actions .btn-primary:hover {
  background-color: rgba(123, 87, 224, 0.28);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

.icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02); color: var(--muted); font-size: 15px;
  transition: 0.15s;
}
.icon-btn:hover { color: #fff; border-color: var(--line); background: rgba(255, 255, 255, 0.06); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  color: var(--dim); font-size: 9.5px; letter-spacing: 1px;
  font-weight: 600; text-transform: uppercase;
}
.input, .select, .textarea {
  background: var(--panel-2); border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text); padding: 8px 11px; outline: none; width: 100%;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.input::placeholder, .textarea::placeholder { color: rgba(184, 192, 204, 0.4); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(87, 103, 118, 0.45); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(123, 87, 224, 0.7);
  box-shadow: 0 0 0 3px rgba(123, 87, 224, 0.22);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8c0cc' fill='none' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px;
}
.textarea { resize: vertical; line-height: 1.7; }
.input-sm { height: 27px; padding: 3px 8px; font-size: 11px; border-radius: 6px; }

.checkbox { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 11.5px; cursor: pointer; }
.checkbox input { accent-color: var(--accent); width: 13px; height: 13px; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toolbar .btn:not(.btn-primary):not(.btn-danger) { color: var(--muted); }
.hint { color: var(--dim); font-size: 10.5px; line-height: 1.65; }

/* ---------------- 剧本视图 ---------------- */
/* 指标条：一行小胶囊，不再占半屏 */
.script-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.metric {
  flex: 0 0 auto;
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.metric b {
  font-size: 13px; font-weight: 600; color: #fff;
  font-family: var(--mono); letter-spacing: -0.2px; line-height: 1.3;
}
.metric span { font-size: 9.5px; color: var(--dim); letter-spacing: 0.3px; }
.metric.accent b { color: var(--accent-text); }

.dropzone {
  border: 1px dashed rgba(87, 103, 118, 0.45); border-radius: var(--radius-panel);
  background:
    radial-gradient(600px 140px at 50% 0%, rgba(123, 87, 224, 0.10), transparent 70%),
    var(--panel);
  padding: 30px; text-align: center; transition: 0.18s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent-line);
  background-color: var(--raise);
}
.dropzone .dz-icon { font-size: 26px; margin-bottom: 8px; opacity: 0.7; color: var(--accent-text); }
.dropzone strong { display: block; font-size: 13.5px; margin-bottom: 5px; color: var(--text); }
.dropzone p { margin: 0; color: var(--dim); font-size: 11px; line-height: 1.7; }
.dropzone .dz-formats { margin-top: 11px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.dz-formats span {
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.03);
  padding: 2px 9px; border-radius: 999px; font-size: 9.5px; color: var(--muted);
  font-family: var(--mono);
}

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.script-textarea {
  width: 100%; min-height: 440px; background: transparent; border: none;
  color: #d5dae3; padding: 18px 20px; line-height: 1.9; font-size: 13px;
  font-family: var(--font); resize: vertical; outline: none;
}
.script-textarea::placeholder { color: rgba(184, 192, 204, 0.32); }
.editor-foot {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--hairline); background: transparent;
  font-size: 10.5px; color: var(--dim);
}
.editor-foot .spacer { flex: 1; }

.analysis-list { display: flex; flex-direction: column; gap: 11px; }
.analysis-item { border-left: 2px solid var(--line-soft); padding-left: 11px; }
.analysis-item b {
  display: block; font-size: 9.5px; color: var(--dim); font-weight: 600;
  letter-spacing: 0.8px; margin-bottom: 3px; text-transform: uppercase;
}
.analysis-item span { font-size: 11.5px; color: var(--text-2); line-height: 1.65; }
.analysis-item.hot { border-left-color: var(--accent); }

.workflow-tip {
  display: flex; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--hairline); border-left: 2px solid var(--accent);
  border-radius: var(--radius); background: rgba(123, 87, 224, 0.07);
  color: #cfc7f0; font-size: 11.5px; line-height: 1.7; margin-top: 14px;
}
.workflow-tip b { color: var(--accent-text); }

/* ---------------- 分镜表 ---------------- */
.sb-wrap {
  overflow: auto; max-height: calc(100vh - 300px);
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}
table.sb-table {
  border-collapse: separate; border-spacing: 0;
  width: max-content; min-width: 100%; font-size: 11px;
}
.sb-table th {
  position: sticky; top: 0; z-index: 5;
  background: #14171b; color: var(--dim);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.6px;
  padding: 9px 7px; border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap; text-align: left; text-transform: uppercase;
}
.sb-table th .en {
  display: block; color: rgba(184, 192, 204, 0.3); font-size: 8px;
  font-weight: 500; letter-spacing: 0.4px; margin-top: 2px;
}
.sb-table td {
  border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft);
  padding: 0; vertical-align: top; background: var(--panel);
}
.sb-table tr:nth-child(even) td { background: #131518; }
.sb-table tr:hover td { background: #1a1d22; }
.sb-table td.c-idx { background: #0f1113 !important; position: sticky; left: 0; z-index: 4; }
.sb-table th.c-idx { position: sticky; left: 0; z-index: 7; background: #14171b; }
.sb-table .cell-idx {
  font-family: var(--mono); color: var(--accent-text); font-size: 11px; font-weight: 600;
  padding: 8px 9px; display: flex; align-items: center; gap: 5px;
}
.sb-table .cell-input {
  border: none; background: transparent; color: var(--text-2);
  width: 100%; padding: 8px 7px; outline: none; line-height: 1.6;
  font-size: 11px; font-family: inherit; min-height: 32px; resize: none;
}
.sb-table .cell-input:focus {
  background: rgba(123, 87, 224, 0.12); color: #fff;
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.sb-table .cell-input.num { font-family: var(--mono); text-align: center; color: var(--accent-text); }
.sb-table td.c-frame { min-width: 290px; }
.sb-table td.c-dialogue { min-width: 230px; }
.sb-table td.c-line { min-width: 150px; }
.sb-table td.c-dur { width: 62px; }
.sb-table td.c-energy { width: 54px; }
.sb-table td.c-idx { width: 54px; }
.sb-table .row-del {
  color: var(--dim); background: none; border: none; font-size: 11px;
  padding: 2px; opacity: 0; transition: opacity 0.15s;
}
.sb-table tr:hover .row-del { opacity: 1; }
.sb-table .row-del:hover { color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-size: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-soft);
  color: var(--text-2); white-space: nowrap;
}
.chip .swatch { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.chip.character .swatch { background: var(--accent-text); }
.chip.scene .swatch { background: var(--teal); }
.chip.prop .swatch { background: #f0abfc; }
.chip.audio .swatch { background: #fda4af; }
.chip button { border: none; background: none; color: var(--dim); padding: 0; font-size: 11px; line-height: 1; }
.chip button:hover { color: var(--danger); }

/* ---------------- 提示词视图 ---------------- */
.prompt-list { display: flex; flex-direction: column; gap: 9px; }
.prompt-card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-panel); overflow: hidden;
  transition: border-color 0.15s;
}
.prompt-card:hover { border-color: rgba(87, 103, 118, 0.38); }
.prompt-card.expanded { border-color: var(--accent-line); }
.prompt-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  cursor: pointer; user-select: none;
}
.pc-group {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--accent-text);
  background: var(--accent-soft); border: 1px solid rgba(123, 87, 224, 0.28);
  padding: 3px 9px; border-radius: 6px; flex: 0 0 auto;
}
.pc-title {
  min-width: 120px; max-width: 280px; font-size: 12px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-shots { color: var(--dim); font-size: 9.5px; font-family: var(--mono); flex: 0 0 auto; }
.pc-param { color: var(--muted); font-size: 9.5px; font-family: var(--mono); flex: 0 0 auto; }
.prompt-head .spacer { flex: 1; }
.pc-refs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 330px; }
.pc-thumb {
  width: 42px; height: 32px; border-radius: 5px;
  background: var(--bg-deep) center/cover;
  border: 1px solid var(--line-soft); flex: 0 0 auto;
}
.pc-video {
  width: 60px; height: 40px; border-radius: 5px; border: 1px solid var(--line-soft);
  background: var(--bg-deep) center/cover; position: relative; flex: 0 0 auto;
}
.pc-video::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10px; color: #fff; opacity: 0.65;
}
.pc-video.empty {
  background: repeating-linear-gradient(45deg, #0d1013, #0d1013 4px, #12151a 4px, #12151a 8px);
}
.pc-video.empty::after { content: ""; }
.pc-arrow { color: var(--dim); font-size: 10px; transition: transform 0.2s; }
.prompt-card.expanded .pc-arrow { transform: rotate(180deg); }
.prompt-body { border-top: 1px solid var(--hairline); padding: 14px; display: none; }
.prompt-card.expanded .prompt-body { display: block; }

.prompt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.prompt-text {
  width: 100%; min-height: 320px; background: var(--bg-deep);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: #cfd6e2; padding: 13px; line-height: 1.8;
  font-family: var(--mono); font-size: 11px; resize: vertical; outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.prompt-text:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(123, 87, 224, 0.16); }

.inspector { display: flex; flex-direction: column; gap: 10px; }
.inspector .box {
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 11px;
}
.inspector .box h4 {
  margin: 0 0 9px; font-size: 9.5px; color: var(--dim);
  letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
}
.param-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.param-row:last-child { margin-bottom: 0; }
.param-row label { flex: 0 0 52px; color: var(--muted); font-size: 10.5px; }
.param-row .select, .param-row .input { height: 27px; padding: 3px 8px; font-size: 11px; }
.ref-list { display: flex; flex-direction: column; gap: 5px; }
.ref-item {
  display: flex; align-items: center; gap: 8px; padding: 4px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.03);
}
.ref-item img, .ref-item .ph {
  width: 28px; height: 28px; border-radius: 4px; object-fit: cover;
  background: var(--panel-3); flex: 0 0 28px;
}
.ref-item .rn {
  flex: 1; font-size: 10.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-item .rt { font-size: 9px; color: var(--dim); }
.ref-item button { border: none; background: none; color: var(--dim); font-size: 11px; padding: 2px; }
.ref-item button:hover { color: var(--danger); }
.ref-empty { color: var(--dim); font-size: 10.5px; line-height: 1.7; }
.add-ref { width: 100%; justify-content: center; }

.video-box {
  margin-top: 10px; border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-deep);
}
.video-box video { width: 100%; max-height: 340px; display: block; background: #000; }
.video-box .vb-foot {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03); font-size: 10px; color: var(--dim);
}
.video-box .vb-foot .spacer { flex: 1; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 9.5px; font-weight: 500;
  border: 1px solid transparent; white-space: nowrap;
}
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.idle { color: var(--dim); background: rgba(255, 255, 255, 0.04); border-color: var(--line-soft); }
.status-pill.running { color: var(--accent-text); background: var(--accent-soft); border-color: rgba(123, 87, 224, 0.3); }
.status-pill.running::before { animation: pulse 1s infinite; }
.status-pill.done { color: var(--ok); background: var(--ok-soft); border-color: rgba(143, 224, 132, 0.28); }
.status-pill.error { color: var(--danger); background: var(--danger-soft); border-color: rgba(245, 59, 48, 0.3); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------------- 提示词表格 ---------------- */
.pr-panel { margin-bottom: 12px; }
.pr-table-wrap { overflow: auto; max-height: calc(100vh - 290px); }
table.pr-table {
  width: 100%; min-width: 1260px; border-collapse: separate; border-spacing: 0;
  table-layout: fixed; font-size: 11px;
}
.pr-table th {
  position: sticky; top: 0; z-index: 5; text-align: left;
  background: #14171b; color: var(--dim); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.6px; padding: 10px 9px;
  border-bottom: 1px solid var(--hairline); border-right: 1px solid var(--line-soft);
  white-space: nowrap; text-transform: uppercase;
}
.pr-table td {
  padding: 9px; border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  background: var(--panel); vertical-align: middle;
}
.pr-table tr:last-child td { border-bottom: none; }
.pr-main { cursor: pointer; }
.pr-main:hover td { background: #1a1d22; }
.pr-main.expanded td { background: rgba(123, 87, 224, 0.07); }
.pr-group-cell { display: flex; align-items: center; gap: 7px; }
.pr-group-cell .pr-check { accent-color: var(--accent); }
.pr-shots {
  color: var(--dim); font-size: 9px; margin-top: 4px;
  padding-left: 20px; font-family: var(--mono);
}
.pr-scene { font-size: 10.5px; color: var(--text-2); line-height: 1.5; max-height: 32px; overflow: hidden; }
.pr-prompt-preview {
  font-family: var(--mono); font-size: 10px; color: #a9b3c2; line-height: 1.55;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-engine { font-size: 9px; color: var(--dim); margin-top: 4px; }
.pr-refs { display: flex; flex-wrap: wrap; gap: 3px; max-height: 54px; overflow: hidden; }
.pr-refs .chip { max-width: 100%; }
.chip-add {
  width: 20px; height: 18px; border-radius: 999px;
  border: 1px dashed var(--line); background: transparent;
  color: var(--dim); font-size: 11px; line-height: 1; padding: 0;
}
.chip-add:hover { color: var(--accent-text); border-color: var(--accent-line); }
.pr-table .input-sm { height: 26px; padding: 2px 6px; font-size: 10.5px; }
.pr-video-btn {
  width: 42px; height: 32px; border-radius: 5px; border: 1px solid var(--line-soft);
  background: repeating-linear-gradient(45deg, #0d1013, #0d1013 4px, #12151a 4px, #12151a 8px);
  color: var(--dim); font-size: 10px;
}
.pr-video-btn.has {
  background: linear-gradient(150deg, #2b2440, #171226);
  color: var(--accent-text); border-color: var(--accent-line);
}
.pr-actions { display: flex; flex-direction: column; gap: 4px; }
.pr-actions .btn { width: 100%; justify-content: center; padding: 0 5px; }
.pr-detail { display: none; }
.pr-detail.open { display: table-row; }
.pr-detail > td {
  background: var(--bg-deep) !important; padding: 14px !important;
  border-bottom: 1px solid var(--hairline) !important;
}
.pr-detail .prompt-grid { grid-template-columns: minmax(0, 1fr) 310px; }
.pr-detail .prompt-text { min-height: 300px; }

/* ---------------- Skills ---------------- */
.skill-picker, .model-picker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 5px 3px 10px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--raise);
}
.model-picker-label, .skill-picker-label {
  font-size: 8.5px; color: var(--dim); letter-spacing: 1.2px; text-transform: uppercase;
}
.model-picker .select, .skill-picker .skill-select {
  border: none; background: transparent; height: 24px;
  max-width: 240px; padding: 0 20px 0 2px; font-size: 11px; color: var(--text-2);
}
.model-picker .btn, .skill-picker .btn {
  border: none; background: transparent; color: var(--accent-text);
}
.model-price { color: var(--accent-text); font-size: 9.5px; font-family: var(--mono); white-space: nowrap; }

.video-config-panel { padding: 13px 15px; margin-bottom: 12px; }
.vc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.vc-head b { font-size: 12px; letter-spacing: 0.3px; }
.vc-price { color: var(--accent-text); font-size: 9.5px; font-family: var(--mono); text-align: right; }
.vc-row { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.vc-row label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 8.5px; color: var(--dim); letter-spacing: 0.6px; text-transform: uppercase;
}
.vc-row label.checkbox {
  flex-direction: row; align-items: center; gap: 5px;
  padding-bottom: 7px; text-transform: none; letter-spacing: 0; font-size: 11px;
}
.vc-row .input, .vc-row .select { min-width: 74px; }
.vc-row #vcModel { min-width: 190px; }
.vc-row #vcDuration { width: 64px; min-width: 64px; }
.vc-row #vcSeed { width: 76px; min-width: 76px; }
.pr-model { font-size: 10.5px; font-family: var(--mono); color: var(--text-2); }
.pr-model-tag { font-size: 9px; color: var(--dim); margin-top: 2px; }
.pr-ro { font-size: 10.5px; font-family: var(--mono); color: var(--text-2); }

.side-count {
  min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font: 10px/18px var(--mono); text-align: center;
}
.history-entry {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px;
  padding: 11px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel); color: var(--text-2); text-align: left; cursor: pointer;
  transition: 0.15s;
}
.history-entry:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.history-entry-icon { color: var(--accent-text); font-size: 15px; }
.history-entry b { display: block; font-size: 11px; font-weight: 500; }
.history-entry small { display: block; margin-top: 2px; color: var(--dim); font-size: 9.5px; }
.history-entry-arrow { margin-left: auto; color: var(--dim); }

.history-tabs { display: flex; gap: 6px; margin-bottom: 13px; }
.history-tabs button {
  padding: 5px 11px; border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent; color: var(--dim); font-size: 10px; cursor: pointer;
  transition: 0.15s;
}
.history-tabs button:hover { color: var(--text-2); }
.history-tabs button.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px; }
.history-card {
  display: block; border: 1px solid var(--hairline); border-radius: 12px;
  overflow: hidden; background: var(--panel); color: inherit; text-decoration: none;
  transition: border-color 0.15s;
}
.history-card:hover { border-color: var(--accent-line); text-decoration: none; }
.history-thumb {
  position: relative; aspect-ratio: 16 / 10; background: var(--bg-deep);
  display: grid; place-items: center; overflow: hidden;
}
.history-thumb img, .history-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.history-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 22px; background: rgba(0, 0, 0, 0.2);
}
.history-meta { padding: 9px 10px; }
.history-name { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-sub { margin-top: 3px; color: var(--dim); font-size: 9px; }
.modal-sub { color: var(--dim); font-size: 10px; font-weight: 400; margin-left: 6px; }

.skill-summary { display: flex; flex-direction: column; gap: 6px; }
.skill-summary-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: rgba(255, 255, 255, 0.025);
}
.skill-summary-stage { width: 56px; color: var(--dim); font-size: 9.5px; letter-spacing: 0.8px; text-transform: uppercase; }
.skill-summary-name { flex: 1; font-size: 12px; color: var(--text-2); }

.skill-group { margin-bottom: 20px; }
.skill-group-head {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--dim); font-size: 9.5px; font-weight: 600; letter-spacing: 1px;
  padding: 0 2px 8px; border-bottom: 1px solid var(--hairline);
  margin-bottom: 9px; text-transform: uppercase;
}
.skill-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 12px; border: 1px solid var(--hairline);
  border-radius: 12px; background: var(--panel); margin-bottom: 7px;
}
.skill-row.active { border-color: var(--accent-line); background: rgba(123, 87, 224, 0.08); }
.skill-ico {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 14px;
}
.skill-main { flex: 1; min-width: 0; }
.skill-title { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.skill-sub { font-size: 9.5px; color: var(--dim); margin-top: 3px; }
.skill-desc { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.65; }
.skill-actions {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  justify-content: flex-end; max-width: 260px;
}

/* ---------------- 资产工作台 ---------------- */
.asset-group { margin-bottom: 20px; }
.asset-group-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 600; color: var(--dim);
  letter-spacing: 1.1px; text-transform: uppercase;
  padding: 0 2px 9px; border-bottom: 1px solid var(--hairline); margin-bottom: 11px;
}
.asset-work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 11px; }
.asset-work-card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 14px;
  overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.asset-work-card:hover { border-color: rgba(87, 103, 118, 0.42); transform: translateY(-1px); }
.asset-work-card.has-image { border-color: rgba(123, 87, 224, 0.32); }
.aw-thumb { aspect-ratio: 4 / 3; background: var(--bg-deep); display: grid; place-items: center; overflow: hidden; }
.aw-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.aw-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(184, 192, 204, 0.28); font-size: 30px;
}
.aw-placeholder span { font-size: 9.5px; letter-spacing: 0.6px; }
.aw-body { padding: 11px; display: flex; flex-direction: column; gap: 6px; }
.aw-title { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.aw-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-desc {
  font-size: 10.5px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 32px;
}
.aw-meta { font-size: 9px; color: var(--dim); font-family: var(--mono); }
.aw-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.aw-actions .btn { padding: 0 8px; }

/* ---------------- 分镜卡片（20 字段不再摊在表格里） ---------------- */
.sb-cards { display: flex; flex-direction: column; gap: 10px; padding: 14px; }

.shot-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;
  transition: border-color 0.16s;
}
.shot-card:hover { border-color: rgba(87, 103, 118, 0.4); }
.shot-card:focus-within { border-color: var(--accent-line); }

.shot-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.022);
}
.shot-no {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 8px;
}
.sf { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--dim); }
.sf > span { white-space: nowrap; letter-spacing: 0.4px; }
.sf .cell-input {
  border: 1px solid var(--line-soft); border-radius: 6px;
  background: var(--panel-2); padding: 4px 7px;
  min-height: 24px; width: auto; min-width: 64px;
  font-size: 11px; color: var(--text-2); outline: none;
}
.sf .cell-input:focus { border-color: var(--accent-line); color: #fff; }
.sf-scene .cell-input { min-width: 130px; }
.sf-dur .cell-input {
  width: 62px; min-width: 62px; text-align: center;
  color: var(--accent-text); font-family: var(--mono);
}

.shot-main {
  display: grid; grid-template-columns: 1.4fr 1fr 0.8fr; gap: 10px; padding: 11px 12px;
}
.sf-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sf-block > span {
  font-size: 9px; color: var(--dim); letter-spacing: 0.8px; text-transform: uppercase;
}
.sf-big {
  border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--bg-deep); padding: 8px 10px;
  min-height: 58px; width: 100%; resize: vertical; outline: none;
  font-size: 11.5px; line-height: 1.7; color: var(--text-2);
}
.sf-big:focus {
  border-color: var(--accent-line); color: #fff;
  box-shadow: 0 0 0 2px rgba(123, 87, 224, 0.18);
}

.shot-more { border-top: 1px solid var(--line-soft); }
.shot-more > summary {
  cursor: pointer; padding: 8px 12px;
  font-size: 9.5px; color: var(--dim); letter-spacing: 0.6px; list-style: none;
}
.shot-more > summary::-webkit-details-marker { display: none; }
.shot-more[open] > summary { color: var(--accent-text); }
.shot-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px; padding: 0 12px 12px;
}
.shot-fields .sf { flex-direction: column; align-items: stretch; gap: 3px; }
.shot-fields .cell-input {
  width: 100%; min-height: 26px; border: 1px solid var(--line-soft);
  border-radius: 6px; background: var(--panel-2); padding: 5px 7px;
  font-size: 11px; color: var(--text-2); outline: none;
}
.shot-fields .cell-input:focus { border-color: var(--accent-line); color: #fff; }

.pc-sel {
  height: 26px; padding: 2px 20px 2px 8px; font-size: 10.5px;
  max-width: 160px; font-family: var(--mono); color: var(--text-2);
}

.awc-vars { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.awc-var {
  width: 38px; height: 38px; border-radius: 8px; overflow: hidden; padding: 0;
  border: 1px solid var(--line-soft); background: var(--bg-deep);
  display: grid; place-items: center; cursor: pointer; transition: 0.15s;
}
.awc-var:hover { border-color: var(--accent); transform: translateY(-1px); }
.awc-var img { width: 100%; height: 100%; object-fit: cover; display: block; }
.awc-var span { font-size: 8px; color: var(--dim); padding: 2px; text-align: center; line-height: 1.2; }

/* ---------------- 提示词卡片 ---------------- */
.pr-cards { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pr-card {
  position: relative; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;
  transition: border-color 0.16s;
}
.pr-card:hover { border-color: rgba(87, 103, 118, 0.4); }
.pr-card.expanded { border-color: var(--accent-line); }
.pc-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px;
}
.pc-head .spacer { flex: 1; }
.pc-chip {
  font-size: 9.5px; color: var(--dim);
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 2px 8px; font-family: var(--mono); white-space: nowrap;
}
.pc-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-dur { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--dim); }
.pc-dur .input {
  width: 68px; height: 26px; padding: 2px 7px;
  font-size: 11px; text-align: center; font-family: var(--mono);
  color: var(--accent-text);
}
.pr-card .pr-detail { display: none; border-top: 1px solid var(--line-soft); padding: 12px; }
.pr-card .pr-detail.open { display: block; }
.pr-card .pr-prompt-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1360px) {
  .shot-main { grid-template-columns: 1fr; }
}

/* ---------------- 资产卡片（图优先，悬停出操作） ---------------- */
.awc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px;
}
.awc {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 14px; overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.awc:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}
.awc-media {
  position: relative; height: 190px; background: var(--bg-deep); overflow: hidden;
  display: grid; place-items: center;
}
/* 用 contain 而不是 cover：竖图横图都完整显示，不再把 16:9 的英雄图裁成竖条 */
.awc-media img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.awc-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: rgba(184, 192, 204, 0.26); font-size: 30px;
}
.awc-empty span { font-size: 9.5px; letter-spacing: 0.5px; }
.awc-media-audio {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #1d1838, #12141a 75%);
}
.awc-media-audio span { font-size: 30px; color: var(--accent-text); }
.awc-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; padding: 2px 7px; border-radius: 999px;
  background: rgba(8, 9, 11, 0.66); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08); color: var(--muted);
}
.awc-badge.ok { color: var(--ok); }
.awc-badge.run { color: var(--accent-text); }
.awc-badge.bad { color: var(--danger); }
.awc-host {
  position: absolute; top: 8px; right: 8px;
  font-size: 9px; padding: 2px 7px; border-radius: 999px;
  background: rgba(42, 163, 31, 0.18); color: var(--ok);
  border: 1px solid rgba(143, 224, 132, 0.32);
}
.awc-actions {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 4px; padding: 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s;
}
.awc:hover .awc-actions, .awc:focus-within .awc-actions { opacity: 1; transform: none; }
.awc-act {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 19, 22, 0.85); color: #fff; font-size: 12px;
  display: grid; place-items: center; transition: 0.15s;
}
.awc-act:hover { background: var(--accent); border-color: var(--accent); }
.awc-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.awc-name {
  font-size: 11.5px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.awc-sub { font-size: 9px; color: var(--dim); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.awc-model { font-family: var(--mono); }
.awc-dot { opacity: 0.5; }
.awc-audio-el { width: 100%; height: 30px; margin-top: 5px; }
.awc-err { font-size: 9px; color: var(--danger); line-height: 1.45; margin-top: 2px; }

/* ---------------- 成片时间线 ---------------- */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.preview-panel {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-panel); overflow: hidden;
}
.preview-stage {
  background: radial-gradient(circle at 50% 42%, #15161b, var(--bg-deep) 72%);
  aspect-ratio: 16 / 9; max-height: 52vh; display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.preview-stage video { max-width: 100%; max-height: 52vh; display: block; }
.preview-stage .stage-empty { color: var(--dim); text-align: center; font-size: 11.5px; line-height: 1.9; }
.preview-stage .stage-empty b { display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.preview-controls {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  border-top: 1px solid var(--hairline); background: transparent;
}
.preview-controls .timecode { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.preview-controls .spacer { flex: 1; }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--accent-text); font-size: 12px; display: grid; place-items: center;
  transition: 0.15s;
}
.play-btn:hover { background: rgba(123, 87, 224, 0.26); color: #fff; }
.scrub {
  flex: 1; height: 4px; background: rgba(255, 255, 255, 0.09);
  border-radius: 3px; position: relative; cursor: pointer; min-width: 80px;
}
.scrub .fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--grad-from), var(--grad-to));
}
.scrub .knob {
  position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(123, 87, 224, 0.3);
}

.timeline-panel {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-panel); overflow: hidden; margin-top: 12px;
}
.timeline-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--hairline); font-size: 11px; color: var(--muted);
}
.timeline-scroll { overflow-x: auto; overflow-y: hidden; padding: 0 0 8px; }
.timeline-inner { min-width: 100%; position: relative; }
.ruler { height: 22px; position: relative; border-bottom: 1px solid var(--line-soft); margin-left: 66px; }
.ruler .tick {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8px; color: var(--dim); padding-left: 3px;
  line-height: 22px; font-family: var(--mono);
}
.ruler .tick.major { border-left-color: rgba(255, 255, 255, 0.14); }
.track-row { display: flex; align-items: stretch; }
.track-label {
  width: 66px; flex: 0 0 66px; display: flex; align-items: center; gap: 5px;
  padding: 0 8px; color: var(--dim); font-size: 9px;
  border-right: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.6px; text-transform: uppercase;
}
.track-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.track {
  position: relative; height: 64px; flex: 1; min-width: 100px;
  background: repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255, 255, 255, 0.045) 79px, rgba(255, 255, 255, 0.045) 80px);
  border-bottom: 1px solid var(--line-soft);
}
.clip {
  position: absolute; top: 7px; height: 50px; border-radius: var(--radius);
  background: linear-gradient(155deg, #2a2440, #1a1726);
  border: 1px solid rgba(123, 87, 224, 0.32);
  overflow: hidden; cursor: grab;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32); user-select: none;
  transition: box-shadow 0.12s, border-color 0.12s;
}
.clip:hover { border-color: rgba(201, 182, 255, 0.55); }
.clip.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(0, 0, 0, 0.42); }
.clip.dragging { opacity: 0.35; }
.clip.drop-target { border-color: var(--teal); }
.clip .clip-thumb {
  position: absolute; inset: 0; background: var(--bg-deep) center/cover no-repeat;
  opacity: 0.4;
}
.clip .clip-info { position: relative; padding: 6px 8px; z-index: 1; }
.clip .clip-g {
  font-family: var(--mono); font-size: 9px; color: var(--accent-text);
  font-weight: 700; letter-spacing: 0.4px;
}
.clip .clip-name {
  font-size: 9.5px; color: #e6e3f2; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clip .clip-dur { font-family: var(--mono); font-size: 8.5px; color: rgba(230, 227, 242, 0.6); margin-top: 3px; }
.clip .trim {
  position: absolute; top: 0; bottom: 0; width: 7px; z-index: 3;
  cursor: ew-resize; background: rgba(192, 38, 211, 0); transition: background 0.12s;
}
.clip .trim:hover, .clip .trim.active { background: rgba(192, 38, 211, 0.6); }
.clip .trim.left { left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.clip .trim.right { right: 0; border-radius: 0 var(--radius) var(--radius) 0; }

.timeline-empty {
  padding: 34px; text-align: center; color: var(--dim);
  font-size: 11.5px; line-height: 1.8;
}

.export-box { position: sticky; top: 12px; }
.export-box .panel-body { display: flex; flex-direction: column; gap: 11px; }
.export-row { display: flex; gap: 8px; }
.export-row .field { flex: 1; }
.export-actions { display: flex; flex-direction: column; gap: 8px; }
.export-history { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto; }
.export-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px;
  border-radius: var(--radius); background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
}
.export-item .ei-icon {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent-soft); font-size: 11px; color: var(--accent-text); flex: 0 0 26px;
}
.export-item .ei-body { flex: 1; min-width: 0; }
.export-item .ei-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.export-item .ei-sub { font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.export-item a { font-size: 10px; }

/* ---------------- 弹窗 / 提示 ---------------- */
.modal-root {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 6, 8, 0.74); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px;
}
.modal {
  width: min(760px, 100%); max-height: 88vh; overflow: hidden;
  background: #131518; border: 1px solid var(--line);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.modal.wide { width: min(980px, 100%); }
.modal-head {
  display: flex; align-items: center; gap: 10px; padding: 17px 20px;
  border-bottom: 1px solid var(--hairline);
}
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 8px; padding: 14px 20px;
  border-top: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.02);
}
.modal-foot .spacer { flex: 1; }

.tabs {
  display: flex; gap: 4px; padding: 0 20px;
  border-bottom: 1px solid var(--hairline); background: transparent;
}
.tabs button {
  border: none; background: transparent; color: var(--dim);
  padding: 12px 12px; font-size: 12px; font-weight: 500;
  border-bottom: 2px solid transparent; transition: color 0.15s;
}
.tabs button:hover { color: var(--text-2); }
.tabs button.active { color: #fff; border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-sep { grid-column: 1 / -1; height: 1px; background: var(--line-soft); margin: 4px 0; }
.form-note { color: var(--dim); font-size: 10.5px; line-height: 1.7; grid-column: 1 / -1; }

.toast-root {
  position: fixed; top: 76px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  min-width: 240px; max-width: 420px; padding: 11px 14px; border-radius: 12px;
  background: #1a1d22; border: 1px solid var(--line); color: var(--text-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); font-size: 11.5px; line-height: 1.6;
  animation: toast-in 0.22s ease-out; pointer-events: auto;
}
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid #f53b30; }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } }

.job-dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  width: 380px; background: #131518; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.job-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  border-bottom: 1px solid var(--hairline);
}
.job-head .jh-title { font-size: 11.5px; font-weight: 600; }
.job-head .jh-state { font-size: 10px; color: var(--accent-text); margin-left: auto; font-family: var(--mono); }
.job-progress { height: 2px; background: rgba(255, 255, 255, 0.07); }
.job-progress .bar {
  height: 100%; transition: width 0.3s;
  background: linear-gradient(90deg, var(--grad-from), var(--grad-to));
}
.job-msg {
  padding: 9px 13px; font-size: 10.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-logs {
  max-height: 150px; overflow-y: auto; padding: 0 13px 10px;
  font-family: var(--mono); font-size: 9.5px; line-height: 1.75; color: var(--dim);
  display: none;
}
.job-logs.open { display: block; }
.job-logs .err { color: var(--danger); }
.job-logs .warn { color: var(--warn); }
.job-logs .success { color: var(--ok); }
.job-foot { display: flex; gap: 6px; padding: 8px 13px 11px; }
.job-foot button { font-size: 10px; }

/* ---------------- 空状态 ---------------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 54px 20px; color: var(--dim); gap: 10px;
}
.empty-state .es-icon { font-size: 34px; opacity: 0.42; }
.empty-state b { color: var(--text-2); font-size: 14px; font-weight: 600; }
.empty-state p { margin: 0; font-size: 11.5px; line-height: 1.8; max-width: 380px; }
.empty-state .toolbar { margin-top: 8px; justify-content: center; }

/* 批量流水线回执（JS 动态插入） */
.batch-ep { font-size: 10.5px; color: var(--text-2); line-height: 1.7; }
.batch-ep .status { font-family: var(--mono); font-size: 9.5px; color: var(--accent-text); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1360px) {
  .sidebar { width: 266px; flex-basis: 266px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr; }
  .export-box { position: static; }
  .editor-grid { grid-template-columns: 1fr; }
  .script-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .sidebar { display: none; }
  .brand { min-width: auto; }
  .brand-text span { display: none; }
  .topbar-center { justify-content: flex-end; }
  .step-nav { padding: 10px 14px; }
  .view { padding: 16px 14px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 界面构建版本：用来确认浏览器拿到的到底是哪一版 */
.build-tag {
  font-family: var(--mono); font-size: 9.5px; color: var(--dim);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 2px 8px; letter-spacing: 0.2px; white-space: nowrap;
}

/* 原生 select 的选项列表由系统绘制，只能这样兜住 */
select, .select { color-scheme: dark; }
select option, .select option,
select optgroup, .select optgroup {
  background: #1a1d22;
  color: #e3e3e3;
}
select option:disabled { color: rgba(184, 192, 204, 0.35); }

/* 提示词卡片：来源链（场次 / 镜号 / 参考资产数） */
.pc-source {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line-soft);
  font-size: 10.5px; color: var(--dim);
}
.pc-source .ps-label {
  padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.06);
  color: var(--text-2); font-size: 10px; letter-spacing: .5px;
}
.pc-source .ps-scene { color: var(--text-2); }
.pc-source .ps-sep { opacity: .5; }

/* 04 卡片头部：紧凑的选择器 + 高亮主操作 */
.pc-sel-model { width: 108px; }
.pc-sel-ratio { width: 66px; }
.pc-sel-res { width: 74px; }
.pc-dur-inline {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--dim); font-size: 10.5px; white-space: nowrap;
}
.pc-dur-inline input { width: 46px; text-align: center; }
.pc-sel { padding-top: 3px; padding-bottom: 3px; font-size: 11px; }
.btn-generate {
  background: rgba(122, 92, 255, 0.16) !important;
  border-color: rgba(122, 92, 255, 0.5) !important;
  color: #cfc4ff !important;
}
.btn-generate:hover { background: rgba(122, 92, 255, 0.28) !important; }
.btn-accent {
  background: linear-gradient(135deg, #6f5bff, #8a6bff) !important;
  border-color: transparent !important; color: #fff !important;
  box-shadow: 0 0 0 1px rgba(140, 110, 255, .35), 0 4px 14px -6px rgba(120, 90, 255, .8);
}
.btn-accent:hover { filter: brightness(1.08); }

/* 角色卡片：锚定 + 状态入口 */
.awc-lock { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; }
.awc-lock-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,.06); color: var(--dim);
}
.awc-lock-tag.ok { background: rgba(90, 200, 160, .16); color: #7fe0bf; }

/* 资产组末尾的「＋ 添加」卡 */
.awc-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 168px; border: 1px dashed var(--line-soft); border-radius: var(--radius);
  background: rgba(255,255,255,.015); color: var(--dim); font-size: 11px; cursor: pointer;
}
.awc-add:hover { border-color: rgba(140,110,255,.6); color: #cfc4ff; background: rgba(120,90,255,.06); }
.awc-add-icon { font-size: 20px; line-height: 1; }

/* 项目资产库弹窗 */
.al-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.al-row:hover { background: rgba(255,255,255,.03); }
.al-thumbs { display: flex; gap: 4px; flex: none; }
.al-thumb { width: 34px; height: 44px; border-radius: 6px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255,255,255,.05); color: var(--dim); font-size: 11px; }
.al-thumb img { width: 100%; height: 100%; object-fit: cover; }
.al-thumb.ok { outline: 1px solid rgba(90,200,160,.35); }
.al-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.al-name { font-size: 12px; color: var(--text); }
.al-sub { font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.awc-lock-tag.bad { background: rgba(230, 90, 90, .16); color: #ff9a9a; }

.awc-var-wrap { position: relative; display: inline-block; }
.awc-var-del {
  position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; line-height: 14px;
  border-radius: 50%; border: 1px solid var(--line-soft); background: #2a2a33; color: #cfcfd6;
  font-size: 11px; cursor: pointer; padding: 0;
}
.awc-var-del:hover { background: #a33; color: #fff; }
.awc-var-stale {
  position: absolute; left: -4px; bottom: -4px; font-size: 9px; padding: 0 4px; border-radius: 3px;
  background: rgba(230,90,90,.2); color: #ff9a9a;
}
.mini-link-danger { color: #ff9a9a; }
