:root {
  --bg:#f4f5f8; --card:#fff; --ink:#1f2329; --muted:#8a8f99; --line:#e6e8ee;
  --acc:#6b6cff; --acc-weak:#f0f1ff; --acc2:#a06bff; --ok:#22a06b; --warn:#e6a23c; --err:#e5484d;
}
* { box-sizing:border-box; margin:0; padding:0; }
body { background:var(--bg); color:var(--ink); font:14px/1.6 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif; }
.wrap { max-width:none; margin:0 auto; padding:18px 32px 28px; }
a { color:var(--muted); text-decoration:none; }
h1 { text-align:center; font-size:38px; font-weight:600; }
h1 .acc { color:var(--acc); }
.sub { text-align:center; color:var(--muted); margin:12px 0 30px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:24px; box-shadow:0 2px 12px rgba(31,35,41,.04); }
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; border-radius:8px; padding:8px 16px; cursor:pointer; font-size:14px; color:var(--ink); }
.btn:hover { border-color:var(--acc); color:var(--acc); }
.btn.primary { background:linear-gradient(90deg,var(--acc),var(--acc2)); color:#fff; border:none; }
.btn.dark { background:var(--ink); color:#fff; border:none; border-radius:99px; padding:10px 24px; }
.btn.sm { padding:4px 10px; font-size:13px; border-radius:8px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
select, input[type=text], input[type=number] { padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:14px; color:var(--ink); }
textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:13px/1.6 inherit; color:var(--ink); background:#fafbfc; resize:vertical; }
.muted { color:var(--muted); font-size:13px; }
.toast { position:fixed; top:24px; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; padding:10px 22px; border-radius:10px; opacity:0; transition:.3s; pointer-events:none; z-index:99; }
.toast.show { opacity:1; }

/* ===== 顶栏 + 四阶段 stepper ===== */
.topbar { display:flex; align-items:center; gap:14px; padding:10px 0 14px; }
.backlink { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#fff; border:1px solid var(--line); font-size:20px; color:var(--ink); }
.proj-title { display:grid; grid-template-columns:auto auto; gap:0 8px; align-items:center; }
.proj-title .meta { grid-column:1 / span 2; }
.topbar .title {
  font-size:17px; font-weight:600; max-width:min(42vw, 320px);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.editmark { color:var(--muted); font-size:13px; }
.topbar .meta { color:var(--muted); font-size:13px; display:flex; gap:10px; align-items:center; }
.topbar-account { margin-left:auto; }
.credits { display:none; }
.usage-chip { display:none; }
.stepper { display:flex; align-items:center; justify-content:center; gap:0; margin:6px 0 22px; }
.step { display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 26px; border-radius:99px; cursor:pointer; color:var(--muted); min-width:72px; background:#fff; border:1px solid var(--line); }
.step .ic { font-size:19px; }
.step .lb { font-size:13px; }
.step.on { background:#f7f7ff; border:1.5px solid var(--acc); color:var(--acc); box-shadow:0 2px 10px rgba(107,108,255,.12); }
.step-line { width:44px; height:1.5px; background:var(--line); }

/* ===== 剧本页 ===== */
.notice { background:#eef1ff; border:1px solid #dfe3ff; color:#2f3566; border-radius:8px; padding:12px 16px; margin-bottom:18px; font-size:13px; }
.notice.warn { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.notice.wf-banner.danger { background:#fef2f2; border-color:#fecaca; color:#b91c1c; }
.wf-banner-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.wf-banner-copy { min-width:0; flex:1; }
.wf-banner-copy b { display:block; font-size:14px; color:inherit; }
.wf-banner-copy p { margin:4px 0 0; font-size:12.5px; line-height:1.55; color:inherit; opacity:.92; }
.wf-banner .pipeline-progress { margin-top:12px; }
.wf-tech { margin-top:10px; border-top:1px dashed #d7dceb; padding-top:8px; }
.wf-tech > summary { cursor:pointer; color:#596079; font-size:12px; font-weight:600; user-select:none; }
.wf-tech[open] > summary { margin-bottom:6px; }
.notice.script-tip { margin-bottom:14px; }
.parse-hero {
  position:relative; overflow:hidden; max-width:720px; margin:28px auto 48px; padding:48px 36px 40px;
  border:1px solid #e6e9f2; border-radius:20px; background:
    radial-gradient(120% 80% at 10% 0%, #f4f6ff 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 20%, #f7f3ff 0%, transparent 50%),
    #fff;
  text-align:center; box-shadow:0 18px 50px rgba(31,35,41,.06);
}
.parse-hero.is-stalled {
  border-color:#fed7aa; background:
    radial-gradient(120% 80% at 10% 0%, #fff7ed 0%, transparent 55%), #fff;
}
.parse-hero-visual { display:flex; justify-content:center; margin-bottom:18px; }
.parse-hero-ring {
  width:56px; height:56px; border-radius:50%;
  border:3px solid #e4e7f5; border-top-color:var(--acc);
  animation: parse-spin 1s linear infinite;
}
.parse-hero.is-stalled .parse-hero-ring { border-top-color:#ea580c; animation:none; }
.parse-hero-kicker {
  margin:0 0 8px; color:var(--acc); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}
.parse-hero.is-stalled .parse-hero-kicker { color:#c2410c; }
.parse-hero h2 { margin:0; font-size:28px; line-height:1.25; letter-spacing:-.02em; }
.parse-hero-detail { margin:12px auto 0; max-width:34em; color:#5b6475; font-size:14.5px; line-height:1.6; }
.parse-hero-bar {
  width:min(420px,100%); height:8px; margin:22px auto 0; border-radius:999px; background:#eceff6; overflow:hidden;
}
.parse-hero-bar > i {
  display:block; height:100%; width:8%; border-radius:inherit;
  background:linear-gradient(90deg,#8b8cff,#6b6cff); transition:width .6s ease;
}
.parse-hero.is-stalled .parse-hero-bar > i { background:#f97316; }
.parse-hero-note { margin:14px 0 0; color:#8b93a7; font-size:12.5px; }
.parse-hero-actions { margin-top:18px; }
.parse-hero-tech { margin:18px auto 0; max-width:520px; text-align:left; }
@keyframes parse-spin { to { transform:rotate(360deg); } }
.pipeline-progress { display:grid; grid-template-columns:repeat(5,minmax(112px,1fr)); gap:7px; margin-top:10px; }
.pipeline-step { min-width:0; display:flex; align-items:center; gap:8px; padding:7px 9px; border:1px solid #e3e6ee; border-radius:8px; background:rgba(255,255,255,.72); color:var(--muted); }
.pipeline-step-icon { width:22px; height:22px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#eef0f5; font-weight:700; }
.pipeline-step b, .pipeline-step small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pipeline-step b { color:var(--ink); font-size:11.5px; }
.pipeline-step small { font-size:10.5px; }
.pipeline-step.complete { border-color:#bfe8d2; background:#f3fbf7; }
.pipeline-step.complete .pipeline-step-icon { background:#dff5e8; color:#168355; }
.pipeline-step.active { border-color:#bfc8ff; background:#f5f6ff; }
.pipeline-step.active .pipeline-step-icon { background:#e5e7ff; color:var(--acc); }
.pipeline-step.failed { border-color:#fecaca; background:#fff5f5; }
.pipeline-step.failed .pipeline-step-icon { background:#fee2e2; color:#b91c1c; }
.runtime-summary { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:9px; padding:7px 10px; border:1px solid #dfe3ff; border-radius:8px; background:#fff; color:#596079; font-size:11.5px; }
.runtime-summary b { color:#374151; }
.runtime-summary.running { border-color:#bfe8d2; background:#f2fbf6; color:#166534; }
.runtime-summary.running b { color:#166534; }
.runtime-summary.waiting { border-color:#fed7aa; background:#fffaf0; color:#9a5b12; }
.runtime-summary.waiting b { color:#9a5b12; }
.runtime-summary.lost, .runtime-summary.failed { border-color:#fecaca; background:#fef2f2; color:#b91c1c; }
.runtime-summary.lost b, .runtime-summary.failed b { color:#b91c1c; }
.act-evidence { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.act-chip { display:inline-flex; align-items:center; gap:4px; max-width:100%; background:#fff; border:1px solid #dfe3ff; border-radius:9px; padding:4px 10px; font-size:11.5px; color:#4a5178; overflow-wrap:anywhere; }
.act-chip.running, .act-chip.ok { border-color:#bfe8d2; color:#166534; background:#f2fbf6; }
.act-chip.waiting { border-color:#fed7aa; color:#9a5b12; background:#fffaf0; }
.act-chip.lost, .act-chip.failed, .act-chip.bad { border-color:#fecaca; color:#b91c1c; background:#fef2f2; }
@media (max-width:900px) { .pipeline-progress { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.panel { background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px; box-shadow:0 1px 8px rgba(31,35,41,.035); }
.panel-head { display:flex; align-items:center; gap:16px; margin-bottom:14px; }
.panel-head h3 { font-size:16px; margin:0; }
.panel-head.compact { align-items:flex-start; }
.panel-stats { margin-left:auto; display:flex; gap:16px; color:var(--muted); font-size:13px; }
.panel-head.long-video-head { align-items:flex-start; flex-wrap:wrap; gap:8px 16px; }
.panel-head.long-video-head .panel-stats { flex-basis:100%; margin-left:0; }
.script-workbench { display:grid; grid-template-columns:minmax(420px,38vw) minmax(0,1fr); gap:18px; align-items:start; }
.script-workbench-3 {
  grid-template-columns:minmax(220px,280px) minmax(0,1.15fr) minmax(260px,0.9fr);
  gap:14px; align-items:stretch;
}
.source-panel { min-height:420px; }
.script-workbench-3 .source-panel { min-height:0; padding:12px; }
.script-workbench-3 .source-panel .panel-head { margin-bottom:10px; }
.script-workbench-3 .source-panel .panel-head h3 { font-size:14px; }
.script-workbench-3 .source-panel .muted { font-size:11.5px; }
.preview-panel { min-width:0; display:flex; flex-direction:column; }
.preview-empty {
  display:flex; align-items:center; justify-content:center; min-height:280px;
  border:1px dashed var(--line); border-radius:12px; background:#fafbfc;
}
.preview-empty[hidden] { display:none; }
.story-panel {
  min-width:0; max-height:calc(100vh - 168px); overflow:auto;
  position:sticky; top:12px; padding:14px;
}
.story-panel .panel-head { margin-bottom:10px; }
.story-panel .panel-head h3 { font-size:15px; }
.story-empty { padding:8px 2px; line-height:1.55; }
.episode-table { border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.episode-row { display:grid; grid-template-columns:minmax(180px,1fr) 160px 120px; align-items:center; gap:14px; padding:12px 14px; border-top:1px solid var(--line); cursor:pointer; }
.episode-row:first-child { border-top:none; }
.episode-row.on { background:#f7f7ff; }
.episode-head { background:#fafbfc; color:var(--muted); cursor:default; font-size:12.5px; }
.episode-row b { display:block; font-size:13.5px; }
.episode-row small { display:block; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-clip-list { border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.source-group + .source-group { border-top:1px solid var(--line); }
.source-group-head {
  display:flex; align-items:center; gap:8px; width:100%; padding:8px 10px;
  border:0; border-bottom:1px solid transparent; background:#fafbfc; color:var(--muted);
  font:inherit; font-size:11.5px; text-align:left; cursor:pointer;
}
.source-group-head:hover { background:#f3f4fa; }
.source-group-head.is-collapsed { border-bottom:1px solid var(--line); }
.source-group-toggle {
  flex:none; width:14px; color:#8b93a7; font-size:11px; line-height:1;
}
.source-group-title { min-width:0; flex:1; }
.source-group-head b {
  display:block; color:var(--ink); font-size:12.5px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.source-group-head small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-group-status { flex:none; display:flex; align-items:center; }
.source-group-head .planner-badge { display:inline-block; color:var(--acc); margin-right:9px; }
.source-group.is-collapsed + .source-group .source-group-head { border-top:0; }
.clip-row { display:grid; grid-template-columns:minmax(150px,1fr) 52px minmax(92px,auto); align-items:center; gap:10px; padding:10px 13px 10px 22px; border-top:1px solid var(--line); cursor:pointer; }
.script-workbench-3 .clip-row {
  grid-template-columns:minmax(0,1fr) 36px; gap:6px; padding:8px 10px; align-items:start;
}
.clip-row:hover, .clip-row.on { background:#f7f7ff; }
.clip-row.on { box-shadow:inset 3px 0 0 var(--acc); }
.clip-row b { display:block; font-size:13px; }
.script-workbench-3 .clip-row b { font-size:12.5px; }
.clip-row small { display:block; color:var(--muted); font-size:11.5px; }
.script-workbench-3 .clip-row small { font-size:10.5px; }
.clip-row .clip-semantic { color:#4a5178; margin-top:2px; white-space:normal; }
.clip-row.placeholder { display:block; color:var(--muted); cursor:default; }
.clip-duration { color:var(--ink); font-weight:600; font-size:12px; text-align:right; }
.script-workbench-3 .clip-duration { font-size:11px; padding-top:2px; }
.clip-safety { color:var(--ok); font-size:11px; text-align:right; white-space:nowrap; }
.clip-safety.warn { color:#b45309; }
.script-stage-action {
  display:flex; align-items:center; gap:10px; margin-left:auto; max-width:360px;
}
.script-stage-action.is-busy {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px 10px;
  padding:8px 12px; border-radius:12px; background:#f7f7ff; border:1px solid #e0e2ff;
  min-width:min(280px, 42vw);
}
.script-stage-action b { display:block; font-size:13.5px; line-height:1.3; }
.script-stage-action small { display:block; color:var(--muted); font-size:12px; line-height:1.45; margin-top:2px; }
.script-stage-copy { min-width:0; }
.script-stage-copy small {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%;
}
.script-stage-spinner {
  width:16px; height:16px; flex:none; border-radius:50%;
  border:2px solid #d8dbff; border-top-color:var(--acc);
  animation:script-spin .8s linear infinite;
}
.script-stage-meter {
  grid-column:1 / -1; height:4px; border-radius:999px; background:#e8eaff; overflow:hidden;
}
.script-stage-meter i {
  display:block; height:100%; width:0; background:var(--acc);
  transition:width .45s ease;
}
@keyframes script-spin { to { transform:rotate(360deg); } }
.clip-preview {
  margin:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#0f1117;
  flex:1; display:flex; flex-direction:column; min-height:280px;
}
.clip-preview video {
  display:block; width:100%; flex:1; min-height:280px; max-height:min(64vh,620px);
  object-fit:contain; background:#0f1117; vertical-align:top;
}
.clip-preview-meta {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; background:#fafbfe; color:var(--ink); font-size:13px; border-top:1px solid var(--line);
}
.clip-preview-meta b { font-weight:650; }
.script-json { display:none; }
.dot { width:7px; height:7px; border-radius:50%; display:inline-block; margin-right:6px; background:#c4c8d4; }
.dot.ok { background:var(--ok); }
.dot.err { background:var(--err); }
.empty-state { color:var(--muted); display:flex; align-items:center; justify-content:center; min-height:160px; background:#fafbfc; border:1px dashed var(--line); border-radius:8px; }
.script-hero { display:flex; gap:26px; margin-bottom:8px; }
.poster { width:180px; height:250px; border-radius:12px; background:linear-gradient(160deg,#2a2d3a,#4a4460); color:#fff; display:flex; align-items:center; justify-content:center; font-size:44px; flex:none; }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.chip { font-size:12.5px; padding:2px 10px; border-radius:6px; background:#eef6ff; color:#3b82f6; }
.chip.c2 { background:#effaf3; color:#22a06b; } .chip.c3 { background:#fff7e8; color:#e6a23c; }
.chip.c4 { background:#fdeef5; color:#e0559a; } .chip.c5 { background:#f0f1ff; color:var(--acc); }
.sect { margin-top:26px; }
.sect h3 { font-size:16px; margin-bottom:12px; }
.bio-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.bio { border:1px solid var(--line); border-radius:12px; padding:14px; background:#fafbfc; }
.actionbar { position:sticky; bottom:18px; display:flex; justify-content:center; gap:14px; margin-top:26px; }

/* ===== 设定页 ===== */
.setup-head { display:flex; align-items:center; gap:18px; margin-bottom:14px; flex-wrap:wrap; }
.atabs { display:flex; gap:22px; font-size:16px; }
.atab { cursor:pointer; color:var(--muted); padding-bottom:5px; }
.atab.on { color:var(--ink); font-weight:600; border-bottom:2.5px solid var(--acc); }
.stats { display:flex; gap:8px; margin-bottom:16px; align-items:center; }
.stat { font-size:13px; padding:3px 12px; border-radius:8px; background:#eef0f5; color:var(--muted); }
.stat b { color:var(--ink); }
.setup-workbench { display:grid; grid-template-columns:minmax(520px,1fr) minmax(420px,42vw); gap:18px; align-items:start; }
.asset-library { min-width:0; }
.asset-preview { position:sticky; top:18px; min-height:520px; }
.agrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(360px,1fr)); gap:18px; }
.agrid.agrid-roles { grid-template-columns:1fr; gap:16px; }
.agrid.agrid-prod { grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); }
.acard { border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; position:relative; cursor:pointer; }
.acard.on { border-color:var(--acc); box-shadow:0 0 0 2px var(--acc-weak); }
.acard.acard-role { display:grid; grid-template-columns:minmax(300px,1.15fr) minmax(240px,.9fr); align-items:stretch; }
.acard.acard-role .views { height:auto; min-height:340px; grid-template-columns:.9fr 1.2fr; }
.acard.acard-role .body { display:flex; flex-direction:column; justify-content:center; border-left:1px solid var(--line); }
.acard.acard-prod .views.views-prod { grid-template-columns:1fr; height:220px; }
.acard .views { display:grid; grid-template-columns:1fr 1fr; height:210px; cursor:pointer; gap:1px; background:#fff; }
.asset-pane { position:relative; overflow:hidden; background:#f1f3f8; display:flex; align-items:center; justify-content:center; }
.asset-pane img { width:100%; height:100%; object-fit:cover; display:block; }
.asset-pane.role-source-pane img,
.asset-pane.role-prod-pane img { object-fit:contain; background:#e9ebf1; }
.asset-pane.prod-pane img { object-fit:cover; }
.asset-compare.asset-compare-prod { grid-template-columns:1fr; }
.asset-pane span { position:absolute; left:8px; top:8px; font-size:11px; color:#fff; background:rgba(31,35,41,.62); border-radius:5px; padding:1px 6px; }
.asset-pane .evidence-card-status { left:auto; right:8px; max-width:calc(100% - 52px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.evidence-card-status.accepted, .evidence-image-status.accepted, .evidence-summary.accepted { background:#22a06b; color:#fff; }
.evidence-card-status.pending, .evidence-image-status.pending, .evidence-summary.pending { background:#e6a23c; color:#fff; }
.evidence-card-status.rejected, .evidence-image-status.rejected, .evidence-summary.rejected { background:var(--err); color:#fff; }
.evidence-card-status.insufficient, .evidence-image-status.insufficient, .evidence-summary.insufficient { background:#858b98; color:#fff; }
.acard .v { flex:1; display:flex; align-items:center; justify-content:center; font-size:34px; background:linear-gradient(160deg,#eceef4,#e2e5ef); border-right:1px solid #fff; }
.acard .v.main { flex:1.6; font-size:46px; background:linear-gradient(160deg,#e6e6fa,#efe2f7); }
.acard .vbadge { position:absolute; top:8px; left:8px; background:rgba(31,35,41,.75); color:#fff; font-size:12px; border-radius:6px; padding:0 7px; }
.source-badge { position:absolute; top:8px; left:44px; background:rgba(31,35,41,.72); color:#fff; font-size:12px; border-radius:6px; padding:0 8px; z-index:2; }
.source-badge.real { background:rgba(34,160,107,.92); }
.source-badge.fail { background:rgba(229,72,77,.92); }
.source-badge.pending { background:rgba(31,35,41,.55); }
.source-badge.busy { background:rgba(230,162,60,.95); }
.acard.acard-prod .source-badge { left:44px; }
.acard.acard-prod .asset-pane > span:not(.evidence-card-status) { display:none; }
.pending-prod {
  width:100%; height:100%; min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; background:#f3f4f8; color:#8b91a1; text-align:center;
}
.pending-prod span { font-size:14px; font-weight:600; color:#5c6370; }
.pending-prod small { font-size:11px; color:#9aa1b0; }
.pending-prod.slim { min-height:0; }
.pending-prod.slim small { display:none; }
.pending-prod.voice-only { background:#f0f3f8; }
.pending-prod.voice-only span { color:#5b6b88; }
.source-badge.voice { background:rgba(91,107,136,.92); }
.stat.voice-only-stat { color:#5b6b88; }
.atab.atab-voice { color:#5b6b88; }
.atab.atab-voice.on { color:var(--acc); }
.voice-only-list { display:flex; flex-direction:column; gap:10px; }
.voice-only-row {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer;
}
.voice-only-row.on { border-color:var(--acc); box-shadow:0 0 0 2px var(--acc-weak); }
.voice-only-row-main { flex:1; min-width:140px; display:flex; flex-direction:column; gap:2px; }
.voice-only-row-main b { font-size:14px; }
.voice-only-pill {
  flex:none; font-size:11px; font-weight:700; color:#5b6b88; letter-spacing:.02em;
  padding:3px 8px; border-radius:999px; background:#e8edf5;
}
.voice-preview .voice-preview-body { padding:8px 0 16px; color:var(--muted); line-height:1.55; }
.voice-preview .voice-preview-body p { margin:10px 0 14px; }
.voice-preview .asset-preview-actions { display:flex; gap:8px; }
.asset-large .pending-prod { background:#eef0f5; border-radius:8px; }
.acard .menu { position:absolute; top:8px; right:8px; background:rgba(255,255,255,.9); border-radius:6px; padding:0 8px; cursor:pointer; z-index:2; }
.acard .body { padding:12px 14px; }
.acard .nm { display:flex; align-items:center; gap:6px; font-weight:600; flex-wrap:wrap; }
.acard .nm-origin { color:var(--ink); }
.acard .nm-arrow { color:var(--muted); font-weight:500; }
.acard .nm-remake {
  flex:1; min-width:96px; height:30px; padding:4px 8px; border:1px solid var(--line); border-radius:8px;
  background:#fff; font:inherit; font-weight:600; color:var(--acc);
}
.acard .nm-remake:focus { outline:none; border-color:var(--acc); box-shadow:0 0 0 3px rgba(107,108,255,.12); }
.acard .desc { color:var(--muted); font-size:12.5px; margin:6px 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.asset-actions { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.asset-compare { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:12px; margin-bottom:14px; }
.asset-large { height:clamp(360px,46vh,520px); min-height:360px; background:#f3f4fa; border-radius:8px; overflow:hidden; position:relative; display:flex; align-items:center; justify-content:center; }
.asset-large img { width:100%; height:100%; object-fit:contain; display:block; }
.asset-large .source-badge { left:10px; top:10px; }
.evidence-image-status { position:absolute; z-index:2; right:10px; top:10px; border-radius:99px; padding:2px 9px; font-size:11px; line-height:20px; }
.evidence-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; }
.evidence-toolbar > div:first-child { display:flex; align-items:center; gap:8px; font-size:12.5px; }
.evidence-summary { display:inline-flex; align-items:center; min-height:22px; padding:1px 8px; border-radius:99px; font-size:11px; font-weight:500; }
.evidence-view-switch { display:flex; gap:3px; padding:3px; border-radius:8px; background:#eef0f5; }
.evidence-view-switch button { min-width:48px; padding:4px 8px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:11.5px; cursor:pointer; }
.evidence-view-switch button.on { background:#fff; color:var(--acc); font-weight:600; box-shadow:0 1px 4px rgba(31,35,41,.1); }
.evidence-view-switch button:disabled { opacity:.35; cursor:not-allowed; }
.evidence-strip { display:flex; gap:8px; max-width:100%; margin:-2px 0 12px; padding:2px 1px 7px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }
.evidence-candidate { width:178px; min-width:178px; height:74px; display:grid; grid-template-columns:58px minmax(0,1fr); gap:7px; padding:5px; border:1px solid var(--line); border-radius:8px; background:#fff; text-align:left; cursor:pointer; }
.evidence-candidate:hover, .evidence-candidate.selected { border-color:var(--acc); box-shadow:0 0 0 1px var(--acc-weak); }
.evidence-candidate.rejected { opacity:.62; background:#fff8f8; }
.evidence-candidate.accepted { background:#f4fbf7; }
.evidence-candidate-image { width:58px; height:62px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:6px; background:#eef0f5; }
.evidence-candidate-image img { width:100%; height:100%; object-fit:contain; }
.evidence-candidate-meta { min-width:0; display:flex; flex-direction:column; justify-content:center; gap:2px; color:var(--muted); }
.evidence-candidate-meta b { color:var(--ink); font-size:11px; }
.evidence-candidate-meta small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.evidence-empty { margin:-2px 0 12px; padding:9px 11px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); font-size:11.5px; }
.empty-img { color:#c7cad5; font-size:44px; }
.asset-prompt-box { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fafbfc; }
.asset-prompt-box .lb { font-size:13px; font-weight:600; margin-bottom:8px; }
.asset-prompt-box textarea { min-height:112px; background:#fff; }
.asset-prompt-box textarea.missing { border-color:#f1b6b8; background:#fff8f8; }
.asset-source-desc { display:flex; flex-direction:column; gap:4px; margin:0 0 12px; padding:10px 12px; border-radius:8px; background:#f5f6fa; color:var(--muted); font-size:12.5px; line-height:1.55; }
.asset-source-desc b { color:var(--ink); font-size:12px; }
.asset-error { margin:8px 0; padding:7px 9px; border:1px solid #f7cdcf; border-radius:7px; background:#fff3f3; color:var(--err); font-size:11.5px; line-height:1.45; overflow-wrap:anywhere; }
.asset-error.preflight { border-color:#f2d39d; background:#fff8e9; color:#87520a; }
.variant-summary { margin:9px 0; padding:9px; border:1px solid #deddf4; border-radius:9px; background:#f8f7ff; display:flex; flex-direction:column; gap:6px; }
.variant-summary > b { font-size:11.5px; color:#5550a7; }
.variant-chip { width:100%; border:1px solid #d9d7f7; border-radius:8px; background:#fff; padding:7px 9px; text-align:left; cursor:pointer; display:flex; justify-content:space-between; gap:10px; align-items:center; color:var(--ink); }
.variant-chip:hover { border-color:var(--acc); }
.variant-chip span { font-size:12px; font-weight:800; }
.variant-chip small { font-size:10.5px; color:var(--muted); text-align:right; }
.variant-chip.ready { border-color:#b9e4c9; background:#f2fbf5; }
.drawer-error { margin:12px 0 -4px; font-size:12.5px; }
.asset-preview-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:10px; flex-wrap:wrap; }
.voice-btn { display:inline-flex; gap:5px; align-items:center; font-size:12.5px; border:1px solid var(--line); border-radius:99px; padding:2px 12px; cursor:pointer; color:var(--ink); background:#fff; }
.dropdown { position:absolute; z-index:41; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 30px rgba(31,35,41,.14); padding:8px; min-width:150px; }
.dropdown .it { padding:7px 12px; border-radius:8px; cursor:pointer; white-space:nowrap; }
.dropdown .it:hover { background:var(--acc-weak); color:var(--acc); }
.dropdown .it.disabled { opacity:.45; pointer-events:none; }

/* 抽屉 & 弹窗 */
.overlay { position:fixed; inset:0; background:rgba(31,35,41,.35); z-index:40; }
.overlay.ghost { background:transparent; }
.drawer { position:fixed; top:0; right:0; bottom:0; width:min(760px,92vw); background:#fff; z-index:41; padding:26px; overflow:auto; box-shadow:-10px 0 40px rgba(31,35,41,.18); }
.drawer .big { height:380px; border-radius:8px; background:linear-gradient(160deg,#e6e6fa,#efe2f7); display:flex; align-items:center; justify-content:center; font-size:90px; margin:16px 0; }
.drawer .big img { width:100%; height:100%; object-fit:contain; border-radius:8px; }
.drawer-source-evidence { margin-top:16px; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fafbfc; }
.drawer-source-image { position:relative; height:min(58vh,520px); min-height:320px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:8px; background:#eef0f5; }
.drawer-source-image img { width:100%; height:100%; object-fit:contain; }
.drawer-source-image .source-badge { left:10px; top:10px; }
.drawer-source-evidence .evidence-strip { margin:10px 0 0; }
.drawer-remake-title { margin-top:18px; font-size:13px; font-weight:600; color:var(--ink); }
.thumbs { display:flex; gap:10px; align-items:center; }
.thumb { width:74px; height:74px; border-radius:10px; background:#eceef4; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:24px; cursor:pointer; border:2px solid transparent; }
.thumb.on { border-color:var(--acc); }
.thumb .cap { font-size:11px; color:var(--muted); }
.thumb img { width:100%; height:52px; object-fit:contain; border-radius:7px 7px 3px 3px; }
.modal { position:fixed; z-index:42; top:50%; left:50%; transform:translate(-50%,-50%); background:#fff; border-radius:16px; padding:22px; width:min(560px,92vw); box-shadow:0 16px 60px rgba(31,35,41,.22); }
.modal.usage-modal { width:min(920px,94vw); max-height:88vh; overflow:auto; }
.usage-modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.usage-modal-head h3 { margin:0; font-size:18px; }
.usage-modal-head p { color:var(--muted); font-size:12.5px; }
.usage-summary-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:9px; margin:18px 0 12px; }
.usage-summary-grid > div { min-width:0; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fafbff; }
.usage-summary-grid small { display:block; color:var(--muted); font-size:11px; white-space:nowrap; }
.usage-summary-grid b { display:block; margin-top:2px; font-size:18px; overflow:hidden; text-overflow:ellipsis; }
.usage-warning { margin:10px 0; padding:9px 11px; border:1px solid #fed7aa; border-radius:8px; background:#fff7ed; color:#9a3412; font-size:12px; }
.usage-meta { display:flex; justify-content:space-between; gap:12px; margin:10px 1px; color:var(--muted); font-size:11.5px; }
.usage-table-wrap { max-height:360px; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.usage-table { width:100%; border-collapse:collapse; font-size:12px; }
.usage-table th { position:sticky; top:0; z-index:1; padding:8px 10px; background:#f5f6fa; color:var(--muted); text-align:right; font-weight:500; }
.usage-table th:first-child, .usage-table th:nth-child(2) { text-align:left; }
.usage-table td { padding:9px 10px; border-top:1px solid var(--line); text-align:right; vertical-align:middle; }
.usage-table td:first-child, .usage-table td:nth-child(2) { text-align:left; }
.usage-table td:first-child b, .usage-table td:first-child small { display:block; }
.usage-table td:first-child small { color:var(--muted); font-size:10px; }
.usage-table em { display:block; color:#b45309; font-size:9.5px; font-style:normal; }
.usage-table .usage-empty { padding:28px 12px; color:var(--muted); text-align:center; }
.usage-footnote { margin-top:10px; color:var(--muted); font-size:11px; }
@media (max-width:900px) {
  .usage-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .usage-chip-label { display:none; }
  .credits { display:none; }
}
.modal.voice-modal { width:min(760px,92vw); }
.voice-modal-body { max-height:78vh; overflow:auto; padding-right:4px; }
.voice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:14px; }
.voice { display:flex; gap:8px; align-items:center; border:1px solid var(--line); border-radius:10px; padding:9px 12px; cursor:pointer; }
.voice:hover { border-color:var(--acc); }
.voice.selected { border-color:var(--acc); background:var(--acc-weak); box-shadow:0 0 0 1px var(--acc); }
.voice .play { width:26px; height:26px; border-radius:50%; background:var(--acc-weak); color:var(--acc); display:flex; align-items:center; justify-content:center; flex:none; }
.voice .vn { font-size:13px; font-weight:500; } .voice .vt { font-size:10.5px; color:var(--muted); overflow-wrap:anywhere; }
.voice-preview { display:flex; align-items:center; gap:14px; margin-top:12px; padding:11px 12px; border:1px solid #bfe8d2; background:#f2fbf6; border-radius:10px; }
.voice-preview > div { min-width:150px; }
.voice-preview audio { flex:1; min-width:220px; height:34px; }
.voice-actions { display:flex; align-items:center; gap:8px; margin-top:16px; }
@media (max-width:720px) { .voice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .voice-preview { align-items:flex-start; flex-direction:column; } .voice-preview audio { width:100%; min-width:0; } }

/* ===== 分镜页 ===== */
.sb-layout { display:flex; gap:18px; }
.shot-workbench { align-items:stretch; }
.ep-rail { width:60px; flex:none; display:flex; flex-direction:column; gap:8px; align-items:center; }
.ep-rail .lbl { font-size:12px; color:var(--muted); }
.ep-sq { width:40px; height:40px; border-radius:10px; background:#eef0f5; color:var(--muted); display:flex; align-items:center; justify-content:center; cursor:pointer; font-weight:600; }
.ep-sq.on { background:var(--acc); color:#fff; }
.sb-main { flex:1; min-width:0; }
.shot-asset-rail { width:240px; max-height:calc(100vh - 36px); overflow:auto; flex:none; background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px; align-self:flex-start; position:sticky; top:18px; }
.rail-tabs { display:flex; gap:4px; background:#f3f5fa; padding:4px; border-radius:8px; margin-bottom:12px; }
.rail-tabs button { flex:1; border:0; background:transparent; text-align:center; font:12px/1.6 inherit; color:var(--muted); padding:4px 0; border-radius:6px; cursor:pointer; }
.rail-tabs button:hover { color:var(--acc); }
.rail-tabs .on { background:#fff; color:var(--ink); box-shadow:0 1px 4px rgba(31,35,41,.06); }
.rail-sec { margin-top:14px; }
.rail-title { display:flex; justify-content:space-between; font-size:13px; font-weight:600; margin-bottom:8px; }
.rail-title span { color:var(--muted); font-size:11px; font-weight:400; }
.rail-asset { display:grid; grid-template-columns:52px minmax(0,1fr); gap:8px; align-items:center; margin-bottom:8px; }
.rail-asset img, .rail-asset span { width:52px; height:52px; border-radius:8px; object-fit:cover; background:#f0f2f7; display:flex; align-items:center; justify-content:center; color:#b5bac7; }
.rail-asset b { font-size:12px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.empty-mini { height:52px; color:#b8bdc9; background:#f5f6fa; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:12px; }
.sb-top { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.sb-heading { display:flex; align-items:baseline; gap:8px; white-space:nowrap; }
.sb-heading b { font-size:14px; }
.sb-heading span { color:var(--muted); font-size:11.5px; }
.shot-model { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11.5px; white-space:nowrap; }
.shot-model select { color:var(--ink); }
.clip-overview { border:1px solid var(--line); border-radius:10px; background:#fafbfe; padding:12px; margin-bottom:14px; }
.clip-overview-head, .clip-subshots-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.clip-overview-head b, .clip-subshots-head b { font-size:13.5px; }
.clip-parallel-status { display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border:1px solid #ffdba3; border-radius:999px; background:#fff8eb; color:#a76300; font-size:11px; white-space:nowrap; }
.clip-parallel-status b { font-size:12px; color:#8c5200; }
.clip-parallel-status small { padding-left:5px; border-left:1px solid #edc981; color:#9b7b4b; font-size:10px; }
.clip-nav { display:grid; grid-template-columns:repeat(auto-fit,minmax(225px,1fr)); gap:8px; }
.clip-nav-item { min-width:0; display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:8px; align-items:center; padding:7px; border:1px solid var(--line); border-radius:9px; background:#fff; cursor:pointer; transition:border-color .15s, box-shadow .15s, background .15s; }
.clip-nav-item:hover { border-color:var(--acc); background:#fcfcff; }
.clip-nav-item.on { border-color:var(--acc); background:var(--acc-weak); box-shadow:0 0 0 2px rgba(107,108,255,.08); }
.clip-nav-thumb { width:48px; height:38px; border-radius:6px; background:#eceef4; display:flex; align-items:center; justify-content:center; overflow:hidden; color:var(--muted); font-size:16px; }
.clip-nav-thumb img { width:100%; height:100%; object-fit:cover; }
.clip-nav-copy { min-width:0; display:flex; flex-direction:column; }
.clip-nav-copy b { font-size:12.5px; color:var(--ink); }
.clip-nav-copy span { color:var(--muted); font-size:10.5px; line-height:1.35; }
.clip-state { align-self:start; font-size:10px; border-radius:99px; padding:1px 6px; white-space:nowrap; background:#eef0f5; color:var(--muted); }
.clip-state.generating { background:#fff7e8; color:var(--warn); }
.clip-state.done { background:#eaf7f0; color:var(--ok); }
.clip-state.failed { background:#fdebec; color:var(--err); }
.clip-editing-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; margin:-4px 0 12px; border:1px solid #dfe3ff; border-radius:8px; background:#f6f7ff; color:#4a5178; font-size:12.5px; }
.shotcard { border:1px solid var(--line); border-radius:8px; background:#fff; padding:18px; margin-bottom:18px; box-shadow:0 1px 8px rgba(31,35,41,.03); }
.shotcard .head { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-bottom:16px; }
.shotcard .head .shot-no { font-size:16px; }
.shotcard .head .head-meta { font-size:12.5px; }
.shotcard .head .hact { cursor:pointer; color:var(--muted); font-size:14px; padding:2px 4px; border-radius:6px; }
.shotcard .head .hact:hover { background:var(--bg); color:var(--ink); }
.source-time { display:inline-flex; align-items:center; border:1px solid #9fd9bf; background:#f2fbf6; color:var(--ok); border-radius:99px; padding:2px 10px; font-size:12px; }
.shot-cols { display:grid; grid-template-columns:minmax(250px,300px) minmax(430px,1fr) minmax(340px,460px); gap:16px; align-items:start; }
@media (max-width:1100px){ .shot-cols { grid-template-columns:1fr; } }
.column-title { font-size:13.5px; font-weight:600; margin-bottom:10px; }
.fgroup { margin-bottom:14px; }
.fgroup .lb { font-size:13px; font-weight:600; margin-bottom:7px; }
.cast { display:flex; flex-direction:column; gap:8px; }
.cast .row { display:flex; gap:8px; align-items:center; }
.voice-summary { width:104px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:1px solid var(--line); border-radius:8px; padding:7px 8px; color:var(--muted); font-size:11px; background:#fafbfc; }
.fgroup .lb .addbtn { float:right; cursor:pointer; color:var(--acc); font-size:12.5px; border:1px solid var(--acc-weak); border-radius:6px; padding:0 7px; }
.fgroup .lb .addbtn:hover { background:var(--acc-weak); }
.cast .rmbtn { cursor:pointer; color:var(--muted); font-size:12px; padding:2px 4px; border-radius:5px; }
.cast .rmbtn:hover { color:var(--err); background:#fdebec; }
.propchip { cursor:pointer; display:inline-flex; align-items:center; }
.propchip .x { margin-left:5px; opacity:.45; font-size:10px; }
.propchip:hover { background:#fdebec; color:var(--err); }
.propchip:hover .x { opacity:1; }
.pick-grid { display:flex; flex-direction:column; gap:6px; max-height:340px; overflow:auto; }
.pick-it { display:flex; gap:10px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.pick-it:hover { border-color:var(--acc); background:var(--acc-weak); }
.pick-th { width:40px; height:40px; border-radius:8px; overflow:hidden; background:linear-gradient(160deg,#e6e6fa,#efe2f7); display:flex; align-items:center; justify-content:center; flex:none; }
.pick-th img { width:100%; height:100%; object-fit:cover; }
.cast .ava { width:34px; height:34px; border-radius:8px; background:linear-gradient(160deg,#e6e6fa,#efe2f7); display:flex; align-items:center; justify-content:center; flex:none; }
.cast .ava img { width:100%; height:100%; object-fit:cover; border-radius:8px; }
.scene-img { height:108px; border-radius:8px; background:linear-gradient(160deg,#dfe6f2,#e8e2f2); display:flex; align-items:center; justify-content:center; font-size:36px; margin-bottom:8px; }
.scene-img img { width:100%; height:100%; object-fit:cover; border-radius:8px; }
.gen-panel { border:1.5px solid var(--line); border-radius:12px; padding:12px; background:#fcfcfe; }
.gen-panel:focus-within { border-color:var(--acc); }
.gen-panel textarea { border:none; background:#fff; padding:10px; min-height:150px; font:13px/1.7 inherit; border-radius:8px; }
.gen-panel textarea:focus { outline:none; box-shadow:0 0 0 2px var(--acc-weak); }
.gen-panel.rebuilding { min-height:180px; display:flex; align-items:center; justify-content:center; border-color:#f2c98a; background:#fffaf1; }
.reference-rebuild-notice { display:flex; flex-direction:column; align-items:center; gap:7px; color:#9a5b12; text-align:center; padding:24px; }
.reference-rebuild-notice b { font-size:14px; }
.reference-rebuild-notice span { color:var(--muted); font-size:12px; }
.gen-title { display:flex; align-items:center; gap:8px; margin-bottom:10px; min-height:30px; }
.gen-title .column-title { margin:0; }
.save-status { font-size:11.5px; }
.save-draft { white-space:nowrap; }
.ptabs { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.ptab { font-size:12px; padding:3px 12px; cursor:pointer; color:var(--muted); background:#fff; }
.ptab.on { background:var(--acc); color:#fff; }
.ref-hint { font-size:11.5px; margin:2px 0 8px; }
.gen-foot { display:flex; gap:8px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.gen-foot .ff-sel { padding:4px 8px; font-size:12.5px; }
.gen-foot .cost { background:linear-gradient(90deg,var(--acc),var(--acc2)); color:#fff; border:none; border-radius:9px; padding:7px 18px; cursor:pointer; font-weight:500; }
.gen-foot .cost.muted-cost { background:#eef0f5; color:var(--muted); }
.duration-pill, .merged-note { display:inline-flex; align-items:center; min-height:30px; border-radius:8px; padding:3px 9px; background:#eef0f5; color:var(--muted); font-size:12px; }
.merged-note { background:#f5f6fa; }
.mention { position:relative; }

/* prompt 预览 + @引用高亮联动 */
.prompt-prev { background:#fff; border-radius:8px; padding:11px 12px; min-height:150px; max-height:390px; overflow:auto; font:13px/1.85 inherit; color:var(--ink); border:1px solid var(--line); white-space:normal; word-break:break-word; }
.prompt-prev .dlg { color:var(--acc); font-weight:600; }
.refmk { display:inline-flex; align-items:center; gap:3px; padding:0 6px; margin:0 1px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; color:#fff; background:var(--rc); vertical-align:baseline; line-height:1.7; }
.refmk i { font-style:normal; font-weight:400; opacity:.9; font-size:11px; }
.refmk:hover { filter:brightness(1.08); box-shadow:0 0 0 2px color-mix(in srgb, var(--rc) 30%, transparent); }
.dlg-line { margin-top:10px; font-size:12.5px; line-height:1.9; }
.gen-err { margin-top:10px; background:#fdebec; border:1px solid #f7cdcf; color:var(--err); border-radius:9px; padding:9px 12px; font-size:12.5px; cursor:pointer; }
.gen-err:hover { background:#fce0e1; }
.gen-err-more { float:right; text-decoration:underline; opacity:.8; }
.badge.click { cursor:pointer; }
.badge.click:hover { filter:brightness(.96); text-decoration:underline; }
.preview-title { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; font-size:13.5px; }
.preview-title span { color:var(--muted); font-size:11px; }
.preview { border-radius:8px; background:#14151a; color:#666; min-height:220px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; font-size:13px; }
.badge { font-size:12px; padding:2px 10px; border-radius:99px; }
.b-pending { background:#eef0f5; color:var(--muted); } .b-generating { background:#fff7e8; color:var(--warn); }
.b-done { background:#eaf7f0; color:var(--ok); } .b-failed { background:#fdebec; color:var(--err); }

/* ===== 分集剧本视图 ===== */
.ep-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 14px; }
.ep-tab { padding:5px 14px; border-radius:8px; background:#eef0f5; color:var(--muted); cursor:pointer; font-size:13px; }
.ep-tab.on { background:var(--acc); color:#fff; }
.ep-tab:hover:not(.on) { background:#e2e5ee; }
.script-doc { border:1px solid var(--line); border-radius:8px; padding:4px 0; background:#fcfcfe; }
.script-tools { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.script-editor { min-height:260px; margin-bottom:12px; font:12.5px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; background:#fff; }
.scr-scene { font-weight:600; color:var(--acc); padding:10px 16px 4px; font-size:14px; }
.scr-shot { padding:10px 16px; border-top:1px solid var(--line); }
.scr-shot:first-child { border-top:none; }
.scr-no { font-size:12px; color:var(--muted); font-weight:600; margin-bottom:4px; }
.scr-desc { font-size:12.5px; color:#5a5f6a; line-height:1.7; margin-bottom:8px; }
.scr-line { display:grid; grid-template-columns:96px 1fr; gap:4px 10px; padding:6px 0; border-top:1px dashed var(--line); }
.scr-line:first-of-type { border-top:none; }
.scr-spk { grid-row:span 2; font-weight:600; font-size:12.5px; color:var(--ink); align-self:center; }
.scr-orig { font-size:13.5px; color:var(--ink); }
.scr-loc { font-size:13px; color:var(--acc); }

/* ===== 视频页 ===== */
.cmp { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.cmp .pane { border-radius:14px; background:#14151a; min-height:300px; color:#777; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; }
.compare-pane { position:relative; overflow:hidden; aspect-ratio:16/9; min-height:0 !important; }
.compare-pane video { width:100%; height:100%; object-fit:contain; border-radius:14px; background:#111218; }
.stitched-pane video { cursor:pointer; }
.pane-label { position:absolute; left:12px; top:10px; background:rgba(15,16,22,.72); color:white; font-size:12px; padding:5px 8px; border-radius:8px; pointer-events:none; }
.stitched-controls { position:absolute; left:0; right:0; bottom:0; min-height:48px; display:flex; align-items:center; gap:10px; padding:12px 14px 9px; color:#fff; background:linear-gradient(transparent,rgba(8,9,13,.92)); }
.stitched-controls button { width:28px; height:28px; flex:none; border:0; border-radius:7px; background:rgba(255,255,255,.12); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.stitched-controls button:hover { background:rgba(255,255,255,.22); }
.stitched-controls input[type="range"] { min-width:80px; flex:1; accent-color:var(--acc); cursor:pointer; }
.stitched-controls #remakeClock { min-width:112px; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.strip { display:flex; gap:8px; overflow-x:auto; margin-top:14px; padding-bottom:6px; }
.frame { width:92px; height:56px; flex:none; border-radius:8px; background:#eceef4; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; font-size:12px; color:var(--muted); cursor:pointer; border:2px solid transparent; }
.frame small { font-size:10px; color:inherit; opacity:.72; }
.frame.done { background:#eaf7f0; color:var(--ok); }
.frame.missing { background:#f2f3f6; color:#a4a9b4; }
.frame.on { border-color:var(--acc); }
.frame.clip-frame { width:150px; padding:0 10px; box-sizing:border-box; align-items:flex-start; }
.frame.clip-frame b { color:inherit; font-size:12px; }
.frame.clip-frame small { white-space:nowrap; }

/* ===== 首页创建 ===== */
.home-wrap { max-width:1240px; padding-top:10px; padding-bottom:18px; }
.hi { width:1em; height:1em; flex:none; vertical-align:-0.12em; }
.home-top {
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px;
}
.home-brand {
  font:700 20px/1 "Avenir Next","Segoe UI","PingFang SC",sans-serif; letter-spacing:-0.03em;
  color:var(--ink); text-decoration:none;
}
.home-brand span { color:var(--acc); }

/* --- Hero --- */
.home-hero {
  position:relative; overflow:hidden; margin-bottom:12px; padding:16px 20px;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 8px 22px rgba(31,35,41,.04);
}
.home-hero-blob {
  position:absolute; right:-50px; top:-70px; width:180px; height:180px; border-radius:50%;
  background:radial-gradient(closest-side, rgba(107,108,255,.14), rgba(160,107,255,.05) 62%, transparent);
  pointer-events:none;
}
.home-hero-grid {
  position:relative; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.9fr);
  gap:16px; align-items:center;
}
.home-kicker {
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:99px;
  border:1px solid #e0e1ff; background:var(--acc-weak); color:var(--acc);
  font-size:12px; font-weight:650; letter-spacing:.04em;
}
.home-kicker .hi { width:13px; height:13px; }
.home-title {
  margin:8px 0 0; text-align:left; font-size:26px; line-height:1.25; font-weight:750;
  letter-spacing:0.01em; color:var(--ink);
}
.home-slogan {
  margin:5px 0 0; font-size:15px; font-style:italic; font-weight:650; letter-spacing:0.02em;
  background:linear-gradient(90deg,var(--acc),var(--acc2)); -webkit-background-clip:text;
  background-clip:text; color:transparent; width:fit-content;
}
.home-desc { margin:6px 0 0; color:var(--muted); font-size:13px; max-width:36em; line-height:1.55; }

.home-eyebrow {
  font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#8b93a7;
}
.home-flow {
  border:1px solid var(--line); background:#fafbfe; border-radius:12px; padding:10px 12px 8px;
  display:flex; flex-direction:column; gap:0;
}
.home-flow > .home-eyebrow { margin-bottom:4px; }
.home-flow-step {
  position:relative; display:flex; align-items:center; gap:10px; min-width:0;
  padding:5px 0;
}
.home-flow-step:not(:last-child)::after {
  content:""; position:absolute; left:14px; top:34px; bottom:-2px; width:1px;
  background:linear-gradient(#e0e1ff, #eceef5);
}
.home-flow-icon {
  position:relative; z-index:1; width:28px; height:28px; flex:none;
  display:flex; align-items:center; justify-content:center;
  border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--acc);
}
.home-flow-icon .hi { width:13px; height:13px; }
.home-flow-copy { min-width:0; flex:1; }
.home-flow-copy b { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink); }
.home-flow-copy b i {
  font-style:normal; font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:10px; color:#a4abbd;
}
.home-flow-copy small {
  display:block; color:var(--muted); font-size:11px; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* --- 布局 + 新建卡片 --- */
.home-layout {
  display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:12px; align-items:start;
}
.home-main { min-width:0; display:flex; flex-direction:column; gap:12px; }
.home-panel {
  background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px;
  box-shadow:0 4px 14px rgba(31,35,41,.03);
}
.home-create-card { padding:0; overflow:hidden; }
.home-card-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:14px 16px 0;
}
.home-card-head h2 { margin:4px 0 0; font-size:17px; font-weight:700; letter-spacing:-0.01em; }
.home-card-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.home-chip {
  flex:none; padding:3px 9px; border-radius:99px; border:1px solid #e0e1ff;
  background:var(--acc-weak); color:var(--acc); font-size:11.5px; font-weight:650; white-space:nowrap;
}
.home-chip:empty { display:none; }
.home-card-block { padding:12px 16px 14px; }
.home-card-block + .home-card-block { border-top:1px solid var(--line); }
.home-drop {
  border:1px dashed #d5d9e6; border-radius:12px; min-height:108px; padding:14px 12px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  background:#fafbfe; transition:border-color .15s, background .15s;
}
.home-drop:hover { border-color:var(--acc); background:var(--acc-weak); }
.home-drop-icon {
  width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  border-radius:11px; background:#fff; color:var(--acc); box-shadow:0 2px 8px rgba(31,35,41,.07);
}
.home-drop-icon .hi { width:18px; height:18px; }
.home-drop-copy { color:var(--ink); font-size:13.5px; text-align:center; max-width:34em; line-height:1.5; }
.home-drop-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.home-drop-actions .btn { padding:8px 14px; font-size:13px; border-radius:9px; }
.home-format-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.home-format-chips span {
  display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line);
  border-radius:7px; padding:3px 8px; font-size:11.5px; color:var(--muted); background:#fff;
}
.home-format-chips .hi { width:12px; height:12px; }
.home-section-head { margin-bottom:8px; }
.home-section-head b { font-size:14px; color:var(--ink); }
.home-section-head p { margin:2px 0 0; color:var(--muted); font-size:12px; }
.home-fields {
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px 16px;
}
.home-field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.home-field > span { font-size:13px; color:#5c6478; font-weight:650; letter-spacing:.01em; }
.home-field input[type=text],
.home-field input[type=number] {
  width:100%; height:44px; border-radius:11px; font-size:15px; padding:10px 14px;
}
.home-field-wide { grid-column:1 / -1; }
.home-summary {
  margin-top:10px; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px;
  border:1px solid var(--line); background:#fafbfe; border-radius:10px; padding:10px 12px;
}
.home-summary small { display:block; color:var(--muted); font-size:12px; }
.home-summary b {
  display:block; margin-top:3px; font-size:14px; font-weight:650; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.home-create-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:12px; flex-wrap:wrap;
}
.home-notes { margin:0; color:#8b93a7; font-size:13px; line-height:1.6; flex:1; min-width:220px; }
.home-create { padding:12px 22px; border-radius:12px; font-size:15px; font-weight:650; }
.home-create .hi { width:16px; height:16px; }

/* --- 历史项目侧栏 --- */
.home-side {
  position:sticky; top:12px; background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:12px; box-shadow:0 4px 14px rgba(31,35,41,.03); max-height:calc(100vh - 28px);
  display:flex; flex-direction:column; min-height:240px;
}
.home-side-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:10px;
}
.home-side-head h2 { margin:2px 0 0; font-size:15px; font-weight:700; }
.home-history { overflow:auto; min-height:0; flex:1; }
.home-history-empty {
  color:var(--muted); font-size:14px; padding:36px 12px; text-align:center; line-height:1.6;
  border:1px dashed var(--line); border-radius:12px; background:#fafbfe;
}
.home-history .plist-item {
  position:relative; display:block; margin-bottom:10px; padding:14px; border-radius:14px;
  background:#fafbfe; transition:border-color .15s, background .15s, box-shadow .15s;
}
.home-history .plist-item:hover { background:#fff; box-shadow:0 4px 14px rgba(107,108,255,.10); }
.home-history .plist-item:last-child { margin-bottom:0; }
.plist-row { display:flex; gap:11px; align-items:flex-start; padding-right:36px; }
.plist-icon {
  width:38px; height:38px; flex:none; display:flex; align-items:center; justify-content:center;
  border-radius:11px; background:var(--acc-weak); color:var(--acc);
}
.plist-icon .hi { width:16px; height:16px; }
.plist-main { flex:1; min-width:0; }
.plist-main b {
  display:block; font-size:14.5px; line-height:1.35; margin-bottom:3px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.plist-meta {
  color:var(--muted); font-size:12.5px; line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.home-history .pill { display:inline-block; margin-top:8px; font-size:12px; padding:3px 10px; white-space:nowrap; }
.plist-foot {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-top:12px; padding-top:10px; border-top:1px solid var(--line);
}
.plist-foot small {
  color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.plist-action {
  display:inline-flex; align-items:center; gap:5px; color:var(--acc);
  font-size:13px; font-weight:600; white-space:nowrap;
}
.plist-action .hi { width:14px; height:14px; transition:transform .15s; }
.home-history .plist-item:hover .plist-action .hi { transform:translateX(3px); }
.home-history .pact { position:absolute; top:10px; }
.home-history .pact[title="重命名"] { right:44px; }
.home-history .pact.danger { right:10px; }
.folder-chip { background:var(--acc-weak); border:1px solid #dcdcff; border-radius:12px; padding:12px 16px; text-align:center; }
.folder-chip b { font-size:15px; }
.folder-chip .muted { font-size:13px; margin-top:4px; }
.ui-select { position:relative; width:100%; }
.ui-select-trigger {
  width:100%; height:44px; display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:0 14px; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink);
  font:15px/1.4 inherit; cursor:pointer; text-align:left;
}
.ui-select-trigger:hover { border-color:var(--acc); }
.ui-select.open .ui-select-trigger { border-color:var(--acc); box-shadow:0 0 0 3px rgba(107,108,255,.12); }
.ui-select-value { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ui-select-caret {
  width:0; height:0; flex:none; border-left:5px solid transparent; border-right:5px solid transparent;
  border-top:6px solid #9aa0ab; transition:transform .15s;
}
.ui-select.open .ui-select-caret { transform:rotate(180deg); border-top-color:var(--acc); }
.ui-select-menu {
  display:none; position:absolute; z-index:40; left:0; right:0; top:calc(100% + 6px);
  max-height:280px; overflow:auto; padding:6px; background:#fff; border:1px solid var(--line);
  border-radius:12px; box-shadow:0 10px 28px rgba(31,35,41,.12);
}
.ui-select.open .ui-select-menu { display:block; }
.ui-select-group {
  padding:8px 10px 4px; font-size:12px; color:var(--muted); font-weight:650; letter-spacing:.04em;
}
.ui-select-option {
  width:100%; display:block; border:0; background:transparent; text-align:left; cursor:pointer;
  padding:10px 12px; border-radius:8px; color:var(--ink); font:15px/1.4 inherit;
}
.ui-select-option:hover { background:var(--acc-weak); color:var(--acc); }
.ui-select-option.on { background:var(--acc-weak); color:var(--acc); font-weight:650; }
.ui-select-option:disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:1100px) {
  .home-layout { grid-template-columns:minmax(0,1fr) 340px; }
  .home-hero-grid { grid-template-columns:1fr; align-items:start; }
}
@media (max-width:960px) {
  .home-layout { grid-template-columns:1fr; }
  .home-side { position:static; max-height:none; }
  .home-fields { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .home-hero { padding:14px 14px; }
}
@media (max-width:560px) {
  .home-fields { grid-template-columns:1fr; }
  .home-summary { grid-template-columns:1fr; gap:10px; }
  .home-title { font-size:22px; }
  .home-slogan { font-size:14px; }
  .home-card-head, .home-card-block { padding-left:18px; padding-right:18px; }
}
.tabs2 { display:flex; margin-bottom:20px; }
.tab2 { flex:1; text-align:center; padding:12px; cursor:pointer; background:#eef0f5; color:var(--muted); border-radius:12px 12px 0 0; }
.tab2.on { background:#fff; color:var(--ink); font-weight:500; }
.drop { border:1.5px dashed #c9cdd6; border-radius:14px; min-height:200px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; }
.opts { display:flex; gap:12px; margin-top:18px; flex-wrap:wrap; }
.notes { color:#b0b4bd; font-size:13px; margin:20px 4px; }
.center { text-align:center; }
.foot { text-align:center; color:#b0b4bd; font-size:13px; margin-top:24px; }
.plist-item { border:1px solid var(--line); border-radius:14px; background:#fff; padding:14px 18px; margin-bottom:10px; cursor:pointer; display:flex; gap:10px; align-items:center; }
.plist-item > div:first-child { flex:1; min-width:0; }
.plist-item:hover { border-color:var(--acc); }
.pact { width:30px; height:30px; display:none; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:9px; font-size:14px; color:var(--muted); background:#fff; }
.plist-item:hover .pact { display:inline-flex; }
.pact:hover { border-color:var(--acc); color:var(--acc); }
.pact.danger:hover { border-color:var(--err); color:var(--err); }
.pill { padding:3px 12px; border-radius:99px; font-size:12.5px; background:#eef0f5; color:var(--muted); }
.pill.on { background:#eaf7f0; color:var(--ok); }
.pill.warn { background:#fff7ed; color:#b45309; }
.pill.err { background:#fef2f2; color:var(--err); }

/* ===== 细化组件 ===== */
.mradio { font-size:12.5px; border:1px solid var(--line); border-radius:99px; padding:2px 12px; color:var(--muted); cursor:pointer; }
.mradio.on { border-color:var(--acc); color:var(--acc); background:var(--acc-weak); }
.refchips { display:flex; gap:9px; align-items:center; padding-bottom:10px; margin-bottom:2px; flex-wrap:wrap; }
.refchip { width:70px; height:70px; border-radius:10px; background:linear-gradient(160deg,#e6e6fa,#efe2f7); display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:16px; cursor:pointer; position:relative; overflow:hidden; border:2px solid transparent; transition:box-shadow .15s, transform .1s; }
.refchip.bound { border-color:var(--rc); }
.refchip.bound:hover { transform:translateY(-1px); box-shadow:0 3px 12px color-mix(in srgb, var(--rc) 34%, transparent); }
.refchip.audio { background:linear-gradient(160deg,#d7f0f5,#e5f6fa); }
.refchip.local-asset { border-style:dashed; }
.refchip.local-asset .kind { background:var(--warn); }
.refchip img { width:100%; height:100%; object-fit:cover; display:block; }
.refchip .num { position:absolute; left:4px; top:4px; min-width:17px; height:17px; padding:0 4px; font-size:11px; font-weight:700; color:#fff; background:var(--rc); border-radius:5px; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.refchip .cap { position:absolute; left:0; right:0; bottom:0; font-size:9.5px; color:#fff; background:rgba(31,35,41,.72); padding:1px 4px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.refchip .kind { position:absolute; right:4px; top:4px; font-size:9px; color:#fff; background:rgba(31,35,41,.55); border-radius:4px; padding:0 4px; }
.refchip.hl { box-shadow:0 0 0 3px color-mix(in srgb, var(--rc) 55%, transparent); transform:translateY(-1px); }
.refchip.flash { animation:refflash .9s ease; }
@keyframes refflash { 0%,100% { box-shadow:0 0 0 0 transparent; } 20% { box-shadow:0 0 0 4px var(--rc); } 60% { box-shadow:0 0 0 3px color-mix(in srgb, var(--rc) 40%, transparent); } }
.refchip.add { width:34px; background:#fff; border:1.5px dashed #c9cdd6; color:var(--muted); font-size:18px; align-self:stretch; }
.car-arrow { position:absolute; top:50%; transform:translateY(-50%); width:34px; height:34px; border-radius:50%; background:rgba(255,255,255,.9); display:flex; align-items:center; justify-content:center; font-size:20px; cursor:pointer; box-shadow:0 2px 10px rgba(31,35,41,.15); }
.hist { display:flex; gap:6px; margin-top:8px; justify-content:center; align-items:center; }
.histth { width:48px; height:30px; border-radius:6px; background:#eceef4; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--muted); cursor:pointer; }
.histth.has { background:#eaf7f0; }
.histth.add { width:auto; padding:0 10px; background:#fff; border:1px dashed #c9cdd6; }
.clip-subshots { border:1px solid var(--line); border-radius:10px; background:#fff; padding:12px; margin-top:2px; }
.clip-subshots-list { display:flex; flex-direction:column; gap:6px; }
.clip-subshot { display:grid; grid-template-columns:52px minmax(210px,1fr) 100px 74px; gap:10px; align-items:center; min-height:36px; padding:6px 9px; border:1px solid transparent; border-radius:8px; color:var(--muted); font-size:12px; }
.clip-subshot:hover { background:#fafbfe; border-color:var(--line); }
.clip-subshot.on { background:var(--acc-weak); border-color:#dfe3ff; color:var(--ink); }
.clip-subshot.head { color:var(--ink); }
.clip-subshot-no { font-weight:600; }
.clip-subshot-time { font-size:11px; color:var(--muted); }
.clip-subshot-role { font-size:11px; }
.clip-subshot.head .clip-subshot-role { color:var(--ok); }
.clip-subshot.merged .clip-subshot-role { color:var(--muted); }
.clip-subshot-action { justify-self:end; color:var(--acc); font-size:11px; cursor:pointer; white-space:nowrap; }
.clip-subshot-action:hover { text-decoration:underline; }
.clip-subshot-label { justify-self:end; color:var(--muted); font-size:11px; white-space:nowrap; }
.voice-btn.bound { border-color:var(--acc); color:var(--acc); background:var(--acc-weak); }
.cmp .preview { min-height:0; }
.shot-strip { display:flex; gap:14px; align-items:flex-start; overflow-x:auto; padding:14px 2px 4px; }
.shot-strip > .muted { flex:none; align-self:center; margin-right:4px; }
.shot-tile { width:130px; flex:none; cursor:pointer; color:var(--muted); text-align:center; }
.shot-tile .tile-preview { height:76px; border:2px solid transparent; border-radius:8px; background:#f0f2f7; display:flex; align-items:center; justify-content:center; overflow:hidden; margin-bottom:5px; }
.shot-tile .tile-preview img { width:100%; height:100%; object-fit:cover; }
.shot-tile.on .tile-preview { border-color:var(--acc); }
.shot-tile.on b { color:var(--acc); }
.shot-tile b { display:block; font-size:12px; color:var(--ink); }
.shot-tile small { font-size:10.5px; }
@media (max-width:1400px){
  .asset-preview, .shot-asset-rail { position:static; }
  .shot-asset-rail { width:220px; }
  .shot-cols { grid-template-columns:minmax(250px,300px) minmax(420px,1fr); }
  .shot-preview-col { grid-column:1 / -1; }
  .shot-preview-col .preview { max-width:760px; margin:0 auto; width:100%; }
}
@media (max-width:1100px){
  .script-workbench, .setup-workbench { grid-template-columns:1fr; }
  .script-workbench-3 { grid-template-columns:minmax(200px,240px) minmax(0,1fr); }
  .script-workbench-3 .story-panel { grid-column:1 / -1; max-height:none; position:static; }
  .acard.acard-role { grid-template-columns:1fr; }
  .acard.acard-role .views { min-height:280px; }
  .acard.acard-role .body { border-left:0; border-top:1px solid var(--line); }
  .shot-cols { grid-template-columns:1fr; }
  .shot-preview-col { grid-column:auto; }
}
@media (max-width:900px){
  .script-workbench-3 { grid-template-columns:1fr; }
}
@media (max-width:900px){
  .wrap { padding:14px; }
  .topbar { flex-wrap:wrap; }
  .stepper { overflow-x:auto; justify-content:flex-start; padding-bottom:4px; }
  .shot-workbench { flex-direction:column; }
  .shot-asset-rail { width:auto; }
  .cmp { grid-template-columns:1fr; }
  .asset-compare { grid-template-columns:1fr; }
  .clip-nav { grid-template-columns:1fr; }
  .clip-subshot { grid-template-columns:46px minmax(150px,1fr) 84px; }
  .clip-subshot-action { grid-column:3; }
}
.analysis-missing{margin-top:6px;padding:8px 10px;border:1px solid #ffd2d2;border-radius:8px;background:#fff5f5;color:#cf3d3d;font-size:12.5px}
.btn.warn{border-color:#f5c274;background:#fff7e8;color:#9a5b00}
.btn.danger{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.director-plan-shot.rejected{opacity:.72}
.director-plan-shot.rejected p{font-style:italic}
.btn.danger:hover{border-color:var(--err);color:var(--err)}
.review-panel{margin:14px 0;border:1px solid #ffd3a8;background:#fffaf4;padding:16px}
.review-row{display:grid;grid-template-columns:minmax(260px,1fr) 220px 130px auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid #f2dfca}
.review-row:first-of-type{border-top:0}
.review-row select{height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 9px}
.review-line{margin:5px 0;color:var(--text)}
.review-row small{color:var(--muted)}
.review-card{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr) minmax(180px,240px);gap:14px;align-items:start;padding:14px 0;border-top:1px solid #f2dfca}
.review-card:first-of-type{border-top:0}
.review-card-identity{grid-template-columns:minmax(0,1fr) minmax(180px,240px)}
.review-thumbs{display:grid;grid-template-columns:1fr 1fr;gap:6px;min-height:88px}
.review-thumbs.empty{display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #e7d3ba;border-radius:10px;background:#fff;color:var(--muted);font-size:12px;text-align:center}
.review-thumb{display:block;border-radius:10px;overflow:hidden;border:1px solid #ead7c2;background:#111;aspect-ratio:16/10}
.review-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.review-inline-player{border:1px solid #ead7c2;border-radius:12px;overflow:hidden;background:#0f1117}
.review-inline-video{display:block;width:100%;aspect-ratio:16/10;max-height:220px;background:#000;object-fit:contain}
.review-inline-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#fffaf4;border-top:1px solid #f2dfca;color:#6b7280;font-size:12px}
.review-inline-bar .btn{width:auto;padding:5px 10px;font-size:12.5px}
.review-inline-player.playing{box-shadow:0 0 0 2px rgba(107,108,255,.28)}
.review-card-main{min-width:0}
.review-card-main b{font-size:14px}
.review-card-main small{display:block;color:var(--muted);margin-top:4px}
.review-reason{margin-top:6px;color:#8a5a2b;font-size:12.5px}
.review-timing{margin-top:6px;color:var(--muted);font-size:12px}
.review-evidence{margin:8px 0 0;padding-left:18px;color:#4b5168;font-size:12.5px;line-height:1.55}
.review-evidence.empty{list-style:none;padding-left:0;color:var(--muted)}
.review-evidence-label{margin-top:8px;font-size:12px;font-weight:700;color:#5b6b88}
.review-card-actions{display:flex;flex-direction:column;gap:8px}
.review-card-actions select{height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 9px;width:100%}
.review-card-actions .btn{width:100%;justify-content:center}
.review-role-chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.review-role-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #ead7c2;border-radius:10px;background:#fff;padding:6px 10px 6px 6px;cursor:pointer;text-align:left;transition:border-color .12s,box-shadow .12s}
.review-role-chip:hover{border-color:var(--acc)}
.review-role-chip.on{border-color:var(--acc);box-shadow:0 0 0 2px var(--acc-weak);background:#f7f6ff}
.review-role-chip-img{width:36px;height:36px;border-radius:8px;overflow:hidden;background:#f3f4f8;display:inline-flex;align-items:center;justify-content:center;flex:none}
.review-role-chip-img img{width:100%;height:100%;object-fit:cover}
.review-role-chip b{display:block;font-size:12.5px;line-height:1.2}
.review-role-chip small{display:block;color:var(--muted);font-size:11px}
.review-range-player{margin:0 0 14px;border:1px solid #ead7c2;border-radius:12px;overflow:hidden;background:#fff}
.review-range-head{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#fff7ed}
.review-range-head>div{flex:1;min-width:0}
.review-range-head b{display:block;font-size:13.5px}
.review-range-head small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.review-range-player video{display:block;width:100%;max-height:360px;background:#000}
.review-range-quote{padding:10px 12px;color:#4b5168;font-size:13px;border-top:1px solid #f2dfca}
.review-mode-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:14px 0;padding:16px 18px;border:1px solid #cfe2ff;border-radius:14px;background:linear-gradient(135deg,#f5f8ff,#fbfcff)}
.review-mode-card.blocked{border-color:#fecaca;background:#fff7f7}.review-mode-main{display:flex;align-items:flex-start;gap:13px;min-width:0}.review-mode-main h3{margin:0 0 5px;font-size:15px}.review-mode-main>div>div{color:var(--muted);font-size:12.5px;line-height:1.5}.review-mode-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex:none;border-radius:11px;background:#e7edff;color:var(--acc);font-size:12px;font-weight:800}.review-mode-card.blocked .review-mode-icon{background:#fee2e2;color:var(--err)}.review-mode-stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.review-mode-stats span{padding:3px 8px;border-radius:99px;background:rgba(255,255,255,.8);border:1px solid #dce4f3;color:#596274!important;font-size:11px!important}
.review-mode-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none}.safe-batch-btn{display:inline-flex;align-items:center;gap:7px}.batch-safety-count{padding:2px 7px;border:1px solid #dfe3ee;border-radius:999px;background:#f7f8fb;color:var(--muted);font-size:10.5px;font-weight:600;white-space:nowrap}.safe-batch-btn:not(:disabled) .batch-safety-count{border-color:#cdd7ff;background:#f2f5ff;color:var(--acc)}
.prepare-history-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0;padding:10px 13px;border:1px solid #e2e6ef;border-radius:11px;background:#fafbfc;color:#596274}.prepare-history-toggle>div{display:flex;align-items:center;gap:10px;min-width:0}.prepare-history-toggle b{font-size:12.5px;color:#333a49}.prepare-history-toggle span{font-size:11.5px;color:var(--muted)}.prepare-history-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:12px 0;padding:16px 18px;border:1px solid #cfe0d5;border-radius:14px;background:linear-gradient(135deg,#f1faf4,#fbfffc)}.prepare-history-card.is-waiting{border-color:#e8d7a8;background:linear-gradient(135deg,#fff9eb,#fffdf7)}.prepare-history-main{display:flex;align-items:flex-start;gap:13px;min-width:0}.prepare-history-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex:none;border-radius:50%;background:#d9f0e0;color:#34704a;font-size:16px;font-weight:800}.prepare-history-card.is-waiting .prepare-history-icon{background:#f5e6b8;color:#8a6a14}.prepare-history-main h3{margin:0 0 6px;font-size:15px;color:#1f3d2d}.prepare-history-card.is-waiting .prepare-history-main h3{color:#5c4a16}.prepare-history-main p{margin:0;color:#4b6354;font-size:12.5px;line-height:1.55}.prepare-history-card.is-waiting .prepare-history-main p{color:#6b5a2e}.prepare-history-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:none}.director-user-summary{margin:8px 0 10px;padding:12px 14px;border:1px solid #e3ebe6;border-radius:10px;background:#fff}.director-user-summary p{margin:0 0 8px;font-size:12.5px;line-height:1.55;color:#3f4a44}.director-user-summary p:last-child{margin-bottom:0}.director-user-summary ul{margin:6px 0 0 18px;padding:0;color:#596274;font-size:12px}.director-adopted-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none}.storyboard-review-row.auto-adopted{align-items:flex-start;background:#fbfcff}.review-advisory-badge{flex:none;padding:4px 9px;border:1px solid #cfe0d5;border-radius:999px;background:#f1faf4;color:#34704a;font-size:11px;font-weight:700}.director-history{margin-top:9px}.director-history>summary{cursor:pointer;color:var(--acc);font-size:12px;font-weight:700}.director-errors,.director-plan{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding:10px 12px;border-radius:9px;background:#f7f8fb}.director-errors>b,.director-plan>b{font-size:12px}.director-errors span{font-size:11.5px;color:#6b7280}.director-errors span:before{content:'•';margin-right:6px}.director-plan-shot{padding:9px 0;border-top:1px solid #e3e7ef}.director-plan-shot:first-of-type{border-top:0}.director-plan-shot>div{display:flex;align-items:center;gap:10px}.director-plan-shot strong{font-size:12px}.director-plan-shot>div span,.director-plan-shot small{font-size:11px;color:var(--muted)}.director-plan-shot p{margin:5px 0;font-size:12px;line-height:1.55;color:#454b58}
.critic-review-row{display:block}.critic-review-head{display:flex;align-items:flex-start;gap:16px}.critic-review-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.critic-decision-editor{margin-top:14px;padding:14px;border:1px solid #f3c98f;border-radius:12px;background:#fff}.critic-decision-title,.critic-decision-footer,.critic-scene-decision{display:flex;align-items:center;justify-content:space-between;gap:14px}.critic-decision-title>div,.critic-scene-decision>div{display:flex;flex-direction:column;gap:3px}.critic-decision-title span,.critic-decision-footer>span,.critic-scene-decision span{font-size:11.5px;color:var(--muted)}.critic-decision-required{padding:3px 8px;border:1px solid #d6dfec;border-radius:999px;background:#f7f9fc;color:#526071!important;font-weight:700}.critic-source-evidence{display:grid;grid-template-columns:minmax(320px,520px) minmax(260px,1fr);gap:14px;margin:12px 0;padding:12px;border:1px solid #e1e6ef;border-radius:11px;background:#f8fafc}.critic-source-player{position:relative;overflow:hidden;border-radius:9px;background:#111}.critic-source-player video{display:block;width:100%;aspect-ratio:16/9;max-height:300px;background:#000}.critic-source-player>span{position:absolute;left:8px;bottom:8px;padding:4px 8px;border-radius:6px;background:rgba(0,0,0,.68);color:#fff;font-size:10.5px;pointer-events:none}.critic-source-guide{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px}.critic-source-guide p{margin:0;max-width:560px;color:#596274;font-size:12px;line-height:1.6}.critic-source-guide small{color:var(--muted)}.critic-source-unavailable{grid-column:1/-1;display:flex;flex-direction:column;gap:5px;padding:14px;color:#8a4b0f;background:#fff7ed;border-radius:8px}.critic-source-unavailable span{font-size:12px}.critic-decision-row{display:grid;grid-template-columns:minmax(240px,1.25fr) minmax(150px,.7fr) minmax(140px,.6fr) minmax(240px,1fr);gap:10px;align-items:start;padding:12px 6px;border-top:1px solid #eceff4;transition:background .15s,border-color .15s}.critic-decision-row.source-playing{margin:0 -6px;padding-left:12px;padding-right:12px;border-color:#c7d2fe;border-radius:9px;background:#f3f5ff}.critic-decision-row.will-dismiss{margin:0 -6px;padding-left:12px;padding-right:12px;border-color:#fecaca;border-radius:9px;background:#fff7f7}.critic-decision-row label{display:flex;flex-direction:column;gap:5px}.critic-decision-row label>span,.critic-dialogue-copy>div>span,.critic-dialogue-target>span{font-size:10.5px;color:var(--muted);font-weight:700}.critic-dialogue-copy>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.critic-dialogue-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px}.critic-dialogue-actions>button{flex:none;padding:2px 7px;border:1px solid #d8def0;border-radius:999px;background:#f5f7ff;color:var(--acc);font-size:10.5px;cursor:pointer}.critic-dialogue-actions>button:hover{border-color:#aebcff;background:#eef1ff}.critic-dialogue-actions>.critic-delete-button{border-color:#fecaca;background:#fff7f7;color:#b42318}.critic-decision-row.will-dismiss .critic-delete-button{border-color:#c7d2fe;background:#f3f5ff;color:var(--acc)}.critic-decision-row select,.critic-scene-decision select{width:100%;height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 9px}.critic-decision-row textarea{width:100%;min-height:58px;resize:vertical;border:1px solid var(--line);border-radius:9px;background:#fff;padding:8px 9px;font:inherit;line-height:1.45}.critic-decision-row.will-dismiss textarea{color:#9ca3af;text-decoration:line-through}.critic-source-text{margin:6px 0}.critic-dialogue-copy p,.critic-dialogue-target p{margin:5px 0;font-size:12.5px;line-height:1.5}.critic-dialogue-copy small,.critic-dialogue-text small{display:block;color:#65728a}.critic-exclusion-note{display:none;margin-top:7px;padding:7px 9px;border:1px solid #fecaca;border-radius:7px;background:#fff;color:#991b1b;font-size:11px;line-height:1.5}.critic-decision-row.will-dismiss .critic-exclusion-note{display:block}.critic-scene-decision{padding:12px 0;border-top:1px solid #eceff4}.critic-scene-decision select{max-width:360px}.critic-decision-footer{padding-top:12px;border-top:1px solid #eceff4}
@media(max-width:900px){.review-row{grid-template-columns:1fr}.review-row select{width:100%}.review-card{grid-template-columns:1fr}.review-card-actions{flex-direction:row;flex-wrap:wrap}.review-card-actions .btn,.review-card-actions select{width:auto;flex:1}}
@media(max-width:1100px){.critic-source-evidence{grid-template-columns:1fr}.critic-source-player{max-width:620px}.critic-decision-row{grid-template-columns:1fr 1fr}.critic-dialogue-copy,.critic-dialogue-text,.critic-dialogue-target{grid-column:1/-1}}
@media(max-width:700px){.review-mode-card,.critic-review-head,.critic-decision-footer,.critic-scene-decision{align-items:flex-start;flex-direction:column}.review-mode-actions,.critic-review-actions{width:100%;flex-wrap:wrap}.review-mode-actions>.btn{flex:1}.critic-review-actions>*{flex:1}.critic-decision-row{grid-template-columns:1fr}.critic-dialogue-copy,.critic-dialogue-text,.critic-dialogue-target{grid-column:auto}.critic-scene-decision select{max-width:none}.safe-batch-btn{gap:4px}.batch-safety-count{font-size:10px;padding:2px 5px}}

.rh-account{position:relative;display:inline-block}
.rh-account .rh-menu{position:absolute;right:0;top:110%;z-index:40;background:#1b1f24;border:1px solid #333;border-radius:10px;padding:6px;min-width:140px;display:flex;flex-direction:column;gap:4px}
.rh-account .rh-menu[hidden]{display:none!important}
.rh-account .rh-menu button{background:transparent;border:0;color:#eee;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer}
.rh-account .rh-menu button:hover{background:#2a3038}
.rh-account .rh-menu button.danger{color:#ff8f8f}
.mention-fix{margin-top:8px;padding:8px 10px;border:1px dashed #d9c9ef;border-radius:9px;background:#fbf9ff}
.mention-fix>small{display:block;margin-bottom:6px;color:#5b4a7a}
/* ===== 统一待办抽屉 ===== */
.todo-badge{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 14px;cursor:pointer;font-size:13px;font-weight:700;color:var(--ink)}
.todo-badge:hover{border-color:var(--acc)}
.todo-badge .dot{width:8px;height:8px;border-radius:50%;background:var(--err)}
.todo-badge.only-advisory .dot{background:#9a5b00}
.todo-badge.system-busy{color:#5750c9;border-color:#d9d7ff;background:#f5f4ff}
.todo-badge.all-done{color:#34704a;border-color:#cfe0d5;background:#f1faf4}
.todo-drawer{position:fixed;top:0;right:0;bottom:0;width:436px;max-width:94vw;background:#fff;border-left:1px solid var(--line);box-shadow:-14px 0 34px rgba(31,36,48,.12);transform:translateX(105%);transition:transform .28s ease;display:flex;flex-direction:column;z-index:60}
.todo-drawer.open{transform:translateX(0)}
@media (prefers-reduced-motion: reduce){.todo-drawer{transition:none}}
.todo-head{padding:16px 18px 12px;border-bottom:1px solid var(--line)}
.todo-close{float:right;border:none;background:none;font-size:16px;cursor:pointer;color:var(--muted)}
.todo-head h2{margin:0 0 4px;font-size:15px}
.todo-autoline{font-size:12.5px;color:var(--muted)}
.todo-body{flex:1;overflow-y:auto;padding:12px 14px 20px}
.todo-group{display:flex;align-items:center;gap:8px;margin:10px 2px 8px;font-size:12px;font-weight:800}
.todo-group .pill{font-size:11px;border-radius:999px;padding:2px 9px}
.todo-group.blocking{color:#b91c1c}.todo-group.blocking .pill{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c}
.todo-group.advisory{color:#9a5b00}.todo-group.advisory .pill{background:#fff7e8;border:1px solid #f5dea8;color:#9a5b00}
.todo-empty-ok{border:1px dashed #cfe0d5;background:#f1faf4;color:#34704a;border-radius:12px;padding:12px;font-size:12.5px;margin-bottom:10px}
.todo-system-note{border:1px solid #d9d7ff;background:#f5f4ff;color:#5750c9;border-radius:12px;padding:11px 12px;font-size:12.5px;line-height:1.55;margin-bottom:10px}
.todo-item{border:1px solid var(--line);border-radius:12px;padding:12px 13px;margin-bottom:10px;background:#fff}
.todo-item.blocking{border-left:3px solid #b91c1c}
.todo-item.advisory{border-left:3px solid #9a5b00}
.todo-q{font-weight:700;font-size:13.5px;margin-bottom:6px}
.todo-ctx{font-size:12px;color:var(--muted);margin-bottom:8px}
.todo-evidence{margin-bottom:9px}
.todo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.todo-strip{display:flex;gap:5px;margin:6px 0}
.todo-cell{flex:1;border-radius:6px;overflow:hidden;background:#0f1117;max-width:88px}
.todo-cell img{display:block;width:100%;height:52px;object-fit:cover}
.todo-compare{display:none;margin-top:9px;border-top:1px dashed var(--line);padding-top:8px;font-size:12px;color:var(--muted)}
.todo-compare.show{display:block}
.todo-compare b{display:block;color:var(--ink);font-size:12px;margin-bottom:4px}
