/* 主区单栏 */
.wb-batch-main { padding: 24px 0 96px; max-width: 920px; margin: 0; }

/* 页头 */
.wb-batch-header { margin-bottom: 24px; }
.wb-batch-eyebrow {
  color: var(--soft);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 6px;
}
.wb-batch-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 28px; font-weight: 500;
  line-height: 1.2;
}
.wb-batch-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px; line-height: 1.6;
}

.wb-batch-card {
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.wb-batch-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.wb-batch-card-head strong { font-size: 14px; }
.wb-batch-card-head small { color: var(--soft); font-size: 12px; }
.wb-batch-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* module rows with toggle */
.wb-mod-list { display: grid; gap: 8px; }
.wb-mod-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 12px; align-items: center;
  height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
}
.wb-mod-row.off { background: var(--bg); border-color: var(--line); opacity: 0.65; }
.wb-mod-row .toggle {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
}
.wb-mod-row .toggle .check {
  width: 18px; height: 18px;
  border: 1.4px solid var(--line-strong); border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: #fff; color: transparent;
}
.wb-mod-row.on .toggle .check { background: var(--ink); border-color: var(--ink); color: #fff; }
.wb-mod-row .count-sel { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); font-size: 12px; }
.wb-mod-row .count-sel select {
  width: auto; height: 28px; padding: 0 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.wb-mod-row .fixed {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--soft);
  font-size: 12px;
}
.wb-mod-row .fixed b { color: var(--ink); font-feature-settings: "tnum"; }

/* 高级折叠 */
details.wb-adv {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff;
}
details.wb-adv > summary {
  cursor: pointer; font-size: 13px; font-weight: 600;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details.wb-adv > summary::after { content: "+"; color: var(--soft); }
details.wb-adv[open] > summary::after { content: "−"; }
details.wb-adv > summary small { color: var(--soft); font-weight: 400; margin-left: 8px; }
details.wb-adv .body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* 队列 */
.wb-queue {
  margin-top: 24px;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.wb-queue-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg);
  display: flex; justify-content: space-between; align-items: center;
}
.wb-queue-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.wb-queue-stats { display: inline-flex; gap: 18px; font-size: 13px; font-feature-settings: "tnum"; }
.wb-queue-stats div { display: flex; gap: 6px; align-items: baseline; }
.wb-queue-stats .ok { color: var(--green); }
.wb-queue-stats .skip { color: var(--soft); }
.wb-queue-stats .fail { color: var(--red); }
table.wb-q { width: 100%; border-collapse: collapse; font-size: 13px; }
table.wb-q thead th {
  text-align: left; font-weight: 600; padding: 10px 18px;
  background: #fff; border-bottom: 1px solid var(--line);
  color: var(--soft); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase;
}
table.wb-q tbody td {
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  font-feature-settings: "tnum";
}
table.wb-q tbody tr:last-child td { border-bottom: 0; }
table.wb-q tbody tr.running { background: rgba(0, 113, 227, 0.04); }
.wb-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.wb-badge.ok { background: rgba(21, 128, 61, 0.1); color: var(--green); }
.wb-badge.skip { background: var(--bg-tan); color: var(--soft); }
.wb-badge.run { background: rgba(0, 113, 227, 0.1); color: var(--accent); }
.wb-badge.fail { background: rgba(185, 28, 28, 0.1); color: var(--red); }
.wb-badge.wait { background: var(--bg); color: var(--soft); }
.wb-filename { font-family: var(--mono); font-size: 12.5px; }

/* === 批量出图重写（B 阶段）=== */

/* 选图区 */
.wb-batch-picker {
  margin-top: 12px;
  padding: 32px 24px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: background 0.12s, border-color 0.12s;
}
.wb-batch-picker.dragover {
  background: rgba(0, 113, 227, 0.06);
  border-color: var(--accent);
}
.wb-batch-picker.has-files {
  padding: 18px 20px;
  background: #fff;
  border-style: solid;
}
.wb-batch-picker-empty {
  text-align: center;
}
.wb-batch-picker-icon {
  color: var(--soft);
  margin-bottom: 12px;
}
.wb-batch-picker-empty strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}
.wb-batch-picker-empty p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.wb-batch-picker-btns {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 已选文件 */
.wb-batch-files-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.wb-batch-files-head strong {
  font-size: 14px;
}

/* 分组方式切换条 */
.wb-batch-grouping {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin: 6px 0 14px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.wb-batch-grouping label {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.wb-batch-grouping label.active { color: var(--ink); font-weight: 600; }
.wb-batch-grouping label input[type="radio"] { accent-color: var(--ink); }

/* 商品卡片列表（products）*/
.wb-batch-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.wb-batch-product {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  padding: 12px 14px;
}
.wb-batch-product-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.wb-batch-product-head strong {
  font-size: 13.5px;
  color: var(--ink);
}
.wb-batch-product-head small {
  color: var(--soft); font-size: 12px;
  margin-left: auto;
  margin-right: 8px;
}
.wb-batch-product-del {
  width: 22px; height: 22px;
  border: 0; background: rgba(10,10,10,0.06);
  border-radius: 50%;
  color: var(--muted);
  font-size: 14px; cursor: pointer; line-height: 1;
}
.wb-batch-product-del:hover { background: var(--red, #d33); color: #fff; }
.wb-batch-product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.wb-batch-product-thumbs .wb-batch-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.wb-batch-product-thumbs .wb-batch-thumb .wb-batch-thumb-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2px 4px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.62));
  color: #fff; font-size: 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* === W3.3 编辑分组 / 缩略图大图 === */

/* 编辑模式 toolbar */
.wb-batch-edit-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.wb-batch-edit-toolbar strong { color: var(--ink); margin-right: 6px; }

.wb-batch-edit-menu {
  position: absolute; top: 100%; left: 0; z-index: 10;
  min-width: 180px; max-height: 280px; overflow-y: auto;
  margin-top: 4px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(10,10,10,0.12);
  display: flex; flex-direction: column;
}
.wb-batch-edit-menu button {
  text-align: left; padding: 8px 12px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.wb-batch-edit-menu button:last-child { border-bottom: 0; }
.wb-batch-edit-menu button:hover { background: var(--bg); }
.wb-batch-edit-menu-search {
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  outline: none;
  box-sizing: border-box;
}
.wb-batch-edit-menu-list { display: flex; flex-direction: column; }
.wb-batch-edit-menu-empty {
  padding: 12px;
  text-align: center;
  color: var(--soft);
  font-size: 12.5px;
}

/* P1-4 drag-drop 视觉反馈 */
.wb-batch-thumb.draggable {
  cursor: grab;
}
.wb-batch-thumb.draggable:active {
  cursor: grabbing;
}
.wb-batch-thumb.dragging {
  opacity: 0.4;
}
.wb-batch-product.drop-hover {
  outline: 2px dashed var(--accent, #0071e3);
  outline-offset: -4px;
  background: rgba(0, 113, 227, 0.04);
}

/* P1-6 / P1-8 modal overlay 通用 */
.wb-batch-modal-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.5);
  display: grid; place-items: center;
  padding: 20px;
}
.wb-batch-modal-card {
  background: #fff;
  border-radius: var(--r-md, 8px);
  padding: 22px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.wb-batch-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-batch-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--soft);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

/* P1-8 compare modal */
.wb-batch-compare-card {
  background: #fff;
  border-radius: var(--r-md, 8px);
  max-width: 960px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.wb-batch-compare-card header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wb-batch-compare-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  flex: 1;
  overflow: auto;
}
.wb-batch-compare-col {
  background: #fff;
  padding: 14px 16px;
  overflow-y: auto;
}
.wb-batch-compare-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wb-batch-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.wb-batch-compare-thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm, 4px);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1;
}
.wb-batch-compare-thumb:hover { border-color: var(--ink); }
.wb-batch-compare-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wb-batch-compare-empty {
  color: var(--soft);
  font-size: 12.5px;
  margin: 0;
}
@media (max-width: 640px) {
  .wb-batch-compare-body { grid-template-columns: 1fr; }
}

/* 编辑模式：缩略图勾选 checkbox 浮层 */
.wb-batch-thumb-check {
  position: absolute; top: 4px; left: 4px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.85); border-radius: 4px;
  display: grid; place-items: center;
  cursor: pointer;
  border: 1.5px solid var(--line-strong);
}
.wb-batch-thumb-check.checked { background: var(--ink); border-color: var(--ink); }
.wb-batch-thumb-check.checked::after {
  content: "✓"; color: #fff; font-size: 13px; font-weight: 700;
}
.wb-batch-thumb-check input { display: none; }

/* 全选商品按钮 */
.wb-batch-product-select-all {
  width: 22px; height: 22px;
  margin-right: 8px;
  border: 1.5px solid var(--line-strong); border-radius: 4px;
  background: #fff; cursor: pointer;
  font-size: 12px;
}
.wb-batch-product-select-all:hover { background: var(--bg); }

/* 编辑模式商品卡片整体提示 */
.wb-batch-product.editing { border-color: rgba(0,113,227,0.4); }

/* 大图 lightbox */
.wb-batch-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.78);
  display: grid; place-items: center;
  cursor: pointer;
}
.wb-batch-lightbox-body {
  max-width: 92vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: default;
}
.wb-batch-lightbox img {
  max-width: 92vw; max-height: 82vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: #fff;
}
.wb-batch-lightbox-name {
  color: rgba(255,255,255,0.86); font-size: 13px;
  text-align: center; max-width: 80vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wb-batch-lightbox-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}
.wb-batch-lightbox-pos {
  color: rgba(255,255,255,0.6);
  font-size: 12.5px;
  font-feature-settings: "tnum";
}
.wb-batch-lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.wb-batch-lightbox-close:hover {
  background: rgba(255,255,255,0.22);
}
.wb-batch-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 64px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 8px;
}
.wb-batch-lightbox-nav:hover:not(:disabled) {
  background: rgba(255,255,255,0.18);
}
.wb-batch-lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.wb-batch-lightbox-nav.prev { left: 18px; }
.wb-batch-lightbox-nav.next { right: 18px; }
.wb-batch-lightbox-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}
.wb-batch-lightbox-actions .btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.wb-batch-lightbox-actions .btn:hover {
  background: rgba(255,255,255,0.22);
}

.wb-batch-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.wb-batch-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.wb-batch-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.wb-batch-thumb-del:hover {
  background: var(--red, #d33);
}
.wb-batch-thumb-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  color: #fff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 处理方式 radio 组 */
.wb-batch-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.wb-batch-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.wb-batch-mode.active {
  border-color: var(--ink);
  background: var(--bg);
}
.wb-batch-mode input[type="radio"] {
  margin-top: 3px;
}
.wb-batch-mode strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.wb-batch-mode span {
  display: block;
  font-size: 12px;
  color: var(--soft);
}

/* 配置卡的 textarea */
.wb-batch-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

/* 底部 action */
.wb-batch-action {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.wb-batch-action-info strong {
  display: block;
  font-size: 15px;
}
.wb-batch-action-info span {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 12.5px;
}

/* 进度区 */
.wb-batch-progress {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
}
.wb-batch-progress-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wb-batch-progress-head strong {
  font-size: 14px;
}
.wb-batch-progress-head span {
  color: var(--soft);
  font-size: 12.5px;
  font-feature-settings: "tnum";
}
.wb-batch-progress-bar {
  height: 4px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.wb-batch-progress-bar-fill {
  height: 100%;
  background: var(--accent, #0071e3);
  transition: width 0.3s ease;
}
.wb-batch-list-toolbar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg, #fafafa);
}
.wb-batch-search {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: 13px;
  background: #fff;
}
.wb-batch-toolbar-actions {
  display: flex;
  gap: 6px;
}
.wb-batch-onboarding {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  padding: 22px 24px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 8px);
  background: linear-gradient(180deg, rgba(0,113,227,0.04), transparent);
}
.wb-batch-step {
  flex: 1;
  text-align: center;
  padding: 4px 8px;
}
.wb-batch-step-num {
  width: 28px; height: 28px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--ink, #1d1d1f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
}
.wb-batch-step strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.wb-batch-step p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}
.wb-batch-step-arrow {
  display: grid;
  place-items: center;
  color: var(--line-strong);
  font-size: 18px;
}
@media (max-width: 640px) {
  .wb-batch-onboarding { flex-direction: column; }
  .wb-batch-step-arrow { transform: rotate(90deg); }
}
/* P1-2 prompt 预设 chip */
.wb-batch-prompt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.wb-batch-prompt-presets-label {
  font-size: 12px;
  color: var(--soft);
  margin-right: 4px;
}
.wb-batch-prompt-chip {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink);
}
.wb-batch-prompt-chip:hover {
  background: var(--bg, #fafafa);
  border-color: var(--ink);
}

/* P1-1 压缩进度 pill */
.wb-batch-compress-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.wb-batch-compress-pill .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wb-batch-spin 0.8s linear infinite;
}
@keyframes wb-batch-spin { to { transform: rotate(360deg); } }

/* P1-7 下载完成卡片 */
.wb-batch-dl-card {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9000;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: wb-batch-dl-in 0.25s ease;
}
@keyframes wb-batch-dl-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.wb-batch-dl-card-icon {
  font-size: 24px;
  line-height: 1;
}
.wb-batch-dl-card-body {
  flex: 1;
  min-width: 0;
}
.wb-batch-dl-card-body strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.wb-batch-dl-card-body p {
  margin: 0;
  color: var(--soft);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
}
.wb-batch-dl-card-body code {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  background: var(--bg, #f4f4f5);
  border-radius: 4px;
  font-family: var(--mono, monospace);
  font-size: 11.5px;
}
.wb-batch-dl-card-close {
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--soft);
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

.wb-batch-empty-search {
  padding: 24px 18px;
  text-align: center;
  color: var(--soft);
  font-size: 13px;
}
.wb-batch-fold-toggle {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: var(--soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wb-batch-fold-toggle:hover {
  color: var(--ink);
}
.wb-batch-progress-list {
  max-height: 480px;
  overflow-y: auto;
}
.wb-batch-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.wb-batch-row-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 70px auto auto;
  gap: 10px;
  align-items: center;
}
.wb-batch-row:last-child { border-bottom: 0; }
.wb-batch-row.running { background: rgba(0, 113, 227, 0.04); }
.wb-batch-row.done    { background: rgba(21, 128, 61, 0.03); }
.wb-batch-row.failed  { background: rgba(185, 28, 28, 0.03); }

/* 产出图预览 —— done 商品行下方的缩略图列表 */
.wb-batch-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
  padding-left: 38px; /* 跟齐 row-name 列 */
}
.wb-batch-result-thumb-wrap {
  position: relative;
  aspect-ratio: 1;
}
.wb-batch-result-thumb-wrap.selected::after {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  pointer-events: none;
}
.wb-batch-result-thumb {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.12s, transform 0.12s;
}
.wb-batch-result-thumb:hover {
  border-color: var(--ink);
  transform: scale(1.02);
}
.wb-batch-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 产出图右下角勾选 checkbox */
.wb-batch-result-check {
  position: absolute;
  right: 4px; bottom: 4px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  display: grid; place-items: center;
  cursor: pointer;
}
.wb-batch-result-check.checked {
  background: var(--ink); border-color: var(--ink);
}
.wb-batch-result-check.checked::after {
  content: "✓"; color: #fff; font-size: 13px; font-weight: 700;
}
.wb-batch-result-check input { display: none; }

/* done actions：select bar 跟下载按钮一行 */
.wb-batch-select-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: var(--r-sm);
}
.wb-batch-row-idx {
  color: var(--soft);
  font-size: 11.5px;
  font-feature-settings: "tnum";
  text-align: right;
}
.wb-batch-row-name {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-batch-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wb-batch-badge.pending { background: var(--bg); color: var(--soft); }
.wb-batch-badge.running { background: rgba(0, 113, 227, 0.1); color: var(--accent); }
.wb-batch-badge.done    { background: rgba(21, 128, 61, 0.1); color: var(--green); }
.wb-batch-badge.failed  { background: rgba(185, 28, 28, 0.1); color: var(--red); }
.wb-batch-fail-reason {
  font-size: 11.5px;
  color: var(--red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-batch-done-actions {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 移动端 */
@media (max-width: 640px) {
  .wb-batch-action {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .wb-batch-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }
  .wb-batch-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .wb-batch-fail-reason {
    grid-column: 2 / -1;
    margin-top: 2px;
  }
}

/* 张数选择器（B'5） */
.wb-batch-mode-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.wb-batch-count-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-feature-settings: "tnum";
}
.wb-batch-count-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.wb-batch-count-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.wb-batch-mode-count-hint {
  margin-left: 4px;
  color: var(--soft);
  font-size: 11.5px;
}
.wb-batch-mode-count-text {
  font-weight: 700;
  color: var(--ink);
  font-feature-settings: "tnum";
}
