/* create.css — 创作页（index.html #tab-image）视觉层。
   选择器一律以 #tab-image 开头；mobile.html 无此节点，加载本文件不影响其它页面。

   口径：
   1) 参数 chips 整行换行，全部可见可点，不做横向滚动（高 40px）。
   2) 选项浅底 + 选中淡紫 tint / 品牌描边；主操作按钮沿用 tokens.css 的 --action 深色三态。
   3) 参数栏单列整行、随页面自然滚动；只有「立即生成」条 sticky 钉底。 */

#tab-image {
  --cs-ink: #1c2430;
  --cs-text: #3c4452;
  --cs-muted: #98a2b3;
  --cs-muted-2: #8b95a5;
  --cs-line: #eceff3;
  --cs-input-line: #d6dfe9;
  --cs-chip: #f4f6f8;
  --cs-chip-hover: #eceff3;
  --cs-shadow: 0 10px 30px rgba(22, 28, 45, .05);

  min-width: 0;
  /* clip 而非 hidden：不产生滚动容器，sticky 钉底才成立 */
  overflow-x: clip;
}

/* ---------- 标题 ---------- */
#tab-image > h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cs-ink);
}

/* ---------- 功能 tab 栏（7 项，白底卡片） ---------- */
#tab-image .subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 28, 45, .04);
  overflow: visible;
}
#tab-image .subtabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  height: auto;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #3c4452;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}
#tab-image .subtabs button:hover:not(.active) {
  background: #f4f6f8;
  color: #1c2430;
}
#tab-image .subtabs button:active:not(.active) {
  background: #eceff3;
}
#tab-image .subtabs button.active {
  background: var(--brand-soft);
  border-color: #c9c5ff;
  color: var(--brand-hover);
  font-weight: 650;
}
#tab-image .subtabs button:focus-visible {
  outline: 2px solid rgba(99, 91, 255, .35);
  outline-offset: 2px;
}
/* 字标（主 / 详 / 白 / 仿 / 自 / 批 / 装）：纯展示伪元素，data-sub 不动 */
#tab-image .subtabs button::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #5c6778;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
#tab-image .subtabs button:nth-child(1)::before { content: "主"; }
#tab-image .subtabs button:nth-child(2)::before { content: "详"; }
#tab-image .subtabs button:nth-child(3)::before { content: "白"; }
#tab-image .subtabs button:nth-child(4)::before { content: "仿"; }
#tab-image .subtabs button:nth-child(5)::before { content: "自"; }
#tab-image .subtabs button:nth-child(6)::before { content: "批"; }
#tab-image .subtabs button:nth-child(7)::before { content: "装"; }
#tab-image .subtabs button:hover:not(.active)::before {
  background: #fff;
}
#tab-image .subtabs button.active::before {
  background: var(--brand);
  color: #fff;
}

/* ≥768px：一排七等分；宽度不够时仍然换行，不横向溢出 */
@media (min-width: 768px) {
  #tab-image .subtabs button {
    flex: 1 1 0;
  }
}

/* ---------- 布局 ---------- */
#tab-image .create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

#tab-image .create-params {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 20px 20px 0;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 22px;
  box-shadow: var(--cs-shadow);
}
#tab-image .create-params__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  /* 钉底条约 120px 高：末组与它之间留 24px，滚动时不会被压住 */
  padding: 0 0 144px;
}

/* ---------- 面板标题行 ---------- */
#tab-image .create-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
#tab-image .create-panel-title {
  margin: 0;
  color: var(--cs-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
#tab-image .create-panel-head > small.muted {
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- 分步分组：步内字段 20px（flex gap），步间 16px + 浅分隔线 ---------- */
#tab-image .create-step {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}
#tab-image .create-step__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
#tab-image .create-step__hint {
  color: var(--cs-muted);
  font-size: 13px;
  font-weight: 500;
}
#tab-image .create-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
#tab-image .create-step__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  min-width: 0;
}

/* ---------- 字段 ---------- */
#tab-image .field {
  margin: 0;
}
#tab-image .field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
/* 文字描述方式下的模特图上传整体隐藏 */
#tab-image #tryon-desc-wrap[hidden] {
  display: none;
}

/* ---------- 输入框 / 文本域 ---------- */
#tab-image .create-params input[type="text"],
#tab-image .create-params input[type="number"],
#tab-image .create-params textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--cs-input-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cs-ink);
  font-size: 14px;
  line-height: 1.55;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
#tab-image .create-params input[type="text"],
#tab-image .create-params input[type="number"] {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  line-height: 40px;
}
#tab-image .create-params textarea {
  min-height: 0;
  resize: vertical;
}
#tab-image .create-params input[type="text"]:hover,
#tab-image .create-params input[type="number"]:hover,
#tab-image .create-params textarea:hover {
  border-color: #b9c2cf;
}
#tab-image .create-params input[type="text"]:focus,
#tab-image .create-params input[type="number"]:focus,
#tab-image .create-params textarea:focus {
  outline: 3px solid rgba(44, 49, 58, .08);
  outline-offset: 0;
  border-color: #9aa6b8;
  box-shadow: none;
}

/* ---------- 下拉（模型 / 平台 / 语言 / 张数） ---------- */
#tab-image .field select,
#tab-image .select-field select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--cs-input-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cs-ink);
  font-size: 14px;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
#tab-image .field select:hover,
#tab-image .select-field select:hover {
  border-color: #b9c2cf;
}
#tab-image .field select:focus,
#tab-image .select-field select:focus {
  outline: 3px solid rgba(44, 49, 58, .08);
  outline-offset: 0;
  border-color: #9aa6b8;
  box-shadow: none;
}

#tab-image .select-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
#tab-image .select-field > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 分析提示条 ---------- */
#tab-image .create-tip {
  margin: 0;
  padding: 7px 10px;
  background: #fff7e6;
  border: 1px solid #f5c26b;
  border-radius: 10px;
  color: #b26a00;
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- AI 分析卖点：一行「按钮 + 消耗说明」 ---------- */
#tab-image .gen-analyze {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
#tab-image .gen-analyze .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(99, 91, 255, .28);
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
}
#tab-image .gen-analyze .btn:hover:not(:disabled) {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  box-shadow: 0 5px 14px rgba(99, 91, 255, .34);
  transform: translateY(-1px);
}
#tab-image .gen-analyze .btn:active:not(:disabled) {
  border-color: #4c43d6;
  background: #4c43d6;
  box-shadow: 0 2px 5px rgba(99, 91, 255, .3);
  transform: translateY(0);
}
#tab-image .gen-analyze .btn:focus-visible {
  outline: 3px solid rgba(99, 91, 255, .4);
  outline-offset: 2px;
}
#tab-image .gen-analyze .btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
#tab-image .gen-analyze small.muted {
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- 语音输入：紧贴文本域，不做成整块按钮 ---------- */
#tab-image .create-params .voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--cs-input-line);
  border-radius: 999px;
  background: #fff;
  color: #3c4452;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
#tab-image .create-params .voice-btn:hover {
  background: var(--cs-chip);
  border-color: #b9c2cf;
}
#tab-image .create-params .voice-btn:focus-visible {
  outline: 2px solid rgba(99, 91, 255, .35);
  outline-offset: 2px;
}

/* ---------- 上传区 ---------- */
#tab-image .upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 14px 12px;
  background: #fafbfc;
  border: 1px dashed #d7dde6;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
#tab-image .upload-zone:hover,
#tab-image .upload-zone:focus-within {
  border-color: #b9c2cf;
  background: var(--cs-chip);
}
#tab-image .upload-zone::before {
  content: "+";
  display: block;
  color: var(--cs-muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
#tab-image .upload-zone > span {
  color: #3c4452;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
#tab-image .upload-zone > small.muted,
#tab-image .field > small.muted {
  color: var(--cs-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}
#tab-image .field > small.muted {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
}

/* 上传块：横向胶囊方块，文字一行 */
#tab-image .upload-zone--tile {
  width: auto;
  min-width: 120px;
  height: 96px;
  min-height: 96px;
  gap: 6px;
  margin: 0 0 6px;
  padding: 10px 20px;
  align-self: flex-start;
  border-radius: 12px;
}
#tab-image .upload-zone--tile::before {
  font-size: 17px;
}
#tab-image .upload-zone--tile > span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

/* 仿图自家产品图：整宽但仍是一行文字的扁虚线框 */
#tab-image .upload-zone--wide {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  gap: 3px;
}
#tab-image .upload-zone--wide::before {
  font-size: 16px;
}
#tab-image .upload-zone--wide > span {
  font-size: 13px;
  white-space: nowrap;
}

/* 上传区下方说明：方块外，不撑高上传区 */
#tab-image .upload-hint,
#tab-image .field > small.upload-hint {
  display: block;
  margin: 0 0 8px;
  color: var(--cs-muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- 缩略图 ---------- */
#tab-image .thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 10px;
}
#tab-image .thumbs:empty {
  display: none;
}
#tab-image .thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
}
#tab-image .ref-thumb { position: relative; display: inline-flex; flex: none; cursor: zoom-in; }
#tab-image .ref-thumb__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(18, 33, 58, .72);
  color: #fff;
  font-size: 15px;
  line-height: 18px;
  cursor: pointer;
}
.ref-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 40, .58);
  backdrop-filter: blur(5px);
}
.ref-viewer__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  width: min(92vw, 1120px);
  height: min(88vh, 900px);
  padding: 54px 54px 46px;
  border: 1px solid rgba(229, 234, 240, .9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 24, 40, .28);
}
.ref-viewer__stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #f4f6fa;
}
.ref-viewer__img {
  display: block;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #f4f6fa;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}
.ref-viewer__stage.is-dragging .ref-viewer__img { cursor: grabbing; }
.ref-viewer__close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 50%;
  background: #fff;
  color: var(--cs-text, #3c4452);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ref-viewer__tools {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 3px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 12px rgba(22, 28, 45, .08);
}
.ref-viewer__tools button {
  min-width: 27px;
  height: 26px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--cs-text, #3c4452);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ref-viewer__tools button:hover { background: var(--brand-soft, #eef0ff); color: var(--brand-hover, #433bc5); }
.ref-viewer__tools span {
  min-width: 48px;
  color: var(--cs-muted, #98a2b3);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ref-viewer__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #ddd9ff;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--brand, #5148d8);
  font: 700 26px/1 Arial, sans-serif;
  box-shadow: 0 4px 14px rgba(22, 28, 45, .12);
  transform: translateY(-50%);
  cursor: pointer;
}
.ref-viewer__nav[hidden] { display: none; }
.ref-viewer__nav.is-prev { left: 10px; }
.ref-viewer__nav.is-next { right: 10px; }
.ref-viewer__foot {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cs-muted, #98a2b3);
  font-size: 12px;
}
.ref-viewer__foot span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-viewer__foot .create-viewer__dl {
  flex: none;
  color: var(--brand, #5148d8);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 700px) {
  .ref-viewer { padding: 10px; }
  .ref-viewer__card { width: 100%; height: 88vh; padding: 54px 12px 42px; }
  .ref-viewer__nav.is-prev { left: 4px; }
  .ref-viewer__nav.is-next { right: 4px; }
}
.image-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 40, .56);
  backdrop-filter: blur(5px);
}
.image-edit-modal__card {
  display: flex;
  flex-direction: column;
  width: min(680px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(229, 234, 240, .9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(18, 24, 40, .3);
}
.image-edit-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px;
  color: var(--cs-ink, #1c2430);
}
.image-edit-modal__head b { font-size: 17px; }
.image-edit-modal__head button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f6f8;
  color: var(--cs-muted, #98a2b3);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.image-edit-modal__head button:hover,
.image-charge-confirm__close:hover { background: #eceff3; color: var(--cs-ink, #1c2430); }
.image-edit-modal__body {
  min-height: 0;
  padding: 6px 22px 18px;
  overflow-y: auto;
}
.image-edit-modal__preview {
  display: block;
  max-width: 240px;
  max-height: 300px;
  margin: 0 auto;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 12px;
  object-fit: contain;
  background: #f4f6fa;
}
.image-edit-modal__caption {
  margin: 8px 0 18px;
  color: var(--cs-muted, #98a2b3);
  font-size: 12px;
  text-align: center;
}
.image-edit-modal__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 15px;
  color: var(--cs-text, #3c4452);
  font-size: 13px;
  font-weight: 650;
}
.image-edit-modal__field small { color: var(--cs-muted, #98a2b3); font-weight: 500; }
.image-edit-modal__field textarea,
.image-edit-modal__field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--cs-input-line, #d6dfe9);
  border-radius: 10px;
  background: #fff;
  color: var(--cs-text, #3c4452);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
}
.image-edit-modal__field textarea { min-height: 135px; padding: 11px 12px; line-height: 1.65; resize: vertical; }
.image-edit-modal__field select { height: 38px; padding: 0 10px; }
.image-edit-modal__field textarea:focus,
.image-edit-modal__field select:focus { outline: 2px solid rgba(99, 91, 255, .22); border-color: #aaa4ff; }
.image-edit-modal__upload {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 116px;
  min-height: 86px;
  border: 1px dashed var(--cs-input-line, #d6dfe9);
  border-radius: 11px;
  background: #fbfcfe;
  color: var(--cs-muted, #98a2b3);
  cursor: pointer;
}
.image-edit-modal__upload:hover {
  border-color: #bdb7ff;
  background: #f7f6ff;
}
.image-edit-modal__upload span { color: var(--brand, #5148d8); font-size: 24px; line-height: 1; }
.image-edit-modal__upload em { font-size: 11px; font-style: normal; font-weight: 500; }
.image-edit-modal__product {
  width: 116px;
  height: 86px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 11px;
  object-fit: cover;
}
.image-edit-modal__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--cs-line, #eceff3);
}
.image-edit-modal__foot button {
  height: 42px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.image-edit-modal__submit {
  border: 0;
  background: linear-gradient(135deg, #7568ff, #a49cff);
  color: #fff;
}
.image-edit-modal__submit:hover:not(:disabled) { filter: brightness(.97); }
.image-edit-modal__submit:disabled { opacity: .65; cursor: default; }
.image-edit-modal__cancel {
  border: 1px solid var(--cs-input-line, #d6dfe9);
  background: #fff;
  color: var(--cs-text, #3c4452);
}
@media (max-width: 600px) {
  .image-edit-modal { padding: 8px; }
  .image-edit-modal__card { width: 100%; max-height: 96vh; }
  .image-edit-modal__head { padding: 14px 16px 8px; }
  .image-edit-modal__body { padding: 4px 16px 16px; }
  .image-edit-modal__foot { padding: 12px 16px 16px; }
}
.image-charge-confirm {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 40, .56);
  backdrop-filter: blur(5px);
}
.image-charge-confirm__card {
  position: relative;
  width: min(430px, 94vw);
  padding: 24px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 24, 40, .28);
  text-align: center;
}
.image-charge-confirm__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f6f8;
  color: var(--cs-muted, #98a2b3);
  font-size: 21px;
  cursor: pointer;
}
.image-charge-confirm__card h3 {
  margin: 0 40px 14px;
  color: var(--cs-ink, #1c2430);
  font-size: 17px;
}
.image-charge-confirm__card > img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 12px;
  background: #f4f6fa;
}
.image-charge-confirm__card > p {
  margin: 14px 0 10px;
  color: var(--cs-muted, #98a2b3);
  font-size: 13px;
  line-height: 1.6;
}
.image-charge-confirm__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.image-charge-confirm__meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4f6f8;
  color: var(--cs-text, #3c4452);
  font-size: 11px;
}
.image-charge-confirm__cost {
  margin: 16px 0;
  padding: 11px;
  border-radius: 11px;
  background: var(--brand-soft, #eef0ff);
  color: var(--brand-hover, #433bc5);
  font-size: 13px;
}
.image-charge-confirm__cost strong { margin: 0 3px; font-size: 21px; vertical-align: -2px; }
.image-charge-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 9px;
}
.image-charge-confirm__actions button {
  height: 40px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.image-charge-confirm__actions .is-cancel {
  border: 1px solid var(--cs-input-line, #d6dfe9);
  background: #fff;
  color: var(--cs-text, #3c4452);
}
.image-charge-confirm__actions .is-confirm {
  border: 1px solid var(--brand, #5148d8);
  background: var(--brand, #5148d8);
  color: #fff;
}
.image-charge-confirm__actions .is-confirm:hover { background: var(--brand-hover, #433bc5); }
.image-edit-modal button:focus-visible,
.image-charge-confirm button:focus-visible,
.ref-viewer button:focus-visible,
#tab-image .create-viewer button:focus-visible {
  outline: 2px solid rgba(99, 91, 255, .38);
  outline-offset: 2px;
}

/* ---------- 参数 chips：40px 胶囊，整行换行 ---------- */
#tab-image .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  overflow: visible;
}
#tab-image .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: auto;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f6f8;
  color: #3c4452;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}
#tab-image .chip:hover:not(:disabled):not(.active) {
  background: #eceff3;
  border-color: #d6dfe9;
  color: #1c2430;
}
#tab-image .chip:active:not(:disabled):not(.active) {
  background: #e3e7ec;
  border-color: #c9d0da;
}
#tab-image .chip.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-hover);
  font-weight: 600;
}
#tab-image .chip.active:hover:not(:disabled) {
  border-color: var(--brand-hover);
  background: #e6e3ff;
}
#tab-image .chip:disabled {
  background: #f7f8fa;
  border-color: transparent;
  color: #b8c0cc;
  cursor: not-allowed;
}
#tab-image .chip:focus-visible {
  outline: 2px solid rgba(99, 91, 255, .35);
  outline-offset: 2px;
}

/* 主图比例去掉旧站没有的 1:2（app.js 会写入该 chip，只做视觉隐藏，不动其它面板） */
#tab-image #gen-ratio .chip[data-value="1:2"] {
  display: none;
}

/* 「全部比例一起生成」复选 */
#tab-image .check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #5c6778;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#tab-image .check-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ---------- 底部操作区：左消耗 / 右按钮，同一行钉底 ---------- */
#tab-image .create-params__foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  margin: 0 -20px;
  padding: 12px 20px 14px;
  background: #fff;
  border-top: 1px solid var(--cs-line);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 -10px 20px rgba(22, 28, 45, .06);
}
#tab-image .create-cost {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--cs-muted);
  font-size: 13px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
#tab-image .create-cost__label {
  color: var(--cs-muted);
  font-size: 14px;
  line-height: 1.3;
}
#tab-image .create-cost__label:first-child {
  font-size: 13px;
}
#tab-image .create-cost__num {
  color: var(--action);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
#tab-image .create-cost__unit {
  color: var(--cs-text);
  font-size: 14px;
  font-weight: 600;
}
#tab-image .create-cost__balance {
  grid-column: 1;
  grid-row: 2;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.35;
}
#tab-image .create-params__foot .btn.primary {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: auto;
  min-width: 140px;
  height: 44px;
  min-height: 44px;
  margin-top: 0;
  padding: 0 18px;
  white-space: nowrap;
  border: 1px solid var(--action);
  border-radius: 12px;
  background: var(--action);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(44, 49, 58, .18);
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
}
#tab-image .create-params__foot .btn.primary:hover:not(:disabled):not([aria-busy="true"]) {
  border-color: var(--action-hover);
  background: var(--action-hover);
  box-shadow: 0 8px 20px rgba(44, 49, 58, .24);
  transform: translateY(-1px);
}
#tab-image .create-params__foot .btn.primary:active:not(:disabled):not([aria-busy="true"]) {
  border-color: var(--action-press);
  background: var(--action-press);
  box-shadow: 0 2px 6px rgba(44, 49, 58, .2);
  transform: translateY(0);
}
#tab-image .create-params__foot .btn.primary:focus-visible {
  outline: 3px solid rgba(99, 91, 255, .35);
  outline-offset: 2px;
}
#tab-image .create-params__foot .btn.primary[aria-busy="true"] {
  border-color: var(--action);
  background: var(--action);
  opacity: .75;
  box-shadow: none;
  transform: none;
  cursor: progress;
}
#tab-image .create-params__foot .btn.primary:disabled,
#tab-image .create-params__foot .btn.primary[aria-disabled="true"] {
  border-color: #d5d9df;
  background: #d5d9df;
  color: #8b95a5;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* ---------- 结果区 ---------- */
#tab-image .create-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 320px;
  margin: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(22, 28, 45, .04);
}
#tab-image .create-result-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 280px;
  text-align: center;
}
#tab-image .create-result-empty .empty-title {
  margin: 0;
  color: var(--cs-ink);
  font-size: 15px;
  font-weight: 650;
}
#tab-image .create-result-empty .muted {
  margin: 0 0 4px;
  max-width: 32em;
  color: var(--cs-muted-2);
  font-size: 13px;
  line-height: 1.6;
}
#tab-image .create-result-empty .chips {
  justify-content: center;
}
#tab-image .create-result .status {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}
#tab-image .create-result .progress {
  margin: 0;
}
#tab-image .create-result .progress-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f4;
}
#tab-image .create-result .progress-bar div {
  height: 100%;
  border-radius: 999px;
  background: var(--action);
  transition: width .3s ease-out;
}
#tab-image .create-result .progress p {
  margin: 8px 0 0;
  color: #5c6778;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
/* #batch-result 同时带 .thumbs（72px 缩略图），这里按结果网格显示 */
#tab-image #batch-result {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
#tab-image #batch-result img {
  width: 100%;
  height: auto;
  border-radius: 14px;
}
/* 有结果图就收起空态 */
#tab-image .create-result.has-results .create-result-empty {
  display: none;
}

/* ---------- 结果图网格：每个完成任务一组，新的在上 ---------- */
#tab-image .create-gallery {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
#tab-image .create-gallery:empty {
  display: none;
}
#tab-image .result-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 4px;
  border-radius: 16px;
  transition: box-shadow 150ms ease-out;
}
#tab-image .result-group + .result-group {
  padding-top: 18px;
  border-top: 1px solid var(--cs-line);
}
#tab-image .result-group.is-highlight {
  box-shadow: 0 0 0 3px var(--brand-soft);
}
#tab-image .result-group__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
#tab-image .result-group__mode {
  flex: none;
  color: var(--cs-ink);
  font-size: 13px;
  font-weight: 650;
}
#tab-image .result-group__summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tab-image .result-group__time {
  flex: none;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#tab-image .result-group__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
#tab-image .result-tile {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
#tab-image .result-tile__view {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
#tab-image .result-tile__view:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
#tab-image .result-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- 最右任务队列栏 ---------- */
#tab-image .create-queue {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(22, 28, 45, .04);
}
#tab-image .create-queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#tab-image .create-queue__title {
  margin: 0;
  color: var(--cs-ink);
  font-size: 14px;
  font-weight: 650;
  margin-right: auto;
}
#tab-image .create-queue__count {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#tab-image .create-queue__clear {
  flex: none;
  height: 25px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--brand, #5148d8);
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
#tab-image .create-queue__clear:hover { background: var(--brand-soft, #eef0ff); }
#tab-image .create-queue__clear:disabled { color: var(--cs-muted, #98a2b3); opacity: .55; cursor: default; }
#tab-image .create-queue__more {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--cs-line, #e5eaf0);
  border-radius: 11px;
  background: #fff;
  color: var(--brand, #5148d8);
  font: 650 12px/1.4 var(--a-font, inherit);
  cursor: pointer;
}
#tab-image .create-queue__more:hover { background: var(--brand-soft, #eef0ff); }
#tab-image .create-queue__empty {
  margin: 0;
  color: var(--cs-muted-2);
  font-size: 12px;
  line-height: 1.6;
}
#tab-image .create-queue.has-tasks .create-queue__empty {
  display: none;
}

/* ---------- 任务队列卡片 ---------- */
#tab-image .task-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
#tab-image .task-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
#tab-image .task-card.is-highlight {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-2);
}
#tab-image .task-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#tab-image .task-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
#tab-image .task-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
#tab-image .task-card__badge.is-queue {
  background: var(--surface-2);
  color: var(--text-3);
}
#tab-image .task-card__badge.is-run {
  background: var(--brand-soft);
  color: var(--brand-hover);
}
#tab-image .task-card__badge.is-done {
  background: var(--success-soft);
  color: var(--success);
}
#tab-image .task-card__badge.is-fail {
  background: var(--danger-soft);
  color: var(--danger);
}
#tab-image .task-card__badge.is-run::before {
  animation: task-dot-pulse 1.2s ease-in-out infinite;
}
@keyframes task-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  #tab-image .task-card__badge.is-run::before { animation: none; }
}
#tab-image .task-card__mode {
  min-width: 0;
  color: var(--cs-ink);
  font-size: 13px;
  font-weight: 650;
}
#tab-image .task-card__time,
#tab-image .task-card__id {
  flex: none;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#tab-image .task-card__time {
  margin-left: auto;
}
#tab-image .task-card__summary {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#tab-image .task-card__wait {
  margin: 0;
  color: var(--brand-hover);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#tab-image .task-card__err {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#tab-image .task-card__done {
  margin: 0;
  color: var(--success);
  font-size: 12px;
}
#tab-image .result-tile__dl {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(20, 34, 56, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
#tab-image .result-tile__dl:hover {
  background: rgba(20, 34, 56, .9);
}
#tab-image .result-tile__dl:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- 结果大图预览（挂在 #tab-image 内，fixed 全屏遮罩） ---------- */
#tab-image .create-viewer {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 20, 30, .72);
}
#tab-image .create-viewer__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(94vw, 1400px);
  height: min(94vh, 1000px);
  padding: 46px 12px 42px;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
}
#tab-image .create-viewer__stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f4f6fa;
}
#tab-image .create-viewer__stage img {
  display: block;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}
#tab-image .create-viewer__stage.is-dragging img { cursor: grabbing; }
#tab-image .create-viewer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--cs-ink);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
#tab-image .create-viewer__tools {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 3px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 12px rgba(22, 28, 45, .08);
}
#tab-image .create-viewer__tools button {
  min-width: 27px;
  height: 26px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--cs-text, #3c4452);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#tab-image .create-viewer__tools button:hover { background: var(--brand-soft, #eef0ff); color: var(--brand-hover, #433bc5); }
#tab-image .create-viewer__tools span {
  min-width: 48px;
  color: var(--cs-muted, #98a2b3);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#tab-image .create-viewer__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(28, 36, 48, .68);
  color: #fff;
  font: 700 30px/1 Arial, sans-serif;
  box-shadow: 0 5px 18px rgba(18, 24, 40, .2);
  transform: translateY(-50%);
  cursor: pointer;
}
#tab-image .create-viewer__nav[hidden] { display: none; }
#tab-image .create-viewer__nav.is-prev { left: 16px; }
#tab-image .create-viewer__nav.is-next { right: 16px; }
#tab-image .create-viewer__foot {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--cs-muted, #98a2b3);
  font-size: 12px;
}

/* ---------- 参数栏：单列整行，随页面滚动，「立即生成」钉底 ---------- */

/* 视频种类下隐藏图片子页包装层（双 id 规则压过 video-create.css 的 [hidden]） */
#tab-image > #create-kind-image[hidden],
#tab-image[data-create-kind="video"] > #create-kind-image {
  display: none;
}

#tab-image .create-params__body > * {
  margin: 0;
}
/* 分步之间：上 16px + 下 16px，中间一条浅分隔线 */
#tab-image .create-params__body > .create-step {
  scroll-margin-bottom: 160px;
}
#tab-image .create-params__body > .create-step + .create-step {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--cs-line);
}
/* 参考图 field：上传块、提示、预览上下排列 */
#tab-image .field-upload .upload-zone {
  margin: 0 0 8px;
}
/* 手机底部 .bottomnav 是 fixed（约 70px），钉底条停在它上方 */
@media (max-width: 767px) {
  #tab-image .create-params__foot {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  /* 余额 + 退款说明整行铺开，避免与 140px 按钮挤成两行 */
  #tab-image .create-cost__balance {
    grid-column: 1 / -1;
  }
  #tab-image .create-params__foot .btn.primary {
    grid-row: 1;
  }
}
@media (min-width: 900px) {
  #tab-image .create-layout {
    grid-template-columns: minmax(340px, 42%) minmax(0, 1fr);
    align-items: start;
  }
  /* 两栏时队列折到结果区下方：参数栏跨两行，多出的高度落在 1fr 的第二行 */
  #tab-image .create-layout.has-queue {
    grid-template-rows: auto 1fr;
  }
  #tab-image .create-layout.has-queue > .create-params {
    grid-row: 1 / span 2;
  }
  #tab-image .create-layout.has-queue > .create-queue {
    grid-column: 2;
  }
  #tab-image .create-layout.has-queue .task-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-items: start;
  }
}
/* 宽屏三栏：参数 | 结果图 | 任务队列（窄栏，跟随滚动） */
@media (min-width: 1200px) {
  #tab-image .create-layout.has-queue {
    grid-template-columns: minmax(280px, 24%) minmax(0, 1fr) 248px;
    grid-template-rows: auto;
    align-items: start;
  }
  #tab-image .create-layout.has-queue > .create-params {
    grid-row: auto;
  }
  /* 最右「最近任务」= 出图区：拉满视口高度，不要顶部一小卡片、下面留白 */
  #tab-image .create-layout.has-queue > .create-queue,
  #tab-image .create-layout.has-queue > .create-result {
    position: sticky;
    top: 76px;
    /* 高度由 create-tasks.js fitPanes 按「从当前位置铺到窗口底」计算，避免 100vh-96 把底部裁掉 */
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  #tab-image .create-layout.has-queue > .create-params {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 92px);
  }
  #tab-image .create-layout.has-queue .create-params__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c8c7d9 transparent;
    padding-right: 8px;
  }
  #tab-image .create-layout.has-queue .create-params__body::-webkit-scrollbar { width: 7px; }
  #tab-image .create-layout.has-queue .create-params__body::-webkit-scrollbar-track { background: transparent; }
  #tab-image .create-layout.has-queue .create-params__body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c8c7d9;
  }
  #tab-image .create-layout.has-queue > .create-queue {
    grid-column: 3;
  }

  #tab-image .create-layout.has-queue > .create-result .create-result-empty {
    aspect-ratio: auto;
    flex: 1;
  }
}
/* 文本域不限制固定高度，按 rows 自然高 */
#tab-image .create-params textarea {
  height: auto;
  min-height: 0;
}

/* ---------- 窄屏：七项两两换行，全部可见可点 ---------- */
@media (max-width: 767px) {
  #tab-image {
    /* clip 与 hidden 同效防横向溢出，但不生成滚动容器，手机端 sticky 钉底才成立 */
    overflow-x: clip;
  }
  #tab-image .subtabs button {
    flex: 1 1 calc(50% - 3px);
    justify-content: flex-start;
    min-width: 0;
    white-space: nowrap;
  }
}

/* ---------- 自由创作 / 模特换装：旧站皮肤 ---------- */
#tab-image #sub-free .create-panel-head {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
}
#tab-image #sub-tryon .create-panel-head {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
}
#tab-image #sub-free .create-panel-head .create-new-btn,
#tab-image #sub-tryon .create-panel-head .create-new-btn {
  margin-left: auto;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
#tab-image #sub-free .create-panel-head .create-new-btn:hover,
#tab-image #sub-tryon .create-panel-head .create-new-btn:hover {
  background: var(--action-hover);
}
/* 1:2 比例在自由创作里不出现 */
#tab-image #sub-free #free-ratio .chip[data-value="1:2"] {
  display: none;
}

/* 右侧空态：居中的一句灰字 */
#tab-image #sub-free .create-result-empty .muted,
#tab-image #sub-tryon .create-result-empty .muted {
  margin: 0;
  max-width: none;
  color: var(--cs-muted-2);
  font-size: 13px;
  text-align: center;
}


/* ---------- 最右任务队列：旧站 desktop-task-queue 表格（customer-template.css task-queue-clean） ---------- */
#tab-image .task-action { padding: 0; border: 0; background: none; color: var(--brand, #5148d8); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#tab-image .task-action:disabled { color: var(--text-3, #9aa6b8); cursor: default; }

/* 结果区：单张结果的任务按网格铺满中间栏（多选 11 个类型时一屏看全），多张结果的任务占整行 */
#tab-image .create-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
#tab-image .result-group + .result-group { padding-top: 4px; border-top: 0; }
#tab-image .result-group:has(.result-tile + .result-tile) { grid-column: 1 / -1; }
#tab-image .result-group:not(:has(.result-tile + .result-tile)) .result-group__grid { grid-template-columns: minmax(0, 1fr); }
#tab-image .result-group__head { flex-wrap: wrap; row-gap: 2px; }
#tab-image .result-group:not(:has(.result-tile + .result-tile)) .result-group__summary { display: none; }
/* 队列表格在 30% 栏宽内放得下五列：收紧内边距，完成张数不再重复显示 */

/* ---------- 标注 Word（方榕）：折叠 / 新建 ---------- */
#tab-image .create-step__title--fold { cursor: pointer; user-select: none; }
#tab-image .create-step__title .fold-chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #8a94a6; border-bottom: 2px solid #8a94a6; transform: rotate(45deg); transition: transform 150ms ease-out; }
#tab-image .create-step.is-collapsed .fold-chev { transform: rotate(-45deg); }
#tab-image .create-step.is-collapsed > :not(.create-step__title) { display: none !important; }
#tab-image .create-step.is-collapsed { gap: 0; }
#tab-image .fold-select {
  position: relative; display: flex; align-items: center; width: 100%; max-width: 100%; box-sizing: border-box;
  height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--cs-input-line, #d6dbe3); border-radius: 10px;
  background: #fff; color: var(--cs-ink, #12213a); font-size: 14px; text-align: left; cursor: pointer;
}
#tab-image .fold-select:hover { border-color: #b9c2cf; }
#tab-image .fold-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.6px solid #4b5565; border-bottom: 1.6px solid #4b5565; transform: rotate(45deg); transition: transform 150ms ease-out;
}
#tab-image .fold-select[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
#tab-image .fold-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-image .field--fold { position: relative; }
#tab-image .field--fold > .field-label {
  color: var(--cs-text, #3c4452);
  font-size: 13px;
  font-weight: 650;
}
#tab-image .field--fold:not(.is-folded) > .chips {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-height: 260px;
  padding: 10px;
  overflow-y: auto;
  border: 1px solid var(--cs-input-line, #d6dfe9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 28, 45, .14);
}
#tab-image .field--fold:not(.is-folded) > .chips .chip {
  min-height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  background: #f7f8fa;
  font-size: 12px;
}
#tab-image .field--fold:not(.is-folded) > .chips .chip.active {
  background: var(--brand-soft, #eef0ff);
}
#tab-image .field--fold-res:not(.is-folded) > .chips {
  grid-template-columns: minmax(0, 1fr);
}
#tab-image .field--fold-res:not(.is-folded) > .chips .chip {
  justify-content: flex-start;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#tab-image .field--fold.is-folded > .chips { display: none; }
#tab-image .create-step__title .create-new-btn {
  margin-left: auto; border: 0; border-radius: 999px; padding: 5px 12px; background: #1c2430; color: #fff;
  font-size: 12px; font-weight: 650; line-height: 1.4; box-shadow: none; cursor: pointer;
}
#tab-image .create-step__title .create-new-btn:hover { background: #333b47; }

/* 操作列：查看 + 重新生成 上下排 */
#tab-image .result-group__regen { margin-left: auto; }
#tab-image .task-card__acts { margin: 0; }

/* ---------- 最右「最近任务」：上图下文卡片（生成中转圈，完成直接出图） ---------- */
#tab-image .task-cards.task-thumbs { display: grid; grid-template-columns: 1fr; gap: 8px; align-content: start; }
#tab-image .create-layout.has-queue .task-cards.task-thumbs { display: grid; grid-template-columns: 1fr; }
#tab-image #task-cards > [hidden],
#tab-image #create-gallery > [hidden] { display: none !important; }
#tab-image .qcard { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--cs-line, #e5eaf0); border-radius: 14px; overflow: hidden; background: #fff; }
#tab-image .qcard.is-highlight { border-color: var(--brand, #5148d8); box-shadow: 0 0 0 2px var(--brand-soft, #eef0ff); }
#tab-image .qcard__media { position: relative; aspect-ratio: 1 / 1; background: #f3f5f9; display: grid; place-items: center; overflow: hidden; }
#tab-image .qcard__media.is-multi { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; place-items: stretch; }
#tab-image .qcard__img { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #f3f5f9; cursor: zoom-in; }
#tab-image .qcard__img img,
#tab-image .qcard__img video { display: block; width: 100%; height: 100%; object-fit: contain; }
#tab-image .qcard__img video { pointer-events: none; background: #111; }
#tab-image .qcard__media.is-multi .qcard__img img { object-fit: cover; }
#tab-image .qcard__more { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(18, 33, 58, .72); color: #fff; font-size: 11px; }
#tab-image .qcard__media.is-carousel { display: block; }
#tab-image .qcard__media.is-carousel .qcard__img { position: absolute; inset: 0; }
#tab-image .qcard__nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  background: rgba(18, 33, 58, .62);
  color: #fff;
  font: 600 22px/1 Arial, sans-serif;
  transform: translateY(-50%);
  cursor: pointer;
}
#tab-image .qcard__nav:hover { background: rgba(18, 33, 58, .82); }
#tab-image .qcard__nav.is-prev { left: 6px; }
#tab-image .qcard__nav.is-next { right: 6px; }
#tab-image .qcard__count {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(18, 33, 58, .68);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
#tab-image .qcard__spin { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-3, #6f7f96); font-size: 12px; }
#tab-image .qcard__spin i { width: 42px; height: 42px; border: 4px solid #dfe4ee; border-top-color: var(--brand, #5148d8); border-radius: 50%; animation: qcard-spin .9s linear infinite; }
#tab-image .qcard__spin small[hidden] { display: none; }
@keyframes qcard-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #tab-image .qcard__spin i { animation-duration: 2.4s; } }
#tab-image .qcard__ph { color: var(--danger, #c04a4a); font-size: 12px; font-weight: 600; }
#tab-image .qcard.is-done .qcard__ph { color: var(--text-3, #6f7f96); }
#tab-image .qcard__body { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; min-width: 0; }
#tab-image .qcard__name { overflow: hidden; color: var(--cs-ink, #12213a); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
#tab-image .qcard__name .task-card__id { display: none; }
#tab-image .qcard__meta { display: flex; justify-content: space-between; gap: 6px; color: var(--text-3, #6f7f96); font-size: 12px; }
#tab-image .qcard__type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-image .qcard__time { flex: none; font-variant-numeric: tabular-nums; }
#tab-image .qcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
#tab-image .qcard__acts { display: inline-flex; gap: 10px; }
#tab-image .qcard .task-card__badge { padding: 0 7px; }
#tab-image .qcard small.task-card__err { color: var(--danger, #c04a4a); font-size: 11px; line-height: 1.4; }
#tab-image .qcard small[hidden], #tab-image .qcard [hidden] { display: none !important; }
#tab-image .qcard small.task-card__done { display: none; }
#tab-image .task-action { padding: 0; border: 0; background: none; color: var(--brand, #5148d8); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; text-decoration: none; }
#tab-image .task-action:disabled { color: var(--text-3, #9aa6b8); cursor: default; }
#tab-image .create-viewer__dl { position: static; color: var(--brand, #5148d8); font-size: 13px; font-weight: 700; text-decoration: none; }

/* ---------- 1670：右栏紧凑网格卡（文字叠在图底半透明条） + 中间大图位 ---------- */
#tab-image .qcard { position: relative; }
#tab-image .qcard__delete {
  position: absolute;
  z-index: 6;
  top: 7px;
  left: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(28, 36, 48, .7);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 140ms ease-out, transform 140ms ease-out, background-color 140ms ease-out;
  cursor: pointer;
}
#tab-image .qcard:hover .qcard__delete,
#tab-image .qcard:focus-within .qcard__delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#tab-image .qcard__delete:hover { background: var(--danger, #c04a4a); }
@media (hover: none) {
  #tab-image .qcard__delete { opacity: .88; pointer-events: auto; transform: none; }
}
#tab-image .qcard__body { position: absolute; left: 0; right: 0; bottom: 0; gap: 2px; padding: 6px 8px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(4px); border-top: 1px solid rgba(229, 234, 240, .8); }
#tab-image .qcard__name { font-size: 12px; }
#tab-image .qcard__meta { font-size: 11px; }
#tab-image .qcard__foot { flex-wrap: nowrap; }
#tab-image .qcard .task-card__badge { font-size: 11px; white-space: nowrap; }
#tab-image .qcard__acts { gap: 8px; }
#tab-image .qcard small.task-card__err { display: none !important; }
#tab-image .qcard__spin { margin-bottom: 58px; }
#tab-image .qcard__ph { margin-bottom: 58px; }
#tab-image .qcard.is-staged { border-color: var(--brand, #5148d8); box-shadow: 0 0 0 2px var(--brand-soft, #eef0ff); }
#tab-image .qcard__type-chip { color: var(--text-3, #6f7f96); font-weight: 500; }
#tab-image .create-stage { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
#tab-image .create-stage[hidden] { display: none; }
#tab-image .create-stage__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-3, #6f7f96); }
#tab-image .create-stage__head b { color: var(--cs-ink, #12213a); font-size: 14px; }
#tab-image .create-stage__acts { margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#tab-image .create-stage__img { position: relative; flex: 1; min-height: 260px; padding: 0; border: 0; border-radius: 14px; background: #f3f5f9; cursor: zoom-in; overflow: hidden; }
#tab-image .create-stage__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#tab-image .create-result.has-stage .create-result-empty { display: none; }
@media (min-width: 1200px) {
  #tab-image .create-layout.has-queue .create-result.has-stage .create-gallery { display: none; }
}
@media (min-width: 1600px) {
  #tab-image .create-gallery,
  #tab-image .result-group__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  #tab-image .create-gallery,
  #tab-image .result-group__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-image .create-layout.has-queue > .create-params { position: static; max-height: none; }
  #tab-image .create-layout.has-queue .create-params__body { overflow: visible; padding-right: 0; }
  #tab-image .create-queue {
    max-height: min(70vh, 680px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #tab-image .create-queue__head {
    position: sticky;
    top: -16px;
    z-index: 2;
    margin: -16px -16px 0;
    padding: 14px 16px 10px;
    background: #fff;
    border-bottom: 1px solid var(--cs-line, #e5eaf0);
  }
}

/* ---------- 1680：最右窄竖条（约 248px）一列小缩略图；中间生成结果为大图主视觉 ---------- */
@media (min-width: 1200px) {
  #tab-image .create-layout.has-queue > .create-queue { padding: 10px 8px 12px; }
}
#tab-image .qcard__name, #tab-image .qcard__meta { font-size: 11px; }
#tab-image .qcard__body { padding: 5px 7px; }
#tab-image .qcard__spin i { width: 28px; height: 28px; border-width: 3px; }
#tab-image .create-stage__spin { flex: 1; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #f3f5f9; border-radius: 14px; color: var(--text-3, #6f7f96); font-size: 13px; }
#tab-image .create-stage__spin i { width: 48px; height: 48px; border: 4px solid #dfe4ee; border-top-color: var(--brand, #5148d8); border-radius: 50%; animation: qcard-spin .9s linear infinite; }
#tab-image .create-stage__fail { flex: 1; min-height: 260px; display: flex; align-items: center; justify-content: center; background: #f3f5f9; border-radius: 14px; color: var(--danger, #c04a4a); font-size: 14px; font-weight: 600; }

/* 批量生成：每张图一个独立占位，完成后原位换图。 */
#tab-image .create-stage__batch {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  align-content: stretch;
  gap: 10px;
  overflow: auto;
}
#tab-image .create-stage__batch[data-count="2"],
#tab-image .create-stage__batch[data-count="3"],
#tab-image .create-stage__batch[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#tab-image .create-stage__batch-cell {
  position: relative;
  min-width: 0;
  min-height: 150px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 14px;
  background: #f3f5f9;
  overflow: hidden;
}
#tab-image .create-stage__batch-cell.is-running,
#tab-image .create-stage__batch-cell.is-fail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3, #6f7f96);
  font-size: 12px;
}
#tab-image .create-stage__batch-cell.is-running small { font-size: 12px; }
#tab-image .create-stage__batch-spin {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  border: 3px solid #dfe4ee;
  border-top-color: var(--brand, #5148d8);
  border-radius: 50%;
  animation: qcard-spin .9s linear infinite;
}
#tab-image .create-stage__batch-cell.is-fail {
  background: #fff5f5;
  color: var(--danger, #c04a4a);
}
#tab-image .create-stage__batch-cell.is-fail span { color: var(--text-3, #6f7f96); font-size: 11px; }
#tab-image .create-stage__batch-cell.is-fail b { font-size: 13px; }
#tab-image .create-stage__batch-cell.is-done {
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cs-line, #eceff3);
  background: #fff;
}
#tab-image .create-stage__batch-image {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: #f3f5f9;
  overflow: hidden;
  cursor: zoom-in;
}
#tab-image .create-stage__batch.is-selecting .create-stage__batch-image { cursor: pointer; }
#tab-image .create-stage__batch-cell.is-selected {
  outline: 3px solid var(--brand, #5148d8);
  outline-offset: -3px;
}
#tab-image .create-stage__select-mark {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  background: rgba(18, 33, 58, .45);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
#tab-image .create-stage__batch-cell.is-selected .create-stage__select-mark { background: var(--brand, #5148d8); }
#tab-image .create-stage__select-order {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  display: none;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(18, 33, 58, .68);
  color: #fff;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}
#tab-image .create-stage__batch.is-selecting .create-stage__select-order { display: block; }
#tab-image .create-stage__download {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--cs-line, #eceff3);
  border-radius: 13px;
  background: #f8f9fc;
  box-shadow: 0 2px 8px rgba(22, 28, 45, .04);
}
#tab-image .create-stage__download-field {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 4px 0 8px;
  border-right: 1px solid var(--cs-line, #eceff3);
}
#tab-image .create-stage__download-field > span {
  color: var(--cs-muted, #98a2b3);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
#tab-image .create-stage__download select {
  width: auto !important;
  min-width: 0;
  height: 28px;
  padding: 0 20px 0 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--cs-ink, #1c2430);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
#tab-image .create-stage__download select:focus-visible {
  outline: 2px solid rgba(99, 91, 255, .28);
  outline-offset: 1px;
}
#tab-image .create-stage__download-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out;
}
#tab-image .create-stage__download-btn.is-primary {
  background: var(--brand, #5148d8);
  color: #fff;
}
#tab-image .create-stage__download-btn.is-primary:hover { background: var(--brand-hover, #433bc5); }
#tab-image .create-stage__download-btn.is-soft {
  border-color: #dcd9ff;
  background: var(--brand-soft, #eef0ff);
  color: var(--brand-hover, #433bc5);
}
#tab-image .create-stage__download-btn.is-soft:hover { border-color: #c8c3ff; background: #e8e6ff; }
#tab-image .create-stage__download-btn.is-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--cs-muted, #98a2b3);
}
#tab-image .create-stage__download-btn.is-ghost:hover { background: #eef1f6; color: var(--cs-text, #3c4452); }
#tab-image .create-stage__download-btn:disabled { opacity: .45; cursor: default; }
#tab-image .create-stage__batch-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f6fa;
}
#tab-image .create-stage__batch-type {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-top: 1px solid var(--cs-line, #eceff3);
  background: #fff;
}
#tab-image .create-stage__batch-type span {
  flex: none;
  color: var(--cs-muted, #98a2b3);
  font-size: 10px;
}
#tab-image .create-stage__batch-type b {
  min-width: 0;
  overflow: hidden;
  color: var(--cs-ink, #1c2430);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tab-image .create-stage__batch-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 30px;
  min-height: 60px;
  border-top: 1px solid var(--cs-line, #eceff3);
  background: #fbfcfe;
}
#tab-image .create-stage__batch-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  border-right: 1px solid var(--cs-line, #eceff3);
  background: transparent;
  color: var(--cs-text, #3c4452);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
#tab-image .create-stage__batch-actions button:nth-child(4),
#tab-image .create-stage__batch-actions button:last-child { border-right: 0; }
#tab-image .create-stage__batch-actions button:nth-child(5) {
  grid-column: 1 / -1;
  border-top: 1px solid var(--cs-line, #eceff3);
}
#tab-image .create-stage__batch-actions button:hover { background: var(--brand-soft, #eef0ff); color: var(--brand-hover, #433bc5); }
#tab-image .create-stage__batch-actions button::before { font-size: 12px; font-weight: 700; }
#tab-image .create-stage__batch-actions [data-slot-action="download"]::before { content: "↓"; }
#tab-image .create-stage__batch-actions [data-slot-action="view"]::before { content: "⌕"; }
#tab-image .create-stage__batch-actions [data-slot-action="edit"]::before { content: "✎"; }
#tab-image .create-stage__batch-actions [data-slot-action="delete"]::before { content: "×"; }
#tab-image .create-stage__batch-actions [data-slot-action="regen"]::before { content: "↻"; }
#tab-image .create-stage__batch-actions [data-slot-action="delete"]:hover {
  background: #fff1f1;
  color: var(--danger, #c04a4a);
}
@media (max-width: 900px) {
  #tab-image .create-stage__batch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-image .create-stage__download { width: 100%; }
  #tab-image .create-stage__download-field { flex: 1 1 130px; justify-content: center; border-right: 0; }
  #tab-image .create-stage__download-btn { flex: 1 1 90px; }
}
