/* ============================================================
 * styles-model-bench.css —— 模型工作台（#model/<id>）
 * 一个模型一页：顶部模型标识 + 中间消息/结果流 + 底部输入坞
 * 四种类型共用同一套骨架，靠 body 上的 .mb-kind-* 做差异
 * ============================================================ */

/* 工作台需要比正文更宽的行宽 */
.main-col.mb-wide { max-width: 1560px; }

/* ---------- 顶栏常驻：工作区自己滚，顶栏永远不动 ---------- */
/* 参考站点：标题 / 快捷胶囊 / 客服行是浮在工作区上方的一层，
   下面那块工作区怎么上下滑都带不动它。
   做法：把 main-col 变成「满高 flex 列」——顶上三行 fixed，中间 #view 吃掉
   剩余高度并在内部裁剪。整页因此不再产生滚动条，短屏（笔记本 1280×620、
   浏览器缩放到 125%）也不会出现「一滚就把顶栏带走」的情况。 */
.main-col.mb-wide {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: calc(100vh - 44px);   /* 桌面 shell 上下内边距 14 + 30 */
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0 !important;
}

.main-col.mb-wide > .topbar,
.main-col.mb-wide > .quickbar,
.main-col.mb-wide > .contact-row { flex: 0 0 auto; }

.main-col.mb-wide > .content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 高度交给 flex 撑满，不再用 JS 算死的 calc(100vh - Npx) */
.main-col.mb-wide > .content > .mb {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* 1024~1199 这一档 shell 的上下内边距是 12 + 28，比桌面档少 4px，
   不跟着改会多出一条几乎看不见、却会晃动顶栏的整页滚动条 */
@media (min-width: 1024px) and (max-width: 1199px) {
  .main-col.mb-wide { height: calc(100vh - 40px); }
}

.mb {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 420px;
  position: relative;
  color: var(--ink);
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(224, 233, 255, .55), transparent 62%),
    radial-gradient(760px 380px at 12% 0%, rgba(255, 238, 224, .5), transparent 60%),
    var(--panel);
  overflow: hidden;
}

html[data-theme="dark"] .mb {
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(46, 66, 108, .45), transparent 62%),
    radial-gradient(760px 380px at 12% 0%, rgba(84, 56, 40, .38), transparent 60%),
    var(--panel);
}

/* ---------- 居中对话列 ---------- */
/* 模型介绍、消息流、输入坞共用同一条中轴：
   宽屏下都往中间收，不再各自贴到页面左右两端 */
.mb-inner {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* ---------- 顶部模型标识 ---------- */
/* 放在消息流内部：空页时居中方块，有任务后随内容一起往上滚出视口 */
.mb-hero {
  text-align: center;
  padding: 2px 0 6px;
  flex: 0 0 auto;
}
.mb-logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 10px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #222c3a, #37465c);
  box-shadow: 0 12px 28px rgba(20, 32, 48, .22);
}
.mb-logo svg { width: 29px; height: 29px; }
.mb-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* 历史对话 / 新对话：对话记录 7 天保留的入口 */
.mb-hero-tools { display: flex; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mb-chip-btn {
  border: 1px solid var(--line, rgba(255,255,255,.14));
  background: rgba(255,255,255,.05);
  color: var(--ink-soft, #9a9aa6);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.mb-chip-btn:hover { color: var(--ink, #f3f3f7); border-color: var(--accent, #6f8cff); background: rgba(111,140,255,.12); }

.mb-title { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.mb-series,
.mb-kind {
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.mb-kind { border-color: transparent; background: var(--accent-soft, #e7f4ee); color: var(--accent); font-weight: 600; }
.mb-sub { margin-top: 6px; font-size: 11.5px; color: var(--faint, var(--muted)); min-height: 14px; }

/* ---------- 模型介绍 ---------- */
/* 居中在对话列里的一张说明卡：不是整页居中的标题块，也不是左对齐的助手气泡 */
.mb-intro {
  width: 100%;
  max-width: 720px;
  margin: 14px auto 6px;
  padding: 14px 18px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft, rgba(125, 145, 175, .07));
}
.mb-intro-t {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mb-intro-d {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  word-break: break-word;
}

/* ---------- 中间流 ---------- */
.mb-stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* 滚到底 / 滚到顶时不要把滚动链传给整页，否则一滑就把网页带跑了 */
  overscroll-behavior: contain;
  padding: 6px 20px 8px;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}
/* 空状态居中：用上下 auto 外边距而不是 justify-content，
   这样窗口很矮、内容比容器还高时，会退化成从顶部开始排（可以正常滚动），
   不会把模型图标裁到可视区外面去 */
/* 空状态居中：完全交给上下 auto 外边距。
   不用 justify-content: center —— 内容比容器高时它会把顶部顶成负值，
   模型图标就被裁到可视区外面，怎么滚都看不到 */
.mb-stream.is-empty > :first-child { margin-top: auto; }
.mb-stream.is-empty > :last-child { margin-bottom: auto; }
.mb-msg { display: flex; flex-wrap: wrap; margin: 8px 0; }
.mb-msg-user { justify-content: flex-end; }
.mb-msg-body {
  max-width: 76%;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.75;
  word-break: break-word;
  white-space: normal;
}
.mb-msg-user .mb-msg-body {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
/* 演示模式（模型还没配上游接口）的回复：用浅黄区分，别让人以为真的接通了 */
.mb-msg.is-sim .mb-msg-body { background: #fff9ec; border-color: #f2e2ba; color: #7a5a13; }
html[data-theme="dark"] .mb-msg.is-sim .mb-msg-body { background: #3a3323; border-color: #5a4c2c; color: #e8d9a8; }
.mb-think { color: var(--muted); font-size: 13px; padding: 8px 14px; }
.mb-msg-err {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(194, 65, 90, .08);
  border: 1px solid rgba(194, 65, 90, .28);
  color: var(--danger, #c2415a);
  font-size: 12.5px;
}

/* ---------- 输入坞 ---------- */
/* 手机端专用的「收起输入框」按钮与「展开输入框」条：
   默认隐藏，只有 styles-mobile.css 里 html[data-mobile='1'] 的规则才显示，
   否则桌面上会多出两颗没人认识的按钮。 */
.mb-dock-fold, .mb-dock-bar { display: none; }

/* 一整块大圆角输入卡：左「+参考图」、中提示词、右竖排工具，参数胶囊压在卡片底部 */
.mb-dock { flex: 0 0 auto; padding: 0 20px 14px; }

/* 往上翻历史时收起，只留左下角一个小键盘钮 */
.mb.is-dock-min .mb-dock { display: none; }
.mb-dock-mini {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: none;
  place-items: center;
  padding: 0;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 10px 24px rgba(16, 32, 26, .14);
}
.mb-dock-mini svg { width: 19px; height: 19px; }
.mb-dock-mini:hover { color: var(--ink); border-color: var(--muted); }
.mb.is-dock-min .mb-dock-mini { display: grid; animation: mb-pop .18s ease; }
@keyframes mb-pop {
  from { transform: scale(.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.mb-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 20px;
}
.mb-dock-card {
  padding: 12px 14px 10px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(16, 32, 26, .07);
}

/* 三段式：素材轨道 / 输入 / 右侧工具列 */
.mb-compose {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.mb-rail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 46%;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.mb-rail::-webkit-scrollbar { height: 0; }

/* 虚线「+ 参考图」格子：常驻在最左边，一点就选文件 */
.mb-ref-add {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.mb-ref-add:hover { border-color: var(--accent); color: var(--accent); background: var(--panel-soft); }
.mb-ref-plus { font-size: 17px; line-height: 1; font-weight: 300; }
.mb-ref-label { font-size: 10px; line-height: 1; }

.mb-ref {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  display: grid;
  place-items: center;
}
.mb-ref-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-ref-tag { font-size: 20px; color: var(--muted); }
.mb-ref-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* 输入框 */
.mb-compose-main { flex: 1 1 auto; min-width: 0; }
.mb-dual { display: flex; gap: 10px; width: 100%; }
.mb-field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mb-field-t { font-size: 11px; color: var(--muted); padding-left: 2px; }
.mb-input {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  /* styles-premium.css 给所有 textarea 加了 !important 的白底和 12px 圆角，
     这里必须同样用 !important 抹掉，否则输入区会变成卡片里套一个小白框 */
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.72;
  min-height: 88px;
  max-height: 200px;
  padding: 2px;
}
.mb-input::placeholder { color: var(--faint, var(--muted)); opacity: .85; }
.mb-input:focus { box-shadow: none !important; }

/* 右侧竖排：积分预估贴顶，语音 / AI 帮写 / 发送 贴底 */
.mb-compose-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-height: 60px;
}
.mb-tools { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* 积分预估小徽标 */
.mb-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-soft, rgba(125, 145, 175, .07));
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}
.mb-cost-badge svg { width: 12px; height: 12px; color: var(--accent); flex: 0 0 auto; }
.mb-cost { font-weight: 600; color: var(--ink); }
.mb-cost:empty { display: none; }

/* 参数条：一排胶囊，像参考站点那样只显示当前值 + 展开箭头。
   贴在卡片底部、和输入框之间不画分隔线（参考图里就是同一块白底） */
.mb-params {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 0 0 2px;
}
.mb-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  box-sizing: border-box;
  padding: 0 4px 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft, rgba(125, 145, 175, .07));
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.mb-chip:hover { border-color: var(--muted); }
/* 参数名前面的小图标，和参考站点的胶囊一致 */
.mb-chip-ic {
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.mb-chip-ic svg { width: 13px; height: 13px; }
.mb-chip-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mb-chip-chev { display: grid; place-items: center; color: var(--muted); }
.mb-chip-chev svg { width: 13px; height: 13px; }
/* 原生 select 透明铺满整块胶囊：点哪儿都能拉开选择器 */
.mb-chip-sel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}
.mb-params-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mb-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: transform .12s ease, opacity .12s ease;
  flex: 0 0 auto;
}
.mb-send:hover { transform: translateY(-1px); }
.mb-send:disabled { opacity: .55; cursor: default; transform: none; }
.mb-send svg { width: 17px; height: 17px; }
.mb-send-arrow { font-size: 18px; line-height: 1; font-weight: 600; }
.mb-send.is-busy .mb-send-arrow { display: none; }
.mb-send.is-busy::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: mb-spin .8s linear infinite;
}
@keyframes mb-spin { to { transform: rotate(360deg); } }

/* ---------- 输入框右下角工具：语音输入 / AI 帮写 ---------- */
.mb-tool {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
  transition: color .15s ease, border-color .15s ease, transform .12s ease;
}
.mb-tool:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-1px); }
.mb-tool svg { width: 16px; height: 16px; }
.mb-tool:disabled { opacity: .55; cursor: default; transform: none; }
/* 语音模块会往按钮内的 span 写状态文字，图标按钮用这个 span 承接但不可见 */
.mb-tool-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 录音中：按钮变红呼吸，并在上方飘出提示 */
.mb-tool.recording {
  background: #e0566d;
  border-color: transparent;
  color: #fff;
  animation: mb-pulse 1.3s ease-in-out infinite;
}
.mb-tool.recording::after {
  content: "聆听中…（点一下结束）";
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  background: #2b3444;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
@keyframes mb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 86, 109, .45); }
  50% { box-shadow: 0 0 0 7px rgba(224, 86, 109, 0); }
}

/* AI 帮写：橙色小圆，和发送按钮区分开（参考站点就是这个配色） */
.mb-tool-ai {
  border-color: transparent;
  background: linear-gradient(145deg, #ff9f45, #f97316);
  color: #fff;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(249, 115, 22, .28);
}
.mb-tool-ai .mb-tool-ai-t { font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.mb-tool-ai:hover { color: #fff; border-color: transparent; }
.mb-tool-ai.is-busy { opacity: .85; }
.mb-tool-ai.is-busy::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: transparent;
  animation: mb-spin .8s linear infinite;
}

/* 改写后的「恢复原文」小胶囊，20 秒后自动消失 */
.mb-undo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.mb-undo svg { width: 12px; height: 12px; }
.mb-undo:hover { color: var(--ink); border-color: var(--muted); }
.mb-undo[hidden] { display: none; }

/* ---------- 任务卡 / 结果 ---------- */
/* 参考站点：一条任务从上到下依次是
   标题（提示词）→ 参数胶囊 → 结果图 → 「内容由 AI 生成」提示 → 三个操作，
   时间戳贴在右下角，越往上越早，最新在最下面 */
.mb-task {
  position: relative;
  padding: 16px 0 18px;
  border-bottom: 1px dashed var(--line);
}
.mb-task:last-child { border-bottom: 0; }
.mb-task-head { display: flex; align-items: flex-start; gap: 12px; }
.mb-task-prompt {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.65;
  letter-spacing: -.1px;
  color: var(--ink);
  word-break: break-word;
}
.mb-task-time {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 11px;
  color: var(--faint, var(--muted));
  white-space: nowrap;
}

/* 参数胶囊行：模型版本：… / 图片比例：… / 分辨率：… 一行铺开，超宽自动换行 */
.mb-task-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.mb-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 25px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}
.mb-meta-k { font-style: normal; opacity: .85; }
.mb-task-run { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.mb-task-label { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.mb-bar {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.mb-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #40c79a);
  transition: width .45s ease;
}
.mb-task-err { margin-top: 8px; font-size: 12px; color: var(--danger, #c2415a); }

/* 结果缩略图：贴近参考站点的方图，圆角不带描边 */
.mb-result {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.mb-result.is-audio { display: block; }
.mb-media {
  width: 240px;
  height: 240px;
  border-radius: 14px;
  display: block;
  background: var(--panel-soft);
  border: 0;
  cursor: zoom-in;
  object-fit: cover;
}
.mb-audio { width: 100%; max-width: 420px; }

/* —— 按天切割线：居中标签 + 两侧虚线（今天 / 昨天 / M月D日） —— */
.mb-day {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 6px;
  flex: 0 0 auto;
}
.mb-day-line { flex: 1 1 auto; border-top: 1px dashed var(--line); }
.mb-day-label {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}

/* —— 一键到底：收起输入坞后出现在小键盘钮右侧的箭头钮 —— */
.mb-dock-jump {
  position: absolute;
  left: 66px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: none;
  place-items: center;
  padding: 0;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 10px 24px rgba(16, 32, 26, .14);
  animation: mb-pop .18s ease;
}
.mb-dock-jump.show { display: grid; }
.mb-dock-jump svg { width: 19px; height: 19px; }
.mb-dock-jump:hover { color: var(--ink); border-color: var(--muted); }

/* 「内容由 AI 生成，仅供参考」 */
.mb-task-cap {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint, var(--muted));
}

/* 底部一行：左三个操作按钮，右时间戳 */
.mb-task-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mb-task-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 圆形的下载钮：参考站点把它单独做成一枚圆钮，不占按钮文字位 */
.mb-dl {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color .15s ease, border-color .15s ease, transform .12s ease;
}
.mb-dl:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-1px); }
.mb-dl svg { width: 15px; height: 15px; }

/* ---------- 按钮 / 提示 ---------- */
.mb-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.mb-btn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mb-btn:hover { border-color: var(--muted); }
.mb-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.mb-btn.small { font-size: 11.5px; padding: 7px 11px; border-radius: 9px; }
.mb-btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.mb-btn.ghost:hover { color: var(--ink); background: var(--panel-soft); border-color: transparent; }

.mb-note {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mb-note-t { font-size: 15px; font-weight: 600; color: var(--ink); }
.mb-note-d { max-width: 420px; line-height: 1.7; }

/* 暗色主题下 --accent 会变成浅色，白字会糊在浅底上：
   这几处「强调色底 + 文字」的组合统一改用深色字 */
html[data-theme="dark"] .mb-send,
html[data-theme="dark"] .mb-msg-user .mb-msg-body,
html[data-theme="dark"] .mb-btn.primary { color: #0e1116; }
/* 橙色 AI 钮两种主题都用白字 */
html[data-theme="dark"] .mb-tool-ai { color: #fff; }

html[data-theme="dark"] .mb-tool-ai.is-busy::after { border-color: rgba(14, 17, 22, .45); border-top-color: transparent; }

/* ---------- 移动端 ---------- */
/* 窄屏 shell 不是 flex 行，main-col 自身带 24px 下内边距：
   满高列扣掉这 24px 就是可用高度，顶栏同样常驻 */
@media (max-width: 1023px) {
  .main-col.mb-wide { height: calc(100vh - 24px); }
}

@media (max-width: 900px) {
  .mb { height: calc(100vh - 118px); min-height: 420px; border-radius: 16px; }
  .mb-hero { padding: 0 0 4px; }
  .mb-logo { width: 56px; height: 56px; border-radius: 17px; margin-bottom: 9px; }
  .mb-logo svg { width: 26px; height: 26px; }
  .mb-title { font-size: 16.5px; }
  .mb-stream { padding: 4px 12px 6px; }
  .mb-dock { padding: 0 12px 12px; }
  .mb-dock-mini { left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 11px; }
  .mb-msg-body { max-width: 88%; font-size: 13px; }
  .mb-dual { flex-direction: column; }
  .mb-intro { max-width: 100%; margin: 10px auto 4px; padding: 12px 14px; }
  .mb-intro-d { font-size: 12.5px; line-height: 1.75; }

  /* 素材轨道独占一行，工具列横排压到卡片底部 */
  .mb-compose { flex-direction: column; gap: 8px; align-items: stretch; }
  .mb-rail { max-width: 100%; width: 100%; }
  .mb-ref-add, .mb-ref { width: 58px; height: 58px; border-radius: 12px; }
  .mb-compose-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 0;
  }
  .mb-tools { flex-direction: row; gap: 8px; }
  .mb-input { min-height: 72px; }
  .mb-tool { width: 30px; height: 30px; }
  .mb-tool svg { width: 15px; height: 15px; }
  .mb-cost-badge { font-size: 10.5px; padding: 4px 8px; }

  /* 结果缩略图两列铺满，别在窄屏里切成一条 */
  .mb-media { width: calc(50% - 5px); height: auto; aspect-ratio: 1 / 1; }
  .mb-task-time { font-size: 10.5px; }
  .mb-task-prompt { font-size: 13.5px; }
  .mb-meta { height: 24px; padding: 0 8px; }
  .mb-task-foot { gap: 6px; }
}


/* ============================================================
 * 大模型输入卡 · v3（2026-11-19 晚）
 * ① 三行胶囊：主参数 / 扩展参数（接口·版本·画质·复杂度·格式·背景·GIF 帧数）/ AI 优化
 * ② 输入区放大 + 撞色底（绿 ↔ 紫 ↔ 青三色叠加，价格徽标琥珀色压在上面）
 * ③ 右下拖拉柄
 * 说明：本节之前的同名规则仍作基础，这里只做覆盖；配色走 --mbx-* 变量，
 *      浅色主题下自动换成低饱和版本，不会在白天配色里发灰。
 * ============================================================ */

.mb-dock-card {
  position: relative;
  --mbx-g: 34, 179, 127;      /* 品牌绿 */
  --mbx-v: 124, 108, 255;     /* 撞色紫 */
  --mbx-c: 56, 189, 248;      /* 撞色青 */
  padding: 12px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--mbx-v), .38);
  background:
    radial-gradient(125% 160% at 0% 0%, rgba(var(--mbx-g), .24), transparent 60%),
    radial-gradient(125% 160% at 100% 100%, rgba(var(--mbx-v), .26), transparent 64%),
    var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .045);
}
html[data-theme="light"] .mb-dock-card {
  --mbx-g: 14, 138, 99;
  --mbx-v: 108, 92, 231;
  --mbx-c: 14, 154, 167;
  box-shadow: 0 14px 34px rgba(30, 42, 38, .10), inset 0 1px 0 #fff;
}

/* —— ① 参数区：三行 —— */
.mb-params {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 11px;
  padding: 0;
}
.mb-params-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  min-height: 28px;
}
.mb-params-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
}
.mb-params-right {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mb-params-foot { justify-content: flex-start; gap: 8px; }

/* 胶囊：参数名淡 + 当前值亮，跟参考站一致 */
.mb-chip {
  height: 28px;
  padding: 0 7px 0 9px;
  gap: 5px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-soft, rgba(125, 145, 175, .07));
  transition: border-color .15s ease, background .15s ease;
}
.mb-chip:hover { border-color: var(--line-strong); }
.mb-chip-k {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.mb-chip-val { font-size: 12px; font-weight: 600; color: var(--ink); max-width: 132px; }
.mb-chip-ic { display: none; }
.mb-chip-chev svg { width: 12px; height: 12px; }

/* 扩展参数（第二行）：淡紫底 + 淡绿描边，一眼区分「模型参数」与「出图主参数」 */
.mb-chip-x {
  border-color: rgba(var(--mbx-v), .42);
  background: linear-gradient(135deg, rgba(var(--mbx-v), .18), rgba(var(--mbx-g), .10));
}
.mb-chip-x:hover { border-color: rgba(var(--mbx-v), .58); }
.mb-chip-x .mb-chip-val { color: #cfc9ff; }
html[data-theme="light"] .mb-chip-x .mb-chip-val { color: #4b3fb0; }
/* 依赖项未满足（如 GIF 帧数在非 GIF 格式下）：变灰且不可点，但仍在原位不跳动 */
.mb-chip-x.is-off { opacity: .42; }
.mb-chip-x.is-off:hover { border-color: rgba(var(--mbx-v), .30); }
.mb-chip-x.is-off select { cursor: not-allowed; }

/* 价格徽标：琥珀色小胶囊，贴第一行最右（和绿紫撞出第三种颜色） */
.mb-cost-badge {
  height: 28px;
  padding: 0 10px;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid rgba(214, 172, 82, .55);
  background: rgba(214, 172, 82, .18);
  font-size: 11.5px;
}
.mb-cost-badge svg { width: 12px; height: 12px; color: #d3ab5c; }
.mb-cost { font-size: 11.5px; font-weight: 600; color: #d8b676; }

/* AI 优化：浅胶囊（复用原 AI 帮写按钮，行为不变） */
.mb-tool.mb-opt-pill {
  width: fit-content;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 11px;
  margin: 0;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid rgba(var(--mbx-v), .34);
  background: rgba(var(--mbx-v), .10);
  color: var(--ink-soft, var(--ink));
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: none;
}
.mb-tool.mb-opt-pill:hover {
  border-color: rgba(var(--mbx-v), .62);
  background: rgba(var(--mbx-v), .16);
  transform: none;
}
.mb-tool.mb-opt-pill .mb-tool-ai-t { font-size: 11.5px; font-weight: 600; letter-spacing: 0; }

/* 恢复默认：虚线小按钮，靠右，不抢主操作的视觉重量 */
.mb-reset-extra {
  margin-left: auto;
  height: 26px;
  padding: 0 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.mb-reset-extra:hover { color: var(--ink); border-color: var(--muted); }

/* —— ② 输入区 —— */
.mb-compose {
  align-items: stretch;
  gap: 10px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(var(--mbx-v), .34);
  background-color: var(--panel);
  background-image:
    radial-gradient(105% 160% at 0% 0%, rgba(var(--mbx-g), .22), transparent 62%),
    radial-gradient(105% 160% at 100% 100%, rgba(var(--mbx-c), .20), transparent 62%),
    linear-gradient(135deg, rgba(var(--mbx-v), .16), transparent 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(var(--mbx-c), .10);
}
.mb-rail { max-width: none; gap: 8px; align-items: stretch; }

/* 参考图片方块：76×76，紫描边 + 图标 + 加号 + 左下标签 */
.mb-ref-add,
.mb-ref { width: 76px; height: 76px; border-radius: 13px; }
.mb-ref-add {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 0 14px;
  border: 1px solid rgba(var(--mbx-v), .46);
  background: linear-gradient(160deg, rgba(var(--mbx-v), .30), rgba(var(--mbx-g), .12) 62%, rgba(20, 22, 30, .45));
  color: #cfc9ff;
  overflow: hidden;
  transition: border-color .16s ease, background .16s ease;
}
.mb-ref-add:hover {
  border-color: rgba(var(--mbx-v), .62);
  background: linear-gradient(160deg, rgba(var(--mbx-v), .30), rgba(var(--mbx-g), .12) 62%, rgba(20, 22, 30, .5));
  color: #fff;
}
.mb-ref-ic { position: static; color: #cfc9ff; line-height: 1; }
.mb-ref-ic svg { width: 17px; height: 17px; display: block; }
.mb-ref-plus {
  position: static;
  transform: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
}
.mb-ref-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  text-align: left;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .2px;
  color: rgba(235, 232, 255, .84);
}

/* 资产库：竖排小入口（「图片编辑」已按要求移除） */
.mb-quick {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
}
.mb-quick-btn {
  height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mb-quick-btn:hover { background: var(--panel-soft); border-color: var(--line); color: var(--ink); }
.mb-quick-ic { font-size: 12px; opacity: .9; }

/* 提示文字：放大字号 / 行高，整块高度翻上去，不再是一窄条 */
.mb-input {
  min-height: 132px;
  padding: 6px 4px;
  font-size: 14px;
  line-height: 1.85;
  background: transparent;
}
.mb-input::placeholder { color: var(--muted); opacity: .9; line-height: 1.85; }
.mb-kind-chat .mb-input { min-height: 96px; font-size: 13.5px; }

/* 右下角：语音 + 圆形发送（绿→紫渐变，撞色点在这里最亮） */
.mb-compose-side { justify-content: flex-end; }
.mb-tools { gap: 8px; }
.mb-tool { width: 32px; height: 32px; }
.mb-send {
  width: 40px;
  height: 40px;
  border: 0;
  background: linear-gradient(135deg, rgb(var(--mbx-g)), rgb(var(--mbx-v)) 84%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--mbx-v), .38);
}
.mb-send:hover { transform: translateY(-1px); filter: brightness(1.07); }
.mb-send:disabled { box-shadow: none; filter: grayscale(.35); }
/* 基础样式在暗色下把发送按钮文字改成深色（原底是浅绿），换成渐变后必须白字 */
html[data-theme="dark"] .mb-send { color: #fff; }
.mb-send svg { width: 18px; height: 18px; }
.mb-send-arrow { font-size: 19px; }

/* —— ③ 右下拖拉柄 —— */
.mb-resize {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  cursor: nwse-resize;
  color: var(--muted);
  opacity: .5;
  background-image: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 4px);
}
.mb-resize:hover { opacity: .9; }

/* —— 响应式 —— */
@media (max-width: 720px) {
  .mb-params { gap: 7px; }
  .mb-chip { height: 26px; padding: 0 5px 0 8px; gap: 4px; border-radius: 8px; }
  .mb-chip-k { font-size: 11px; }
  .mb-chip-val { font-size: 11.5px; max-width: 104px; }
  .mb-cost-badge { height: 26px; padding: 0 8px; }
  .mb-cost, .mb-cost-badge { font-size: 11px; }
}
@media (max-width: 560px) {
  .mb-dock-card { padding: 9px 10px 11px; border-radius: 15px; }
  .mb-ref-add, .mb-ref { width: 62px; height: 62px; border-radius: 11px; }
  .mb-ref-ic svg { width: 15px; height: 15px; }
  .mb-ref-plus { width: 17px; height: 17px; font-size: 11px; }
  .mb-quick { display: none; }
  .mb-input { font-size: 13px; min-height: 108px; }
  .mb-reset-extra { padding: 0 7px; font-size: 11px; }
}

/* ===== 20261119u3: 统一「深底 + 紫色选中」配色 + 自绘深色下拉（与图片设置浮层一致） ===== */
html[data-theme="dark"] .mb-chip { background: #1b1d22; border-color: #31343c; }
html[data-theme="dark"] .mb-chip:hover { border-color: #7c3aed; }
html[data-theme="dark"] .mb-chip-val { color: #f4f1ff; }
/* 第二行扩展参数：去掉绿紫渐变，统一紫色高亮 */
.mb-chip-x { border-color: rgba(124, 58, 237, .55) !important; background: rgba(124, 58, 237, .20) !important; }
.mb-chip-x:hover { border-color: rgba(124, 58, 237, .85) !important; }
.mb-chip-x .mb-chip-val { color: #f4f1ff; }
html[data-theme="light"] .mb-chip-x .mb-chip-val { color: #4b3fb0; }
/* 原生 select 只保留数值与 disabled 语义，点击交给自绘菜单 */
.mb-chip-sel { pointer-events: none; }
.mb-chip-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%;
  max-height: 300px; overflow-y: auto; z-index: 9999; padding: 5px;
  border: 1px solid #3a3d45; border-radius: 10px; background: #1c1f24;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.mb-chip-menu[hidden] { display: none; }
.mb-chip-menu-item {
  display: block; width: 100%; box-sizing: border-box; border: 0; border-radius: 6px;
  padding: 7px 10px; background: transparent; color: #e8eaed; font-size: 12px;
  line-height: 1.4; text-align: left; white-space: nowrap; cursor: pointer;
}
.mb-chip-menu-item:hover, .mb-chip-menu-item.is-sel { background: #4c2fa6; color: #fff; }
html[data-theme="light"] .mb-chip-menu { background: #fff; border-color: #d8dbe2; box-shadow: 0 14px 34px rgba(20, 24, 32, .18); }
html[data-theme="light"] .mb-chip-menu-item { color: #22252b; }
html[data-theme="light"] .mb-chip-menu-item:hover,
html[data-theme="light"] .mb-chip-menu-item.is-sel { background: #e8e2ff; color: #4b3fb0; }
@media (max-width: 720px) {
  .mb-chip-menu { max-height: 260px; }
  .mb-chip-menu-item { font-size: 12px; padding: 6px 9px; }
}

/* ===== 20261120r1: 参考框改造——素材收进虚线框内，框宽封顶+框内横滚，输入区不再被挤窄 ===== */
.mb-rail {
  flex: 0 1 auto;
  min-width: 92px;
  max-width: min(318px, 42%);
  gap: 6px;
  padding: 5px;
  box-sizing: border-box;
  border: 1px dashed rgba(var(--mbx-v), .42);
  border-radius: 14px;
  background: rgba(var(--mbx-v), .07);
  align-items: stretch;
}
/* 未上传素材：去掉外框，视觉保持原来的「参考图片」独立格子 */
.mb-rail:not(.filled) {
  border-color: transparent;
  background: transparent;
  padding: 0;
}
/* 框内格子统一缩小，给输入区让宽度 */
.mb-rail .mb-ref,
.mb-rail .mb-ref-add { width: 62px; height: 62px; }
.mb-rail:not(.filled) .mb-ref-add { width: 76px; height: 76px; }
/* 有素材后加号块收紧，但保留图标与类型标签（上传前后都能看出这一格收什么素材） */
.mb-rail.filled .mb-ref-add { padding: 0; }
.mb-rail.filled .mb-ref-ic,
.mb-rail.filled .mb-ref-label { display: flex; }
.mb-rail.filled .mb-ref-label { font-size: 9.5px; }
.mb-rail.filled .mb-ref-plus { width: 24px; height: 24px; font-size: 15px; }
.mb-rail .mb-ref-del { top: 2px; right: 2px; }
@media (max-width: 560px) {
  .mb-rail { min-width: 80px; max-width: 58%; padding: 4px; gap: 5px; border-radius: 12px; }
  .mb-rail .mb-ref,
  .mb-rail .mb-ref-add { width: 52px; height: 52px; }
  .mb-rail:not(.filled) .mb-ref-add { width: 62px; height: 62px; }
}

/* ===== 20261120r2: 素材叠放在 + 号上（不并列占宽），悬停小弹窗 / 点击大图 ===== */
.mb-stack { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.mb-stack-t {
  position: absolute;
  right: calc(4px + var(--i, 0) * 9px);
  bottom: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  background: #262a33;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .12s ease, border-color .12s ease;
}
.mb-stack-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-stack-t span {
  font-size: 12px; color: #dcd7ff; line-height: 1;
  display: grid; place-items: center; height: 100%;
}
.mb-stack-t:hover { transform: translateY(-2px) scale(1.15); z-index: 3; border-color: rgba(var(--mbx-v), .85); }
.mb-stack-n {
  position: absolute;
  left: 3px;
  bottom: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(var(--mbx-v), .92);
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
  font-weight: 600;
  pointer-events: none;
}
/* 有素材时 + 号保持原位：类型标签常驻底部，缩略图叠在左上角（见下方最终覆盖） */
.mb-rail.filled .mb-ref-plus { margin-top: 0; }
/* 叠放素材盖住右下角，原删除按钮样式不再使用 */
.mb-rail .mb-ref-del { display: none; }

/* 悬停小弹窗：fixed 挂 body，避开上传框 overflow 裁剪 */
.mb-minipop {
  position: fixed;
  z-index: 99999;
  transform: translate(-50%, -100%);
  display: flex;
  gap: 6px;
  padding: 7px;
  background: #1c1f24;
  border: 1px solid #3a3d45;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
}
.mb-minipop.on { opacity: 1; visibility: visible; pointer-events: auto; }
.mb-mini-cell {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #43464f;
  cursor: pointer;
  background: #262a33;
  padding: 0;
}
.mb-mini-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-mini-cell:hover { border-color: rgba(var(--mbx-v), .8); }
.mb-mini-tag { font-size: 22px; color: #dcd7ff; display: grid; place-items: center; height: 100%; }
.mb-mini-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.mb-mini-del:hover { background: #e5484d; }
html[data-theme="light"] .mb-minipop { background: #fff; border-color: #d8dbe2; box-shadow: 0 10px 28px rgba(20, 24, 32, .18); }
html[data-theme="light"] .mb-mini-cell { border-color: #cfd3db; background: #f2f3f6; }
html[data-theme="light"] .mb-mini-tag { color: #6b64a8; }
/* r16：素材信息卡——类型标题 + 缩略图 + 文件名/大小 + 替换/移除 */
.mb-minipop { flex-direction: column; gap: 8px; min-width: 190px; max-width: 260px; }
.mb-mini-head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  color: #cfc9ff; padding: 0 2px 2px;
}
html[data-theme="light"] .mb-mini-head { color: #6b64a8; }
.mb-mini-cell {
  width: 100%; height: auto; min-height: 60px;
  display: grid; grid-template-columns: 56px 1fr; gap: 9px;
  padding: 7px; cursor: default; align-items: center;
}
.mb-mini-thumb {
  width: 56px; height: 56px; border-radius: 7px; overflow: hidden;
  background: #262a33; border: 1px solid #43464f; cursor: pointer; flex: 0 0 auto;
}
.mb-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-mini-info { min-width: 0; }
.mb-mini-name {
  font-size: 11.5px; color: #eceaf5; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.mb-mini-size { font-size: 10.5px; color: #8b8f9c; margin-top: 3px; }
.mb-mini-ops { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 2px; }
.mb-mini-op {
  flex: 1 1 auto; height: 24px; border-radius: 6px; cursor: pointer;
  border: 1px solid #43464f; background: rgba(255,255,255,.04);
  color: #cfd3dc; font-size: 10.5px; font-weight: 600; padding: 0;
}
.mb-mini-op:hover { border-color: rgba(var(--mbx-v), .8); color: #fff; }
.mb-mini-op.danger:hover { border-color: #e5484d; background: #e5484d; color: #fff; }
html[data-theme="light"] .mb-mini-thumb { background: #f2f3f6; border-color: #cfd3db; }
html[data-theme="light"] .mb-mini-name { color: #2a2d35; }
html[data-theme="light"] .mb-mini-size { color: #7a7f8c; }
html[data-theme="light"] .mb-mini-op { border-color: #cfd3db; color: #4a4e58; background: #fafbfc; }

/* ===== 20261120r3: 布局重排 =====
   1) 上传窗口恒定尺寸：空/有素材完全一样大，不再放大或缩放
   2) 继续上传点击区=整块 76px 加号块，叠放素材缩小贴角少挡点击
   3) 资产库移到上传框正下方（左列竖排）
   4) AI 优化固定在输入框右上角（右列顶部，语音/发送贴底）
   5) 输入框加高，紧跟上传窗口 */
.mb-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 auto;
}
.mb-left .mb-quick { flex-direction: column; gap: 0; }
.mb-left .mb-quick-btn { width: 100%; justify-content: center; }

/* 上传窗口恒定：任何状态下都是 76px 加号块 + 虚线框 */
.mb-rail,
.mb-rail.filled,
.mb-rail:not(.filled) {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  padding: 5px;
  border: 1px dashed rgba(var(--mbx-v), .42);
  background: rgba(var(--mbx-v), .07);
}
.mb-rail .mb-ref-add {
  width: 76px;
  height: 76px;
  padding: 0 0 14px;
  cursor: pointer;
}
/* 有素材后仍保留图标 + 类型标签，只把加号缩小；整块都是上传点击区（追加） */
.mb-rail.filled .mb-ref-plus { width: 26px; height: 26px; font-size: 15px; }
/* 已上传素材叠放：缩略图贴左上角，避开中部的加号与底部的类型标签；
   每个缩略图可点开预览、悬停出「文件名 / 大小 / 替换 / 移除」小窗 */
.mb-stack-t {
  width: 17px;
  height: 17px;
  left: calc(3px + var(--i, 0) * 6px);
  right: auto;
  top: 3px;
  bottom: auto;
  border-radius: 5px;
}
.mb-stack-t img { width: 100%; height: 100%; }
.mb-stack-t span { font-size: 10px; }
.mb-stack-n {
  min-width: 14px; height: 14px; line-height: 14px; font-size: 9px;
  right: 3px; left: auto; top: 3px; bottom: auto;
}
/* 加号在 filled 态不再上移（标签要在底部占住原位） */
.mb-rail.filled .mb-ref-plus { margin-top: 0; }

/* 右列：AI 优化贴顶（输入框右上角），语音 / 发送贴底 */
.mb-compose-side { justify-content: space-between; }

/* 输入框加高、紧跟上传窗口 */
.mb-compose { gap: 8px; }
.mb-compose-main .mb-input { min-height: 150px; }
@media (max-width: 560px) {
  .mb-rail .mb-ref-add { width: 62px; height: 62px; padding: 0 0 10px; }
  .mb-left .mb-quick-btn { height: 24px; font-size: 11px; }
}

/* ===== 20261120r4: 右列三按钮等大竖排 + 上传按类型过滤 =====
   1) AI 优化改为圆形按钮（星图标 + AI，橙色渐变），和语音/发送同尺寸
   2) 三个按钮 34×34，上中下均匀分布在输入框右侧一列
   3) 语音按钮 30→34px
   4) 输入框与按钮列间距收紧到 6px，输入区加宽 */
.mb-compose-side { align-items: stretch; justify-content: center; min-height: 0; }
.mb-tools {
  height: 100%;
  justify-content: space-between;
  gap: 0;
  padding: 2px 0;
}
.mb-tool { width: 34px; height: 34px; }
.mb-tool svg { width: 17px; height: 17px; }
.mb-tool-ai .mb-tool-ai-t {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
/* 发送按钮同步 34px（原值已是 34，这里显式声明防止后续覆盖） */
.mb-send { width: 34px; height: 34px; }

/* 输入框紧挨按钮列 */
.mb-compose { gap: 6px; }
@media (max-width: 560px) {
  .mb-tools { flex-direction: row; justify-content: flex-end; gap: 8px; height: auto; }
  .mb-tool, .mb-send { width: 32px; height: 32px; }
}

/* ===== 20261120r5: 三按钮聚拢贴底 =====
   发送按钮位置不变（贴底），AI / 语音下移，上下间距缩小为 8px */
.mb-tools {
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
 * ===== 20261120r6: 一比一复刻 lanmao.my 任务对话页 =====
 * 以下参数全部来自参考站真实抓取（computed style）：
 *   分割线  黄 rgba(255,220,130,.6) 13px / 600，两侧虚线，上 37 下 19 边距
 *   任务卡  透明平铺块，卡间只留间距、无虚线分隔；列宽 70rem（1050px）
 *   参数胶囊 白5%底 + 白8%描边，999 圆，高 22px，字号 10.3px
 *   操作钮  深灰 rgba(30,31,37,.8) 无描边，6px 圆角，11.25px 字号
 *   时间戳  10.3px 白 30%，贴按钮行最右，完整「年-月-日 时:分:秒」
 *   结果图  190px 宽、原始比例、10px 圆角（不裁方）
 *   浮钮    45px 正圆，深底 + 青色键盘图标，两个并排居中在底部
 * ============================================================ */
.mb-inner { max-width: 1050px; }

/* —— 任务卡：透明平铺，卡与卡之间只有间距 —— */
.mb-task { padding: 14px 0 24px; border-bottom: 0; }
.mb-task:last-child { border-bottom: 0; }
.mb-task-head { gap: 12px; }

/* 参考素材小图：贴提示词左侧，白描边小方块 */
.mb-task-refs { display: flex; gap: 6px; flex: 0 0 auto; }
.mb-task-ref {
  width: 44px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.mb-task-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-theme="light"] .mb-task-ref {
  border-color: rgba(30, 40, 60, .25);
  box-shadow: 0 4px 12px rgba(30, 40, 60, .15);
}

/* 提示词：13px 常规字重，多行原文折行；长文三行截断 + 展开/收起 */
.mb-task-col { flex: 1 1 auto; min-width: 0; }
.mb-task-prompt {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  white-space: pre-line;
  color: var(--ink);
}
.mb-task-prompt.is-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mb-task-more {
  display: inline-block;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4cc2ff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}
.mb-task-more:hover { text-decoration: underline; }

/* 参数胶囊行：白 5% 底圆胶囊 */
.mb-task-metas { gap: 5px; margin-top: 8px; }
.mb-meta {
  height: 22px;
  padding: 0 9px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .78);
}
.mb-meta-k { opacity: 1; color: rgba(255, 255, 255, .45); }
html[data-theme="light"] .mb-meta {
  border-color: rgba(28, 38, 58, .12);
  background: rgba(28, 38, 58, .05);
  color: rgba(28, 38, 58, .8);
}
html[data-theme="light"] .mb-meta-k { color: rgba(28, 38, 58, .45); }

/* 结果图：190px 宽原比例圆角，不再裁成正方形 */
.mb-media {
  width: 190px;
  height: auto;
  aspect-ratio: auto;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
}

/* 免责声明 / 底部操作行 */
.mb-task-cap { margin-top: 7px; font-size: 10.5px; }
.mb-task-foot { margin-top: 11px; gap: 7px; }
.mb-task-ops { gap: 7px; }
.mb-task-foot .mb-btn.small {
  border: 0;
  background: rgba(30, 31, 37, .8);
  color: rgba(255, 255, 255, .72);
  font-size: 11.5px;
  padding: 8px 11px;
  border-radius: 6px;
}
.mb-task-foot .mb-btn.small:hover {
  border-color: transparent;
  background: rgba(46, 48, 56, .92);
  color: #fff;
}
.mb-task-foot .mb-btn.small.ghost {
  border-color: transparent;
  background: rgba(30, 31, 37, .8);
  color: rgba(255, 255, 255, .72);
}
.mb-task-foot .mb-btn.small.ghost:hover {
  border-color: transparent;
  background: rgba(46, 48, 56, .92);
  color: #fff;
}
.mb-task-time { font-size: 10.5px; color: rgba(255, 255, 255, .3); }
html[data-theme="light"] .mb-task-time { color: rgba(28, 38, 58, .4); }

/* —— 按天切割线：黄色标签 + 两侧虚线，间距放大 —— */
.mb-day { gap: 16px; margin: 26px 0 12px; }
.mb-day-line { border-top: 1px dashed rgba(255, 220, 130, .28); }
.mb-day-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 220, 130, .6);
}
html[data-theme="light"] .mb-day-line { border-top-color: rgba(190, 145, 55, .4); }
html[data-theme="light"] .mb-day-label { color: rgba(176, 132, 40, .95); }

/* —— 收起输入坞后的浮动钮：45px 正圆，深底青图标，两个并排居中 —— */
.mb-dock-mini,
.mb-dock-jump {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid #1e1f25;
  background: rgba(27, 28, 33, .95);
  color: rgb(0, 202, 224);
  box-shadow: 0 6px 15px rgba(0, 0, 0, .28), 0 0 5px rgba(0, 202, 224, .18);
}
.mb-dock-mini { left: 50%; bottom: 16px; margin-left: -49px; }
.mb-dock-jump { left: 50%; bottom: 16px; margin-left: 4px; }
.mb-dock-mini:hover,
.mb-dock-jump:hover {
  color: rgb(0, 224, 250);
  border-color: #2a2c34;
  background: rgba(36, 38, 45, .98);
}
.mb-dock-mini svg,
.mb-dock-jump svg { width: 20px; height: 20px; }

/* ===== 20261120r8: 输入坞弹出/收起动画 =====
   弹出时放大浮现、收起时缩小收起：
   - 外层 .mb-dock-wrap 用 grid 0fr↔1fr 过渡，高度平滑收放（收起时全让给任务流）
   - 内层输入卡 transform 缩放 + 透明度，transform-origin 压在底部中心 */
.mb-dock-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .32s cubic-bezier(.4, 0, .2, 1);
}
.mb.is-dock-min .mb-dock-wrap { grid-template-rows: 0fr; }
.mb-dock-wrap > .mb-dock { min-height: 0; }
.mb.is-dock-min .mb-dock-wrap > .mb-dock { overflow: hidden; }
/* 覆盖旧版 display:none —— display 不参与过渡，置为 block 才有动画 */
.mb.is-dock-min .mb-dock { display: block; }
/* dock 自带的 14px 底部内边距跟着一起收掉，否则收起后脚下留一条白边 */
.mb-dock { transition: padding-bottom .32s cubic-bezier(.4, 0, .2, 1); }
.mb.is-dock-min .mb-dock { padding-bottom: 0; }

.mb-dock-card {
  transform-origin: 50% 100%;
  transition: transform .32s cubic-bezier(.3, 1.25, .45, 1), opacity .26s ease;
}
.mb.is-dock-min .mb-dock-card {
  transform: scale(.55) translateY(36%);
  opacity: 0;
}

/* ===== r15：语言模型上传（图片/文档）+ 参数区压扁 ===== */
/* 积分徽标与「恢复默认参数」已并排到第一行右侧，整体高度收紧 */
.mb-params { gap: 6px; margin: 0 0 9px; }
.mb-params-row { min-height: 26px; }
.mb-params-right .mb-reset-extra { margin-left: 2px; }
/* 语言模型的参数行只剩右侧按钮组，横向排开不留大片空白 */
.mb-kind-chat .mb-params-row1 { min-height: 30px; }
/* 参考素材叠放角标：文档用「文」字徽标 */
.mb-stack-doc {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 11px; font-weight: 700;
  color: var(--accent, #f97316);
  background: rgba(249, 115, 22, .12);
  border-radius: inherit;
}

/* 语言模型「按token计费」胶囊：深灰底 + 灰字 + ⓘ，区别于其它模型的积分预估徽标 */
.mb-cost-badge.mb-cost-token {
  background: rgba(125, 138, 160, .16);
  border-color: rgba(140, 152, 172, .22);
  color: #9aa3b2;
  font-weight: 500;
}
.mb-cost-badge.mb-cost-token svg { width: 13px; height: 13px; color: #929bab; }

/* ============ 音色入口工具条（语音合成/克隆，对照参考站） ============ */
.mb-voice-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 9px; }
.mb-voice-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--line, #31343c); background: var(--panel-soft, rgba(255,255,255,.04));
  color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.mb-voice-btn:hover { border-color: var(--accent, #7c3aed); background: var(--accent-soft, rgba(124,58,237,.14)); }
.mb-voice-btn svg { width: 15px; height: 15px; color: var(--muted); }
.mb-voice-pick { border-color: rgba(124,58,237,.45); }
.mb-voice-pick-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-voice-badge {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: #7c3aed; color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}
.mb-voice-badge[hidden] { display: none; }

/* ============ 音色选择弹层 ============ */
.mb-voice-modal-root {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(12, 16, 20, .55); backdrop-filter: blur(4px);
}
.mb-voice-modal {
  width: min(640px, 100%); max-height: min(82vh, 720px); display: flex; flex-direction: column;
  background: var(--panel, #1b1d22); border: 1px solid var(--line, #31343c);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.42); overflow: hidden;
}
.mb-voice-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.mb-voice-modal-headtxt { flex: 1; min-width: 0; }
.mb-voice-modal-title { font-size: 17px; font-weight: 750; color: var(--ink); }
.mb-voice-modal-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mb-voice-modal-close {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 15px;
}
.mb-voice-modal-close:hover { background: var(--accent-soft, rgba(124,58,237,.14)); color: var(--ink); }
.mb-voice-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 10px; }
.mb-voice-filter {
  height: 27px; padding: 0 11px; border-radius: 8px; cursor: pointer; font-size: 12px;
  border: 1px solid var(--line, #31343c); background: transparent; color: var(--muted);
}
.mb-voice-filter:hover { color: var(--ink); border-color: var(--muted); }
.mb-voice-filter.is-on { background: #7c3aed; border-color: #7c3aed; color: #fff; font-weight: 600; }
.mb-voice-modal-body { flex: 1 1 auto; overflow: auto; padding: 4px 20px 12px; }
.mb-voice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mb-voice-card {
  position: relative; border-radius: 11px;
  border: 1px solid var(--line, #31343c); background: var(--panel-soft, rgba(255,255,255,.03)); color: var(--ink);
  transition: border-color .14s, background .14s;
}
.mb-voice-card:hover { border-color: var(--accent, #7c3aed); }
.mb-voice-card.is-picked { border-color: #7c3aed; background: rgba(124,58,237,.16); }
.mb-voice-card-hit {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 34px 10px 11px; border: 0; background: transparent; color: inherit;
}
.mb-voice-card-del {
  position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; display: grid; place-items: center;
  border: 0; border-radius: 6px; cursor: pointer; background: transparent; color: var(--muted); font-size: 11px;
}
.mb-voice-card-del:hover { background: rgba(220, 60, 60, .16); color: #e05050; }
.mb-voice-card-top { display: flex; align-items: center; gap: 8px; }
.mb-voice-av {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4c2fa6); color: #fff; font-size: 13px; font-weight: 700;
}
.mb-voice-card-name { font-size: 13px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-voice-card-gender { font-size: 11px; color: var(--muted); }
.mb-voice-card-desc { margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.mb-voice-empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; color: var(--muted); }
.mb-voice-empty-ic { font-size: 34px; opacity: .6; margin-bottom: 8px; }
.mb-voice-empty-tip { font-size: 12px; margin-top: 6px; line-height: 1.6; }
.mb-voice-modal-foot {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  border-top: 1px solid var(--line, #31343c);
}
.mb-voice-selected { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.mb-voice-selected-val { color: var(--ink); font-weight: 650; }
.mb-voice-new, .mb-voice-ok {
  height: 33px; padding: 0 15px; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 650;
  display: inline-flex; align-items: center; gap: 5px;
}
.mb-voice-new { border: 1px solid var(--line, #31343c); background: transparent; color: var(--ink); }
.mb-voice-new svg { width: 14px; height: 14px; }
.mb-voice-new:hover { border-color: var(--accent, #7c3aed); }
.mb-voice-ok { border: 0; background: #7c3aed; color: #fff; }
.mb-voice-ok:hover { background: #6d2fd6; }
html[data-theme="light"] .mb-voice-modal { background: #fff; }
html[data-theme="light"] .mb-voice-btn,
html[data-theme="light"] .mb-voice-card { background: #f7f8fa; }
@media (max-width: 640px) {
  .mb-voice-grid { grid-template-columns: 1fr; }
  .mb-voice-modal { max-height: 90vh; }
}

/* 参考素材识别模型胶囊（悬停素材框时出现） */
.mb-mini-ai { display: flex; justify-content: center; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); }
.mb-mini-tags {
  display: block; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9.5px; color: var(--muted); text-align: center;
}

/* ==================== r16 / 2026-11-22：模型栏统一修正 ====================
   1) 计费单位由 billing.mode 驱动；token 胶囊灰底（.mb-cost-token，上方已定义）
   2) 计费胶囊下移到参数区最后一行，与「恢复默认参数」同一行
   3) 压缩输入框上方的空白（hero / intro / 参数区间距）
   4) 上传槽上传前后都保留类型标签，信息卡显示文件名/大小/替换/移除
   ==================================================================== */
/* 计费胶囊 + 恢复默认按钮同一行：左按钮、右计费 */
.mb-params-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}
.mb-foot-right { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.mb-foot-right .mb-cost-badge { margin: 0; }
/* 第一行右侧现在只剩（隐藏的）恢复原文按钮：没有内容时不要留空白占位 */
.mb-params-right:empty { display: none; }
.mb-params-row1:has(.mb-params-right:empty) { min-height: 0; }

/* 缩小输入框上方空白：介绍卡与 hero 收紧，参数区贴紧输入卡 */
.mb-intro { margin: 8px auto 4px; padding: 11px 16px; }
.mb-hero { padding: 0 0 4px; }
.mb-logo { width: 52px; height: 52px; margin-bottom: 8px; border-radius: 18px; }
.mb-params { margin: 0 0 6px; }
.mb-dock-card { padding-top: 10px; }

/* token 胶囊文字可能较长，允许在窄屏换行/省略 */
.mb-cost-badge.mb-cost-token { max-width: 100%; }
.mb-cost-badge.mb-cost-token .mb-cost { overflow: hidden; text-overflow: ellipsis; }

/* 上传槽：filled 态保留标签（若前面规则被覆盖，这里再兜一次底） */
.mb-rail.filled .mb-ref-ic { display: flex !important; }
.mb-rail.filled .mb-ref-label { display: block !important; font-size: 9.5px; }

/* ===== r19: 视频输入模式胶囊（首尾帧 / 参考生）=====
   只有 model-caps 声明 affectsSlots 且有两种以上输入方式的视频模型才出这排胶囊。
   位置钉在输入卡左上角、上传窗口正上方；宽度对齐 76px 上传框，选项多了自动换行。 */
.mb-vmode {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 88px;
  padding: 0 0 2px;
}
.mb-vmode-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 10.5px;
  line-height: 1.35;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.mb-vmode-btn:hover { color: var(--ink); border-color: var(--muted); }
.mb-vmode-btn.on {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
html[data-theme="light"] .mb-vmode-btn.on { color: #fff; }

/* ===== r20 / 2026-11-22：参数区整体下移 + 恢复默认并到胶囊行 =====
   1) 参数条从卡片顶部移到输入卡下方：语言模型原来第一行没有主参数，
      卡片顶部就留出一条纯空白，现在这条空白直接消失
   2) 「恢复默认参数」不再单独占一行，和计费胶囊一起贴在有胶囊的那一行右侧
   3) 时长/清晰度的档位数量逐模型不同（1~30 秒、480P~4K），右组允许换行不撑破卡片 */
.mb-dock-card { padding: 10px 14px 10px; }
.mb-params { margin: 8px 0 0; gap: 6px; }
/* 没有主参数时第一行整行收起（JS 也会置 hidden，这里兜底） */
.mb-params-row1:not(:has(.mb-params-chips > .mb-chip)):not(:has(.mb-params-right > *)) { display: none; }
.mb-params-row:empty { display: none; }
.mb-params-right {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}
.mb-params-right > * { flex: 0 0 auto; }
.mb-params-right .mb-reset-extra { height: 26px; }
.mb-params-right .mb-cost-badge { margin: 0; }
/* 参数条在卡片底部：菜单向上弹（下面空间不够时由 JS 打上 .is-up） */
.mb-chip-menu.is-up { top: auto; bottom: calc(100% + 6px); }

/* ===== r21 / 2026-11-22：文本型参数（脚本名 / 脚本正文 / 风格描述 / 歌词 / 自定义尺寸）=====
   这类参数没有可选枚举，做成「一枚胶囊 + 点开浮层填写」：
   收起时只显示参数名与一句话摘要，不占输入卡高度；必填未填时描红边。 */
.mb-chip-text { cursor: pointer; }
.mb-chip-text .mb-chip-k::after { content: ''; }
.mb-chip-text .mb-chip-val {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mb-chip-text.is-req { border-color: #d2504b !important; }
.mb-chip-text.is-req .mb-chip-val { color: #e0685f !important; }
.mb-chip-text.is-open { border-color: var(--accent); }

.mb-chip-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  width: 320px;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #3a3d45;
  border-radius: 10px;
  background: #1c1f24;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  cursor: default;
}
.mb-chip-pop[hidden] { display: none; }
/* 参数条贴着输入卡底部：下面放不开就向上弹，别被视口切掉 */
.mb-chip-pop.is-up { top: auto; bottom: calc(100% + 6px); }
.mb-pop-hint { margin: 0 0 6px; color: #9aa0aa; font-size: 11px; line-height: 1.5; }
.mb-pop-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #3a3d45;
  border-radius: 8px;
  background: #14161a;
  color: #e8eaed;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}
.mb-pop-input:focus { border-color: #6f5bd6; }
.mb-pop-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.mb-pop-count { flex: 1 1 auto; color: #8b909a; font-size: 11px; }
.mb-pop-btn {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #3a3d45;
  border-radius: 7px;
  background: transparent;
  color: #c8ccd4;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.mb-pop-btn:hover { border-color: #6f5bd6; color: #fff; }
.mb-pop-btn.is-main { border-color: #6f5bd6; background: #6f5bd6; color: #fff; }
html[data-theme="light"] .mb-chip-pop { background: #fff; border-color: #d8dbe2; box-shadow: 0 14px 34px rgba(20, 24, 32, .18); }
html[data-theme="light"] .mb-pop-hint { color: #6b7280; }
html[data-theme="light"] .mb-pop-input { background: #f7f8fa; border-color: #d8dbe2; color: #22252b; }
html[data-theme="light"] .mb-pop-count { color: #6b7280; }
html[data-theme="light"] .mb-pop-btn { border-color: #d8dbe2; color: #3c4149; }
html[data-theme="light"] .mb-pop-btn.is-main { border-color: #5a48c8; background: #5a48c8; color: #fff; }
@media (max-width: 720px) {
  .mb-chip-pop { width: min(88vw, 320px); }
}

/* ===== r22 / 2026-11-22：音色试听按钮 =====
   音色卡片右下角一个圆形播放键：预设音色播上游官方 demo，克隆音色播参考音频。
   播放中变成方块（停止），点另一个音色会自动切过去。 */
.mb-voice-grid .mb-voice-card-hit { padding-right: 40px; }
.mb-voice-play {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line, #31343c);
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #9aa0aa);
  cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.mb-voice-play::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 7px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.mb-voice-play:hover { border-color: #7c3aed; color: #a78bfa; }
.mb-voice-play.is-playing {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, .22);
  color: #c4b5fd;
}
.mb-voice-play.is-playing::before {
  width: 7px;
  height: 8px;
  margin-left: 0;
  border: 0;
  background: currentColor;
  border-radius: 1px;
}
/* 底部「已选音色」旁的试听入口 */
.mb-voice-listen {
  flex: none;
  height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line, #31343c);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.mb-voice-listen::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.mb-voice-listen:hover { border-color: #7c3aed; }
.mb-voice-listen.is-playing { border-color: #7c3aed; color: #a78bfa; }
.mb-voice-listen.is-playing::before {
  width: 6px;
  height: 7px;
  border: 0;
  background: currentColor;
  border-radius: 1px;
}
html[data-theme="light"] .mb-voice-play,
html[data-theme="light"] .mb-voice-listen { border-color: #d8dbe2; }

/* ============================================================
 * ===== 20261123full4: 大模型工作台「居中内容列」尺寸对齐参考站 =====
 * 参考截图实测（视口 1123px）：模型标识居中；介绍卡两侧各让 43% 左右
 *   → 卡宽 ≈ 43% 视口、正中；输入坞左右各留 ~7% 边距 → ≈ 86% 视口。
 * 之前的两个极端都不对：
 *   · 原始 max-width 1050px：宽屏下两侧各空 200~500px，滚动条悬空；
 *   · 上一版铺满 100%：介绍卡与输入框被拉成整屏，模型反而孤零零居中。
 * 现在统一成一条居中列：列宽 86%（保留两头边距），
 * 介绍卡取列的 50%（≈ 工作区 43%，与参考一致），消息流/输入坞跟列同宽。
 * 窄屏（<1024px）布局不变，仍走上面的移动端规则。
 * ============================================================ */
@media (min-width: 1024px) {
  .mb > .mb-inner { width: 86%; max-width: none; }
  /* 介绍卡：窄卡居中，别跟着列一起铺满 */
  .mb .mb-intro { max-width: 50%; margin-left: auto; margin-right: auto; }
  /* 消息流与输入坞同宽、左右内边距对称（滚动条落在列右缘，不再悬空） */
  .mb .mb-stream { padding-right: 20px; }
  .mb .mb-dock { padding-left: 20px; padding-right: 20px; }
  /* 对话气泡：列变宽后别把一条消息拉成一整行 */
  .mb .mb-msg-body { max-width: min(76%, 860px); }
}

/* 2026-11-25 暂未开放模型工作台提示：整块灰化 */
.mb-note.is-paused { color: var(--faint); }
.mb-note.is-paused .mb-note-t { color: var(--muted); }

/* 2026-11-25 token 合计结果：只显示输入/输出/合计 token，无金额 */
.mb-token-sum { margin: 2px 0 0 42px; color: var(--faint); font-size: 11px; line-height: 1.5; }

/* token 合计的规则说明：比合计更淡一行 */
.mb-token-rule { margin: 0 0 0 42px; color: var(--faint); font-size: 10px; line-height: 1.4; }
/* ============================================================
 * ===== 20261126edge1: 对话页滚动条贴到浏览器最右边缘 =====
 * 反馈：发送后滚动条长在「居中内容列」的右缘，落在卡片中部，
 *       不符合「在窗口右侧上下拖动」的习惯。
 * 做法：把滚动容器从内容列里解放出来
 *   1) 对话卡片铺到窗口右边界：去掉 content 右内边距、右边框与右圆角；
 *   2) 卡片内 .mb-inner 不再限宽，.mb-stream 吃满卡片整宽
 *      → 滚动条（挂在 .mb-stream 上）自然落到窗口右缘；
 *   3) 内容仍收在 1050 的居中列里（左右 padding 收回），视觉宽度不变；
 *   4) 页面本身不再产生第二条竖滚动条；
 *   5) 滚动条轨道透明、滑块细圆角，贴边不悬浮。
 * ============================================================ */
@media (min-width: 1024px) {
  /* 页面级不再滚动：只留对话流这一条竖条，避免右侧出现两条 */
  html:has(.main-col.mb-wide) { overflow: hidden; }
  /* shell 右侧那 8px 内边距会把滚动条从窗口边缘推开，对话页去掉 */
  html:has(.main-col.mb-wide) .shell { padding-right: 0 !important; }

  html[data-theme] .main-col.mb-wide > .content {
    padding-right: 0 !important;
    /* 底边也让出来：滚动条轨道才能真正「从右上角到右下角」 */
    padding-bottom: 0 !important;
  }

  html[data-theme] .main-col.mb-wide .mb {
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 22px 0 0 0;
  }

  /* 内容列不再自己限宽，交给下面的 padding 收 */
  html[data-theme] .main-col.mb-wide .mb > .mb-inner { width: 100%; max-width: none; }

  /* 滚动容器吃满卡片整宽（滚动条因此落在卡片最右缘）。
     左右各让 7% + 20px，把内容收回原来那条 86% 的居中列：
       左 = 7% + 20px
       右 = 7% + 10px（多让的 10px 正好是滚动条的宽度）
     scrollbar-gutter: stable 让这条 10px 一直在，内容不会随「出现/消失
     滚动条」左右跳，气泡右缘也始终和输入卡右缘对齐 */
  html[data-theme] .main-col.mb-wide .mb .mb-stream {
    scrollbar-gutter: stable;
    padding-left: calc(7% + 20px);
    padding-right: calc(7% + 10px);
  }

  /* 输入坞仍走原来那条 86% 居中列（卡片本身再内缩 20px，与消息列对齐） */
  html[data-theme] .main-col.mb-wide .mb .mb-dock-wrap {
    width: 86%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
  html[data-theme] .main-col.mb-wide .mb .mb-dock {
    width: auto;
    max-width: none;
    margin: 0;
  }

  /* 介绍卡仍居中窄卡 */
  html[data-theme] .main-col.mb-wide .mb .mb-intro { max-width: min(50%, 720px); }
}

/* 对话流的滚动条：细、圆、贴边，轨道全透明（参考站同款观感） */
.mb-stream { scrollbar-width: thin; }
html[data-theme] .mb-stream::-webkit-scrollbar { width: 10px; }
html[data-theme] .mb-stream::-webkit-scrollbar-track { background: transparent; }
html[data-theme] .mb-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
html[data-theme] .mb-stream::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .32);
  background-clip: padding-box;
}
html[data-theme="light"] .mb-stream::-webkit-scrollbar-thumb { background: rgba(24, 24, 27, .2); background-clip: padding-box; }
html[data-theme="light"] .mb-stream::-webkit-scrollbar-thumb:hover { background: rgba(24, 24, 27, .34); background-clip: padding-box; }

/* ---------- 消息操作条：复制 / 重新编辑 / 删除 ---------- */
.mb-msg-acts {
  flex: 0 0 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  /* 参考站：操作条平时很淡，鼠标进到这条消息里才实化 */
  opacity: .62;
  transition: opacity .16s ease;
}
.mb-msg:hover .mb-msg-acts,
.mb-msg.is-unsent .mb-msg-acts { opacity: 1; }
.mb-msg-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.mb-msg-act svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mb-msg-act:hover { color: var(--ink); background: var(--panel-soft, rgba(125, 145, 175, .12)); }
.mb-msg-act.is-danger:hover { color: #fff; background: rgba(239, 68, 68, .85); }
/* 助手气泡在左侧：操作条别贴到屏幕右端 */
.mb-msg-assistant .mb-msg-acts { justify-content: flex-start; }
html[data-theme="light"] .mb-msg-act { color: #71717a; }
html[data-theme="light"] .mb-msg-act:hover { color: #18181b; background: rgba(24, 24, 27, .06); }
html[data-theme="light"] .mb-msg-act.is-danger:hover { color: #fff; background: #dc2626; }

/* 没发出去的那条：气泡描一道红边，一眼看出「这条不算数」 */
.mb-msg.is-unsent .mb-msg-body { border-color: rgba(248, 113, 113, .5); }

/* ---------- 结果媒体：hover 浮出「下载 / 删除」 ---------- */
.mb-media-cell {
  position: relative;
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  max-width: 100%;
}
.mb-media-cell .mb-media { display: block; }
.mb-media-ops {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
.mb-media-cell:hover .mb-media-ops,
.mb-media-cell:focus-within .mb-media-ops { opacity: 1; transform: none; pointer-events: auto; }
/* 视频自带一条播放控件，浮层按钮挪到右上角，别压在进度条上 */
.mb-media-cell.is-video .mb-media-ops { top: 8px; bottom: auto; }
.mb-media-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(14, 15, 19, .74);
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s ease, color .15s ease;
}
.mb-media-btn svg { width: 15px; height: 15px; }
.mb-media-btn:hover { background: rgba(139, 92, 246, .92); color: #fff; }
.mb-media-btn.is-danger:hover { background: rgba(239, 68, 68, .92); }
html[data-theme="light"] .mb-media-btn { background: rgba(255, 255, 255, .92); color: #3f3f46; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
html[data-theme="light"] .mb-media-btn:hover { background: #8b5cf6; color: #fff; }
html[data-theme="light"] .mb-media-btn.is-danger:hover { background: #dc2626; }

/* 任务卡底部那个圆形下载钮 */
.mb-task-dl {
  width: 28px;
  height: 28px;
  margin-left: 1px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 31, 37, .8);
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease;
}
.mb-task-dl svg { width: 15px; height: 15px; }
.mb-task-dl:hover { background: rgba(139, 92, 246, .9); color: #fff; }
html[data-theme="light"] .mb-task-dl { background: rgba(24, 24, 27, .06); color: #52525b; }
html[data-theme="light"] .mb-task-dl:hover { background: #8b5cf6; color: #fff; }
