.nano-batch-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 3, 4, 0.84);
  backdrop-filter: blur(12px);
  color: #e5e7eb;
}

.nano-batch-dialog {
  width: min(1880px, 97vw);
  height: min(94vh, 1180px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #343438;
  border-radius: 20px;
  background: #121214;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.nano-batch-header,
.nano-batch-toolbar,
.nano-batch-footer,
.nano-batch-card-head,
.nano-batch-header-actions,
.nano-batch-summary,
.nano-batch-footer > div,
.nano-batch-prompt > div {
  display: flex;
  align-items: center;
}

.nano-batch-header {
  min-height: 76px;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 22px;
  border-bottom: 1px solid #2b2b2f;
  background: #1a1a1d;
}

.nano-batch-header h2 {
  margin: 0;
  color: #f5f5f5;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
}

.nano-batch-header p {
  margin: 5px 0 0;
  color: #777780;
  font-size: 12px;
}

.nano-batch-header-actions { gap: 12px; }

.nano-batch-capacity {
  padding: 6px 10px;
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: 999px;
  background: rgba(139, 92, 246, .1);
  color: #bba5fb;
  font-size: 11px;
}

.nano-batch-close,
.nano-batch-remove {
  border: 0;
  background: transparent;
  color: #74747c;
  cursor: pointer;
}

.nano-batch-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 24px;
  line-height: 32px;
}

.nano-batch-close:hover { background: #2a2a2e; color: #fff; }

.nano-batch-toolbar {
  min-height: 54px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 9px 16px;
  padding: 9px 22px;
  border-bottom: 1px solid #252529;
  background: #151517;
}

.nano-batch-summary { gap: 8px; }

.nano-batch-summary span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #252529;
  color: #8c8c95;
  font-size: 11px;
}

.nano-batch-summary .is-pending { color: #f0b34e; background: rgba(245, 158, 11, .1); }
.nano-batch-summary .is-queued { color: #7dd3fc; background: rgba(14, 165, 233, .1); }
.nano-batch-summary .is-running { color: #b69cff; background: rgba(139, 92, 246, .12); }
.nano-batch-summary .is-done { color: #65d58a; background: rgba(34, 197, 94, .1); }

.nano-batch-add,
.nano-batch-ai,
.nano-batch-duplicate,
.nano-batch-task-reset,
.nano-batch-download,
.nano-batch-clear,
.nano-batch-start,
.nano-batch-bulk button,
.nano-batch-prompt button {
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.nano-batch-add {
  padding: 8px 14px;
  border-color: rgba(148, 148, 158, .28);
  background: rgba(107, 107, 116, .12);
  color: #aaaab2;
  font-size: 12px;
  font-weight: 600;
}

.nano-batch-add:hover:not(:disabled) {
  border-color: rgba(166, 166, 176, .42);
  background: rgba(128, 128, 138, .2);
  color: #d0d0d6;
  transform: translateY(-1px);
}
.nano-batch-bulk {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: auto minmax(150px, 1.6fr) minmax(120px, .8fr) minmax(135px, .8fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #242428;
}

.nano-batch-bulk strong {
  color: #9a9aa3;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nano-batch-bulk select {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #36363c;
  border-radius: 8px;
  outline: 0;
  background: #202023;
  color: #cfcfd4;
  font: inherit;
  font-size: 11px;
}

.nano-batch-bulk select:focus { border-color: rgba(139, 92, 246, .55); }

.nano-batch-bulk button {
  height: 34px;
  padding: 0 13px;
  border-color: rgba(139, 92, 246, .36);
  background: rgba(139, 92, 246, .12);
  color: #bba5fb;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nano-batch-bulk button:hover:not(:disabled) { background: rgba(139, 92, 246, .22); }

.nano-batch-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 18px;
  scrollbar-color: #3b3b40 transparent;
  scrollbar-width: thin;
}

.nano-batch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.nano-batch-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #323237;
  border-radius: 16px;
  background: #1a1a1d;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .2);
}

.nano-batch-card.is-running { border-color: rgba(245, 158, 11, .5); }
.nano-batch-card.is-queued { border-color: rgba(14, 165, 233, .42); }
.nano-batch-card.is-done { border-color: rgba(34, 197, 94, .4); }
.nano-batch-card.is-failed { border-color: rgba(239, 68, 68, .42); }

.nano-batch-card-head {
  min-height: 56px;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid #2b2b2f;
}

.nano-batch-card-head > strong {
  margin-right: auto;
  color: #f2f2f4;
  font-size: 14px;
  white-space: nowrap;
}

.nano-batch-auto {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c78b32;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.nano-batch-auto input { position: absolute; opacity: 0; pointer-events: none; }

.nano-batch-auto i {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #3a3a3f;
  transition: background .15s ease;
}

.nano-batch-auto i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}

.nano-batch-auto input:checked + i { background: #f59e0b; }
.nano-batch-auto input:checked + i::after { transform: translateX(14px); }

.nano-batch-ai {
  padding: 5px 8px;
  border-color: rgba(139, 92, 246, .42);
  background: rgba(139, 92, 246, .08);
  color: #bba5fb;
  font-size: 10px;
  white-space: nowrap;
}

.nano-batch-ai:hover:not(:disabled) { background: rgba(139, 92, 246, .18); }

.nano-batch-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .08);
  color: #e5a843;
  font-size: 10px;
  white-space: nowrap;
}

.nano-batch-status.is-running { color: #c4b5fd; background: rgba(139, 92, 246, .12); }
.nano-batch-status.is-queued { color: #7dd3fc; background: rgba(14, 165, 233, .1); }
.nano-batch-status.is-done { color: #74dc96; background: rgba(34, 197, 94, .1); }
.nano-batch-status.is-failed { color: #fb8181; background: rgba(239, 68, 68, .1); }

.nano-batch-status i {
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nano-batch-spin .8s linear infinite;
}

.nano-batch-remove {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 18px;
}

.nano-batch-remove:hover:not(:disabled) { background: rgba(239, 68, 68, .12); color: #fb7185; }

.nano-batch-visuals {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 12px;
  padding: 14px;
}

.nano-batch-ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.nano-batch-ref {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed #56565e;
  border-radius: 9px;
  background: #202023;
  color: #8b8b94;
  cursor: pointer;
}

.nano-batch-ref:hover:not(.is-disabled) {
  border-color: #777780;
  background: rgba(148, 148, 158, .06);
  color: #b2b2ba;
}
.nano-batch-ref.is-dragover:not(.is-disabled) {
  border-style: solid;
  border-color: #8d8d96;
  background: rgba(148, 148, 158, .12);
  box-shadow: 0 0 0 2px rgba(148, 148, 158, .12), inset 0 0 20px rgba(148, 148, 158, .06);
  transform: translateY(-1px);
}

.nano-batch-ref.is-dragover:not(.is-disabled)::after {
  content: "松开上传";
  position: absolute;
  inset: 5px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(24, 24, 27, .92);
  color: #d2d2d8;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}
.nano-batch-ref input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nano-batch-ref b { color: #a8a8b0; font-size: 18px; line-height: 18px; }
.nano-batch-ref span { margin-top: 5px; font-size: 9px; }
.nano-batch-ref.has-image {
  border-style: solid;
  border-color: #3a3a3f;
  background: #101012;
  cursor: zoom-in;
}

.nano-batch-ref img {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: block;
  padding: 3px;
  object-fit: contain;
  object-position: center;
  background: #101012;
  cursor: zoom-in;
}

.nano-batch-ref button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}

.nano-batch-ref.has-image:hover button,
.nano-batch-ref button:focus-visible { opacity: 1; transform: translateY(0); }
.nano-batch-ref button:hover { background: rgba(220, 38, 38, .92); }

.nano-batch-ref .nano-batch-ref-index {
  position: absolute;
  left: 4px;
  bottom: 4px;
  margin: 0;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: rgba(255, 255, 255, .88);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.nano-batch-ref-count {
  margin-top: 8px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #777780;
  text-align: center;
  font-size: 10px;
}

.nano-batch-ref-add-slot {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 148, 158, .32);
  border-radius: 50%;
  background: rgba(107, 107, 116, .1);
  color: #a8a8b0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.nano-batch-ref-add-slot:hover:not(:disabled) {
  border-color: #85858e;
  background: rgba(128, 128, 138, .18);
  color: #d0d0d6;
  transform: scale(1.06);
}
.nano-batch-ref-add-slot:disabled { opacity: .35; cursor: not-allowed; }

.nano-batch-result {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #414147;
  border-radius: 11px;
  background: #171719;
  color: #71717a;
  text-align: center;
  font-size: 11px;
  overflow: hidden;
}

.nano-batch-result b { color: #8d8d96; font-size: 28px; font-weight: 500; }
.nano-batch-result.is-running { color: #bba5fb; border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .045); }
.nano-batch-result.is-queued { color: #7dd3fc; border-color: rgba(14, 165, 233, .34); background: rgba(14, 165, 233, .04); }
.nano-batch-result.is-queued b { color: #7dd3fc; }
.nano-batch-result.is-done { color: #6bd68e; border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .04); }
.nano-batch-result.is-done b { color: #6bd68e; }
.nano-batch-result.is-failed { color: #f07d7d; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .04); }
.nano-batch-result.is-failed b { color: #f07d7d; }

.nano-batch-result-gallery {
  width: 100%;
  height: 154px;
  min-height: 154px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  background: #101012;
}

.nano-batch-result-gallery.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.nano-batch-result-gallery.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
.nano-batch-result-gallery .nano-batch-result-image {
  height: 100%;
  min-height: 0;
  border-radius: 0;
}

.nano-batch-result-image {
  position: relative;
  width: 100%;
  height: 154px;
  min-height: 154px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #101012;
  color: #fff;
  cursor: zoom-in;
}

.nano-batch-result-image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #101012;
}

.nano-batch-result-image span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  margin: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 9px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
}

.nano-batch-result-image:hover span,
.nano-batch-result-image:focus-visible span { opacity: 1; transform: translate(-50%, 0); }

.nano-batch-image-preview {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(10px);
}

.nano-batch-image-preview figure {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nano-batch-image-preview-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  touch-action: none;
}

.nano-batch-image-preview img {
  max-width: 92vw;
  max-height: 86vh;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: #0c0c0d;
  box-shadow: 0 18px 72px rgba(0, 0, 0, .62);
  user-select: none;
  transform-origin: center center;
  will-change: transform;
}

.nano-batch-image-preview figcaption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  max-width: min(720px, calc(100vw - 140px));
  padding: 7px 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(15, 15, 17, .76);
  color: #c7c7ce;
  font-size: 11px;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.nano-batch-image-preview-close {
  position: absolute;
  top: 18px;
  right: 20px;
  bottom: auto;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #48484f;
  border-radius: 50%;
  background: rgba(20, 20, 22, .78);
  color: #f1f1f3;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.nano-batch-image-preview-close:hover { border-color: #666670; background: #333338; }

.nano-batch-result-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(139, 92, 246, .2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: nano-batch-spin .8s linear infinite;
}

.nano-batch-prompt { margin: 0 14px 12px; border: 1px solid #3b3b40; border-radius: 11px; background: #151517; }
.nano-batch-prompt:focus-within { border-color: rgba(245, 158, 11, .65); box-shadow: 0 0 0 2px rgba(245, 158, 11, .06); }

.nano-batch-prompt textarea {
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  resize: vertical;
  padding: 11px 12px 5px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dedee2;
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
}

.nano-batch-prompt textarea::placeholder { color: #666670; }

.nano-batch-prompt > div {
  justify-content: space-between;
  gap: 8px;
  padding: 0 7px 7px;
}

.nano-batch-prompt > div span { margin-left: auto; color: #5f5f68; font-size: 9px; }
.nano-batch-prompt button { padding: 4px 7px; background: transparent; color: #888891; font-size: 10px; }
.nano-batch-prompt button:hover:not(:disabled) { background: #28282c; color: #e3e3e5; }

.nano-batch-selects {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(70px, .65fr));
  gap: 7px;
  padding: 0 14px 14px;
}

.nano-batch-selects select {
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #3b3b40;
  border-radius: 9px;
  outline: 0;
  background: #202023;
  color: #dedee2;
  font: inherit;
  font-size: 11px;
}

.nano-batch-selects select:focus { border-color: rgba(245, 158, 11, .65); }

.nano-batch-warning {
  margin: -4px 14px 14px;
  padding: 7px 9px;
  border: 1px solid rgba(239, 68, 68, .2);
  border-radius: 8px;
  background: rgba(239, 68, 68, .06);
  color: #e98484;
  font-size: 10px;
}

.nano-batch-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px 14px;
}

.nano-batch-card-actions > span {
  flex: 1;
  min-width: 0;
  color: #71717a;
  font-size: 10px;
}

.nano-batch-duplicate {
  padding: 8px 10px;
  border-color: #3b3b40;
  background: #232326;
  color: #aaaab1;
  font-size: 10px;
  white-space: nowrap;
}

.nano-batch-duplicate:hover:not(:disabled) { border-color: #56565e; color: #ededf0; }

.nano-batch-task-start {
  min-width: 104px;
  padding: 9px 14px;
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 9px;
  background: rgba(245, 158, 11, .12);
  color: #f2ad42;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.nano-batch-task-start:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, .68);
  background: rgba(245, 158, 11, .2);
  color: #ffc261;
}

.nano-batch-task-start:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.nano-batch-task-start.is-complete,
.nano-batch-task-start.is-regenerate {
  min-width: 72px;
  padding-left: 10px;
  padding-right: 10px;
}

.nano-batch-task-reset {
  padding: 8px 10px;
  border-color: rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .08);
  color: #e98484;
  font-size: 10px;
  white-space: nowrap;
}

.nano-batch-task-reset:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, .55);
  background: rgba(239, 68, 68, .15);
  color: #f5a1a1;
}

.nano-batch-footer {
  min-height: 74px;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  border-top: 1px solid #2b2b2f;
  background: #1a1a1d;
}

.nano-batch-footer > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
.nano-batch-footer strong { color: #dedee2; font-size: 12px; }
.nano-batch-footer span { color: #6f6f78; font-size: 10px; }
.nano-batch-footer > div:last-child { gap: 10px; }

.nano-batch-download {
  padding: 10px 14px;
  border-color: rgba(34, 197, 94, .3);
  background: rgba(34, 197, 94, .08);
  color: #72d894;
  font-size: 12px;
  white-space: nowrap;
}

.nano-batch-download:hover:not(:disabled) { border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .14); }

.nano-batch-clear { padding: 10px 15px; border-color: #3b3b40; background: #232326; color: #a0a0a7; font-size: 12px; }
.nano-batch-clear:hover:not(:disabled) { border-color: #52525a; color: #e5e5e7; }

.nano-batch-start {
  min-width: 180px;
  padding: 11px 18px;
  border-color: rgba(245, 158, 11, .45);
  background: linear-gradient(135deg, #f6ad26, #f07b21);
  color: #15110a;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .18);
  font-size: 12px;
  font-weight: 700;
}

.nano-batch-start:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }

.nano-batch-add:disabled,
.nano-batch-ai:disabled,
.nano-batch-remove:disabled,
.nano-batch-duplicate:disabled,
.nano-batch-task-reset:disabled,
.nano-batch-download:disabled,
.nano-batch-clear:disabled,
.nano-batch-start:disabled,
.nano-batch-bulk button:disabled,
.nano-batch-prompt button:disabled,
.nano-batch-ref.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.nano-batch-card input:disabled,
.nano-batch-card textarea:disabled,
.nano-batch-card select:disabled { cursor: not-allowed; opacity: .64; }

/* 批量任务已统一放到弹窗管理，首页仅保留单图生成与“批量”入口。 */
div[class="border-t border-[#2c2c2e] bg-[#1c1c1e] flex-shrink-0"]
  > div[class="px-4 pt-3 pb-1"] {
  display: none !important;
}

/* 首页批量入口：按钮本身承载张数进度，关闭弹窗后仍能持续查看。 */
.nano-batch-trigger {
  position: relative;
  min-width: 92px;
  min-height: 46px;
  gap: 6px;
  overflow: hidden;
  padding: 10px 12px !important;
  border: 1px solid rgba(139, 92, 246, .34);
  background: rgba(139, 92, 246, .13);
  color: #a78bfa;
}

.nano-batch-trigger:hover {
  border-color: rgba(139, 92, 246, .58);
  background: rgba(139, 92, 246, .22);
}

.nano-batch-trigger.is-locked,
.nano-batch-trigger.is-locked:hover {
  min-width: 92px;
  border-color: rgba(107, 114, 128, .28);
  background: rgba(55, 65, 81, .18);
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

.nano-batch-trigger-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.nano-batch-trigger-count {
  min-width: 34px;
  padding: 1px 5px;
  border: 1px solid rgba(167, 139, 250, .25);
  border-radius: 999px;
  background: rgba(12, 10, 18, .36);
  color: #c4b5fd;
  font: 700 10px/15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -.2px;
  white-space: nowrap;
}

.nano-batch-trigger-time {
  display: none;
  color: #ddd6fe;
  font: 700 10px/15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.nano-batch-trigger-running {
  display: none;
  padding: 1px 5px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 999px;
  background: rgba(34, 197, 94, .1);
  color: #86efac;
  font: 700 10px/15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.nano-batch-trigger.is-running {
  min-width: 104px;
  flex-shrink: 0;
}

.nano-batch-trigger-meter {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}

.nano-batch-trigger-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
  transition: width .35s ease;
}

/* 细刻度覆盖在进度条上，仍保持按钮整体简洁。 */
.nano-batch-trigger-meter b {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(14, 14, 15, .72) calc(10% - 1px), rgba(14, 14, 15, .72) 10%);
  pointer-events: none;
}

.nano-batch-trigger-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 0 0 rgba(196, 181, 253, .5);
  animation: nano-batch-trigger-pulse 1.35s ease-out infinite;
}

.nano-batch-trigger.is-done {
  border-color: rgba(34, 197, 94, .34);
  background: rgba(34, 197, 94, .1);
  color: #6ee7a0;
  padding-bottom: 10px !important;
}
.nano-batch-trigger.is-done .nano-batch-trigger-count { border-color: rgba(34, 197, 94, .25); color: #86efac; }
.nano-batch-trigger.is-done .nano-batch-trigger-meter { display: none; }
.nano-batch-trigger.is-done .nano-batch-trigger-meter i { background: linear-gradient(90deg, #22c55e, #86efac); }

.nano-batch-trigger.is-failed {
  border-color: rgba(239, 68, 68, .36);
  background: rgba(239, 68, 68, .1);
  color: #fca5a5;
}
.nano-batch-trigger.is-failed .nano-batch-trigger-count { border-color: rgba(239, 68, 68, .25); color: #fca5a5; }
.nano-batch-trigger.is-failed .nano-batch-trigger-meter i { background: linear-gradient(90deg, #ef4444, #fb7185); }

.nano-batch-trigger.is-queued .nano-batch-trigger-dot { background: #7dd3fc; }

@keyframes nano-batch-trigger-pulse {
  70% { box-shadow: 0 0 0 6px rgba(196, 181, 253, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 181, 253, 0); }
}

@keyframes nano-batch-spin { to { transform: rotate(360deg); } }

@media (max-width: 1560px) {
  .nano-batch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .nano-batch-overlay { padding: 0; }
  .nano-batch-dialog { width: 100vw; height: 100vh; max-height: none; border-radius: 0; border: 0; }
  .nano-batch-grid { grid-template-columns: 1fr; }
  .nano-batch-header p, .nano-batch-auto span, .nano-batch-footer > div:first-child { display: none; }
  .nano-batch-footer { justify-content: flex-end; }
  .nano-batch-bulk { grid-template-columns: 1fr 1fr; }
  .nano-batch-bulk strong { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .nano-batch-header, .nano-batch-toolbar, .nano-batch-footer { padding-left: 12px; padding-right: 12px; }
  .nano-batch-scroll { padding: 10px; }
  .nano-batch-card-head { flex-wrap: wrap; }
  .nano-batch-bulk { grid-template-columns: 1fr; }
  .nano-batch-bulk strong { grid-column: auto; }
  .nano-batch-visuals { grid-template-columns: 1fr; }
  .nano-batch-result { min-height: 110px; }
  .nano-batch-result-gallery { height: 110px; min-height: 110px; }
  .nano-batch-result-image { height: 110px; min-height: 110px; }
  .nano-batch-selects { grid-template-columns: 1fr 1fr; }
  .nano-batch-start { min-width: 150px; }
  .nano-batch-footer > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
  .nano-batch-image-preview { padding: 0; }
}

@media (hover: none) {
  .nano-batch-ref button { opacity: 1; transform: translateY(0); }
}
