.product-video-workspace {
  max-width: 1280px;
  height: calc(100vh - 180px);
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 28px;
}

.product-video-workspace[hidden] { display: none !important; }

body.handheld-product-active .product-video-only,
body.handheld-product-active #productAcceptModelImage { display: none !important; }
body.handheld-product-active .product-parameter-section { display: none !important; }
body:not(.handheld-product-active) #productHandheldNextStep { display: none !important; }

.product-control-panel,
.product-preview-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.product-control-panel {
  min-width: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 24px 26px;
}

.product-panel-heading,
.product-preview-heading,
.product-section-label-row,
.product-image2-head,
.product-param-row,
.product-source-card,
.product-fixed-model > div {
  display: flex;
  align-items: center;
}

.product-panel-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.product-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-size: 18px;
  font-weight: 700;
}

.product-panel-title iconify-icon { color: #2563eb; font-size: 20px; }

.product-step-caption {
  padding: 4px 9px;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.product-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.product-mode-card {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 11px;
  color: #475569;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}

.product-mode-card:hover { border-color: #93c5fd; }
.product-mode-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .08);
}

.product-mode-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
}

.product-mode-card.active .product-mode-icon { color: #2563eb; background: #dbeafe; }
.product-mode-card strong { display: block; color: #334155; font-size: 12px; line-height: 1.35; }
.product-mode-card small { display: block; margin-top: 3px; color: #94a3b8; font-size: 10px; line-height: 1.35; }
.product-mode-check { display: none; position: absolute; right: 7px; top: 7px; color: #2563eb; font-size: 14px; }
.product-mode-card.active .product-mode-check { display: block; }

.product-model-source-block {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}
.product-model-source-block[hidden] { display: none !important; }
.product-subchoice-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.product-subchoice-title strong { color: #334155; font-size: 12px; }
.product-subchoice-title span { color: #94a3b8; font-size: 9px; }
.product-model-source-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-model-source-card {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 9px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  color: #475569;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.product-model-source-card:hover { border-color: #93c5fd; }
.product-model-source-card.active { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px rgba(59, 130, 246, .07); }
.product-model-source-icon { width: 26px; height: 26px; flex: 0 0 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #64748b; background: #f1f5f9; }
.product-model-source-card.active .product-model-source-icon { color: #2563eb; background: #dbeafe; }
.product-model-source-card strong { display: block; padding-right: 10px; color: #334155; font-size: 10px; line-height: 1.35; }
.product-model-source-card small { display: block; margin-top: 2px; color: #2563eb; font-size: 9px; font-weight: 600; }
.product-model-source-check { display: none; position: absolute; right: 6px; top: 6px; color: #2563eb; font-size: 13px; }
.product-model-source-card.active .product-model-source-check { display: block; }

.product-fixed-model {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.product-fixed-model > label,
.product-param-row > label {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.product-fixed-model > div {
  min-width: 0;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  color: #334155;
  background: #f8fafc;
  font-size: 12px;
}

.product-fixed-model > div > span:not(.product-model-lock) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-fixed-model iconify-icon { color: #2563eb; font-size: 16px; }
.product-model-lock { padding: 2px 6px; border-radius: 999px; color: #64748b; background: #e2e8f0; font-size: 9px; }
.product-fixed-model-bottom { margin: 0 0 14px; padding-top: 14px; border-top: 1px solid #eef2f7; }

.product-form-section { margin-bottom: 18px; }
.product-section-label-row { justify-content: space-between; margin-bottom: 8px; }
.product-section-label-row label { color: #334155; font-size: 13px; font-weight: 700; }
.product-section-label-row label em { color: #ef4444; font-style: normal; }
.product-prompt-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.product-prompt-meta > span { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.product-section-label-row b { font-weight: 500; }
.product-ai-write-prompt {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  color: #7c3aed;
  background: #faf5ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s;
}
.product-ai-write-prompt:hover:not(:disabled) { border-color: #8b5cf6; color: #6d28d9; background: #f3e8ff; }
.product-ai-write-prompt:disabled { color: #a8b4c5; border-color: #e2e8f0; background: #f8fafc; cursor: not-allowed; }
.product-ai-write-prompt iconify-icon { font-size: 15px; }
.product-ai-write-status { min-height: 0; margin-bottom: 0; }
.product-spin { animation: product-spin .8s linear infinite; }
@keyframes product-spin { to { transform: rotate(360deg); } }

.product-upload-zone {
  width: 100%;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 11px;
  color: #64748b;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .18s, background-color .18s;
}

.product-upload-zone:hover,
.product-upload-zone.dragover { border-color: #60a5fa; background: #eff6ff; }
.product-upload-zone:disabled { cursor: wait; opacity: .7; }
.product-upload-icon { color: #8ca0bb; font-size: 34px; line-height: 1; }
.product-upload-zone strong { margin-top: 7px; color: #64748b; font-size: 12px; font-weight: 600; }
.product-upload-zone small { margin-top: 6px; color: #a8b4c5; font-size: 9px; }

.product-source-card {
  gap: 10px;
  padding: 9px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
}
.product-source-card[hidden] { display: none !important; }
.product-source-card img { width: 52px; height: 52px; border-radius: 7px; border: 1px solid #e2e8f0; object-fit: cover; background: #fff; }
.product-source-card > div { min-width: 0; flex: 1; }
.product-source-card strong,
.product-source-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-source-card strong { color: #334155; font-size: 12px; }
.product-source-card small { margin-top: 4px; color: #94a3b8; font-size: 10px; }
.product-source-card button { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; color: #94a3b8; background: transparent; cursor: pointer; }
.product-source-card button:hover { color: #ef4444; background: #fee2e2; }

.product-field-hint { min-height: 16px; margin-top: 6px; color: #64748b; font-size: 10px; line-height: 1.5; }
.product-field-hint.error { color: #dc2626; }
.product-field-hint.success { color: #059669; }

.product-assist-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #c4b5fd;
  border-radius: 9px;
  color: #7c3aed;
  background: #f5f3ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.product-assist-link:hover { border-color: #8b5cf6; background: #ede9fe; }

.product-info-note,
.product-aspect-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border-radius: 8px;
  line-height: 1.55;
}
.product-info-note[hidden], .product-aspect-warning[hidden] { display: none !important; }
.product-info-note { margin-top: 9px; padding: 9px 10px; color: #64748b; background: #f1f5f9; font-size: 10px; }
.product-info-note iconify-icon { flex: 0 0 auto; margin-top: 1px; color: #3b82f6; }

.product-image2-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 14px 14px 16px;
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  background: #faf8ff;
}
.product-image2-section[hidden] { display: none !important; }
.product-image2-head { justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.product-image2-head > div { display: flex; align-items: center; gap: 7px; }
.product-image2-head > div span { padding: 3px 6px; border-radius: 999px; color: #7c3aed; background: #ede9fe; font-size: 9px; font-weight: 700; }
.product-image2-head strong { color: #3f3a55; font-size: 12px; }
.product-image2-head > span { color: #8b5cf6; font-size: 9px; }
.product-handheld-method { display: grid; gap: 8px; margin-bottom: 10px; }
.product-handheld-method > span { color: #4c4666; font-size: 10px; font-weight: 700; }
.product-handheld-method > div,
.product-pose-source-mode {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.product-handheld-method button,
.product-pose-source-mode button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #6b6283;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.product-handheld-method button.active,
.product-pose-source-mode button.active { color: #7c3aed; border-color: #8b5cf6; background: #f3e8ff; box-shadow: 0 0 0 2px rgba(139, 92, 246, .08); }
.product-handheld-method button:disabled,
.product-pose-source-mode button:disabled { cursor: not-allowed; opacity: .6; }
.product-pose-reference {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}
.product-pose-reference > *,
#productSystemPoseSection,
#productCustomPoseSection {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.product-pose-reference:not([hidden]) { margin-bottom: 12px; }
.product-pose-reference[hidden],
#productSmartModelSettings[hidden],
#productSystemPoseSection[hidden],
#productCustomPoseSection[hidden] { display: none !important; }
.product-pose-scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.product-pose-scene {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #4c4666;
  background: #fff;
  cursor: pointer;
}
.product-pose-scene img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #f8fafc; }
.product-pose-scene span { display: block; padding: 6px 7px; overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.product-pose-scene.active { border-color: #8b5cf6; box-shadow: 0 0 0 2px rgba(139, 92, 246, .1); }
.product-pose-empty { margin: 0; padding: 10px; border-radius: 8px; color: #8b7da8; background: #faf8ff; font-size: 9px; line-height: 1.55; text-align: center; }
.product-pose-upload,
.product-pose-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  padding: 9px;
  border: 1px dashed #c4b5fd;
  border-radius: 8px;
  color: #6b6283;
  background: #fff;
  text-align: left;
}
.product-pose-upload { cursor: pointer; }
.product-pose-upload:hover,
.product-pose-upload.dragover { border-color: #8b5cf6; background: #faf5ff; }
.product-pose-upload:disabled { cursor: wait; opacity: .65; }
.product-pose-upload > iconify-icon { flex: 0 0 auto; color: #8b5cf6; font-size: 25px; }
.product-pose-upload span { min-width: 0; flex: 1; overflow: hidden; }
.product-pose-upload strong,
.product-pose-upload small { display: block; }
.product-pose-upload strong { color: #4c4666; font-size: 10px; }
.product-pose-upload small { margin-top: 2px; color: #9b91ad; font-size: 8px; }
.product-pose-card { border-style: solid; }
.product-pose-card[hidden] { display: none !important; }
.product-pose-card img { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 7px; object-fit: cover; background: #f8fafc; }
.product-pose-card > div { min-width: 0; flex: 1; }
.product-pose-card strong,
.product-pose-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-pose-card strong { color: #4c4666; font-size: 10px; }
.product-pose-card small { margin-top: 3px; color: #9b91ad; font-size: 8px; }
.product-pose-card button { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; color: #a78bfa; background: transparent; cursor: pointer; }
.product-pose-card button:hover { color: #dc2626; background: #fef2f2; }
.product-pose-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: #8b7da8; font-size: 8px; line-height: 1.6; }
.product-pose-note iconify-icon { flex: 0 0 auto; margin-top: 1px; color: #8b5cf6; }
.product-prompt {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  resize: none;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  color: #334155;
  background: #fff;
  outline: none;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.product-prompt::-webkit-scrollbar { width: 6px; height: 6px; }
.product-prompt::-webkit-scrollbar-track { background: transparent; }
.product-prompt::-webkit-scrollbar-thumb { border-radius: 999px; background: #cbd5e1; }
.product-prompt::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.product-prompt:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, .08); }

.product-model-options,
#productSmartModelSettings { display: grid; gap: 10px; }
.product-model-setting-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 3px; border-radius: 9px; background: #ede9fe; }
.product-model-setting-mode button { padding: 7px 8px; border: 0; border-radius: 7px; color: #7c6f9b; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.product-model-setting-mode button.active { color: #7c3aed; background: #fff; box-shadow: 0 1px 4px rgba(76, 29, 149, .12); }
.product-model-setting-mode button:disabled { cursor: not-allowed; opacity: .6; }
.product-model-preset-fields { display: grid; gap: 10px; }
.product-model-preset-fields[hidden], .product-model-custom-fields[hidden] { display: none !important; }
.product-model-option-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; }
.product-model-option-row > span { color: #4c4666; font-size: 10px; font-weight: 700; }
.product-model-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.product-model-chip {
  min-width: 58px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #6b6283;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.product-model-chip:hover { border-color: #a78bfa; color: #7c3aed; }
.product-model-chip.active { border-color: #8b5cf6; color: #7c3aed; background: #f3e8ff; box-shadow: 0 0 0 2px rgba(139, 92, 246, .08); }
.product-model-chip:disabled { cursor: not-allowed; opacity: .6; }
.product-model-select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #4c4666;
  background: #fff;
  outline: none;
  font-size: 10px;
  cursor: pointer;
}
.product-model-select:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .08); }
.product-model-select:disabled { cursor: not-allowed; opacity: .6; }
.product-model-custom-fields { display: grid; gap: 8px; }
.product-model-custom-fields label { color: #4c4666; font-size: 10px; font-weight: 700; }
.product-model-custom-fields label em { color: #ef4444; font-style: normal; }
.product-model-custom-fields textarea { width: 100%; min-height: 88px; box-sizing: border-box; overflow: hidden; resize: none; padding: 9px 10px; border: 1px solid #ddd6fe; border-radius: 8px; color: #4c4666; background: #fff; outline: none; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.product-model-custom-fields textarea:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .08); }
.product-model-custom-fields > p { margin: 0; color: #8b7da8; font-size: 9px; line-height: 1.5; }
.product-model-custom-fields > .product-model-validation { color: #dc2626; font-weight: 600; }

.product-secondary-action,
.product-primary-action,
.product-review-actions button,
.product-review-actions a,
.product-video-result button,
.product-preview-error button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
}
.product-secondary-action { width: 100%; min-height: 40px; margin-top: 12px; padding: 10px; border: 0; color: #fff; background: #7c3aed; font-size: 11px; }
.product-secondary-action:hover { background: #6d28d9; }
.product-secondary-action:disabled { cursor: wait; opacity: .65; }

.product-prompt { min-height: 104px; max-height: 132px; padding: 11px 12px; font-size: 11px; }

.product-image2-section > .product-handheld-aspect-row {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e9e2ff;
}
.product-image2-section > .product-handheld-aspect-row > label { color: #4c4666; }
.product-image2-section > .product-aspect-warning { margin: 8px 0 0; }
.product-image2-section > .product-handheld-aspect-row + .product-aspect-warning + .product-secondary-action,
.product-image2-section > .product-handheld-aspect-row + .product-secondary-action { margin-top: 12px; }

.product-parameter-section { padding-top: 15px; border-top: 1px solid #eef2f7; }
.product-param-row { gap: 12px; margin-bottom: 12px; }
.product-param-row > label { width: 66px; flex: 0 0 66px; }
.product-option-group { flex: 1; display: flex; gap: 6px; }
.product-option-group button {
  min-width: 0;
  min-height: 34px;
  flex: 1;
  padding: 7px 5px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #64748b;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.product-option-group button:hover { color: #2563eb; border-color: #93c5fd; }
.product-option-group button.active { color: #2563eb; border-color: #60a5fa; background: #eff6ff; }
.product-resolution-options { max-width: 190px; }
.product-aspect-warning { margin: -5px 0 11px 78px; padding: 7px 8px; color: #b45309; background: #fffbeb; font-size: 9px; }
.product-aspect-warning iconify-icon { flex: 0 0 auto; margin-top: 1px; }
.product-range-wrap { flex: 1; display: flex; align-items: center; gap: 12px; }
.product-range-wrap input { flex: 1; accent-color: #2563eb; }
.product-range-wrap span { min-width: 42px; color: #2563eb; font-size: 11px; font-weight: 600; }

.product-primary-action {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .18);
  font-size: 13px;
}
.product-primary-action:hover:not(:disabled) { background: #1d4ed8; }
.product-primary-action:disabled { color: #cbd5e1; background: #e2e8f0; box-shadow: none; cursor: not-allowed; }

.product-preview-panel {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
}

.product-preview-heading {
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
}
.product-preview-heading > div { min-width: 0; }
.product-preview-heading strong,
.product-preview-heading span { display: block; }
.product-preview-heading strong { color: #1e293b; font-size: 16px; }
.product-preview-heading > div > span { margin-top: 4px; color: #94a3b8; font-size: 10px; }
.product-preview-badge { flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; color: #059669; background: #ecfdf5; font-size: 9px; font-weight: 600; }

.product-preview-empty,
.product-preview-source,
.product-image-review,
.product-preview-progress,
.product-video-result,
.product-preview-error {
  flex: 1;
  min-height: 0;
}
.product-preview-empty[hidden],
.product-preview-source[hidden],
.product-image-review[hidden],
.product-preview-progress[hidden],
.product-video-result[hidden],
.product-preview-error[hidden] { display: none !important; }

.product-preview-empty,
.product-preview-source,
.product-preview-progress,
.product-video-result,
.product-preview-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.product-preview-hero-icon,
.product-progress-icon,
.product-preview-error > span {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 30px;
}
.product-preview-hero-icon { color: #2563eb; background: #eff6ff; }
.product-preview-empty > strong { margin-top: 16px; color: #334155; font-size: 17px; }
.product-preview-empty > p { max-width: 480px; margin-top: 7px; color: #94a3b8; font-size: 11px; }
.product-flow-steps { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.product-flow-steps > div { width: 126px; min-height: 102px; display: flex; flex-direction: column; align-items: center; padding: 13px 10px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.product-flow-steps > div > span { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #3b82f6; font-size: 10px; font-weight: 700; }
.product-flow-steps strong { margin-top: 9px; color: #475569; font-size: 11px; }
.product-flow-steps small { margin-top: 4px; color: #94a3b8; font-size: 9px; }
.product-flow-steps > iconify-icon { color: #bfdbfe; font-size: 18px; }

.product-preview-stage-label { margin-bottom: 12px; color: #64748b; font-size: 10px; font-weight: 600; }
.product-preview-image-frame { width: min(420px, 80%); height: min(470px, calc(100% - 150px)); min-height: 280px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.product-preview-image-frame img { width: 100%; height: 100%; object-fit: contain; }
.product-preview-source > strong { margin-top: 13px; color: #334155; font-size: 13px; }
.product-preview-source > p { margin-top: 5px; color: #94a3b8; font-size: 10px; }

.product-image-review { display: flex; flex-direction: column; justify-content: center; padding: 16px 0 4px; }
.product-review-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.product-review-grid > div { min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 8px; }
.product-review-grid > div > span { color: #64748b; font-size: 10px; font-weight: 600; text-align: center; }
.product-review-grid > div > div { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.product-review-grid img { width: 100%; height: 100%; object-fit: contain; }
.product-review-arrow { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #2563eb; background: #dbeafe; }
.product-review-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 14px; }
.product-review-actions button,
.product-review-actions a { padding: 9px 12px; border: 1px solid #dbe3ef; color: #475569; background: #fff; font-size: 10px; text-decoration: none; }
.product-review-actions button:hover,
.product-review-actions a:hover { color: #2563eb; border-color: #93c5fd; background: #eff6ff; }
.product-review-actions .product-review-primary { color: #fff; border-color: #2563eb; background: #2563eb; }
.product-review-actions .product-review-primary:hover { color: #fff; background: #1d4ed8; }

.product-handheld-next-step {
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}
.product-handheld-next-step[hidden] { display: none !important; }
.product-handheld-next-step > div:first-child { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 9px; text-align: left; }
.product-handheld-next-step > div:first-child > span { grid-row: 1 / 3; align-self: start; padding: 4px 8px; border-radius: 999px; color: #2563eb; background: #dbeafe; font-size: 11px; font-weight: 700; }
.product-handheld-next-step strong { color: #1e293b; font-size: 14px; line-height: 1.4; }
.product-handheld-next-step small { grid-column: 2; color: #64748b; font-size: 12px; line-height: 1.5; }
.product-handheld-next-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-top: 12px; }
.product-handheld-next-actions button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 9px; color: #475569; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.product-handheld-next-actions .product-review-primary { color: #fff; border-color: #2563eb; background: #2563eb; }
.product-handheld-next-actions .product-review-primary:hover { background: #1d4ed8; }
.product-handheld-next-step > p { min-height: 0; margin: 8px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; text-align: center; }
.product-handheld-next-step > p:empty { display: none; }

/* 手持商品结果按图片、操作、下一步、历史记录顺序自然排列，内容过高时滚动而不叠压。 */
body.handheld-product-active .product-preview-panel {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body.handheld-product-active .product-preview-heading,
body.handheld-product-active .product-image-review,
body.handheld-product-active .product-review-grid,
body.handheld-product-active .product-review-actions,
body.handheld-product-active .product-handheld-next-step {
  flex: 0 0 auto;
}
body.handheld-product-active .product-image-review {
  min-height: auto;
  justify-content: flex-start;
  padding-bottom: 0;
}
body.handheld-product-active .product-review-grid {
  min-height: auto;
  align-items: stretch;
}
body.handheld-product-active .product-review-grid > div {
  height: auto;
  min-height: 0;
}
body.handheld-product-active .product-review-grid > div > div {
  height: clamp(360px, 48vh, 520px);
  min-height: 0;
  flex: 0 0 auto;
}
body.handheld-product-active .product-review-actions {
  position: static;
  width: 100%;
  box-sizing: border-box;
}

body.handheld-product-active #historyList { padding: 8px 0; }
body.handheld-product-active .product-handheld-history-item { gap: 8px; }
body.handheld-product-active .product-handheld-history-item .history-item-top > iconify-icon { flex: 0 0 auto; color: #6366f1; font-size: 17px; }
body.handheld-product-active .product-handheld-history-item .history-thumb {
  width: 100%;
  height: 148px;
  max-height: none;
  border-radius: 7px;
  background: #f8fafc;
  object-fit: cover;
}
body.handheld-product-active .product-handheld-history-item .history-del-btn { display: inline-flex; align-items: center; justify-content: center; }
.product-handheld-history-empty { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; color: #94a3b8; text-align: center; }
.product-handheld-history-empty iconify-icon { font-size: 24px; }
.product-handheld-history-empty span { font-size: 12px; white-space: nowrap; }
body.handheld-product-active .history-sidebar.collapsed .product-handheld-history-item { padding: 10px; }
body.handheld-product-active .history-sidebar.collapsed .product-handheld-history-item .history-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
body.handheld-product-active .history-sidebar.collapsed .product-handheld-history-empty { min-height: 72px; padding: 12px 0; }
body.handheld-product-active .history-sidebar.collapsed .product-handheld-history-empty span { display: none; }

.product-progress-icon { color: #2563eb; background: #eff6ff; }
.product-progress-icon iconify-icon { animation: product-spin 1s linear infinite; }
.product-preview-progress > strong { margin-top: 15px; color: #334155; font-size: 15px; }
.product-preview-progress > p { margin-top: 6px; color: #94a3b8; font-size: 10px; }
.product-preview-progress > div { width: min(380px, 72%); height: 6px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.product-preview-progress > div > span { display: block; width: 10%; height: 100%; border-radius: inherit; background: #3b82f6; transition: width .5s ease; }
@keyframes product-spin { to { transform: rotate(360deg); } }

.product-result-frame { width: min(560px, 88%); height: min(520px, calc(100% - 140px)); min-height: 300px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: #0f172a; }
.product-result-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.product-video-result > strong { margin-top: 13px; color: #334155; font-size: 14px; }
.product-video-result > p { margin-top: 5px; color: #94a3b8; font-size: 10px; }
.product-video-result > div:last-child { display: flex; gap: 9px; margin-top: 12px; }
.product-video-result button { padding: 9px 14px; border: 1px solid #dbe3ef; color: #475569; background: #fff; font-size: 10px; }
.product-video-result button:first-child { color: #fff; border-color: #2563eb; background: #2563eb; }

.product-preview-error > span { color: #dc2626; background: #fef2f2; }
.product-preview-error > strong { margin-top: 14px; color: #334155; font-size: 15px; }
.product-preview-error > p { max-width: 420px; margin-top: 7px; color: #64748b; font-size: 10px; line-height: 1.6; }
.product-preview-error button { margin-top: 15px; padding: 9px 15px; border: 1px solid #fecaca; color: #dc2626; background: #fff; font-size: 10px; }

@media (max-width: 1180px) {
  .product-video-workspace { grid-template-columns: 390px minmax(0, 1fr); gap: 18px; }
  .product-control-panel, .product-preview-panel { padding: 20px; }
  .product-flow-steps { gap: 8px; }
  .product-flow-steps > div { width: 110px; }
}

@media (max-width: 1023px) {
  .product-video-workspace { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .product-control-panel { height: auto; overflow: visible; }
  .product-preview-panel { min-height: 620px; }
}

@media (max-width: 640px) {
  body.product-video-active .history-sidebar { display: none !important; }
  .product-mode-selector, .product-model-source-selector { grid-template-columns: 1fr; }
  .product-model-chip-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-model-chip { min-width: 0; }
  .product-video-workspace { gap: 14px; }
  .product-control-panel, .product-preview-panel { padding: 16px; border-radius: 11px; }
  .product-preview-panel { min-height: 540px; }
  .product-flow-steps { width: 100%; flex-direction: column; }
  .product-flow-steps > div { width: 100%; min-height: 82px; }
  .product-flow-steps > iconify-icon { transform: rotate(90deg); }
  .product-review-grid { grid-template-columns: 1fr; }
  .product-review-grid > div { min-height: 210px; }
  .product-review-arrow { margin: 0 auto; transform: rotate(90deg); }
  .product-fixed-model { grid-template-columns: 1fr; }
  .product-param-row { align-items: flex-start; flex-direction: column; }
  .product-param-row > label { width: auto; flex-basis: auto; }
  .product-option-group, .product-range-wrap { width: 100%; }
  .product-aspect-warning { margin-left: 0; }
  .product-handheld-next-actions { grid-template-columns: 1fr; }
}
