:root {
  --bg: #0e0e11;
  --panel: #17171c;
  --panel-2: #1f1f26;
  --line: #2a2a32;
  --accent: #ff6a2b;
  --accent-2: #ff9a5c;
  --text: #f5f5f7;
  --muted: #a6a6b3;
  --ok: #3ddc84;
  --warn: #ffb020;
  --tint-lime: #273014;
  --lime-2: #a9ef4d;
  --lime: #71af13;
  --err-2: #e65757;
  --tint-info-2: #0e1721;
  --tint-info: #121d2a;
  --ok-soft: #9be1b0;
  --err: #ff6b6b;

  --panel-3: #1c1c22;
  --panel-4: #31313a;
  --bg-deep: #15151a;
  --line-2: #3d3d47;
  --line-3: #4a4a55;
  --text-2: #e8e8ee;
  --text-3: #d6d6de;
  --muted-2: #8a8a96;
  --muted-3: #6e6e7a;
  --accent-3: #fdba74;
  --accent-hot: #f47a48;
  --tint-accent: #2e1d14;
  --tint-accent-2: #271511;
  --tint-accent-3: #17120e;
  --tint-ok: #142e1c;
  --tint-ok-2: #122b1d;
  --tint-warn: #2f2a14;
  --tint-err: #2c1313;
  --ok-2: #54e98b;
  --ok-3: #16a34a;
  --info: #4f79ed;
  --info-line: #045cbe;
  --info-bg: #101924;
  --avatar-1: #515e71;
  --avatar-2: #4d5e74;
  --gold: #c5a877;
  --tint-accent-warm: #2f1e14;
  --tint-ok-line: #112c1b;
  --flame-1: #ff583d;
  --flame-2: #f36620;
  --flame-3: #f35e14;
  --hi-09: rgba(255,255,255,.09);
  --hi-12: rgba(255,255,255,.12);
  --hi-14: rgba(255,255,255,.14);
  --hi-18: rgba(255,255,255,.18);
  --hi-22: rgba(255,255,255,.22);
  --hi-24: rgba(255,255,255,.24);
  --hi-26: rgba(255,255,255,.26);
  --hi-30: rgba(255,255,255,.30);
  --hi-42: rgba(0, 0, 0, .42);
  --hi-75: rgba(255,255,255,.75);
  --accent-shadow: rgba(255,106,43,.25);
  --accent-a18: rgba(255,106,43,.18);
  --accent-a12: rgba(255,106,43,.12);
  --ok-a18: rgba(76, 240, 189, .18);
  --ok-a38: rgba(76, 240, 189, .38);
  --ok-a70: rgba(76, 240, 189, .7);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
button {
  font: inherit; cursor: pointer; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; background: var(--panel); color: var(--text);
  transition: .15s;
}
button:hover { border-color: var(--line); background: var(--panel-2); }
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; border-color: transparent;
  box-shadow: 0 2px 8px var(--accent-shadow);
}
button.primary:hover { filter: brightness(1.05); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; }
textarea { resize: vertical; }
/* 链接默认色：浏览器默认蓝 (var(--info)) 在深底上亮度仅 0.07，几乎看不见。
   这里给一个品牌橙兜底；各处的具体类（.navlink / a.link 等）优先级更高，不受影响。 */
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
.hidden { display: none !important; }

/* 顶部条 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.topbar .brand span { color: var(--accent); }
.topbar .row { gap: 14px; }
.navlink { text-decoration: none; font-size: 13px; }
.navlink:hover { color: var(--accent); }

/* 落地页 */
.hero { text-align: center; padding: 72px 20px 40px; }
.hero h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.5px; }
.hero p { color: var(--muted); margin: 0 0 30px; font-size: 15px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .actions button { min-width: 152px; padding: 13px 20px; font-size: 15px; }

/* 通用容器 */
.container { max-width: 960px; margin: 0 auto; padding: 24px 20px 80px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-bottom: 16px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; }
h2 { font-size: 20px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 进度条 */
.steps { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.step-pill {
  flex: 1 1 110px; text-align: center; padding: 10px 6px; border-radius: 10px;
  background: var(--panel); font-size: 12.5px; border: 1px solid var(--line); color: var(--muted);
}
.step-pill.active { border-color: var(--accent); color: var(--accent); font-weight: 600; background: var(--tint-accent); }
.step-pill.done { background: var(--tint-ok); border-color: var(--tint-ok-line); color: var(--ok); }

/* 状态徽标 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.running { background: var(--tint-warn); color: var(--warn); }
.badge.await { background: var(--tint-ok); color: var(--ok); }
.badge.created { background: var(--panel-2); color: var(--muted); }
.badge.done { background: var(--tint-ok); color: var(--ok); }
.badge.failed { background: var(--tint-err); color: var(--err); }

/* 资产 / 镜头网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.thumb { background: var(--panel-2); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img, .thumb video { width: 100%; display: block; aspect-ratio: 1/1; object-fit: cover; background: var(--panel-3); }
.thumb .cap { padding: 6px 8px; font-size: 12px; color: var(--muted); }

/* 问题 / 条目 */
.issue { padding: 9px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; line-height: 1.6; }
.issue.error { background: var(--tint-err); color: var(--err); border: 1px solid var(--err-soft); }
.issue.warn { background: var(--tint-warn); color: var(--warn); border: 1px solid var(--tint-accent-warm); }
.issue.ok { background: var(--tint-ok); color: var(--ok); border: 1px solid var(--tint-ok-line); }
.issue.flat { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }

/* 统计块 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; }
.stat { background: var(--panel-2); border-radius: 10px; padding: 14px 10px; text-align: center; }
.stat-v { font-size: 22px; font-weight: 700; }
.stat-v.warn { color: var(--warn); }
.stat-v.err { color: var(--err); }
.stat-l { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl tr:last-child td { border-bottom: none; }

/* 弹窗 */
.modal-bg {
  position: fixed; inset: 0; background: rgba(17,20,26,.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--panel); padding: 24px; border-radius: 14px;
  width: min(520px, 92vw); box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.modal h3 { margin: 0 0 14px; }
.auth-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.auth-modal-head button { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.auth-modal-head button:hover { color: var(--text); }
.modal input { margin-bottom: 12px; }
.center { text-align: center; }
a.link { color: var(--accent); font-weight: 600; text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ==================== 对话式项目页 ==================== */
.chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 58px); max-width: 1680px; margin: 0 auto;
}
/* 左工作台 + 右对话 分栏 */
.chat-split { flex: 1 1 auto; display: flex; min-height: 0; }
.workbench {
  flex: 1 1 auto; min-width: 0; overflow-y: auto;
  padding: 18px 22px 34px;
}
.chat-right {
  flex: 0 0 420px; display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--line); background: var(--panel);
}

/* ---------------- 左侧工作台 ---------------- */
.wb { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.wb-hero {
  background: linear-gradient(135deg, var(--tint-accent-warm), var(--bg));
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px;
}
.wb-hero-t { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.wb-stat { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; }
.wb-st { font-size: 12.5px; color: var(--muted); }
.wb-st b { font-size: 18px; color: var(--text); margin-right: 4px; font-weight: 800; }
.wb-empty {
  background: var(--panel); border: 1px dashed var(--line); border-radius: 14px;
  padding: 46px 20px; text-align: center;
}
.wb-empty-ico { font-size: 34px; margin-bottom: 10px; }
.wb-empty-t { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.wb-empty-d { font-size: 13px; color: var(--muted); line-height: 1.8; }
.wb-sec {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 20px;
}
.wb-sec-t { font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.wb-sum {
  font-size: 13.5px; line-height: 1.8; background: var(--panel-2);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 4px;
}
.wb-h2 { font-weight: 700; font-size: 13px; color: var(--accent-2); margin: 16px 0 8px; }
.wb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.wb-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.wb-card-t { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.wb-tag {
  font-size: 11px; color: var(--accent); border: 1px solid currentColor;
  border-radius: 4px; padding: 0 5px; margin-right: 6px; font-weight: 600;
}
.wb-card-d { font-size: 12.5px; line-height: 1.7; }
.wb-card-m { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.wb-kv { font-size: 12.5px; line-height: 1.75; margin-top: 3px; color: var(--text); }
.wb-kv b { display: inline-block; min-width: 68px; color: var(--accent-2); font-weight: 600; margin-right: 6px; }
.wb-mute { font-size: 12.5px; color: var(--muted); }
.wb-lv {
  display: inline-block; min-width: 22px; text-align: center; font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft, #2b1c12); border-radius: 5px; padding: 1px 6px;
}
.wb-table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
/* 资产清单（第③步）：ID / 类型 / 名称 / 描述词 / 手动传图 */
.wb-tip {
  font-size: 12.5px; line-height: 1.7; color: var(--text-3);
  background: var(--tint-accent-warm); border: 1px solid var(--tint-accent); border-radius: 8px;
  padding: 9px 12px; margin-bottom: 10px;
}
.wb-tip code {
  font-family: var(--font-mono, ui-monospace, monospace);
  background: var(--bg); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--tint-accent);
}
.wb-desc-table { table-layout: fixed; }
.wb-desc-table th:first-child, .wb-desc-table .wb-td-asset { width: 230px; }
.wb-desc-table th:nth-child(2), .wb-desc-table th:nth-child(3) { width: calc((100% - 230px) / 2); }
.wb-desc-table .wb-td-asset { vertical-align: top; }
.wb-asset-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 10px; }
.wb-asset-meta strong { font-size: 13px; color: var(--text); }
.wb-asset-image { min-height: 112px; display: flex; align-items: flex-start; margin-bottom: 9px; }
.wb-asset-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-asset-actions .wb-up { padding: 4px 9px; }
.wb-desc-table .wb-mini {
  width: 108px; height: 144px; object-fit: contain; cursor: zoom-in;
  border-radius: 6px; border: 1px solid var(--line, #1c1c22); display: block;
  background: var(--panel);
}
.wb-desc-table .wb-mini:hover { border-color: var(--accent, #f97316); }
.wb-desc-table .wb-key {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px;
  background: var(--panel-2, #15151a); padding: 1px 6px; border-radius: 5px;
}
.wb-desc-table .wb-td-p { color: var(--text-3); line-height: 1.55; overflow-wrap: anywhere; vertical-align: top; }
.wb-desc-edit-hint { color: var(--accent); font-size: 11px; margin-bottom: 6px; }
.wb-desc-table .wb-desc-editable {
  display: block; min-height: 52px; padding: 8px; border: 1px dashed var(--line);
  border-radius: 6px; cursor: text; white-space: pre-wrap; overflow-wrap: anywhere;
}
.wb-desc-table .wb-desc-editable:hover,
.wb-desc-table .wb-desc-editable:focus { border-color: var(--accent); background: var(--tint-accent-warm); outline: none; }
.wb-desc-table .wb-edit { width: 100%; min-height: 130px; box-sizing: border-box; }
/* 长文本折叠：以前是硬 slice(0,220)，没省略号 → 用户以为「描述词没写完」。
   现在默认折 220 字 + 明确省略提示 + 「展开全文（共 N 字）」。 */
.wb-clip { word-break: break-word; }
.wb-clip-dots { color: var(--muted-3); }
.wb-more-btn {
  display: inline-block; margin-top: 4px; padding: 0; border: 0; background: none;
  color: var(--accent, #f97316); font-size: 12px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.wb-more-btn:hover { color: var(--accent-hot); }
/* 展开后按语义分段换行（用户要求：换行更直观）。
   只在显示层分行，data-full 里仍是原文，不污染提示词。 */
.wb-clip.wb-clip-open { display: block; }
.wb-seg {
  display: block; padding: 3px 0 3px 8px; margin-bottom: 3px;
  border-left: 2px solid var(--line, #1c1c22);
}
.wb-seg:last-child { margin-bottom: 0; }
.wb-seg:hover { border-left-color: var(--accent, #f97316); background: var(--bg); }
/* 第一段是每条都一样的「画风前缀」（角色 7 片 / 场景 28 片 / 道具 12 片），
   属于样板文字，弱化处理，让真正描述主体的段落更突出。 */
.wb-seg:first-child {
  color: var(--muted-3); border-left-style: dashed; border-left-color: var(--panel-3);
}
.wb-clip-open + .wb-more-btn { margin-top: 6px; }
@media (max-width: 850px) {
  .wb-desc-table { min-width: 740px; }
}
.wb-up {
  font-size: 12px; padding: 4px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent, #f97316); color: var(--accent, #f97316);
  background: var(--bg); font-weight: 500;
}
.wb-up:hover { background: var(--tint-accent-warm); }
.wb-up:disabled { opacity: .55; cursor: default; }

/* ★ 手动润色的批量按钮（2026-09-22 起润色改为手动，这是「剩下全部」那一个）。
   刻意做成实心 + 略大：它是唯一会一次烧掉多条 token 的按钮，
   要在视觉上就和旁边点一下只润一条的细边框按钮区分开，别让人误点。 */
.wb-up-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; padding: 5px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent, #f97316);
  background: var(--accent, #f97316); color: #fff; font-weight: 600;
  margin-left: 6px; vertical-align: middle;
}
.wb-up-all:hover { filter: brightness(.94); }
.wb-up-all:disabled { opacity: .6; cursor: default; filter: none; }
/* 「已润色」角标：出图提示词已按视觉手册生成 */
.wb-ok {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--tint-ok-2); color: var(--ok-2); border: 1px solid var(--tint-ok-line);
  font-weight: 600; margin-right: 6px; vertical-align: 1px;
}
.wb-table th {
  text-align: left; padding: 8px 10px; color: var(--muted, #8a8a96); font-weight: 600;
  border-bottom: 1px solid var(--line, #1c1c22); white-space: nowrap;
}
.wb-table td { padding: 8px 10px; border-bottom: 1px solid var(--panel-2, #15151a); vertical-align: top; }
.wb-table tr:hover td { background: var(--panel-2, #0e0e11); }
.wb-board { display: flex; flex-direction: column; gap: 8px; }
.wb-shot { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.wb-shot-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.wb-no { font-weight: 800; color: var(--accent); }
.wb-cam { font-size: 12px; color: var(--muted); }
.wb-emo { font-size: 12px; color: var(--gold); }
.wb-dur { font-size: 12px; color: var(--muted); margin-left: auto; }
.wb-shot-b { font-size: 13px; line-height: 1.75; }
.wb-dlg {
  margin-top: 6px; font-size: 12.5px; background: var(--panel);
  border-left: 3px solid var(--accent); border-radius: 6px; padding: 6px 10px;
}
.wb-dlg .wb-dlg-who { color: var(--accent-2); font-weight: 700; margin-right: 2px; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wb-thumb {
  margin: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.wb-thumb img, .wb-thumb video {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--panel);
}
/* 参考图描边：一眼看出哪张会被第⑥步取用 */
.wb-thumb-ref { border-color: var(--accent-3); box-shadow: 0 0 0 1px var(--accent-3) inset; }
/* ---- 点图看大图 ---- */
.wb-thumb-img { position: relative; cursor: zoom-in; }
.wb-thumb-img:hover .wb-zoom-hint { opacity: 1; }
.wb-zoom-hint {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  padding: 3px 10px; font-size: 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(17, 24, 39, .72); color: #fff; opacity: 0; transition: opacity .15s;
  pointer-events: none;
}
.wb-badge-ref, .wb-badge-up {
  position: absolute; top: 7px; font-size: 11px; padding: 1px 7px;
  border-radius: 999px; font-weight: 600; pointer-events: none;
}
.wb-badge-ref { right: 7px; background: var(--tint-accent); color: var(--accent-hot); border: 1px solid var(--accent-3); }
.wb-badge-up { left: 7px; background: var(--info-bg); color: var(--info); border: 1px solid var(--info-line); }
/* 分组标题 */
.wb-grp-h {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--line);
}
.wb-tag-none { background: var(--bg-deep); color: var(--muted-2); }
.wb-voice-bind {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 3px 0 12px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel);
}
.wb-voice-bind select { max-width: 210px; padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.wb-voice-bind audio { width: min(260px, 100%); height: 32px; }
.wb-voice-bind label { cursor: pointer; }

/* ---- 灯箱（看大图）---- */
.wb-lb { position: fixed; inset: 0; z-index: 9999; }
.wb-lb-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }
.wb-lb-body { position: absolute; inset: 0; display: flex; flex-direction: column; }
.wb-lb-bar {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; color: #fff; font-size: 13px;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent);
}
.wb-lb-i { font-weight: 600; }
.wb-lb-n { opacity: .75; }
.wb-lb-sp { flex: 1; }
.wb-lb-pos { opacity: .85; font-variant-numeric: tabular-nums; }
.wb-lb-btn {
  font-size: 12px; padding: 4px 11px; border-radius: 6px; cursor: pointer;
  background: var(--hi-14); color: #fff; border: 1px solid var(--hi-30);
}
.wb-lb-btn:hover { background: var(--hi-26); }
.wb-lb-x { font-weight: 700; }
.wb-lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: auto; padding: 0 56px 20px;
}

/* ---- 灯箱主区：左图 + 右描述词（2026-09-23）---- */
/* 诉求：图要放大看清，同时能改描述词 —— 缩略图里那行小字根本没法编辑。 */
.wb-lb-main { flex: 1; display: flex; min-height: 0; }
.wb-lb-side {
  flex: 0 0 380px; display: flex; flex-direction: column; gap: 10px;
  margin: 0 14px 20px 0; padding: 14px; border-radius: 10px;
  background: rgba(20, 20, 26, .94); border: 1px solid var(--hi-14);
  color: var(--text-2);
}
.wb-lb-side-h { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.wb-lb-resource { display: grid; gap: 5px; padding: 0 0 12px; border-bottom: 1px solid var(--hi-18); font-size: 13px; line-height: 1.55; }
.wb-lb-resource-value { overflow-wrap: anywhere; }
.wb-lb-resource-size { opacity: .7; }
.wb-lb-side-tip { font-size: 11.5px; opacity: .6; }
.wb-lb-ta {
  flex: 1; min-height: 200px; resize: none; box-sizing: border-box;
  font: 13px/1.68 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-2); background: var(--hi-42);
  border: 1px solid var(--hi-18); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word;
}
.wb-lb-ta:focus { outline: none; border-color: var(--accent, #ff6a2b); box-shadow: 0 0 0 2px rgba(255, 106, 43, .2); }
.wb-lb-side-bar { display: flex; align-items: center; gap: 12px; }
.wb-lb-side-bar .wb-lb-regen { background: #b8f65c; color: #17210e; }
.wb-lb-save {
  font-size: 12.5px; font-weight: 600; padding: 7px 16px; cursor: pointer;
  color: #fff; border: none; border-radius: 7px; background: var(--accent, #ff6a2b);
}
.wb-lb-save:hover { filter: brightness(1.12); }
.wb-lb-save:disabled { opacity: .6; cursor: wait; }
.wb-lb-saved { font-size: 12.5px; color: var(--ok, #4cf0bd); }
/* 窄屏（<980px）：描述词区折到图片下方，仍给足高度 */
@media (max-width: 980px) {
  .wb-lb-main { flex-direction: column; }
  .wb-lb-side { flex: 0 0 auto; margin: 0 14px 16px; }
  .wb-lb-ta { min-height: 150px; }
}
.wb-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
/* 1:1 原始大小：可能超出窗口，交给 stage 滚动 */
.wb-lb-img.wb-lb-1to1 {
  max-width: none; max-height: none; width: auto; height: auto;
  transform-origin: center; image-rendering: auto;
}
.wb-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 76px; font-size: 30px; line-height: 1; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff;
  border: 1px solid var(--hi-22); border-radius: 10px;
}
.wb-lb-nav:hover { background: var(--hi-24); }
.wb-lb-prev { left: 10px; }
.wb-lb-next { right: 10px; }
.wb-thumb figcaption { padding: 7px 10px; font-size: 12px; color: var(--muted); }

/* ---- 工作台就地编辑：产出是用户的东西，点一下就能改，不必回头求 agent 重跑 ---- */
.wb-ed {
  cursor: text; border-radius: 4px; padding: 0 2px; margin: 0 -2px;
  box-shadow: inset 0 -1px 0 rgba(255, 106, 43, .35);
  transition: background .12s, box-shadow .12s;
}
.wb-ed:hover { background: rgba(255, 106, 43, .1); }
.wb-ed:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wb-ed.wb-saved { background: rgba(22, 163, 74, .16); }
.wb-edit {
  display: block; width: 100%; box-sizing: border-box; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--accent); border-radius: 6px;
  padding: 4px 6px; resize: vertical; line-height: 1.5;
}
.wb-edit:focus { outline: none; }

/* ---- 分镜描述词 · 常驻编辑框：不用点进去，界面直接摆出来 ---- */
.wb-live-wrap { margin-top: 2px; }
.wb-global-style {
  margin: 0 0 12px; padding: 12px; border: 1px solid var(--accent);
  border-radius: 10px; background: var(--panel-2);
}
.wb-global-style-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.wb-global-style-h span { color: var(--muted); font-size: 12px; font-weight: 400; }
.wb-global-label { display: block; margin: 10px 0 5px; font-size: 12px;
  font-weight: 650; color: var(--text); }
.wb-global-label small { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 400; }
.wb-live-chips {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px;
}
.wb-live-chips .wb-at { vertical-align: 0; }
.wb-live {
  display: block; width: 100%; box-sizing: border-box; font: inherit;
  font-size: 13px; line-height: 1.7; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px; resize: vertical; overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}
.wb-live:hover { border-color: var(--accent); }
.wb-live:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 106, 43, .15);
}
.wb-live-st { font-size: 12px; margin-top: 3px; color: var(--muted); }
.wb-live-st.busy { color: var(--muted); }
.wb-live-st.ok { color: var(--ok-3); }
.wb-live-st.err { color: var(--err); }
.wb-del {
  margin-left: 6px; padding: 1px 7px; font-size: 11px; line-height: 1.7;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 5px; cursor: pointer; white-space: nowrap;
}
.wb-del:hover { color: var(--err); border-color: var(--err); }

/* ---- 分镜描述词里的 @资产名 资料卡片（头像 + @名字，点开看大图）---- */
.wb-at {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0 2px; padding: 1px 8px 1px 1px; vertical-align: -6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; cursor: zoom-in; user-select: none; white-space: nowrap;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.wb-at:hover {
  border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 106, 43, .22);
}
.wb-at-img {
  width: 22px; height: 22px; border-radius: 999px; object-fit: cover;
  object-position: center top; background: var(--panel-2); flex: none;
}
.wb-at-n { font-size: 12px; font-weight: 600; color: var(--accent); }

/* 资产图 / 镜头卡：图下的标题、描述词、操作栏 */
.wb-thumb-t { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.wb-thumb-p {
  color: var(--muted); line-height: 1.5; margin-bottom: 5px;
  max-height: 5.2em; overflow: hidden;
}
.wb-thumb-bar { display: flex; align-items: center; gap: 8px; }
.wb-ref { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); }
.wb-ref input { cursor: pointer; margin: 0; }

/* agent 指路时闪一下标签：告诉用户「产出在这儿」 */
.wb-tab-flash { animation: tab-flash 1.7s ease-out; }
@keyframes tab-flash {
  0%   { background: rgba(255, 106, 43, .32); }
  70%  { background: rgba(255, 106, 43, .14); }
  100% { background: transparent; }
}

/* 事件表：主线强度徽章（地基质量一眼扫出来） */
.wb-ml { padding: 1px 7px; border-radius: 5px; font-size: 11px; }
.ml-s { background: rgba(22, 163, 74, .14); color: var(--ok); }
.ml-m { background: rgba(217, 119, 6, .13); color: var(--warn); }
.ml-w { background: var(--panel-2); color: var(--muted); }
.wb-final video {
  width: 100%; max-height: 60vh; border-radius: 10px; background: var(--panel-4);
}

.chat-head {
  padding: 12px 20px 0; background: var(--bg);
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.chat-head-l { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chat-title { font-size: 16px; font-weight: 700; }
.chat-sub { min-height: 17px; }
button.ghost {
  border: none; background: transparent; font-size: 18px; padding: 4px 10px;
  color: var(--muted); border-radius: 8px;
}
button.ghost:hover { background: var(--panel-2); color: var(--text); }
.chat-head .steps { margin: 0 0 10px; }
.chat-head .step-pill { flex: 1 1 88px; padding: 6px 4px; font-size: 11.5px; }

.chat-body {
  flex: 1 1 auto; overflow-y: auto; padding: 20px 20px 8px;
  scroll-behavior: smooth;
}
.msg-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.msg-row.me { justify-content: flex-end; }
.av {
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.av-wrap { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.av-name { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; line-height: 1.2; }
.bubble {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; font-size: 13.5px; line-height: 1.75;
  max-width: 76%; word-break: break-word;
}
.bubble.me {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-color: transparent;
}
.bubble.decide { background: var(--tint-accent-warm); border-color: var(--tint-accent); }

/* ---------------- 工作台标签页：分区一次只看一块 ---------------- */
.wb-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.wb-tab {
  border: 1px solid var(--line, #1c1c22); background: var(--panel, #0e0e11);
  color: var(--text, #f5f5f7); font-size: 13px;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: background .14s, color .14s;
}
.wb-tab:hover { background: var(--bg, #0e0e11); }
.wb-tab.active {
  background: var(--accent-soft, #2b1c12); color: var(--accent, #f97316);
  border-color: transparent; font-weight: 700;
}
.wb-sec.tab-hidden { display: none; }

/* 拆前审核：先让用户看清拆解约束和待拍板事项 */
.pf-status {
  padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6;
  background: var(--tint-warn); color: var(--warn);
}
.pf-status.ready { background: var(--tint-ok-2); color: var(--ok-soft); }
.pf-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-top: 12px;
}
.pf-metric {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); font-size: 12px;
}
.pf-metric span { color: var(--muted); }
.pf-metric b { font-size: 14px; }
.pf-list { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.8; }
.pf-risks, .pf-decisions { display: flex; flex-direction: column; gap: 8px; }
.pf-risk, .pf-decision {
  padding: 10px 12px; border-radius: 8px; background: var(--panel-2);
  font-size: 12.5px; line-height: 1.7;
}
.pf-risk { border-left: 3px solid var(--warn); }
.pf-risk div { margin-top: 3px; }
.pf-decision label { display: block; font-weight: 700; margin-bottom: 6px; }
.pf-answer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-answer-row select { flex: 1; min-width: 180px; }

/* ---------------- 执行中的实时卡片（贴在对话流末尾，不遮工作台） ---------------- */
.exec-live {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 2px 0 16px; padding: 11px 13px;
  background: var(--panel-2, #0e0e11);
  border: 1px solid var(--line, #1c1c22);
  border-left: 3px solid var(--accent, #f97316);
  border-radius: 10px;
}
.exec-live .el-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--avatar-1), var(--avatar-2));
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.exec-live .el-main { flex: 1 1 auto; min-width: 0; }
.exec-live .el-title { font-size: 13.5px; font-weight: 700; color: var(--text, #f5f5f7); }
.exec-live .el-prog { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.exec-live .el-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
/* 干完了的「交付卡」：活儿跑完不撤卡，翻成完成态留在页面上，免得没痕迹 */
.exec-live.done {
  border-left-color: var(--ok-3);
  background: var(--bg);
}
.exec-live.done .el-av { background: linear-gradient(135deg, var(--ok-3), var(--ok-3)); }
.exec-live.done .el-prog { color: var(--text-3); }
.exec-live.done .el-sum {
  margin-top: 6px; padding: 7px 9px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--panel-3);
  font-size: 12px; color: var(--text-3); white-space: pre-wrap; line-height: 1.6;
}
/* 自动修补对账卡：agent 自己改完把「改好的/没解决的/新冒的」摊开 */
.bubble.fixlog { padding: 10px 12px; }
.fx-head { font-size: 13px; color: var(--text, #f5f5f7); margin-bottom: 8px; }
.fx-round {
  border: 1px solid var(--line, #1c1c22); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px; background: var(--bg);
}
.fx-round:last-child { margin-bottom: 0; }
.fx-title {
  font-size: 12.5px; font-weight: 700; color: var(--text, #f5f5f7);
  display: flex; align-items: center; gap: 8px;
}
.fx-score {
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
  background: var(--tint-info); color: var(--muted-2);
}
.fx-score.up { background: var(--tint-ok-2); color: var(--ok-2); }
.fx-struct { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.fx-g { margin-top: 7px; }
.fx-g-t { font-size: 11.5px; font-weight: 700; margin-bottom: 3px; }
.fx-g-t.ok { color: var(--ok-2); }
.fx-g-t.left { color: var(--accent-hot); }
.fx-g-t.new { color: var(--err-2); }
.fx-g-t.chg { color: var(--info); }
.fx-i.chg { border-left-color: var(--info-line); font-variant-numeric: tabular-nums; }
.fx-i {
  font-size: 12px; line-height: 1.55; color: var(--text-3);
  padding: 2px 0 2px 9px; border-left: 2px solid var(--line, #1c1c22);
  margin-bottom: 2px; word-break: break-word;
}
.fx-i.ok { border-left-color: var(--ok-3); color: var(--muted-2); text-decoration: line-through; }
.fx-i.left { border-left-color: var(--warn); }
.fx-i.new { border-left-color: var(--err-2); }
.exec-bar {
  height: 6px; border-radius: 5px; margin-top: 8px;
  background: var(--line, #1c1c22); overflow: hidden;
}
.exec-bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent, #f97316), var(--accent-2, #fb7185));
  transition: width .45s ease;
}
.exec-bar.indet > i { width: 32%; animation: exec-slide 1.4s infinite ease-in-out; }
@keyframes exec-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* 执行 agent 接手报到卡（区别于「赛」= 决策层 · AI创作者平台） */
.av.worker-av {
  background: linear-gradient(135deg, var(--avatar-1), var(--avatar-2));
  font-size: 15px;
}
.bubble.worker { background: var(--bg); border-color: var(--tint-info-2); }
.wk-name {
  font-size: 12px; font-weight: 700; color: var(--muted-2);
  border-left: 3px solid var(--avatar-1); padding-left: 8px; margin-bottom: 8px;
  letter-spacing: .3px;
}

/* 「正在输入…」指示气泡 */
.bubble.typing { display: inline-flex; align-items: center; gap: 5px; padding: 14px 16px; }
.tdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent, #f97316); opacity: .35;
  animation: tbounce 1.2s infinite ease-in-out;
}
.tdot:nth-child(2) { animation-delay: .18s; }
.tdot:nth-child(3) { animation-delay: .36s; }
.bubble.typing em { font-style: normal; color: var(--muted-2); font-size: 12px; margin-left: 5px; }
@keyframes tbounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* 审核报告卡片 */
.bubble.review { max-width: 100%; }
.bubble.review.score-a { border-left: 4px solid var(--ok); }
.bubble.review.score-b { border-left: 4px solid var(--lime); }
.bubble.review.score-c { border-left: 4px solid var(--warn); }
.bubble.review.score-d { border-left: 4px solid var(--err); }
.rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-tag { font-weight: 700; font-size: 13px; }
.rv-score {
  font-weight: 800; font-size: 15px; padding: 1px 10px; border-radius: 999px;
}
.rv-score.score-a { background: var(--tint-ok); color: var(--ok); }
.rv-score.score-b { background: var(--tint-lime); color: var(--lime-2); }
.rv-score.score-c { background: var(--tint-warn); color: var(--warn); }
.rv-score.score-d { background: var(--tint-err); color: var(--err); }
.rv-list { display: flex; flex-direction: column; gap: 8px; }
.rv-item {
  padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.65;
  background: var(--panel-2); border-left: 3px solid var(--line);
}
.rv-item.severe { background: var(--tint-err); border-left-color: var(--err); }
.rv-item.medium { background: var(--tint-warn); border-left-color: var(--warn); }
.rv-item.minor { background: var(--panel-2); border-left-color: var(--line); }
.rv-item-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; flex-wrap: wrap; }
.rv-lv { font-weight: 700; font-size: 12px; }
.rv-item.severe .rv-lv { color: var(--err); }
.rv-item.medium .rv-lv { color: var(--warn); }
.rv-item.minor .rv-lv { color: var(--muted); }
.rv-rl {
  font-size: 11px; padding: 0 6px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.rv-fix { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.rv-ok { color: var(--ok); font-size: 13px; padding: 6px 0; }
.rv-dec {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--tint-accent-warm); border: 1px solid var(--tint-accent); font-size: 13px; line-height: 1.7;
}

/* 底部输入区 */
.chat-foot {
  flex: 0 0 auto; padding: 10px 20px 18px; background: var(--bg);
  border-top: 1px solid var(--line);
}
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; min-height: 0; }
.quick-btn {
  font-size: 13px; padding: 7px 15px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
}
.quick-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--tint-accent); }
.quick-btn:disabled { opacity: .5; }

/* 气泡内嵌选项按钮：agent 的提问下面直接摆答案，点一下即答 */
.msg-opts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.msg-opt {
  font-size: 13px; padding: 6px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  cursor: pointer;
}
.msg-opt:hover { border-color: var(--accent); color: var(--accent); background: var(--tint-accent); }
.msg-opt:disabled { opacity: .45; cursor: default; }
.msg-opt:disabled:hover { border-color: var(--line); color: inherit; background: var(--panel); }

.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1 1 auto; resize: none; min-height: 42px; max-height: 120px;
  padding: 11px 14px; border-radius: 12px; line-height: 1.5;
}
.composer button { flex: 0 0 auto; padding: 11px 22px; border-radius: 12px; }

@media (max-width: 1000px) {
  /* 窄屏：工作台在上（限高），对话在下 */
  .chat-split { flex-direction: column; }
  .workbench { flex: 0 0 auto; max-height: 46vh; }
  .chat-right { flex: 1 1 auto; border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .bubble { max-width: 88%; }
  .chat-wrap { height: calc(100vh - 54px); }
  .chat-right { flex: 1 1 auto; }
}


/* ============ 后台 · 系统配置页 ============ */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line);
}
.tab:hover { border-color: var(--line); background: var(--panel-2); }
.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-color: transparent; font-weight: 600;
}
.tab.active .muted { color: var(--hi-75); }

.cfg-body { display: flex; flex-direction: column; gap: 4px; }
.cfg-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 14px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.cfg-row:last-child { border-bottom: none; }
.cfg-l b { font-size: 14px; }
.cfg-key { font-size: 11px; font-family: ui-monospace, Consolas, monospace; opacity: .65; }
.cfg-i input[type=text], .cfg-i input[type=password],
.cfg-i input[type=number], .cfg-i select {
  width: 100%; padding: 9px 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--text);
}
.cfg-i input:focus, .cfg-i select:focus, .cfg-i textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-a12);
}
.cfg-i textarea {
  width: 100%; min-height: 260px; padding: 12px 14px;
  font-family: ui-monospace, Consolas, "Microsoft YaHei", monospace;
  font-size: 12.5px; line-height: 1.65; resize: vertical;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--text);
}
.cfg-help { font-size: 12px; margin-top: 5px; line-height: 1.5; }
.cfg-pre {
  max-height: 460px; overflow: auto; padding: 14px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, Consolas, "Microsoft YaHei", monospace;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  margin: 10px 0 0;
}
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sw input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

@media (max-width: 720px) {
  .cfg-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ==================== 画风 / 题材选择器 ==================== */
.style-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.sp-item { flex: 1 1 180px; display: flex; flex-direction: column; gap: 5px; }
.sp-l { font-size: 12.5px; color: var(--muted, #8a8a96); font-weight: 600; }
.sp-item select, .sp-item textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border, #1c1c22); background: var(--bg, #0e0e11);
  color: inherit; font-size: 13.5px; font-family: inherit;
}
.sp-item select:focus, .sp-item textarea:focus {
  outline: none; border-color: var(--accent, #0030c2);
}

/* 项目页头部右侧的风格 chip */
.style-chip {
  margin-left: auto; white-space: nowrap; font-size: 12.5px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border, #1c1c22);
}
.style-chip:hover { border-color: var(--accent, #0030c2); color: var(--accent, #4c75f0); }

@media (max-width: 720px) {
  .style-pick { flex-direction: column; }
  .style-chip { margin-left: 0; }
}

/* 新建/修改项目弹窗：风格只读回显（选择入口已移到首页创作框下方） */
.style-ro {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 12px; border-radius: 10px;
  border: 1px solid var(--border, #1c1c22); background: var(--bg, #0e0e11);
}
.style-ro .ro-l { font-size: 12.5px; font-weight: 600; color: var(--muted, #8a8a96); }
.style-ro .ro-v { font-size: 13px; font-weight: 600; color: var(--accent, #4c75f0); }
.style-ro .ro-note { font-size: 11.5px; color: var(--muted, #8a8a96); }

/* 新建弹窗里的「分集规划」行（复用首页 .mk-sp / .mk-sp-l 的样式） */
.mk-planbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 12px; margin: 0 0 12px; border-radius: 10px;
  border: 1px solid var(--border, #1c1c22); background: var(--bg, #0e0e11);
}
.mk-planbar input[type="number"] { width: 78px; }
.mk-planbar select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border, #1c1c22); }

/* 章节统计条 + 选择性勾选面板（导入 N 章可只生成其中几章） */
.chap-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 9px 12px; margin: 8px 0 0; border-radius: 10px;
  border: 1px solid var(--line, #1c1c22); background: var(--panel-2, #15151a);
}
.chap-bar .cb-stat { font-size: 12.5px; color: var(--muted, #8a8a96); }
.chap-bar .cb-stat b { font-size: 14px; color: var(--text, #f5f5f7); }
.chap-bar button { margin-left: auto; padding: 6px 12px; font-size: 12.5px; }

.chap-panel {
  margin-top: 8px; border: 1px solid var(--line, #1c1c22); border-radius: 10px;
  background: var(--panel, #0e0e11); overflow: hidden;
}
.chap-panel .cp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--line, #1c1c22);
  font-size: 12.5px; font-weight: 600; color: var(--muted, #8a8a96);
  background: var(--panel-2, #15151a);
}
.chap-panel .cp-head button { padding: 4px 10px; font-size: 12px; }
.chap-panel .cp-list { max-height: 232px; overflow: auto; padding: 4px 0; }
.chap-panel .cp-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  cursor: pointer; font-size: 13px;
}
.chap-panel .cp-item:hover { background: var(--panel-2, #15151a); }
.chap-panel .cp-item input { width: auto; flex: 0 0 auto; }
.chap-panel .cp-t { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chap-panel .cp-n { flex: 0 0 auto; font-size: 11.5px; color: var(--muted, #8a8a96); }
.chap-panel .cp-foot { padding: 9px 12px; border-top: 1px solid var(--line, #1c1c22); font-size: 12.5px; }

/* 工作台章节管理表（ToonFlow 式） */
.wb-chap {
  margin: 12px 0 0; border: 1px solid var(--line, #1c1c22); border-radius: 12px;
  background: var(--panel, #0e0e11); overflow: hidden;
}
.wb-chap .wc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: var(--panel-2, #15151a);
  border-bottom: 1px solid var(--line, #1c1c22); flex-wrap: wrap;
}
.wb-chap .wc-t { font-weight: 700; font-size: 13.5px; }
.wb-chap .wc-t b { color: var(--accent, #ff6a2b); }
.wb-chap .wc-tools { display: flex; gap: 8px; }
.wb-chap .wc-btn { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.wb-chap .wc-hint { padding: 8px 14px 0; font-size: 12px; }
.wb-chap .wc-hint a, .wb-chap a { color: var(--accent, #ff6a2b); cursor: pointer; }
.wb-chap .wc-table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.wb-chap .wc-table th {
  text-align: left; padding: 8px 10px; color: var(--muted, #8a8a96);
  font-weight: 600; border-bottom: 1px solid var(--line, #1c1c22); white-space: nowrap;
}
.wb-chap .wc-table td { padding: 8px 10px; border-bottom: 1px solid var(--panel-2, #15151a); vertical-align: top; }
.wb-chap .wc-table tr:hover td { background: var(--panel-2, #0e0e11); }
.wb-chap .wc-ck { width: 30px; text-align: center; }
.wb-chap .wc-ck input { width: auto; }
.wb-chap .wc-idx { width: 44px; color: var(--muted, #8a8a96); }
.wb-chap .wc-title { max-width: 180px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-chap .wc-prev { color: var(--muted, #8a8a96); }
.wb-chap .wc-prev-t { color: var(--text, #f5f5f7); }
.wb-chap .wc-chars { width: 70px; color: var(--muted, #8a8a96); white-space: nowrap; }
.wb-chap .wc-ev { max-width: 260px; color: var(--muted, #8a8a96); }
.wb-chap .wc-ev b { color: var(--accent, #ff6a2b); }
.wb-chap .wc-ops { width: 96px; white-space: nowrap; }
.wb-chap .wc-ops a { margin-right: 10px; }
.wb-chap .wc-ops .wc-del { color: var(--err, #e45858); }
.wb-chap .wc-edit-ta {
  width: 100%; min-height: 180px; font: inherit; font-size: 12.8px;
  border: 1px solid var(--line, #1c1c22); border-radius: 8px; padding: 8px;
  background: var(--panel, #0e0e11); color: var(--text, #f5f5f7);
}
.wb-chap .wc-edit-bar { margin-top: 8px; display: flex; gap: 8px; }

/* 项目配置：窄对话栏内按项排列，六项填完一次提交。 */
.bubble.decide:has(.pt) { width: min(100%, 340px); max-width: calc(100% - 60px); box-sizing: border-box; }
.pt { width: 100%; margin: 12px 0 3px; font-size: 12.5px; }
.pt-title { font-weight: 700; color: var(--text, #f5f5f7); margin-bottom: 8px; }
.pt-list { display: grid; gap: 7px; }
.pt-item { border: 1px solid var(--hi-09); border-radius: 8px; padding: 8px; background: rgba(0,0,0,.13); min-width: 0; }
.pt-item-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin-bottom: 6px; }
.pt-item-head strong { color: var(--text, #f5f5f7); font-size: 12.5px; }
.pt-d, .pt-hint { color: var(--muted, #8a8a96); font-size: 11.5px; line-height: 1.5; }
.pt-hint { display: block; margin-top: 4px; }
.pt-missing { border-color: var(--warn, #d97706); }
.pt-error { color: var(--warn, #d97706); font-size: 12px; min-height: 0; margin-top: 6px; }
.pt-error:empty { display: none; }
.pt-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.pt-actions button { min-height: 32px; }
.pt-refresh { font-size: 11.5px; }
.pt-history .pt-actions { display: none; }
.pt-history .pt-item { opacity: .65; }
.pt-sel {
  width: 100%; min-width: 0; box-sizing: border-box;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 6px 8px; border-radius: 6px;
  color: var(--ok, #4cf0bd); background: var(--panel-2, #15151a);
  border: 1px solid var(--ok-a38);
}
.pt-sel:hover { border-color: var(--ok-a70); }
.pt-sel:focus { outline: none; border-color: var(--ok, #4cf0bd); box-shadow: 0 0 0 2px var(--ok-a18); }
.pt-sel:disabled { opacity: .65; cursor: default; }
.pt-sel-und { color: var(--warn, #d97706); border-color: rgba(217, 119, 6, .45); }
.pt-sel-und:hover { border-color: rgba(217, 119, 6, .8); }
.pt-sel option { background: var(--panel-2, #15151a); color: var(--fg, #e8e8ee); }
.pt-custom {
  width: 100%; min-width: 0; box-sizing: border-box; margin-top: 6px;
  padding: 6px 8px; border: 1px solid var(--ok-a38); border-radius: 6px;
  background: var(--panel-2, #15151a); color: var(--text, #f5f5f7); font: inherit;
}
.pt-custom[hidden] { display: none; }

/* 剧本条目（ToonFlow planData.script 槽位）：保留换行，别挤成一行 */
.wb-script { white-space: pre-wrap; line-height: 1.75; font-size: 13px; color: var(--text, #f5f5f7); }


/* ---- 站点页脚（首页）：公司信息 + 协议入口 ---- */
.site-foot {
  margin: 26px 0 6px; padding: 16px 18px 4px;
  border-top: 1px solid var(--line, #1c1c22);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: space-between; font-size: 12.5px; color: var(--muted, #8a8a96);
}
.site-foot .sf-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-foot .sf-brand { font-weight: 700; color: var(--text, #f5f5f7); }
.site-foot .sf-sep { opacity: .45; }
.site-foot .sf-mail { color: var(--text-2); text-decoration: none; border-bottom: 1px dashed var(--line); }
.site-foot .sf-mail:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-foot .sf-links { display: flex; gap: 6px; flex-wrap: wrap; }
.site-foot .sf-links a {
  color: var(--muted, #8a8a96); text-decoration: none;
  padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
}
.site-foot .sf-links a:hover {
  color: var(--accent, #ff6a2b); border-color: var(--line, #1c1c22); background: var(--bg);
}


/* ---- 单资产/单镜头重生成 + 历史版本条 ---- */
.wb-vers { margin-top: 8px; }
.wb-vers-h {
  font-size: 12px; color: var(--muted, #8a8a96); margin: 4px 0 8px;
}
.wb-vers-list { display: flex; gap: 10px; flex-wrap: wrap; }
.wb-vers-i {
  margin: 0; width: 132px; border: 1px solid var(--line, #1c1c22);
  border-radius: 10px; overflow: hidden; background: var(--panel, #0e0e11);
}
.wb-vers-i.on { border-color: var(--accent, #ff6a2b); box-shadow: 0 0 0 2px var(--accent-a18); }
.wb-vers-img, .wb-vers-v {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block;
  background: var(--panel-2, #15151a);
}
.wb-vers-v { aspect-ratio: 16 / 9; }
.wb-vers-i figcaption {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 5px 7px; font-size: 11.5px; color: var(--muted, #8a8a96);
}
.wb-vers-n { margin-right: auto; font-weight: 600; color: var(--text, #f5f5f7); }
.wb-vers-i.on .wb-vers-n { color: var(--accent, #ff6a2b); }
.wb-vers-a { color: var(--muted, #8a8a96); text-decoration: none; border-bottom: 1px solid var(--line, #1c1c22); }
.wb-vers-a:hover { color: var(--accent, #ff6a2b); border-color: var(--accent, #ff6a2b); }
.wb-vers-meta { padding: 0 7px 6px; font-size: 11px; color: var(--muted, #8a8a96); }
.wb-vers-row > td { background: var(--panel-2, #0e0e11); border-top: none; }
