/* 导演台（单镜头）· 深色控制台皮肤
   仅作用于 index.html 的 #createCard，不影响站点其他页面。 */

/* 导演台按视口比例缩放：宽度 80%，顶部栏与主体同宽对齐 */
main.director-mode {
  width: 80vw;
  max-width: none;
  margin: 0 auto;
  padding: 10px 0 16px;
}
.topbar.director-mode {
  width: 80vw;
  max-width: none;
}

.director-shell {
  --dr-bg-0: var(--shell-bg, #070d12);
  --dr-bg-1: #0b131a;
  --dr-bg-2: var(--shell-card, #0f1922);
  --dr-bg-3: #13202b;
  --dr-line: #1f2d3b;
  --dr-line-2: #2a3b4d;
  --dr-text: #dce7f0;
  --dr-muted: #7f93a4;
  --dr-dim: #5f7387;
  --dr-accent: #2dd4a7;
  --dr-accent-2: #34d399;
  --dr-warn: #fbbf24;

  position: relative;
  margin-top: 16px;
  /* 高度随素材 / 文字内容增长，至少铺满一屏，由页面整体滚动 */
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 90vh;
  color: var(--dr-text);
  background:
    radial-gradient(1100px 380px at 18% -12%, var(--shell-glow-a, rgba(45, 212, 167, .10)), transparent 62%),
    radial-gradient(900px 320px at 102% -4%, var(--shell-glow-b, rgba(96, 165, 250, .08)), transparent 58%),
    var(--dr-bg-0);
  border: 1px solid #1b2835;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 14, 22, .26), inset 0 1px 0 rgba(255, 255, 255, .03);
  /* 不再锁内部滚动：素材变多时整个导演台跟着变高，由页面滚动 */
  overflow: visible;
}

.director-shell * { scrollbar-width: thin; scrollbar-color: #2a3b4d transparent; }
.director-shell *::-webkit-scrollbar { width: 8px; height: 8px; }
.director-shell *::-webkit-scrollbar-thumb { background: #2a3b4d; border-radius: 999px; }
.director-shell *::-webkit-scrollbar-track { background: transparent; }

/* ---------- 导演台模式：整页深色 ---------- */
/* 只改 CSS 变量 + 少量硬编码亮色，任务 / 成片 / 历史 / 资产库自动跟着变深 */
body.director-mode {
  --bg: #05090d;
  --bg-card: #0b131a;
  --bg-soft: #0f1922;
  --border: #1f2d3b;
  --border-strong: #263545;
  --text: #dce7f0;
  --muted: #7f93a4;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, .32);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .42);
  /* 背景主题（默认：午夜） */
  --page-bg: #05090d;
  --page-glow: rgba(45, 212, 167, .07);
  --shell-bg: #070d12;
  --shell-card: #0f1922;
  --shell-glow-a: rgba(45, 212, 167, .10);
  --shell-glow-b: rgba(96, 165, 250, .08);
  background:
    radial-gradient(1200px 480px at 50% -10%, var(--page-glow), transparent 62%),
    var(--page-bg);
  color: var(--text);
}

/* ---- 背景主题：只换环境色，不动卡片与控件 ---- */
body.director-mode.theme-ink {
  --page-bg: #040a12;
  --page-glow: rgba(56, 189, 248, .10);
  --shell-bg: #060f19;
  --shell-card: #0e1c2b;
  --shell-glow-a: rgba(56, 189, 248, .13);
  --shell-glow-b: rgba(99, 102, 241, .10);
}
body.director-mode.theme-forest {
  --page-bg: #030d0a;
  --page-glow: rgba(45, 212, 167, .10);
  --shell-bg: #06120e;
  --shell-card: #0d1d16;
  --shell-glow-a: rgba(45, 212, 167, .16);
  --shell-glow-b: rgba(16, 185, 129, .07);
}
body.director-mode.theme-violet {
  --page-bg: #0a0612;
  --page-glow: rgba(168, 85, 247, .10);
  --shell-bg: #0d0918;
  --shell-card: #191126;
  --shell-glow-a: rgba(168, 85, 247, .14);
  --shell-glow-b: rgba(236, 72, 153, .08);
}
body.director-mode.theme-amber {
  --page-bg: #0d0906;
  --page-glow: rgba(251, 146, 60, .09);
  --shell-bg: #120c08;
  --shell-card: #201510;
  --shell-glow-a: rgba(251, 146, 60, .12);
  --shell-glow-b: rgba(244, 63, 94, .06);
}
body.director-mode.theme-black {
  --page-bg: #000;
  --page-glow: transparent;
  --shell-bg: #050505;
  --shell-card: #0d0d0d;
  --shell-glow-a: transparent;
  --shell-glow-b: transparent;
}

/* ---- 亮色主题（米白 / 浅灰 / 天蓝 / 薄荷，组件由 .is-light 整体换肤） ---- */
body.director-mode.theme-paper {
  --page-bg: #f4f1e9;
  --page-glow: rgba(214, 178, 116, .18);
  --shell-bg: #fffdf8;
  --shell-card: #ffffff;
  --shell-glow-a: rgba(214, 178, 116, .16);
  --shell-glow-b: rgba(120, 190, 170, .10);
}
body.director-mode.theme-mist {
  --page-bg: #e9eef2;
  --page-glow: rgba(120, 155, 180, .16);
  --shell-bg: #ffffff;
  --shell-card: #f9fbfc;
  --shell-glow-a: rgba(120, 155, 180, .14);
  --shell-glow-b: rgba(80, 200, 180, .10);
}
body.director-mode.theme-sky {
  --page-bg: #e7f1fb;
  --page-glow: rgba(56, 152, 236, .14);
  --shell-bg: #fcfeff;
  --shell-card: #ffffff;
  --shell-glow-a: rgba(56, 152, 236, .14);
  --shell-glow-b: rgba(99, 179, 237, .10);
}
body.director-mode.theme-mint {
  --page-bg: #e8f6ee;
  --page-glow: rgba(16, 185, 129, .13);
  --shell-bg: #fbfefc;
  --shell-card: #ffffff;
  --shell-glow-a: rgba(16, 185, 129, .14);
  --shell-glow-b: rgba(56, 152, 236, .06);
}

/* ---- 背景切换按钮（账号徽标左侧） ---- */
body:not(.director-mode) .theme-picker { display: none; }
.theme-picker { position: relative; display: inline-flex; flex: none; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  border: 1px solid #263545;
  background: #0d1720;
  color: #cfe0ec;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.theme-btn:hover { background: #13212c; border-color: #35506a; }
.theme-btn[aria-expanded="true"] {
  background: rgba(45, 212, 167, .10);
  border-color: rgba(45, 212, 167, .46);
  color: #b9f6e2;
}
.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0f1922;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 8px rgba(45, 212, 167, .22);
  flex: none;
}
.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  width: 172px;
  padding: 6px;
  border: 1px solid #2a3b4d;
  border-radius: 12px;
  background: #0f1922;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  display: grid;
  gap: 2px;
}
.theme-menu[hidden] { display: none; }
.theme-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cfe0ec;
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.theme-item:hover { background: #15222d; }
.theme-item.is-active { background: rgba(45, 212, 167, .12); color: #8ef0cf; }
.theme-item-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  flex: none;
}
.theme-item-name { flex: 1; }
.theme-item-check { font-size: 11px; color: #2dd4a7; }
body.director-mode .brand { color: #e8f3fa; }
body.director-mode .brand .sub { color: #5f7387; }
body.director-mode .chip {
  background: rgba(45, 212, 167, .08);
  border-color: rgba(45, 212, 167, .22);
  color: #8ef0cf;
}
body.director-mode .chip.wait {
  background: rgba(251, 191, 36, .10);
  border-color: rgba(251, 191, 36, .28);
  color: #f5d38a;
}
body.director-mode .chip.ok {
  background: rgba(45, 212, 167, .10);
  border-color: rgba(45, 212, 167, .26);
  color: #8ef0cf;
}
body.director-mode .chip.err {
  background: rgba(239, 68, 68, .10);
  border-color: rgba(239, 68, 68, .30);
  color: #fca5a5;
}
body.director-mode .btn {
  background: #0d1720;
  border-color: #263545;
  color: #cfe0ec;
  box-shadow: none;
}
body.director-mode .btn:hover {
  background: #13212c;
  border-color: #35506a;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .34);
}
body.director-mode .btn.primary {
  background: linear-gradient(135deg, #34d399, #0fa97c);
  border-color: #17b98f;
  color: #04140f;
}
body.director-mode .btn.danger {
  background: rgba(239, 68, 68, .08);
  border-color: rgba(239, 68, 68, .3);
  color: #fca5a5;
}
body.director-mode .card h2 { color: #dce7f0; }
body.director-mode .input,
body.director-mode .textarea {
  background: #081017;
  border-color: #263545;
  color: var(--text);
}
body.director-mode .input::placeholder,
body.director-mode .textarea::placeholder { color: #4c6176; }
body.director-mode .progress { background: #101d27; }
body.director-mode .history-item { background: #0d1720; border-color: #223041; }
body.director-mode .history-item:hover { background: #13212c; border-color: #35506a; }
body.director-mode .history-item .h-prompt { color: #cfe0ec; }
body.director-mode .h-tag { background: #0f1c26; border-color: #263545; color: #8ea3b5; }
body.director-mode .h-tag.h-on { background: rgba(45, 212, 167, .10); border-color: rgba(45, 212, 167, .32); color: #6ee7b7; }
body.director-mode .h-tag.h-used { background: rgba(45, 212, 167, .08); border-color: rgba(45, 212, 167, .30); color: #9df3d5; }
body.director-mode .msg.warn { color: #fbbf24; }

/* 资产库 / 弹窗跟随深色 */
body.director-mode .lib-item { background: #0f1a24; }
body.director-mode .lib-item:hover { border-color: rgba(45, 212, 167, .42); }
body.director-mode .lib-thumb { background: #081017; }
body.director-mode .lib-folder:hover { background: rgba(255, 255, 255, .04); }
body.director-mode .lib-folder.active {
  background: rgba(45, 212, 167, .12);
  border-color: rgba(45, 212, 167, .32);
  color: #8ef0cf;
}
body.director-mode .lib-search-clear:hover,
body.director-mode .lib-icon-btn.plain:hover,
body.director-mode .lib-move:hover,
body.director-mode .modal-close:hover { background: #13212c; color: #dce7f0; }
body.director-mode .lib-icon-btn:hover,
body.director-mode .lib-del:hover { background: rgba(239, 68, 68, .14); }
body.director-mode .lib-icon-btn.plain.lib-folder-upload:hover {
  background: rgba(45, 212, 167, .14);
  color: #8ef0cf;
}
body.director-mode .library-grid.drag { background: rgba(45, 212, 167, .06); }
body.director-mode .lib-audio-cover,
body.director-mode .lib-pick-audio {
  background: linear-gradient(135deg, #10222c, #0a1720);
  color: #6ee7b7;
}
body.director-mode .library-empty-icon { background: #10222c; color: #6ee7b7; }
body.director-mode .lib-usage-bar { background: #101d27; }
body.director-mode .lib-move-menu { background: #0f1922; border-color: #2a3b4d; }
body.director-mode .lib-move-item:hover { background: #13212c; }
body.director-mode .lib-move-item.active { background: rgba(45, 212, 167, .12); color: #8ef0cf; }
body.director-mode .modal-mask { background: rgba(2, 6, 10, .66); }
body.director-mode .modal-card {
  background: #0f1922;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
body.director-mode .modal-foot { background: #0b131a; }
body.director-mode .lib-pick { background: #081017; }
body.director-mode .lib-pick:hover { border-color: rgba(45, 212, 167, .5); }
body.director-mode .lib-pick-check { background: #0f1922; border-color: #2a3b4d; }
body.director-mode .lib-pick.selected .lib-pick-check {
  background: #10b981;
  border-color: #10b981;
  color: #04140f;
}

/* ---------- 顶部工具栏 ---------- */
.dr-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--dr-line);
  background: rgba(10, 17, 24, .86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dr-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dr-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6ee7b7, #0ea5e9 60%, #6366f1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 6px 16px rgba(45, 212, 167, .22);
  position: relative;
}
.dr-brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  border-left: 7px solid rgba(7, 13, 18, .82);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.dr-brand-name { font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.dr-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--dr-accent);
  border: 1px solid rgba(45, 212, 167, .28);
  background: rgba(45, 212, 167, .09);
}
.dr-topmeta { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dr-meta { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.dr-meta i { font-style: normal; font-size: 10.5px; letter-spacing: .1em; color: var(--dr-dim); text-transform: uppercase; }
.dr-meta b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #cfe0ec; }
.dr-topactions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

.dr-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--dr-line-2);
  background: rgba(255, 255, 255, .02);
  color: #a9bccb;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.dr-ghost:hover { background: rgba(45, 212, 167, .08); border-color: rgba(45, 212, 167, .42); color: #d7f7eb; }
.dr-ghost.is-on { background: rgba(45, 212, 167, .14); border-color: rgba(45, 212, 167, .5); color: #b9f6e2; }

/* 自动保存文件夹：按钮 + 管理菜单 */
.dr-autosave { position: relative; display: inline-flex; }
#autoSaveBtn { max-width: 196px; }
#autoSaveLabel {
  display: inline-block;
  max-width: 176px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dr-autosave-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: 236px;
  padding: 9px;
  border: 1px solid #263545;
  border-radius: 12px;
  background: #0f1922;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.dr-autosave-dir {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 7px 8px;
  border-bottom: 1px solid #1f2d3b;
  margin-bottom: 6px;
}
.dr-autosave-dir span { font-size: 10.5px; letter-spacing: .08em; color: #7f93a4; }
.dr-autosave-dir b { font-size: 12.5px; font-weight: 700; color: #dce7f0; word-break: break-all; }
.dr-autosave-item {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b9c9d6;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.dr-autosave-item:hover { background: #13212c; color: #dce7f0; }
.dr-autosave-item.danger { color: #f0a3a3; }
.dr-autosave-item.danger:hover { background: rgba(239, 68, 68, .12); color: #fecaca; }
.dr-autosave-msg { margin: 4px 7px 7px; font-size: 11.5px; line-height: 1.6; color: #fbbf24; }
.dr-autosave-note { margin: 7px 7px 2px; font-size: 10.5px; line-height: 1.6; color: #5f7387; }

/* 历史样品入口的数量徽标 */
.dr-sample-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 999px;
  background: rgba(45, 212, 167, .18);
  color: #8ef0cf;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
body.director-mode.is-light .dr-sample-badge { background: rgba(15, 169, 124, .16); color: #0b7a5a; }

.dr-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8fdcc2;
  white-space: nowrap;
}
.dr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dr-accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 167, .12);
  flex-shrink: 0;
}
.dr-ready.is-busy { color: var(--dr-warn); }
.dr-ready.is-busy .dr-dot { background: var(--dr-warn); box-shadow: 0 0 0 4px rgba(251, 191, 36, .14); animation: dr-pulse 1.6s ease-out infinite; }
@keyframes dr-pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, .45); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
/* 账号有效期 / 可用时段提示条（不可提交时显示在导演台顶部） */
.access-banner {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 18px 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, .28);
  background: rgba(251, 191, 36, .08);
  color: #f3c667;
  font-size: 12px;
  line-height: 1.6;
}
.access-banner::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--dr-warn);
}
.dr-generate {
  height: 34px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid #17b98f;
  background: linear-gradient(135deg, #34d399, #0fa97c);
  color: #04140f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(45, 212, 167, .26);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.dr-generate:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(45, 212, 167, .36); filter: brightness(1.04); }
.dr-generate:active { transform: translateY(0) scale(.98); }
.dr-generate:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 忙碌提示 ---------- */
.dr-busy {
  margin: 12px 18px 0;
  background: rgba(251, 191, 36, .07);
  border: 1px solid rgba(251, 191, 36, .24);
  color: #f3c667;
  box-shadow: none;
}
.dr-busy .busy-dot { background: var(--dr-warn); }
.dr-busy .busy-sub { color: #b99457; }
.dr-busy .busy-track { background: rgba(251, 191, 36, .16); }
.dr-busy .busy-track-inner { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

/* ---------- 分镜时间轴 ---------- */
.dr-timeline { flex: none; padding: 15px 18px 10px; border-bottom: 1px solid var(--dr-line); }
.dr-section-head { display: block; margin-bottom: 10px; }
.dr-section-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dr-section-title { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #8ea3b5; text-transform: uppercase; }
.dr-section-hint { font-size: 11.5px; color: var(--dr-dim); }

/* 视频名称：分镜时间轴小字上方的可编辑标题（生成后按此命名成片） */
.dr-name-line { display: flex; align-items: center; gap: 6px; min-height: 30px; margin-bottom: 2px; }
.dr-video-name {
  max-width: min(560px, 78%);
  margin-left: -5px;
  padding: 2px 5px;
  border-radius: 7px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.3;
  color: #eaf4fb;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .16s ease, color .16s ease;
}
.dr-video-name:hover { background: rgba(45, 212, 167, .10); color: #ffffff; }
.dr-video-name:focus-visible { outline: 2px solid var(--dr-accent); outline-offset: 1px; }
.dr-video-name.is-empty { color: #94a9ba; font-weight: 700; }
.dr-name-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid #2a3b4d;
  border-radius: 7px;
  background: rgba(19, 32, 43, .7);
  color: #9fb4c6;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.dr-name-edit:hover {
  color: var(--dr-accent);
  border-color: rgba(45, 212, 167, .55);
  background: rgba(45, 212, 167, .10);
}
.dr-name-input {
  flex: 0 1 360px;
  width: 360px;
  max-width: 80%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--dr-accent);
  border-radius: 8px;
  background: #0b131a;
  color: #eaf4fb;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 167, .12);
}
.dr-name-input::placeholder { color: #64798c; font-weight: 500; }

.dr-track { display: flex; align-items: stretch; gap: 14px; overflow-x: auto; padding: 2px 2px 6px; }
.dr-clip {
  position: relative;
  flex: 0 0 252px;
  height: 158px;
  border: 1px solid var(--dr-line-2);
  border-radius: 13px;
  background: var(--dr-bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dr-clip:hover { transform: translateY(-1px); border-color: #3a5168; }
.dr-clip.is-active {
  border-color: rgba(45, 212, 167, .62);
  box-shadow: 0 0 0 1px rgba(45, 212, 167, .18), 0 10px 26px rgba(0, 0, 0, .28);
}
.dr-clip-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(45, 212, 167, .16), rgba(96, 165, 250, .10)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 19px),
    #091119;
  color: #647c8e;
  font-size: 12px;
  letter-spacing: .04em;
}
.dr-clip-cover img,
.dr-clip-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dr-clip-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 13, 18, .12) 0%, rgba(7, 13, 18, .06) 46%, rgba(7, 13, 18, .78) 100%);
  pointer-events: none;
}
.dr-clip-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}
.dr-clip-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  background: rgba(7, 13, 18, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #e8f3fa;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
}
.dr-clip-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(7, 13, 18, .7);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #a9bccb;
  font-size: 10.5px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.dr-clip-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #647c8e;
}
.dr-clip.is-queued .dr-clip-state { color: #f5d38a; }
.dr-clip.is-queued .dr-clip-state::before { background: #fbbf24; }
.dr-clip.is-running .dr-clip-state { color: #8ef0cf; }
.dr-clip.is-running .dr-clip-state::before { background: #2dd4a7; animation: dr-pulse 1.6s ease-out infinite; }
.dr-clip.is-done .dr-clip-state { color: #8ef0cf; }
.dr-clip.is-done .dr-clip-state::before { background: #2dd4a7; }
.dr-clip.is-failed .dr-clip-state { color: #fca5a5; }
.dr-clip.is-failed .dr-clip-state::before { background: #ef4444; }
.dr-clip.is-cancelled .dr-clip-state { color: #a9bccb; }

.dr-clip-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}
.dr-clip-name { font-size: 12px; font-weight: 700; color: #e8f3fa; }
.dr-clip-dur { font-size: 11px; color: #a9bccb; font-variant-numeric: tabular-nums; }

.dr-clip-add {
  flex: 0 0 168px;
  height: 158px;
  border: 1px dashed #2c4053;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #5f7387;
  background: rgba(255, 255, 255, .012);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
}
.dr-clip-add:hover:not(:disabled) {
  border-color: rgba(45, 212, 167, .5);
  color: #8ef0cf;
  background: rgba(45, 212, 167, .05);
}
.dr-clip-add:disabled { opacity: .42; cursor: not-allowed; }
.dr-clip-add-plus { font-size: 20px; line-height: 1; color: #4c6176; }
.dr-clip-add small { font-size: 10.5px; font-weight: 400; color: #465a6c; }

/* 时间轴刻度尺：一格 = 1 秒，和分镜卡同宽 */
.dr-ruler {
  --dr-sec: 50.4px;
  position: relative;
  width: 100%;
  height: 24px;
  margin: 2px 0 0 2px;
}
.dr-ruler-ticks,
.dr-ruler-ticks::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, .28) 0 1px, transparent 1px var(--dr-sec));
}
.dr-ruler-ticks::before {
  height: 3px;
  background: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, .12) 0 1px, transparent 1px calc(var(--dr-sec) / 2));
}
.dr-ruler-head {
  position: absolute;
  left: 0;
  top: -3px;
  width: 2px;
  height: 11px;
  background: var(--dr-accent);
  box-shadow: 0 0 8px rgba(45, 212, 167, .7);
}
.dr-ruler-head::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  border: 5px solid transparent;
  border-top-color: var(--dr-accent);
}
.dr-ruler-label {
  position: absolute;
  top: 8px;
  font-size: 9.5px;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #4c6176;
}
.dr-ruler-label.is-start { left: 0; }
.dr-ruler-label.is-end { right: 0; }

/* ---------- 时间轴工具条：段间引导 / 运行范围 / 导出 ---------- */
.dr-timeline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 9px;
  padding: 8px 11px;
  border: 1px solid var(--dr-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .015);
}
.dr-tb-group { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.dr-tb-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--dr-dim); text-transform: uppercase; }
.dr-tb-note { font-size: 11px; color: var(--dr-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-tb-field { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dr-muted); white-space: nowrap; }
.dr-tb-num { width: 56px; padding: 4px 6px; font-size: 12px; }
.dr-tb-unit { font-size: 11px; color: var(--dr-dim); }
.dr-tb-select { padding: 4px 8px; font-size: 12px; }
.dr-tb-sep { width: 1px; height: 16px; background: var(--dr-line-2); }
.dr-tb-hint { font-size: 11px; color: var(--dr-dim); white-space: nowrap; }
.dr-tb-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--dr-line-2);
  border-radius: 8px;
  background: var(--dr-bg-1);
  color: #a9bccb;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}
.dr-tb-check input { margin: 0; accent-color: #2dd4a7; cursor: pointer; }
.dr-tb-check.is-on { border-color: rgba(45, 212, 167, .55); background: rgba(45, 212, 167, .09); color: #8ef0cf; }
.dr-tb-check.is-disabled { opacity: .45; cursor: not-allowed; }
.dr-tb-check.is-disabled input { cursor: not-allowed; }
.dr-tb-mini {
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--dr-line-2);
  border-radius: 8px;
  background: var(--dr-bg-1);
  color: var(--dr-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.dr-tb-mini:hover { border-color: #35506a; color: var(--dr-text); }
.director-shell .dr-tb-select:disabled,
.director-shell .dr-tb-num:disabled { opacity: .45; cursor: not-allowed; }

/* 分镜卡运行勾选（开启「选择运行」后出现） */
.dr-clip-run { position: relative; flex: 0 0 17px; width: 17px; height: 17px; z-index: 3; cursor: pointer; }
.dr-clip-run input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dr-clip-run i {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .36);
  background: rgba(7, 13, 18, .72);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.dr-clip-run input:checked + i { background: #2dd4a7; border-color: #2dd4a7; }
.dr-clip-run input:checked + i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #062018;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* 勾选后编号靠左，状态徽标留在右侧 */
.dr-clip-top .dr-clip-no { margin-right: auto; }
.dr-clip.is-run-off { opacity: .5; }
.dr-clip.is-run-off .dr-clip-cover { filter: grayscale(.55); }
.dr-rail-item.is-run-off { opacity: .5; }

/* ---------- 参数条 ---------- */
.dr-params {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 22px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--dr-line);
  background: rgba(255, 255, 255, .012);
}
.dr-field { display: flex; flex-direction: column; gap: 6px; min-width: 104px; }
.dr-field-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--dr-dim); text-transform: uppercase; }
.dr-field-res { min-width: 190px; flex: 1 1 190px; }
.dr-inline { display: flex; align-items: center; gap: 6px; }
.dr-unit { font-size: 11.5px; color: var(--dr-dim); }
.dr-res-value { font-size: 13px; font-weight: 700; color: #cfe0ec; font-variant-numeric: tabular-nums; }

/* 深色表单控件 */
.director-shell .dr-input {
  background: #081017;
  border: 1px solid #263545;
  border-radius: 9px;
  color: var(--dr-text);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.director-shell .dr-input:hover { border-color: #35506a; }
.director-shell .dr-input:focus { border-color: var(--dr-accent); box-shadow: 0 0 0 3px rgba(45, 212, 167, .12); }
.director-shell .dr-input::placeholder { color: #4c6176; }
.director-shell .dr-num { width: 74px; text-align: center; font-variant-numeric: tabular-nums; }
.director-shell .dr-select { min-width: 118px; cursor: pointer; }
.director-shell .dr-seed { width: 120px; }
.director-shell select.dr-input option { background: #0f1922; color: var(--dr-text); }

/* ---------- 工作区 ---------- */
/* 左侧素材区 40%，右侧分镜小卡片 + 提示词 60% */
.dr-stage {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  align-items: stretch;
  /* 素材区越高整个工作区越高；同时保证空素材时提示词区仍有足够高度 */
  min-height: 600px;
}
.dr-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 三栏等高：高度跟随 .dr-stage 的行高，编辑器在内部滚动 */
  align-self: stretch;
  height: auto;
}

/* ---------- 栏目分隔条：拖动调整三栏宽度 ---------- */
.dr-splitter {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-width: var(--dr-split-w, 10px);
  cursor: col-resize;
  touch-action: none;
  outline: none;
  background: transparent;
}
.dr-splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--dr-line);
  transform: translateX(-50%);
  transition: background .16s ease, box-shadow .16s ease;
}
.dr-splitter::after {
  /* 中间的小握把，提示这条线可以拖 */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 40px;
  border-radius: 999px;
  background: #31465a;
  box-shadow: 0 0 0 3px var(--dr-bg-0, #070d12);
  transform: translate(-50%, -50%);
  transition: background .16s ease, height .16s ease;
}
.dr-splitter:hover::before,
.dr-splitter:focus-visible::before,
.dr-splitter.is-dragging::before {
  background: var(--dr-accent);
  box-shadow: 0 0 12px rgba(45, 212, 167, .45);
}
.dr-splitter:hover::after,
.dr-splitter:focus-visible::after,
.dr-splitter.is-dragging::after {
  height: 58px;
  background: var(--dr-accent);
}
body.is-dr-resizing { user-select: none; }
body.is-dr-resizing * { cursor: col-resize !important; user-select: none !important; }
body.director-mode.is-light .dr-splitter::after { background: #c3d4dc; }
body.director-mode.is-light .dr-splitter:hover::after,
body.director-mode.is-light .dr-splitter:focus-visible::after,
body.director-mode.is-light .dr-splitter.is-dragging::after { background: #0b7a5a; }
.dr-rail {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, .14);
  border-bottom: 1px solid var(--dr-line);
  overflow: hidden;
}
.dr-rail-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-bottom: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #8ea3b5;
  text-transform: uppercase;
  white-space: nowrap;
}
.dr-rail-head b { color: var(--dr-accent); font-size: 12px; letter-spacing: 0; }
.dr-rail-item {
  flex: 0 0 auto;
  width: 156px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
}
.dr-rail-item.is-active {
  border-color: rgba(45, 212, 167, .32);
  background: linear-gradient(90deg, rgba(45, 212, 167, .12), rgba(45, 212, 167, .03));
  box-shadow: inset 2px 0 0 var(--dr-accent);
}
.dr-rail-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #0a1219;
  border: 1px solid #263545;
  font-size: 10.5px;
  font-weight: 800;
  color: #a9bccb;
  flex-shrink: 0;
}
.dr-rail-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-rail-main b { font-size: 12px; font-weight: 700; color: #dce7f0; }
.dr-rail-main span { font-size: 10.5px; color: var(--dr-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-rail-grip { margin-left: auto; color: #3c5062; font-size: 11px; letter-spacing: -2px; }
.dr-rail-empty {
  margin-top: 2px;
  border: 1px dashed #223343;
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
  color: #465a6c;
  font-size: 10.5px;
  line-height: 1.6;
}
.dr-rail-empty span { display: block; font-size: 16px; color: #3c5062; margin-bottom: 2px; }
.dr-rail-empty p { margin: 0; }
.dr-rail-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.dr-rail-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1px dashed #2c4053;
  border-radius: 10px;
  background: transparent;
  color: #7d93a5;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.dr-rail-add:hover {
  border-color: rgba(45, 212, 167, .5);
  color: #8ef0cf;
  background: rgba(45, 212, 167, .06);
}
.dr-rail-del {
  margin-left: auto;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #445a6c;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.dr-rail-del:hover { background: rgba(248, 113, 113, .14); color: #fca5a5; }
.dr-rail-foot { display: none; }

/* ---------- 分镜编辑器 ---------- */
.dr-editor {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 18px 16px;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
}
.dr-editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--dr-line);
}
.dr-editor-kicker { font-size: 9.5px; font-weight: 800; letter-spacing: .2em; color: var(--dr-accent); }
.dr-editor-title-wrap h3 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dr-editor-title-wrap h3 span { font-size: 11.5px; font-weight: 400; color: var(--dr-dim); }
.dr-hint { font-size: 10.5px; color: #4f6477; }

.dr-editor-body {
  display: flex;
  flex-direction: column;
  padding-top: 14px;
  /* 不参与收缩：提示词区顶到下方工具 / 快速插入时，让 .dr-editor 整体滚动，
     而不是把内容挤出容器盖到 .dr-editor-foot 上（历史样品展开后尤其明显）。 */
  flex: 1 0 auto;
  min-height: auto;
}
.dr-prompt-panel {
  min-width: 0;
  min-height: auto;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* 参考素材栏：公共素材在上、分镜素材在下，两栏竖排 */
.dr-media-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px;
  /* 素材栏不再内部滚动，卡片行数直接撑高工作区 */
  overflow: visible;
  min-height: 0;
}
.dr-media-group {
  flex: none;
  min-width: 0;
  padding: 10px 11px 11px;
  border: 1px solid #223041;
  border-radius: 12px;
  background: #0b141c;
}
.dr-media-group.is-global {
  border-color: rgba(96, 165, 250, .28);
  background: linear-gradient(180deg, rgba(96, 165, 250, .06), transparent 96px), #0b141c;
}
.dr-media-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; }
.dr-media-title { font-size: 12px; font-weight: 800; color: #dce7f0; }
.dr-media-group.is-global .dr-media-title { color: #bfdbfe; }
.dr-media-note { min-width: 0; font-size: 10.5px; color: var(--dr-dim); }
/* 公共素材 / 公共提示词：默认折叠，可展开或整体禁用 */
.dr-media-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dr-switch { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.dr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.dr-switch-track {
  position: relative; width: 26px; height: 14px; border-radius: 999px;
  background: #24333f; border: 1px solid #31465a;
  transition: background .15s, border-color .15s;
}
.dr-switch-track::after {
  content: ""; position: absolute; top: 1px; left: 1px; width: 10px; height: 10px;
  border-radius: 50%; background: #8aa0b2; transition: transform .15s, background .15s;
}
.dr-switch input:checked + .dr-switch-track {
  background: rgba(16, 185, 129, .25); border-color: rgba(16, 185, 129, .65);
}
.dr-switch input:checked + .dr-switch-track::after { transform: translateX(12px); background: #34d399; }
.dr-switch input:focus-visible + .dr-switch-track { outline: 2px solid var(--dr-accent); outline-offset: 2px; }
.dr-switch-text { font-size: 10.5px; color: var(--dr-dim); }
.dr-switch input:checked ~ .dr-switch-text { color: #6ee7b7; }
.dr-media-group.is-off .dr-switch-text { color: #f0b45c; }
.dr-media-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid #2b3f52;
  background: #101c26; color: #b7c9d6; font-family: inherit;
  font-size: 10.5px; font-weight: 700; cursor: pointer;
}
.dr-media-toggle:hover { border-color: #3d5871; background: #15232f; color: #e6f0f7; }
.dr-media-toggle:disabled { opacity: .5; cursor: not-allowed; }
.dr-media-chevron { display: inline-block; line-height: 1; transition: transform .15s; }
.dr-media-group:not(.is-collapsed) .dr-media-chevron { transform: rotate(180deg); }
.dr-media-group.is-collapsed .dr-media-head { margin-bottom: 0; }
.dr-media-group.is-collapsed .dr-global-body { display: none; }
.dr-media-group.is-off { border-color: rgba(240, 180, 92, .32); }
.dr-media-group.is-off .dr-media-title { color: #f0b45c; }
.dr-media-group.is-off .dr-media-note { color: #b98f4d; }
/* 图片 / 音频 / 视频 各占一整行，从上往下排列 */
.dr-media-grid { display: flex; flex-direction: column; gap: 8px; }
/* 三栏等高（>1180 三列布局）：参考素材按内容自适应高度，图片区吃掉剩余空间 */
@media (min-width: 1181px) {
  .director-shell .dr-media-bar { height: 100%; overflow: hidden; }
  .director-shell .dr-media-bar .dr-media-group.is-seg {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .director-shell .dr-media-bar .dr-media-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .director-shell .dr-media-bar .dr-up-block {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  /* 图片区：唯一的伸缩区，有图时图片更大 */
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"] {
    flex: 1 1 auto;
    min-height: 150px;
  }
  /* 音频区：只占内容高度（约 10%），多个音频一行铺满宽度 */
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] { flex: 0 0 auto; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-drop { padding: 5px 6px; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"][data-count="2"] .up-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"][data-count="3"] .up-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-item-audios {
    width: auto;
    min-width: 0;
    padding: 4px;
  }
  /* 音频卡保持一行高：隐去拖拽把手与文件名，播放器下方只留“移除” */
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-grip,
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-item-name { display: none; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-item-foot { justify-content: flex-end; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"].has-assets .up-hint { display: none; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="audios"] .up-audio { width: 100%; }
  /* 视频区：没有视频时只留一行提示，有视频时按内容高度 */
  .director-shell .dr-media-bar .dr-up-block[data-kind="videos"] { flex: 0 1 auto; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="videos"]:not(.has-assets) .up-head { display: none; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="videos"]:not(.has-assets) .up-drop {
    min-height: 34px;
    padding: 6px 8px;
    justify-content: center;
  }
  .director-shell .dr-media-bar .up-drop {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
  }
  .director-shell .dr-media-bar .dr-up-block.has-assets .up-drop { justify-content: flex-start; }
  .director-shell .dr-media-bar .up-list { min-height: 0; overflow-y: auto; }
}
.director-shell .dr-media-bar .dr-up-block { padding: 8px; }
.director-shell .dr-media-bar .up-head { margin-bottom: 6px; }
.director-shell .dr-media-bar .up-drop { padding: 7px; min-height: 44px; }
.director-shell .dr-media-bar .up-hint { font-size: 10px; line-height: 1.35; }
/* 素材卡横向铺开：一行放不下自动换行，不再拉成两列竖排 */
.director-shell .dr-media-bar .up-list {
  flex-wrap: wrap;
  overflow: visible;
  gap: 8px;
  padding: 2px 0 0;
}
.director-shell .dr-media-bar .up-list:not(:empty) { margin-top: 6px; }
.director-shell .dr-media-bar .up-item {
  flex: 0 0 auto;
  width: 96px;
  padding: 5px;
  gap: 4px;
}
.director-shell .dr-media-bar .up-item-videos { width: 136px; }
.director-shell .dr-media-bar .up-item-audios { width: 204px; }
.director-shell .dr-media-bar .up-thumb { height: 62px; }
.director-shell .dr-media-bar .up-item-videos .up-thumb { height: 76px; }
.director-shell .dr-media-bar .up-thumb-audio { height: auto; }
.director-shell .dr-media-bar .up-audio { height: 26px; }
.director-shell .dr-media-bar .up-item-foot .btn { padding: 0 5px; font-size: 9.5px; }
.director-shell .dr-media-bar .up-item-name { font-size: 9.5px; }

/* 图片：有图时按可用宽度等分铺满，缩略图随数量放大 */
@media (min-width: 1181px) {
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"].has-assets .up-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    align-content: start;
  }
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"].has-assets .up-item-images {
    width: auto;
    min-width: 0;
  }
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"].has-assets .up-thumb { height: 108px; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"][data-count="1"] .up-thumb { height: 156px; }
  .director-shell .dr-media-bar .dr-up-block[data-kind="images"][data-count="2"] .up-thumb { height: 126px; }
}

/* 公共提示词：随内容增高，超过 180px 后内部滚动 */
.dr-global-prompt-wrap { margin-bottom: 10px; }
.dr-global-prompt-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.dr-global-prompt-title { font-size: 11.5px; font-weight: 800; color: #bfdbfe; }
.dr-global-prompt-note { font-size: 10px; color: var(--dr-dim); }
.director-shell .dr-global-prompt {
  width: 100%;
  min-height: 66px;
  max-height: 220px;
  padding: 9px 10px;
  overflow-y: auto;
  background: #081017;
  border: 1px solid #263545;
  border-radius: 10px;
  color: #dce7f0;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  caret-color: var(--dr-accent);
  cursor: text;
}
.director-shell .dr-global-prompt.is-empty::before,
.director-shell .dr-global-prompt:empty::before {
  content: attr(data-placeholder);
  color: #4f6477;
  white-space: pre-wrap;
  pointer-events: none;
}
.director-shell .dr-global-prompt:hover { border-color: #35506a; }
.director-shell .dr-global-prompt:focus {
  outline: none;
  border-color: rgba(96, 165, 250, .7);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .10);
}
.dr-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.dr-panel-head-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.dr-panel-title { font-size: 12.5px; font-weight: 800; color: #dce7f0; cursor: pointer; }
.dr-panel-hint { font-size: 10.5px; color: var(--dr-dim); line-height: 1.5; }

/* 一键插入对白标记 <d></d>（选中文字直接包裹） */
.dr-dlg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border: 1px solid rgba(251, 191, 36, .42);
  border-radius: 8px;
  background: rgba(251, 191, 36, .10);
  color: #fbbf24;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.dr-dlg-btn:hover {
  background: rgba(251, 191, 36, .2);
  border-color: rgba(251, 191, 36, .7);
  transform: translateY(-1px);
}
.dr-dlg-btn:active { transform: none; }
.dr-dlg-btn code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; opacity: .9; }
.dr-dlg-plus { font-size: 13px; line-height: 1; }

/* 提示词编辑器 */
.director-shell .dr-prompt {
  flex: 1 1 0;
  min-height: 200px;
  max-height: none;
  background:
    linear-gradient(180deg, rgba(45, 212, 167, .025), transparent 120px),
    #081017;
  border: 1px solid #263545;
  border-radius: 13px;
  padding: 14px 15px;
  color: #dce7f0;
  font-size: 13.5px;
  line-height: 1.8;
  caret-color: var(--dr-accent);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-y: auto;
  cursor: text;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.director-shell .dr-prompt:hover { border-color: #35506a; }
.director-shell .dr-prompt:focus { outline: none; border-color: rgba(45, 212, 167, .72); box-shadow: 0 0 0 3px rgba(45, 212, 167, .10); }
.director-shell .dr-prompt.is-empty::before,
.director-shell .dr-prompt:empty::before { color: #52687b; }
.director-shell .ref-chip {
  border-color: rgba(45, 212, 167, .42);
  background: rgba(45, 212, 167, .13);
  color: #9df3d5;
}
.director-shell .ref-chip-stale {
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
}

/* 快捷插入标签 */
.director-shell .ref-tags { margin-top: 9px; flex: 0 0 auto; }
.director-shell .ref-tags-label { color: var(--dr-dim); }
.director-shell .ref-tag {
  background: #0d1720;
  border-color: currentColor;
  color: #8fa3b5;
}
.director-shell .ref-tag.up-ref-pic { color: #7dd3fc; border-color: rgba(125, 211, 252, .34); }
.director-shell .ref-tag.up-ref-vid { color: #c4b5fd; border-color: rgba(196, 181, 253, .34); }
.director-shell .ref-tag.up-ref-aud { color: #6ee7b7; border-color: rgba(110, 231, 183, .34); }
.director-shell .ref-tag.ref-tag-dlg { color: #fbbf24; border-color: rgba(251, 191, 36, .34); }
.director-shell .ref-tag:hover { background: #13212c; }

/* 素材区深色化 */
.director-shell .dr-up-block {
  padding: 10px 11px;
  border-radius: 12px;
  border-color: #223041;
  background: #0d1720;
}
.director-shell .dr-up-block .up-head { margin-bottom: 7px; gap: 7px; }
.director-shell .dr-up-block .up-title { font-size: 12px; color: #cfe0ec; }
.director-shell .dr-up-block .muted { font-size: 10.5px; color: var(--dr-dim); }
.director-shell .up-drop {
  border: 1px dashed #2b3c4f;
  border-radius: 10px;
  padding: 9px;
  background: #081017;
  text-align: left;
}
.director-shell .up-drop:hover { border-color: rgba(45, 212, 167, .55); background: #0b1620; }
.director-shell .up-drop.drag { border-color: var(--dr-accent); background: rgba(45, 212, 167, .06); }
.director-shell .up-drop.busy { opacity: .7; }
.director-shell .up-drop.is-full { border-color: rgba(251, 191, 36, .38); }
.director-shell .up-drop.is-full .up-hint { color: #d0a24a; }
.director-shell .up-hint { font-size: 10.5px; color: #52687b; }
.director-shell .up-list { gap: 8px; }
.director-shell .up-list:not(:empty) { margin-top: 8px; }
.director-shell .up-item {
  width: calc(50% - 4px);
  padding: 6px;
  gap: 5px;
  background: #0f1a24;
  border-color: #263545;
  border-radius: 9px;
}
.director-shell .up-item-audios { width: 100%; }
.director-shell .up-ref { font-size: 10.5px; }
.director-shell .up-ref-pic { color: #7dd3fc; }
.director-shell .up-ref-vid { color: #c4b5fd; }
.director-shell .up-ref-aud { color: #6ee7b7; }
.director-shell .up-thumb { height: 68px; border-radius: 6px; background: #081017; }
.director-shell .up-thumb-audio { background: transparent; }
.director-shell .up-audio { height: 30px; }
.director-shell .up-item-name { font-size: 10px; color: #7f93a4; }
.director-shell .up-item-foot .btn {
  padding: 1px 6px;
  font-size: 10.5px;
  border-radius: 6px;
  background: #0b131a;
  border-color: #2a3b4d;
  color: #8fa3b5;
}
.director-shell .up-item-foot .btn:hover { background: #16232e; color: #dce7f0; }

/* 底部信息 */
.dr-editor-foot {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--dr-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--dr-dim);
}
.dr-foot-note { display: inline-flex; align-items: center; gap: 7px; }
.dr-foot-note .dr-dot { width: 5px; height: 5px; box-shadow: none; }
.dr-remain { color: #8fa3b5; font-variant-numeric: tabular-nums; }
.dr-remain.is-warn { color: #f3c667; }

/* 错误 / 提示 */
.director-shell .msg { font-size: 12px; }
.director-shell .msg.error { color: #fca5a5; }
.director-shell .msg.ok { color: #6ee7b7; }
.director-shell .msg.warn { color: #fbbf24; }
.dr-submit-msg { flex: none; margin: 0; padding: 0 18px 14px; }

/* @ 素材面板跟随导演台深色 */
.at-panel {
  background: #0f1922;
  border-color: #2a3b4d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  color: #dce7f0;
}
.at-group + .at-group { border-top-color: #223041; }
.at-group-head { color: #7f93a4; }
.at-upload { color: #6ee7b7; }
.at-upload:hover { background: rgba(45, 212, 167, .1); }
.at-empty { background: #0b131a; color: #5f7387; }
.at-item:hover, .at-item:focus-visible { background: #15222d; }
.at-item-thumb { background: #0b131a; color: #5f7387; }
.at-item-name { color: #dce7f0; }
.at-item-ref { border-color: rgba(45, 212, 167, .38); background: rgba(45, 212, 167, .12); color: #8ef0cf; }

/* 窄容器：面板头提示换行，避免被挤出边界 */
@container (max-width: 520px) {
  .dr-prompt-panel .dr-panel-hint { flex-basis: 100%; }
  /* 历史样品展开后编辑栏变窄，隐藏优化按钮旁的长说明，减少一行高度 */
  .dr-prompt-panel .dr-opt-note { display: none; }
}

/* 窗口不高时进一步压缩提示词框，把高度留给工具行与底部信息 */
@media (max-height: 820px) {
  .director-shell .dr-prompt { min-height: 170px; }
}

/* ---------- 响应式 ---------- */
main.has-library .dr-field-cont { display: none; }

/* 资产库与导演台同高，避免大屏下一高一低 */
@media (min-width: 1081px) {
  body.director-mode .library-panel { height: 90vh; min-height: 600px; margin-top: 16px; }
}

@media (max-width: 1180px) {
  .dr-stage { display: block; flex: none; min-height: 0; }
  .dr-splitter { display: none; }
  .dr-media-bar {
    border-right: none;
    border-bottom: 1px solid var(--dr-line);
    overflow: visible;
  }
  .dr-side { position: static; height: auto; overflow: visible; }
}

@media (max-width: 900px) {
  /* 小屏不再锁高度，回归整页滚动 */
  main.director-mode { width: 100%; padding: 8px 12px 48px; }
  .topbar.director-mode { width: 100%; }
  .director-shell { height: auto; min-height: 0; }
  .dr-stage { flex: none; min-height: 0; }
  .director-shell .dr-global-prompt { max-height: none; }
  .dr-editor { overflow-y: visible; }
  .dr-rail { overflow-y: visible; }
  .dr-topbar { position: relative; flex-wrap: wrap; gap: 10px 14px; }
  .dr-topmeta { order: 3; width: 100%; gap: 14px; }
  .dr-topactions { margin-left: auto; }
  .dr-media-bar { padding-left: 13px; padding-right: 13px; }
  .director-shell .dr-prompt { min-height: 220px; max-height: none; }
}

@media (max-width: 680px) {
  .director-shell { border-radius: 16px; }
  .topbar.director-mode { flex-wrap: wrap; align-items: flex-start; }
  .topbar.director-mode .top-right { width: 100%; justify-content: space-between; }
  .dr-topbar { padding: 11px 13px; }
  .dr-topactions { width: 100%; justify-content: flex-start; }
  .dr-generate { margin-left: auto; }
  .dr-timeline, .dr-params { padding-left: 13px; padding-right: 13px; }
  .dr-media-bar { padding-left: 13px; padding-right: 13px; }
  .dr-editor { padding: 13px; }
  .dr-clip { flex-basis: 220px; height: 146px; }
  .dr-clip-add { flex-basis: 136px; height: 146px; }
  .dr-ruler { width: 100%; }
  .dr-params { gap: 10px 16px; }
  .dr-field { flex: 1 1 calc(50% - 16px); min-width: 0; }
  .dr-field-res { flex-basis: 100%; }
  .dr-editor-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dr-topmeta { overflow-x: auto; padding-bottom: 2px; }
  .dr-ready { display: none; }
}

/* =========================================================
   亮色皮肤：仅当 body 同时带 .director-mode.is-light 生效
   深色主题不受影响
   ========================================================= */
body.director-mode.is-light {
  --bg: #eef2f4;
  --bg-card: #ffffff;
  --bg-soft: #f6f9fa;
  --border: #dbe3e8;
  --border-strong: #c9d5dc;
  --text: #1e2a33;
  --muted: #55666f;
  --shadow-sm: 0 8px 22px rgba(24, 45, 60, .08);
  --shadow-md: 0 16px 38px rgba(24, 45, 60, .12);
}

/* ---- 导演台外壳 ---- */
body.director-mode.is-light .director-shell {
  --dr-line: #e1e8ec;
  --dr-line-2: #cfdae1;
  --dr-text: #1e2a33;
  --dr-muted: #55666f;
  --dr-dim: #64757f;
  --dr-accent: #0a8560;
  --dr-accent-2: #087a57;
  --dr-warn: #b45309;
  border-color: #dfe7eb;
  box-shadow: 0 20px 48px rgba(24, 45, 60, .12), inset 0 1px 0 #fff;
}
body.director-mode.is-light .director-shell * { scrollbar-color: #c9d5dc transparent; }
body.director-mode.is-light .director-shell *::-webkit-scrollbar-thumb { background: #c9d5dc; }

/* ---- 顶栏与背景切换 ---- */
body.director-mode.is-light .brand { color: #1e2a33; }
body.director-mode.is-light .brand .sub { color: #8b9aa5; }
body.director-mode.is-light .theme-btn {
  background: #fff;
  border-color: #cfdae1;
  color: #33434f;
  box-shadow: 0 1px 2px rgba(24, 45, 60, .05);
}
body.director-mode.is-light .theme-btn:hover { background: #f4f8fa; border-color: #a9bdc9; }
body.director-mode.is-light .theme-btn[aria-expanded="true"] {
  background: #e9f9f1;
  border-color: #8fd9bd;
  color: #0b7a5a;
}
body.director-mode.is-light .theme-swatch {
  box-shadow: inset 0 0 0 1px rgba(20, 45, 65, .18), 0 0 8px rgba(24, 45, 60, .10);
}
body.director-mode.is-light .theme-menu {
  background: #fff;
  border-color: #dbe4e9;
  box-shadow: 0 18px 44px rgba(24, 45, 60, .18);
}
body.director-mode.is-light .theme-item { color: #33434f; }
body.director-mode.is-light .theme-item:hover { background: #f2f7f9; }
body.director-mode.is-light .theme-item.is-active { background: #e9f9f1; color: #0b7a5a; }
body.director-mode.is-light .theme-item-check { color: #0b7a5a; }

/* ---- chip / 按钮 / 表单 ---- */
body.director-mode.is-light .chip {
  background: #eaf8f2;
  border-color: #b7e6d4;
  color: #0b7a5a;
}
body.director-mode.is-light .chip.wait {
  background: #fdf4e3;
  border-color: #f0d5a4;
  color: #a16207;
}
body.director-mode.is-light .chip.ok {
  background: #eaf8f2;
  border-color: #b7e6d4;
  color: #0b7a5a;
}
body.director-mode.is-light .chip.err {
  background: #fdecec;
  border-color: #f3c2c2;
  color: #c0392b;
}
body.director-mode.is-light .btn {
  background: #fff;
  border-color: #cfdae1;
  color: #33434f;
  box-shadow: 0 1px 2px rgba(24, 45, 60, .05);
}
body.director-mode.is-light .btn:hover {
  background: #f4f8fa;
  border-color: #a9bdc9;
  box-shadow: 0 4px 12px rgba(24, 45, 60, .08);
}
body.director-mode.is-light .btn.primary {
  background: linear-gradient(135deg, #34d399, #0fa97c);
  border-color: #17b98f;
  color: #04140f;
}
body.director-mode.is-light .btn.danger {
  background: #fdecec;
  border-color: #f3c2c2;
  color: #c0392b;
}
body.director-mode.is-light .card h2 { color: #1e2a33; }
body.director-mode.is-light .input,
body.director-mode.is-light .textarea {
  background: #fff;
  border-color: #cfdae1;
  color: #1e2a33;
}
body.director-mode.is-light .input::placeholder,
body.director-mode.is-light .textarea::placeholder { color: #8b9aa5; }
body.director-mode.is-light .progress { background: #e6edf1; }
body.director-mode.is-light .history-item { background: #fff; border-color: #e1e8ec; }
body.director-mode.is-light .history-item:hover { background: #f7fafb; border-color: #c9d5dc; }
body.director-mode.is-light .history-item .h-prompt { color: #33434f; }
body.director-mode.is-light .h-tag { background: #f1f5f7; border-color: #dfe7eb; color: #5b6f7d; }
body.director-mode.is-light .h-tag.h-on,
body.director-mode.is-light .h-tag.h-used { background: #e7f8f1; border-color: #a9e3cd; color: #0b7a5a; }
body.director-mode.is-light .msg.warn { color: #b45309; }
body.director-mode.is-light .msg.error { color: #c0392b; }
body.director-mode.is-light .msg.ok { color: #0b7a5a; }

/* ---- 导演台顶栏 ---- */
body.director-mode.is-light .dr-topbar {
  background: rgba(255, 255, 255, .88);
  border-bottom-color: #e1e8ec;
}
body.director-mode.is-light .dr-meta b { color: #1e2a33; }
body.director-mode.is-light .dr-ghost {
  background: rgba(255, 255, 255, .72);
  color: #4a5c68;
}
body.director-mode.is-light .dr-ghost:hover {
  background: rgba(15, 169, 124, .10);
  color: #0b7a5a;
}
body.director-mode.is-light .dr-ghost.is-on {
  background: rgba(15, 169, 124, .14);
  color: #0b7a5a;
}
body.director-mode.is-light .dr-autosave-menu {
  background: #fff;
  border-color: #dbe3e8;
  box-shadow: 0 18px 40px rgba(24, 45, 60, .18);
}
body.director-mode.is-light .dr-autosave-dir { border-bottom-color: #e7eef2; }
body.director-mode.is-light .dr-autosave-dir span { color: #7b919b; }
body.director-mode.is-light .dr-autosave-dir b { color: #1e2a33; }
body.director-mode.is-light .dr-autosave-item { color: #4a5c68; }
body.director-mode.is-light .dr-autosave-item:hover { background: #f2f8f5; color: #1e2a33; }
body.director-mode.is-light .dr-autosave-item.danger { color: #b42318; }
body.director-mode.is-light .dr-autosave-item.danger:hover { background: #fef3f2; color: #912018; }
body.director-mode.is-light .dr-autosave-msg { color: #b45309; }
body.director-mode.is-light .dr-autosave-note { color: #8a9ba5; }
body.director-mode.is-light .dr-ready { color: #0b7a5a; }
body.director-mode.is-light .access-banner {
  border-color: #f3d9a4;
  background: #fff8e6;
  color: #a16207;
}
body.director-mode.is-light .dr-busy {
  background: #fff8e6;
  border-color: #f3d9a4;
  color: #a16207;
}
body.director-mode.is-light .dr-busy .busy-sub { color: #b07d2a; }
body.director-mode.is-light .dr-busy .busy-track { background: #f7e7c4; }

/* ---- 时间轴 / 分镜卡 ---- */
body.director-mode.is-light .dr-section-title { color: #55697a; }
body.director-mode.is-light .dr-video-name { color: #1e2a33; }
body.director-mode.is-light .dr-video-name:hover { background: rgba(15, 169, 124, .10); color: #0b1a22; }
body.director-mode.is-light .dr-video-name.is-empty { color: #7a8b96; }
body.director-mode.is-light .dr-name-edit { background: #fff; border-color: #cfdae1; color: #55697a; }
body.director-mode.is-light .dr-name-edit:hover {
  color: #0f9f74;
  border-color: rgba(15, 169, 124, .55);
  background: rgba(15, 169, 124, .08);
}
body.director-mode.is-light .dr-name-input { background: #fff; color: #1e2a33; }
body.director-mode.is-light .dr-clip { border-color: #cfdae1; }
body.director-mode.is-light .dr-clip:hover { border-color: #a9bccb; }
body.director-mode.is-light .dr-clip.is-active {
  border-color: rgba(15, 169, 124, .55);
  box-shadow: 0 0 0 1px rgba(15, 169, 124, .14), 0 10px 24px rgba(24, 45, 60, .12);
}
body.director-mode.is-light .dr-clip-cover {
  background:
    linear-gradient(135deg, rgba(45, 212, 167, .10), rgba(96, 165, 250, .08)),
    repeating-linear-gradient(0deg, rgba(15, 40, 60, .05) 0 1px, transparent 1px 19px),
    #f4f8fa;
  color: #64757f;
}
body.director-mode.is-light .dr-clip-cover::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .02) 46%, rgba(255, 255, 255, .9) 100%);
}
body.director-mode.is-light .dr-clip-no {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(20, 45, 65, .10);
  color: #1e2a33;
}
body.director-mode.is-light .dr-clip-state {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(20, 45, 65, .08);
  color: #4a5c68;
}
body.director-mode.is-light .dr-clip-name { color: #1e2a33; }
body.director-mode.is-light .dr-clip-dur { color: #64757f; }
body.director-mode.is-light .dr-clip-add {
  border-color: #c3d1d9;
  color: #64757f;
  background: rgba(0, 0, 0, .012);
}
body.director-mode.is-light .dr-clip-add-plus { color: #93a3ad; }
body.director-mode.is-light .dr-clip-add small { color: #6b7c86; }
body.director-mode.is-light .dr-ruler-ticks,
body.director-mode.is-light .dr-ruler-ticks::before {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .24) 0 1px, transparent 1px var(--dr-sec));
}
body.director-mode.is-light .dr-ruler-ticks::before {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px calc(var(--dr-sec) / 2));
}
body.director-mode.is-light .dr-ruler-label { color: #6b7c86; }
body.director-mode.is-light .dr-timeline-bar { background: rgba(0, 0, 0, .018); }
body.director-mode.is-light .dr-tb-check { background: #fff; border-color: #cfdae1; color: #4a5c68; }
body.director-mode.is-light .dr-tb-check.is-on { border-color: rgba(15, 169, 124, .5); background: rgba(15, 169, 124, .10); color: #0b7a5a; }
body.director-mode.is-light .dr-tb-check input { accent-color: #0fa97c; }
body.director-mode.is-light .dr-tb-mini { background: #fff; border-color: #cfdae1; color: #4a5c68; }
body.director-mode.is-light .dr-tb-mini:hover { border-color: #a9bdc9; color: #1e2a33; }
body.director-mode.is-light .dr-clip-run i { background: rgba(255, 255, 255, .88); border-color: rgba(20, 45, 65, .32); }
body.director-mode.is-light .dr-clip-run input:checked + i { background: #0fa97c; border-color: #0fa97c; }
body.director-mode.is-light .dr-clip-run input:checked + i::after { border-color: #fff; }

/* ---- 参数条 ---- */
body.director-mode.is-light .dr-params { background: rgba(0, 0, 0, .018); }
body.director-mode.is-light .dr-res-value { color: #1e2a33; }
body.director-mode.is-light .dr-toggle { background: #e7eef2; border-color: #cfdae1; }
body.director-mode.is-light .dr-toggle i { background: #8b9aa5; }
body.director-mode.is-light .dr-toggle.is-on { background: rgba(15, 169, 124, .18); border-color: rgba(15, 169, 124, .5); }
body.director-mode.is-light .dr-toggle.is-on i { background: #0fa97c; }
body.director-mode.is-light .dr-field-note.is-on { color: #0b7a5a; }
body.director-mode.is-light .dr-dlg-btn { background: #fff6df; border-color: #eccb8a; color: #a16207; }
body.director-mode.is-light .dr-dlg-btn:hover { background: #fdecc9; border-color: #d9ac5e; }
body.director-mode.is-light .dr-rail-add { border-color: #c3d1d9; color: #64757f; }
body.director-mode.is-light .dr-rail-add:hover { border-color: rgba(15, 169, 124, .5); color: #0f8f6a; background: rgba(15, 169, 124, .06); }
body.director-mode.is-light .dr-rail-del { color: #93a3ad; }
body.director-mode.is-light .dr-rail-del:hover { background: #fde8e8; color: #dc2626; }
body.director-mode.is-light .director-shell .dr-input {
  background: #fff;
  border-color: #cfdae1;
}
body.director-mode.is-light .director-shell .dr-seg {
  background: #fff;
  border-color: #cfdae1;
}
body.director-mode.is-light .director-shell .dr-seg-btn { color: #5b6f7d; }
body.director-mode.is-light .director-shell .dr-seg-btn:hover { background: rgba(24, 45, 60, .06); color: #1e2a33; }
body.director-mode.is-light .director-shell .dr-seg-btn.is-on {
  background: var(--dr-accent);
  color: #fff;
  box-shadow: none;
}
body.director-mode.is-light .director-shell .dr-input:hover { border-color: #a9bdc9; }
body.director-mode.is-light .director-shell .dr-input::placeholder { color: #7d8d97; }
body.director-mode.is-light .director-shell select.dr-input option { background: #fff; color: #1e2a33; }

/* ---- 分镜栏 / 编辑器 ---- */
body.director-mode.is-light .dr-rail { background: rgba(0, 0, 0, .025); }
body.director-mode.is-light .dr-rail-head { color: #55697a; }
body.director-mode.is-light .dr-rail-item { background: #fff; border-color: #e1e8ec; }
body.director-mode.is-light .dr-rail-item.is-active {
  border-color: rgba(15, 169, 124, .32);
  background: linear-gradient(90deg, rgba(15, 169, 124, .12), rgba(15, 169, 124, .02));
}
body.director-mode.is-light .dr-rail-no {
  background: #f2f6f8;
  border-color: #dbe4e9;
  color: #5b6d79;
}
body.director-mode.is-light .dr-rail-main b { color: #1e2a33; }
body.director-mode.is-light .dr-rail-grip { color: #a3b3bd; }
body.director-mode.is-light .dr-rail-empty { border-color: #dbe4e9; color: #6b7c86; }
body.director-mode.is-light .dr-rail-empty span { color: #93a3ad; }
body.director-mode.is-light .dr-rail-foot { color: #7d8d97; }
body.director-mode.is-light .dr-panel-title { color: #1e2a33; }
body.director-mode.is-light .dr-hint { color: #64757f; }
body.director-mode.is-light .director-shell .dr-prompt {
  background:
    linear-gradient(180deg, rgba(45, 212, 167, .03), transparent 120px),
    #fff;
  border-color: #cfdae1;
  color: #1e2a33;
}
body.director-mode.is-light .director-shell .dr-prompt:hover { border-color: #a9bdc9; }
body.director-mode.is-light .director-shell .dr-prompt:focus {
  border-color: rgba(15, 169, 124, .7);
  box-shadow: 0 0 0 3px rgba(15, 169, 124, .12);
}
body.director-mode.is-light .director-shell .dr-prompt.is-empty::before,
body.director-mode.is-light .director-shell .dr-prompt:empty::before { color: #7d8d97; }
body.director-mode.is-light .director-shell .ref-chip {
  border-color: #a9e3cd;
  background: #e7f8f1;
  color: #0b7a5a;
}
body.director-mode.is-light .director-shell .ref-chip-stale {
  border-color: #f3c2c2;
  background: #fdecec;
  color: #c0392b;
}
body.director-mode.is-light .director-shell .ref-tag { background: #f4f8f9; color: #64757f; }
body.director-mode.is-light .director-shell .ref-tag:hover { background: #e9f3f6; }

/* ---- 素材区 ---- */
body.director-mode.is-light .dr-media-group {
  background: #f8fbfc;
  border-color: #e1e8ec;
}
body.director-mode.is-light .dr-media-group.is-global {
  background: linear-gradient(180deg, rgba(96, 165, 250, .07), transparent 96px), #f8fbfc;
}
body.director-mode.is-light .dr-media-title { color: #1e2a33; }
body.director-mode.is-light .dr-media-group.is-global .dr-media-title { color: #1d4ed8; }
body.director-mode.is-light .dr-global-prompt-title { color: #1d4ed8; }
body.director-mode.is-light .director-shell .dr-global-prompt {
  background: #fff;
  border-color: #cfdae1;
  color: #1e2a33;
}
body.director-mode.is-light .director-shell .dr-global-prompt::placeholder { color: #7d8d97; }
body.director-mode.is-light .director-shell .dr-global-prompt.is-empty::before,
body.director-mode.is-light .director-shell .dr-global-prompt:empty::before { color: #7d8d97; }
body.director-mode.is-light .director-shell .dr-global-prompt:focus {
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
body.director-mode.is-light .director-shell .dr-up-block {
  background: #f8fbfc;
  border-color: #e1e8ec;
}
body.director-mode.is-light .director-shell .dr-up-block .up-title { color: #1e2a33; }
body.director-mode.is-light .director-shell .up-drop {
  background: #fff;
  border-color: #cfdae1;
}
body.director-mode.is-light .director-shell .up-drop:hover { background: #f7fbfa; }
body.director-mode.is-light .director-shell .up-drop.is-full { border-color: #e5c07b; }
body.director-mode.is-light .director-shell .up-drop.is-full .up-hint { color: #a16207; }
body.director-mode.is-light .director-shell .up-hint { color: #6b7c86; }
body.director-mode.is-light .director-shell .up-item {
  background: #fff;
  border-color: #dbe4e9;
}
body.director-mode.is-light .director-shell .up-thumb { background: #f2f6f8; }
body.director-mode.is-light .director-shell .up-item-name { color: #64757f; }
body.director-mode.is-light .director-shell .up-item-foot .btn {
  background: #f4f8f9;
  border-color: #dbe4e9;
  color: #5b6d79;
}
body.director-mode.is-light .director-shell .up-item-foot .btn:hover {
  background: #eaf2f6;
  color: #1e2a33;
}
body.director-mode.is-light .dr-remain { color: #5b6d79; }
body.director-mode.is-light .dr-remain.is-warn { color: #a16207; }

/* ---- @ 素材面板 ---- */
body.director-mode.is-light .at-panel {
  background: #fff;
  border-color: #dbe4e9;
  box-shadow: 0 18px 44px rgba(24, 45, 60, .16);
  color: #1e2a33;
}
body.director-mode.is-light .at-group + .at-group { border-top-color: #e6edf1; }
body.director-mode.is-light .at-group-head { color: #64757f; }
body.director-mode.is-light .at-upload { color: #0b7a5a; }
body.director-mode.is-light .at-upload:hover { background: rgba(15, 169, 124, .10); }
body.director-mode.is-light .at-empty { background: #f6f9fa; color: #6b7c86; }
body.director-mode.is-light .at-item:hover,
body.director-mode.is-light .at-item:focus-visible { background: #f2f7f9; }
body.director-mode.is-light .at-item-thumb { background: #f2f6f8; color: #7d8d97; }
body.director-mode.is-light .at-item-name { color: #1e2a33; }
body.director-mode.is-light .at-item-ref {
  border-color: rgba(15, 169, 124, .35);
  background: rgba(15, 169, 124, .10);
  color: #0b7a5a;
}

/* ---- 资产库 / 弹窗 ---- */
body.director-mode.is-light .lib-item { background: #fff; }
body.director-mode.is-light .lib-icon-btn { color: #6b7c86; }
body.director-mode.is-light .lib-search-clear { color: #6b7c86; }
body.director-mode.is-light .lib-item:hover { border-color: rgba(15, 169, 124, .42); }
body.director-mode.is-light .lib-thumb { background: #f2f6f8; }
body.director-mode.is-light .lib-folder:hover { background: #f2fbf7; }
body.director-mode.is-light .lib-folder.active {
  background: #e9f9f1;
  border-color: #bfe6d6;
  color: #0b7a5a;
}
body.director-mode.is-light .lib-search-clear:hover,
body.director-mode.is-light .lib-icon-btn.plain:hover,
body.director-mode.is-light .lib-move:hover,
body.director-mode.is-light .modal-close:hover {
  background: #f2f8f5;
  color: #1e2a33;
}
body.director-mode.is-light .lib-icon-btn:hover,
body.director-mode.is-light .lib-del:hover { background: #fef2f2; color: #e11d48; }
body.director-mode.is-light .lib-icon-btn.plain.lib-folder-upload:hover {
  background: #eafaf2;
  color: #0b7a5a;
}
body.director-mode.is-light .library-grid.drag { background: rgba(15, 169, 124, .06); }
body.director-mode.is-light .lib-audio-cover,
body.director-mode.is-light .lib-pick-audio {
  background: linear-gradient(135deg, #eaf7f1, #dff2ea);
  color: #0b7a5a;
}
body.director-mode.is-light .library-empty-icon { background: #eaf7f1; color: #0f9d76; }
body.director-mode.is-light .lib-usage-bar { background: #e6edf1; }
body.director-mode.is-light .lib-move-menu { background: #fff; border-color: #dbe4e9; }
body.director-mode.is-light .lib-move-item:hover { background: #f2f7f9; }
body.director-mode.is-light .lib-move-item.active { background: #e9f9f1; color: #0b7a5a; }
body.director-mode.is-light .modal-mask { background: rgba(16, 32, 44, .42); }
body.director-mode.is-light .modal-card {
  background: #fff;
  color: #1e2a33;
  box-shadow: 0 24px 60px rgba(24, 45, 60, .22);
}
body.director-mode.is-light .modal-foot { background: #f7fafb; }
body.director-mode.is-light .lib-pick { background: #f7fafb; }
body.director-mode.is-light .lib-pick:hover { border-color: rgba(15, 169, 124, .5); }
body.director-mode.is-light .lib-pick-check { background: #fff; border-color: #cfdae1; }
body.director-mode.is-light .lib-pick.selected .lib-pick-check {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

/* ---------- 服务器队列选择弹窗 ---------- */
.queue-modal-card { width: min(560px, 100%); }
.queue-head-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.queue-head-note { font-size: 12px; color: #7d93a8; }
.queue-modal-body { padding: 14px 18px 10px; }
.queue-list { display: flex; flex-direction: column; gap: 10px; }
.queue-loading,
.queue-empty {
  padding: 26px 12px;
  text-align: center;
  font-size: 13px;
  color: #7d93a8;
  border: 1px dashed #2a3b4d;
  border-radius: 12px;
}
.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  font-family: inherit;
  background: #081017;
  color: #dce7f0;
  border: 1px solid #22323f;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.queue-item:hover { border-color: rgba(45, 212, 167, .45); }
.queue-item.is-selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, .10);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}
.queue-radio {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid #3d5568;
  background: #0f1922;
}
.queue-item.is-selected .queue-radio {
  border-color: #10b981;
  background: radial-gradient(circle at center, #10b981 0 4px, transparent 4.5px);
}
.queue-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.queue-name { font-size: 14px; font-weight: 700; color: #e8f1f8; }
.queue-sub { font-size: 12px; color: #7d93a8; }
.queue-run { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.queue-run-bar { flex: 1; height: 5px; border-radius: 3px; background: #13212c; overflow: hidden; }
.queue-run-bar i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #6ee7b7); }
.queue-run-text { font-size: 11px; color: #8aa3b6; white-space: nowrap; }
.queue-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.queue-state { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.queue-state.is-busy {
  color: #fbbf24;
  background: rgba(251, 191, 36, .12);
  border: 1px solid rgba(251, 191, 36, .28);
}
.queue-state.is-free {
  color: #34d399;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .28);
}
.queue-queued { font-size: 11px; color: #8aa3b6; }
.queue-updated { font-size: 11px; color: #7d93a8; }
.queue-note { margin: 10px 2px 0; font-size: 11px; color: #6b8397; }
.queue-modal-foot { gap: 8px; }
.queue-btn {
  padding: 8px 16px;
  border: 1px solid #22323f;
  border-radius: 10px;
  background: #0b131a;
  color: #cfe0ee;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, filter .15s;
}
.queue-btn:hover { border-color: rgba(45, 212, 167, .5); color: #8ef0cf; }
.queue-btn.is-primary {
  background: linear-gradient(135deg, #10b981, #0d9668);
  border-color: transparent;
  color: #04140f;
}
.queue-btn.is-primary:hover { color: #04140f; filter: brightness(1.06); }
.queue-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

body.director-mode.is-light .queue-head-note,
body.director-mode.is-light .queue-sub,
body.director-mode.is-light .queue-queued,
body.director-mode.is-light .queue-updated,
body.director-mode.is-light .queue-note { color: #6b7c86; }
body.director-mode.is-light .queue-loading,
body.director-mode.is-light .queue-empty { color: #6b7c86; border-color: #dbe4e9; }
body.director-mode.is-light .queue-item {
  background: #fff;
  color: #1e2a33;
  border-color: #dbe4e9;
}
body.director-mode.is-light .queue-item:hover { border-color: rgba(15, 169, 124, .42); }
body.director-mode.is-light .queue-item.is-selected {
  background: #e9f9f1;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}
body.director-mode.is-light .queue-radio { background: #fff; border-color: #cfdae1; }
body.director-mode.is-light .queue-item.is-selected .queue-radio {
  border-color: #10b981;
  background: radial-gradient(circle at center, #10b981 0 4px, transparent 4.5px);
}
body.director-mode.is-light .queue-name { color: #1e2a33; }
body.director-mode.is-light .queue-run-bar { background: #e6edf1; }
body.director-mode.is-light .queue-run-text { color: #6b7c86; }
body.director-mode.is-light .queue-state.is-busy { color: #b45309; background: #fef3c7; border-color: #fde68a; }
body.director-mode.is-light .queue-state.is-free { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
body.director-mode.is-light .queue-btn { background: #fff; border-color: #dbe4e9; color: #33424e; }
body.director-mode.is-light .queue-btn:hover { border-color: rgba(15, 169, 124, .5); color: #0b7a5a; }
body.director-mode.is-light .queue-btn.is-primary {
  background: linear-gradient(135deg, #10b981, #0d9668);
  border-color: transparent;
  color: #fff;
}

/* ---------- 提示词优化入口（编辑器底部、快速插入上方） ---------- */
.dr-prompt-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
  flex: 0 0 auto;
}
.dr-opt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(45, 212, 167, .4);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(45, 212, 167, .16), rgba(45, 212, 167, .05));
  color: #9df3d5;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.dr-opt-btn:hover {
  background: rgba(45, 212, 167, .22);
  border-color: rgba(45, 212, 167, .72);
  transform: translateY(-1px);
}
.dr-opt-btn:active { transform: none; }
.dr-opt-btn:focus-visible { outline: 2px solid var(--dr-accent); outline-offset: 2px; }
/* 编辑栏上的提示点：跑动中转圈，关着界面跑完了点一颗绿点 */
.dr-opt-btn.is-busy::after {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid rgba(45, 212, 167, .3);
  border-top-color: #2dd4a7;
  border-radius: 50%;
  animation: prompt-opt-spin .7s linear infinite;
}
.dr-opt-btn.is-done::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dd4a7;
  box-shadow: 0 0 0 3px rgba(45, 212, 167, .22);
}
.dr-opt-icon { font-size: 13px; line-height: 1; }
.dr-opt-note { font-size: 10.5px; color: var(--dr-dim); }
body.director-mode.is-light .director-shell .dr-opt-btn {
  border-color: #a9e3cd;
  background: #e7f8f1;
  color: #0b7a5a;
}
body.director-mode.is-light .director-shell .dr-opt-btn:hover {
  background: #d9f4e8;
  border-color: #7fd6b8;
}
body.director-mode.is-light .director-shell .dr-opt-note { color: #64757f; }

/* ---------- 提示词优化弹窗（原始 → 中文分镜 → 英文六段式） ---------- */
.prompt-opt-card {
  width: min(1320px, 97vw);
  height: min(80vh, 760px);
  max-height: none;
}
.prompt-opt-head { align-items: center; }
.prompt-opt-head-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.prompt-opt-sub { font-size: 11.5px; color: var(--muted); }
.prompt-opt-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.prompt-opt-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.25fr);
  gap: 12px;
  padding: 14px 18px;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.prompt-opt-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.prompt-opt-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.prompt-opt-count { font-size: 11px; font-weight: 600; color: var(--muted); }
.prompt-opt-pane-ops { display: flex; align-items: center; gap: 8px; flex: none; }
.prompt-opt-pane-head .btn { padding: 3px 9px; font-size: 11.5px; white-space: nowrap; }
/* 栏内「清空」：文本按钮，不跟主操作抢视觉 */
.prompt-opt-clear {
  flex: none;
  padding: 0 1px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.prompt-opt-clear:hover:not(:disabled) { color: #d9503c; text-decoration: underline; }
.prompt-opt-clear:disabled { opacity: .4; cursor: default; }
/* 生成中的转圈 + 栏内流光：请求在后台跑，关掉弹窗也不会丢 */
.prompt-opt-spin {
  flex: none;
  display: inline-block;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(16, 185, 129, .25);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: prompt-opt-spin .7s linear infinite;
}
@keyframes prompt-opt-spin { to { transform: rotate(360deg); } }
.prompt-opt-card .prompt-opt-pane.is-loading .prompt-opt-text {
  border-color: #6ee7b7;
  background-image: linear-gradient(100deg, rgba(16, 185, 129, 0) 34%,
    rgba(16, 185, 129, .16) 50%, rgba(16, 185, 129, 0) 66%);
  background-repeat: no-repeat;
  background-size: 200% 100%;
  animation: prompt-opt-sheen 1.2s linear infinite;
}
@keyframes prompt-opt-sheen {
  from { background-position: 150% 0; }
  to { background-position: -150% 0; }
}
.prompt-opt-text {
  flex: 1 1 auto;
  width: 100%;
  min-height: 160px;
  resize: none;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #f7fbf9;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow: auto;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.prompt-opt-text:focus { border-color: #a7e3c9; box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); }
.prompt-opt-text[readonly] { background: #f2f8f5; color: #43525c; }
.prompt-opt-text::placeholder { color: #9aabb4; }
.prompt-opt-msg { grid-column: 1 / -1; margin: 0; }
body.director-mode:not(.is-light) .prompt-opt-pane-head { color: #dce7f0; }
body.director-mode:not(.is-light) .prompt-opt-sub,
body.director-mode:not(.is-light) .prompt-opt-count { color: #7d93a8; }
body.director-mode:not(.is-light) .prompt-opt-clear { color: #7d93a8; }
body.director-mode:not(.is-light) .prompt-opt-clear:hover:not(:disabled) { color: #ff8a75; }
body.director-mode:not(.is-light) .prompt-opt-text {
  background: #081017;
  border-color: #263545;
  color: #dce7f0;
}
body.director-mode:not(.is-light) .prompt-opt-text[readonly] { background: #0c1620; color: #a8bccb; }
body.director-mode:not(.is-light) .prompt-opt-text:focus {
  border-color: rgba(45, 212, 167, .72);
  box-shadow: 0 0 0 3px rgba(45, 212, 167, .12);
}
body.director-mode:not(.is-light) .prompt-opt-text::placeholder { color: #52687b; }
body.director-mode:not(.is-light) .prompt-opt-msg.warn { color: #fbbf24; }
body.director-mode.is-light .prompt-opt-text { background: #f7fbf9; border-color: #dbe4e9; color: #1e2a33; }
body.director-mode.is-light .prompt-opt-text[readonly] { background: #f2f8f5; color: #43525c; }
body.director-mode.is-light .prompt-opt-msg.warn { color: #b45309; }
@media (max-width: 1100px) {
  .prompt-opt-card { width: 96vw; height: 88vh; }
  .prompt-opt-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0;
  }
  .prompt-opt-pane + .prompt-opt-pane { margin-top: 10px; }
  .prompt-opt-text { min-height: 0; }
}
@media (max-width: 760px) {
  .prompt-opt-head { align-items: flex-start; }
  .prompt-opt-actions { gap: 4px; }
  .prompt-opt-body { padding: 12px 14px; }
}

/* ---------- 提示词下方生成参数区（融入编辑区，不单独卡片） ---------- */
.dr-params-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
}
.dr-params-inline .dr-field { min-width: 0; }
.dr-params-inline .dr-field-mode,
.dr-params-inline .dr-field-resolution { flex: 0 0 auto; }
.dr-params-inline .dr-field-label { font-size: 10px; letter-spacing: .1em; }
.dr-params-inline .dr-submit-msg { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; }
.dr-params-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 生成按钮左侧：时长设定（胶囊输入） */
.dr-duration-dock {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  padding: 0 10px 0 13px;
  border: 1px solid #263545;
  border-radius: 999px;
  background: #081017;
  font-family: inherit;
  color: var(--dr-dim);
  white-space: nowrap;
  cursor: text;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.dr-duration-dock:hover { border-color: #35506a; }
.dr-duration-dock:focus-within {
  border-color: rgba(45, 212, 167, .72);
  box-shadow: 0 0 0 3px rgba(45, 212, 167, .10);
}
.dr-dock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--dr-dim);
}
.director-shell .dr-duration-dock .dr-num {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--dr-text);
  font-size: 13.5px;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.director-shell .dr-duration-dock .dr-num:hover { border: 0; }
.director-shell .dr-duration-dock .dr-num:focus { border: 0; box-shadow: none; }
.director-shell .dr-duration-dock .dr-num::-webkit-outer-spin-button,
.director-shell .dr-duration-dock .dr-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dr-dock-unit { font-size: 11px; color: var(--dr-dim); }
body.director-mode.is-light .dr-duration-dock { background: #fff; border-color: #cfdae1; }
body.director-mode.is-light .dr-dock-label,
body.director-mode.is-light .dr-dock-unit { color: #64757f; }
body.director-mode.is-light .director-shell .dr-duration-dock .dr-num {
  background: transparent;
  border: 0;
  color: #1e2a33;
}

/* 生成模式 / 分辨率：分段选择按钮 */
.dr-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #081017;
  border: 1px solid #263545;
  border-radius: 12px;
}
.dr-choice-btn {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--dr-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .1s ease;
}
.dr-choice-btn:hover { color: var(--dr-text); background: rgba(255, 255, 255, .05); }
.dr-choice-btn:active { transform: scale(.94); }
.dr-choice-btn.is-active {
  background: rgba(45, 212, 167, .16);
  color: var(--dr-accent);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 167, .36);
}
.dr-choice-btn.is-active:hover { background: rgba(45, 212, 167, .22); }

/* 生成按钮：胶囊圆角 + 按压反馈 */
.dr-generate {
  position: relative;
  overflow: hidden;
  height: 42px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 8px 22px rgba(45, 212, 167, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.dr-generate:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(45, 212, 167, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
.dr-generate:active { transform: translateY(0) scale(.96); }

/* 提示词优化按钮：统一胶囊圆角 */
.dr-opt-btn { position: relative; overflow: hidden; border-radius: 999px; }
.dr-opt-btn:active { transform: scale(.95); }

/* 点击波纹（由 app.js 注入） */
.dr-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .38);
  transform: scale(0);
  opacity: .8;
  pointer-events: none;
  animation: dr-ripple .56s ease-out forwards;
}
@keyframes dr-ripple {
  to { transform: scale(1); opacity: 0; }
}

/* 亮色主题 */
body.director-mode.is-light .dr-choice { background: #f2f7f9; border-color: #cfdae1; }
body.director-mode.is-light .dr-choice-btn { color: #60727d; }
body.director-mode.is-light .dr-choice-btn:hover { color: #1e2a33; background: rgba(24, 45, 60, .05); }
body.director-mode.is-light .dr-choice-btn.is-active {
  background: #e3f6ef;
  color: #0b7a5a;
  box-shadow: inset 0 0 0 1px #a9d9c8;
}
body.director-mode.is-light .dr-ripple { background: rgba(15, 169, 124, .24); }

/* 移动端：参数换行，生成按钮靠右 */
@media (max-width: 680px) {
  .dr-params-inline { gap: 10px 14px; }
  .dr-params-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
}
