/* 风格复刻 — 页面 */
.mirror-page,
main:has([data-tool="mirror"]) {
  background: transparent;
}

/* 风格复刻 — 页头 */
.mirror-page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px 28px;
}

.mirror-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e5e5e5;
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 500;
  color: #000;
  line-height: 1;
}

.mirror-page-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #000;
}

.mirror-page-title {
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #000;
  line-height: 1.25;
}

.mirror-page-desc {
  margin: 0;
  max-width: 600px;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
}

.mirror-page-desc strong {
  font-weight: 700;
  color: #000;
}

/* 风格复刻 — 模式切换 */
.mirror-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: hsl(var(--secondary));
  border-radius: 12px;
}
.mirror-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #71717a;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}
.mirror-mode-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
}
.mirror-mode-btn span {
  white-space: nowrap;
}
.mirror-mode-btn:hover:not(.is-active) {
  color: #3f3f46;
}
.mirror-mode-btn.is-active {
  background: #18181b;
  color: #fff;
}

/* 风格复刻 — 左侧边栏 */
.mirror-sidebar-card {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mirror-ref-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: hsl(var(--fg));
  line-height: 1.3;
}

.mirror-ref-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--muted-fg));
}

.mirror-ref-desc {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.4;
}

.mirror-ref-desc[hidden] {
  display: none;
}

.mirror-ref-card-head {
  margin-bottom: 16px;
}

.mirror-ref-count {
  display: none;
  flex-shrink: 0;
  font-size: 12px;
  color: hsl(var(--muted-fg));
  font-weight: 500;
}

#mirrorRefCard.is-batch .mirror-ref-count {
  display: block;
}

#mirrorRefCard.is-batch .mirror-ref-icon,
#mirrorRefCard.is-batch .mirror-ref-desc {
  display: none;
}

#mirrorRefCard .mirror-ref-zone {
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  min-height: 148px;
  padding: 28px 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

#mirrorRefCard:not(.has-upload) .mirror-ref-zone:hover {
  background: #f0f0f2;
  border-color: #8e8e93;
}

#mirrorRefCard .mirror-ref-zone.is-dragover {
  background: #e4e4e7;
  border-color: #18181b;
}

#mirrorRefCard .mirror-ref-zone.is-batch {
  min-height: 140px;
  padding: 12px;
  align-items: stretch;
}

#mirrorRefCard .mirror-upload-default {
  gap: 8px;
}

#mirrorRefCard .mirror-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-fg));
}

.mirror-ref-drop-label {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
  margin: 0;
  line-height: 1.4;
}

.mirror-ref-hint {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.4;
}

#mirrorRefCard .mirror-ref-drop-label[hidden] + .mirror-ref-hint {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
}

/* 上传后大图预览（参考设计图） */
.mirror-ref-upload-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mirror-upload-hero-preview {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f4f5;
  border: 1px solid hsl(var(--border) / 0.5);
}

.mirror-upload-hero-img {
  display: block;
  width: 100%;
  min-height: 140px;
  max-height: 280px;
  object-fit: contain;
  background: #f4f4f5;
}

.mirror-upload-hero-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mirror-upload-hero-preview:hover .mirror-upload-hero-actions,
.mirror-upload-hero-preview:focus-within .mirror-upload-hero-actions {
  opacity: 1;
}

.mirror-upload-hero-btn {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #18181b;
  padding: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.mirror-upload-hero-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.mirror-upload-hero-btn svg {
  width: 16px;
  height: 16px;
}

#mirrorRefCard.has-upload:not(.is-batch) .mirror-ref-zone,
#mirrorRefCard.has-upload:not(.is-batch) #mirrorRefUploadDefault,
#mirrorRefCard.has-upload:not(.is-batch) .mirror-upload-default,
#mirrorRefZone[hidden] {
  display: none !important;
}

#mirrorRefCard.has-upload:not(.is-batch) .mirror-upload-hero-preview[hidden] {
  display: none !important;
}

#mirrorRefCard.has-upload:not(.is-batch) .mirror-upload-hero-preview:not([hidden]) {
  display: block;
}

#mirrorProductCard.has-upload #mirrorProductUploadDefault,
#mirrorProductCard.has-upload .mirror-upload-default,
#adProductCard.has-upload #adProductUploadDefault,
#adProductCard.has-upload .mirror-upload-default,
#clothingProductCard.has-upload #clothingProductUploadDefault,
#clothingProductCard.has-upload .mirror-upload-default,
#refinementProductCard.has-upload #refinementProductUploadDefault,
#refinementProductCard.has-upload .mirror-upload-default,
#translationProductCard.has-upload #translationProductUploadDefault,
#translationProductCard.has-upload .mirror-upload-default,
#mirrorProductUploadDefault[hidden],
#refinementProductUploadDefault[hidden],
#translationProductUploadDefault[hidden] {
  display: none !important;
}

.mirror-product-zone.has-grid > .mirror-upload-default,
.mirror-upload-default[hidden] {
  display: none !important;
}

#mirrorRefCard.has-upload.is-batch .mirror-upload-hero-preview {
  display: none !important;
}

#mirrorRefCard.has-upload.is-batch #mirrorRefUploadDefault,
#mirrorRefCard.has-upload.is-batch .mirror-upload-default {
  display: none !important;
}

#mirrorRefCard.has-upload.is-batch .mirror-ref-zone {
  display: flex;
  border: none;
  padding: 0;
  min-height: 0;
  background: transparent;
  align-items: stretch;
  cursor: default;
}

.mirror-preview-item-actions {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.mirror-preview-item-actions .mirror-upload-hero-btn {
  width: 24px;
  height: 24px;
}

.mirror-preview-item-actions .mirror-upload-hero-btn svg {
  width: 12px;
  height: 12px;
}

/* 产品素材图卡片 */
.mirror-product-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: hsl(var(--fg));
  line-height: 1.3;
}

.mirror-product-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--muted-fg));
}

.mirror-product-desc {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.4;
}

.mirror-product-card-head {
  margin-bottom: 16px;
}

.mirror-product-count {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  font-weight: 500;
  flex-shrink: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

#mirrorProductCard .mirror-product-zone,
#adProductCard .mirror-product-zone,
#clothingProductCard .mirror-product-zone,
#refinementProductCard .mirror-product-zone,
#translationProductCard .mirror-product-zone {
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  min-height: 128px;
  padding: 28px 16px;
  transition: border-color 0.2s ease;
}

#mirrorProductCard:not(.has-upload) .mirror-product-zone:not(.has-grid):hover,
#adProductCard:not(.has-upload) .mirror-product-zone:not(.has-grid):hover,
#clothingProductCard:not(.has-upload) .mirror-product-zone:not(.has-grid):hover,
#translationProductCard:not(.has-upload) .mirror-product-zone:not(.has-grid):hover {
  background: #f0f0f2;
  border-color: #8e8e93;
}

#mirrorProductCard .mirror-product-zone.is-dragover,
#adProductCard .mirror-product-zone.is-dragover,
#clothingProductCard .mirror-product-zone.is-dragover,
#translationProductCard .mirror-product-zone.is-dragover {
  background: #e4e4e7;
  border-color: #18181b;
}

/* 精修：有图后切换为圆形缩略图 + 虚线加号（对齐参考 UI） */
#refinementProductCard.has-upload .mirror-product-zone.refinement-product-zone,
#refinementProductCard .mirror-product-zone.refinement-product-zone.has-grid {
  border: none;
  padding: 0;
  min-height: 0;
  background: transparent;
  cursor: default;
  align-items: flex-start;
}

#refinementProductCard .mirror-product-zone.refinement-product-zone.is-dragover {
  background: #f4f4f5;
  border-radius: 16px;
}

#refinementProductCard .refinement-product-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-item {
  width: 64px;
  height: 64px;
  aspect-ratio: auto;
  border-radius: 50%;
  border: 1px solid #f4f4f5;
  cursor: pointer;
  overflow: visible;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-item .upload-preview {
  cursor: pointer;
  border-radius: 50%;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-del {
  opacity: 1;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  z-index: 2;
  background: #fff;
  color: #18181b;
  border: 1.5px solid #e4e4e7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-del:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-del svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
}

.mirror-upload-preview-item.is-clickable {
  cursor: pointer;
}

.mirror-upload-preview-item.is-clickable .upload-preview {
  cursor: pointer;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-add {
  width: 64px;
  height: 64px;
  aspect-ratio: auto;
  border-radius: 14px;
  border: 1px dashed #d4d4d8;
  background: transparent;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-add svg {
  width: 20px;
  height: 20px;
}

#refinementProductCard .refinement-product-preview-grid .mirror-upload-preview-index {
  display: none;
}

#refinementProductCard .mirror-product-card-head {
  margin-bottom: 20px;
}

#mirrorProductCard .mirror-product-zone.is-batch {
  min-height: 140px;
  padding: 12px;
  align-items: stretch;
}

#mirrorProductCard .mirror-upload-default,
#adProductCard .mirror-upload-default,
#clothingProductCard .mirror-upload-default,
#refinementProductCard .mirror-upload-default,
#translationProductCard .mirror-upload-default {
  gap: 10px;
}

#mirrorProductCard .mirror-upload-icon,
#adProductCard .mirror-upload-icon,
#clothingProductCard .mirror-upload-icon,
#refinementProductCard .mirror-upload-icon,
#translationProductCard .mirror-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-fg));
}

.mirror-product-zone-hint {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
  margin: 0;
  line-height: 1.5;
  max-width: 240px;
  text-align: center;
}

.mirror-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mirror-card-head-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.mirror-card-icon { color: hsl(var(--muted-fg)); flex-shrink: 0; margin-top: 2px; }

.mirror-card-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: hsl(var(--fg));
}

.mirror-card-head p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  margin: 0;
}

.mirror-upload-count {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  font-weight: 500;
  flex-shrink: 0;
}

.mirror-upload-zone {
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  transition: border-color 0.2s ease;
}

.mirror-upload-zone:hover:not(.has-grid) {
  background: #f0f0f2;
  border-color: #8e8e93;
}

.mirror-upload-zone.is-dragover:not(.has-grid) {
  background: #e4e4e7;
  border-color: #18181b;
}

.mirror-upload-zone svg { color: hsl(var(--muted-fg)); }
.mirror-upload-zone p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.5;
  max-width: 220px;
}

.mirror-upload-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mirror-upload-zone.is-batch {
  padding: 12px;
  min-height: 140px;
  align-items: stretch;
}

.mirror-sidebar-card.is-batch .mirror-upload-zone {
  min-height: 160px;
}

.mirror-upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px;
}

.mirror-upload-preview-grid[hidden] {
  display: none !important;
}

.mirror-upload-preview-grid.is-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
}

.mirror-upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  background: hsl(var(--secondary));
  flex-shrink: 0;
}

.mirror-upload-preview-grid.is-row .mirror-upload-preview-item,
.mirror-upload-preview-grid.is-row .mirror-upload-preview-add {
  width: 72px;
  height: 72px;
  aspect-ratio: auto;
}

.mirror-upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mirror-upload-preview-index {
  position: absolute;
  bottom: 4px;
  left: 4px;
  top: auto;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  min-width: 16px;
  text-align: center;
}

.mirror-upload-preview-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.mirror-upload-preview-item:hover .mirror-upload-preview-del,
.mirror-upload-preview-item:focus-within .mirror-upload-preview-del {
  opacity: 1;
}

.mirror-upload-preview-del:hover {
  background: rgba(0, 0, 0, 0.85);
}

.mirror-upload-preview-del svg {
  width: 12px;
  height: 12px;
}

.mirror-upload-preview-add {
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px dashed #d4d4d8;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: hsl(var(--muted-fg));
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.mirror-upload-preview-add:hover {
  border-color: #8e8e93;
  background: #f0f0f2;
  color: hsl(var(--fg));
}

.mirror-upload-preview-add svg {
  width: 22px;
  height: 22px;
}

#mirrorProductCard.has-upload .mirror-product-zone,
#mirrorProductCard .mirror-product-zone.has-grid,
#adProductCard.has-upload .mirror-product-zone,
#adProductCard .mirror-product-zone.has-grid,
#clothingProductCard.has-upload .mirror-product-zone,
#clothingProductCard .mirror-product-zone.has-grid,
#refinementProductCard.has-upload .mirror-product-zone,
#refinementProductCard .mirror-product-zone.has-grid,
#translationProductCard.has-upload .mirror-product-zone,
#translationProductCard .mirror-product-zone.has-grid {
  border: none;
  padding: 0;
  min-height: 0;
  background: transparent;
  align-items: flex-start;
  cursor: default;
}

#mirrorRefCard.has-upload .mirror-ref-zone.is-batch,
#mirrorProductCard.has-upload .mirror-product-zone.is-batch {
  padding: 0;
  border: none;
  min-height: 0;
  background: transparent;
}

.mirror-upload-preview-more {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px dashed #d4d4d8;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--muted-fg));
}

.mirror-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mirror-config-card,
.mirror-speed-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mirror-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mirror-config-label {
  color: hsl(var(--muted-fg));
  font-weight: 500;
}

.mirror-field-label {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--fg));
}

.mirror-field-optional {
  font-weight: 400;
  color: hsl(var(--muted-fg));
}

.mirror-prompt-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--secondary));
  font-size: 13px;
  color: hsl(var(--fg));
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
}

.mirror-prompt-textarea::placeholder { color: hsl(var(--muted-fg)); }
.mirror-prompt-textarea:focus { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--border)); }

.mirror-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}

.mirror-select-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: hsl(var(--secondary));
  font-size: 12px;
  color: hsl(var(--fg));
  cursor: pointer;
}

.mirror-select-box svg { opacity: 0.45; flex-shrink: 0; }

.mirror-speed-card .mirror-speed-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mirror-speed-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mirror-speed-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mirror-speed-title {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--fg));
}

.mirror-speed-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 9999px;
  line-height: 1.4;
}

.mirror-speed-badge svg {
  stroke: currentColor;
}

.mirror-speed-desc {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.4;
}

.mirror-speed-options {
  display: flex;
  gap: 8px;
}

.mirror-speed-btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: #fff;
  color: #71717a;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mirror-speed-btn svg {
  flex-shrink: 0;
  color: currentColor;
}

.mirror-speed-btn.is-active {
  background: #18181b;
  color: #fff;
  border-color: #18181b;
}

.mirror-speed-tag {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 1;
}

.mirror-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 52px;
  border-radius: 14px;
  background: #8e8e93;
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  margin-top: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.mirror-submit-btn:not(:disabled):hover {
  background: #7a7a7f;
}

.mirror-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mirror-submit-credits {
  text-align: center;
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.5;
}

.mirror-submit-credits s {
  text-decoration: line-through;
  color: #a1a1aa;
}

.mirror-sku-tip {
  text-align: center;
  font-size: 11px;
  color: #a1a1aa;
  margin: 0;
  line-height: 1.6;
}

/* legacy alias */
.mirror-settings-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mirror-field { display: flex; flex-direction: column; gap: 8px; }
.mirror-field-hint {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  line-height: 1.45;
  margin: -2px 0 0;
}

/* 风格复刻 — 生成结果面板 */
.mirror-result-panel {
  background: hsl(var(--surface, 0 0% 100%));
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}

.mirror-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.mirror-result-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mirror-result-title svg { color: hsl(var(--muted-fg)); flex-shrink: 0; }
.mirror-result-title span {
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--fg));
}

.mirror-result-title .mirror-result-hint {
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--muted-fg));
  margin-left: 4px;
}

.mirror-project-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--card));
  min-width: 0;
  max-width: 280px;
}

.mirror-project-note-label {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  white-space: nowrap;
}

.mirror-project-note input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: hsl(var(--fg));
  font-family: inherit;
  min-width: 0;
  flex: 1;
}

.mirror-project-note input::placeholder { color: hsl(var(--muted-fg)); }
.mirror-project-note svg { color: hsl(var(--muted-fg)); flex-shrink: 0; }

.mirror-result-header-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.mirror-batch-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.mirror-batch-download-btn:hover { background: #fafafa; }
.mirror-batch-download-btn svg { color: hsl(var(--muted-fg)); flex-shrink: 0; }

.mirror-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 空闲态 */
.mirror-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mirror-idle svg { color: hsl(var(--border)); }
.mirror-idle p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* 加载态 */
.mirror-result-panel.is-loading .mirror-result-header {
  margin-bottom: 20px;
}

.mirror-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.mirror-progress-wrap {
  position: relative;
  height: 6px;
  display: flex;
  align-items: center;
}

.mirror-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #e4e4e7;
  border-radius: 1px;
}

.mirror-progress-bar {
  position: relative;
  height: 4px;
  background: #18181b;
  border-radius: 2px;
  width: 0%;
  z-index: 1;
  transition: width 0.8s ease;
}

.mirror-loading-text {
  text-align: center;
  font-size: 13px;
  color: #71717a;
  margin: 4px 0 8px;
}

.mirror-loading-preview {
  flex: 1;
  min-height: 360px;
  background: linear-gradient(145deg, #f4f4f5 0%, #ececee 50%, #f0f0f2 100%);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.mirror-loading-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mirror-loading-icon svg { color: #a1a1aa; }
.mirror-loading-preview p {
  font-size: 13px;
  color: #71717a;
  margin: 0;
}

/* 结果列表 */
.mirror-results-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.mirror-result-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: hsl(var(--secondary));
}

.mirror-result-card img {
  width: 100%;
  display: block;
  border-radius: 20px;
}

.mirror-result-card.is-batch {
  cursor: default;
}

.mirror-batch-feedback-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.mirror-batch-feedback-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.mirror-batch-feedback-btn:hover { background: rgba(255, 255, 255, 0.12); }
.mirror-batch-feedback-btn.is-active { background: #fff; color: hsl(var(--fg)); }

.mirror-results-list--batch {
  gap: 20px;
}

.mirror-result-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

.mirror-result-card:hover .mirror-result-card-overlay { opacity: 1; }

.mirror-result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mirror-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: hsl(var(--fg));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
}

.mirror-action-btn:hover {
  transform: scale(1.05);
  background: #fff;
}

.mirror-action-btn.is-accent {
  background: #22c55e;
  color: #fff;
}

.mirror-action-btn.is-accent:hover { background: #16a34a; }

.mirror-result-feedback {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.mirror-feedback-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.92);
  color: hsl(var(--fg));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.mirror-feedback-btn:hover { background: #fff; }
.mirror-feedback-btn.is-active { background: hsl(var(--primary)); color: #fff; border-color: hsl(var(--primary)); }

.mirror-result-label {
  position: absolute;
  right: 16px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
  pointer-events: none;
}

.mirror-result-label-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* 底部重新生成 */
.mirror-result-footer {
  margin-top: 20px;
  padding-top: 4px;
}

.mirror-regen-all-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  background: #fff;
  color: hsl(var(--fg));
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mirror-regen-all-btn:hover { background: #fafafa; }
.mirror-regen-all-btn svg { color: #71717a; }

/* 查看大图 lightbox */
.mirror-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  cursor: zoom-out;
}

.mirror-lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.mirror-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mirror-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* 生成记录 */
.mirror-history-section {
  max-width: 1152px;
  margin: 48px auto 0;
  padding: 0 16px;
}

.mirror-history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mirror-history-title {
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--fg));
  margin: 0 0 4px;
}

.mirror-history-desc {
  font-size: 13px;
  color: hsl(var(--muted-fg));
  margin: 0;
}

.mirror-history-head-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.mirror-history-count {
  font-size: 12px;
  color: hsl(var(--muted-fg));
}

.mirror-history-all-link {
  font-size: 13px;
  color: hsl(var(--fg));
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--border));
  padding-bottom: 1px;
}

.mirror-history-all-link:hover { opacity: 0.8; }

.mirror-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.mirror-history-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.mirror-history-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.mirror-history-card.is-active {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

.mirror-history-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: hsl(var(--secondary));
}

.mirror-history-thumb-empty {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-fg));
  font-size: 12px;
}

.mirror-history-meta {
  padding: 10px 12px;
}

.mirror-history-name {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--fg));
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mirror-history-time {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 0;
}

/* 确认规划 */
.mirror-plan {
  padding: 8px 4px 16px;
  max-width: 520px;
  margin: 0 auto;
}

.mirror-plan-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: hsl(var(--secondary));
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--fg));
  margin-bottom: 12px;
}

.mirror-plan-title {
  font-size: 18px;
  font-weight: 700;
  color: hsl(var(--fg));
  margin: 0 0 6px;
}

.mirror-plan-sub {
  font-size: 13px;
  color: hsl(var(--muted-fg));
  margin: 0 0 16px;
}

.mirror-plan-analysis {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: hsl(var(--secondary));
  border-radius: 12px;
  list-style: none;
}

.mirror-plan-analysis li {
  font-size: 13px;
  color: hsl(var(--fg));
  line-height: 1.5;
  padding: 4px 0 4px 18px;
  position: relative;
}

.mirror-plan-analysis li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--primary));
}

.mirror-plan-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.mirror-plan-ref-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: hsl(var(--muted-fg));
}

.mirror-plan-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid hsl(var(--border));
}

.mirror-plan-thumb-empty {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: hsl(var(--muted-fg));
}

.mirror-plan-products {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mirror-plan-product-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: hsl(var(--muted-fg));
}

.mirror-plan-product-chip img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid hsl(var(--border));
}

.mirror-plan-sku-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: center;
  padding: 12px 0;
}

.mirror-plan-sku-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: hsl(var(--muted-fg));
}

.mirror-plan-sku-arrow {
  font-size: 20px;
  color: hsl(var(--muted-fg));
  font-weight: 300;
}

.mirror-plan-batch-pairs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mirror-plan-pair-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: hsl(var(--secondary));
}

.mirror-plan-pair-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: hsl(var(--muted-fg));
}

.mirror-plan-pair-arrow {
  font-size: 18px;
  color: hsl(var(--muted-fg));
  flex-shrink: 0;
}

.mirror-plan-params {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.mirror-plan-params span {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--fg));
}

.mirror-plan-actions {
  display: flex;
  gap: 12px;
}

.mirror-plan-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}

.mirror-plan-btn-ghost {
  background: #fff;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--fg));
}

.mirror-plan-btn-ghost:hover { background: hsl(var(--secondary)); }

.mirror-plan-btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
}

.mirror-plan-btn-primary:hover { opacity: 0.92; }

/* 批量结果分组 */
.mirror-results-batch {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mirror-batch-group {
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.mirror-batch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border));
}

.mirror-batch-source {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

.mirror-batch-head h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--fg));
}

.mirror-batch-head p {
  margin: 0;
  font-size: 12px;
  color: hsl(var(--muted-fg));
}

.mirror-batch-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mirror-batch-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mirror-batch-pair-grid .mirror-result-card.is-batch {
  min-width: 0;
}

@media (max-width: 640px) {
  .mirror-batch-pair-grid {
    grid-template-columns: 1fr;
  }
}

.mirror-batch-empty {
  font-size: 13px;
  color: hsl(var(--muted-fg));
  margin: 0;
  padding: 24px;
  text-align: center;
  background: hsl(var(--secondary));
  border-radius: 12px;
}

.mirror-results-sku-compare {
  margin-bottom: 16px;
  padding: 12px;
  background: hsl(var(--secondary));
  border-radius: 14px;
}

@media (max-width: 768px) {
  .mirror-result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .mirror-result-header-end {
    width: 100%;
    flex-wrap: wrap;
  }
  .mirror-project-note { max-width: 100%; flex: 1; min-width: 0; }
  .mirror-result-card-overlay { opacity: 1; background: rgba(0, 0, 0, 0.04); }
  .mirror-plan-actions { flex-direction: column; }
}

.mirror-partial-errors {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}
