body.wizard-page {
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.wizard-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: #F8F7FC;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-title h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: rgba(253, 181, 21, 0.16);
  color: #8A6100;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  color: var(--ink-faint);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.step-index-check {
  display: none;
  align-items: center;
  justify-content: center;
}

.step-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}

.step.is-active .step-index {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-color: transparent;
  color: #fff;
}

.step.is-active .step-label {
  color: var(--navy);
}

.step.is-done .step-index {
  background: var(--purple);
  border-color: transparent;
  color: #fff;
}

.step.is-done .step-index-number {
  display: none;
}

.step.is-done .step-index-check {
  display: inline-flex;
}

.step.is-done .step-label {
  color: var(--ink-muted);
}

.step-connector {
  width: 36px;
  height: 1px;
  background: var(--border-strong);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--navy);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.last-saved {
  font-size: 13px;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- Body ---------- */

.wizard-body {
  flex: 1;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.wizard-form {
  flex: 1 1 54%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

.form-field label {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.field-hint {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.form-field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-field input::placeholder {
  color: var(--ink-faint);
}

.form-field input:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(108, 96, 170, 0.12);
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  padding-right: 48px;
}

.emoji-btn {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.emoji-btn:hover {
  background: #F1EFF9;
  color: var(--purple);
}

/* ---------- Preview panel ---------- */

.wizard-preview {
  flex: 1 1 46%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 96px;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}

.meta-value {
  font-size: 13.5px;
  color: var(--ink-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-value.is-placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.preview-canvas {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  display: flex;
  justify-content: center;
}

.preview-mock {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 350px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.preview-mock.has-design {
  padding: 0;
}

.skel-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-chosen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.preview-chosen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(22, 23, 65, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.preview-chosen-overlay[hidden] {
  display: none;
}

.preview-mock.has-design:hover .preview-chosen-overlay,
.preview-chosen-overlay:focus-within {
  opacity: 1;
}

.chosen-action-btn {
  border: none;
  background: #fff;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.chosen-action-btn:hover {
  transform: translateY(-1px);
  background: #F1EFF9;
}

.skel {
  background: #ECEBF4;
  border-radius: 6px;
}

.skel-banner {
  height: 64px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, #ECEBF4 0%, #E3E1F0 50%, #ECEBF4 100%);
}

.skel-line {
  height: 9px;
}

.skel-line--wide {
  width: 100%;
}

.skel-line--mid {
  width: 70%;
}

.skel-line--narrow {
  width: 45%;
}

.skel-columns {
  display: flex;
  gap: 8px;
}

.skel-block {
  flex: 1;
  height: 46px;
}

.btn-select-design {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-select-design:hover {
  transform: translate(-50%, -50%) translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.05);
}

.btn-select-design[hidden] {
  display: none;
}

/* ---------- Footer ---------- */

.wizard-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.wizard-footer-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--navy);
}

.btn-primary-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary-solid:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.05);
}

/* Toast base styles live in style.css (shared); wizard pages just need extra
   clearance above their sticky footer bar. */

.wizard-page .toast {
  bottom: 88px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .wizard-body {
    flex-direction: column;
  }

  .wizard-preview {
    position: static;
    width: 100%;
  }

  .step-label {
    display: none;
  }

  .step-connector {
    width: 18px;
  }
}

@media (max-width: 640px) {
  .wizard-topbar {
    flex-wrap: wrap;
    padding: 14px 20px;
  }

  .wizard-steps {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }

  .wizard-body {
    padding: 28px 20px 48px;
  }

  .wizard-footer {
    padding: 14px 20px;
  }

  .wizard-footer--3col {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .wizard-footer-center {
    position: static;
    order: -1;
    width: 100%;
    transform: none;
    text-align: center;
    font-size: 13px;
  }
}
