/* ============================================================
   漫剧带货工坊 · 独立主题层（浅色云蓝）
   ------------------------------------------------------------
   2026-11-13 依据设计稿 manju-workshop-design/styles.css 换皮。
    本文件**只管视觉**：配色 / 圆角 / 边框 / 阴影 / 间距 / 字体 / 组件外观。
      步骤顺序、路由、表单字段与校验、API 与数据结构、状态流转、
      事件回调、props/state、上传下载与权限逻辑一律不动。
       AI / 大模型生成动作仍全部由用户手动点按钮触发。
   载入位置：在 /style.css 与页面私有 <style> **之后**（同特异性下后加载者胜）。
   ============================================================ */

/* ---------- 1. 主题变量层（设计稿 :root 原样搬过来） ---------- */
:root {
  /* 中性基底（浅色云蓝） */
  --bg: #ffffff;
  --stage: #eef1f6;
  --side: #f8fafc;
  --panel: #ffffff;
  --card: #ffffff;
  --card-2: #f1f5f9;
  --line: #e2e8f0;
  --line-soft: #eef2f7;

  /* 文字 */
  --text: #1e293b;
  --text-2: #334155;
  --text-3: #64748b;

  /* 品牌与语义 */
  --brand: #4f7cff;
  --brand-deep: #4571f5;
  --brand-soft: rgba(79, 124, 255, 0.08);
  --indigo: #6366f1;
  --ok: #10b981;
  --ok-soft: #dcfce7;
  --ok-text: #166534;
  --warn: #f59e0b;
  --bad: #ef4444;

  /* 圆角与阴影 */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 4px 16px rgba(79, 124, 255, 0.12);
  --shadow-primary: 0 4px 16px rgba(79, 124, 255, 0.35);
  --shadow-window: 0 12px 48px rgba(15, 23, 42, 0.12);

  /* 字体 */
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* ---- 本页专用：把站内 token 映射到主题色板（仅影响本页面文档） ---- */
  --ink: #1e293b;   /* 主文字 */
  --sub: #64748b;   /* 弱文字 */
  --blue: #4f7cff;  /* 品牌主色（原 #2563EB） */
  --accent: #4f7cff;/* 原为蓝→青渐变，设计稿要求纯品牌蓝 */
}

/* ---------- 2. 基础 ---------- */
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
}

.ad-wrap { max-width: 1320px; margin: 0 auto; padding: 16px 18px 44px; }

/* 面包屑：浅色分隔条 */
/* 顶部提示条：浅蓝底 + 品牌左边条 */
/* ---------- 3. 桌面窗口外观（标题栏 + 应用骨架） ---------- */
.ad-studio {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  overflow: visible;          /* 保持 sticky 侧栏 / 底栏可用 */
}

/* 标题栏：标题在左，右侧预留窗口控制位（EXE 版才放最小化/最大化/关闭） */
.ad-titlebar {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px 0 18px;
  background: var(--side);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.ad-tb-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ad-tb-mark {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex: none;
}
.ad-tb-name { font-size: 13px; font-weight: 500; color: var(--text-2); }
.ad-tb-sep { color: var(--text-3); font-size: 13px; }
.ad-tb-step { font-size: 13px; font-weight: 600; color: var(--text); }
.ad-tb-ctrl { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* 窗口内的应用信息条 */
/* 广告段规则条 */
.ad-bands { height: 13px; border-radius: 99px; overflow: hidden; margin: 9px 0 7px; border: 1px solid var(--line); }
.ad-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); }

/* ---------- 4. 左侧流程栏 ---------- */
.ad-body {
  display: grid; grid-template-columns: 256px minmax(0, 1fr);
  grid-template-rows: auto auto; align-content: start;
  min-height: calc(100vh - 210px);
}
.ad-col:first-child {
  grid-column: 1; grid-row: 1 / span 2;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 16px 12px 24px;
  position: sticky; top: 72px; height: auto; max-height: calc(100vh - 72px);
  overflow: auto; align-self: start;
}
.ad-col:nth-child(2) { grid-column: 2; grid-row: 1; padding: 22px 28px 10px; }
.ad-col:nth-child(3) {
  grid-column: 2; grid-row: 2; padding: 0 28px 26px;
  border-left: 0; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
}
.ad-col:nth-child(3) .ad-col-t { width: 100%; margin: 14px 0 0; }
.ad-col:nth-child(3) .ad-cost { flex: 1 1 220px; margin: 0; }
.ad-col:nth-child(3) .ad-side-note { width: 100%; margin: 0; border-top: 0; padding-top: 2px; }

/* 品牌卡：白底小卡 */
.ad-brand {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.ad-brand-ico {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
}
.ad-brand b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.ad-brand small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.45; }

.ad-col:first-child .ad-col-t,
.ad-col-t {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); font-weight: 700; margin: 0 0 10px; padding-left: 8px;
}

/* 步骤项：高 44px / 圆角 10px / 圆徽 24px */
.ad-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ad-steps li {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px;
  padding: 8px 12px; margin: 0; border-radius: 10px;
  border: 1px solid transparent; position: relative;
  font-size: 13px; color: var(--text-3); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ad-steps li:hover { background: var(--card-2); }
.ad-steps .tx { min-width: 0; flex: 1; }
.ad-steps .tx { font-size: 13px; font-weight: 500; }
.ad-steps .hint {
  display: block; font-size: 11px; color: var(--text-3); font-weight: 400;
  margin-top: 2px; line-height: 1.45;
}
.ad-steps .n {
  width: 24px; height: 24px; flex: none; border: 1px solid var(--line);
  border-radius: 50%; background: var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--text-3);
}

/* 当前步：白底蓝字 + 左 3px 蓝条 + 蓝底圆徽 */
.ad-steps li.on {
  background: var(--card); border-color: var(--line-soft);
  box-shadow: var(--shadow-card); color: var(--brand);
}
.ad-steps li.on::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.ad-steps li.on .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad-steps li.on .tx { color: var(--brand); font-weight: 600; }
.ad-steps li.on .hint { color: var(--brand); opacity: .82; }

/* 已完成：绿底白勾圆徽 */
.ad-steps li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.ad-steps li.done .tx { color: var(--text-2); }

/* 未开始（未解锁）：灰底灰字 */
.ad-steps li.lock { opacity: 1; color: var(--text-3); cursor: not-allowed; }
.ad-steps li.lock .n { background: var(--line); border-color: var(--line); color: var(--text-3); }
.ad-steps li.lock .tx { color: var(--text-3); font-weight: 500; }

.ad-col-note {
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
  border-top: 1px dashed var(--line); margin-top: 18px; padding-top: 14px;
}

/* 历史作品 / 新建作品 */
.ad-hist-hd { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.ad-hist { margin-top: 8px; max-height: 230px; overflow: auto; }
.ad-hist-item {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 8px 11px; margin-bottom: 6px;
  cursor: pointer; font-family: inherit;
}
.ad-hist-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.ad-hist-item b { display: block; font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-hist-item span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.ad-hist-empty { font-size: 11.5px; color: var(--text-3); padding: 8px 2px; }
/* ---------- 4.5 侧栏：配置模型 + 作品管理（第 36 轮，第 37 轮按老板参照物重做） ---------- */
/* 「配置模型」入口：从顶栏搬到品牌卡下面。
   样式照老板给的参照物做：柔和的浅蓝块 + 蓝色图标 + 深色文字，不要默认按钮那种硬边框方块。 */
.ad-side-cfg {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 12px 0 18px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 12px;
  background: var(--brand-soft); color: var(--text);
  font-size: 13px; font-weight: 600; letter-spacing: .2px;
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.ad-side-cfg svg { flex: none; color: var(--brand); }
.ad-side-cfg:hover {
  background: #e4ecff; border-color: #d6e2ff;
  box-shadow: 0 2px 8px rgba(79, 124, 255, .14);
}

/* 作品管理区：照老板参照物 —— 圆形浅灰徽章 + 蓝色主标题 + 灰色副标题，
   不加边框、不加底色（hover 才浮起一张白卡），不要默认按钮那种方框。 */
.ad-side-work { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 16px; }
.ad-side-work .ad-col-t { padding-left: 4px; }
.ad-side-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; margin-bottom: 2px;
  border: 0; border-radius: 12px;
  background: transparent; text-align: left;
  cursor: pointer; font-family: inherit;
  transition: background .15s, box-shadow .15s;
}
.ad-side-item:hover { background: var(--card); box-shadow: var(--shadow-card); }
.ad-side-badge {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--card-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.ad-side-item:hover .ad-side-badge { background: #e7eeff; color: var(--brand); }
.ad-side-meta { min-width: 0; flex: 1; }
.ad-side-meta b {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--brand);
  line-height: 1.35;
}
.ad-side-meta i {
  display: block; font-style: normal; font-size: 11.5px; color: var(--text-3);
  margin-top: 2px; line-height: 1.4;
}

/* 历史作品列表：每条 = 可点开的标题 + 删除按钮 */
.ad-hist { margin-top: 6px; max-height: 260px; overflow: auto; }
.ad-hist-item {
  display: flex; align-items: stretch; gap: 4px; cursor: default;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); margin-bottom: 6px; overflow: hidden;
}
.ad-hist-item.made { border-color: #fecaca; }
.ad-hist-open {
  flex: 1; min-width: 0; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; cursor: pointer; font-family: inherit;
}
.ad-hist-open b {
  display: block; font-size: 12px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-hist-open span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.ad-hist-open:hover b { color: var(--brand); }
.ad-hist-del {
  flex: none; align-self: stretch; border: 0; border-left: 1px solid var(--line);
  background: var(--card-2); color: var(--text-3);
  padding: 0 10px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.ad-hist-del:hover { background: #fef2f2; color: #b91c1c; }
.ad-hist-item.made .ad-hist-del { background: #fef2f2; color: #b91c1c; }
.ad-hist-item.made .ad-hist-del:hover { background: #fee2e2; color: #991b1b; }
.ad-hist-empty { font-size: 11.5px; color: var(--text-3); padding: 8px 2px; }

/* ---------- 5. 主区 ---------- */
.ad-main-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ad-main-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.2px; color: var(--text); margin: 0; }
.ad-main-head .meta { font-size: 12px; color: var(--text-3); margin-left: auto; }
.ad-main-head[data-done="true"]::after {
  content: '已完成'; margin-left: 12px; font-size: 11px; font-weight: 700;
  color: var(--ok-text); background: var(--ok-soft); border: 1px solid #bbf7d0;
  border-radius: 999px; padding: 3px 10px;
}
.ad-runbar {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  border: 1px solid transparent; background: var(--card-2);
  border-radius: 999px; padding: 8px 15px; font-size: 12px; color: var(--text-3);
}
.ad-runbar .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; flex: none; }
.ad-runbar[data-on="true"] { background: var(--brand-soft); color: var(--brand); }
.ad-runbar[data-on="true"] .dot { background: var(--brand); animation: adPulse 1.1s ease-in-out infinite; }
.ad-runbar-meta { margin-left: auto; font-size: 11.5px; opacity: .8; }
.ad-panel-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.75; margin: 0 0 12px; }
.ad-probar {
  border: 1px solid #fde68a; background: #fffbeb; color: #92400e;
  border-radius: var(--radius-sm); padding: 11px 14px; margin: 0 0 14px;
  font-size: 12px; line-height: 1.8;
}

/* ---------- 6. 卡片（16px 圆角 + 轻蓝阴影） ----------
   本页 DOM 比设计稿多一层：.ad-panel.on = 整步大卡（设计稿里的「一张卡」），
   .ad-sect = 卡里的分区块。所以：大卡给足轻蓝阴影，分区块用更轻的一层蓝影，
   两级都不重、都不出现深色边框堆叠。 */
.ad-panel.on {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.ad-sect {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(79, 124, 255, .06);
}
.ad-sect-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.ad-sect-hint { font-size: 12px; color: var(--text-3); line-height: 1.75; margin: 0 0 12px; }
.ad-sect-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; align-items: center; }

/* ---------- 7. 按钮（12px 圆角） ---------- */
.ad-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(79, 124, 255, .18);
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.ad-btn:hover { opacity: .94; color: #fff; background: var(--brand-deep); border-color: var(--brand-deep); }
.ad-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(15, 23, 42, .18); }
.ad-btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }

/* 主按钮：品牌蓝纯色 + 蓝色投影（设计稿） */
.ad-btn.ad-primary, .ad-btn.primary, .ad-main-btn, #btnNext {
  background: var(--brand); border: 1px solid var(--brand); color: #fff;
  box-shadow: var(--shadow-primary); font-weight: 700;
}
.ad-main-btn { width: 100%; padding: 13px 16px; font-size: 14px; margin-bottom: 12px; }

/* 次按钮：浅灰底 + 边框 + 深灰字 */
.ad-btn.ghost {
  background: var(--card-2); border-color: var(--line); color: var(--text-2);
  box-shadow: none;
}
.ad-btn.ghost:hover { background: #e8eef6; color: var(--text); border-color: #cbd5e1; }

/* 幽灵按钮：白底 + 边框（设计稿 btn-ghost） */
.ad-btn.ghost {
  background: var(--card); border-color: var(--line); color: var(--text-2);
  box-shadow: none;
}
.ad-btn.ghost:hover { background: var(--card-2); color: var(--text); border-color: #cbd5e1; }

/* 第 7 步「一键合成」是这一步的主 CTA（设计稿里它是 btn-primary 大按钮），
   它在页面里原本带 ghost 类，这里只补视觉，不改它的 class、不改它的行为。 */
.ad-btn.ghost#btnExport {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: var(--shadow-primary); font-weight: 700;
  height: 46px; font-size: 15px; padding: 0 22px;
}
.ad-btn.ghost#btnExport:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

/* 上一步：幽灵按钮 */
#btnPrev {
  background: var(--card); border: 1px solid var(--line); color: var(--text-2);
  box-shadow: none;
}
#btnPrev:hover { border-color: var(--brand); color: var(--brand); }

/* 第 7 步「一键合成」是这一步的主 CTA（设计稿里它是 btn-primary 大按钮），
   它在页面里原本带 ghost 类，这里只补视觉，不改它的 class、不改它的行为。 */
.ad-btn.ghost#btnExport {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: var(--shadow-primary); font-weight: 700;
  height: 46px; font-size: 15px; padding: 0 22px;
}
.ad-btn.ghost#btnExport:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

.ad-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 28px; border-top: 1px solid var(--line); background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
  position: sticky; bottom: 0; z-index: 20;
}
.ad-foot .l { font-size: 11.5px; color: var(--text-3); }
.ad-foot .r { display: flex; gap: 10px; margin-left: auto; }
.ad-foot .r .ad-btn { border-radius: var(--radius-sm); padding: 10px 20px; }

/* 卡片内小按钮 / 预设 / 分段 / 历史按钮 */
.ad-cardacts button, .ad-cardacts a {
  flex: 1; text-align: center; text-decoration: none;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text-2);
  border-radius: 10px; padding: 6px 5px; font-size: 11px; font-family: inherit; cursor: pointer;
}
.ad-cardacts button:hover, .ad-cardacts a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.ad-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ad-presets button {
  border: 1px solid var(--line); background: var(--card-2); color: var(--text-2);
  border-radius: 10px; padding: 7px 14px; font-size: 12px; font-family: inherit; cursor: pointer;
}
.ad-presets button:hover { border-color: var(--brand); color: var(--brand); }
.ad-presets button.on {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700;
}
.ad-seg { display: flex; gap: 8px; }
.ad-seg button {
  flex: 1; border: 1px solid var(--line); background: var(--card-2); color: var(--text-2);
  border-radius: 10px; padding: 8px 6px; font-size: 12px; font-family: inherit; cursor: pointer;
}
.ad-seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.ad-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.ad-chip:hover { border-color: var(--brand); color: var(--brand); }
.ad-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad-durgroup { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card-2); }
.ad-durgroup .ad-chip { padding: 5px 10px; font-size: 11.5px; border-color: transparent; background: transparent; }
.ad-durgroup .ad-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad-durgroup .ad-chip.pro:not(.on) { color: #b45309; }

/* 通道体检区 */
.lab-btn {
  border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 10px;
  padding: 8px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; width: 100%;
}
.lab-btn.ghost { background: var(--card-2); border-color: var(--line); color: var(--text-2); }
.lab-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--card); display: flex; flex-direction: column; }
.lab-confirm { border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; padding: 10px; margin-top: 8px; font-size: 11.5px; color: #78350f; line-height: 1.6; }

/* ---------- 8. 表单 ---------- */
.ad-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ad-fields label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ad-fields label.wide { grid-column: 1 / -1; }
.ad-fields input, .ad-fields select, .ad-fields textarea,
.ad-edit textarea, .ad-edit select,
.ad-shotbody textarea, .ad-shotbody select,
.ad-2col select,
.lab-params input, .lab-params select, .lab-params textarea,
.ad-bgmbox select, .ad-bgmbox input[type=number] {
  width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; font-family: inherit; color: var(--text);
  margin-top: 6px;
}
.ad-fields textarea, .ad-edit textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.ad-fields input:focus, .ad-fields select:focus, .ad-fields textarea:focus,
.ad-edit textarea:focus, .ad-edit select:focus, .ad-shotbody textarea:focus,
.ad-shotbody select:focus, .ad-2col select:focus, .ad-mdlg-in:focus {
  outline: 2px solid #dbe6ff; outline-offset: 0; border-color: var(--brand); background: var(--card);
}
.ad-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.75; margin: 10px 0 0; }
.ad-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ad-2col label { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.ad-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; margin-top: 14px; background: var(--card-2); }
.ad-edit label { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 5px; }
.ad-edit .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.ad-adv { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 13px; margin-top: 14px; background: var(--card-2); }
.ad-adv summary { font-size: 12px; color: var(--text-3); cursor: pointer; font-weight: 600; }
.ad-must-item select {
  min-width: 168px; border: 2px solid var(--brand); border-radius: 10px;
  background: var(--card); color: var(--text); padding: 9px 11px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.ad-range { display: block; width: 100%; margin: 10px 0 12px; accent-color: var(--brand); }
.ad-range-line { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text); font-weight: 600; }
.ad-range-cap { color: var(--text-3); font-weight: 400; font-family: var(--font-mono); }
.ad-thumb { width: 96px; height: 96px; flex: none; border: 1px dashed var(--line); border-radius: 12px; background: var(--card-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-row { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; }
.ad-row p { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin: 0; }

/* ---------- 9. 胶囊 / 提示块 ---------- */
.ad-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  color: var(--ok-text); background: var(--ok-soft); border: 1px solid #bbf7d0;
}
.ad-pill.warn { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.ad-pill.idle { color: var(--text-2); background: var(--card-2); border-color: var(--line); }
.ad-pill.info { color: var(--brand); background: var(--brand-soft); border-color: #dbe6ff; }

.ad-lock, .ad-storytop {
  border: 1px solid #dbe6ff; border-radius: var(--radius-sm);
  background: #f5f8ff; padding: 13px 15px; margin-bottom: 14px;
}
.ad-lock .ttl, .ad-storytop .ttl { font-size: 12.5px; font-weight: 700; color: var(--brand); margin-bottom: 5px; }
.ad-lock .v { font-size: 12.5px; line-height: 1.8; margin-top: 6px; color: var(--text-2); }
.ad-storytop .sub { font-size: 11.5px; color: var(--text-3); margin-bottom: 12px; line-height: 1.7; }
.ad-wait {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #dbe6ff; background: #f5f8ff; color: var(--brand);
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12.5px; font-weight: 600; margin-bottom: 12px;
}
.ad-quality { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12px; line-height: 1.7; margin-bottom: 14px; }
.ad-line-echo { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--card-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.7; margin-bottom: 10px; }
.ad-line-echo .k { font-size: 11px; color: var(--text-3); font-weight: 700; display: block; margin-bottom: 3px; }

/* ---------- 10. 卡片网格 / 清单 / 图片 ---------- */
.ad-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ad-tile {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 14px; cursor: pointer; box-shadow: var(--shadow-card);
}
.ad-tile:hover { border-color: var(--brand); }
.ad-tile.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.ad-tile .t { font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.ad-tile .d { font-size: 11.5px; color: var(--text-3); line-height: 1.65; min-height: 38px; }
.ad-tile .f { font-size: 11px; color: var(--brand); margin-top: 7px; }

.ad-shotrow { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.ad-shotrow > summary { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; list-style: none; font-size: 12.5px; color: var(--text); }
.ad-shotrow > summary::-webkit-details-marker { display: none; }
.ad-shotrow .no { width: 28px; text-align: center; color: var(--text-3); font-family: var(--font-mono); font-weight: 600; }
.ad-shotrow .role { font-size: 10.5px; border-radius: 6px; padding: 2px 7px; background: var(--card-2); color: var(--text-2); }
.ad-shotrow .ti { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-shotrow .cam, .ad-shotrow .sec { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.ad-shotbody { border-top: 1px solid var(--line); padding: 14px; background: var(--card-2); }
.ad-shotbody label { display: block; font-size: 11px; color: var(--text-3); margin: 8px 0 4px; }

.ad-roleimg, .ad-shot .thumb, .ad-keypair .kf, .ad-frameimg, .ad-videoframe { background: var(--card-2); }
.ad-roleimg { height: 128px; border-radius: 10px; margin-bottom: 9px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-rolegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ad-rolegrid .ad-roleimg { height: auto; aspect-ratio: 16 / 9; }
.ad-keypair { display: flex; gap: 6px; margin-bottom: 10px; }
.ad-keypair .kf { flex: 1; min-width: 0; height: 92px; border-radius: 10px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-keypair .kf .tag { position: absolute; left: 6px; bottom: 6px; font-size: 10px; background: rgba(255, 255, 255, .94); color: var(--text-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.ad-framegrid, .ad-videogrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ad-framecard, .ad-videocard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow-card); }
.ad-frameimg, .ad-videoframe { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; }
.ad-frameimg img, .ad-videoframe video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-vno {
  position: absolute; left: 7px; top: 7px; font-size: 10px; font-family: var(--font-mono);
  background: rgba(255, 255, 255, .94); color: var(--text); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 6px;
}
.ad-ftag { position: absolute; right: 7px; top: 7px; font-size: 10px; background: #fef3c7; color: #92400e; border-radius: 5px; padding: 2px 6px; }
.ad-framecard .d, .ad-videocard .d { padding: 10px 11px 0; font-size: 11px; color: var(--text-3); line-height: 1.6; max-height: 52px; overflow: hidden; }
.ad-videocard .line { padding: 4px 11px 0; font-size: 11px; color: #0369a1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-cardacts { display: flex; gap: 8px; padding: 10px 11px 12px; }
.ad-shot .thumb { height: 92px; border-radius: 10px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.ad-shot .no { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.ad-shot .st { position: absolute; top: 9px; right: 9px; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text-3); }
.ad-shot .st.ok { color: var(--ok-text); border-color: #bbf7d0; background: var(--ok-soft); }
.ad-shot .st.editing { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.ad-shot .gen {
  display: inline-block; margin-top: 8px; padding: 5px 11px; font-size: 11px; font-weight: 700;
  color: var(--brand); background: var(--card); border: 1px solid var(--brand);
  border-radius: 10px; cursor: pointer; font-family: inherit;
}
.ad-shot .gen:hover { background: var(--brand-soft); }
.ad-shot .kd { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; margin-left: 5px; vertical-align: 1px; }
.ad-shot .kd.drama { background: var(--brand-soft); color: var(--brand-deep); }
.ad-shot .kd.bridge { background: #fef3c7; color: #92400e; }
.ad-shot .kd.ad { background: #fee2e2; color: #b91c1c; }

/* ---------- 11. 文案解析 / 体检 / 成本 ---------- */
.ad-bible { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); padding: 15px; margin-top: 14px; }
.ad-bible .ttl { font-size: 12.5px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.ad-bible-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-bible-grid .cell { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 10px 12px; }
.ad-bible-grid .k { font-size: 11px; color: var(--text-3); font-weight: 600; }
.ad-bible-grid .v { font-size: 12.5px; line-height: 1.7; margin-top: 3px; color: var(--text-2); }
.ad-bible.is-fresh { box-shadow: 0 0 0 3px #dbe6ff; border-color: var(--brand); }

#scriptDraftCard { border: 1px solid #fcd34d; background: #fffbeb; border-radius: var(--radius); padding: 15px 17px; }
#densityCard { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; background: var(--card); }
#densityCard.bad { border-color: #fca5a5; background: #fef2f2; }
.ad-dens-item { font-size: 12.5px; color: #b91c1c; margin-top: 5px; line-height: 1.6; }
.ad-dens-item.ad-dens-ok { color: var(--ok-text); }
.ad-dens-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-dens-note { font-size: 12.5px; color: var(--text-3); margin-top: 9px; line-height: 1.7; }
.ad-dens-fix { flex: 0 0 auto; border: 1px solid #fca5a5; background: var(--card); color: #b91c1c; border-radius: 10px; padding: 4px 11px; font-size: 12px; cursor: pointer; white-space: nowrap; }

.ad-cost { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); padding: 15px; margin-bottom: 12px; }
.ad-cost .lb { font-size: 11.5px; color: var(--text-3); }
.ad-cost .num { font-size: 25px; font-weight: 700; margin: 5px 0 3px; color: var(--text); font-family: var(--font-mono); }
.ad-cost .sm { font-size: 11px; color: var(--text-3); }
.ad-bar { height: 5px; border-radius: 99px; background: var(--line); margin-top: 9px; overflow: hidden; }
.ad-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.ad-side-note { font-size: 11.5px; color: var(--text-3); line-height: 1.8; margin: 14px 0 0; border-top: 1px dashed var(--line); padding-top: 13px; }

/* ---------- 12. 四段向导 / 进度 / 产物 ---------- */
.ad-wz { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 15px 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(79, 124, 255, .06); }
.ad-wz-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ad-wz-hd b { font-size: 13px; color: var(--text); }
.ad-wz-hd .now { font-size: 11.5px; color: var(--brand); font-weight: 700; }
.ad-wz-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.ad-wz-step {
  display: flex; align-items: center; gap: 9px; text-align: left; line-height: 1.5;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text-3);
  border-radius: 10px; padding: 10px 11px; font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.ad-wz-step:hover { border-color: var(--brand); }
.ad-wz-step .n {
  width: 22px; height: 22px; flex: none; border: 1px solid var(--line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--card); font-family: var(--font-mono);
}
.ad-wz-step.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.ad-wz-step.on .n { border-color: var(--brand); background: var(--brand); color: #fff; }
.ad-wz-step.done .n { border-color: var(--ok); background: var(--ok); color: #fff; }
.ad-wz-pane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(79, 124, 255, .06); }
.ad-wz-pane .ttl { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.ad-wz-pane .desc { font-size: 11.5px; color: var(--text-3); line-height: 1.8; margin-bottom: 12px; }
.ad-wz-foot { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.ad-logbox {
  position: sticky; top: 8px; z-index: 30; margin: 12px 0 14px;
  border: 1px solid #dbe6ff; border-radius: var(--radius); background: #f8fbff;
  box-shadow: var(--shadow-card);
}
.ad-logbox .hd { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e2eaff; font-size: 12px; color: var(--text); font-weight: 700; }
.ad-logbox .hd .now { font-weight: 600; color: var(--brand); font-size: 11.5px; }
.ad-logrow { font-size: 11.5px; line-height: 1.9; color: var(--text-2); white-space: pre-wrap; }
.ad-logrow .tm { color: #94a3b8; margin-right: 8px; font-family: var(--font-mono); }
.ad-logrow.ok { color: var(--ok-text); font-weight: 600; }
.ad-logrow.err { color: #b91c1c; font-weight: 600; }

.ad-live { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 14px; background: var(--card); box-shadow: var(--shadow-card); }
.ad-live h4 { font-size: 12.5px; margin: 0 0 9px; color: var(--text); }
.ad-live .ln { font-size: 12px; line-height: 2; color: var(--text-3); }
.ad-live a { color: var(--brand); text-decoration: underline; }
.ad-via { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.7; }
.ad-bgmbox { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 15px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.ad-bgmrow { display: grid; grid-template-columns: 92px 1fr 190px 104px 66px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); padding: 9px 11px; margin-top: 8px; }
.ad-probe { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; margin-top: 16px; background: var(--card); box-shadow: var(--shadow-card); }
.ad-probe h3 { font-size: 13.5px; margin: 0 0 6px; color: var(--text); }
.ad-probe .desc { font-size: 11.5px; color: var(--text-3); line-height: 1.75; margin: 0 0 12px; }

/* ---------- 13. 浮层：toast / 视频预览 / 我的模型弹窗 ---------- */
.ad-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60;
  background: var(--card); color: var(--text); border: 1px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  max-width: 88vw; text-align: center; line-height: 1.6; font-size: 13px; padding: 11px 18px;
}
.ad-video-layer { background: rgba(148, 163, 184, .35); }
.ad-video-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-window);
}
.ad-video-box video { background: var(--card-2); }
.ad-mdlg {
  background: var(--card); border-radius: var(--radius); width: 100%; max-width: 620px;
  box-shadow: var(--shadow-window); border: 1px solid var(--line);
}
.ad-mdlg-hd { background: var(--side); }
.ad-mdlg-btns button { border-radius: 10px; background: var(--card-2); }

/* 第 36 轮：删除作品的二次确认弹窗（自绘，不用 window.confirm） */
.ad-cfm-mask {
  position: fixed; inset: 0; z-index: 130; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ad-cfm {
  width: min(460px, 100%); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-window); padding: 22px 22px 18px;
}
.ad-cfm h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--text); }
.ad-cfm p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-2); }
.ad-cfm p b { color: var(--text); }
.ad-cfm-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ad-cfm-btns .ad-btn { min-width: 104px; }
.ad-btn.danger {
  background: var(--bad); border-color: var(--bad); color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, .3);
}
.ad-btn.danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; opacity: 1; }
.ad-btn.danger:disabled { opacity: .6; cursor: progress; }

/* ---------- 13.5 补充：主列边框 / 等待态 / 门禁卡 ---------- */
.ad-col:nth-child(2) { border-left: 0; }

/* 等待态：渐变一律换成品牌蓝纯色（设计稿主按钮无渐变） */
.ad-btn.is-busy.is-busy.ad-primary,
.ad-btn.is-busy.is-busy.primary,
.ad-btn.is-busy.is-busy.ad-main-btn,
#btnNext.is-busy {
  background: var(--brand); border: 2px solid var(--brand); color: #fff;
  -webkit-text-stroke: 0; text-shadow: none;
}
.ad-btn.is-busy.is-busy:not(.ad-primary):not(.primary):not(.ad-main-btn) {
  background: #f8fbff; color: var(--brand);
  -webkit-text-stroke: 0; text-shadow: none;
}

/* 内测门禁卡 */
.ad-gate {
  max-width: 620px; margin: 70px auto; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 44px 28px; box-shadow: var(--shadow-card);
}
.ad-gate h2 { font-size: 20px; margin: 16px 0 8px; color: var(--text); }
.ad-gate p { color: var(--text-3); font-size: 14px; line-height: 1.8; margin: 0; }

/* ---------- 14. 窄屏 ---------- */
@media (max-width: 900px) {
  .ad-body { grid-template-columns: 1fr; }
  .ad-col:first-child {
    grid-column: 1; grid-row: 1; position: static; height: auto; max-height: none;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 0 14px 14px;
  }
  .ad-col:first-child .ad-steps { display: flex; gap: 6px; overflow: auto; }
  .ad-col:first-child .ad-steps li { flex: 0 0 auto; white-space: nowrap; }
  .ad-col:first-child .ad-steps .hint { display: none; }
  .ad-col:nth-child(2) { grid-column: 1; grid-row: 2; padding: 20px 16px 8px; }
  .ad-col:nth-child(3) { grid-column: 1; grid-row: 3; padding: 0 16px 20px; }
  .ad-foot { padding: 12px 16px; }
  .ad-grid, .ad-rolegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ad-grid, .ad-rolegrid, .ad-fields, .ad-2col, .ad-bible-grid { grid-template-columns: 1fr; }
  .ad-foot .r { margin-left: 0; width: 100%; }
}
