/* ============================================================
   最忆·AI定制工作台 — 统一样式
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --bg-primary: #F5F0EB;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #FAF8F5;
  --bg-dark: #2C2520;

  --brand-primary: #C4A35A;
  --brand-light: #D4B876;
  --brand-dark: #A8893E;
  --brand-gradient: linear-gradient(135deg, #C4A35A, #D4B876);

  --text-primary: #2C2520;
  --text-secondary: #6B5B4F;
  --text-muted: #A39B94;
  --text-inverse: #FFFFFF;

  --success: #4B8B5C;
  --warning: #D4A537;
  --error: #C44B3B;
  --info: #5B7B9A;

  --border-light: #E8E2DB;
  --border-medium: #D4CCC3;
  --border-focus: #C4A35A;

  --shadow-sm: 0 1px 3px rgba(44,37,32,0.08);
  --shadow-md: 0 4px 12px rgba(44,37,32,0.1);
  --shadow-lg: 0 8px 24px rgba(44,37,32,0.12);
  --shadow-xl: 0 16px 48px rgba(44,37,32,0.16);

  --font-heading: 'Noto Serif SC', serif;
  --font-body: -apple-system, 'Noto Sans SC', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px;
  --text-lg: 18px; --text-xl: 22px; --text-2xl: 28px;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 24px; --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---- Global Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-dark);
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.05em;
}
.header-nav { display: flex; gap: var(--space-sm); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: var(--brand-gradient);
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: transparent;
  color: var(--brand-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1.5px solid var(--brand-primary);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-secondary:hover { background: var(--brand-primary); color: var(--text-inverse); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-inverse);
  font-size: var(--text-sm);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* ---- Main Layout ---- */
.main-content {
  flex: 1;
  margin-top: 56px;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.view-section { width: 100%; }
.view-hidden { display: none !important; }

.view-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.view-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.view-header .view-title { margin-bottom: 0; flex: 1; }
.btn-back {
  color: var(--text-secondary);
  border-color: var(--border-medium);
  font-size: var(--text-sm);
}
.btn-back:hover { color: var(--brand-primary); border-color: var(--brand-primary); }

/* ---- Selection Cards ---- */
.selection-group { margin-bottom: var(--space-2xl); }
.selection-label {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}
.selection-row {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.selection-card {
  width: 240px;
  height: 180px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.selection-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-light); }
.selection-card.selected { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(196,163,90,0.2); }
.card-icon { font-size: 36px; }
.card-name { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); }
.card-desc { font-size: var(--text-xs); color: var(--text-muted); }
.route-actions { display: flex; justify-content: center; margin-top: var(--space-xl); }

/* ---- Form Controls ---- */
.form-wrapper { max-width: 720px; margin: 0 auto; }
.form-section { margin-bottom: var(--space-xl); }
.form-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}
.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); margin-bottom: var(--space-xs); }
.form-label .required { color: var(--error); margin-left: 2px; }
.input-text, .select-dropdown {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.input-text:focus, .select-dropdown:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(196,163,90,0.15);
}
.form-actions { display: flex; justify-content: center; margin-top: var(--space-2xl); }
.btn-generate { min-width: 200px; font-size: var(--text-base); padding: 14px 40px; }

/* ---- File Upload ---- */
.file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.file-upload:hover { border-color: var(--brand-primary); background: rgba(196,163,90,0.04); }
.file-upload input[type="file"] { display: none; }
.file-upload-icon { font-size: 32px; }
.file-upload-text { font-size: var(--text-sm); color: var(--text-muted); }
.file-upload-preview { max-width: 200px; border-radius: var(--radius-sm); margin-top: var(--space-sm); }

/* ---- Tag Select ---- */
.tag-select { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.tag-item {
  padding: 6px 14px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-secondary);
}
.tag-item:hover { border-color: var(--brand-light); color: var(--brand-primary); }
.tag-item.selected { border-color: var(--brand-primary); background: rgba(196,163,90,0.1); color: var(--brand-dark); font-weight: 500; }

/* ---- Result Grid ---- */
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 880px;
  margin: 0 auto var(--space-xl);
}
.result-card {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}
.result-card img { width: 100%; height: 100%; object-fit: cover; }
.result-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44,37,32,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.result-card:hover .result-card-overlay { opacity: 1; }
.result-card-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,0.9);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}
.result-card-btn:hover { background: #fff; }
.result-card.selected { outline: 3px solid var(--brand-primary); outline-offset: 2px; }
.result-card.image-load-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff8f0;
  border: 1px solid rgba(180, 66, 45, 0.18);
}
.result-card.image-load-failed .result-card-overlay {
  opacity: 1;
  background: transparent;
}
.result-card-error {
  color: #9f3a2c;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(159,58,44,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.result-actions { display: flex; justify-content: center; margin-top: var(--space-lg); }

/* ---- Loading States ---- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245,240,235,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: 200;
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: var(--text-sm); color: var(--text-secondary); }

.loading-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
}
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-tertiary) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  width: 100%; height: 100%;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,37,32,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: var(--space-xl);
}
.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-xl); }

/* ---- Lightbox ---- */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-img {
  max-width: 80vw;
  max-height: 75vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: var(--shadow-xl);
}
.lightbox-actions { display: flex; gap: var(--space-md); }

/* ---- Prompt Display ---- */
.prompt-display {
  max-width: 880px;
  margin: 0 auto var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.prompt-display summary {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.prompt-display summary::-webkit-details-marker { display: none; }
.prompt-display summary::before { content: '▶ '; font-size: 10px; }
.prompt-display[open] summary::before { content: '▼ '; }
.prompt-text {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
  border-top: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  line-height: 1.7;
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: 72px;
  right: var(--space-xl);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-inverse);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast-info    { background: var(--info); }
.toast-success { background: var(--success); }
.toast-error   { background: var(--error); }
.toast-warning { background: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: var(--space-lg);
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .result-grid { max-width: 720px; }
}
@media (max-width: 1024px) {
  .main-content { padding: var(--space-xl) var(--space-md); }
  .selection-row { gap: var(--space-lg); }
  .selection-card { width: 200px; height: 160px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .form-wrapper { max-width: 100%; }
}
@media (max-width: 640px) {
  .result-grid { grid-template-columns: 1fr; max-width: 400px; }
  .selection-card { width: 160px; height: 140px; }
  .header-inner { padding: 0 var(--space-md); }
}

/* ============================================================
   向导UI样式 (Wizard UI)
   ============================================================ */

/* ---- 步骤指示器 ---- */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 120px;
}
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--border-medium);
}
.wizard-step.completed:not(:last-child)::after {
  background: var(--brand-primary);
}
.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-medium);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-normal);
  position: relative;
  z-index: 1;
}
.wizard-step.active .wizard-step-circle {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--text-inverse);
}
.wizard-step.completed .wizard-step-circle {
  background: var(--bg-secondary);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.wizard-step-label {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.wizard-step.active .wizard-step-label {
  color: var(--brand-primary);
  font-weight: 600;
}
.wizard-step.completed .wizard-step-label {
  color: var(--text-secondary);
}

/* ---- 步骤内容区 ---- */
.wizard-content {
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-md);
}

/* ---- 预设卡片网格 ---- */
.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-md);
}
.preset-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-sm) var(--space-md);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  min-width: 100px;
}
.preset-card:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}
.preset-card.selected {
  border-color: var(--brand-primary);
  background: rgba(196, 163, 90, 0.08);
  box-shadow: 0 0 0 1px var(--brand-primary);
}
.preset-card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.preset-card-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- 中间产物预览 ---- */
.step-result-preview {
  display: flex;
  justify-content: center;
  margin: var(--space-lg) auto;
  max-width: 300px;
}
.step-result-preview img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---- 步骤结果区 ---- */
.step-result-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

/* ---- 步骤导航 ---- */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border-light);
  gap: var(--space-sm);
}
.btn-wizard-prev {
  padding: var(--space-sm) var(--space-lg);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: var(--transition-fast);
}
.btn-wizard-prev:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.btn-wizard-next {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.btn-wizard-next:hover {
  background: var(--brand-dark);
  box-shadow: var(--shadow-md);
}
.btn-wizard-regen {
  padding: var(--space-sm) var(--space-lg);
  border: 1.5px solid #6366f1;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: #6366f1;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: var(--transition-fast);
}
.btn-wizard-regen:hover {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--shadow-sm);
}

/* === 变体配置行 === */
.variant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 8px;
  margin-bottom: 8px;
}
.variant-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  font-size: 13px;
  background: white;
}
.variant-row .variant-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 50px;
}
.variant-row .btn-remove-variant {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  transition: var(--transition-fast);
}
.variant-row .btn-remove-variant:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* === 变体结果网格 === */
.variant-results {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.variant-result-card {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 200px;
}
.variant-result-card:hover {
  box-shadow: var(--shadow-md);
}
.variant-result-card.selected {
  border-color: var(--brand-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.variant-result-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.variant-result-card .variant-label-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.3;
}

/* === 飞书同步按钮 === */
.btn-feishu-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 12px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-feishu-sync:hover {
  background: #f0f5ff;
  border-color: #4080ff;
  color: #4080ff;
}

/* === 添加变体按钮 === */
.btn-add-variant {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  border: 1px dashed var(--border-color, #d0d0d0);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 4px;
}
.btn-add-variant:hover {
  border-color: var(--brand-primary, #6366f1);
  color: var(--brand-primary, #6366f1);
  background: rgba(99, 102, 241, 0.04);
}

/* ===== 历史记录模态框 ===== */
.modal-history-content {
  width: 90vw;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-history-content .modal-title {
  margin-bottom: 0;
}
.modal-history-content .btn-ghost {
  color: var(--text-primary, #1a1a1a);
  border-color: var(--border-color, #e5e0d8);
}
.modal-history-content .btn-ghost:hover {
  background: rgba(0,0,0,0.05);
  border-color: var(--text-muted, #999);
}
.modal-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e5e0d8);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.modal-history-actions {
  display: flex;
  gap: 8px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.history-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e5e0d8);
  border-radius: 10px;
  background: #fff;
  transition: var(--transition-fast);
}
.history-card:hover {
  border-color: var(--brand-primary, #6366f1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.history-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f5f5f5;
}
.history-card-info {
  flex: 1;
  min-width: 0;
}
.history-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-card-time {
  font-size: 12px;
  color: var(--text-muted, #999);
  margin-top: 2px;
}
.history-card-count {
  font-size: 12px;
  color: var(--text-muted, #999);
}
.history-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.history-card-actions .btn-ghost {
  font-size: 13px;
  padding: 4px 10px;
}
.btn-history-del {
  color: #e74c3c !important;
}
.btn-clear-history {
  color: #e74c3c !important;
  font-size: 13px !important;
}
.history-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted, #999);
  font-size: 14px;
}

/* ---- 设计图结果区域 ---- */
.design-result-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-color, #e5e0d8); }
.design-result-title { font-family: var(--font-serif, 'Noto Serif SC', serif); font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary, #1a1a1a); }
.design-result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 880px; margin: 0 auto 20px; }
.design-result-grid img { width: 100%; border-radius: 8px; cursor: pointer; transition: transform 0.2s; }
.design-result-grid img:hover { transform: scale(1.02); }
.design-result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
@media (max-width: 640px) { .design-result-grid { grid-template-columns: 1fr; } }
