/* 奥创AI · 创作台 —— 云白主题（大留白 / 大卡片 / 少描边）
   深色墨金保留为可选主题：<html data-theme="dark"> */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --surface-3: #f1eee7;
  --line: #e8e4db;
  --line-2: #d9d4c8;
  --text: #201d18;
  --dim: #6e6860;
  --faint: #9c958a;
  --gold: #a87f3c;
  --gold-2: #8a6528;
  --gold-soft: #f6edda;
  --jade: #2f7a5b;
  --jade-soft: #e8f2ec;
  --bronze: #b4692c;
  --bronze-soft: #f8ede2;
  --crimson: #a83b45;
  --crimson-soft: #f8e8e9;
  --shadow-sm: 0 1px 2px rgba(32, 29, 24, .04), 0 2px 8px rgba(32, 29, 24, .04);
  --shadow-md: 0 6px 24px rgba(32, 29, 24, .08);
  --shadow-lg: 0 24px 70px rgba(32, 29, 24, .14);
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --topbar-h: 68px;
  --queue-h: 68px;

  /* 兼容旧变量（director.css 还在用） */
  --ink: var(--bg);
  --panel: var(--surface);
  --panel2: var(--surface-2);
  --line2: var(--line-2);
  --gold2: var(--gold-2);
  --r-ctl: 11px;
  --r-card: var(--r-lg);
}

[data-theme="dark"] {
  --bg: #0a0a0c;
  --surface: #131316;
  --surface-2: #1a1a20;
  --surface-3: #22222a;
  --line: #26262c;
  --line-2: #34343c;
  --text: #f4f0e6;
  --dim: #a39d93;
  --faint: #6b665e;
  --gold: #d8b478;
  --gold-2: #b08a45;
  --gold-soft: rgba(216, 180, 120, .12);
  --jade: #4e9c77;
  --jade-soft: rgba(78, 156, 119, .12);
  --bronze: #c77b3c;
  --bronze-soft: rgba(199, 123, 60, .12);
  --crimson: #b04a52;
  --crimson-soft: rgba(176, 74, 82, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--gold-soft); }

/* ---------- 骨架 ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 22px;
  padding: 0 26px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 3;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: .2px; white-space: nowrap; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8c88f, var(--gold-2)); box-shadow: 0 0 0 4px var(--gold-soft); }
.brand i { color: var(--faint); font-style: normal; margin: 0 2px; font-weight: 400; }

.project { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); min-width: 0; }
.proj-name { font-size: 14.5px; color: var(--text); padding: 7px 10px; border-radius: 9px; }
.proj-name:hover { background: var(--surface-3); }
.caret { color: var(--faint); font-size: 10px; margin-left: 6px; }
.crumb { color: var(--faint); font-size: 12.5px; white-space: nowrap; }

.steps { display: flex; align-items: center; gap: 2px; margin: 0 auto; background: var(--surface-3); padding: 4px; border-radius: 999px; }
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  color: var(--dim); font-size: 13.5px; white-space: nowrap;
  transition: color .15s, background .15s, box-shadow .15s;
}
.step i {
  font-style: normal; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px;
  border: 1px solid var(--line-2); color: var(--faint); background: var(--surface);
}
.step:hover { color: var(--text); }
.step.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.step.on i { border-color: transparent; color: #fff; background: var(--gold); }
.step.done i { border-color: var(--jade); color: var(--jade); background: var(--jade-soft); }
.step.done { color: var(--dim); }

.top-right { display: flex; align-items: center; gap: 10px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--dim); font-size: 13px;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.model { color: var(--gold-2); border-color: var(--gold); background: var(--gold-soft); font-weight: 550; }
.chip.queue b { color: var(--text); font-weight: 600; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--bronze); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(180, 105, 44, .4); } 70% { box-shadow: 0 0 0 8px rgba(180, 105, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(180, 105, 44, 0); } }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--gold-soft); color: var(--gold-2);
  border: 1px solid var(--gold);
}
.pagenav-btn.on { color: var(--gold-2); border-color: var(--gold); background: var(--gold-soft); }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--dim); display: grid; place-items: center; font-size: 15px; }
.theme-toggle:hover { border-color: var(--gold); color: var(--gold-2); }

.main { flex: 1; min-height: 0; display: flex; }
.view { flex: 1; min-width: 0; display: flex; }

/* ---------- 左侧全局导航 ---------- */
.body { flex: 1; min-height: 0; display: flex; }
.sidenav {
  width: 88px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 0 12px; overflow: auto;
}
.nav-group {
  font-size: 9.5px; letter-spacing: 2px; color: var(--faint);
  margin: 12px 0 4px; text-align: center; width: 100%;
}
.nav-item {
  width: 68px; height: 33px; border-radius: 9px; display: grid; place-items: center;
  gap: 2px; color: var(--dim); font-size: 11px; padding: 4px 0;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.on { background: var(--gold-soft); color: var(--gold-2); font-weight: 600; }

/* ---------- 小说 ---------- */
.novel-layout { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 6px 34px 30px; }
.chapter-list {
  width: 250px; flex: none; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: auto; padding: 10px;
}
.chapter-hd { font-size: 11px; color: var(--faint); letter-spacing: 2px; padding: 6px 8px 10px; }
.chapter {
  width: 100%; text-align: left; padding: 12px 12px; border-radius: 12px;
  display: grid; gap: 3px; color: var(--dim); border: 1px solid transparent; margin-bottom: 6px;
}
.chapter:hover { background: var(--surface-2); }
.chapter.on { background: var(--gold-soft); color: var(--text); border-color: var(--gold); }
.chapter b { font-size: 13.5px; font-weight: 600; }
.chapter small { color: var(--faint); font-size: 11px; }
.editor { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.novel-title {
  font-size: 20px; font-weight: 650; padding: 12px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.novel-text {
  flex: 1; min-height: 0; resize: none; padding: 20px 22px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 15px; line-height: 2; font-family: inherit;
}
.novel-title:focus, .novel-text:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.scene-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.scene-head h3 { margin: 0; }
.scene-head .btn { margin-left: auto; }

/* ---------- 通用 ---------- */
.muted { color: var(--faint); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
.hd { display: flex; align-items: center; justify-content: space-between; padding: 30px 34px 18px; gap: 20px; }
.hd h2 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.2px; }
.hd .sub { color: var(--faint); font-size: 13px; margin-left: 12px; font-weight: 400; }
.hd-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  height: 38px; padding: 0 18px; border-radius: 11px;
  border: 1px solid var(--line-2); color: var(--dim); background: var(--surface);
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap;
  transition: border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { color: var(--text); border-color: var(--gold); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.gold {
  background: linear-gradient(180deg, #c39a55, var(--gold));
  color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: 0 2px 10px rgba(168, 127, 60, .25);
}
.btn.gold:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(168, 127, 60, .3); }
.btn.ghost { background: transparent; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line); color: var(--dim); background: var(--surface-2);
  white-space: nowrap;
}
.pill .led { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.jade { color: var(--jade); border-color: transparent; background: var(--jade-soft); }
.pill.bronze { color: var(--bronze); border-color: transparent; background: var(--bronze-soft); }
.pill.crimson { color: var(--crimson); border-color: transparent; background: var(--crimson-soft); }
.pill.gold { color: var(--gold-2); border-color: transparent; background: var(--gold-soft); }
.pill.mute { color: var(--faint); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* ---------- 分镜台 ---------- */
.rail {
  width: 250px; flex: none; border-right: 1px solid var(--line);
  background: var(--surface-2); display: flex; flex-direction: column; min-height: 0;
}
.rail-hd { padding: 20px 20px 12px; display: flex; align-items: center; justify-content: space-between; }
.rail-hd span { font-size: 12px; color: var(--faint); letter-spacing: 2px; }
.ep-list { padding: 0 12px; overflow: auto; }
.ep {
  width: 100%; text-align: left; padding: 14px 14px; border-radius: 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 8px;
  border: 1px solid transparent; color: var(--dim);
}
.ep:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.ep.on { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: var(--shadow-sm); }
.ep b { font-size: 14.5px; font-weight: 600; }
.ep small { grid-column: 1 / -1; color: var(--faint); font-size: 12px; }
.ep .state { align-self: center; }
.rail-stats { margin-top: auto; padding: 18px 20px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.rail-stats h4 { margin: 0 0 12px; font-size: 12px; color: var(--faint); font-weight: 500; letter-spacing: 1px; }
.stat-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--dim); padding: 5px 0; }
.stat-row b { color: var(--text); font-weight: 600; }

.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.stage-title { padding: 28px 34px 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.stage-title h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.3px; }
.stage-title .sub { color: var(--faint); font-size: 13px; }
.stage-head { padding: 18px 34px 0; display: flex; align-items: center; gap: 16px; }
.tabs { display: flex; gap: 2px; background: var(--surface-3); padding: 4px; border-radius: 12px; }
.tab { padding: 8px 18px; border-radius: 9px; font-size: 13.5px; color: var(--dim); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.stage-tools { margin-left: auto; display: flex; gap: 10px; }

.cards {
  flex: 1; min-height: 0; overflow: auto;
  padding: 22px 34px 32px;
  display: flex; flex-wrap: wrap; gap: 22px; align-content: flex-start; align-items: flex-start;
}
.shot-card {
  width: calc((100% - 22px) / 2);
  display: block;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); text-align: left;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.shot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.shot-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-md); }
.thumb {
  position: relative; height: 0; padding-bottom: 56.25%;
  background:
    radial-gradient(120% 90% at 72% 4%, hsl(var(--h) 55% 44% / .55), transparent 58%),
    linear-gradient(var(--a, 165deg), hsl(var(--h) 42% 27%), #14161a 84%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.thumb-id {
  position: absolute; right: 16px; top: 14px; z-index: 2;
  font-size: 12px; letter-spacing: .6px; color: rgba(255, 255, 255, .62);
  font-variant-numeric: tabular-nums;
}
.thumb::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .55) 100%);
  z-index: 1;
}
.thumb-info {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  display: grid; gap: 3px; color: #fff; text-align: left;
}
.thumb-info b { font-size: 17px; font-weight: 600; letter-spacing: .3px; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.thumb-info small { font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 4px 4px; z-index: 1;
}
.play {
  width: 44px; height: 44px; border-radius: 50%; position: relative; z-index: 2;
  border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .88);
  display: grid; place-items: center; color: #1b1b1f; font-size: 12px; padding-left: 3px;
  backdrop-filter: blur(4px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.thumb > .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.thumb .badge { position: absolute; left: 14px; top: 14px; z-index: 2; }
.thumb .pct { position: absolute; right: 14px; bottom: 12px; z-index: 2; font-size: 12px; color: var(--gold-2); font-weight: 600; }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-done {
  position: absolute; right: 14px; bottom: 12px; z-index: 2;
  font-size: 11.5px; color: var(--jade); background: var(--jade-soft);
  padding: 3px 9px; border-radius: 999px;
}
.meta { padding: 14px 16px 16px; display: flex; align-items: center; gap: 10px; }
.meta .label { flex: 1; min-width: 0; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .id { flex: none; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .4px; }
.meta .nums { font-size: 12.5px; color: var(--faint); display: flex; gap: 10px; }
.meta .state { flex: none; }

/* 表格视图 */
.table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 10px 34px 30px; }
table.shots { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
table.shots th {
  text-align: left; font-weight: 500; color: var(--faint); font-size: 12px;
  padding: 13px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
table.shots td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--dim); }
table.shots tr:last-child td { border-bottom: 0; }
table.shots tr { cursor: pointer; }
table.shots tr:hover td { background: var(--surface-2); }
table.shots tr.on td { background: var(--gold-soft); color: var(--text); }
table.shots td.id { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 550; }
table.shots td.line { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.shots td.c { text-align: center; }
.warn-dot { color: var(--bronze); }

/* 时间线视图 */
.timeline-wrap { flex: 1; min-height: 0; overflow: auto; padding: 24px 34px; }
.tl { display: flex; gap: 4px; align-items: flex-end; height: 210px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.tl .bar {
  flex: 1; border-radius: 6px 6px 0 0; min-height: 8px; position: relative;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-2);
  cursor: pointer;
}
.tl .bar.jade { background: linear-gradient(180deg, #9ecdb6, #d9ece2); border-color: #a9d2bd; }
.tl .bar.bronze { background: linear-gradient(180deg, #e8bd92, #f7e6d4); border-color: #e0b489; }
.tl .bar.crimson { background: linear-gradient(180deg, #dba3a8, #f6dfe1); border-color: #d69aa0; }
[data-theme="dark"] .tl .bar.jade { background: linear-gradient(180deg, rgba(78,156,119,.55), rgba(78,156,119,.18)); }
[data-theme="dark"] .tl .bar.bronze { background: linear-gradient(180deg, rgba(199,123,60,.6), rgba(199,123,60,.2)); }
[data-theme="dark"] .tl .bar.crimson { background: linear-gradient(180deg, rgba(176,74,82,.6), rgba(176,74,82,.18)); }
.tl .bar.on { outline: 2px solid var(--gold); outline-offset: 2px; }
.tl .bar span { position: absolute; bottom: -20px; left: 0; font-size: 10px; color: var(--faint); }
.tl-legend { display: flex; gap: 22px; margin-top: 34px; font-size: 12.5px; color: var(--faint); }

/* ---------- 检查器 ---------- */
.inspect {
  width: 400px; flex: none; border-left: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; min-height: 0;
}
.inspect-hd { padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.inspect-hd .row1 { display: flex; align-items: center; gap: 10px; }
.inspect-hd h3 { margin: 0; font-size: 22px; letter-spacing: .2px; font-variant-numeric: tabular-nums; font-weight: 650; }
.inspect-hd .row2 { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.inspect-body { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 26px; }
.play16 {
  aspect-ratio: 16/9; border-radius: var(--r-md); border: 1px solid var(--line);
  background: radial-gradient(110% 90% at 65% 0%, var(--surface-3), var(--surface-2));
  display: grid; place-items: center; margin-bottom: 22px; position: relative; overflow: hidden;
}
.play16 .tag { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--faint); z-index: 1; }
.play16 img, .play16 video { width: 100%; height: 100%; object-fit: cover; }

.sect { margin-bottom: 24px; }
.sect > h4 { margin: 0 0 10px; font-size: 12px; color: var(--faint); font-weight: 500; letter-spacing: 1.4px; display: flex; justify-content: space-between; }
.sect > h4 em { font-style: normal; color: var(--faint); letter-spacing: 0; font-size: 11.5px; }
.desc { font-size: 14px; line-height: 1.8; color: var(--dim); background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; }
.desc b { color: var(--text); font-weight: 600; }

.checks { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px;
  background: var(--surface-2); border-radius: var(--r-sm); font-size: 13px; color: var(--dim); line-height: 1.6;
}
.check .mark { flex: none; width: 16px; text-align: center; font-weight: 700; }
.check.ok .mark { color: var(--jade); }
.check.warn .mark { color: var(--bronze); }
.check.bad .mark { color: var(--crimson); }
.check b { color: var(--text); font-weight: 550; }
.check .btn { margin-left: auto; align-self: center; }

.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ref { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.ref .ph { aspect-ratio: 1/1; display: grid; place-items: center; color: var(--faint); font-size: 20px;
  background: radial-gradient(90% 80% at 50% 10%, hsl(var(--h) 40% 88% / .8), transparent 65%), var(--surface-3); }
img.ph { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.ref .cap { padding: 8px 9px; font-size: 11px; color: var(--dim); line-height: 1.45; }
.ref .cap i { display: block; color: var(--gold-2); font-style: normal; font-size: 10.5px; letter-spacing: .3px; }
.ref.add .ph { color: var(--faint); font-size: 24px; border: 1px dashed var(--line-2); margin: 8px; border-radius: 10px; aspect-ratio: auto; height: 100%; display: grid; }

.hist { display: flex; gap: 10px; overflow: auto; padding-bottom: 4px; }
.ver { min-width: 96px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); }
.ver b { font-size: 12.5px; }
.ver small { display: block; color: var(--faint); font-size: 11px; margin-top: 2px; }
.ver.on { border-color: var(--gold); background: var(--gold-soft); }

.note { border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; margin-bottom: 12px; font-size: 13px; color: var(--dim); line-height: 1.65; }
.note small { display: block; color: var(--faint); font-size: 11px; margin-top: 3px; }

.inspect-ft { padding: 16px 24px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--surface); }
.inspect-ft .btn.gold { height: 44px; font-size: 14.5px; justify-content: center; border-radius: 13px; }
.inspect-ft .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.inspect-ft .row .btn { padding: 0 8px; justify-content: center; font-size: 12.5px; height: 36px; }

/* ---------- 队列条 ---------- */
.queuebar {
  height: var(--queue-h); flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 26px; background: var(--surface); border-top: 1px solid var(--line);
}
.qb-title { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.qb-title b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.qb-jobs { display: flex; gap: 10px; flex: 1; min-width: 0; overflow: hidden; }
.qb-job { display: flex; align-items: center; gap: 10px; min-width: 230px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.qb-job .k { font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.qb-job .p { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.qb-job .p i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.qb-job small { color: var(--faint); font-size: 11px; }
.qb-actions { display: flex; gap: 10px; }

/* ---------- 剧本 / 资产 / 审片 / 交付 ---------- */
.split { flex: 1; min-width: 0; display: flex; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side { width: 380px; flex: none; border-left: 1px solid var(--line); background: var(--surface); padding: 26px; overflow: auto; }
.side h3 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }
.side .hint { color: var(--faint); font-size: 12.5px; margin-bottom: 18px; line-height: 1.6; }
.scroll { flex: 1; min-height: 0; overflow: auto; padding: 10px 34px 32px; }

.script { max-width: 820px; margin: 0 auto; }
.script h1 { font-size: 26px; margin: 10px 0 26px; font-weight: 650; }
.scene { margin-bottom: 30px; }
.scene h3 { font-size: 14px; color: var(--gold-2); margin: 0 0 6px; font-weight: 600; letter-spacing: .3px; }
.scene .where { color: var(--faint); font-size: 12px; margin-bottom: 14px; }
.beat { color: var(--dim); font-size: 14.5px; line-height: 1.9; padding-left: 14px; border-left: 2px solid var(--line-2); margin-bottom: 8px; }
.line { color: var(--text); font-size: 14.5px; padding-left: 14px; margin: 8px 0 8px 4px; }

.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.kv.four { grid-template-columns: repeat(4, 1fr); }
.kv .box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface-2); }
.kv .box small { display: block; color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
.kv .box b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }

.assets-grid { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 34px 30px; overflow: auto; align-content: flex-start; align-items: flex-start; flex: 1; min-height: 0; }
.asset { width: 230px; flex: none; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); text-align: left; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.asset:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.asset.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.asset .face { height: 160px; display: grid; place-items: center; font-size: 30px; color: var(--gold-2);
  background: radial-gradient(100% 90% at 60% 0%, hsl(var(--h) 45% 88%), var(--surface-3)); }
.asset .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset .body { padding: 12px 14px 16px; }
.asset .body b { font-size: 14px; }
.asset .body p { margin: 6px 0 0; font-size: 12px; color: var(--faint); line-height: 1.55; }
.asset .body .tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.review-grid { flex: 1; display: grid; grid-template-columns: 1fr 400px; min-height: 0; }
.player { padding: 28px 34px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.player .frame { flex: 1; border-radius: var(--r-lg); border: 1px solid var(--line); position: relative; overflow: hidden;
  background: radial-gradient(110% 80% at 60% 0%, var(--surface-3), var(--surface-2));
  display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.player .frame img, .player .frame video { width: 100%; height: 100%; object-fit: contain; }
.player .frame .tag { position: absolute; left: 16px; bottom: 14px; font-size: 12px; color: var(--dim); }
.player .bar { display: flex; align-items: center; gap: 12px; }
.player .track { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); }
.player .track i { display: block; height: 100%; width: 34%; background: var(--gold); border-radius: 3px; }

.deliver-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; padding: 10px 34px 30px; overflow: auto; flex: 1; min-height: 0; align-content: start; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel > .ph-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel > .ph-hd b { font-size: 14px; }
.panel > .ph-bd { padding: 18px 20px; }
.final { aspect-ratio: 16/9; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 16px;
  background: radial-gradient(110% 80% at 60% 0%, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line); overflow: hidden; }
.final img, .final video { width: 100%; height: 100%; object-fit: contain; }
.share { display: grid; gap: 14px; }
.share .opt { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--dim); }
.toggle { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; border: 1px solid var(--line-2); }
.toggle::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; box-shadow: var(--shadow-sm); }
.toggle.on { background: var(--gold); border-color: transparent; }
.toggle.on::after { left: 20px; }
.linkbox { display: flex; gap: 10px; }
.linkbox input { flex: 1; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--gold-2); font-size: 12.5px; }

/* ---------- 发行 / 广场 / 模型 ---------- */
.flow4 { display: flex; gap: 12px; margin: 18px 0 6px; flex-wrap: wrap; }
.flow-step { flex: 1; min-width: 190px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); }
.flow-step .n { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--gold-2); background: var(--gold-soft); }
.flow-step b { font-size: 13.5px; display: block; }
.flow-step small { color: var(--faint); font-size: 11px; line-height: 1.5; }

.sect-title { margin: 26px 0 12px; font-size: 13px; color: var(--dim); font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.sect-title .muted { font-size: 11.5px; letter-spacing: 0; font-weight: 400; }

.mgrid { display: flex; flex-wrap: wrap; gap: 18px; }
.mcard { width: calc((100% - 36px) / 3); min-width: 280px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 18px 20px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.mcard-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mcard-hd b { font-size: 15px; }
.mgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.mgrid2 small { display: block; color: var(--faint); font-size: 11px; margin-bottom: 2px; }
.mgrid2 b { font-size: 16px; font-variant-numeric: tabular-nums; }
.mcard-ft { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mcard-ft .muted { font-size: 11px; line-height: 1.5; }
.gold { color: var(--gold-2); }

/* ---------- 资产库 / 节点图 ---------- */
.acard { display: flex; flex-direction: column; min-width: 0; }
.acard.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-md); }
.acard .athumb {
  height: 0; padding-bottom: 62%; position: relative;
  background: radial-gradient(90% 80% at 50% 10%, var(--surface-3), var(--surface-2));
  border-bottom: 1px solid var(--line); display: grid; place-items: center;
  font-size: 30px; color: var(--gold-2);
}
.acard .athumb::after {
  content: ""; position: absolute; inset: 0;
  display: grid; place-items: center;
}
.acard .athumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acard .athumb span { position: relative; z-index: 1; }

.node-wrap { display: flex; gap: 20px; min-height: 0; align-items: flex-start; }
.node-canvas {
  flex: 1; min-width: 0; overflow: auto; max-height: calc(100vh - 260px);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px;
}
.node-canvas svg { display: block; }
.node-side { width: 340px; flex: none; }
.node-side textarea {
  width: 100%; min-height: 220px; resize: vertical; font-family: ui-monospace, Consolas, monospace;
  font-size: 12px; line-height: 1.6; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px;
}
.node-side textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(32, 29, 24, .38);
  display: grid; place-items: center; backdrop-filter: blur(6px); padding: 28px; }
.modal-card { width: min(680px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-hd b { font-size: 17px; }
.modal-bd { padding: 22px 24px; overflow: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 12px; color: var(--faint); }
.form label.full { grid-column: 1 / -1; }
.form input, .form textarea, .form select {
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text);
  font-size: 13.5px; padding: 10px 12px; font-family: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* ---------- 登录 ---------- */
#login { position: fixed; inset: 0; display: grid; place-items: center; z-index: 80;
  background: radial-gradient(120% 80% at 50% 0%, #fffdf8, var(--bg) 70%); }
.login-card { width: min(400px, 92vw); padding: 34px 32px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; }
.login-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8c88f, var(--gold-2)); box-shadow: 0 0 0 4px var(--gold-soft); }
.login-brand i { color: var(--faint); font-style: normal; }
.login-sub { color: var(--faint); font-size: 12.5px; margin: 10px 0 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-size: 12px; color: var(--faint); }
.login-card input { height: 42px; padding: 0 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.login-card .btn { height: 44px; justify-content: center; margin-top: 6px; border-radius: 12px; }
.login-hint { color: var(--faint); font-size: 11.5px; line-height: 1.8; margin-top: 18px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: rgba(32, 29, 24, .92); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13px; z-index: 90;
  box-shadow: var(--shadow-lg); }
[data-theme="dark"] .toast { background: #22222a; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1440px) {
  .inspect { width: 360px; }
  .side { width: 340px; }
  .step { padding: 8px 12px; font-size: 12.5px; }
}
@media (max-width: 1180px) {
  .cards { padding: 18px 20px 26px; }
  .shot-card { width: 100%; }
  .inspect { width: 330px; }
}
