/* 岚序 Studio 设计系统
   令牌 · 基础元素 · 布局 · 组件 · 页面
   颜色以 indigo 为主色、cyan 为强调，深色侧栏 + 浅色内容区。 */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6e9f0;
  --line-2: #eef1f7;
  --bg: #f5f6fb;
  --panel: #ffffff;
  --brand: #5b5bf5;
  --brand-ink: #4340d6;
  --brand-soft: #eef0ff;
  --cyan: #22d3ee;
  --ok: #0f9d58;
  --ok-soft: #e9f8f0;
  --warn: #b45309;
  --warn-soft: #fff6e6;
  --err: #d92d20;
  --err-soft: #fdeceb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, 0.35);
  --sidebar: 232px;
  /* 语义化表面令牌：深色主题只需覆盖这些，不用动组件规则 */
  --chip: #f1f5f9;
  --thumb: #eef1f7;
  --panel-2: #fbfcfe;
  --hover: #fafbff;
  --ghost-line: #cbd5e1;
  --bg-fade: rgba(245, 246, 251, .6);
}

/* 深色主题：只换令牌 */
[data-theme="dark"] .side { background: radial-gradient(120% 80% at 0% 0%, #141c3a 0%, #0a0f1e 55%, #070b15 100%); }
[data-theme="dark"] .auth-art { background: radial-gradient(90% 70% at 10% 0%, #1a2450 0%, #0a0f22 55%, #05070f 100%); }
[data-theme="dark"] .btn.ghost { color: var(--ink-2); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }

/* ---------- 基础元素 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 600; white-space: nowrap;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ghost-line); background: var(--panel-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn.danger { background: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; }
.link.muted { color: var(--muted); font-weight: 500; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--ghost-line); }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px;
  padding: 9px 12px; outline: none; transition: border .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: #b9b8fb; box-shadow: 0 0 0 4px rgba(91, 91, 245, .1); }
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

/* ---------- 卡片 / 表格 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.tight { padding: 14px; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; flex: 1 1 auto; min-width: 96px; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }
.empty .big { font-size: 28px; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: none; white-space: nowrap; }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: 0; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--muted); }
.tag.queued { background: var(--warn-soft); color: var(--warn); }
.tag.running { background: var(--brand-soft); color: var(--brand-ink); }
.tag.succeeded { background: var(--ok-soft); color: var(--ok); }
.tag.failed { background: var(--err-soft); color: var(--err); }
.tag.canceled { background: var(--chip); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; font-size: 13px; }
.chip.plain { background: var(--chip); color: var(--ink-2); }

/* ---------- 布局 ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 18px 14px;
  background: radial-gradient(120% 80% at 0% 0%, #1b2550 0%, #0e1428 55%, #0b1020 100%);
  color: #cbd5e1; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #22d3ee, #5b5bf5); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px -8px rgba(91, 91, 245, .9);
}
.brand b { display: block; color: #fff; font-size: 15px; letter-spacing: .2px; }
.brand span { display: block; font-size: 12px; color: #7c89a8; }
.nav-group { margin-top: 10px; }
.nav-group-title { font-size: 11px; letter-spacing: .12em; color: #5b6884; padding: 8px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: #b6c2d9; font-weight: 550; cursor: pointer; user-select: none; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.on { background: linear-gradient(100deg, rgba(91, 91, 245, .95), rgba(34, 211, 238, .55)); color: #fff; box-shadow: 0 10px 24px -14px rgba(91, 91, 245, 1); }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.side-foot { margin-top: auto; font-size: 12px; color: #5b6884; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.06); }

.main { padding: 0 28px 40px; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 14px 0 12px; background: linear-gradient(180deg, var(--bg) 65%, var(--bg-fade)); backdrop-filter: blur(6px);
}
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumb b { color: var(--ink); font-weight: 650; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px;
  background: linear-gradient(135deg, #5b5bf5, #22d3ee);
}
.bell { position: relative; }
.bell .dot {
  position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--err); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.page-head { display: flex; align-items: flex-end; gap: 14px; margin: 6px 0 18px; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 1280px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 1100px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } }

/* ---------- 统计卡 / 图表 ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.stat .trend { font-size: 12px; color: var(--ok); }
.chart { width: 100%; height: 150px; }
.chart .bar { fill: url(#barGrad); }

/* 任务进度条（SSE 推送的分趟渲染进度） */
.pbar {
  height: 8px;
  border-radius: 999px;
  background: #eef1fb;
  overflow: hidden;
}

/* 禁用态：不可点的按钮必须一眼看出来，不能只是不响应 */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover, .btn[disabled]:hover { filter: none; }

/* 镜头包：结构化展示，JSON 折叠在最后，避免一屏裸 JSON */
.pack-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 12px; color: var(--ink-2); }
.pack-meta b { color: var(--brand-ink); }
.pack-sec { margin-top: 14px; }
.pack-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.pack-prompt { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 13px; line-height: 1.7; }
.pack-row { display: flex; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.pack-row:last-child { border-bottom: 0; }
.pack-k { flex: none; width: 52px; color: var(--muted); font-size: 12px; }
.pack-ent { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.pack-ent b { margin-right: 8px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; }
details[open] > summary::before { content: "▾"; }

/* 结构化拆分预览：表格在固定高度里滚动，表头吸顶，避免行被硬切。 */
.split-table { max-height: 336px; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.split-table table { margin: 0; }
.split-table thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.split-table th, .split-table td { padding-left: 12px; padding-right: 12px; }
.split-table tbody tr:last-child td { border-bottom: 0; }

.compose-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.chk input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.chk input:disabled + *,
.chk input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pack-json {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.65;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.pbar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b5bf5, #22d3ee);
  transition: width 0.35s ease;
}
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { font-size: 11px; fill: var(--muted-2); }

/* ---------- 项目页 ---------- */
.project-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.project-cover {
  height: 116px; border-radius: 10px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #1e293b, #334155); display: grid; place-items: center; color: #94a3b8; font-size: 12px;
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-cover .badge { position: absolute; top: 8px; left: 8px; }
.meta-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

/* ---------- 创作页 ---------- */
.workspace { display: grid; grid-template-columns: 252px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1380px) { .workspace { grid-template-columns: 210px minmax(0,1fr) 268px; } }
@media (max-width: 1180px) { .workspace { grid-template-columns: 1fr; } }
.script-item { padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.script-item:hover { background: var(--panel-2); }
.script-item.on { background: var(--brand-soft); border-color: #d9d8ff; }
.script-item b { font-size: 14px; }
.shot-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding-right: 4px; }
.shot-item { display: flex; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line-2); cursor: pointer; background: var(--panel); }
.shot-item:hover { border-color: #d9d8ff; }
.shot-item.on { border-color: #b9b8fb; box-shadow: 0 0 0 3px rgba(91,91,245,.08); }
.shot-thumb { width: 62px; height: 44px; border-radius: 7px; background: var(--thumb); overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; color: #a3aec2; font-size: 10px; }
.shot-thumb img, .shot-thumb video { width: 100%; height: 100%; object-fit: cover; }
.shot-item .t { min-width: 0; }
.shot-item .t b { font-size: 12px; display: block; }
.shot-item .t span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.picker { display: grid; gap: 8px; }
.model-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--panel);
}
.model-opt:hover { border-color: #c7c6fb; }
.model-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,245,.1); }
.model-opt.off { opacity: .5; cursor: not-allowed; }
.model-opt .n { font-weight: 600; font-size: 13px; }
.model-opt .p { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }

.preview-box { border: 1px dashed #d5dbe7; border-radius: 12px; background: #fbfcff; min-height: 190px; display: grid; place-items: center; overflow: hidden; }
.preview-box img, .preview-box video { max-width: 100%; max-height: 320px; display: block; }

/* ---------- 素材库 ---------- */
.asset-card { padding: 0; overflow: hidden; cursor: pointer; }
.asset-card .thumb { position: relative; height: 156px; background: var(--thumb); overflow: hidden; }
.asset-card .thumb img, .asset-card .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-card .info { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- 模态 / 抽屉 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { width: min(560px, 100%); background: var(--panel); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto; }
.modal.wide { width: min(880px, 100%); }
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 96vw); background: var(--panel); z-index: 61;
  box-shadow: var(--shadow-lg); padding: 22px; overflow: auto; animation: slideIn .18s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- 套餐 ---------- */
.plan { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.plan.hot { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,245,.09); }
.plan .badge { position: absolute; top: -10px; right: 14px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .price { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan ul { margin: 4px 0 6px; padding-left: 16px; color: var(--muted); font-size: 12px; }
.plan li { margin: 3px 0; }
.plan .btn { margin-top: auto; }

/* ---------- 登录 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
.auth-art {
  position: relative; overflow: hidden; color: #e8ecff; padding: 56px 60px;
  background: radial-gradient(90% 70% at 10% 0%, #23306b 0%, #0e1430 55%, #080b18 100%);
}
.auth-art::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 62%);
  filter: blur(10px);
}
.auth-art .logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 64px; }
.auth-art h1 { font-size: 40px; line-height: 1.24; color: #fff; letter-spacing: -0.02em; }
.auth-art .lead { color: #9fb0d6; font-size: 15px; margin-top: 16px; max-width: 460px; }
.feature-list { margin-top: 44px; display: grid; gap: 16px; max-width: 470px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .dot { width: 30px; height: 30px; border-radius: 9px; background: rgba(91,91,245,.28); display: grid; place-items: center; flex: 0 0 auto; }
.feature b { color: #fff; font-size: 14px; }
.feature span { color: #93a3c8; font-size: 12px; display: block; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card .brand-mobile { display: none; }
@media (max-width: 960px) { .auth-card .brand-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; } }

/* ---------- 通知 / 提示 ---------- */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px;
  padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: 360px; animation: toastIn .18s ease;
}
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.dropdown { position: absolute; top: 44px; right: 0; width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.dropdown .head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 650; font-size: 13px; }
.notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.notif.unread { background: var(--brand-soft); }
.notif:last-child { border-bottom: 0; }

/* ---------- 骨架屏 ---------- */
.skeleton { background: linear-gradient(90deg, var(--thumb) 25%, var(--panel-2) 37%, var(--thumb) 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-line { height: 12px; margin-bottom: 8px; }
.sk-card { height: 120px; }

/* ---- 启动占位 ---- */
.boot { min-height: 100vh; display: grid; place-items: center; gap: 10px; color: var(--muted); }
.boot-logo {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--cyan)); color: #fff;
  font-weight: 800; font-size: 22px; margin: 0 auto 12px;
}
.boot-tip { font-size: 13px; }

/* ---- 顶栏下拉锚点 ---- */
.notif-panel, .user-panel { position: relative; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.err { background: var(--err-soft); color: var(--err); }
/* ---- 导航图标对齐 ---- */
.nav-item .ico { width: 20px; height: 20px; display: inline-grid; place-items: center; }
.ni { flex: none; opacity: .92; }
.nav-item.on .ni { opacity: 1; }

/* ---------- 移动端适配 ---------- */
.burger { display: none; }
.auth-theme { position: fixed; top: 18px; right: 18px; z-index: 5; }
.side-mask { position: fixed; inset: 0; z-index: 69; background: rgba(6, 10, 20, .5); }

@media (max-width: 900px) {
  .burger { display: grid; }
  .main { padding: 0 14px 30px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 264px; height: 100vh;
    z-index: 70; transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto;
  }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 0 8px; }
  .crumb span:first-child, .crumb span:nth-child(2) { display: none; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .page-head h1 { font-size: 20px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.auto { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .modal-mask { align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .drawer { width: 100vw; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .dropdown { width: min(320px, calc(100vw - 36px)); }
  .shot-list { max-height: none; }
}

@media (max-width: 560px) {
  .stat .v { font-size: 22px; }
  .plan .price { font-size: 28px; }
  .auth-art { display: none; }
  .auth-form-wrap { padding: 28px 18px; }
}

/* ---------- 运维：队列健康与调度器 ---------- */
.tag.warn { background: var(--warn-soft); color: var(--warn); }

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px;
}
.ops-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ghost-line);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-2);
}
.ops-card.ok { border-left-color: var(--ok); }
.ops-card.warn { border-left-color: var(--warn); }
.ops-card.danger { border-left-color: var(--err); }
.ops-card .k {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.ops-card .v { font-size: 24px; font-weight: 700; margin: 6px 0 10px; }
.ops-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ops-card li { display: flex; justify-content: space-between; gap: 10px; }
.ops-card li b { color: var(--ink); font-weight: 600; }
.ops-card .hint {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 12px; line-height: 1.55; color: var(--muted);
}
.ops-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px; margin-top: 12px; font-size: 13px;
}
.ops-meta .k { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.ops-list {
  margin: 8px 0 0; padding-left: 18px; font-size: 12px;
  color: var(--muted); display: grid; gap: 3px;
}

/* ---- AI 助手 ---- */
.agent-wrap { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 16px; align-items: start; }
.agent-side { padding: 16px; }
.agent-side select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12px; }
.agent-sessions { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow: auto; }
.agent-session { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--ink); font: inherit; }
.agent-session:hover { background: var(--hover); }
.agent-session.on { border-color: var(--brand); background: var(--brand-soft); }
.agent-session b { font-size: 13px; font-weight: 600; }
.agent-session span { font-size: 12px; color: var(--muted); }
.agent-session em { font-style: normal; font-size: 11px; color: var(--warn); }
.agent-chat { padding: 16px; display: flex; flex-direction: column; min-height: 560px; }
.agent-msgs { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: 470px; padding: 4px 4px 8px; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg.user { align-items: flex-end; }
.msg .bubble { max-width: min(660px, 88%); padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.72; white-space: pre-wrap; word-break: break-word; }
.msg.user .bubble { background: linear-gradient(135deg, #5b5bf5, #7c5cff); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: var(--chip); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.tool { align-items: center; }
.tool-chip { font-size: 12px; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft); border-radius: 999px; padding: 3px 10px; }
.tool-brief { font-size: 12px; color: var(--muted); max-width: 640px; text-align: center; line-height: 1.65; }
.agent-action { border: 1px solid var(--warn-soft); background: var(--warn-soft); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.agent-action .points { font-weight: 600; color: var(--warn); font-size: 13px; }
.agent-composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.agent-composer textarea { flex: 1; resize: vertical; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; background: var(--panel); color: var(--ink); }
.agent-composer textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.agent-hello { text-align: center; padding: 44px 20px 20px; }
.agent-hello-logo { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #5b5bf5, #22d3ee); }
.agent-hello h3 { margin: 0 0 6px; font-size: 16px; }
.empty.tiny { color: var(--muted); font-size: 12px; padding: 16px 4px; text-align: center; }

/* ---------- 通知中心 ---------- */
.notif-drop { width: 380px; }
.notif-drop .head > span { display: flex; align-items: center; gap: 6px; }
.notif-drop .head .tag { white-space: nowrap; }
.notif-list { max-height: 380px; overflow: auto; }
button.notif {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-2);
  text-align: left; cursor: pointer; align-items: flex-start; color: inherit; font: inherit;
}
button.notif:hover { background: var(--panel-2); }
button.notif.unread { background: var(--brand-soft); }
.notif-ico {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); margin-top: 1px;
}
.notif-ico.success { background: var(--ok-soft); color: var(--ok); }
.notif-ico.warning { background: #fff4e5; color: #b45309; }
.notif-ico.error { background: var(--err-soft); color: var(--err); }
[data-theme="dark"] .notif-ico.warning { background: #3a2a12; color: #fbbf24; }
.notif-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notif-title { font-weight: 600; font-size: 13px; }
.notif-body { font-size: 12px; color: var(--muted); line-height: 1.55; }
.notif-when { font-size: 12px; color: var(--muted); }
.notif-foot { padding: 10px 14px; border-top: 1px solid var(--line-2); text-align: center; background: var(--panel-2); }

.notif-page { display: flex; flex-direction: column; }
.notif-item {
  display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; align-items: flex-start;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--panel-2); }
.notif-item.unread { background: var(--brand-soft); }
.notif-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.notif-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-item-title { font-weight: 650; font-size: 14px; }
.notif-item-body { font-size: 12px; color: var(--ink-2); line-height: 1.6; }

.tabs { display: inline-flex; gap: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.tab {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px;
  padding: 5px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.tab.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.ghost { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }

/* subscription card: status row + monthly plans */
.sub-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--panel-2); }
.sub-box .sub-name { font-weight: 650; font-size: 15px; margin-top: 2px; }
.sub-box .row > div { min-width: 104px; }
.sub-plans { margin-top: 4px; }

.compose-opts .chk > select {
  margin-left: 6px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  font-size: 12px;
}
.compose-opts .chk > select:disabled { opacity: .5; }

.compose-opts .chk { white-space: nowrap; }

/* 素材库 v2：来源 / 类型计数、音频与文本占位、上传预览 */
.cnt { opacity: .55; font-size: 11px; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.chip.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.on .cnt { opacity: .85; color: #fff; }
.asset-glyph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 32px; font-weight: 700; color: #8a93ab; background: linear-gradient(135deg, #eef1fb, #e2e7f6); }
[data-theme="dark"] .asset-glyph { background: linear-gradient(135deg, #1d2436, #151b2a); color: #93a0bd; }

/* 节点式画布（P0-3） */
.wf-shell { display: flex; flex-direction: column; gap: 10px; }
.wf-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.wf-title { width: 220px; height: 34px; font-weight: 650; }
.wf-kind { width: 120px; height: 34px; }
.wf-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.wf-canvas { position: relative; min-height: 660px; height: calc(100vh - 230px); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background-color: var(--panel); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 26px 26px; background-position: 0 0; touch-action: none; cursor: default; }
.wf-canvas.panning { cursor: grabbing; }
.wf-stage { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.wf-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.wf-edges path { fill: none; stroke: #9aa4be; stroke-width: 1.6; pointer-events: stroke; cursor: pointer; }
.wf-edges path:hover { stroke: var(--brand); stroke-width: 2.2; }
.wf-nodes { position: absolute; left: 0; top: 0; }
.wf-marquee { position: absolute; border: 1px dashed var(--brand); background: rgba(91,91,245,.10); border-radius: 4px; pointer-events: none; }
.wf-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 20px rgba(15,23,42,.10); z-index: 5; }
.wf-zbtn { height: 26px; min-width: 26px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.wf-zbtn:hover { background: var(--soft); color: var(--ink); }
.wf-zbtn.wide { font-size: 12px; font-weight: 600; }
.wf-mini { position: absolute; left: 14px; bottom: 14px; width: 184px; height: 124px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 20px rgba(15,23,42,.10); cursor: pointer; z-index: 5; }
.wf-mini canvas { width: 100%; height: 100%; display: block; border-radius: 8px; }
.wf-drop { position: absolute; inset: 12px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--brand); border-radius: 14px; background: rgba(91,91,245,.08); color: var(--brand-ink); font-weight: 700; font-size: 14px; pointer-events: none; z-index: 6; }
.wf-drop[hidden] { display: none; }
.wf-node { position: absolute; width: 208px; height: 104px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; box-shadow: 0 6px 18px rgba(24, 33, 66, .08); padding: 10px 12px; cursor: grab; user-select: none; display: flex; flex-direction: column; gap: 4px; }
.wf-node.on { box-shadow: 0 0 0 2px var(--brand) inset, 0 10px 24px rgba(91, 91, 245, .22); }
.wf-node.link { border-style: dashed; border-color: var(--brand); }
.wf-node-head { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.wf-node-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-glyph { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; border-radius: 6px; font-size: 10px; font-weight: 800; color: #fff; background: var(--brand); padding: 0 5px; }
.wf-node-body { font-size: 12px; color: var(--ink-2); flex: 1; overflow: hidden; }
.wf-node-foot { display: flex; align-items: center; justify-content: space-between; position: relative; }
.wf-port { position: absolute; right: -7px; top: -32px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brand); }
.wf-port.in { left: -7px; right: auto; top: -10px; }
.wf-port.out { right: -7px; top: -10px; }
.tone-b.wf-node { border-left-color: #22a06b; } .tone-b .wf-glyph { background: #22a06b; }
.tone-c.wf-node { border-left-color: #d97706; } .tone-c .wf-glyph { background: #d97706; }
.tone-d.wf-node { border-left-color: #0891b2; } .tone-d .wf-glyph { background: #0891b2; }
.tone-e.wf-node { border-left-color: #db2777; } .tone-e .wf-glyph { background: #db2777; }
.tone-f.wf-node { border-left-color: #7c3aed; } .tone-f .wf-glyph { background: #7c3aed; }
.tone-g.wf-node { border-left-color: #0f766e; } .tone-g .wf-glyph { background: #0f766e; }
.tone-h.wf-node { border-left-color: #4d7c0f; } .tone-h .wf-glyph { background: #4d7c0f; }
.wf-hint { position: absolute; left: 14px; top: 12px; max-width: calc(100% - 220px); font-size: 12px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; pointer-events: none; z-index: 4; }
.wf-side { display: flex; flex-direction: column; gap: 10px; }
.wf-side-card { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.wf-side-card label { margin-top: 8px; }
.wf-tip { margin-top: 10px; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.wf-card { overflow: hidden; }
.wf-thumb { height: 86px; display: flex; align-items: center; justify-content: flex-end; padding: 10px; background: linear-gradient(135deg, #eef1fb, #dde5fb); color: #4b5680; font-size: 12px; }
[data-theme="dark"] .wf-thumb { background: linear-gradient(135deg, #1b2233, #131a29); color: #9aa8c7; }
.wf-card-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.wf-card-foot { padding: 6px 12px 12px; display: flex; align-items: center; }
@media (max-width: 1080px) { .wf-body { grid-template-columns: minmax(0, 1fr); } }

/* P1 画布执行：运行面板与节点状态 */
.wf-node.st-running { box-shadow: 0 0 0 2px rgba(91,91,245,.55), 0 10px 24px rgba(15,23,42,.10); }
.wf-node.st-succeeded { box-shadow: 0 0 0 2px rgba(16,185,129,.45); }
.wf-node.st-failed { box-shadow: 0 0 0 2px rgba(225,29,72,.5); }
.wf-node.st-skipped { opacity: .5; }
.wf-run { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.wf-progress { height: 6px; border-radius: 999px; background: #eceffb; overflow: hidden; margin: 8px 0 10px; }
.wf-progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5b5bf5, #22d3ee); transition: width .3s ease; }
.wf-plan { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.wf-plan-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.wf-plan-row:last-child { border-bottom: 0; }
.wf-tip.warn { color: #b45309; }

/* ---------- P2 单点工作台（生成台） ---------- */
.wb { display: grid; gap: 14px; }
.wb-tabs { justify-self: start; }
.wb-grid { display: grid; grid-template-columns: 372px minmax(0, 1fr); gap: 16px; align-items: start; }
.wb-side { padding: 16px; display: grid; gap: 14px; }
.wb-block { display: grid; gap: 8px; }
.wb-block-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.wb-models { display: grid; gap: 6px; max-height: 216px; overflow: auto; }
.wb-model {
  display: grid; gap: 3px; text-align: left; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; font: inherit;
}
.wb-model:hover { border-color: var(--brand); }
.wb-model.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.wb-model[disabled] { opacity: .5; cursor: not-allowed; }
.wb-model-name { font-weight: 600; font-size: 13px; }
.wb-model-meta { font-size: 12px; color: var(--muted); }
.wb-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.wb-field > span { font-size: 12px; }
.wb-field select, .wb-field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; resize: vertical;
}
.wb-field textarea:focus, .wb-field select:focus { outline: none; border-color: var(--brand); }
.wb-refs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wb-ref { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--thumb); cursor: pointer; aspect-ratio: 1; }
.wb-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-ref.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.wb-submit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wb-est { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: 12px; }
.wb-est b { font-size: 20px; color: var(--ink); }
.wb-hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.wb-main { padding: 16px; }
.wb-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.wb-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.wb-thumb { height: 132px; background: var(--thumb); display: grid; place-items: center; overflow: hidden; }
.wb-thumb img, .wb-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-thumb audio { width: 88%; }
.wb-thumb.glyph { font-size: 15px; color: var(--muted); }
.wb-thumb.text pre { margin: 0; padding: 10px; font-size: 11px; line-height: 1.5; white-space: pre-wrap; color: var(--ink-2); max-height: 132px; overflow: hidden; }
.wb-item-body { padding: 10px 11px; display: grid; gap: 4px; }
.wb-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.wb-item-meta { font-size: 12px; color: var(--muted); }
.wb-item-prompt { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .wb-grid { grid-template-columns: minmax(0, 1fr); }
  .wb-refs { grid-template-columns: repeat(6, 1fr); }
}

/* 视频缩略图：首帧未解码时给浅底 + 播放标记，避免看起来像坏图 */
.wb-thumb.video { background: #0f172a; }
.wb-thumb.video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 28px; text-shadow: 0 2px 10px rgba(0,0,0,.45); pointer-events: none; }
.wb-thumb { position: relative; }


/* P3 短剧生产台 */
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dr-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.dr-cover { position: relative; height: 148px; background: linear-gradient(135deg, #e8edfb, #dbe6ff); }
.dr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-cover-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.dr-genre { position: absolute; top: 10px; left: 10px; background: rgba(15,23,42,.66); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11px; }
.dr-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.dr-body h3 { margin: 0; font-size: 16px; }
.dr-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-prog-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.dr-meta { display: flex; gap: 8px; align-items: center; }
.dr-card { height: 100%; }
.dr-body { flex: 1; }
.dr-ops { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; }
.ent { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ent:last-child { border-bottom: 0; }
.ent-photo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: var(--panel-2); }
.ent-photo.ghost { display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.ent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ent-ops { display: flex; flex-direction: column; gap: 2px; text-align: right; flex: none; }
.ent-ops .link { white-space: nowrap; }
.link.danger { color: #dc2626; }

/* P4 时间轴编辑器 */
.ta-wrap{display:grid;grid-template-columns:264px minmax(0,1fr) 300px;gap:16px;align-items:start}
.ta-list{position:sticky;top:16px}
.ta-clips{display:flex;flex-direction:column;gap:8px;max-height:calc(100vh - 260px);overflow:auto;padding-right:2px}
.ta-clip{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:12px;cursor:pointer;background:var(--panel)}
.ta-clip:hover{border-color:var(--brand)}
.ta-clip.on{border-color:var(--brand);box-shadow:0 0 0 2px rgba(91,91,245,.14)}
.ta-thumb{position:relative;width:64px;height:44px;border-radius:8px;overflow:hidden;background:#0f172a;display:grid;place-items:center}
.ta-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ta-thumb .ta-ph{color:#94a3b8;display:grid;place-items:center}
.ta-thumb b{position:absolute;left:3px;top:2px;font-size:11px;color:#fff;background:rgba(15,23,42,.62);border-radius:5px;padding:0 5px;line-height:16px}
.ta-main{min-width:0}
.ta-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ta-sub{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px;margin-top:2px;flex-wrap:wrap}
.ta-ord{display:flex;flex-direction:column;gap:2px}
.ta-ord .icon-btn{width:22px;height:20px;font-size:12px;line-height:1}
.ta-center{display:flex;flex-direction:column;gap:14px;min-width:0}
.ta-strip{display:flex;gap:3px;height:46px;padding:4px;border-radius:12px;background:var(--panel-2);border:1px solid var(--line)}
.ta-seg{border:0;border-radius:8px;background:linear-gradient(135deg,#5b5bf5,#22d3ee);color:#fff;font-size:11px;cursor:pointer;overflow:hidden;white-space:nowrap;min-width:26px}
.ta-seg.on{outline:2px solid #111827;outline-offset:1px}
.ta-seg.ghost{background:repeating-linear-gradient(45deg,#e2e8f0,#e2e8f0 4px,#eef2f7 4px,#eef2f7 8px);color:#64748b}
.ta-inspect{display:flex;flex-direction:column;gap:10px}
.ta-preview{position:relative;border-radius:12px;overflow:hidden;background:#0f172a;min-height:150px;display:grid;place-items:center}
.ta-preview video{width:100%;max-height:230px;display:block;background:#0f172a}
.ta-still{max-width:100%;max-height:230px}
.ta-empty{color:#94a3b8;font-size:13px;padding:34px 12px}
.ta-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.ta-field input,.ta-field select{height:34px}
.ta-range{display:flex;gap:10px}
.ta-range input[type=range]{flex:1;accent-color:var(--brand)}
.ta-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.ta-meta b{color:var(--ink)}
.ta-side{position:sticky;top:16px;display:flex;flex-direction:column;gap:10px}
.ta-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px}
.ta-stats div{background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:8px;display:flex;flex-direction:column;gap:2px}
.ta-stats span{font-size:11px;color:var(--muted)}
.ta-stats b{font-size:16px}
.ta-film video{width:100%;border-radius:10px;background:#0f172a;margin:6px 0 8px}
@media (max-width:1200px){
  .ta-wrap{grid-template-columns:1fr}
  .ta-list,.ta-side{position:static}
  .ta-clips{max-height:none}
}


/* ---- 通用：弹窗结构 + 表单字段（社区页首次用到，补成系统件） ---- */
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field > .input, .field > input, .field > textarea, .field > select { margin: 0; }

/* ---- 页面：提示词库 ---- */
.pm-shell { padding: 16px 18px 18px; }
.pm-shell .tabs { margin-bottom: 12px; }
.pm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pm-filters select.input { width: 128px; }
.pm-filters input.input { flex: 1 1 220px; min-width: 180px; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pm-card {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 13px 14px 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pm-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.pm-top { display: flex; align-items: center; gap: 7px; }
.pm-title { font-size: 14px; font-weight: 650; color: var(--ink); flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-card .tag {
  flex: none; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 600;
}
.pm-text {
  margin: 0; font-size: 12px; line-height: 1.65; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-tags .chip { font-size: 11px; }
.pm-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-top: auto;
  padding-top: 9px; border-top: 1px dashed var(--line-2); }
.pm-foot .tiny { align-self: flex-start; max-width: 100%; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.pm-acts { display: flex; gap: 6px; flex-wrap: nowrap; }
.pm-form { display: flex; flex-direction: column; gap: 10px; }
.pm-form .row { gap: 10px; }
.pm-form select.input { width: 130px; }

/* ---- 页面：作品广场 ---- */
.gl-shell { padding: 16px 18px 18px; }
.gl-shell .tabs { margin-bottom: 12px; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.gl-card {
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.gl-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.gl-cover { position: relative; aspect-ratio: 16 / 9; background: var(--thumb); overflow: hidden; }
.gl-cover img, .gl-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 22px; text-shadow: 0 2px 12px rgba(0,0,0,.5);
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.32));
  pointer-events: none;
}
.gl-body { display: flex; flex-direction: column; gap: 6px; padding: 11px 13px 12px; }
.gl-title { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-desc {
  margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gl-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.gl-foot .tiny { margin-right: auto; }
.gl-foot .btn.ghost.on { color: var(--err); border-color: var(--err); }
.gl-publish { display: flex; flex-direction: column; gap: 12px; }
.gl-picks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px;
  max-height: 210px; overflow: auto; padding: 2px;
}
.gl-pick {
  padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden;
  background: var(--thumb); cursor: pointer; aspect-ratio: 1 / 1;
}
.gl-pick img, .gl-pick video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-pick.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gl-detail-media { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: #000; display: block; }
.gl-detail-desc { margin: 12px 0 6px; font-size: 13px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; }

/* ---------- 商品化：套餐 / 结算 / 订单（P6） ---------- */
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
.chip.ok { background: rgba(22, 163, 74, .12); color: #15803d; }
.chip.warn { background: rgba(217, 119, 6, .14); color: #b45309; }
:root[data-theme="dark"] .chip.ok { background: rgba(34, 197, 94, .16); color: #6ee7a0; }
:root[data-theme="dark"] .chip.warn { background: rgba(245, 158, 11, .18); color: #fbbf24; }

.pr-wallet {
  display: flex; align-items: center; gap: 26px; padding: 14px 18px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.pr-wallet b { display: block; font-size: 18px; margin-top: 2px; }
.pr-section { margin-bottom: 26px; }
.pr-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pr-sec-head h2 { font-size: 16px; margin: 0; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pr-card { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.pr-card.hot { border-color: var(--brand); box-shadow: 0 10px 26px -18px var(--brand); }
.pr-badge { position: absolute; top: 10px; right: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pr-card h3 { margin: 0; font-size: 14px; }
.pr-price { font-size: 28px; font-weight: 800; letter-spacing: -.4px; }
.pr-sub { font-size: 12px; color: var(--muted); }
.pr-feats { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pr-feats li { font-size: 12px; color: var(--ink-2); padding-left: 14px; position: relative; }
.pr-feats li::before { content: "·"; position: absolute; left: 4px; color: var(--brand); font-weight: 800; }

.ck-wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .85fr); gap: 16px; align-items: start; }
.ck-main { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.ck-plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); }
.ck-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.ck-price { font-size: 24px; font-weight: 800; }
.ck-rows { display: flex; flex-direction: column; gap: 8px; }
.ck-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.ck-row b { color: var(--ink); font-weight: 600; }
.ck-row b.ok { color: #15803d; }
.ck-label, .ck-side-head { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ck-pay { display: flex; flex-direction: column; gap: 8px; }
.ck-way { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; }
.ck-way.on { border-color: var(--brand); background: var(--brand-soft); }
.ck-way.off { opacity: .55; cursor: not-allowed; }
.ck-way b { display: block; font-size: 13px; }
.ck-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ck-side { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.ck-total { font-size: 32px; font-weight: 800; letter-spacing: -.6px; }
.ck-note { margin: 4px 0 0; line-height: 1.7; }

.ck-result { max-width: 620px; margin: 32px auto; text-align: center; }
.ck-badge { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-size: 28px; font-weight: 800; color: #fff; background: #d97706; }
.ck-badge.ok { background: #16a34a; }
.ck-result h1 { margin: 0 0 6px; font-size: 22px; }
.ck-result-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.ck-result-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; text-align: left; }
.ck-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.ord-shell { padding: 16px 18px 20px; }
.ord-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
/* 世界观页：设定表格 + 实体卡 + 提示词拼接 */
.wd-layout { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; align-items: start; }
.wd-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wd-field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wd-ent .wd-ent-desc { margin-top: 4px; min-height: 32px; }
.wd-ent-ops { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.wd-ent { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; background: var(--panel); display: flex; flex-direction: column; }
.wd-ent-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wd-ent-top b { font-size: 14px; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 1100px) { .wd-layout { grid-template-columns: 1fr; } .wd-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .wd-form { grid-template-columns: 1fr; } }

.seg { display: inline-flex; gap: 4px; background: var(--panel-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }
.ord-table { margin-top: 4px; }
.ord-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.ord-table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
.ord-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ord-acts .btn.sm { padding: 0 10px; height: 28px; font-size: 12px; }

.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.drawer-head h3 { margin: 0 0 2px; font-size: 16px; }
.drawer-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--muted); padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.kv b { color: var(--ink); font-weight: 600; text-align: right; }

@media (max-width: 900px) {
  .ck-wrap { grid-template-columns: 1fr; }
  .ck-side { position: static; }
  .pr-grid { grid-template-columns: 1fr; }
}

/* ---------------- P8 系统页：找回密码 / 条款 / 隐私 / 帮助 ---------------- */
.auth.auth-simple { grid-template-columns: 1fr; background: radial-gradient(120% 90% at 50% -10%, #eef1ff 0%, var(--bg) 55%); }
.auth-simple .auth-form-wrap { min-height: 100vh; }
.auth-simple .auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-simple .auth-card .brand-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-simple .auth-card .brand-mobile .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #22d3ee, #5b5bf5); color: #fff; font-weight: 700; }

.doc-shell { min-height: 100vh; background: var(--bg); }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 3; }
.doc-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.doc-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #22d3ee, #5b5bf5); color: #fff; font-size: 14px; }
.doc-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.doc-nav a { color: var(--muted); text-decoration: none; }
.doc-nav a:hover { color: var(--brand); }
.doc-body { max-width: 780px; margin: 0 auto; padding: 44px 24px 80px; }
.doc-body h1 { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 8px; }
.doc-body h2 { font-size: 16px; margin: 28px 0 8px; }
.doc-body p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.doc-lead { margin-top: 16px; padding: 14px 16px; background: var(--brand-soft); border-radius: 12px; color: var(--brand-ink) !important; }
@media (max-width: 720px) {
  .doc-top { flex-direction: column; align-items: flex-start; }
  .doc-nav { flex-wrap: wrap; gap: 12px; }
}

/* 公告 */
.ann-list { display: flex; flex-direction: column; }
.ann-item { padding: 16px 2px; border-bottom: 1px solid var(--line-2); }
.ann-item:last-child { border-bottom: 0; }
.ann-item .tag { flex: none; }
.ann-body { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.ann-banner { border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.ann-banner.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.ann-banner.success { border-left-color: var(--ok); background: var(--ok-soft); }
.ann-banner .ann-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.ann-banner .ann-line + .ann-line { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(15, 23, 42, 0.08); }

/* 结算页优惠码（P7b） */
.ck-coupon{display:flex;flex-direction:column;gap:6px;margin-top:14px}
.ck-coupon-row{display:flex;gap:8px;align-items:center}
.ck-coupon-row .input{flex:1}
#ck-discount-hint{margin-top:2px}

/* ---------- 公开分享页（作品 / 作者主页） ---------- */
.pub-shell { min-height: 100vh; background: var(--bg); padding-bottom: 48px; }
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pub-top-right { display: flex; align-items: center; gap: 14px; }
.pub-main { max-width: 1120px; margin: 28px auto 0; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 24px; align-items: start; }
.pub-main.single { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.pub-loading { max-width: 1120px; margin: 80px auto; text-align: center; }
.pub-stage { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.pub-media-el { width: 100%; max-height: 74vh; object-fit: contain; border-radius: var(--radius-sm); display: block; background: var(--thumb); }
.pub-audio { padding: 40px 16px; display: flex; justify-content: center; }
.pub-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; position: sticky; top: 20px; }
.pub-kind { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; }
.pub-title { margin: 0; font-size: 22px; line-height: 1.3; }
.pub-author { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.pub-author:hover b { color: var(--brand); }
.pub-author > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pub-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #22d3ee); flex: none; }
.pub-avatar.lg { width: 62px; height: 62px; font-size: 24px; border-radius: 18px; }
.pub-stats { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.pub-stats span { display: inline-flex; align-items: center; gap: 5px; }
.pub-desc { margin: 2px 0 0; color: var(--ink-2); line-height: 1.75; font-size: 14px; white-space: pre-wrap; }
.pub-cta { margin-top: 6px; padding: 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub-cta > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pub-hero { display: flex; align-items: center; gap: 16px; padding: 20px; flex-wrap: wrap; }
.pub-hero-main { display: flex; flex-direction: column; gap: 4px; }
.pub-hero-main h1 { margin: 0; font-size: 22px; }
.pub-hero-stats { display: flex; gap: 28px; margin-left: auto; }
.pub-hero-stats > div { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.pub-hero-stats b { font-size: 20px; }
.pub-section { margin-top: 26px; }
.pub-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.pub-section-head h2 { margin: 0; font-size: 16px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pub-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease; }
.pub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pub-card-cover { position: relative; aspect-ratio: 16 / 9; background: var(--thumb); overflow: hidden; }
.pub-card-cover img, .pub-card-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-card-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.pub-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.pub-card-title { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-card-body .tiny { display: flex; align-items: center; gap: 4px; }
.pub-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pub-prompt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pub-prompt-head { display: flex; align-items: center; gap: 8px; }
.pub-prompt p { margin: 0; line-height: 1.6; }
.pub-empty { max-width: 520px; margin: 60px auto; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pub-empty.small { margin: 0; padding: 22px; }
.pub-empty-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-ink); }
.pub-empty h2 { margin: 0; font-size: 18px; }
.pub-acts { display: flex; gap: 10px; margin-top: 6px; }
.pub-footer { margin: 36px 0 8px; text-align: center; }
@media (max-width: 900px) {
  .pub-main { grid-template-columns: minmax(0, 1fr); padding: 0 14px; }
  .pub-side { position: static; }
  .pub-top { padding: 12px 14px; }
  .pub-hero-stats { margin-left: 0; gap: 18px; width: 100%; justify-content: space-between; }
  .pub-hero-stats > div { text-align: left; }
}

/* ---------------- 命令面板（⌘K） ---------------- */
.cmd-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 13px; cursor: pointer;
}
.cmd-trigger:hover { color: var(--ink); border-color: var(--ghost-line); }
.cmd-trigger kbd {
  font: inherit; font-size: 11px; padding: 1px 5px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--chip); color: var(--muted);
}
@media (max-width: 860px) { .cmd-trigger span, .cmd-trigger kbd { display: none; } }

.cmd-mask {
  position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start;
  padding-top: 11vh; background: rgba(8, 12, 24, 0.42); backdrop-filter: blur(2px);
}
.cmd {
  width: min(680px, calc(100vw - 28px)); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.cmd-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.cmd-kbd { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.cmd-input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.cmd-esc { font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: var(--chip); border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.cmd-list { overflow: auto; padding: 6px; }
.cmd-group { font-size: 11px; color: var(--muted); padding: 8px 10px 4px; letter-spacing: .04em; }
.cmd-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 9px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer;
}
.cmd-row.on { background: var(--chip); }
.cmd-ico {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px;
  background: var(--chip); color: var(--muted); font-size: 12px;
}
.cmd-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cmd-main b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-row mark { background: rgba(91, 91, 245, 0.18); color: inherit; border-radius: 3px; padding: 0 1px; }
.cmd-enter { font-size: 11px; color: var(--muted); opacity: 0; }
.cmd-row.on .cmd-enter { opacity: 1; }
.cmd-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }
.cmd-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.cmd-foot-tip { margin-left: auto; }

/* 生成台：带参进入的提示词 + 预设下拉 */
.wb-deep {
  margin-bottom: 8px; font-size: 12px; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 8px; padding: 7px 10px;
}
#wb-preset, #wb-size, #wb-aspect, #wb-duration, #wb-quantity { width: 100%; }
.wb-block .link.tiny { margin-top: 6px; }

.wb-short{margin:8px 2px 0;font-size:12px;color:#d64545}
.wb-short b{font-weight:700}

/* ---------- 侧栏折叠（P1） ---------- */
.side-toggle{margin-left:auto;width:24px;height:24px;border-radius:8px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#93a1bd;font-size:12px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s,background .15s;}
.side:hover .side-toggle{opacity:1}
.side-toggle:hover{background:rgba(255,255,255,.12);color:#fff}
body.nav-mini .shell{grid-template-columns:74px minmax(0,1fr)}
body.nav-mini .side{padding-left:10px;padding-right:10px}
body.nav-mini .brand{padding:6px 0 18px;justify-content:center}
body.nav-mini .brand-text,body.nav-mini .nav-label,body.nav-mini .nav-group-title,body.nav-mini .side-foot{display:none}
body.nav-mini .nav-item{justify-content:center;padding:10px 0}
body.nav-mini .side-toggle{margin-left:0}
body.nav-mini .side .nav-group{margin-top:6px}
body.nav-mini .brand .logo{display:none}
body.nav-mini .side-toggle{opacity:1}
body.nav-mini .side-toggle{transform:rotate(180deg);color:#cbd5e1;border-color:rgba(255,255,255,.18)}

/* ---------- 工作台自定义面板（P1） ---------- */
.dash-rows{display:flex;flex-direction:column;gap:8px}
.dash-row{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line-2);border-radius:10px}
.dash-check{display:flex;align-items:center;gap:9px;font-size: 14px;cursor:pointer}
.dash-check input{width:15px;height:15px;accent-color:#5b5bf5}
.dash-row .btn[disabled]{opacity:.35;cursor:default}

/* ---------- 素材库批量（P1） ---------- */
.asset-batch{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 12px;margin-bottom:12px;border:1px solid var(--brand-line,#dcd8ff);background:var(--brand-soft,#f3f1ff);border-radius:12px}
.asset-batch[hidden]{display:none}
.asset-batch .lnk{background:none;border:0;color:#5b5bf5;cursor:pointer;font-size: 12px;padding:0}
.asset-card{position:relative}
.asset-card.picked{outline:2px solid #5b5bf5;outline-offset:2px}
.asset-pick{position:absolute;top:8px;left:8px;z-index:2;display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:rgba(255,255,255,.92);box-shadow:0 2px 8px rgba(10,20,40,.18);cursor:pointer}
.asset-pick input{width:14px;height:14px;accent-color:#5b5bf5;cursor:pointer;margin:0}

.wf-proj{max-width:230px;margin-left:8px}
.wf-ctx{margin-top:10px;padding:10px 12px;border:1px solid var(--line-2);border-radius:12px;background:var(--soft)}
.wf-ctx .link{color:var(--brand-ink);text-decoration:none;font-weight:600}

/* 模板市场 */
.tpl-shell{padding:14px 16px 18px}
.tpl-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.tpl-bar .input{max-width:260px}
.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}
.tpl-card{border:1px solid var(--line);border-radius:14px;padding:14px 15px;background:var(--card);display:flex;flex-direction:column;gap:8px}
.tpl-card:hover{border-color:var(--brand);box-shadow:var(--shadow-sm)}
.tpl-top{display:flex;align-items:center;gap:6px}
.tpl-used{margin-left:auto;font-size:12px;color:var(--muted)}
.tpl-card h3{margin:2px 0 0;font-size: 16px}
.tpl-sum{margin:0;font-size:13px;color:var(--muted);line-height:1.6;min-height:42px}
.tpl-words{display:flex;flex-wrap:wrap;gap:5px}
.tpl-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:10px;border-top:1px dashed var(--line-2)}
.tpl-acts{display:flex;gap:6px}
.tpl-doc{white-space:pre-wrap;font-size: 14px;line-height:1.75;background:var(--bg-2);border-radius:10px;padding:12px 14px;max-height:320px;overflow:auto}
.tpl-cfg{font-size: 12px;color:var(--muted)}
.tpl-cfg b{color:var(--text);font-weight:600}
@media (max-width:760px){.tpl-grid{grid-template-columns:1fr}.tpl-bar .input{max-width:none;width:100%}}

#tpl-scope{margin-right:2px}
.link.tiny.danger{color:#d64545}
.wb-block-acts{display:flex;gap:6px}

/* 移动端底部 Tab */
.tabbar{display:none}
@media (max-width: 760px) {
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--card);
    border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));}
  .tabbar-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;
    font-size:11px;color:var(--muted);text-decoration:none}
  .tabbar-item.on{color:var(--brand)}
  .tabbar-item svg{width:19px;height:19px}
  .main{padding-bottom:76px}
  .toast-wrap{bottom:78px}
}

.tcard{cursor:pointer}
.tcard:hover{border-color:var(--brand)}

/* 无限画布 · 拖拽连线（ToonFlow 交互范式） */
.wf-link-layer { pointer-events: none; }
.wf-link-layer path { pointer-events: none; stroke: var(--brand); stroke-dasharray: 6 5; stroke-width: 2; }
.wf-link-path.ok { stroke: #22a06b; }
.wf-link-path.bad { stroke: #e5484d; stroke-dasharray: 4 4; }
.wf-edge-hit { stroke: transparent !important; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.wf-edge { pointer-events: none; }
g[data-edge]:hover .wf-edge { stroke: var(--brand); stroke-width: 2.2; }
.wf-node.link-src { box-shadow: 0 0 0 2px var(--brand), 0 10px 24px rgba(91, 91, 245, .22); }
.wf-node.link-ok { box-shadow: 0 0 0 2px #22a06b, 0 10px 24px rgba(34, 160, 107, .22); }
.wf-port { cursor: crosshair; width: 13px; height: 13px; }
.wf-port::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.wf-port:hover { background: var(--brand); }
.wf-edge-x { position: absolute; z-index: 8; padding: 5px 11px; font-size: 12px; font-weight: 600; color: #fff; background: #e5484d; border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 6px 16px rgba(229, 72, 77, .35); }
.wf-edge-x[hidden] { display: none; }
.wf-addmenu { position: absolute; z-index: 9; width: 236px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.wf-addmenu[hidden] { display: none; }
.wf-addmenu-head { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 6px 8px; }
.wf-addmenu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wf-addmenu-grid button { display: flex; align-items: center; gap: 6px; padding: 7px 8px; font-size: 12px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.wf-addmenu-grid button:hover { border-color: var(--brand); color: var(--brand-ink); }
.wf-addmenu-grid .wf-glyph { width: 18px; height: 18px; font-size: 10px; }

/* ===== 画布 v3：节点缩略图 / 悬浮操作 / 底部工具栏 / 右键菜单 / 对齐参考线 ===== */
.wf-node { width: 236px; height: 166px; padding: 9px 11px 30px; gap: 6px; overflow: visible; }
.wf-node-head { font-size: 12px; }
.wf-node-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wf-node-kind { flex: none; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 5px; background: var(--panel-2); color: var(--muted); font-weight: 600; }
.wf-node-state { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); margin-left: auto; flex: none; }
.wf-node.st-running .wf-node-state { background: #5b5bf5; box-shadow: 0 0 0 4px rgba(91,91,245,.18); animation: wf-pulse 1.2s infinite; }
.wf-node.st-succeeded .wf-node-state { background: #10b981; }
.wf-node.st-failed .wf-node-state { background: #e11d48; }
.wf-node.st-skipped .wf-node-state { background: #94a3b8; }
@keyframes wf-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.wf-node-thumb { position: relative; flex: 1 1 auto; min-height: 56px; border-radius: 8px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.wf-thumb-img, .wf-thumb-vid { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-thumb-badge { position: absolute; right: 6px; bottom: 6px; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 6px; background: rgba(15,23,42,.66); color: #fff; }
.wf-thumb-empty { height: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; color: var(--muted); }
.wf-thumb-empty .wf-glyph { opacity: .55; }
.wf-thumb-text { height: 100%; padding: 7px 8px; overflow: hidden; }
.wf-thumb-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.45; color: var(--ink-2); white-space: pre-wrap; }
.wf-thumb-file { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-2); word-break: break-all; padding: 6px; }
.wf-thumb-audio { height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--brand); }
.wf-wave { letter-spacing: 1px; font-size: 14px; opacity: .75; }
.wf-node-body { font-size: 11px; line-height: 1.4; max-height: 32px; }
.wf-node-acts { position: absolute; left: 8px; right: 8px; bottom: 7px; display: flex; gap: 4px; padding: 5px 6px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(15,23,42,.12); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.wf-node:hover .wf-node-acts, .wf-node.on .wf-node-acts { opacity: 1; transform: none; pointer-events: auto; }
.wf-node-acts button { flex: 1; border: 0; background: transparent; font-size: 11px; color: var(--ink-2); padding: 4px 2px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.wf-node-acts button:hover { background: var(--panel-2); color: var(--brand); }
.wf-node-acts button[data-node-act="del"]:hover { color: #e11d48; }
.wf-guides { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wf-guides i { position: absolute; background: #5b5bf5; opacity: .55; }
.wf-guides i.v { top: 0; bottom: 0; width: 1px; }
.wf-guides i.h { left: 0; right: 0; height: 1px; }
.wf-dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 5px 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(15,23,42,.14); z-index: 6; }
.wf-dock-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 48px; padding: 5px 6px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.wf-dock-btn b { font-size: 15px; line-height: 1.1; font-weight: 600; }
.wf-dock-btn span { font-size: 10px; white-space: nowrap; }
.wf-dock-btn:hover { background: var(--panel-2); color: var(--brand); }
.wf-dock-btn.on { background: var(--brand-soft); color: var(--brand); }
.wf-dock-sep { width: 1px; height: 26px; background: var(--line); margin: 0 3px; }
.wf-ctxmenu { position: absolute; z-index: 9; min-width: 178px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 16px 38px rgba(15,23,42,.2); }
.wf-ctxmenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 0; background: transparent; border-radius: 8px; font-size: 12px; color: var(--ink); text-align: left; cursor: pointer; }
.wf-ctxmenu button:hover { background: var(--brand-soft); color: var(--brand); }
.wf-ctxmenu button span { margin-left: auto; font-size: 11px; color: var(--muted); }
.wf-ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }
@media (max-width: 900px) {
  .wf-dock-btn span { display: none; }
  .wf-dock-btn { min-width: 34px; }
  .wf-mini { display: none; }
}

/* 画布：分组标题 / 折叠卡 / 内联编辑 / 历史产物 */
.wf-group-chip { align-self: flex-start; max-width: 100%; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-group-chip:hover { color: var(--brand); border-color: var(--brand); }
.wf-node.is-collapsed { height: auto; min-height: 86px; padding-bottom: 8px; }
.wf-node-mini { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); min-width: 0; }
.wf-node-mini .wf-mini-img { width: 64px; height: 36px; flex: none; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.wf-node-mini .wf-mini-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-node-mini .wf-mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.wf-node-mini .wf-mini-dot.on { background: var(--ok, #16a34a); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.wf-groups { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.wf-groupbox { position: absolute; border: 1px dashed rgba(91, 91, 245, 0.32); border-radius: 18px; background: rgba(91, 91, 245, 0.035); pointer-events: none; }
.wf-groupbox.on { border-color: rgba(91, 91, 245, 0.75); background: rgba(91, 91, 245, 0.07); }
.wf-groupbox-label { position: absolute; left: 10px; top: -13px; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid rgba(91, 91, 245, 0.35); border-radius: 999px; background: var(--panel); color: var(--brand); font-size: 12px; font-weight: 600; cursor: grab; white-space: nowrap; }
.wf-groupbox-label:active { cursor: grabbing; }
.wf-groupbox-count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: rgba(91, 91, 245, 0.14); font-size: 10px; line-height: 16px; text-align: center; }
.wf-hist-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.wf-hist-acts { display: flex; gap: 6px; flex: none; }
.wf-hist-prompt { margin-top: 4px; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-diff-tip { margin-bottom: 10px; }
.wf-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wf-diff-col { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-2); }
.wf-diff-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.wf-diff .wf-hist-thumb { width: 100%; height: 132px; margin-bottom: 8px; }
.wf-diff-text { font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.wf-diff-text mark { background: rgba(245, 158, 11, 0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 720px) { .wf-diff { grid-template-columns: 1fr; } }
.wf-node.is-collapsed .wf-node-acts { bottom: -34px; left: 0; right: 0; }
.wf-inline { position: absolute; inset: 30px 6px 6px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--brand); border-radius: 9px; padding: 7px; box-shadow: 0 12px 26px rgba(15,23,42,.18); z-index: 6; }
.wf-inline textarea { flex: 1; resize: none; font-size: 12px; line-height: 1.45; padding: 6px 7px; user-select: text; }
.wf-inline-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex: none; }
.wf-inline-hint { white-space: nowrap; font-size: 10px; }
.wf-inline-foot .btn { padding: 3px 9px; font-size: 11px; }
.wf-hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.wf-hist-row:last-child { border-bottom: 0; }
.wf-hist-thumb { width: 96px; height: 54px; flex: none; border-radius: 7px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.wf-hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-hist-meta { flex: 1; min-width: 0; font-size: 12px; }

/* 折叠卡片右侧的「上次运行」 */
.wf-node-mini .wf-mini-when { margin-left: auto; flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 历史对比里的像素热力图 */
.wf-pix { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.wf-pix-head { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.wf-pix-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.wf-pix-bar b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--brand); }
.wf-pix-shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); max-width: 640px; }
.wf-pix-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .wf-pix-shot { max-width: 100%; } }

/* ---------- 短剧工作台（D1–D7） ---------- */
.ds-head h1 { margin: 4px 0 4px; }
.ds-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.ds-card { padding: 18px 20px; }
.ds-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.ds-form .field-full { grid-column: 1 / -1; }
.ds-hint { margin-top: 12px; }
.ds-eps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.ds-ep { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.ds-ep-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ds-ep-no { font-size: 12px; color: var(--muted); font-weight: 600; }
.ds-ep-outline { font-size: 13px; line-height: 1.66; color: var(--text); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ds-ep-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-ep-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.ds-select { height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 0 10px; font-size: 13px; max-width: 260px; }
.ds-outline-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: var(--bg-2); }
.ds-outline-text { margin-top: 4px; font-size: 13px; line-height: 1.66; white-space: pre-wrap; max-height: 132px; overflow: auto; }
.ds-script { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.8; resize: vertical; }
.ds-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 6px; }
.ds-shot { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.ds-shot-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); }
.ds-shot-thumb img, .ds-shot-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-shot-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.ds-shot-no { position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(15, 23, 42, .62); color: #fff; }
.ds-cont { position: absolute; right: 8px; top: 8px; }
.ds-shot-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.ds-shot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ds-shot-top strong { margin-right: auto; }
.ds-dir { font-size: 11px; padding: 1px 7px; white-space: nowrap; }
.ds-shot-desc { font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ds-shot-prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-shot-prompt-row { display: flex; align-items: center; gap: 8px; }
.ds-shot-prompt-row .ds-shot-prompt { flex: 1; min-width: 0; }
.ds-prompt-btn { flex: none; padding: 0; }
.ds-prompt-full { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.75; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.ds-shot-frames { color: var(--muted); }
.ds-shot-ops { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.ds-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ds-stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); }
.ds-stat span { display: block; font-size: 12px; color: var(--muted); }
.ds-stat b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ds-qc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.ds-qc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ds-qc-item { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.ds-qc-item.warn { border-color: color-mix(in srgb, #f59e0b 38%, var(--line)); }
.ds-qc-item.error { border-color: color-mix(in srgb, #ef4444 42%, var(--line)); }
.ds-qc-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--muted); flex: none; }
.ds-qc-item.warn .ds-qc-dot { background: #f59e0b; }
.ds-qc-item.error .ds-qc-dot { background: #ef4444; }
.ds-ok { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* 短剧：按集交付（补缺 / 成片 / 导出） */
.ds-delivery { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ds-delivery-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ds-delivery-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 14px; align-items: start; }
.ds-film { width: 100%; max-width: 380px; max-height: 214px; border-radius: 12px; background: #000; border: 1px solid var(--line); }
.ds-film-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: 12px; }

.err-text { color: #ef4444; }
@media (max-width: 900px) {
  .ds-form { grid-template-columns: 1fr; }
  .ds-eps { grid-template-columns: 1fr; }
  .ds-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-delivery-body { grid-template-columns: 1fr; }
  .ds-film { max-width: 100%; }
}
/* ---------- 2026-11 统一外壳：浅色侧栏 + 可折叠分组 ---------- */
.side { background: var(--panel); color: var(--ink-2); border-right: 1px solid var(--line); padding: 16px 12px; }
.brand b { color: var(--ink); }
.brand span { color: var(--muted-2); }
.nav-group { margin-top: 6px; }
.nav-group-title {
  display: flex; align-items: center; width: 100%; gap: 6px; border: 0; background: none;
  font-size: 11px; letter-spacing: .1em; color: var(--muted-2); padding: 8px 10px 5px;
  text-transform: uppercase; cursor: pointer; text-align: left;
}
.nav-group-title:hover { color: var(--ink-2); }
.nav-group-arrow { margin-left: auto; font-size: 13px; line-height: 1; transition: transform .15s; }
.nav-group.closed .nav-group-arrow { transform: rotate(-90deg); }
.nav-group.closed .nav-item { display: none; }
.nav-item { color: var(--ink-2); padding: 8px 11px; border-radius: 9px; font-weight: 550; }
.nav-item:hover { background: var(--chip); color: var(--ink); }
.nav-item.on { background: var(--brand-soft); color: var(--brand-ink); box-shadow: none; font-weight: 650; }
.nav-item .ico { opacity: .75; }
.side-foot { color: var(--muted-2); border-top: 1px solid var(--line); }
[data-theme="dark"] .side { background: var(--panel); }
[data-theme="dark"] .nav-item.on { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- 项目首页 ---------- */
.hub { display: flex; flex-direction: column; gap: 14px; }
.hub-crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.hub-crumb b { color: var(--ink); font-weight: 650; }
.hub-hero {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) repeat(4, 96px);
  gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
.hub-cover { width: 132px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--thumb); display: grid; place-items: center; }
.hub-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-cover-empty { font-size: 28px; font-weight: 700; color: var(--muted-2); }
.hub-title-row { display: flex; align-items: center; gap: 10px; }
.hub-title-row h1 { font-size: 28px; }
.hub-sub { color: var(--muted); margin-top: 4px; max-width: 720px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hub-stat { border-left: 1px solid var(--line); padding-left: 14px; display: flex; flex-direction: column; gap: 2px; }
.hub-stat b { font-size: 20px; letter-spacing: -0.02em; }
.hub-stat span { font-size: 12px; color: var(--muted); }
.hub-next {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(95deg, var(--brand-soft), var(--panel)); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px;
}
.hub-next > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hub-next b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-flow { padding-bottom: 8px; }
.hub-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.hub-step {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel-2); color: inherit; transition: border-color .15s, transform .15s;
}
.hub-step:hover { border-color: var(--brand); transform: translateY(-1px); }
.hub-step.done { border-color: rgba(15, 157, 88, .28); background: var(--ok-soft); }
.hub-step.doing { border-color: rgba(91, 91, 245, .35); }
.hub-step-no { font-size: 12px; font-weight: 700; color: var(--muted-2); padding-top: 2px; }
.hub-step-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hub-step-main b { font-size: 14px; }
.hub-step-main > span { font-size: 12px; color: var(--muted); }
.hub-step-meta { color: var(--muted-2) !important; }
.hub-step-state { font-size: 11px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.hub-step.done .hub-step-state { color: var(--ok); }
.hub-step.doing .hub-step-state { color: var(--brand-ink); }
.hub-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.hub-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hub-asset { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--thumb); }
.hub-asset img { width: 100%; height: 100%; object-fit: cover; }
.hub-asset-empty { display: grid; place-items: center; height: 100%; color: var(--muted-2); font-size: 12px; }
.hub-asset-type { position: absolute; left: 6px; top: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(15,23,42,.66); color: #fff; }
.hub-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.hub-info dt { font-size: 12px; color: var(--muted-2); }
.hub-info dd { margin: 2px 0 0; font-weight: 600; }
.hub-links { display: flex; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
@media (max-width: 1180px) {
  .hub-hero { grid-template-columns: 110px minmax(0, 1fr) repeat(2, 96px); }
  .hub-cover { width: 110px; height: 78px; }
  .hub-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hub-hero { grid-template-columns: 1fr; }
  .hub-stat { border-left: 0; border-top: 1px solid var(--line); padding: 8px 0 0; }
  .hub-steps { grid-template-columns: 1fr; }
  .hub-next { flex-direction: column; align-items: flex-start; }
}

.hub-stat b { white-space: nowrap; }
.hub-hero { grid-template-columns: 132px minmax(0, 1fr) repeat(4, 108px); }
.hub-asset.is-video { background: linear-gradient(135deg, #1b2550, #0e1428); display: grid; place-items: center; }
.hub-asset-play { color: #fff; font-size: 22px; opacity: .85; }
@media (max-width: 1180px) { .hub-hero { grid-template-columns: 110px minmax(0, 1fr) repeat(2, 108px); } }
@media (max-width: 760px) { .hub-hero { grid-template-columns: 1fr; } }

.proj-nav { display: flex; gap: 4px; padding: 4px; margin: 2px 0 14px; background: var(--chip); border-radius: 11px; width: fit-content; max-width: 100%; overflow-x: auto; }
.proj-nav-item { padding: 5px 12px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.proj-nav-item:hover { color: var(--ink); }
.proj-nav-item.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
[data-theme="dark"] .proj-nav-item.on { box-shadow: none; background: var(--panel-2); }


/* 项目上下文条：生成台 / 素材库共用，从项目进来时一直显示当前项目 */
.wb-ctx,.asset-ctx{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;margin:0 0 12px;border:1px solid var(--brand-line,#dcd8ff);background:var(--brand-soft,#f3f1ff);border-radius:12px;font-size:13px}
.wb-ctx b,.asset-ctx b{font-size: 14px}
.wb-ctx .link,.asset-ctx .link{background:none;border:0;padding:0;cursor:pointer;font-size: 12px;color:var(--brand-ink,#4f46e5)}
.wb-ctx .link[data-act=wb-ctx-clear]{margin-left:auto;color:var(--muted)}
.asset-ctx .link[data-act=asset-ctx-clear]{margin-left:auto;color:var(--muted)}


/* 创作 Agent 落地页：一句话入口 + 项目 + Skill，靠近参考产品的 Agent 首页 */
.agent-landing{min-height:calc(100vh - 150px);display:flex;align-items:center;justify-content:center;padding:24px 0 48px}
.agent-landing-inner{width:min(840px,100%);text-align:center}
.agent-landing-brand{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:14px;color:var(--ink-2)}
.agent-landing-logo{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff;font-size: 18px;font-weight:800;background:linear-gradient(135deg,#4f7cff,#34c6c0);box-shadow:0 8px 20px rgba(79,124,255,.25)}
.agent-landing h1{font-size: 32px;line-height:1.2;margin:18px 0 6px;letter-spacing:-.02em}
.agent-landing-sub{color:var(--muted);font-size:14px;margin:0 0 26px}
.agent-composer-lg{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:0 18px 48px rgba(31,45,80,.08);text-align:left}
.agent-composer-lg textarea{border:0;background:transparent;padding:8px 8px 4px;min-height:92px;font-size:15px;line-height:1.65;resize:vertical;outline:none;width:100%}
.agent-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line-2);padding-top:10px;margin-top:8px}
.agent-tool{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:5px 8px;background:var(--panel)}
.agent-tool span{font-size:11px;color:var(--muted);font-weight:600;white-space:nowrap}
.agent-tool select{border:0;background:transparent;font-size: 12px;max-width:180px;outline:none;color:var(--ink)}
.agent-tool-btn{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:6px 12px;font-size: 12px;color:var(--ink-2);cursor:pointer}
.agent-tool-btn:hover{border-color:var(--brand);color:var(--brand-ink)}
.agent-send{width:38px;height:38px;border-radius:50%;border:0;background:var(--brand);color:#fff;font-size:18px;cursor:pointer;display:grid;place-items:center}
.agent-send:hover{filter:brightness(1.06)}
.agent-skill-row{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:16px 0 0}
.agent-skill-card{text-align:left;border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:11px 13px;cursor:pointer;display:flex;flex-direction:column;gap:4px;min-height:66px;width:min(520px,100%)}
.agent-skill-card b{font-size: 12px;color:var(--ink)}
.agent-skill-card span{font-size: 12px;color:var(--muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.agent-skill-card em{font-style:normal;font-size: 11px;color:var(--brand-ink);background:var(--brand-soft);border-radius:999px;padding:2px 8px;align-self:flex-start;margin-top:2px}
.agent-skill-card.on{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.agent-landing-foot{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:20px;font-size:12px;color:var(--muted)}
.agent-landing-foot a{color:var(--brand-ink)}
.agent-back{margin-top:14px}
.agent-chat-head{flex-wrap:wrap;gap:8px}
.agent-skillbar{display:flex;align-items:center;gap:8px;padding:7px 0 9px;border-bottom:1px solid var(--line-2);margin-bottom:8px}
.agent-skillbar select{max-width:220px}
.agent-new{width:100%;margin-top:10px}
@media (max-width:900px){
  .agent-landing h1{font-size: 28px}
  .agent-skill-row{display:flex}
  .agent-tools .spacer{display:none}
}
.agent-skill-doc{max-height:48vh;overflow:auto;background:var(--panel-2,#f6f8fc);border:1px solid var(--line-2);border-radius:12px;padding:12px 14px;font-size: 12px;line-height:1.65;white-space:pre-wrap;word-break:break-word;margin:10px 0}
.agent-recent{max-width:840px;margin:22px auto 0;text-align:left}
.agent-recent-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.agent-recent-head h3{font-size:13px;margin:0}
.agent-recent-head a{font-size:12px;color:var(--brand-ink)}
.agent-recent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.agent-recent-item{display:block;aspect-ratio:16/9;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:var(--panel-2)}
.agent-recent-item img{width:100%;height:100%;object-fit:cover}

.agent-suggest-row{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;margin:13px 0 0}
.agent-suggest{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:6px 11px;font-size:12px;color:var(--ink-2);cursor:pointer}
.agent-suggest:hover{border-color:var(--brand);color:var(--brand-ink)}
.agent-suggest i{width:7px;height:7px;border-radius:2px;display:inline-block;background:#94a3b8}
.agent-suggest.s1 i{background:#5b5bf5}.agent-suggest.s2 i{background:#0ea5e9}.agent-suggest.s3 i{background:#f59e0b}.agent-suggest.s4 i{background:#10b981}.agent-suggest.s5 i{background:#ec4899}
.agent-home-block{max-width:840px;margin:24px auto 0;text-align:left}
.agent-home-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.agent-home-head h3{font-size:13px;margin:0}
.agent-home-head a,.agent-task-head a{font-size:12px;color:var(--brand-ink)}
.agent-home-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:10px;align-items:start}
.agent-project-card{display:flex;gap:12px;border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--panel);min-width:0;color:inherit}
.agent-project-card:hover{border-color:var(--brand);text-decoration:none}
.agent-project-cover{width:96px;height:74px;border-radius:10px;overflow:hidden;flex:none;display:grid;place-items:center;background:linear-gradient(135deg,#4f7cff,#34c6c0);color:#fff;font-weight:800;font-size:24px}
.agent-project-cover img{width:100%;height:100%;object-fit:cover}
.agent-project-body{min-width:0;flex:1}
.agent-project-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.agent-project-title b{font-size: 14px}
.agent-project-sub{font-size: 12px;color:var(--muted);margin-top:3px}
.agent-project-nums{display:flex;gap:12px;margin:8px 0 6px;font-size:11px;color:var(--muted)}
.agent-project-nums b{color:var(--ink);font-size: 12px;margin-right:2px}
.agent-project-bar{height:4px;border-radius:999px;background:var(--line-2);overflow:hidden}
.agent-project-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#5b5bf5,#22d3ee)}
.agent-project-note{margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-task-list{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:10px 12px;min-width:0}
.agent-task-head{display:flex;align-items:center;justify-content:space-between;font-size: 12px;color:var(--muted);margin-bottom:4px}
.agent-task{display:flex;align-items:center;gap:7px;padding:7px 0;border-top:1px solid var(--line-2);color:inherit;font-size: 12px}
.agent-task:hover{text-decoration:none;color:var(--brand-ink)}
.agent-task-kind{font-size:10px;border-radius:4px;background:var(--brand-soft);color:var(--brand-ink);padding:1px 5px;flex:none}
.agent-task-model{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:96px}
.agent-task-empty{font-size: 12px;color:var(--muted);padding:16px 0;text-align:center}
@media (max-width:900px){.agent-recent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.agent-home-grid{grid-template-columns:1fr}.agent-project-cover{width:78px;height:62px}}

/* 短剧全项目批量：总览 + 逐集进度 */
.ds-batch{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;margin:0 0 14px}
.ds-batch-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.ds-batch-head strong{font-size: 14px}
.ds-batch-list{display:flex;flex-direction:column;border-top:1px dashed var(--line-2)}
.ds-batch-row{display:grid;grid-template-columns:minmax(140px,1.6fr) 64px 88px 96px minmax(96px,1fr) minmax(72px,auto);gap:10px;align-items:center;padding:9px 2px;border-bottom:1px solid var(--line-2);font-size: 12px;color:var(--muted)}
.ds-batch-row strong{color:var(--ink);font-size: 12px}
.ds-batch-row .warn-text{color:var(--warn,#b45309);font-weight:600}
.ds-batch-row .ok-text{color:var(--ok,#15803d);font-weight:600}
@media (max-width:900px){
  .ds-batch-row{grid-template-columns:1fr 1fr;gap:5px 10px;padding:10px 2px}
  .ds-batch-row strong{grid-column:1 / -1}
}

/* ============================================================
   Seko 化外壳 v3 · 2026-11
   72px 图标栏 + 深色影院感 + 内容优先；旧页面全部复用
   ============================================================ */
:root { --rail: 72px; --rail-open: 236px; --seko: #63e6d2; --seko-ink: #0a0c10; }

[data-theme="dark"] body { background: radial-gradient(120% 90% at 50% -10%, #10141c 0%, #06070a 42%, #050608 100%); }
[data-theme="dark"] .card { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
[data-theme="dark"] .btn { background: #fff; color: #080a0e; border-color: #fff; }
[data-theme="dark"] .btn:hover { filter: none; background: #e9eef2; }
[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--ghost-line); }
[data-theme="dark"] .btn.ghost:hover { background: rgba(255,255,255,.05); }
[data-theme="dark"] .icon-btn { color: var(--ink-2); }
[data-theme="dark"] .icon-btn:hover { background: rgba(255,255,255,.07); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #5a6270; }
[data-theme="dark"] a { color: var(--brand-ink); }
[data-theme="dark"] .tag { background: rgba(255,255,255,.06); color: var(--ink-2); }
[data-theme="dark"] .tag.brand { background: var(--brand-soft); color: var(--brand-ink); }
[data-theme="dark"] .tag.ok { background: rgba(52,211,153,.12); color: #5ee2b0; }
[data-theme="dark"] .tag.failed { background: rgba(248,113,113,.12); color: #fca5a5; }

/* ---- 壳层 ---- */
.shell { grid-template-columns: var(--rail) minmax(0, 1fr); background: transparent; }
body.rail-open .shell { grid-template-columns: var(--rail-open) minmax(0, 1fr); }

.side {
  position: sticky; top: 0; height: 100vh; width: auto; padding: 14px 0 12px;
  background: #080a0e; border-right: 1px solid rgba(255,255,255,.07);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  color: var(--muted); overflow: visible; z-index: 60;
}
body.rail-open .side { align-items: stretch; padding: 14px 12px 12px; }

.rail-brand { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; margin-bottom: 18px; text-decoration: none; }
.rail-brand .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #74f0dc, #2bb7a6); color: #05221e; font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 1px rgba(99,230,210,.25), 0 8px 24px -10px rgba(99,230,210,.55);
}
.rail-brand .rail-word { display: none; color: #f1f4f8; font-weight: 650; font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
body.rail-open .rail-brand { justify-content: flex-start; padding-left: 8px; }
body.rail-open .rail-brand .rail-word { display: block; }

.rail-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
body.rail-open .rail-nav { align-items: stretch; }

.rail-item {
  position: relative; width: 46px; height: 44px; border: 0; border-radius: 12px; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 12px; color: #8e98a8; cursor: pointer;
  text-decoration: none; transition: background .16s, color .16s;
}
body.rail-open .rail-item { width: 100%; justify-content: flex-start; padding: 0 12px; }
.rail-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.rail-item.on { background: linear-gradient(90deg, rgba(99,230,210,.16), rgba(99,230,210,.045)); color: #effffb; box-shadow: inset 2px 0 0 var(--seko); }
.rail-item .rail-ico { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
.rail-item .rail-ico svg { width: 20px; height: 20px; }
.rail-label { display: none; font-size: 13px; font-weight: 560; white-space: nowrap; }
body.rail-open .rail-label { display: inline; }

/* 收起时用悬停提示补足文字 */
.rail-item[data-label]::after {
  content: attr(data-label); position: absolute; left: 58px; top: 50%; transform: translateY(-50%) translateX(-4px);
  background: #171c24; color: #eef2f6; border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
  padding: 5px 9px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .12s, transform .12s; z-index: 90; box-shadow: 0 12px 30px -12px rgba(0,0,0,.8);
}
.rail-item[data-label]:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
body.rail-open .rail-item[data-label]::after { display: none; }

.rail-spacer { flex: 1; }

.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: 10px; }
body.rail-open .rail-foot { align-items: stretch; }

.rail-credits {
  width: 54px; padding: 7px 0 6px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03); color: #dfe6ee; display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer; line-height: 1.15;
}
.rail-credits b { font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.rail-credits span { font-size: 10px; color: var(--muted-2); }
.rail-credits:hover { border-color: rgba(99,230,210,.4); color: #fff; }
body.rail-open .rail-credits { width: 100%; flex-direction: row; justify-content: space-between; padding: 9px 12px; }
body.rail-open .rail-credits b { font-size: 13px; }
body.rail-open .rail-credits span { font-size: 11px; }

.rail-more-wrap { position: relative; width: 100%; display: flex; justify-content: center; }
body.rail-open .rail-more-wrap { justify-content: stretch; }
.rail-more-wrap.open .more-panel { display: block; }
.more-panel {
  display: none; position: absolute; left: 58px; bottom: 0; width: 250px; padding: 8px;
  background: #0d1015; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.9); z-index: 95;
}
body.rail-open .more-panel { left: 0; bottom: 48px; width: 100%; }
.more-head { padding: 8px 10px 9px; font-size: 12px; font-weight: 650; color: #eef2f7; display: flex; justify-content: space-between; align-items: center; }
.more-head span { font-size: 10px; color: var(--muted-2); font-weight: 400; }
.more-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #aeb8c6; font-size: 12px; }
.more-item .rail-ico svg { width: 16px; height: 16px; }
.more-item em { margin-left: auto; font-style: normal; color: #4f5968; font-size: 11px; }
.more-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.more-item.on { background: var(--brand-soft); color: var(--brand-ink); }

.rail-pin {
  width: 34px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: #5c6676;
  display: grid; place-items: center; cursor: pointer;
}
.rail-pin:hover { background: rgba(255,255,255,.06); color: #dfe7ef; }
body.rail-open .rail-pin { width: 100%; justify-content: flex-start; padding: 0 10px; }

/* ---- 顶栏 ---- */
.main { padding: 0 34px 56px; }
.topbar {
  height: 64px; padding: 0; gap: 14px; background: rgba(6,7,10,.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06); margin: 0 -34px 0; padding: 0 26px 0 34px;
}
.crumb { font-size: 12px; color: #6f7887; gap: 7px; }
.crumb b { color: #e9eef3; font-weight: 560; }
.crumb-sep { color: #3d4450; }
.cmd-trigger {
  height: 34px; min-width: 260px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035); color: #7c8594; font-size: 12px; display: flex; align-items: center; gap: 8px;
}
.cmd-trigger:hover { border-color: rgba(255,255,255,.18); color: #cfd7e1; }
.cmd-trigger kbd { margin-left: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: #737d8c; font-size: 10px; padding: 2px 5px; border-radius: 4px; }
.new-btn { height: 34px; padding: 0 14px; font-size: 12px; border-radius: 9px; }
.new-wrap { position: relative; }
.new-panel {
  display: none; position: absolute; top: 42px; right: 0; width: 318px; padding: 8px;
  background: #0d1015; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  box-shadow: 0 34px 80px -24px rgba(0,0,0,.95); z-index: 80;
}
.new-wrap.open .new-panel { display: block; }
.new-head { padding: 8px 10px 10px; font-size: 11px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
.new-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); }
.new-item:hover { background: var(--surface-3); color: var(--text); }
.new-item .ni { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; color: var(--brand); font-size: 13px; flex: none; }
.new-item b { display: block; font-size: 12px; font-weight: 560; }
.new-item em { display: block; font-style: normal; color: var(--text-3); font-size: 11px; margin-top: 1px; }
.new-item kbd { margin-left: auto; color: var(--text-3); border: 1px solid var(--border-soft); border-radius: 4px; padding: 1px 5px; font-size: 10px; }
.credits-chip { height: 30px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: #dfe7ee; font-size: 12px; font-weight: 560; padding: 0 11px; }
.credits-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--seko); box-shadow: 0 0 8px rgba(99,230,210,.8); }
.bell { display: flex; }
.avatar { width: 30px; height: 30px; font-size: 12px; background: linear-gradient(140deg, #e8eef4, #a9b6c4); color: #11151b; font-weight: 700; }

.dropdown { background: #0d1015; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 34px 80px -24px rgba(0,0,0,.95); }
.user-drop .head { border-bottom-color: rgba(255,255,255,.07); }
.user-item { color: #b9c3d0; }
.user-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.user-item span { color: #687282; }

/* ---- 我的空间首页 ---- */
.home { max-width: 1290px; margin: 0 auto; padding-top: 26px; }
.home-skeleton { display: grid; gap: 16px; padding-top: 30px; }
.home-ann {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025); border-radius: 10px; font-size: 12px; color: #b8c2cf;
}
.home-ann .tag { font-size: 10px; }
.home-ann b { font-weight: 560; color: #dfe7ef; }
.home-ann .spacer { flex: 1; }

.home-hero { padding: 34px 0 30px; }
.home-kicker { display: flex; align-items: center; gap: 8px; color: #9aa5b4; font-size: 12px; letter-spacing: .04em; }
.home-kicker .k-sep { color: #3f4652; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--seko); box-shadow: 0 0 10px rgba(99,230,210,.8); }
.home-hero h1 { font-size: 42px; line-height: 1.14; letter-spacing: -.035em; margin: 14px 0 8px; font-weight: 680; color: #f4f7fa; }
.home-lede { color: #8b95a4; font-size: 14px; margin-bottom: 26px; }

.composer {
  width: min(900px, 100%); border: 1px solid rgba(255,255,255,.11); border-radius: 18px;
  background: linear-gradient(180deg, #0d1016, #0a0d12); padding: 0 10px 9px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent), 0 30px 80px -40px rgba(0,0,0,.55); }
.comp-tabs { display: flex; gap: 2px; padding: 9px 2px 0; border-bottom: 1px solid var(--border-soft); }
.comp-tabs button {
  position: relative; border: 0; background: transparent; color: #7a8494; font-size: 12px; font-weight: 520;
  padding: 7px 12px 9px; border-radius: 8px 8px 0 0; cursor: pointer;
}
.comp-tabs button:hover { color: var(--text); }
.comp-tabs button.on { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.comp-tabs button.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 1px; background: var(--seko); }
.tag-new { margin-left: 6px; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-ink); vertical-align: 1px; }
.composer textarea {
  width: 100%; border: 0; background: transparent; resize: none; outline: none;
  padding: 15px 12px 8px; font-size: 14px; line-height: 1.7; min-height: 94px; color: #e8eef4;
}
.comp-foot { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; }
.comp-chip {
  height: 27px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: #95a0af; font-size: 11px;
}
.comp-chip b { color: #dce4ec; font-weight: 560; }
.comp-chip:hover { border-color: rgba(255,255,255,.18); color: #e8eef4; }
.comp-model {
  height: 27px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: #95a0af; font-size: 11px;
}
.comp-model > span { font-size: 10px; letter-spacing: .1em; color: #66707f; }
.comp-model select {
  height: 23px; max-width: 132px; border: 0; padding: 0 2px; background: transparent; color: #dce4ec;
  font-size: 11px; font-family: inherit; cursor: pointer;
}
.comp-model select:focus { outline: none; }
.comp-model select option { background: #14181d; color: #dce4ec; }
.comp-est { font-size: 11px; color: #66707f; margin-left: 2px; }
.comp-est b { color: var(--brand-ink); font-weight: 600; }
.comp-hint { font-size: 10px; color: #4c5563; }
.comp-send {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #080b10;
  display: grid; place-items: center; cursor: pointer; transition: transform .12s, background .12s;
}
.comp-send:hover { transform: translateY(-1px); background: var(--seko); }
.comp-send svg { width: 16px; height: 16px; }
.spacer { flex: 1; }
.quick-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; width: min(900px, 100%); }
.qc-label { font-size: 10px; color: #525b69; letter-spacing: .1em; text-transform: uppercase; margin-right: 2px; }
.quick-chips button {
  height: 27px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,.075);
  background: transparent; color: #8c96a5; font-size: 11px;
}
.quick-chips button:hover { color: var(--text); border-color: var(--border); background: var(--surface); }
.qc-more { margin-left: 4px; font-size: 11px; color: #626c7a; }
.qc-more:hover { color: var(--brand-ink); }

.home-section { padding: 20px 0 6px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 14px; font-weight: 620; color: #e9eef4; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; }
.sec-count { font-size: 11px; color: #5d6775; font-weight: 400; }
.sec-link { font-size: 11px; color: #7e8998; }
.sec-link:hover { color: var(--brand-ink); }
.sec-tools { display: flex; align-items: center; gap: 12px; }
.seg-mini { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--border-soft); }
.seg-mini button { height: 22px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); font-size: 11px; }
.seg-mini button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.08); }

.cont-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cont-card {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0; min-height: 104px;
  border: 1px solid rgba(255,255,255,.075); border-radius: 12px; background: #0b0e13; overflow: hidden;
  color: inherit; transition: border-color .15s, transform .15s, background .15s;
}
.cont-card:hover { border-color: rgba(255,255,255,.18); background: #0e1218; transform: translateY(-1px); }
.cont-cover { position: relative; background: #11161d; overflow: hidden; }
.cont-cover img, .hc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cont-cover .pc-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 9px; background: radial-gradient(140% 110% at 85% 0%, hsl(var(--ph, 190) 42% 24%), transparent 62%), linear-gradient(150deg, hsl(var(--ph, 190) 32% 16%), #0b0e13 72%); }
.cont-cover .pc-fallback em, .hc-cover .pc-fallback em { font-style: normal; font-size: 10px; font-weight: 500; letter-spacing: .14em; color: rgba(255,255,255,.32); }
.cont-main { padding: 12px 13px 10px; display: flex; flex-direction: column; min-width: 0; }
.cont-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cont-top b { font-size: 12px; font-weight: 560; color: #edf2f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-top .tag { flex: none; font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.cont-sub { font-size: 11px; color: #7b8593; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-prog { height: 2px; background: rgba(255,255,255,.07); border-radius: 2px; margin: 9px 0 8px; overflow: hidden; }
.cont-prog i { display: block; height: 100%; background: var(--seko); border-radius: 2px; }
.cont-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #707a88; }
.cont-foot em { font-style: normal; color: #aab5c2; }
.cont-card:hover .cont-foot em { color: var(--brand-ink); }

.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-card {
  border: 1px solid rgba(255,255,255,.075); border-radius: 12px; background: #0b0e13; overflow: hidden; cursor: pointer;
  transition: border-color .16s, transform .16s, background .16s;
}
.home-card:hover { border-color: rgba(255,255,255,.18); transform: translateY(-2px); background: #0e1218; }
.hc-cover { position: relative; aspect-ratio: 16 / 9; background: #10151c; overflow: hidden; }
.hc-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(4,6,9,.55)); }
.hc-cover .pc-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; background: radial-gradient(90% 80% at 70% 20%, hsl(var(--ph, 190) 40% 23%), transparent 62%), linear-gradient(150deg, hsl(var(--ph, 190) 30% 15%), #0b0e13 70%); }
.hc-tag { position: absolute; z-index: 2; top: 8px; left: 8px; font-size: 10px; padding: 2px 7px; border-radius: 4px; background: rgba(8,11,15,.66); color: #c7d1dc; border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.hc-tag.brand { color: var(--brand-ink); border-color: rgba(99,230,210,.3); }
.hc-tag.ok { color: #7ce9c0; border-color: rgba(52,211,153,.3); }
.hc-dur { position: absolute; z-index: 2; right: 8px; bottom: 7px; font-size: 10px; color: #c4cfda; background: rgba(8,11,15,.66); border-radius: 4px; padding: 1px 5px; }
.hc-body { padding: 10px 11px 9px; }
.hc-body b { font-size: 12px; font-weight: 560; color: #e9eef4; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-meta { font-size: 10px; color: #6d7785; margin-top: 3px; }
.hc-foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 10px; color: #66717f; }
.hc-bar { flex: 1; height: 2px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.hc-bar i { display: block; height: 100%; background: rgba(99,230,210,.7); }
.hc-foot em { margin-left: auto; font-style: normal; color: #5d6775; }

.job-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.job-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.07);
  border-radius: 9px; background: #0b0e13; color: #9aa5b4; font-size: 11px;
}
.job-pill:hover { border-color: rgba(255,255,255,.6); color: #e7edf4; }
.job-pill b { color: #d7e0ea; font-weight: 560; }
.jp-kind { color: #7e8998; }
.jp-cost { color: var(--brand-ink); }
.jp-time { color: #5f6977; }
.job-pill .tag { font-size: 10px; padding: 1px 5px; }

.home-stats {
  display: flex; align-items: center; gap: 22px; margin-top: 26px; padding: 13px 2px;
  border-top: 1px solid rgba(255,255,255,.07); color: #66717f; font-size: 11px;
}
.home-stats b { color: #c4cfdb; font-weight: 560; font-size: 12px; margin-right: 3px; }
.hs-note { color: #525b69; }
.hs-btn { border: 1px solid rgba(255,255,255,.08); background: transparent; color: #7f8a99; font-size: 10px; height: 24px; padding: 0 8px; border-radius: 6px; }
.hs-btn:hover { color: #dfe7ef; border-color: rgba(255,255,255,.2); }

.pref-list { display: grid; gap: 2px; margin-top: 12px; }
.pref-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pref-row:hover { background: rgba(255,255,255,.05); }
.pref-row input { width: 15px; height: 15px; accent-color: var(--seko); }

@media (max-width: 1180px) {
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-hero h1 { font-size: 36px; }
}
@media (max-width: 980px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cont-grid { grid-template-columns: 1fr; }
  .cmd-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .cmd-trigger span, .cmd-trigger kbd { display: none; }
}
@media (max-width: 900px) {
  .shell, body.rail-open .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 248px; transform: translateX(-100%); transition: transform .2s; padding: 14px 12px; align-items: stretch; }
  .side.open { transform: none; }
  body.rail-open .side { align-items: stretch; }
  .rail-brand { justify-content: flex-start; padding-left: 8px; }
  .rail-brand .rail-word { display: block; }
  .rail-nav { align-items: stretch; }
  .rail-item { width: 100%; justify-content: flex-start; padding: 0 12px; }
  .rail-label { display: inline; }
  .rail-item[data-label]::after { display: none; }
  .rail-foot { align-items: stretch; }
  .rail-credits { width: 100%; flex-direction: row; justify-content: space-between; padding: 9px 12px; }
  .rail-more-wrap { justify-content: stretch; }
  .more-panel { left: 0; bottom: 48px; width: 100%; }
  .main { padding: 0 16px 40px; }
  .topbar { margin: 0 -16px; padding: 0 12px 0 8px; height: 56px; }
  .home-hero h1 { font-size: 32px; }
  .home-hero { padding-top: 22px; }
  .home-stats { flex-wrap: wrap; gap: 10px 16px; }
}

/* ---- 项目内导航：5 项 + 更多 ---- */
.proj-nav {
  display: flex; align-items: center; gap: 2px; padding: 0; margin: 2px 0 16px;
  background: transparent; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0;
  width: fit-content; max-width: 100%; overflow: visible;
}
.proj-nav-item {
  position: relative; padding: 8px 13px 10px; border-radius: 0; color: #7f8a99; font-size: 12px; font-weight: 540;
  white-space: nowrap; background: transparent;
}
.proj-nav-item:hover { color: var(--text); background: transparent; }
.proj-nav-item.on { color: var(--text); background: transparent; box-shadow: none; }
.proj-nav-item.on::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--seko); border-radius: 2px; }
[data-theme="dark"] .proj-nav-item.on { background: transparent; box-shadow: none; }
.proj-more-panel {
  position: absolute; right: 0; top: 34px; z-index: 50; width: 158px; padding: 6px;
  background: #0d1015; border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.9);
}

[data-theme="dark"] .preview-box { background: var(--panel-2); border-color: var(--line); }
[data-theme="dark"] .script-item.on { background: rgba(99,230,210,.07); border-color: rgba(99,230,210,.24); }
[data-theme="dark"] .shot-item { background: #0c0f14; border-color: rgba(255,255,255,.07); }
[data-theme="dark"] .shot-item:hover { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .shot-item.on { border-color: rgba(99,230,210,.4); box-shadow: 0 0 0 3px rgba(99,230,210,.06); }

@media (max-width: 640px) {
  .proj-nav { width: 100%; overflow-x: auto; }
  .proj-nav-item { padding-left: 10px; padding-right: 10px; }
}

/* ---- 浅色主题：保持同一套壳层，不退回仪表盘 ---- */
[data-theme="light"] body { background: #f4f5f7; }
[data-theme="light"] .new-btn { background: #101828; border-color: #101828; color: #fff; }
[data-theme="light"] .comp-tabs button { color: #667085; }
[data-theme="light"] .comp-send { background: #101828; color: #fff; }
[data-theme="light"] .cont-card:hover, [data-theme="light"] .home-card:hover { background: #fff; border-color: #cfd4dc; }
[data-theme="light"] .cont-foot em, [data-theme="light"] .hc-foot em { color: #98a2b3; }
/* ---- 项目工作台：导演台 / 分镜网格 / 检查器 ---- */
.pw-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 6px 0 10px; }
.pw-kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #5f6b7a; margin-bottom: 4px; }
.pw-title h1 { font-size: 24px; letter-spacing: -.03em; color: #f2f6fa; line-height: 1.15; }
.pw-title > span { display: block; margin-top: 4px; font-size: 11px; color: #7f8a99; }
.pw-top-ops { display: flex; gap: 8px; }

.pw { display: grid; grid-template-columns: 280px minmax(0, 1fr) 306px; gap: 12px; align-items: start; }
.pw-side, .pw-inspect {
  background: #0a0d12; border: 1px solid rgba(255,255,255,.07); border-radius: 14px;
  position: sticky; top: 74px;
}
.pw-side { display: flex; flex-direction: column; padding: 14px; height: calc(100vh - 230px); min-height: 560px; overflow: auto; }
.pw-inspect { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 520px; overflow: hidden; }

.dp-title { display: flex; align-items: center; gap: 9px; }
.dp-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #04211d;
  background: linear-gradient(135deg, #8bf3e2, #4bcbb8);
}
.dp-title b { display: block; font-size: 12px; color: #f2f6fa; }
.dp-title span { display: block; font-size: 10px; color: #6f7b8a; margin-top: 1px; }
.dp-note { margin: 12px 0 10px; font-size: 11px; line-height: 1.65; color: #7f8a99; }
.dp-checks { display: flex; flex-direction: column; }
.dc { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.05); font-size: 11px; color: #98a3b2; }
.dc i { font-style: normal; font-size: 10px; color: #4c5665; }
.dc.done i { color: #63e6d2; }
.dc.done span { color: #c8d1dc; }
.dc em { font-style: normal; font-size: 10px; color: #5f6b7a; }
.dp-sec { margin: 16px 0 7px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #5f6b7a; display: flex; justify-content: space-between; }
.dp-sec span { letter-spacing: 0; text-transform: none; }
.dp-eps { display: flex; flex-direction: column; gap: 3px; }
.dp-ep { text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 7px 8px; cursor: pointer; }
.dp-ep:hover { background: var(--surface-3); }
.dp-ep.on { background: color-mix(in srgb, var(--brand) 10%, transparent); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.dp-ep b { display: block; font-size: 11px; color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-ep span { display: block; font-size: 10px; color: var(--text-3); margin-top: 1px; }
.dp-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.dp-agent { font-size: 10px; color: #8fa0b2; display: flex; justify-content: space-between; padding: 6px 2px; }
.dp-agent:hover { color: #63e6d2; }

.pw-main { background: #0a0d12; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; min-height: calc(100vh - 230px); display: flex; flex-direction: column; overflow: hidden; }
.pw-stage-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); background: var(--surface); color: var(--text-2); }
.ps-title { min-width: 0; flex: 1; }
.ps-title h2 { font-size: 14px; color: #f2f6fa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-title span { display: block; margin-top: 2px; font-size: 10px; color: #6f7b8a; }
.ps-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--border-soft); }
.ps-tabs button { border: 0; background: transparent; color: var(--text-3); font-size: 11px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.ps-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.ps-ops { display: flex; gap: 6px; }
.ps-ops .btn { font-size: 10px; padding: 5px 8px; }

.shot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 12px; align-content: start; overflow: auto; }
.shot-card { background: #0d1117; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.shot-card:hover { border-color: rgba(255,255,255,.18); transform: translateY(-1px); }
.shot-card.on { border-color: rgba(99,230,210,.55); box-shadow: 0 0 0 1px rgba(99,230,210,.18); }
.sc-media { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(120% 120% at 20% 0%, #16202a, #0b0f14 65%); display: grid; place-items: center; overflow: hidden; }
.sc-media img, .sc-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-empty { font-size: 10px; color: #5f6b7a; letter-spacing: .08em; }
.sc-dur { position: absolute; right: 5px; bottom: 5px; font-size: 10px; padding: 1px 4px; border-radius: 4px; background: rgba(0,0,0,.62); color: #dfe7ef; }
.sc-badge { position: absolute; left: 5px; top: 5px; font-size: 10px; padding: 1px 5px; border-radius: 999px; background: rgba(8,10,14,.72); color: #98a3b2; border: 1px solid rgba(255,255,255,.1); }
.sc-badge.brand { color: #a9f4e8; border-color: rgba(99,230,210,.3); }
.sc-badge.ok { color: #9ff0c4; border-color: rgba(80,220,140,.3); }
.sc-body { padding: 7px 8px 8px; }
.sc-body b { display: block; font-size: 10px; color: #dfe7ef; font-weight: 550; }
.sc-body p { margin: 3px 0 0; font-size: 10px; line-height: 1.5; color: #778291; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 28px; }
.shot-add { border: 1px dashed rgba(255,255,255,.14); background: transparent; border-radius: 10px; min-height: 129px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #6f7b8a; cursor: pointer; }
.shot-add:hover { border-color: rgba(99,230,210,.4); color: #a9f4e8; }
.shot-add b { font-size: 18px; font-weight: 300; }
.shot-add span { font-size: 10px; }

.pw-queue { margin-top: auto; display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-top: 1px solid rgba(255,255,255,.06); font-size: 10px; color: #6f7b8a; }
.pq-dot { width: 5px; height: 5px; border-radius: 50%; background: #63e6d2; box-shadow: 0 0 0 3px rgba(99,230,210,.1); }
.pq-right { margin-left: auto; color: #4f5a68; }

.ins-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); flex: 0 0 auto; }
.ins-tabs button { flex: 1; border: 0; background: transparent; color: #778291; font-size: 10px; padding: 5px; border-radius: 6px; cursor: pointer; }
.ins-tabs button.on { background: rgba(255,255,255,.08); color: #f2f6fa; }
.ins-scroll { overflow: auto; padding: 10px 12px 14px; }
.ins-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ins-head b { font-size: 12px; color: #f2f6fa; }
.ins-head .tag { font-size: 10px; }
.ins-preview { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: radial-gradient(120% 120% at 20% 0%, #16202a, #0b0f14 65%); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.06); }
.ins-preview img, .ins-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-link { margin-top: 5px; font-size: 10px; }
.ins-link a { color: #7f8a99; }
.pw-inspect label { display: block; margin-top: 9px; font-size: 10px; color: #778291; }
.pw-inspect input, .pw-inspect select, .pw-inspect textarea {
  width: 100%; margin-top: 4px; background: #0d1117; border: 1px solid rgba(255,255,255,.09);
  border-radius: 6px; color: #e7edf4; font-size: 11px; padding: 6px 7px; outline: none;
}
.pw-inspect input:focus, .pw-inspect select:focus, .pw-inspect textarea:focus { border-color: rgba(99,230,210,.45); }
.pw-inspect textarea { resize: vertical; line-height: 1.55; }
.ins-grid { display: grid; grid-template-columns: 1fr 88px; gap: 8px; }
.ins-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.ins-row .btn { flex: 1; }
.ins-sep { margin: 14px 0 2px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #5f6b7a; }
.ins-gen { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ins-gen em { font-style: normal; font-size: 10px; opacity: .65; }
.ins-audio { width: 100%; margin-top: 8px; }
.ins-note { margin-top: 9px; font-size: 10px; line-height: 1.6; color: #5f6b7a; }
.ins-empty { padding: 24px 14px; font-size: 11px; line-height: 1.7; color: #6f7b8a; }
.ins-scroll .card { background: #0d1117; border-color: rgba(255,255,255,.07); box-shadow: none; margin-bottom: 9px; }
.ins-scroll .card-head h2 { font-size: 12px; }

.stage-script { padding: 13px 14px 12px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ss-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.ss-head h3 { font-size: 13px; color: #f2f6fa; }
.ss-head span { display: block; margin-top: 2px; font-size: 10px; color: #6f7b8a; }
.ss-ops { display: flex; gap: 6px; align-items: center; }
.ss-ops select { width: 180px; }
.stage-script textarea {
  flex: 1; min-height: 420px; width: 100%; background: #0d1117; border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; color: #dfe7ef; font-size: 12px; line-height: 1.9; padding: 12px; outline: none; resize: none;
}
.stage-script textarea:focus { border-color: rgba(99,230,210,.4); }
.ss-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 10px; color: #5f6b7a; }
.stage-empty { padding: 16px; }
.stage-empty .empty { background: transparent; }

@media (max-width: 1320px) { .pw { grid-template-columns: 246px minmax(0,1fr) 286px; } .shot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 1120px) {
  .pw { grid-template-columns: 1fr; }
  .pw-side, .pw-inspect { position: static; max-height: none; min-height: 0; }
  .pw-side { order: 2; } .pw-inspect { order: 3; }
  .pw-main { min-height: 64vh; }
  .shot-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .shot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pw-stage-head { flex-wrap: wrap; }
  .ps-title { flex-basis: 100%; }
}

/* ---- 项目列表：Seko 式封面卡 ---- */
.page-kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #5f6b7a; margin-bottom: 5px; }
.dr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.dr-count { font-size: 11px; color: #6f7b8a; }
.dr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dr-card { background: #0b0e13; border: 1px solid rgba(255,255,255,.075); border-radius: 12px; overflow: hidden; transition: border-color .15s, transform .15s; }
.dr-card:hover { border-color: rgba(255,255,255,.18); transform: translateY(-2px); }
.dr-cover { position: relative; aspect-ratio: 16 / 9; background: #10151c; overflow: hidden; }
.dr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; background: radial-gradient(90% 80% at 70% 20%, hsl(var(--ph, 190) 40% 23%), transparent 62%), linear-gradient(150deg, hsl(var(--ph, 190) 30% 15%), #0b0e13 70%); }
.dr-fallback b { font-size: 10px; font-weight: 500; color: rgba(255,255,255,.4); }
.dr-status { position: absolute; left: 8px; top: 8px; font-size: 10px; padding: 2px 7px; border-radius: 4px; background: rgba(8,11,15,.7); color: #c7d1dc; border: 1px solid rgba(255,255,255,.1); }
.dr-status.ok { color: #7ce9c0; border-color: rgba(52,211,153,.3); }
.dr-dur { position: absolute; right: 8px; bottom: 7px; font-size: 10px; color: #c4cfda; background: rgba(8,11,15,.66); border-radius: 4px; padding: 1px 5px; }
.dr-body { padding: 11px 12px 10px; }
.dr-eyebrow { font-size: 10px; color: #6f7b8a; letter-spacing: .02em; }
.dr-body h3 { font-size: 13px; margin-top: 3px; color: #e9eef4; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-syn { margin: 4px 0 10px; font-size: 10px; line-height: 1.55; color: #778291; min-height: 31px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drp { margin-bottom: 7px; }
.drp-head { display: flex; justify-content: space-between; font-size: 10px; color: #6f7b8a; margin-bottom: 3px; }
.drp-head em { font-style: normal; color: #8b96a4; }
.drp-bar { height: 2px; border-radius: 2px; background: rgba(255,255,255,.07); overflow: hidden; }
.drp-bar i { display: block; height: 100%; background: rgba(99,230,210,.72); }
.dr-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 10px; color: #66717f; }
.dr-open { margin-left: auto; color: #a9b4c2; }
.dr-open:hover { color: #63e6d2; }
.dr-ops { display: flex; gap: 6px; margin-top: 10px; }
.dr-ops .btn { flex: 1; font-size: 10px; padding: 6px 8px; }

@media (max-width: 1280px) { .dr-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px) { .dr-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .dr-grid { grid-template-columns: 1fr; } }

[data-theme="light"] .dr-dur { background: rgba(16,24,40,.62); color: #fff; }
[data-theme="light"] .dr-eyebrow, [data-theme="light"] .drp-head, [data-theme="light"] .dr-meta { color: #98a2b3; }
/* ---- 项目总览：深色影院感 ---- */
.hub { max-width: 1320px; }
.hub-crumb { font-size: 10px; color: #66717f; margin: 2px 0 8px; }
.hub-crumb a { color: #8b96a4; }
.hub-crumb b { color: #b9c3cf; font-weight: 500; }
.hub-hero { background: #0b0e13; border: 1px solid rgba(255,255,255,.075); border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 18px; }
.hub-cover { width: 150px; height: 96px; border-radius: 9px; overflow: hidden; background: #121821; flex: 0 0 auto; }
.hub-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-cover-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 22px; color: rgba(255,255,255,.2); }
.hub-hero-main { min-width: 0; flex: 1; }
.hub-title-row { display: flex; align-items: center; gap: 9px; }
.hub-title-row h1 { font-size: 24px; letter-spacing: -.02em; color: #f2f5f8; }
.hub-sub { color: #7f8a98; font-size: 11px; margin-top: 4px; max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-chips { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.hub-chips .chip.plain { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.07); color: #8d98a5; font-size: 10px; }
.hub-actions { display: flex; align-items: center; gap: 6px; margin-top: 11px; }
.hub-actions .btn { font-size: 11px; padding: 7px 12px; }
.hub-actions .btn .ar { transition: transform .15s; }
.hub-actions .btn:hover .ar { transform: translateX(2px); }
.hub-minor { display: flex; gap: 9px; margin-left: 5px; }
.hub-minor a { font-size: 10px; color: #6f7b8a; }
.hub-minor a:hover { color: #b9c3cf; }
.hub-stat { text-align: right; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.07); min-width: 74px; }
.hub-stat b { display: block; font-size: 18px; font-weight: 550; color: #e9eef4; letter-spacing: -.02em; }
.hub-stat span { font-size: 10px; color: #66717f; }
.hub-next { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; background: #0d1117; border: 1px solid rgba(255,255,255,.075); border-radius: 11px; padding: 10px 13px; }
.hub-next > div { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #b9c3cf; }
.hub-next .tag.brand { background: rgba(99,230,210,.1); color: #63e6d2; border-color: rgba(99,230,210,.22); }
.hub-flow.card { background: #0b0e13; border-color: rgba(255,255,255,.075); margin-top: 10px; }
.hub-flow .card-head { padding-bottom: 0; border: 0; }
.hub-flow .card-head h2 { font-size: 12px; }
.hub-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.hub-step { display: flex; gap: 9px; padding: 10px 11px; border-radius: 8px; background: #0e1218; border: 1px solid rgba(255,255,255,.065); position: relative; transition: border-color .15s, background .15s; }
.hub-step:hover { background: #11161e; border-color: rgba(255,255,255,.14); }
.hub-step.done { background: #0b1311; border-color: rgba(52,211,153,.14); }
.hub-step.doing { background: #0d1219; border-color: rgba(99,230,210,.34); }
.hub-step-no { font-size: 10px; color: #4e5a68; font-variant-numeric: tabular-nums; padding-top: 1px; }
.hub-step-main { min-width: 0; flex: 1; }
.hub-step-main b { display: block; font-size: 12px; color: #dbe3ea; font-weight: 520; }
.hub-step-main > span { display: block; font-size: 10px; color: #6b7684; margin-top: 2px; }
.hub-step-main .hub-step-meta { color: #7e8997; margin-top: 4px; }
.hub-step-state { font-size: 10px; color: #5f6a78; white-space: nowrap; }
.hub-step.done .hub-step-state { color: #4fd1a5; }
.hub-step.doing .hub-step-state { color: #63e6d2; }
.hub-cols { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 10px; margin-top: 10px; }
.hub-cols .card { background: #0b0e13; border-color: rgba(255,255,255,.075); }
.hub-cols .card-head { border: 0; padding-bottom: 8px; }
.hub-assets { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.hub-asset { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #121821; }
.hub-asset img { width: 100%; height: 100%; object-fit: cover; }
.hub-asset-type { position: absolute; left: 5px; bottom: 4px; font-size: 10px; color: rgba(255,255,255,.7); }
.hub-info { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
.hub-info dt { font-size: 10px; color: #5f6a78; }
.hub-info dd { margin: 1px 0 0; font-size: 11px; color: #b9c3cf; }
.hub-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.06); }
.hub-links a { font-size: 10px; color: #6f7b8a; }

[data-theme="light"] .hub-hero, [data-theme="light"] .hub-flow.card, [data-theme="light"] .hub-cols .card { background: #fff; border-color: #e4e7ec; }
/* 工作台在浅色主题下仍是暗色编辑区，只把页面标题与导航留浅 */
[data-theme="light"] .pw-side, [data-theme="light"] .pw-stage, [data-theme="light"] .pw-inspect { border-color: #e4e7ec; }

/* 时间轴：分镜 chips 横向滚动，不再被右栏裁切 */
.ta-center { min-width: 0; }
.ta-strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.ta-strip button { flex: 0 0 auto; }

[data-theme="light"] .pw-body, [data-theme="light"] .pw input, [data-theme="light"] .pw select, [data-theme="light"] .pw textarea { background: #0f141b; color: #dbe3ea; border-color: rgba(255,255,255,.1); }
[data-theme="light"] .pw input::placeholder, [data-theme="light"] .pw textarea::placeholder { color: #6f7b8a; }
[data-theme="light"] .pw select option { background: #0f141b; color: #dbe3ea; }

[data-theme="light"] .pw-inspect input,
[data-theme="light"] .pw-inspect select,
[data-theme="light"] .pw-inspect textarea {
  background: #0f141b !important;
  color: #dbe3ea !important;
  border-color: rgba(255,255,255,.1) !important;
  -webkit-text-fill-color: #dbe3ea;
}


/* Agent 落地页：Seko 式大标题 */
.agent-landing-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .12em; color: #63e6d2; text-transform: uppercase; }
.agent-landing-kicker > span { width: 5px; height: 5px; border-radius: 50%; background: #63e6d2; box-shadow: 0 0 0 3px rgba(99,230,210,.12); }
.agent-landing h1 { color: #f2f6fa; font-size: 40px; letter-spacing: -.025em; }
.agent-landing-sub { color: #7f8a98; font-size: 12px; }
.agent-landing .agent-composer { background: #0b0e13; border-color: rgba(255,255,255,.1); box-shadow: none; }
.agent-landing .agent-composer textarea { color: #dbe3ea; }
.agent-landing .agent-composer textarea::placeholder { color: #5f6a78; }

.agent-landing .agent-composer { display: block; padding: 12px 12px 10px; }
.agent-landing .agent-composer textarea { width: 100%; min-height: 84px; font-size: 13px; }
.agent-landing .agent-tools { border-top: 1px solid rgba(255,255,255,.06); margin-top: 6px; }

.rail-pin .pin-glyph::before { content: "»"; font-size: 14px; line-height: 1; }
body.rail-open .rail-pin .pin-glyph::before { content: "«"; }

@media (max-width: 560px) {
  .topbar { gap: 5px; padding: 0 10px; height: 56px; overflow: hidden; }
  .topbar .crumb { min-width: 0; overflow: hidden; white-space: nowrap; }
  .topbar .bell { display: none; }
  .topbar .new-btn { height: 32px; padding: 0 10px; font-size: 11px; }
  .topbar .credits-chip { font-size: 10px; padding: 3px 7px; }
  .main { padding: 0 12px 88px; }
  .home { padding-top: 10px; }
  .home-ann { font-size: 10px; gap: 6px; padding: 6px 8px; }
  .home-ann .ann-body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .home-hero { padding: 8px 0 4px; }
  .home-hero h1 { font-size: 32px; line-height: 1.15; margin: 10px 0 7px; }
  .home-lede { font-size: 11px; line-height: 1.65; max-width: none; }
  .composer { position: relative; border-radius: 14px; padding: 9px 10px 10px; }
  .composer textarea { min-height: 64px; padding: 6px 2px; font-size: 12px; }
  .comp-tabs button { font-size: 10px; padding: 6px 7px; }
  .comp-foot { flex-wrap: wrap; gap: 5px; padding: 4px 42px 0 0; }
  .comp-chip { font-size: 10px; padding: 4px 6px; gap: 4px; }
  .comp-est { flex: 1 0 100%; order: 9; margin: 0; font-size: 10px; }
  .comp-hint { display: none; }
  .comp-send { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; }
  .quick-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .quick-chips button { flex: 0 0 auto; font-size: 10px; }
  .home-section { padding-top: 18px; }
  .sec-head h2 { font-size: 13px; }
  .home-grid, .cont-grid { grid-template-columns: 1fr; }
  .sec-head { gap: 8px; }
}

@media (max-width: 560px) {
  .qc-label { display: none; }
  .home-ann { flex-wrap: nowrap; }
  .home-ann a { flex: 0 0 auto; white-space: nowrap; }
  .home-ann .ann-body { min-width: 0; }
}

@media (max-width: 560px) {
  .home-ann .tiny.muted { display: none; }
  .home-ann b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- P4 画布列表 ---------- */
.wf-bar { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 14px; }
.wf-bar > span:first-child { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.wf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wf-tile { overflow: hidden; padding: 0; background: var(--panel); border: 1px solid var(--line); transition: border-color .16s ease, transform .16s ease; }
.wf-tile:hover { border-color: rgba(99, 230, 210, .38); transform: translateY(-1px); }
.wf-tile .wf-preview { position: relative; height: 178px; border-bottom: 1px solid var(--line); background:
  radial-gradient(120% 100% at 15% 0%, rgba(99, 230, 210, .08), transparent 55%),
  radial-gradient(90% 90% at 100% 100%, rgba(139, 124, 255, .12), transparent 60%),
  #080b10; overflow: hidden; }
.wf-preview::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 14px 14px; opacity: .35; }
.wf-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wf-pv-card { fill: rgba(255,255,255,.045); stroke: rgba(255,255,255,.14); }
.wf-pv-label { fill: #d7e0ec; font-size: 10px; font-weight: 650; letter-spacing: .04em; }
.wf-pv-lines path { fill: none; stroke: rgba(160, 255, 238, .22); stroke-width: 1; }
.wf-count-badge { position: absolute; left: 12px; bottom: 11px; padding: 3px 7px; border-radius: 6px;
  background: rgba(5, 8, 12, .72); border: 1px solid rgba(255,255,255,.1); color: #d7e0ec; font-size: 10px; }
.wf-tile .wf-card-body { padding: 12px 14px 2px; }
.wf-tile .wf-card-body b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.wf-tile .wf-card-foot { display: flex; align-items: center; padding: 8px 14px 12px; }
.wf-open { font-size: 11px; color: var(--seko); }
[data-theme="light"] .wf-tile .wf-preview { background:
  radial-gradient(120% 100% at 15% 0%, rgba(15, 157, 138, .08), transparent 55%),
  radial-gradient(90% 90% at 100% 100%, rgba(91, 91, 245, .08), transparent 60%),
  #f2f5f9; }
[data-theme="light"] .wf-preview::after { background-image: radial-gradient(rgba(15,23,42,.12) 1px, transparent 1px); opacity: .5; }
[data-theme="light"] .wf-pv-card { fill: #fff; stroke: rgba(15,23,42,.12); }
[data-theme="light"] .wf-pv-label { fill: #344054; }
[data-theme="light"] .wf-pv-lines path { stroke: rgba(15, 157, 138, .3); }
[data-theme="light"] .wf-count-badge { background: rgba(255,255,255,.82); border-color: rgba(15,23,42,.1); color: #344054; }
@media (max-width: 1080px) { .wf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wf-grid { grid-template-columns: 1fr; } .wf-tile .wf-preview { height: 150px; } }
.wf-preview-empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a0e14, #111722) !important; }
.wf-empty { position: relative; z-index: 1; color: #4b5a6d; font-size: 11px; letter-spacing: .06em;
  border: 1px dashed rgba(255,255,255,.12); border-radius: 8px; padding: 6px 10px; }
[data-theme="light"] .wf-preview-empty { background: linear-gradient(135deg, #f7f9fc, #eef2f7) !important; }
[data-theme="light"] .wf-empty { color: #8792a2; border-color: rgba(15,23,42,.12); }

/* ---------- P4 钱包概览 ---------- */
.wallet-glance { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.wg-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wg-row span { color: var(--muted); font-size: 12px; }
.wg-row b { color: var(--ink); font-size: 16px; font-weight: 650; }
.wallet-glance .tiny { margin-top: auto; line-height: 1.5; }

/* ---------- P4 通知未读 ---------- */
[data-theme="dark"] .notif-item.unread { background: linear-gradient(90deg, rgba(99, 230, 210, .09), transparent 55%); box-shadow: inset 2px 0 0 var(--seko); }
[data-theme="dark"] .notif-item.unread:hover { background: linear-gradient(90deg, rgba(99, 230, 210, .13), transparent 60%); }
.ta-center { overflow: hidden; }
.ta-strip { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.ta-strip::-webkit-scrollbar { height: 6px; }
.ta-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; }
[data-theme="light"] .ta-strip::-webkit-scrollbar-thumb { background: rgba(15,23,42,.18); }
.wallet-glance { justify-content: center; }
.wallet-glance .tiny { margin-top: 2px; }

/* ---------- 短剧简报下一步 ---------- */
.ds-flow { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); }
.ds-flow-copy { display: flex; flex-direction: column; gap: 2px; }
.ds-flow-kicker { color: var(--seko); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.ds-flow b { font-size: 14px; }
@media (max-width: 760px) {
  .ds-flow { flex-direction: column; align-items: stretch; }
  .ds-flow .row { justify-content: flex-end; }
}
.wf-scope-clear { margin-left: 10px; font-size: 11px; color: var(--seko); }
.wf-scope-clear:hover { color: #9ff5e8; }

/* ---------- 世界观页统一项目条 ---------- */
.wd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 0 14px; }
.wd-kicker { color: var(--muted); font-size: 11px; letter-spacing: .08em; margin-bottom: 5px; }
.wd-top h1 { font-size: 28px; line-height: 1.2; color: var(--ink); }
.wd-sub { color: var(--muted); font-size: 12px; margin-top: 5px; }
.wd-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.wd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.wd-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.wd-stat span { color: var(--muted); font-size: 11px; }
.wd-stat b { color: var(--ink); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .wd-top { flex-direction: column; }
  .wd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 订单概览 ---------- */
.ord-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ord-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.ord-sum span { color: var(--muted); font-size: 11px; }
.ord-sum b { color: var(--ink); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ord-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================= Seko pass 2：更像参考站的影院感 ================= */
[data-theme="dark"] body { background: #07080a; }
[data-theme="dark"] .side { background: #08090b; border-right: 1px solid rgba(255,255,255,.055); }
[data-theme="dark"] .topbar { background: rgba(7,8,10,.82); border-bottom: 1px solid rgba(255,255,255,.055); }

/* 首页：居中大标题 + 光斑 + 内容区 */
.home { position: relative; max-width: 1280px; padding-top: 18px; }
.home::before {
  content: ""; position: absolute; inset: -80px 0 auto 0; height: 620px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(520px 300px at 50% 6%, rgba(110,231,216,.085), transparent 68%),
    radial-gradient(420px 280px at 82% 12%, rgba(255,146,88,.055), transparent 70%),
    radial-gradient(460px 320px at 12% 18%, rgba(120,128,255,.045), transparent 72%);
  filter: blur(4px);
}
.home > * { position: relative; z-index: 1; }
.home-ann {
  border: 0; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0;
  background: linear-gradient(90deg, rgba(110,231,216,.055), rgba(255,255,255,.012));
  padding: 8px 2px; font-size: 12px; color: #9aa1aa;
}
.home-ann .tag { background: rgba(110,231,216,.1); color: #8ff2e4; border-color: rgba(110,231,216,.18); }
.home-ann b { color: #d9dee4; font-weight: 520; }
.home-hero { text-align: center; padding: 54px 0 30px; max-width: 1000px; margin: 0 auto; }
.home-kicker { justify-content: center; color: #8b919a; font-size: 11px; }
.home-hero h1 {
  font-size: clamp(38px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -.045em;
  margin: 16px 0 10px; font-weight: 650; color: #f5f6f7;
}
.home-lede { max-width: 620px; margin: 0 auto 26px; color: #8b919a; font-size: 13px; line-height: 1.7; }
.home-hero .composer { margin: 0 auto; width: min(880px, 100%); border-radius: 16px; background: var(--surface); border-color: var(--border); }
.home-hero .composer textarea { text-align: left; }
.home-hero .comp-tabs { justify-content: center; }
.home-hero .quick-chips { justify-content: center; margin-top: 14px; }
.home-hero .qc-label { display: none; }

.home-section { padding: 26px 0 4px; }
.sec-head h2 { font-size: 14px; font-weight: 570; color: #e7e9ec; }
.sec-count { color: #626871; }
.sec-link { color: #8b919a; }
.home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; }
.home-card { background: transparent; border: 0; border-radius: 12px; }
.home-card:hover { background: transparent; border: 0; transform: none; }
.hc-cover { aspect-ratio: 16 / 10; border-radius: 12px; background: #101216; }
.hc-cover::after { background: linear-gradient(180deg, rgba(0,0,0,.02) 55%, rgba(3,4,6,.42)); }
.hc-cover img { transition: transform .35s ease; }
.home-card:hover .hc-cover img { transform: scale(1.035); }
.hc-tag { top: 10px; left: 10px; background: rgba(5,6,8,.58); border-color: rgba(255,255,255,.12); }
.hc-body { padding: 10px 2px 0; }
.hc-body b { font-size: 14px; font-weight: 540; color: #e8eaed; }
.hc-meta { font-size: 11px; color: #6f757e; margin-top: 4px; }
.hc-foot { display: none; }

.cont-grid { gap: 14px; }
.cont-card { display: block; position: relative; min-height: 0; aspect-ratio: 16 / 8.4; border: 0; border-radius: 12px; background: #0d0f12; }
.cont-cover { position: absolute; inset: 0; }
.cont-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 35%, rgba(3,4,6,.82)); }
.cont-main { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 14px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.72)); }
.cont-top b { font-size: 15px; color: #fff; font-weight: 560; }
.cont-sub { color: rgba(255,255,255,.56); font-size: 11px; }
.cont-prog { margin: 8px 0 7px; background: rgba(255,255,255,.14); }
.cont-foot { color: rgba(255,255,255,.56); font-size: 11px; }
.cont-card:hover { transform: translateY(-2px); background: #0d0f12; }
.cont-card:hover .cont-cover img { transform: scale(1.035); }

/* 项目工作台：减少页面级 chrome，面板更黑更实 */
.pw-top { padding: 16px 0 8px; }
.pw-top h1 { font-size: 22px; letter-spacing: -.02em; }
.pw-sub { font-size: 11px; color: #7b818a; margin-top: 3px; }
.pw-actions .btn { height: 30px; font-size: 12px; }
.pw .pnav, .pw-top + .pnav { margin: 0 0 10px; }
.proj-nav .pnav-item { font-size: 12px; }
.pw { gap: 10px; }
.pw-side, .pw-stage, .pw-inspect { background: #0b0c0e; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; }
.pw-stage { background: #090a0c; }
.pw-stage-head { padding: 12px 14px 10px; }
.ps-title b { font-size: 15px; font-weight: 560; }
.ps-title span { font-size: 11px; color: #6d737c; }
.shot-grid { gap: 10px; }
.shot-card { background: #101215; border-color: rgba(255,255,255,.06); border-radius: 10px; }
.shot-card:hover { border-color: rgba(255,255,255,.16); }
.sc-preview { border-radius: 8px; }
.sc-meta { font-size: 10px; }
.sc-desc { font-size: 11px; line-height: 1.55; color: #a6acb4; }

/* 浅色下保持这些新表面的可读性 */
[data-theme="light"] .cont-main { background: linear-gradient(180deg, transparent, rgba(0,0,0,.66)); }
[data-theme="light"] .pw-side, [data-theme="light"] .pw-inspect { background: #0b0c0e; border-color: rgba(255,255,255,.06); }
[data-theme="light"] .pw-stage { background: #090a0c; }
@media (max-width: 980px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .home-hero { padding-top: 34px; }
  .home-grid { grid-template-columns: 1fr; }
  .cont-grid { grid-template-columns: 1fr; }
}

/* 导演台输入：对话即操作 */
.dp-ask { display: flex; align-items: flex-end; gap: 6px; margin: 10px 0 10px; padding: 7px 7px 7px 10px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: #0d0f12; }
.dp-ask textarea { flex: 1; min-height: 36px; max-height: 92px; resize: none; border: 0; outline: 0;
  background: transparent; color: #dfe4e9; font-size: 12px; line-height: 1.55; padding: 3px 0; }
.dp-ask textarea::placeholder { color: #646a73; }
.dp-ask button { flex: none; width: 27px; height: 27px; border-radius: 50%; border: 0;
  background: #e7ecef; color: #0a0b0d; font-size: 15px; line-height: 1; display: grid; place-items: center; }
.dp-ask button:hover { background: #fff; }
[data-theme="light"] .dp-ask { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }

/* 我的空间：顶栏浮在内容上，去掉后台面包屑 */
body.home-mode .main { position: relative; }
body.home-mode .topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(7,8,10,.78), rgba(7,8,10,0));
  border-bottom: 0; backdrop-filter: blur(6px);
}
body.home-mode .crumb { display: none; }
body.home-mode .topbar .search, body.home-mode .topbar .cmd-trigger { background: rgba(12,14,17,.55); }
body.home-mode .home { padding-top: 66px; }
[data-theme="light"] body.home-mode .topbar { background: linear-gradient(180deg, rgba(246,247,249,.86), rgba(246,247,249,0)); }

/* 首页封面统一电影调，搜索收成图标 */
.home-card .hc-cover img, .cont-card .cont-cover img { filter: saturate(.62) brightness(.74) contrast(1.06); }
.home-card:hover .hc-cover img, .cont-card:hover .cont-cover img { filter: saturate(.78) brightness(.86) contrast(1.04); }
body.home-mode .cmd-trigger { width: 34px; padding: 0; justify-content: center; }
body.home-mode .cmd-trigger > span, body.home-mode .cmd-trigger > kbd { display: none; }

/* 收紧首页垂直节奏，让项目区在首屏露出。 */
.home-hero { padding: 40px 0 22px; }
.home-hero .composer textarea { min-height: 86px; height: 86px; }
.home-hero .home-lede { margin-bottom: 20px; }
.home-section { padding: 18px 0 2px; }

body.home-mode .cmd-trigger { min-width: 0; width: 34px; }
[data-theme="light"] body.home-mode .topbar .cmd-trigger { background: rgba(255,255,255,.72); border-color: #e4e7ec; color: #667085; }

.home::after {
  content: ""; position: absolute; inset: -10px 0 auto 0; height: 520px; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
  -webkit-mask-image: radial-gradient(620px 330px at 50% 4%, #000 0%, transparent 76%);
  mask-image: radial-gradient(620px 330px at 50% 4%, #000 0%, transparent 76%);
}
.home::before { opacity: 1.25; }

.home-card .hc-cover img, .cont-card .cont-cover img { filter: saturate(.55) brightness(.66) contrast(1.08); }
.home-card:hover .hc-cover img, .cont-card:hover .cont-cover img { filter: saturate(.72) brightness(.8) contrast(1.05); }

/* ---------- 短剧工作台：Seko 式左聊 + 右文档 ---------- */
.ds-tabs {
  display: inline-flex; gap: 2px; padding: 3px; margin: 8px 0 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
}
.ds-tab-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-size: 12px; line-height: 1.4;
  transition: background .15s, color .15s;
}
.ds-tab-btn:hover { color: var(--ink); }
.ds-tab-btn.on { background: rgba(255,255,255,.10); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }

.ds-shell {
  display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 18px;
  margin-top: 14px; align-items: start;
}
.ds-rail {
  position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(165deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  backdrop-filter: blur(8px);
}
.ds-rail-kicker { font-size: 11px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.ds-rail-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.ds-rail-sub { margin-top: -8px; }
.ds-steps { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.ds-step {
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 8px;
  width: 100%; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.ds-step:hover { background: rgba(255,255,255,.04); color: var(--ink-2); }
.ds-step.on { background: rgba(255,255,255,.075); color: var(--ink); }
.ds-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px; font-size: 11px;
  background: rgba(255,255,255,.055); color: var(--muted-2);
}
.ds-step.done .ds-step-n { background: var(--seko); color: #04110f; font-weight: 700; }
.ds-step-t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-step-s { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.ds-step.on .ds-step-s { color: var(--seko); }
.ds-rail-bubble {
  margin-top: 2px; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(99,230,210,.20); background: rgba(99,230,210,.055);
}
.ds-bubble-head { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--seko); letter-spacing: .04em; }
.ds-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--seko); box-shadow: 0 0 10px var(--seko); }
.ds-rail-bubble p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.ds-rail-next {
  margin-top: 10px; width: 100%; border: 0; cursor: pointer;
  padding: 9px 10px; border-radius: 8px; background: var(--seko); color: #04110f;
  font-size: 12px; font-weight: 650; text-align: left;
}
.ds-rail-done { margin-top: 10px; font-size: 12px; color: var(--seko); }
.ds-rail-agent {
  width: 100%; border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 12px;
}
.ds-rail-agent:hover { border-color: var(--seko); color: var(--seko); }
.ds-doc { min-width: 0; }
.ds-doc .ds-card { margin-top: 0; }

[data-theme="light"] .ds-tab-btn.on { background: #101828; color: #fff; box-shadow: none; }
[data-theme="light"] .ds-rail-bubble { background: #f2fbf8; border-color: #bfe9df; }
@media (max-width: 980px) {
  .ds-shell { grid-template-columns: 1fr; }
  .ds-rail { display: none; }
  .ds-tabs { display: flex; overflow-x: auto; max-width: 100%; }
  .ds-tab-btn { white-space: nowrap; }
}

/* 检查器抽屉：默认只留导演台 + 舞台，选中镜头或点“检查器”才展开右栏 */
.pw { grid-template-columns: 280px minmax(0, 1fr); }
.pw.has-inspector { grid-template-columns: 280px minmax(0, 1fr) var(--inspect-w, 306px); }
.pw-inspect { position: relative; }
.ins-grip { position: absolute; z-index: 3; top: 0; bottom: 0; left: -4px; width: 8px; cursor: col-resize; }
.ins-grip::after { content: ""; position: absolute; top: 42%; left: 3px; width: 2px; height: 34px; border-radius: 2px; background: rgba(255,255,255,.14); }
.ins-grip:hover::after { background: var(--seko); }
[data-theme="light"] .ins-grip::after { background: rgba(15, 23, 42, .16); }
@media (max-width: 1120px) { .ins-grip { display: none; } }
.ins-tabs .ins-x { flex: 0 0 26px; font-size: 15px; line-height: 1; color: #8a94a3; }
.ins-tabs .ins-x:hover { color: #f2f6fa; background: rgba(255,255,255,.08); }
@media (max-width: 1320px) {
  .pw { grid-template-columns: 246px minmax(0, 1fr); }
  .pw.has-inspector { grid-template-columns: 246px minmax(0, 1fr) var(--inspect-w, 286px); }
}
@media (max-width: 1120px) {
  .pw, .pw.has-inspector { grid-template-columns: 1fr; }
}

/* 窄屏：检查器改为右侧浮层，选中镜头立即出现，不把舞台挤到页面外 */
@media (max-width: 1120px) {
  .pw.has-inspector .pw-inspect {
    position: fixed; z-index: 70; top: 72px; right: 10px; bottom: 12px; left: auto;
    width: min(340px, calc(100vw - 72px)); height: auto; min-height: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,.55);
  }
}

.pw-inspect { animation: ins-in .18s ease-out; }
@keyframes ins-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* 全屏铺满：去掉首屏 / 项目总览的居中窄栏，宽屏自动增列 */
.main { padding-left: clamp(16px, 1.8vw, 28px); padding-right: clamp(16px, 1.8vw, 28px); }
.home, .hub { max-width: none; }
.composer { width: min(960px, 64vw); }
.home-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.dr-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.shot-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 980px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } }

.home-hero .composer { width: min(960px, 64vw); }

/* 首页特色功能：Seko 的四张入口卡 */
.home-feature { margin: 34px 0 6px; }
.hf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 11px; color: #7f858e; }
.hf-head a { color: #7f858e; }
.hf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hf-card { position: relative; min-height: 132px; padding: 16px 16px 15px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; overflow: hidden; color: #e8edf3; background: #0b0d10; }
.hf-card::after { content: ""; position: absolute; right: -30px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(99,230,210,.18), transparent 68%); pointer-events: none; }
.hf-1 { background: linear-gradient(135deg, #10211f 0%, #0a0d0f 62%); }
.hf-2 { background: linear-gradient(135deg, #101a2a 0%, #0a0d0f 62%); }
.hf-3 { background: linear-gradient(135deg, #1a142a 0%, #0a0d0f 62%); }
.hf-4 { background: linear-gradient(135deg, #221a10 0%, #0a0d0f 62%); }
.hf-ico { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,.07); color: #63e6d2; margin-bottom: 12px; }
.hf-card b { display: block; font-size: 14px; font-weight: 560; }
.hf-card p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; color: #8b919a; max-width: 210px; }
.hf-go { position: absolute; left: 16px; bottom: 13px; font-size: 10px; color: #b9c2cc; opacity: 0; transform: translateY(3px); transition: .16s; }
.hf-card:hover { border-color: rgba(99,230,210,.28); }
.hf-card:hover .hf-go { opacity: 1; transform: none; }
[data-theme="light"] .hf-1 { background: linear-gradient(135deg, #eafaf6, #f7f9fb 62%); }
[data-theme="light"] .hf-2 { background: linear-gradient(135deg, #eaf2ff, #f7f9fb 62%); }
[data-theme="light"] .hf-3 { background: linear-gradient(135deg, #f2ecff, #f7f9fb 62%); }
[data-theme="light"] .hf-4 { background: linear-gradient(135deg, #fff5e8, #f7f9fb 62%); }
@media (max-width: 640px) { .hf-grid { grid-template-columns: 1fr; } .hf-card { min-height: 112px; } }

.hf-head { font-size: 12px; color: #c7ced7; font-weight: 500; }
.dr-card { cursor: pointer; }

.hf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .hf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hf-grid { grid-template-columns: 1fr; } }

.dr-card { transition: transform .18s ease, border-color .18s ease; }
.dr-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.14); }
.dr-card .dr-cover img { transition: transform .5s ease; }
.dr-card:hover .dr-cover img { transform: scale(1.02); }
@media (hover: hover) {
  .dr-ops { opacity: 0; transform: translateY(4px); transition: opacity .16s ease, transform .16s ease; }
  .dr-card:hover .dr-ops, .dr-card:focus-within .dr-ops { opacity: 1; transform: none; }
}

.wf-seed { display: flex; align-items: center; gap: 16px; margin: 0 0 14px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(90deg, rgba(99, 230, 210, .08), transparent 62%); }
.wf-seed > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wf-seed b { font-size: 13px; color: var(--ink); }
.wf-seed span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-seed .btn { margin-left: auto; flex: 0 0 auto; }
[data-theme="light"] .wf-seed { background: linear-gradient(90deg, rgba(15, 158, 138, .07), transparent 62%); }
@media (max-width: 640px) {
  .wf-seed { align-items: flex-start; flex-direction: column; gap: 8px; }
  .wf-seed .btn { margin-left: 0; width: 100%; }
}
.comp-chip[hidden] { display: none !important; }

/* ---------- 创作简报：可折叠文档 ---------- */
.ds-doc { padding: 0; overflow: hidden; }
.ds-doc-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.ds-doc-head h2 { margin-top: 3px; font-size: 20px; }
.ds-doc-kicker { color: var(--seko); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.ds-doc-meta { margin-top: 8px; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.ds-draft-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 11px; }
.ds-draft-bar.on { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.ds-draft-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-draft-acts { display: flex; flex: none; gap: 5px; }
.ds-draft-btn { padding: 1px 8px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font: inherit; line-height: 1.7; cursor: pointer; }
.ds-draft-btn:hover { background: rgba(255, 255, 255, .06); }
.ds-draft-btn.ghost { opacity: .75; }
.ds-sec { border-bottom: 1px solid var(--line); }
.ds-sec summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 24px; cursor: pointer; user-select: none; }
.ds-sec summary::-webkit-details-marker { display: none; }
.ds-sec summary:hover { background: var(--hover); }
.ds-sec-no { flex: none; color: var(--seko); font: 11px/1 ui-monospace, "Cascadia Code", Consolas, monospace; opacity: .85; }
.ds-sec summary b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.ds-sec summary em { margin-left: auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-style: normal; }
.ds-sec summary::after { content: "+"; flex: none; width: 14px; color: var(--muted); text-align: center; font-size: 15px; line-height: 1; }
.ds-sec[open] summary::after { content: "−"; }
.ds-sec-body { padding: 2px 24px 20px; }
.ds-sec-body .ds-form { margin: 0; }
.ds-doc-hint { padding: 14px 24px 0; }
.ds-doc .ds-flow { margin: 18px 24px 22px; }
[data-theme="light"] .ds-doc-kicker,
[data-theme="light"] .ds-sec-no { color: #0b8b7d; }
@media (max-width: 640px) {
  .ds-doc-head { padding: 18px 16px 16px; }
  .ds-sec summary { padding: 12px 16px; }
  .ds-sec-body { padding: 0 16px 18px; }
  .ds-sec summary em { display: none; }
  .ds-doc-hint { padding: 12px 16px 0; }
  .ds-doc .ds-flow { margin: 16px; }
}

.ds-doc-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.ds-view { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.ds-view button { border: 0; border-radius: 6px; padding: 4px 9px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.ds-view button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ds-form-flat { padding: 18px 24px 4px; }
@media (max-width: 640px) {
  .ds-doc-tools { justify-content: flex-start; }
  .ds-form-flat { padding: 14px 16px 2px; }
}

/* 简报本地草稿条 */
.ds-draft-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px 0 2px; padding: 7px 10px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  color: var(--warn); font-size: 12px;
}
.ds-draft-bar.on {
  border-color: color-mix(in srgb, var(--seko) 28%, transparent);
  background: color-mix(in srgb, var(--seko) 7%, transparent);
  color: var(--seko);
}
.ds-draft-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-draft-acts { display: flex; gap: 6px; flex-shrink: 0; }
.ds-draft-btn {
  border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 7px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.ds-draft-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.ds-draft-btn.ghost { border-color: var(--line); color: var(--muted); }
[data-theme="light"] .ds-draft-bar { background: #fff8ea; border-color: #f0dfbc; color: #9a5a08; }

/* 项目内统一：胶囊分段导航 */
.proj-nav {
  display: inline-flex; align-items: center; gap: 2px; width: fit-content; max-width: 100%;
  padding: 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.07);
  background: #0e1013; overflow-x: auto;
}
.proj-nav-item {
  position: relative; padding: 5px 12px; border-radius: 999px; font-size: 12px;
  color: #8a93a0; white-space: nowrap;
}
.proj-nav-item:hover { color: #e8edf3; background: rgba(255,255,255,.04); }
.proj-nav-item.on {
  color: #f5f8fb; background: #1d2026; box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.proj-nav-item.on::after { display: none; }
[data-theme="light"] .proj-nav-item:hover { color: #101828; background: #e9edf2; }
[data-theme="dark"] .proj-nav-item.on { color: #f5f8fb; background: #1d2026; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }

/* 时间轴底部运输条 */
.ta-wrap { height: calc(100vh - 360px); min-height: 340px; align-items: stretch; }
.ta-list, .ta-side { position: static; height: 100%; overflow: auto; }
.ta-center { height: 100%; overflow: auto; padding-right: 2px; }
.ta-clips { max-height: none; }
.ta-transport {
  position: static; display: flex; align-items: center; gap: 9px;
  margin-top: 10px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(10,12,16,.9);
  backdrop-filter: blur(12px); box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.ta-tbtn {
  border: 1px solid rgba(255,255,255,.1); background: #15181d; color: #d8e1ec;
  border-radius: 8px; padding: 5px 9px; font-size: 11px; cursor: pointer; white-space: nowrap;
}
.ta-tbtn:hover { background: #1d2128; color: #fff; }
.ta-tbtn.play {
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #0a0b0d; border-color: #fff;
  font-size: 11px;
}
.ta-time { font-variant-numeric: tabular-nums; font-size: 12px; color: #e8edf3; }
.ta-time i { color: #5f6670; font-style: normal; margin: 0 4px; }
.ta-sep { width: 1px; height: 16px; background: rgba(255,255,255,.1); }
.ta-tip { margin-left: auto; font-size: 11px; color: #7f8894; }
.ta-view {
  font-size: 11px; color: #aab3bf; border: 1px solid rgba(255,255,255,.09);
  padding: 4px 8px; border-radius: 7px; white-space: nowrap;
}
@media (max-width: 760px) {
  .ta-transport { flex-wrap: wrap; }
  .ta-tip { display: none; }
  .ta-view { margin-left: auto; }
}
@media (max-width: 900px) {
  .ta-wrap { height: auto; min-height: 0; }
  .ta-list, .ta-side, .ta-center { height: auto; overflow: visible; }
}

/* 短剧分镜板底部操作条 */
.ds-board-bar {
  position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; margin-top: 14px; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  background: rgba(12,14,17,.92); backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.ds-bb-info { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.ds-bb-info b { font-size: 12px; color: #e9eef5; white-space: nowrap; }
.ds-bb-info span { font-size: 11px; color: #838d9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-bb-ops { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
[data-theme="light"] .ds-board-bar { background: rgba(255,255,255,.94); border-color: #e4e7ec; box-shadow: 0 10px 26px rgba(16,24,40,.1); }
[data-theme="light"] .ds-bb-info b { color: #101828; }
[data-theme="light"] .ds-bb-info span { color: #667085; }
@media (max-width: 640px) {
  .ds-board-bar { flex-wrap: wrap; }
  .ds-bb-ops { width: 100%; justify-content: flex-end; }
}

/* 画布编辑器：全屏浮层，参考 Seko 的画布工作区 */
body.canvas-mode { overflow: hidden; background: #07080a; }
body.canvas-mode .side,
body.canvas-mode .topbar { display: none; }
body.canvas-mode .shell { display: block; min-height: 100vh; background: #07080a; }
body.canvas-mode .main { height: 100vh; padding: 0; overflow: hidden; }
body.canvas-mode .wf-shell { height: 100vh; gap: 0; }
body.canvas-mode .wf-bar {
  position: absolute; z-index: 30; top: 10px; left: 12px; right: 12px;
  padding: 7px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.09);
  background: rgba(10,12,15,.82); backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
body.canvas-mode .wf-title { width: 210px; height: 30px; background: transparent; border-color: transparent; color: #eef3f8; }
body.canvas-mode .wf-title:hover,
body.canvas-mode .wf-title:focus { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
body.canvas-mode .wf-proj { height: 30px; background: transparent; color: #b9c3d0; border-color: rgba(255,255,255,.10); }
body.canvas-mode .wf-body { display: block; height: 100vh; }
body.canvas-mode .wf-canvas { height: 100vh; min-height: 0; border: 0; border-radius: 0; background-color: #080a0d; background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px); }
body.canvas-mode .wf-hint { display: none; }
body.canvas-mode .wf-dock {
  left: 14px; top: 50%; bottom: auto; transform: translateY(-50%);
  flex-direction: column; width: 50px; padding: 6px 4px; gap: 2px;
  border-radius: 14px; border-color: rgba(255,255,255,.10);
  background: rgba(13,15,18,.92); backdrop-filter: blur(12px);
}
body.canvas-mode .wf-dock-btn { width: 40px; min-width: 40px; padding: 6px 0; color: #98a3b2; }
body.canvas-mode .wf-dock-btn b { font-size: 16px; }
body.canvas-mode .wf-dock-btn span { display: none; }
body.canvas-mode .wf-dock-sep { width: 24px; height: 1px; margin: 4px 0; }
body.canvas-mode .wf-zoom { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); background: rgba(13,15,18,.92); border-color: rgba(255,255,255,.10); }
body.canvas-mode .wf-mini { left: 16px; bottom: 16px; width: 150px; height: 100px; background: rgba(13,15,18,.92); border-color: rgba(255,255,255,.10); }
body.canvas-mode .wf-side {
  position: absolute; z-index: 25; top: 64px; right: 12px; bottom: 64px; width: 318px;
  overflow-y: auto; padding: 2px; border-radius: 14px;
  scrollbar-width: thin;
}
body.canvas-mode:not(.wf-side-open) .wf-side { display: none; }
body.canvas-mode .wf-side-card { background: rgba(13,15,18,.92); border-color: rgba(255,255,255,.10); backdrop-filter: blur(12px); }
body.canvas-mode .wf-side-card b { color: #e9eef5; }
@media (max-width: 760px) {
  body.canvas-mode .tabbar { display: none; }
  body.canvas-mode .wf-bar { flex-wrap: nowrap; overflow: visible; top: 8px; left: 8px; right: 8px; gap: 6px; padding: 6px 8px; }
  body.canvas-mode .wf-bar #wf-meta,
  body.canvas-mode .wf-proj,
  body.canvas-mode .wf-bar [data-act="desel"],
  body.canvas-mode .wf-bar .spacer { display: none; }
  body.canvas-mode .wf-title { flex: 1; width: auto; min-width: 0; }
  body.canvas-mode .wf-side { top: 56px; bottom: 56px; right: 8px; left: 8px; width: auto; }
  body.canvas-mode .wf-mini { display: none; }
  body.canvas-mode .wf-dock { top: auto; bottom: 58px; left: 10px; transform: none; flex-direction: row; width: auto; max-width: calc(100vw - 20px); overflow-x: auto; }
  body.canvas-mode .wf-dock-sep { width: 1px; height: 22px; margin: 0 2px; }
  body.canvas-mode .wf-zoom { bottom: 10px; }
}

.ds-board-card {
  height: calc(100vh - 330px); min-height: 420px; display: flex; flex-direction: column; overflow: hidden;
}
.ds-board-card .ds-shots { flex: 1; min-height: 0; overflow: auto; align-content: start; grid-auto-rows: max-content; padding-right: 2px; }
.ds-board-card .ds-board-bar { position: static; flex-shrink: 0; margin-top: 10px; }
@media (max-width: 900px) {
  .ds-board-card { height: auto; min-height: 0; overflow: visible; }
  .ds-board-card .ds-shots { overflow: visible; }
}

/* 世界观：左索引 + 右文档 */
.wd-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; }
.wd-rail {
  position: sticky; top: 74px; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.wd-rail-kicker { font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.wd-rail h2 { font-size: 18px; margin: 0; }
.wd-rail-sub { font-size: 12px; color: var(--muted); }
.wd-rail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0; }
.wd-rail-stat { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.wd-rail-stat span { font-size: 11px; color: var(--muted); }
.wd-rail-stat b { font-size: 16px; }
.wd-rail-actions { display: flex; flex-direction: column; gap: 6px; }
.wd-rail-actions .btn { width: 100%; justify-content: center; }
.wd-rail-bubble { margin-top: auto; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--seko) 26%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--seko) 7%, transparent); }
.wd-rail-bubble b { display: block; font-size: 12px; color: var(--seko); margin-bottom: 3px; }
.wd-rail-bubble p { font-size: 11px; line-height: 1.6; color: var(--muted); }
.wd-main .wd-layout { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); }
.wd-actions { display: none; }
[data-theme="light"] .wd-rail { background: #fff; border-color: #e4e7ec; }
[data-theme="light"] .wd-rail-stat { background: #f8f9fb; border-color: #edf0f3; }
@media (max-width: 980px) {
  .wd-shell { grid-template-columns: 1fr; }
  .wd-rail { display: none; }
  .wd-actions { display: flex; }
  .wd-main .wd-layout { grid-template-columns: 1fr; }
}

/* 生成台：固定工作栏 + 底部队列 */
.wb { display: flex; flex-direction: column; height: calc(100vh - 205px); min-height: 540px; gap: 10px; }
.wb-tabs { flex-shrink: 0; justify-self: start; }
.wb-grid { flex: 1; min-height: 0; grid-template-columns: 390px minmax(0, 1fr); align-items: stretch; }
.wb-side { height: 100%; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.wb-main { height: 100%; min-height: 0; overflow: auto; }
.wb-queue {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-size: 12px; color: var(--muted);
}
.wb-queue .pq-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--seko); box-shadow: 0 0 0 3px color-mix(in srgb, var(--seko) 16%, transparent); }
.wb-queue-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
[data-theme="light"] .wb-queue { background: #fff; border-color: #e4e7ec; }
@media (max-width: 980px) {
  .wb { height: auto; min-height: 0; }
  .wb-grid { grid-template-columns: 1fr; }
  .wb-side, .wb-main { height: auto; overflow: visible; }
}

/* 素材库：内容优先的媒体墙 */
.asset-page .card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.asset-page .card > .row:first-child { margin-bottom: 12px; }
.asset-page .grid.auto { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.asset-card { background: transparent; border: 0; box-shadow: none; border-radius: 14px; transition: transform .18s ease; }
.asset-card:hover { transform: translateY(-2px); }
.asset-card .thumb { height: auto; aspect-ratio: 1.15; border-radius: 12px; background: #0b0d10; }
.asset-card .thumb img, .asset-card .thumb video { transition: transform .35s ease, opacity .2s ease; }
.asset-card:hover .thumb img, .asset-card:hover .thumb video { transform: scale(1.03); }
.asset-card .info { padding: 8px 2px 2px; background: transparent; align-items: flex-start; }
.asset-card .info > div > div:first-child { color: #e9eef5; line-height: 1.35; }
.asset-card .info .tag { font-size: 10px; padding: 2px 6px; }
.asset-card.picked { outline: 2px solid var(--seko); outline-offset: 3px; }
.asset-pick { background: rgba(8,10,13,.72); border: 1px solid rgba(255,255,255,.24); }
.asset-pick input { accent-color: var(--seko); }
.asset-batch { background: rgba(13,15,18,.92); border-color: rgba(255,255,255,.12); color: #dfe7f0; }
.asset-ctx { background: rgba(13,15,18,.7); border-color: rgba(255,255,255,.1); color: #c6d0dd; }
[data-theme="light"] .asset-page .card { background: transparent; border: 0; }
[data-theme="light"] .asset-card .info > div > div:first-child { color: #101828; }
[data-theme="light"] .asset-pick { background: rgba(255,255,255,.9); border-color: #dfe3e9; }
[data-theme="light"] .asset-batch { background: #fff; border-color: #e4e7ec; color: #344054; }
[data-theme="light"] .asset-ctx { background: #f4f7fb; border-color: #e4e7ec; color: #475467; }
@media (max-width: 640px) {
  .asset-page .grid.auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .asset-card .thumb { aspect-ratio: 1; }
}

/* 模板市场：先给一张“类型封面”，再读说明 */
.tpl-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tpl-card { padding: 0 15px 14px; overflow: hidden; background: #0c0e12; border-color: rgba(255,255,255,.08); box-shadow: none; }
.tpl-card:hover { transform: translateY(-2px); border-color: rgba(99,230,210,.28); box-shadow: 0 18px 40px -24px rgba(0,0,0,.8); }
.tpl-cover {
  margin: 0 -15px 13px; height: 84px; display: flex; align-items: center; gap: 8px;
  padding: 0 15px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.72); border-bottom: 1px solid rgba(255,255,255,.07);
  background: radial-gradient(120% 120% at 0% 0%, rgba(99,230,210,.18), transparent 55%), linear-gradient(135deg, #111a1c, #0a0c10);
}
.tpl-cover-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #9ff3e4; }
.tpl-cover[data-kind="video"] { background: radial-gradient(120% 120% at 0% 0%, rgba(167,139,250,.22), transparent 55%), linear-gradient(135deg, #171222, #0a0c10); }
.tpl-cover[data-kind="video"] .tpl-cover-ico { color: #c4b5fd; }
.tpl-cover[data-kind="text"] { background: radial-gradient(120% 120% at 0% 0%, rgba(74,222,128,.18), transparent 55%), linear-gradient(135deg, #101a14, #0a0c10); }
.tpl-cover[data-kind="text"] .tpl-cover-ico { color: #86efac; }
.tpl-cover[data-kind="tts"] { background: radial-gradient(120% 120% at 0% 0%, rgba(244,114,182,.18), transparent 55%), linear-gradient(135deg, #1a1016, #0a0c10); }
.tpl-cover[data-kind="tts"] .tpl-cover-ico { color: #f9a8d4; }
.tpl-cover[data-kind="drama"] { background: radial-gradient(120% 120% at 0% 0%, rgba(251,191,36,.20), transparent 55%), linear-gradient(135deg, #1a1508, #0a0c10); }
.tpl-cover[data-kind="drama"] .tpl-cover-ico { color: #fcd34d; }
.tpl-card h3 { font-size: 16px; margin: 0; }
.tpl-card .tpl-top { margin-top: 0; }
[data-theme="light"] .tpl-card { background: #fff; border-color: #e4e7ec; }
[data-theme="light"] .tpl-cover { border-bottom-color: #eef1f5; background: radial-gradient(120% 120% at 0% 0%, rgba(13,148,136,.12), transparent 55%), linear-gradient(135deg, #f0fdfa, #f8fafc); color: #475467; }
[data-theme="light"] .tpl-cover-ico { background: #fff; border-color: #e4e7ec; color: #0f766e; }

/* 提示词库：卡片化、弱化次要操作 */
.pm-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: #0d0f12; }
.pm-tabs .tab { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; color: #8b95a3; }
.pm-tabs .tab.on { background: #1d2026; color: #f2f6fa; }
.pm-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.pm-card { position: relative; padding: 15px 16px; background: #0b0d10; border-color: rgba(255,255,255,.08); border-radius: 13px; box-shadow: none; overflow: hidden; }
.pm-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: #63e6d2; opacity: .7; }
.pm-card[data-kind="video"]::before { background: #a78bfa; }
.pm-card[data-kind="text"]::before { background: #4ade80; }
.pm-card[data-kind="tts"]::before { background: #f472b6; }
.pm-card[data-kind="image"]::before { background: #38bdf8; }
.pm-card:hover { transform: translateY(-2px); border-color: rgba(99,230,210,.3); box-shadow: 0 16px 36px -22px rgba(0,0,0,.8); }
.pm-title { font-size: 15px; color: #eef3f8; }
.pm-text { color: #a8b3c1; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.pm-foot { border-top-color: rgba(255,255,255,.07); }
.pm-acts .btn.ghost { opacity: .62; }
.pm-acts .btn.ghost:hover { opacity: 1; }
[data-theme="light"] .pm-card { background: #fff; border-color: #e4e7ec; }
[data-theme="light"] .pm-title { color: #101828; }
[data-theme="light"] .pm-text { color: #475467; }
@media (hover: none) { .pm-acts .btn.ghost { opacity: 1; } }

/* ---------------- 对话式创作台 ---------------- */
.cw { --panel2: var(--panel-2); --text: var(--ink); height: calc(100vh - 120px); display: grid; grid-template-columns: 336px minmax(0,1fr) 340px; gap: 12px; min-height: 620px; }
.cw-loading { padding: 80px 0; text-align: center; }
.cw-left, .cw-doc, .cw-right { min-height: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.cw-left { display: flex; flex-direction: column; }
.cw-left-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.cw-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cw-brand > span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--seko); color: #04110f; font-weight: 800; font-size: 13px; }
.cw-brand b { display: block; font-size: 13px; color: var(--text); }
.cw-brand em { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 1px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 10px; border: 1px solid var(--line); color: var(--muted); background: var(--panel2); white-space: nowrap; }
.cw-pill.warn { color: #f5c56b; border-color: rgba(245,197,107,.28); background: rgba(245,197,107,.08); }
.cw-pill.ok { color: var(--seko); border-color: rgba(99,230,210,.28); background: rgba(99,230,210,.07); }
.cw-check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cw-check { display: flex; align-items: flex-start; gap: 7px; text-align: left; padding: 8px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.cw-check:hover { background: var(--panel2); }
.cw-check.on { border-color: rgba(99,230,210,.3); background: rgba(99,230,210,.05); }
.cw-check i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; }
.cw-check.done i { color: var(--seko); }
.cw-check b { display: block; font-size: 11px; font-weight: 600; }
.cw-check em { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.cw-check.done em { color: rgba(99,230,210,.7); }
.cw-msgs { flex: 1; min-height: 0; overflow: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.cw-msg { display: flex; gap: 8px; align-items: flex-start; }
.cw-msg.user { justify-content: flex-end; }
.cw-msg .bubble { max-width: 88%; padding: 9px 11px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; line-height: 1.65; color: var(--text); white-space: pre-wrap; }
.cw-msg.user .bubble { background: var(--seko); border-color: transparent; color: #04110f; }
.cw-avatar { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--seko); color: #04110f; font-size: 10px; font-weight: 800; }
.cw-typing { color: var(--muted); }
.cw-composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.cw-composer textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; border-radius: 10px; padding: 9px 10px; font-size: 12px; line-height: 1.5; background: var(--panel2); border: 1px solid var(--line); color: var(--text); }
.cw-send { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--seko); color: #04110f; font-size: 16px; cursor: pointer; }
.cw-foot { padding: 0 12px 10px; font-size: 10px; color: var(--muted); }
.cw-doc { display: flex; flex-direction: column; background: var(--panel); }
.cw-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px 8px; }
.cw-crumb { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.cw-crumb a { color: var(--muted); }
.cw-crumb b { color: var(--text); font-weight: 600; }
.cw-stages { display: flex; gap: 4px; padding: 2px 18px 10px; border-bottom: 1px solid var(--line); }
.cw-stage { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.cw-stage:hover { color: var(--text); background: var(--panel2); }
.cw-stage.on { background: var(--text); color: var(--bg); font-weight: 600; }
.cw-stage i { font-style: normal; margin-left: 3px; color: var(--seko); }
.cw-doc-scroll { flex: 1; min-height: 0; overflow: auto; padding: 20px 26px 26px; }
.cw-doc-body { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cw-paper { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.cw-paper h1 { font-size: 32px; line-height: 1.2; margin: 4px 0 8px; letter-spacing: -.02em; }
.cw-paper h2 { font-size: 20px; margin: 3px 0 4px; }
.cw-paper-kicker { font-size: 10px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.cw-lead { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 680px; }
.cw-paper-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cw-kv { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 4px; }
.cw-kv span { display: flex; flex-direction: column; gap: 2px; }
.cw-kv b { font-size: 12px; font-weight: 600; color: var(--text); }
.cw-kv em { font-style: normal; font-size: 10px; color: var(--muted); }
.cw-callout { margin-top: 14px; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(99,230,210,.2); background: rgba(99,230,210,.05); display: flex; gap: 10px; }
.cw-callout span { flex: 0 0 auto; font-size: 10px; color: var(--seko); letter-spacing: .12em; margin-top: 2px; }
.cw-callout p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--text); }
.cw-outline { margin: 16px 0; padding: 12px 14px; border-left: 2px solid var(--seko); background: rgba(255,255,255,.02); font-size: 12px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; }
.cw-script { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.9; color: var(--text); white-space: pre-wrap; }
.cw-empty-paper { text-align: center; padding: 34px 20px; }
.cw-empty-paper h2 { margin-bottom: 6px; }
.cw-empty-paper .btn { margin-top: 14px; }
.cw-art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.cw-art-grid > div { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.cw-art-grid span { font-size: 10px; color: var(--muted); letter-spacing: .12em; }
.cw-art-grid b { display: block; font-size: 13px; margin: 4px 0; }
.cw-art-grid p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.cw-entities { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 10px; margin-top: 16px; }
.cw-entity { text-align: left; padding: 0; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; cursor: pointer; color: var(--text); }
.cw-entity:hover { border-color: rgba(99,230,210,.3); }
.cw-entity.on { border-color: var(--seko); box-shadow: 0 0 0 1px var(--seko) inset; }
.cw-entity-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg,#1b222b,#0b0e12); display: grid; place-items: center; }
.cw-entity-media img { width: 100%; height: 100%; object-fit: cover; }
.cw-entity-ph { font-size: 32px; color: rgba(255,255,255,.18); font-weight: 700; }
.cw-lead-tag { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 10px; padding: 2px 6px; border-radius: 999px; background: var(--seko); color: #04110f; }
.cw-entity-body { padding: 10px 11px; }
.cw-entity-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cw-entity-title b { font-size: 12px; }
.cw-entity-title span { font-size: 10px; color: var(--muted); }
.cw-entity-body p { margin: 5px 0 0; font-size: 10px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-mini { font-size: 10px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.cw-mini.warn { color: #f5c56b; }
.cw-mini.ok { color: var(--seko); }
.cw-note { margin-top: 14px; font-size: 10px; color: var(--muted); }
.cw-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; margin-top: 16px; }
.cw-shot { padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; text-align: left; cursor: pointer; color: var(--text); }
.cw-shot:hover { border-color: rgba(99,230,210,.3); }
.cw-shot.on { border-color: var(--seko); }
.cw-shot-media { position: relative; aspect-ratio: 16/10; background: #090b0e; display: grid; place-items: center; }
.cw-shot-media img { width: 100%; height: 100%; object-fit: cover; }
.cw-shot-ph { font-size: 10px; color: rgba(255,255,255,.25); }
.cw-shot-media em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 4px; }
.cw-shot-body { padding: 8px 9px; }
.cw-shot-body b { font-size: 10px; }
.cw-shot-body p { margin: 4px 0 3px; font-size: 10px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-doc-foot { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.cw-right { display: flex; flex-direction: column; }
.cw-prev-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; }
.cw-prev-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--seko); color: #04110f; font-weight: 800; font-size: 22px; }
.cw-prev-empty h3 { font-size: 16px; margin: 6px 0 0; }
.cw-prev-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.cw-prev-head b { color: var(--text); }
.cw-prev-media { aspect-ratio: 9/12; max-height: 42vh; margin: 12px; border-radius: 10px; background: #090b0e; display: grid; place-items: center; overflow: hidden; }
.cw-prev-media img { width: 100%; height: 100%; object-fit: cover; }
.cw-prev-media span { font-size: 11px; color: rgba(255,255,255,.3); }
.cw-prev-body { padding: 4px 14px 14px; overflow: auto; }
.cw-prev-body h3 { font-size: 16px; margin: 0 0 6px; }
.cw-prev-body p { font-size: 11px; line-height: 1.65; color: var(--muted); margin: 0 0 8px; }
.cw-prev-actions { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.cw-prev-actions .btn { font-size: 11px; }
@media (max-width: 1280px) { .cw { grid-template-columns: 310px minmax(0,1fr) 300px; } }
@media (max-width: 1080px) { .cw { grid-template-columns: 300px minmax(0,1fr); } .cw-right { display: none; } }
@media (max-width: 760px) {
  .cw { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .cw-left { max-height: 52vh; }
  .cw-doc { order: 2; }
  .cw-right { display: none; }
  .cw-doc-scroll { padding: 14px; }
  .cw-paper { padding: 16px; }
  .cw-paper h1 { font-size: 24px; }
  .cw-art-grid { grid-template-columns: 1fr; }
  .cw-doc-foot { flex-wrap: wrap; }
}

/* 创作对话：右栏镜头提示词编辑 + 收尾条 */
.cw-field { display: block; margin: 14px 0 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cw-prompt-box { width: 100%; resize: vertical; min-height: 76px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 11px; line-height: 1.6; font-family: inherit; }
.cw-prompt-box:focus { outline: none; border-color: rgba(99,230,210,.45); }
.cw-prev-media video { width: 100%; height: 100%; object-fit: cover; background: #090b0e; }
.cw-doc-foot { flex-wrap: wrap; }
.cw-doc-foot .spacer { flex: 1 1 12px; }
.cw-doc-foot > span { white-space: nowrap; }
.cw-doc-foot > .btn { margin-left: auto; }

/* 创作对话：底部参数栏（模型 / 画幅 / 一键生图生视频） */
.cw { grid-template-rows: minmax(0, 1fr) auto; }
.cw-right { overflow-y: auto; }
.cw-prev-media { max-height: min(30vh, 300px); }
.cw-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cw-bar-field { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.cw-bar-field > span { letter-spacing: .08em; text-transform: uppercase; font-size: 10px; }
.cw-bar-field select { height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 11px; max-width: 150px; }
.cw-bar-ro { font-size: 10px; color: var(--muted); padding: 0 2px; white-space: nowrap; }
.cw-bar .spacer { flex: 1 1 auto; }
.cw-bar .btn { white-space: nowrap; }

/* 创作对话：AI 追问卡（缺口 + 是否现在生图） */
.cw-ask { margin: 10px 0 2px; padding: 10px 11px; border: 1px solid rgba(99,230,210,.22); border-radius: 12px; background: rgba(99,230,210,.05); }
.cw-ask-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.cw-ask-head b { font-size: 12px; color: var(--text); line-height: 1.5; }
.cw-ask p { margin: 0 0 8px; font-size: 11px; line-height: 1.6; }
.cw-ask-acts { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1360px) {
  .cw-bar-field > span { display: none; }
  .cw-bar-field select { max-width: 124px; }
}
@media (max-width: 1180px) {
  .cw-bar { gap: 6px; padding: 6px 9px; }
  .cw-bar-field select { max-width: 104px; }
  .cw-bar-ro { display: none; }
}
@media (max-width: 1080px) {
  .cw { grid-template-rows: minmax(0, 1fr) auto; }
  .cw-bar { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .cw-bar { gap: 8px; }
  .cw-bar-field select { max-width: 110px; }
}

/* 成片台（编辑器）：左对话 + 中间分镜卡 + 右下大预览 */
.ed { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; height: calc(100vh - 176px); min-height: 460px; }
.ed-chat { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.ed-chat-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.ed-chat-head b { display: block; font-size: 12px; }
.ed-chat-head em { display: block; font-size: 10px; color: var(--muted); font-style: normal; margin-top: 2px; }
.ed-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ed-chat-foot { padding: 0 13px 9px; font-size: 10px; color: var(--muted); }
.ed-main { display: grid; grid-template-rows: 150px minmax(0, 1fr) auto; gap: 10px; min-height: 0; }
.ed-cards { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 6px; min-height: 0; }
.ed-card { flex: 0 0 152px; display: flex; flex-direction: column; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.ed-card:hover { border-color: rgba(99, 230, 210, .35); }
.ed-card.on { border-color: rgba(99, 230, 210, .6); box-shadow: 0 0 0 1px rgba(99, 230, 210, .28) inset; }
.ed-card-media { position: relative; aspect-ratio: 16 / 10; background: #0b0d11; display: grid; place-items: center; overflow: hidden; }
.ed-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-card-media .ed-ph { font-size: 15px; color: #454d59; font-weight: 700; }
.ed-card-media em { position: absolute; left: 5px; top: 4px; font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 5px; background: rgba(6, 9, 12, .68); color: #cfd6df; }
.ed-card-media b { position: absolute; right: 5px; bottom: 4px; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 5px; background: rgba(6, 9, 12, .68); color: #cfd6df; }
.ed-card-body { padding: 6px 8px 8px; min-width: 0; }
.ed-card-body > b { display: block; font-size: 11px; font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ed-card-sub { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.ed-stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.ed-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ed-stage-head b { font-size: 12px; margin-right: 8px; }
.ed-stage-head .muted { font-size: 10px; }
.ed-screen { display: grid; place-items: center; min-height: 0; background: #06080b; padding: 8px; }
.ed-screen video, .ed-screen .ta-still { max-width: 100%; max-height: 100%; display: block; border-radius: 8px; background: #06080b; }
.ed-empty { display: grid; place-items: center; gap: 3px; padding: 24px 16px; text-align: center; color: var(--muted); font-size: 12px; }
.ed-empty span { color: var(--text); font-size: 13px; }
.ed-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.ed-tools .ta-field { font-size: 10px; }
.ed-tools .ta-field input, .ed-tools .ta-field select { height: 28px; font-size: 11px; padding: 0 7px; width: 92px; }
.ed-tools .ta-field select { width: 108px; }
.ed-tools-tip { font-size: 10px; color: var(--muted); margin-left: auto; }
.ed-tools-tip b { color: var(--text); }
.ed-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.ed-stats { display: flex; align-items: center; gap: 14px; }
.ed-stats b { color: var(--text); font-size: 12px; margin-left: 3px; }
.ed-film { display: flex; align-items: center; gap: 8px; }
.ed-film video { height: 54px; border-radius: 8px; background: #06080b; }

@media (max-width: 1280px) {
  .ed { grid-template-columns: 300px minmax(0, 1fr); }
  .ed-main { grid-template-rows: 138px minmax(0, 1fr) auto; }
}
@media (max-width: 1080px) {
  .ed { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ed-chat { height: 260px; }
  .ed-main { height: calc(100vh - 200px); min-height: 520px; }
}


/* ---------- 媒体缺失兜底（产物文件被清理 / 换机后仍能看懂） ---------- */
img.media-failed.media-ph { object-fit: cover; }
video.media-failed { opacity: 0 !important; }
.ed-screen.media-failed > img,
.cw-prev-media.media-failed > img { display: none; }
.ed-screen.media-failed,
.cw-prev-media.media-failed { position: relative; background: radial-gradient(120% 120% at 30% 0%, #1a2129 0%, #0f141a 60%); }
.ed-screen.media-failed::after,
.cw-prev-media.media-failed::after {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; font-size: 12px; line-height: 1.7; color: #7d8896; letter-spacing: .02em;
  content: "画面文件不在了 · 点「生成画面」重新出一张";
}
.cw-prev-media.media-failed::after { content: "画面文件不在了 · 重新生成一张"; }
.ed-card-media.media-failed::after {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #5f6a78; content: "无图";
}
[data-theme="light"] .ed-screen.media-failed,
[data-theme="light"] .cw-prev-media.media-failed { background: #eef1f5; }
[data-theme="light"] .ed-screen.media-failed::after,
[data-theme="light"] .cw-prev-media.media-failed::after { color: #8a94a3; }

/* ---------- 可读性：正文性小字统一抬到 10.5px（媒体角标保持紧凑） ---------- */
.hc-meta, .dr-eyebrow, .dr-meta, .drp-head, .hub-stat span,
.cw-check em, .cw-kv em, .cw-entity-title span, .cw-mini,
.ed-card-sub, .ss-foot, .asset-card .info .tag { font-size: 11px !important; }
.tag-new { font-size: 10px !important; }

/* ---------- 钱包右侧概览与左侧卡片对齐 ---------- */
.wallet-glance { display: flex; flex-direction: column; gap: 2px; }
.wallet-glance .wg-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); }
.wallet-glance .wg-row b { font-size: 13px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   v4 · 可读性与统一（2026-11-14）
   目标：电脑上一眼看清；同类元素同一套字号/高度；挤的地方省略号而不是压字。
   ============================================================ */

/* 1) 字号基线：正文 15px，说明 13px，辅助标签 12px，徽章 11px */
body { font-size: 15px; line-height: 1.62; }
.page-head h1, .page-title { font-size: 24px; }
.muted, .page-head p, .ph-sub { font-size: 14px; }
.page-kicker, .dr-eyebrow, .dr-count, .new-head, .more-label, .rail-credits,
.comp-hint, .comp-est, .ss-foot, .asset-card .info .tag, .drp-head,
.cw-check em, .cw-kv em, .cw-mini, .cw-entity-title span, .ed-card-sub,
.hc-meta, .dr-meta, .hub-stat span, .pw-meta, .pw-sub, .wb-hint { font-size: 12px !important; }
.dr-status, .tag, .dr-dur, .tag-new { font-size: 11px !important; }
.dr-syn, .hc-syn, .pw-desc { font-size: 13px !important; }
.dr-card h3, .hc-name { font-size: 16px !important; line-height: 1.45; }
.dr-open { font-size: 13px !important; }

/* 2) 省略而不是挤压：标题最多两行，摘要两行，元信息单行省略 */
.dr-card h3, .hc-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal !important; word-break: break-word;
}
.dr-syn, .hc-syn {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dr-meta > span, .hc-meta, .cw-kv span, .ed-card-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-meta { min-width: 0; }

/* 3) 统一控件高度：primary / ghost / sm 三档，横向不再高低不齐 */
.btn, .btn.ghost { height: 38px; border-radius: 10px; }
.btn.sm, .btn.ghost.sm, .dr-ops .btn { height: 32px; padding: 0 12px; font-size: 12px !important; border-radius: 9px; }
.chip, .chip.sm, .seg button, .seg-mini button, .ps-tabs button, .ds-tab-btn { font-size: 13px; }
.chip.sm, .seg-mini button, .ps-tabs button { height: 30px; }
.dr-ops { gap: 8px; opacity: 1 !important; transform: none !important; }
.dr-ops .btn { background: var(--brand); color: #fff; border-color: transparent; }
.dr-ops .btn.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); }
.dr-card { border-radius: 14px; }
.dr-body { padding: 16px 18px 14px; }

/* 4) 卡片栅格：宽屏 3 列，1280 以下 2 列，1024 以下 1 列留白更舒服 */
.dr-grid, .hc-grid { gap: 16px; }
@media (max-width: 1280px) {
  .dr-grid, .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 1040px) {
  .dr-grid, .hc-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .dr-card { display: flex; flex-direction: column; }
  .dr-cover { aspect-ratio: auto; height: 190px; }
  .dr-body { padding: 14px 16px 16px; }
}

/* 5) 浅色主题下低对比的徽章/状态补足 */
[data-theme="light"] .page-kicker { color: #64748b; }
.cw-pill { font-size: 11px; height: 24px; }

/* 6) 底部参数栏标签不折行 */
.cw-bar-field > span { white-space: nowrap; }
.cw-bar-field select { text-overflow: ellipsis; }

/* 7) 成片台：预览与工具条不再重叠，工具条自带底色 */
.ed-stage-head, .ed-tools { position: relative; z-index: 2; background: var(--panel); }
.ed-screen { overflow: hidden; }
.ed-tools { border-top: 1px solid var(--line); }
[data-theme="dark"] .ed-tools, [data-theme="dark"] .ed-stage-head { background: var(--panel); }
.ed-tools .ta-field { font-size: 12px; }
.ed-tools .ta-field input, .ed-tools .ta-field select { height: 32px; font-size: 12px; }
.ed-tools-tip { font-size: 12px; }

/* 8) 深色主题下正文小字同样不小于 12px（与浅色一致） */
[data-theme="dark"] .dr-eyebrow, [data-theme="dark"] .dr-meta, [data-theme="dark"] .dr-count,
[data-theme="dark"] .page-kicker, [data-theme="dark"] .drp-head, [data-theme="dark"] .hc-meta { font-size: 12px; }

/* 9) 窄屏（≤1180）不挤压：文档页脚只留阶段与主按钮，创作台/成片台改为滚动布局 */
@media (max-width: 1180px) {
  .cw-doc-foot > span:nth-of-type(2) { display: none; }
  .cw-doc-foot { gap: 6px 10px; }
}
@media (max-width: 1080px) {
  .cw { height: auto; min-height: 0; }
  .cw-left { height: 74vh; min-height: 460px; }
  .cw-doc, .cw-right { max-height: none; }
  .cw-doc { overflow: visible; }
  .cw-bar { position: sticky; bottom: 8px; z-index: 6; box-shadow: 0 12px 30px -18px rgba(15,23,42,.35); }
  .ed-chat { height: auto; max-height: 240px; }
  .ed-msgs { min-height: 96px; max-height: 150px; }
  .ed-main { height: auto; min-height: 0; grid-template-rows: 126px minmax(0, 1fr) auto; }
  .ed-screen { height: 46vh; }
}

/* 10) 中文长标题在窄卡片里两行截断，不撑破工具栏 */
.hc-name, .dr-body h3, .cw-entity-title b, .ed-card-body b { overflow-wrap: anywhere; }

/* 9) 运营后台：新增模型弹窗的常用模板 */
.nm-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.nm-preset {
  height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink-2);
}
.nm-preset:hover { border-color: var(--brand); color: var(--brand); }
.nm-preset.on { border-color: var(--brand); background: rgba(99,230,210,.12); color: var(--brand); }


/* 模型页筛选条 */
.mfilter { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.mfilter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mfilter-row .spacer { flex: 1 1 auto; }
.mchip { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mchip i { font-style: normal; font-size: 11px; color: var(--muted); }
.mchip:hover { border-color: var(--brand); color: var(--ink); }
.mchip[data-on="1"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.mchip[data-on="1"] i { color: rgba(255,255,255,.78); }
.mfilter .msel, .mfilter .msearch { flex: 0 0 auto; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 12px; font-family: inherit; }
.mfilter .msel { width: 190px; padding: 0 10px; }
.mfilter .msearch { width: 280px; padding: 0 11px; }
#model-provider { width: 190px !important; }
#model-q { width: 280px !important; }
#model-pick { width: 268px !important; }
.mfilter .msel:hover, .mfilter .msearch:hover { border-color: rgba(15,23,42,.22); }
#model-count { white-space: nowrap; }
.msearch:focus, .msel:focus { outline: none; border-color: var(--brand); }
.mtable td { vertical-align: middle; }
.mtable tbody tr:hover { background: rgba(91,91,245,.045); }
.mkind { display: inline-block; padding: 1px 7px; border-radius: 6px; background: rgba(91,91,245,.10); color: #4b4be0; font-size: 12px; }
.mempty { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }
[data-theme="dark"] .mfilter { background: rgba(255,255,255,.02); }
[data-theme="dark"] .mchip { background: rgba(255,255,255,.04); color: #c8d2de; }
[data-theme="dark"] .mchip[data-on="1"] { background: var(--brand); color: #080a0e; }
[data-theme="dark"] .mchip[data-on="1"] i { color: rgba(8,10,14,.6); }
[data-theme="dark"] .msel, [data-theme="dark"] .msearch { background: #0f1318; color: #e6edf5; }
[data-theme="dark"] .mkind { background: rgba(99,230,210,.12); color: #63e6d2; }
[data-theme="dark"] .mtable tbody tr:hover { background: rgba(99,230,210,.05); }


/* 运营后台：概览折叠条 */
.ovtick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); font-size: 12px; color: #5b6472; }
.ovtick b { color: var(--ink); font-size: 15px; font-weight: 620; margin-left: 4px; }
.mtable thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
[data-theme="dark"] .ovtick { background: rgba(255,255,255,.02); color: #9fb0c2; }
[data-theme="dark"] .ovtick b { color: #e8eef4; }


/* 首页创作条：导演 / 集数 / 时长 */
.comp-foot { flex-wrap: wrap; row-gap: 8px; }
.comp-foot .comp-model { flex: 0 0 auto; }
.comp-model > span { white-space: nowrap; }
.comp-model select { max-width: 176px; }
[data-home-pick="director"] { width: 168px !important; max-width: 168px !important; }
[data-home-pick="episodes"] { width: 76px !important; }
[data-home-pick="duration"] { width: 92px !important; }
[data-home-pick="episodes"] { max-width: 78px !important; }
[data-home-pick="duration"] { max-width: 86px !important; }
.comp-est { white-space: nowrap; }
@media (max-width: 1560px) { .comp-hint { display: none; } }
@media (max-width: 1180px) {
  .comp-model select { max-width: 124px; }
  .comp-model > span { font-size: 10px; }
}


/* 首页创作条窄屏收口 */
@media (max-width: 1320px) {
  .comp-foot .comp-send { margin-left: auto; }
  .comp-foot > .comp-est { order: 5; }
  .comp-foot > .comp-hint, .comp-foot > .spacer { display: none; }
}
@media (max-width: 980px) {
  .comp-model select { max-width: 108px; }
  [data-home-pick="episodes"] { max-width: 66px !important; }
  [data-home-pick="duration"] { max-width: 74px !important; }
}


/* 毛玻璃层（glass）：给壳层与主要面板做半透明 + 背景模糊 */
:root {
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-brd: rgba(15, 23, 42, .08);
  --glass-blur: 16px;
}

/* 背景加一层很淡的色晕，模糊才有层次（不影响文字对比） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(46vw 40vh at 10% -6%, rgba(91, 91, 245, .30), transparent 64%),
    radial-gradient(42vw 36vh at 94% 2%, rgba(45, 212, 191, .22), transparent 62%),
    radial-gradient(50vw 40vh at 52% 110%, rgba(120, 92, 255, .22), transparent 64%),
    radial-gradient(34vw 28vh at 78% 66%, rgba(56, 189, 248, .12), transparent 68%);
}
.shell { position: relative; z-index: 1; }

/* 顶栏 / 侧栏 */
.topbar {
  background: var(--glass) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-bottom: 1px solid var(--glass-brd) !important;
}
.side {
  background: var(--glass-strong) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-right: 1px solid var(--glass-brd) !important;
}

/* 卡片与面板 */
.card,
.dr-card,
.hb-card,
.cw-paper,
.cw-left,
.cw-right,
.ed-chat,
.ed-stage,
.ed-summary,
.composer,
.hs-panel,
.drg-card,
.mfilter,
.mtable {
  background: var(--glass) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--glass-brd);
}

/* 弹窗与命令面板 */
.modal-mask { background: rgba(9, 12, 18, .42); backdrop-filter: blur(6px); }
.modal,
.cmdk,
.palette,
.drawer {
  background: var(--glass-strong) !important;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-brd);
}

/* 媒体与输入区域保持不透明，避免文字糊在视频上 */
.ed-screen,
.cw-prev-media,
.cw-entity-media,
.dr-cover,
.cont-cover,
.asset-card .thumb,
.hc-cover {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 行内小卡片不要模糊，免得一层套一层 */
.dr-body, .cw-doc, .cw-msgs, .ed-cards, .ed-tools, .mtable, table, tbody, tr, td, th {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 抽屉/浮层的小阴影统一一点 */
.new-panel, .toast, .cmdk {
  box-shadow: 0 26px 60px -22px rgba(2, 6, 23, .55);
}


/* 字号阶梯（全站统一，只有这 16 档）
   10 caption / 11 小标签 / 12 表格与元信息 / 13 正文小 / 14 正文 / 15 长文
   16 卡片标题 / 18 小节标题 / 20 区块标题 / 22 页面副标题 / 24 页面标题
   28 大数字 / 32 强调数字 / 36 40 42 首页主标题 */
:root {
  --fs-caption: 10px;
  --fs-label: 11px;
  --fs-meta: 12px;
  --fs-body-sm: 13px;
  --fs-body: 14px;
  --fs-prose: 15px;
  --fs-title-sm: 16px;
  --fs-title: 18px;
  --fs-h3: 20px;
  --fs-h2: 22px;
  --fs-h1: 24px;
  --fs-num: 28px;
  --fs-num-lg: 32px;
}

/* 选中的模型已下架时的底栏提示 */
.cw-bar-warn {
  flex: 1 0 100%;
  font-size: 12px;
  color: #b45309;
  background: rgba(245, 197, 107, .12);
  border: 1px solid rgba(245, 197, 107, .28);
  border-radius: 8px;
  padding: 5px 10px;
  margin-top: 2px;
}
[data-theme="dark"] .cw-bar-warn { color: #f5c56b; background: rgba(245, 197, 107, .1); }


/* 全局统一：卡片层级与圆角 / 深色下主次按钮 */
:root {
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
}
.card, .dr-card, .hb-card, .cw-paper, .ed-chat, .ed-stage, .hs-panel { border-radius: var(--r-md); }
.modal, .cmdk, .drawer, .palette { border-radius: var(--r-lg); }
.btn, .chip, .tag { border-radius: var(--r-sm); }
.btn.ghost { border-radius: var(--r-sm); }

html[data-theme="dark"] .dr-ops .btn:not(.ghost):not(.soft):not(.danger) {
  background: var(--brand);
  border-color: transparent;
  color: #06231f;
}
html[data-theme="dark"] .dr-ops .btn:not(.ghost):not(.soft):not(.danger):hover { background: var(--brand); filter: brightness(1.06); }
[data-theme="dark"] .dr-ops .btn.ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: #dbe3ec;
}
[data-theme="dark"] .dr-ops .btn:not(.ghost):hover { filter: brightness(1.06); }


/* 分镜板（creative.js）：深色写死改为主题令牌，浅色下自动变白卡 */
[data-theme="light"] .pw-side,
[data-theme="light"] .pw-inspect,
[data-theme="light"] .pw-main {
  background: var(--glass);
  border-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
[data-theme="light"] .pw-title h1 { color: var(--ink); }
[data-theme="light"] .pw-title > span { color: #5b6472; }
[data-theme="light"] .dp-title b { color: var(--ink); }
[data-theme="light"] .dp-title span { color: #5b6472; }
[data-theme="light"] .dp-note { color: #5b6472; }
[data-theme="light"] .dp-sec { color: #667085; }
[data-theme="light"] .dp-agent { color: #667085; }

/* 分镜板顶部：把原生下拉换成与全站一致的胶囊下拉 */
.pw-top-ops select,
.ds-select,
#ds-qc-ep {
  height: 32px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--glass);
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
[data-theme="dark"] .pw-top-ops select,
[data-theme="dark"] .ds-select,
[data-theme="dark"] #ds-qc-ep {
  background-color: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: #dbe3ec;
}


/* 全站 select 统一：去掉原生动件（滚动箭头/白底/方角），统一自绘 chevron */
select:not([multiple]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 26px;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 9px 6px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23808a99' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
select:not([multiple])::-webkit-inner-spin-button,
select:not([multiple])::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select option { background: var(--panel); color: var(--ink); }
[data-theme="dark"] select option { background: #14181d; color: #dbe3ec; }


/* 项目导航：更多面板不再被滚动容器裁切（此前的两条白底+滚动箭头是 overflow 造成的） */
.proj-nav { overflow: visible !important; flex-wrap: wrap; }


/* a11y：焦点环 / 减少动态 / 热区（DESIGN.md §6-7） */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
/* 行内小操作：视觉不变，热区 ≥28px */
.btn.sm, .mtable .btn, .mtable a, .link-btn, .dr-ops .btn, .dp-agent {
  min-height: 28px;
  min-width: 28px;
}
.mtable .btn, .mtable a { display: inline-flex; align-items: center; padding-block: 4px; }
/* 下拉与勾选 */
.comp-model select { height: 28px; line-height: 26px; }
.card select, .mfilter select { min-height: 30px; }
.asset-card input[type="checkbox"] { width: 18px; height: 18px; margin: 5px; }
.asset-card label:has(> input[type="checkbox"]) { padding: 6px; }
/* 文字链接类补热区 */
.view-all, .home-more, a[data-act="open-project"] { padding-block: 3px; }


/* a11y：表格行内操作与页脚链接热区（用元素选择器，不依赖类名） */
td button, td a, td select {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding-block: 4px;
}
.cont-foot em, .cont-foot a, .dr-foot a, .dr-foot em, .hf-go,
.home-hero a, .home-more, .hcard-foot a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.qc-chip, .quick-chips button { min-height: 28px; }


/* a11y：行内按钮最小宽度（宽度也补到 28） */
td button, td a { min-width: 28px; justify-content: center; }


/* 创作台中栏：长文档分节 */
.cw-sec { padding: 4px 0 22px; border-bottom: 1px dashed var(--line); }
.cw-sec:last-child { border-bottom: 0; padding-bottom: 8px; }
.cw-sec-head { display: flex; align-items: center; gap: 10px; padding: 10px 2px 12px; }
.cw-sec-no {
  font: 600 11px/1 ui-monospace, monospace; letter-spacing: .06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px;
}
.cw-sec-head b { font-size: 15px; color: var(--ink); }
.cw-sec-state { margin-left: auto; font-size: 12px; color: var(--muted); }
.cw-sec.done .cw-sec-no { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.cw-sec.done .cw-sec-state { color: var(--brand); }
.cw-check i { min-width: 18px; text-align: center; font-style: normal; font-size: 11px; }


/* 成片台：预览更大，摘要压成一行 */
.ed-main { grid-template-rows: 136px minmax(0, 1fr) auto; }
.ed-summary { font-size: 12px; gap: 12px; }
.ed-cards { padding-bottom: 2px; }
@media (max-width: 1080px) { .ed-screen { height: 56vh; } }

/* 作品卡：来源项目链接 */
.gl-src { display: inline-flex; align-items: center; margin-top: 6px; color: var(--brand); text-decoration: none; }
.gl-src:hover { text-decoration: underline; }


/* ---------------------------------------------------------------
   v9 视觉基调：一个强调色、发丝边框、安静的层级
   原则——深色不是「黑底白字」，而是「低亮度的纸」；
   强调色只出现在可交互与状态上，装饰一律用明度差表达。
   --------------------------------------------------------------- */
:root {
  --ink: #171a1f;
  --ink-2: #3b424d;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, .09);
  --line-soft: rgba(15, 23, 42, .06);
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --bg: #f4f5f7;
  --brand: #4f46e5;
  --brand-ink: #3730a3;
  --accent: #0d9488;
}

body { background: var(--bg); color: var(--ink); letter-spacing: -.006em; }

/* 卡片：发丝边框 + 极轻的内高光，取消厚投影 */
.card, .dr-card, .hb-card, .cw-paper, .ed-chat, .ed-stage, .hs-panel, .stat, .hf-card, .gl-card {
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .14s ease, transform .14s ease, background-color .14s ease;
}
.card:hover, .dr-card:hover, .hf-card:hover, .gl-card:hover { border-color: rgba(127, 148, 255, .32); }
[data-theme="light"] .card, [data-theme="light"] .dr-card, [data-theme="light"] .hb-card,
[data-theme="light"] .hf-card, [data-theme="light"] .stat {
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
[data-theme="light"] .card:hover, [data-theme="light"] .dr-card:hover { box-shadow: 0 6px 20px -12px rgba(16, 24, 40, .28); }

/* 主按钮：唯一实心；其余全部描边，避免一屏多个白块 */
.btn:not(.ghost):not(.soft):not(.danger):not(.sm) {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset;
}
[data-theme="dark"] .btn:not(.ghost):not(.soft):not(.danger) {
  background: var(--brand);
  border-color: transparent;
  color: #0a0d12;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.btn.ghost:hover { border-color: rgba(127, 148, 255, .38); color: var(--ink); }

/* 首页：留白换层级，标题只靠字号与字距 */
.home-hero, .hero { padding-top: 8vh; }
.home-hero h1, .hero h1 {
  letter-spacing: -.035em;
  line-height: 1.06;
  font-weight: 700;
}
.home-hero p, .hero p {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  color: var(--muted);
}

/* 创作条：一张安静的横卡，聚焦时才亮边 */
.composer {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 60px -40px rgba(0, 0, 0, .6);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.composer:focus-within {
  border-color: rgba(127, 148, 255, .42);
  box-shadow: 0 24px 60px -32px rgba(60, 80, 200, .45);
}

/* 滚动条与焦点：低存在感，但可感知 */
* { scrollbar-width: thin; scrollbar-color: rgba(127, 148, 255, .28) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(127, 148, 255, .22); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(127, 148, 255, .38); }


/* v9 项目卡校准：封面定高、标题一级、元信息退后、进度条变细 */
.dr-card { overflow: hidden; }
.dr-cover { height: 176px; aspect-ratio: auto; background: var(--panel-2); }
.dr-cover img { width: 100%; height: 100%; object-fit: cover; }
.dr-body { padding: 16px 18px 18px; }
.dr-card h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35;
  margin: 2px 0 6px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.dr-eyebrow, .dr-meta { font-size: 12.5px; color: var(--muted); }
.dr-syn { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dr-prog { gap: 8px; margin-top: 14px; }
.dr-prog + .dr-prog { margin-top: 10px; }
.dr-prog b, .dr-prog span { font-size: 12px; }
.dr-ops { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.dr-ops .btn { flex: 1 1 0; justify-content: center; height: 34px; font-size: 13px; }

/* 进度条：2px 细线，未完成部分更淡 */
.dr-prog .bar, .dr-prog [class*="bar"] { height: 3px; border-radius: 3px; background: var(--line); }

/* 深色下主按钮用深字（品牌青/蓝底 + 白字对比不足） */
html[data-theme="dark"] .dr-ops .btn:not(.ghost):not(.soft):not(.danger),
html[data-theme="dark"] .btn:not(.ghost):not(.soft):not(.danger) { color: #0a0d12; }
html[data-theme="dark"] .dr-ops .btn.ghost { color: var(--ink-2); }

/* v9 创作台三栏节奏：统一 16/12 间距，气泡与清单收紧 */
.cw-left { padding: 14px 14px 12px; }
.cw-left-head { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.cw-check-list { gap: 6px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.cw-check { padding: 8px 10px; border-radius: 10px; gap: 9px; }
.cw-check i { min-width: 18px; }
.cw-check b { font-size: 13px; font-weight: 550; }
.cw-check em { font-size: 11.5px; }
.cw-msgs { gap: 10px; padding: 4px 2px 8px; }
.cw-msg .bubble { padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.65; }
.cw-composer { padding-top: 10px; }
.cw-doc-scroll { padding: 0 22px 8px; }
.cw-sec { padding: 2px 0 26px; }
.cw-sec-head { padding: 8px 2px 14px; }
.cw-right { padding: 16px 16px 14px; }
.cw-prev-body h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cw-prev-body p { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.cw-prev-actions { gap: 8px; margin-top: 10px; }

/* v9 成片台：选中态明确、预览留白、工具条分组 */
.ed-card { border-radius: 12px; border: 1px solid var(--line); background: var(--panel); overflow: hidden;
  transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease; }
.ed-card:hover { border-color: rgba(127,148,255,.3); }
.ed-card.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 26%, transparent), 0 10px 26px -18px rgba(0,0,0,.7);
}
.ed-card.on .ed-card-body b { color: var(--ink); }
.ed-cards { gap: 10px; }
.ed-card-media { border-radius: 0; }
.ed-screen { padding: 18px; background: var(--panel-2); }
.ed-screen video, .ed-screen .ta-still { border-radius: 10px; }
.ed-stage-head { padding: 10px 14px; }
.ed-stage-head b { font-size: 13.5px; }
.ed-tools { padding: 12px 14px; gap: 14px; align-items: flex-end; }
.ed-tools .ta-field { display: flex; flex-direction: column; gap: 5px; }
.ed-tools .ta-field span, .ed-tools .ta-field label { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.ed-tools .ta-field input, .ed-tools .ta-field select { height: 32px; font-size: 12.5px; }
.ed-tools-tip { font-size: 11.5px; color: var(--muted); }
.ed-summary { padding: 10px 2px 0; border-top: 1px solid var(--line-soft); }

/* v9 后台表格：行高、表头、行内操作密度 */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
table thead th {
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line); background: transparent;
}
table tbody td { padding: 11px 12px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table tbody tr:hover td { background: rgba(127,148,255,.06); }
table tbody tr:last-child td { border-bottom: 0; }
table tbody td:first-child { color: var(--ink); }
/* 行内操作：不换行、按钮之间 2px 视觉间隙 */
table td .btn, table td a, table td button { margin-right: 2px; }
table td .btn.sm, table td a.btn.sm, table td button.btn.sm { height: 26px; font-size: 12px; padding: 0 8px; }
[data-theme="light"] table tbody tr:hover td { background: #f5f7fb; }

/* 语义令牌层：组件只引用语义名，颜色由主题决定
   surface=卡片底 surface-2=页面底 border=描边 text=主文 text-2=次文 text-3=弱信息 */
:root {
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --surface-3: #f7f8fa;
  --border: rgba(15, 23, 42, .09);
  --border-soft: rgba(15, 23, 42, .06);
  --text: #171a1f;
  --text-2: #3b424d;
  --text-3: #6b7280;
  --accent-ink: #0d9488;
}
/* 让旧变量名与新语义名保持同一来源，避免两套值漂移 */
.card, .dr-card, .hb-card, .stat, .hs-panel, .composer, .cw-paper, .ed-chat, .ed-stage {
  background: var(--surface);
  border-color: var(--border);
}
body, .shell, .main { background: var(--surface-2); color: var(--text); }
.muted, .tiny.muted, .dr-eyebrow, .dr-meta, .page-kicker, .cw-check em, .ed-card-sub { color: var(--text-3); }


/* 深色令牌合并：六个历史版本按「后者覆盖前者」合成一份，值与原有效值完全一致 */
[data-theme="dark"] {
  --ink: #e9edf3;
  --ink-2: #b6bfcc;
  --muted: #8b95a3;
  --muted-2: #6a707a;
  --line: rgba(255, 255, 255, .09);
  --line-2: #17191d;
  --bg: #08090b;
  --panel: #0e1013;
  --panel-2: #12151a;
  --chip: #17191e;
  --thumb: #121418;
  --hover: #14161a;
  --ghost-line: #33363d;
  --bg-fade: rgba(6,7,10,.78);
  --brand: #7c9cff;
  --brand-ink: #a9bcff;
  --brand-soft: rgba(99,230,210,.10);
  --ok: #34d399;
  --ok-soft: #10291f;
  --warn: #fbbf24;
  --warn-soft: #2a2114;
  --err: #f87171;
  --err-soft: #2c1618;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 24px 60px -30px rgba(0,0,0,.9);
  --shadow-lg: 0 40px 100px -40px rgba(0,0,0,.95);
  --seko: #6ee7d8;
  --glass: rgba(13, 16, 21, .52);
  --glass-strong: rgba(10, 12, 16, .74);
  --glass-brd: rgba(255, 255, 255, .08);
  --line-soft: rgba(255, 255, 255, .05);
  --accent: #5eead4;
  --surface: #0e1013;
  --surface-2: #08090b;
  --surface-3: #12151a;
  --border: rgba(255, 255, 255, .09);
  --border-soft: rgba(255, 255, 255, .05);
  --text: #e9edf3;
  --text-2: #b6bfcc;
  --text-3: #8b95a3;
  --accent-ink: #5eead4;
}


/* ds-tabs：选中态跟主题（原来写死 #101828 + 白字，浅色下像一块黑药丸） */
.ds-tab-btn.on, .ds-tab-btn.on.soft { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.10); }
[data-theme="dark"] .ds-tab-btn.on, [data-theme="dark"] .ds-tab-btn.on.soft { background: rgba(255,255,255,.10); color: var(--text); }

/* 首页减噪（Seko 化第 1 步）：特色功能从四张卡降为一行文字链 */
.hf-grid, .hf-row { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hf-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  min-height: 0 !important;
  display: inline-flex; align-items: baseline; gap: 7px;
  border-radius: 0 !important;
}
.hf-card:hover { transform: none !important; }
.hf-card .hf-ico { color: var(--muted); display: inline-flex; transform: translateY(2px); }
.hf-card b, .hf-card strong { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hf-card p, .hf-card .hf-desc { display: none; }
.hf-card:hover b { color: var(--brand); }
.hf-head { margin-bottom: 6px; }
.hf-head span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* 首页参数收纳：默认只显示一行摘要，点开才露出五个下拉 */
.comp-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border-soft); background: transparent;
  color: var(--text-3); font-size: 12px; font-family: inherit; cursor: pointer;
}
.comp-toggle:hover { color: var(--text-2); border-color: var(--border); }
.comp-toggle i { font-style: normal; font-size: 9px; opacity: .7; transition: transform .14s ease; }
.params-open .comp-toggle i { transform: rotate(180deg); }
.comp-params { display: none; flex-wrap: wrap; gap: 6px; }
.params-open .comp-params { display: flex; }

/* 首页/项目页减噪第 2 步：制作流程六格压成一条进度条 */
.hub-flow .card-body, .hub-flow { padding-bottom: 12px; }
.hub-flow-grid, .hub-flow .hub-steps {
  display: flex !important; flex-wrap: nowrap !important; gap: 4px !important;
  overflow-x: auto; padding-bottom: 2px;
}
.hub-step {
  flex: 1 1 0; min-width: 96px; padding: 8px 10px !important;
  border-radius: var(--r-sm) !important;
  background: var(--surface-3) !important;
  border: 1px solid var(--border-soft) !important;
  display: flex; flex-direction: column; gap: 3px;
}
.hub-step:hover { border-color: var(--brand) !important; }
.hub-step .hub-step-desc, .hub-step span span:not(.hub-step-meta) { display: none !important; }
.hub-step-main b { font-size: 12px !important; font-weight: 500; }
.hub-step-main { display: block !important; }
.hub-step-no { font-size: 10px !important; color: var(--text-3) !important; }
.hub-step-meta { font-size: 10px !important; color: var(--text-3) !important; }
.hub-step-state { font-size: 10px !important; color: var(--brand) !important; }

/* 创作台右栏可折叠：收起后中栏多出 340px 阅读宽度 */
.cw-toggle {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--border-soft); background: transparent;
  color: var(--text-3); font-size: 14px; line-height: 1; cursor: pointer;
}
.cw-toggle:hover { color: var(--text); border-color: var(--border); }
.cw.right-off { grid-template-columns: 336px minmax(0, 1fr); }
.cw.right-off .cw-right { display: none; }
@media (max-width: 1080px) {
  .cw.right-off { grid-template-columns: minmax(0, 1fr); }
}

/* 公告条压成一行，不再独占 50px 高 */
.ann-banner { padding: 6px 12px !important; border-radius: var(--r-sm); background: var(--surface-3) !important; border: 1px solid var(--border-soft); }
.ann-banner > .row:first-child { margin-bottom: 0 !important; display: inline-flex; gap: 8px; align-items: center; }
.ann-banner .ann-line { display: inline-flex; gap: 8px; align-items: baseline; margin: 0 0 0 10px; }
.ann-banner .ann-line b { font-size: 12.5px; font-weight: 500; }
.ann-banner .tag { font-size: 10px; padding: 1px 6px; }

/* 项目页：最近产物收成一行横条，把决定权让给「下一步」 */
.hub-assets {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto;
  padding-bottom: 2px;
}
.hub-assets > * { flex: 0 0 168px; }
.hub-assets img, .hub-assets .thumb { height: 96px !important; }
.hub-assets .tiny, .hub-assets .muted { display: none; }

/* 深色层次：三档表面 + 更大呼吸，卡片不再只靠边框区分 */
[data-theme="dark"] {
  --surface: #12151a;
  --surface-2: #0a0c0f;
  --surface-3: #191d24;
  --border: rgba(255,255,255,.075);
  --border-soft: rgba(255,255,255,.045);
}
.card, .dr-card, .hb-card, .hs-panel, .ed-chat, .ed-stage { background: var(--surface); }
.hub-step { background: var(--surface-3) !important; }
.topbar, .side { background: color-mix(in srgb, var(--surface-2) 82%, transparent); }

/* 版块呼吸：内容块之间 24 → 32 */
.home-hero + *, .hub-card + .hub-card, .card + .card { margin-top: 32px; }
.hub-flow, .hub-next { margin-bottom: 20px; }
.home-hero { padding-top: 40px; }
.hf-head { margin-top: 8px; }

/* 三档表面推到创作台与成片台 */
.cw-left, .cw-doc, .ed-chat, .ed-stage { background: var(--surface); }
.cw-right, .ed-summary { background: var(--surface-3); }
.cw-doc-scroll { background: transparent; }
.cw-paper, .cw-sec + .cw-sec { background: transparent; }
.cw-msg .bubble { background: var(--surface-3); }
[data-theme="dark"] .cw-doc, [data-theme="dark"] .ed-stage { border-color: var(--border-soft); }
.ed-screen { background: var(--surface-2); }

/* 成片台摘要：三块小卡，不再是一行文字 */
.ed-summary { display: flex; gap: 10px; align-items: stretch; padding: 10px 12px; }
.ed-stats { display: flex; gap: 10px; flex: 1; }
.ed-stats > * {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 3px;
}
.ed-stats b { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.ed-film { flex: 0 0 auto; }

/* 浅色侧减阴影：只保留浮层与主卡 */
[data-theme="light"] .card,
[data-theme="light"] .dr-card,
[data-theme="light"] .hb-card,
[data-theme="light"] .hub-step,
[data-theme="light"] .cw-paper,
[data-theme="light"] .ed-card,
[data-theme="light"] .ed-stats > * { box-shadow: none !important; }
[data-theme="light"] .modal,
[data-theme="light"] .cmdk,
[data-theme="light"] .drawer,
[data-theme="light"] .composer,
[data-theme="light"] .dr-card:hover { box-shadow: 0 8px 28px -18px rgba(15,23,42,.28) !important; }

/* 项目导航选中态：跟主题走（原来浅色下是黑药丸） */
.proj-nav-item.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
[data-theme="dark"] .proj-nav-item.on {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: none;
}

/* 项目卡标题压在封面上：任何主题都用白字 + 描边，避免浅色下发黑 */
.dr-card h3, .dr-card .dr-name, .hc-name { color: #fff !important; text-shadow: 0 1px 8px rgba(0,0,0,.55); }

/* 修正上一条：项目列表页标题在卡身（白底），只有首页「继续创作」卡是压在封面上的 */
.dr-card h3, .dr-card .dr-name { color: var(--text) !important; text-shadow: none !important; }
.dr-card .dr-syn { color: var(--text-3) !important; }

/* 左侧导航：从图标条升级为有层次的工作台导航 */
.rail {
  width: 76px; padding: 14px 0 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border-right: 1px solid var(--border-soft);
}
.rail-item {
  position: relative; width: 46px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: color .14s ease, background .14s ease;
}
.rail-item:hover { color: var(--text); background: var(--surface-3); }
.rail-item.on { color: var(--brand); background: var(--surface-3); }
.rail-item.on::before {
  content: ""; position: absolute; left: -15px; top: 10px; bottom: 10px;
  width: 2px; border-radius: 2px; background: var(--brand);
}
.rail-item svg { width: 19px; height: 19px; }
.rail-credits {
  margin-top: auto; margin-bottom: 8px; width: 52px; padding: 7px 0; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--border-soft); text-align: center; line-height: 1.25;
}
.rail-credits b { display: block; font-size: 12px; color: var(--text); }
.rail-credits span { font-size: 10px; color: var(--text-3); }

/* Agent 落地页：改由令牌接管（追加在末尾，优先级足够） */
.agent-landing-kicker { color: var(--brand); }
.agent-landing-kicker > span { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.agent-landing h1 { color: var(--text); }
.agent-landing-sub { color: var(--text-3); }
.agent-landing .agent-composer { background: var(--surface); border-color: var(--border); }
.agent-landing .agent-composer textarea { color: var(--text); }
.agent-landing .agent-tools { border-color: var(--border-soft); }
.agent-landing-foot { color: var(--text-3); }

/* 徽章类：状态色走令牌（保留语义色差异，去掉重复的浅色补丁） */
.dr-status, .hc-tag { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.dr-status.ok, .hc-tag.ok { background: color-mix(in srgb, #10b981 12%, transparent); color: #0f7a55; border-color: color-mix(in srgb, #10b981 32%, transparent); }
.hc-tag.brand { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--accent-ink); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
[data-theme="dark"] .dr-status, [data-theme="dark"] .hc-tag { background: color-mix(in srgb, var(--surface-3) 92%, transparent); }
[data-theme="dark"] .dr-status.ok, [data-theme="dark"] .hc-tag.ok { color: #4ade80; }
[data-theme="dark"] .dr-status.ok { background: color-mix(in srgb, #10b981 14%, transparent); border-color: color-mix(in srgb, #10b981 34%, transparent); }
[data-theme="dark"] .hc-tag.brand { color: var(--brand); }

/* 压在封面图上的徽章：不分主题，一律半透明深底 + 白字（否则浅色下与图混在一起） */
.dr-cover .dr-status, .dr-cover .hc-tag, .hc-cover .hc-tag, .hc-cover .dr-status {
  background: rgba(6, 8, 12, .52) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  backdrop-filter: blur(6px);
}

/* 修正：进度带步骤标题/说明在浅色下不可见（基础规则是深色专用白字） */
.hub-step .hub-step-main b { color: var(--text) !important; }
.hub-step .hub-step-main span, .hub-step .hub-step-meta { color: var(--text-3) !important; }
.hub-step .hub-step-no { color: var(--text-3) !important; }

/* hub-stat / hub-next：文字与底色改令牌（原来 base 写死深色值 + 浅色补丁） */
.hub-stat { border-left-color: var(--border-soft); }
.hub-stat b { color: var(--text); }
.hub-stat span { color: var(--text-3); }
.hub-next { background: var(--surface-3); border-color: var(--border-soft); }
.hub-next > div { color: var(--text-2); }
.hub-next .tag.brand {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}
[data-theme="dark"] .hub-stat b { color: var(--text); }
[data-theme="dark"] .hub-next .tag.brand { color: var(--brand); }

/* 创作台：底色/文字/气泡改令牌接管 */
.cw-left, .cw-doc, .cw-right { background: var(--surface); }
.cw-right { background: var(--surface-3); }
.cw-paper { background: var(--surface-2); }
.cw-msg.user .bubble { color: var(--surface); background: var(--text); }
.cw-msg .bubble { background: var(--surface-3); color: var(--text); }
.cw-check em, .cw-kv em { color: var(--text-3); }
.seq-flag, .cw-tag { color: var(--text-2); }
.cw-pill { font-size: 11px; height: 24px; }
.cw-pill.ok { color: #0c7a5e; background: color-mix(in srgb, #10b981 12%, transparent); border-color: color-mix(in srgb, #10b981 30%, transparent); }
.cw-pill.warn { color: #8a5a10; background: color-mix(in srgb, #f59e0b 14%, transparent); border-color: color-mix(in srgb, #f59e0b 32%, transparent); }
.cw-ask { background: color-mix(in srgb, var(--brand) 7%, transparent); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
[data-theme="dark"] .cw-pill.ok { color: #4ade80; }
[data-theme="dark"] .cw-pill.warn { color: #fbbf24; }
[data-theme="dark"] .cw-msg.user .bubble { color: #0a0c0f; }

/* 成片台：普通态改令牌（失败态 media-failed 保留专用样式） */
.ed-tools, .ed-stage-head { background: var(--surface); border-color: var(--border-soft); }
.ed-card-media .ed-ph { color: var(--text-3); }
.ed-card { background: var(--surface); border-color: var(--border); }
.ed-stats > * { background: var(--surface); border-color: var(--border-soft); }

/* 后台模型预设按钮 + 统计卡 */
.nm-preset { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.nm-preset:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--text); }
.nm-preset.on {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-color: var(--brand);
  color: var(--brand);
}
[data-theme="dark"] .nm-preset.on { color: var(--brand); }

/* 六小组：comp-model 下拉 / 面包屑 / ps-title / ds-step / pm-tabs / dc 行 */
.comp-model { background: var(--surface-3); border-color: var(--border); }
.comp-model select { color: var(--text); }
.comp-model select option { background: var(--surface); color: var(--text); }
.crumb { color: var(--text-3); }
.crumb b { color: var(--text); }
.ps-title h2 { color: var(--text); }
.ps-title span { color: var(--text-3); }
.ds-step:hover { background: var(--surface-3); }
.ds-step.on { background: var(--surface); color: var(--text); }
.ds-step-n { background: var(--surface-3); }
.ds-step.done .ds-step-n { background: #0f9e8a; color: #fff; }
.pm-tabs { background: var(--surface-3); border-color: var(--border); }
.pm-tabs .tab { color: var(--text-3); }
.pm-tabs .tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.10); }
.dc { color: var(--text-2); border-top-color: var(--border-soft); }
.dc.done span { color: var(--text); }
.dc em { color: var(--text-3); }
[data-theme="dark"] .ds-step-done, [data-theme="dark"] .ds-step.done .ds-step-n { background: var(--brand); color: #06231f; }

/* 批量接管：壳层与首页/项目页零散组件（每组 1–3 块） */
.side { background: var(--surface-3); border-right-color: var(--border); color: var(--text-2); }
.more-panel, .new-panel { background: var(--surface); border-color: var(--border); }
.more-head { color: var(--text); }
.more-item { color: var(--text-2); }
.more-item:hover { background: var(--surface-3); color: var(--text); }
.topbar { border-bottom-color: var(--border-soft); }
.cmd-trigger { background: var(--surface); border-color: var(--border); color: var(--text-3); }
.cmd-trigger kbd { background: var(--surface-3); border-color: var(--border); color: var(--text-3); }
.credits-chip { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.home-ann { background: var(--surface); border-color: var(--border-soft); color: var(--text-2); }
.home-ann b { color: var(--text); }
.home-kicker, .home-lede { color: var(--text-3); }
.home-hero h1 { color: var(--text); }
.comp-chip { background: var(--surface-3); border-color: var(--border); color: var(--text-3); }
.comp-chip b { color: var(--text-2); }
.comp-est, .comp-hint { color: var(--text-3); }
.qc-label, .qc-more, .sec-count, .sec-link { color: var(--text-3); }
.sec-head h2 { color: var(--text); }
.cont-card, .home-card, .job-pill { background: var(--surface); border-color: var(--border); }
.cont-top b, .hc-body b, .job-pill b { color: var(--text); }
.cont-sub, .hc-meta, .cont-foot, .hc-foot, .home-stats { color: var(--text-3); }
.cont-prog, .hc-bar { background: var(--surface-3); }
.cont-foot em, .hc-foot em, .hs-note, .jp-time, .dr-count { color: var(--text-3); }
.home-stats { border-top-color: var(--border-soft); }
.home-stats b { color: var(--text); }
.hs-btn { border-color: var(--border); color: var(--text-3); }
.proj-nav { border-bottom-color: var(--border-soft); }

/* 第二批批次接管：卡片 / 项目概览 / 分镜板 / 时间轴 / 首页功能卡 */
.dr-card { background: var(--surface); border-color: var(--border); }
.dr-card:hover { border-color: color-mix(in srgb, var(--text) 22%, transparent); }
.dr-body h3 { color: var(--text); }
.dr-open { color: var(--text-2); }
.drp-bar { background: var(--surface-3); }
.drp-bar i { background: var(--brand); }
.hub-crumb { color: var(--text-3); }
.hub-crumb b { color: var(--text-2); }
.hub-title-row h1, .pw-top h1 { color: var(--text); }
.hub-sub, .pw-kicker { color: var(--text-3); }
.hub-chips .chip.plain { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.hub-info dt { color: var(--text-3); }
.hub-info dd { color: var(--text-2); }
.hub-links { border-color: var(--border); }
.pw-queue { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.wd-stat { background: var(--surface); border-color: var(--border); }
.ds-tabs, .ds-rail { background: var(--surface); border-color: var(--border); }
.ds-rail-agent { border-color: var(--border); color: var(--text-2); }
.ta-transport { background: color-mix(in srgb, var(--surface) 92%, transparent); border-color: var(--border); }
.ta-tbtn { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.ta-time { color: var(--text); }
.ta-tip { color: var(--text-3); }
.ta-view { color: var(--text-3); border-color: var(--border); }
.hf-card { border-color: var(--border); }
.hf-card p { color: var(--text-3); }
.hf-ico { background: var(--surface); color: var(--accent-ink); }

/* 修正：项目导航容器底色（浅色下变黑药丸） */
.proj-nav { background: var(--surface); border: 1px solid var(--border); }
.proj-nav-item { color: var(--text-3); }
.proj-nav-item:hover { color: var(--text); background: var(--surface-3); }
[data-theme="dark"] .proj-nav { background: var(--surface-3); border-color: var(--border-soft); }

/* 第二栏加宽后：正文限宽 + 排版放松，避免行长过长 */
.cw-sec { max-width: none; }
.cw-sec .cw-paper { max-width: 100%; }
.cw-doc-scroll { padding-left: 28px; padding-right: 28px; }
.cw-sec p, .cw-sec li, .cw-sec .cw-md, .cw-sec .cw-prose {
  max-width: 720px;
  line-height: 1.75;
}
.cw-sec + .cw-sec { margin-top: 32px; }
.cw-md h1, .cw-md h2, .cw-md h3 { max-width: 720px; }
@media (min-width: 1500px) {
  .cw-sec p, .cw-sec li, .cw-sec .cw-md, .cw-sec .cw-prose { max-width: 780px; }
}

/* 真正的剧本正文容器是 .cw-script（上一条选择器写错了） */
.cw-script {
  max-width: 720px;
  line-height: 1.78;
  white-space: pre-wrap;
  font-size: 13.5px;
  color: var(--text-2);
}
.cw-sec .cw-paper .cw-script { padding-right: 12px; }
@media (min-width: 1500px) { .cw-script { max-width: 780px; } }

/* 大纲正文同样限宽（和 .cw-script 一致） */
.cw-outline {
  max-width: 720px;
  line-height: 1.75;
  white-space: pre-wrap;
  font-size: 13.5px;
  color: var(--text-2);
  border-left: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  padding-left: 14px;
}
@media (min-width: 1500px) { .cw-outline { max-width: 780px; } }

/* 对话分页：更早一条的入口按钮 */
.cw-earlier {
  align-self: center; margin: 2px 0 6px; padding: 5px 12px;
  border-radius: var(--r-pill, 999px);
  border: 1px solid var(--border-soft); background: var(--surface-3);
  color: var(--text-3); font-size: 11.5px; cursor: pointer;
}
.cw-earlier:hover { color: var(--text); border-color: var(--border); }

/* 成片台：让舞台吃掉剩余高度，卡片带收窄，摘要压成一条 */
.ed { height: calc(100vh - 132px); }
.ed-main { grid-template-rows: 118px minmax(0, 1fr) auto; gap: 8px; }
.ed-cards { gap: 8px; }
.ed-card { border-radius: 10px; }
.ed-card-media { height: 74px; }
.ed-card-body { padding: 6px 8px 7px; }
.ed-card-body b { font-size: 11.5px; line-height: 1.3; }
.ed-card-sub { display: none; }
.ed-screen { min-height: 0; }
.ed-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--border-soft);
}
.ed-stats { flex: 0 0 auto; gap: 14px; }
.ed-stats > * { background: transparent; border: 0; padding: 0; }
.ed-stats b { font-size: 13px; }
.ed-tools { padding: 10px 14px; gap: 12px; }

/* 成片台收尾：摘要条常驻底部，数字横排 */
.ed { height: calc(100vh - 168px); }
.ed-summary {
  position: sticky; bottom: 0; z-index: 3;
  flex-wrap: nowrap; overflow: hidden;
}
.ed-stats { display: flex; align-items: center; gap: 18px; }
.ed-stats > * { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ed-stats b { font-size: 13px; }
.ed-stats span, .ed-stats em { font-size: 11px; color: var(--text-3); }
.ed-summary .ed-film { flex: 0 0 auto; }
.ed-summary .ed-saved, .ed-summary .ed-tip { font-size: 11.5px; white-space: nowrap; }

/* 成片台窄屏：对话压成一条可展开的带，舞台优先 */
@media (max-width: 1080px) {
  .ed { height: auto; }
  .ed-chat { height: auto; max-height: none; }
  .ed-chat-head { padding: 8px 12px; }
  .ed-chat-head em { display: none; }
  .ed-msgs { min-height: 0; max-height: 68px; padding: 8px 12px; gap: 6px; }
  .ed-msgs .cw-msg .bubble, .ed-msgs .bubble { font-size: 12px; padding: 6px 9px; }
  .ed-chat-foot { display: none; }
  .ed-main { grid-template-rows: auto 1fr auto; height: calc(100vh - 210px); min-height: 420px; }
  .ed-screen { height: 52vh; min-height: 260px; }
  .ed-cards { overflow-x: auto; }
}

/* 卡片底部：只留状态标签，景别等次要文字隐藏（之前把整行藏了，标签也一起没了） */
.ed-card-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ed-card-sub .tag { font-size: 10.5px; }
.ed-card-sub > span:not(.tag) { display: none; }

/* 镜头最近一次生成状态 */
.cw-shot-status {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 6px 0 2px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; background: var(--surface-3); color: var(--text-3);
  border: 1px solid var(--border-soft);
}
.cw-shot-status.ok { color: color-mix(in srgb, #10b981 80%, var(--text)); border-color: color-mix(in srgb, #10b981 30%, transparent); }
.cw-shot-status.warn { color: #b4791a; border-color: color-mix(in srgb, #f59e0b 34%, transparent); background: color-mix(in srgb, #f59e0b 10%, transparent); }
.cw-shot-status.err { color: #c2410c; border-color: color-mix(in srgb, #ef4444 34%, transparent); background: color-mix(in srgb, #ef4444 10%, transparent); }
[data-theme="dark"] .cw-shot-status.ok { color: #4ade80; }
[data-theme="dark"] .cw-shot-status.warn { color: #fbbf24; }
[data-theme="dark"] .cw-shot-status.err { color: #f87171; }

/* 显式交接：三个开场方向 */
.cw-open { display: flex; gap: 10px; width: 100%; text-align: left; align-items: flex-start;
  padding: 10px 12px; margin-top: 8px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 12.5px; line-height: 1.6; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.cw-open:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.cw-open em { flex: 0 0 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }

/* 1a：一次只问一件事 —— 只显示第一张待办卡，答完自动露出下一张 */
.cw-msgs .cw-ask ~ .cw-ask { display: none; }
.cw-msgs .cw-ask + .cw-ask { display: none; }
