/* ── Generator ───────────────────────────────────────────── */

.gen-root {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Progress stepper */
.stepper {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 40px;
}
.step-item {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.step-item:last-child { flex: 0; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 600; flex-shrink: 0;
  transition: all var(--dur-mid) var(--ease);
  border: 2px solid var(--border-2); color: var(--ink-4);
  background: var(--white);
}
.step-circle.active { border-color: var(--blue); color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 4px var(--blue-ring); }
.step-circle.done { border-color: var(--blue); background: var(--blue); color: #fff; }
.step-label { font-size: 0.8125rem; font-weight: 500; color: var(--ink-4); transition: color var(--dur-mid); white-space: nowrap; }
.step-label.active { color: var(--blue); }
.step-label.done  { color: var(--ink-2); }
.step-line { flex: 1; height: 1px; background: var(--border-2); margin: 0 12px; }
.step-line.done { background: var(--blue); }

/* Step panels */
.step-panel { display: none; }
.step-panel.active { display: block; animation: fade-up 0.3s var(--ease-out) both; }

/* Step 1: Input */
.step-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 6px; }
.step-desc  { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 32px; }
.gen-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.gen-input-full { margin-bottom: 16px; }

/* Step 2: Style selection */
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.style-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 16px; text-align: center;
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
  position: relative;
}
.style-card:hover { border-color: var(--ink-5); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.style-card.selected { border-color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 3px var(--blue-ring); }
.style-card-check {
  position: absolute; top: 10px; right: 10px;
  width: 18px; height: 18px; background: var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0); transition: all var(--dur-fast) var(--ease-spring);
}
.style-card.selected .style-card-check { opacity: 1; transform: scale(1); }
.style-preview { font-size: 1.8rem; color: var(--ink-2); line-height: 1.1; margin-bottom: 8px; min-height: 50px; display: flex; align-items: center; justify-content: center; }
.style-name { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.style-font-hint { font-size: 0.65rem; color: var(--ink-4); margin-top: 2px; }

/* Premium card variants */
.style-card--premium {
  border-color: rgba(184,134,11,0.28);
  background: linear-gradient(135deg, #fffdf5 0%, #fff8e8 100%);
}
.style-card--premium:hover {
  border-color: rgba(184,134,11,0.55);
  box-shadow: 0 4px 18px rgba(184,134,11,0.18);
}
.style-card--premium.selected {
  border-color: #b8860b;
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.22);
}

/* Step 3: Generated variations */
.variations-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.variation-card {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--r-lg);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: all var(--dur-fast) var(--ease); position: relative; overflow: hidden;
}
.variation-card:hover { border-color: var(--ink-5); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.variation-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.variation-card-check {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; background: var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0); transition: all var(--dur-fast) var(--ease-spring);
  z-index: 1;
}
.variation-card.selected .variation-card-check { opacity: 1; transform: scale(1); }
.variation-sig { width: 100%; overflow: hidden; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.variation-sig svg { max-width: 100%; }
.variation-number { font-size: 0.7rem; font-weight: 600; color: var(--ink-4); margin-top: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

/* Regenerate */
.gen-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.gen-hint { font-size: 0.8125rem; color: var(--ink-3); }

/* Step 4: Training sheet preview */
.training-preview {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 32px;
}
.training-preview-inner { padding: 40px; }
.training-header { margin-bottom: 32px; }
.training-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 4px; }
.training-name  { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.training-sig-demo { text-align: center; padding: 24px; border: 1px dashed var(--border-2); border-radius: var(--r-md); margin-bottom: 32px; }
.training-sig-demo-label { font-size: 0.7rem; font-weight: 600; color: var(--ink-4); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.training-lines { display: flex; flex-direction: column; gap: 16px; }
.training-line-group { position: relative; }
.training-line-sig { font-size: 2rem; color: rgba(0,0,0,0.08); overflow: hidden; white-space: nowrap; }
.training-line-rule { height: 1px; background: #e5e7eb; margin-top: 4px; }
.training-line-rule-2 { height: 1px; background: #f3f4f6; margin-top: 28px; }

/* Step 5: Export */
.export-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 32px; }
.export-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  transition: all var(--dur-fast) var(--ease); text-decoration: none;
}
.export-card:hover { box-shadow: var(--shadow-md); border-color: var(--ink-5); transform: translateY(-2px); }
.export-card-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.export-card-title { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.export-card-desc  { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.5; }
.export-card-badge { background: var(--bg-2); color: var(--ink-3); font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: var(--r-full); letter-spacing: 0.04em; }

/* Navigation buttons */
.step-nav { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); }

/* Generating animation */
.generating-overlay {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 20px;
}
.generating-dots { display: flex; gap: 8px; }
.generating-dot {
  width: 8px; height: 8px; background: var(--blue); border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.generating-dot:nth-child(2) { animation-delay: 0.2s; }
.generating-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }

/* Responsive generator */
@media (max-width: 1024px) {
  .gen-root { grid-template-columns: 200px 1fr; }
  .style-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .gen-root { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .variations-grid { grid-template-columns: repeat(2, 1fr); }
  .export-grid { grid-template-columns: 1fr; }
  .gen-input-grid { grid-template-columns: 1fr; }
  
  /* Stepper mobile refinement - perfectly aligned, transparent scrollbar */
  .stepper {
    overflow-x: auto;
    padding: 8px 4px;
    margin-bottom: 28px;
    justify-content: space-between;
    gap: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }
  .stepper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }
  .step-item {
    flex: 1;
    justify-content: center;
    gap: 0;
  }
  .step-item:last-child {
    flex: 0;
  }
  .step-label {
    display: none !important; /* Hide inline labels for clean symmetry */
  }
  .step-line {
    margin: 0 8px;
  }
}
@media (max-width: 480px) {
  .variations-grid { grid-template-columns: 1fr; }
}
