/* ============================================================
 * AI 帮写弹窗样式（三列专家工作台）
 * 主题：白色弹窗 + 橙色强调色（与全站 mb-tool-ai 同色系）
 * ============================================================ */
.bx-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 14, 22, .58);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bx-fade .18s ease;
}
@keyframes bx-fade { from { opacity: 0; } }

.bx-dialog {
  width: min(1260px, 94vw);
  height: min(750px, 92vh);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(10, 14, 22, .32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bx-pop .2s ease;
}
@keyframes bx-pop { from { transform: scale(.96); opacity: 0; } }

/* —— 头部 —— */
.bx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f0e7dd;
  flex: 0 0 auto;
}
.bx-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: #26221c; }
.bx-title-ai {
  width: 28px; height: 28px;
  border-radius: 9px;
  background: linear-gradient(145deg, #ff9f45, #f97316);
  color: #fff;
  font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(249, 115, 22, .3);
}
.bx-head-actions { display: flex; align-items: center; gap: 8px; }
.bx-close {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #6b645a;
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
}
.bx-close:hover { border-color: #d8d0c4; color: #26221c; }
.bx-close-kbd {
  font-family: inherit;
  font-size: 11px;
  background: #f6f2ec;
  border: 1px solid #e8e2d9;
  border-radius: 5px;
  padding: 1px 7px;
  color: #8a8177;
}

/* —— 三列 —— */
.bx-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 268px 1fr 460px;
  gap: 18px;
  padding: 16px 20px;
  min-height: 0;
}
.bx-col { display: flex; flex-direction: column; min-height: 0; }
.bx-col-sucai { flex: 0 0 268px; }
.bx-col-zhuanjia { flex: 1 1 auto; }
.bx-col-jieguo { flex: 0 0 460px; }
.bx-col-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-size: 13px; font-weight: 700; color: #6b645a;
}
.bx-step {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9f45, #f97316);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.bx-scq, .bx-zj, .bx-jgq {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ① 素材区 */
.bx-sucai {
  border: 1px solid #f0e7dd;
  border-radius: 14px;
  background: #fffdf9;
  padding: 12px;
}
.bx-sucai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bx-sucai-title { font-size: 13px; font-weight: 700; color: #26221c; }
.bx-sucai-mode {
  font-size: 10px; color: #b35c0e;
  background: rgba(249, 115, 22, .1);
  border-radius: 5px; padding: 1px 6px;
}
.bx-sucai-limit { margin-left: auto; font-size: 11px; color: #a39a8e; }
.bx-thumb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bx-thumb { position: relative; width: 56px; height: 56px; }
.bx-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid #f0e7dd; }
.bx-thumb-del {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 0;
  background: #26221c;
  color: #fff;
  font-size: 11px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.bx-add-tile {
  width: 100%;
  min-height: 96px;
  border: 1.5px dashed #e3b98c;
  border-radius: 12px;
  background: rgba(249, 115, 22, .04);
  color: #b35c0e;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font-family: inherit;
}
.bx-add-tile:hover { background: rgba(249, 115, 22, .09); }
.bx-add-plus { font-size: 24px; line-height: 1; }
.bx-add-t { font-size: 12px; }
.bx-empty-hint { margin-top: 8px; font-size: 12px; color: #a39a8e; text-align: center; }
.bx-idea {
  border: 1px solid #f0e7dd;
  border-radius: 14px;
  background: #fffdf9;
  padding: 12px;
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 180px;
}
.bx-idea-head { display: flex; align-items: center; margin-bottom: 8px; }
.bx-idea-title { font-size: 13px; font-weight: 700; color: #26221c; }
.bx-idea-count { margin-left: auto; font-size: 11px; color: #a39a8e; }
.bx-idea-ta {
  flex: 1 1 auto;
  border: 0; outline: none; resize: none;
  background: transparent;
  font: 13px/1.7 inherit;
  color: #26221c;
  min-height: 120px;
}
.bx-idea-ta::placeholder { color: #c9c0b4; }

/* ② 专家列表 */
.bx-search-in {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e8e2d9;
  border-radius: 11px;
  padding: 9px 14px;
  font: 13px inherit;
  color: #26221c;
  background: #fff;
  outline: none;
}
.bx-search-in:focus { border-color: #f0a25c; box-shadow: 0 0 0 3px rgba(249, 115, 22, .12); }
.bx-tabs { display: flex; align-items: center; gap: 10px; }
.bx-tab {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #6b645a;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.bx-tab.is-active { background: linear-gradient(145deg, #ff9f45, #f97316); border-color: transparent; color: #fff; font-weight: 600; }
.bx-tab-count { font-size: 11px; opacity: .85; }
.bx-new-expert {
  margin-left: auto;
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #6b645a;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.bx-new-expert:hover { border-color: #f0a25c; color: #b35c0e; }
.bx-recent { display: flex; align-items: center; gap: 10px; }
.bx-recent-label { font-size: 12px; color: #a39a8e; flex: 0 0 auto; }
.bx-recent-list { display: flex; gap: 7px; }
.bx-recent-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid #f0e7dd;
  background: linear-gradient(145deg, #4b4237, #2b251d);
  color: #ffd9b0;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.bx-recent-av.is-active { border-color: #f97316; }
.bx-recent-av img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.bx-group { margin-bottom: 4px; }
.bx-group-head { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; }
.bx-group-name { font-size: 13px; font-weight: 700; color: #26221c; }
.bx-group-count { font-size: 11px; color: #a39a8e; }
.bx-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.bx-card {
  border: 1.5px solid #f0e7dd;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.bx-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 14, 22, .08); }
.bx-card.is-picked { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, .14); }
.bx-cover {
  height: 96px;
  background: linear-gradient(135deg, #ffe3c2, #ffb066);
  display: grid; place-items: center;
  position: relative;
}
.bx-cover.noimg { background: linear-gradient(135deg, #f6ede2, #ffdfb8); }
.bx-cover img { width: 100%; height: 100%; object-fit: cover; }
/* 封面左下角的圆形专家头像（参考站同款） */
.bx-cover .bx-cover-av {
  position: absolute; left: 7px; bottom: 7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 4px rgba(10, 14, 22, .3);
}
.bx-cover-glyph { font-size: 26px; color: rgba(179, 92, 14, .5); }
.bx-check {
  position: absolute; top: 7px; left: 7px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 12px;
  display: none; place-items: center;
  box-shadow: 0 2px 6px rgba(249, 115, 22, .4);
}
.bx-card.is-picked .bx-check { display: grid; }
.bx-card-body { padding: 10px 12px 12px; }
.bx-card-name { font-size: 14px; font-weight: 700; color: #26221c; margin-bottom: 4px; }
.bx-card-desc {
  font-size: 12px; line-height: 1.55; color: #8a8177;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  min-height: 37px;
}
.bx-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.bx-tag {
  font-size: 10px; color: #b35c0e;
  background: rgba(249, 115, 22, .09);
  border-radius: 5px;
  padding: 2px 6px;
}
.bx-nocards { padding: 40px 0; text-align: center; color: #a39a8e; font-size: 13px; }
.bx-more { align-self: center; border: 0; background: none; color: #b35c0e; font-size: 13px; cursor: pointer; font-family: inherit; }

/* ③ 结果列 */
.bx-result-empty {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  text-align: center;
}
.bx-result-empty-ic {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffe3c2, #ffb066);
  color: #b35c0e;
  font-size: 26px;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.bx-result-empty-title { margin: 0; font-size: 14px; font-weight: 600; color: #5c554b; }
.bx-result-empty-hint { margin: 0; font-size: 12px; color: #a39a8e; }
.bx-result {
  border: 1px solid #f0e7dd;
  border-radius: 14px;
  background: #fffdf9;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.bx-result.is-err { border-color: #f3c6c6; background: #fff7f7; }
.bx-result-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bx-result-av {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1.5px solid rgba(249, 115, 22, .45);
}
.bx-result-ver {
  font-size: 11px; font-weight: 700;
  color: #b35c0e;
  background: rgba(249, 115, 22, .12);
  border-radius: 6px;
  padding: 2px 8px;
}
.bx-result-expert { font-size: 13px; font-weight: 700; color: #26221c; }
.bx-result-model { font-size: 11px; color: #a39a8e; }
.bx-result-status { margin-left: auto; font-size: 11px; color: #a39a8e; }
.bx-result-status.ok { color: #2e9e5b; }
.bx-result-text {
  font-size: 13px; line-height: 1.75;
  color: #3a342c;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid #f5efe6;
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 220px;
  overflow-y: auto;
}
.bx-result-text.is-err { color: #c04a4a; }
.bx-result-foot { display: flex; align-items: center; gap: 8px; }
.bx-result-tokens { font-size: 11px; color: #a39a8e; }
.bx-result-btn {
  margin-left: auto;
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #6b645a;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.bx-result-btn + .bx-result-btn { margin-left: 0; }
.bx-result-btn:hover { border-color: #f0a25c; color: #b35c0e; }
.bx-result-btn.use {
  background: linear-gradient(145deg, #ff9f45, #f97316);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* —— 底部栏 —— */
.bx-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #f0e7dd;
  background: #fffdf9;
}
.bx-sel {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #e8e2d9;
  background: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: inherit;
}
.bx-sel:hover { border-color: #f0a25c; }
.bx-sel-label { font-size: 12px; color: #a39a8e; }
.bx-sel-value { font-size: 13px; font-weight: 600; color: #26221c; }
.bx-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 340px;
  background: #fff;
  border: 1px solid #f0e7dd;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(10, 14, 22, .14);
  padding: 6px;
  z-index: 20;
  max-height: 300px;
  overflow-y: auto;
}
.bx-menu-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
}
.bx-menu-item:hover { background: #fff3e6; }
.bx-menu-item.is-active { background: rgba(249, 115, 22, .12); }
.bx-menu-name { font-size: 13px; font-weight: 600; color: #26221c; }
.bx-menu-sub { font-size: 11px; color: #a39a8e; }
.bx-foot-spacer { flex: 1 1 auto; }
.bx-reason { font-size: 12px; color: #a39a8e; }
.bx-reason.is-warn { color: #c04a4a; font-weight: 600; }
.bx-cancel {
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #6b645a;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.bx-cancel:hover { border-color: #d8d0c4; color: #26221c; }
.bx-start {
  display: flex; align-items: center; gap: 7px;
  border: 0;
  background: linear-gradient(145deg, #ff9f45, #f97316);
  color: #fff;
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(249, 115, 22, .3);
}
.bx-start:hover { filter: brightness(1.05); }
.bx-start.is-busy { opacity: .7; pointer-events: none; }
.bx-start-ic { font-size: 12px; }

/* —— 新建专家 —— */
.bx-sub { z-index: 9100; }
.bx-newbox {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 24px 64px rgba(10, 14, 22, .32);
}
.bx-newbox-t { font-size: 16px; font-weight: 800; color: #26221c; margin-bottom: 4px; }
.bx-newbox-in {
  border: 1px solid #e8e2d9;
  border-radius: 10px;
  padding: 9px 12px;
  font: 13px inherit;
  color: #26221c;
  outline: none;
}
.bx-newbox-in:focus { border-color: #f0a25c; }
.bx-newbox-ta {
  border: 1px solid #e8e2d9;
  border-radius: 10px;
  padding: 9px 12px;
  font: 13px/1.6 inherit;
  color: #26221c;
  outline: none;
  min-height: 76px;
  resize: vertical;
}
.bx-newbox-ta:focus { border-color: #f0a25c; }
.bx-newbox-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* —— Toast —— */
.bx-toast {
  position: fixed;
  left: 50%; top: 24px;
  transform: translateX(-50%);
  background: #26221c;
  color: #fff;
  font-size: 13px;
  border-radius: 10px;
  padding: 9px 18px;
  z-index: 9500;
  box-shadow: 0 8px 24px rgba(10, 14, 22, .3);
  animation: bx-fade .2s ease;
}
.bx-toast.err { background: #c0392b; }

/* —— 暗色主题适配 —— */
html[data-theme="dark"] .bx-dialog { background: #23272f; }
html[data-theme="dark"] .bx-head { border-bottom-color: #323845; }
html[data-theme="dark"] .bx-title,
html[data-theme="dark"] .bx-sucai-title,
html[data-theme="dark"] .bx-idea-title,
html[data-theme="dark"] .bx-group-name,
html[data-theme="dark"] .bx-card-name,
html[data-theme="dark"] .bx-result-expert,
html[data-theme="dark"] .bx-sel-value,
html[data-theme="dark"] .bx-newbox-t,
html[data-theme="dark"] .bx-menu-name,
html[data-theme="dark"] .bx-idea-ta,
html[data-theme="dark"] .bx-newbox-in,
html[data-theme="dark"] .bx-newbox-ta,
html[data-theme="dark"] .bx-result-text { color: #e8e4dd; }
html[data-theme="dark"] .bx-close,
html[data-theme="dark"] .bx-tab,
html[data-theme="dark"] .bx-new-expert,
html[data-theme="dark"] .bx-cancel,
html[data-theme="dark"] .bx-result-btn,
html[data-theme="dark"] .bx-sel { background: #2b313c; border-color: #3a4150; color: #c9c3ba; }
html[data-theme="dark"] .bx-close-kbd { background: #323845; border-color: #3a4150; color: #9aa3b2; }
html[data-theme="dark"] .bx-sucai,
html[data-theme="dark"] .bx-idea,
html[data-theme="dark"] .bx-result,
html[data-theme="dark"] .bx-card { background: #282e38; border-color: #3a4150; }
html[data-theme="dark"] .bx-card-desc,
html[data-theme="dark"] .bx-result-text { color: #c9c3ba; }
html[data-theme="dark"] .bx-result-text { background: #23272f; border-color: #3a4150; }
html[data-theme="dark"] .bx-foot { background: #23272f; border-top-color: #323845; }
html[data-theme="dark"] .bx-search-in { background: #2b313c; border-color: #3a4150; color: #e8e4dd; }
html[data-theme="dark"] .bx-menu { background: #2b313c; border-color: #3a4150; }
html[data-theme="dark"] .bx-cover.noimg { background: linear-gradient(135deg, #3a4150, #4d4436); }
html[data-theme="dark"] .bx-cover-glyph { color: rgba(255, 169, 92, .55); }

/* —— 移动端 —— */
@media (max-width: 980px) {
  .bx-body { grid-template-columns: 1fr; overflow-y: auto; }
  .bx-col-sucai, .bx-col-jieguo { flex: 1 1 auto; }
  .bx-cards { grid-template-columns: repeat(2, 1fr); }
  .bx-foot { flex-wrap: wrap; }
  .bx-foot-spacer { display: none; }
}

/* ===== r14：视频模型帮写——视频时长 + 运镜（与参考站 ?menu=shipin 同款） ===== */
.bx-vid-sec {
  border: 1px solid #f0e7dd;
  border-radius: 14px;
  background: #fffdf9;
  padding: 12px;
  flex: 0 0 auto;
}
.bx-vid-title { font-size: 13px; font-weight: 700; color: #26221c; }
.bx-dur-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.bx-dur-pill {
  min-width: 34px; height: 28px; padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #eadfd2;
  background: #fff;
  font-size: 12px; font-weight: 600; color: #6b6257;
  cursor: pointer;
  transition: all .15s ease;
}
.bx-dur-pill:hover { border-color: #f3b878; color: #d96a10; }
.bx-dur-pill.is-active {
  background: linear-gradient(145deg, #ff9f45, #f97316);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(249, 115, 22, .28);
}
.bx-cam-row { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.bx-cam-cb {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 2px 0 0;
  border-radius: 5px;
  border: 1.5px solid #d8cbbd;
  background: #fff;
  cursor: pointer; flex: 0 0 auto;
  position: relative;
  transition: all .15s ease;
}
.bx-cam-cb:checked { background: linear-gradient(145deg, #ff9f45, #f97316); border-color: transparent; }
.bx-cam-cb:checked::after {
  content: '';
  position: absolute; left: 4.5px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.bx-cam-tx { min-width: 0; }
.bx-cam-t1 { font-size: 12.5px; font-weight: 700; color: #26221c; }
.bx-cam-t2 { font-size: 11px; line-height: 1.6; color: #a39a8e; margin-top: 2px; }
html[data-theme="dark"] .bx-vid-sec { background: #282e38; border-color: #3a4150; }
html[data-theme="dark"] .bx-vid-title { color: #e8e4dd; }
html[data-theme="dark"] .bx-dur-pill { background: #2b313c; border-color: #3a4150; color: #c9c3ba; }
html[data-theme="dark"] .bx-dur-pill:hover { border-color: #f3b878; color: #ffb066; }
html[data-theme="dark"] .bx-cam-t1 { color: #e8e4dd; }
html[data-theme="dark"] .bx-cam-cb { background: #2b313c; border-color: #4a5262; }
