/* Wizard refined to match the provided design more closely while preserving existing JS hooks */

.wizard-body {
  background: linear-gradient(145deg,
      #FFFCF1 0%,
      #E2EEF3 50%,
      #FCF2FF 100%);
  min-height: 100vh;
}

.navbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#progress-wrap {
  display: flex;
  justify-content: center;
  padding: 22px 24px 0;
}

.progress-card {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  padding: 16px 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  width: 100%;
  max-width: 490px;
  box-shadow: none;
  border: 1px solid rgba(237, 232, 255, 0.9);
}

.progress-label {
  font-size: 14px;
  color: #4a4a57;
  font-weight: 500;
}

.progress-pills {
  display: flex;
  gap: 6px;
  width: 100%;
}

.pill {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e8e3f4;
  transition: background .28s ease, opacity .28s ease;
}

.pill.done {
  background: #8467ff;
}

.pill.active {
  background: #b9a7ff;
}

.wizard-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 140px;
}

.step {
  display: none;
  width: 100%;
  max-width: 840px;
  padding-top: 38px;
  animation: fadeUp .32s ease;
}

.step.active {
  display: block;
}
#step-3 {
  max-width: 1100px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-family: var(--fd);
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 900;
  color: #16161b;
  line-height: 1.08;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.step-sub {
  font-size: 16px;
  color: #525064;
  text-align: center;
  line-height: 1.55;
}

.step-sub--tight {
  margin-bottom: 26px;
}

.step-sub2 {
  font-size: 14px;
  color: #8c889f;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 26px;
}

/* Micro-copy — warm acknowledgment line shown at top of each step */
.step-microcopy {
  font-size: 13px;
  font-weight: 500;
  color: #886cff;
  text-align: center;
  letter-spacing: .01em;
  min-height: 18px;
  margin-bottom: 16px;
}

/* Superpower guiding question — appears before the superpower chips */
.step-intro-q {
  font-size: 15px;
  color: #4a4560;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 12px;
  font-style: italic;
}

.s1-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.s1-book-img {
  width: 190px;
  height: auto;
  margin-bottom: 34px;
  filter: drop-shadow(0 10px 26px rgba(136, 108, 255, .22));
  animation: float 3.8s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.btn-start {
  margin-top: 36px;
  background: linear-gradient(90deg, #6d59d8 0%, #8367f0 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 18px 72px;
  font-family: var(--fd);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(122, 101, 230, .18);
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
}

.chip {
  background: #fff;
  border: 1px solid #e2dcef;
  border-radius: 14px;
  padding: 12px 18px;
  color: #22212a;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: .22s ease;
  box-shadow: none;
}

.chip:hover {
  border-color: #8a73ff;
  background: #f6f3ff;
}

.chip.selected {
  background: #8467ff;
  border-color: #8467ff;
  color: #fff;
}

/* ── Step 4 — Companion pick (was step-3) ──────────────────── */
#step-4 {
  max-width: 1000px;
  margin: 0 auto;
}

#step-4 .step-microcopy {
  margin-bottom: 8px;
}

.companion-h1 {
  font-family: var(--fd, 'Heebo', sans-serif);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 800;
  text-align: center;
  color: #1d1b25;
  line-height: 1.2;
  margin: 0 0 8px;
}

#step-4 .step-sub {
  text-align: center;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.companion-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-top: 24px;
  width: 100%;
}

@media (min-width: 900px) {
  .companion-grid {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 18px;
  }
}

.companion-card {
  display: flex;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid #e2dcef;
  border-radius: 20px;
  padding: 14px 14px 16px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  box-shadow: 0 8px 24px rgba(118, 94, 210, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font: inherit;
  color: inherit;
}

@media (min-width: 900px) {
  .companion-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
}

.companion-card:hover {
  border-color: #8a73ff;
  box-shadow: 0 10px 28px rgba(122, 101, 230, 0.12);
}

.companion-card.selected {
  border-color: #8467ff;
  background: #f6f3ff;
  box-shadow: 0 10px 28px rgba(122, 101, 230, 0.18);
}

.companion-card-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
}

.companion-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: #f3f0fa;
}

.companion-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.companion-img.is-hidden {
  display: none;
}

.companion-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(160deg, #efeaff, #e4dffd);
  border-radius: 20px;
}

.companion-img-placeholder[hidden] {
  display: none !important;
}

#companion-cards[data-challenge-category="NOISE_FEAR"] .companion-img-placeholder {
  background: linear-gradient(160deg, #e5eeff, #d8e6ff);
}

#companion-cards[data-challenge-category="NIGHT_FEAR"] .companion-img-placeholder {
  background: linear-gradient(160deg, #ebe6ff, #ddd6ff);
}

#companion-cards[data-challenge-category="TRANSITION"] .companion-img-placeholder {
  background: linear-gradient(160deg, #e6f5ee, #d5ebe0);
}

#companion-cards[data-challenge-category="NEW_SIBLING"] .companion-img-placeholder {
  background: linear-gradient(160deg, #ffeee8, #ffe0d4);
}

#companion-cards[data-challenge-category="SELF_CONFIDENCE"] .companion-img-placeholder {
  background: linear-gradient(160deg, #fff4e0, #ffe8c8);
}

#companion-cards[data-challenge-category="SOCIAL"] .companion-img-placeholder {
  background: linear-gradient(160deg, #e8f6ff, #d6ecff);
}

#companion-cards[data-challenge-category="FOCUS_LEARNING"] .companion-img-placeholder {
  background: linear-gradient(160deg, #f0e8ff, #e4dcff);
}

#companion-cards[data-challenge-category="OTHER"] .companion-img-placeholder {
  background: linear-gradient(160deg, #f2f0f5, #e8e4ef);
}

.companion-img-placeholder-text {
  font-size: 16px;
  font-weight: 700;
  color: #2b243d;
  line-height: 1.35;
}

.companion-name {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #22212a;
  margin-top: 10px;
  min-height: 42px;
  line-height: 1.35;
}

.companion-tagline {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  color: #6b6780;
  line-height: 1.4;
  margin-top: 4px;
  min-height: 58px;
}

.s3-card {
  max-width: 816px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .74);
  border-radius: 24px;
  padding: 26px 30px 28px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  box-shadow: none;
  border: 1px solid #e4dfef;
}

.form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 15px;
  font-weight: 700;
  color: #1d1b25;
}

.form-label-note {
  font-size: 14px;
  color: #817e92;
  font-weight: 400;
  display: block;
  margin-top: -2px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-input,
.form-select {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #e1dcea;
  border-radius: 18px;
  font-family: var(--fb);
  font-size: 15px;
  color: #191821;
  background: #f5f5f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.form-input:focus,
.form-select:focus {
  border-color: #8a73ff;
  background: #fff;
}

.select-wrap::after {
  content: '▼';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #111;
  pointer-events: none;
}

.form-group--traits {
  margin-top: 2px;
}

.trait-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.trait-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2dcef;
  font-family: var(--fb);
  font-size: 15px;
  font-weight: 600;
  color: #2b2934;
  cursor: pointer;
  transition: .2s ease;
  line-height: 1;
}

.trait-chip:hover {
  border-color: #8a73ff;
  background: #f6f3ff;
}

.trait-chip.selected {
  background: #8467ff;
  border-color: #8467ff;
  color: #fff;
}

.trait-chip-icon {
  font-size: 16px;
  line-height: 1;
}

.trait-chip-text {
  line-height: 1.1;
}

.photo-side {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-hero-title {
  margin: 0 0 8px 0;
  width: 100%;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #3d3a4a;
  line-height: 1.4;
  font-family: var(--fd);
}

.photo-upload-area {
  width: 100%;
  min-height: 320px;
  background: #f3f1f8;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .18s ease, border-color .18s ease;
  border: 1px solid #e3dfec;
}

.photo-upload-area:hover {
  background: #f0ecfb;
  border-color: #cbbdff;
}

.photo-plus {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #8467ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
}

.photo-txt {
  text-align: center;
}

.photo-txt span {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: #2b2933;
  line-height: 1.35;
}

.photo-txt small {
  display: block;
  font-size: 14px;
  color: #646173;
  margin-top: 4px;
}

.photo-upload-area img.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-replace-btn {
  position: absolute;
  inset-inline-end: 12px;
  bottom: 12px;
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #302d3d;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.photo-replace-btn:hover {
  background: #fff;
}

#photo-input {
  display: none;
}

#photo-quality-message {
  width: 100%;
  margin-top: 8px;
}

.photo-helper-text {
  margin: 0;
  color: #4b4858;
  font-size: 14px;
  line-height: 1.45;
  text-align: right;
}

.photo-quality-alert {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  text-align: right;
  border: 1px solid transparent;
}

.photo-quality-alert--good {
  background: #f3f0fa;
  color: #3d3a4a;
  border-color: #e2dce8;
}

.photo-quality-alert--warning,
.photo-quality-alert--blocked {
  background: #f3f0fa;
  color: #4a4658;
  border-color: #e2dce8;
  border-width: 1px;
}

.photo-quality-alert-title {
  font-weight: 500;
}

.photo-quality-alert-subcopy {
  margin-top: 4px;
  font-size: 13px;
}

.photo-quality-alert-reasons {
  margin: 6px 0 0;
  padding-right: 18px;
}

.photo-quality-alert-reasons li {
  margin: 2px 0;
  line-height: 1.35;
}

.wizard-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(13, 10, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wizard-dialog-overlay[hidden] {
  display: none !important;
}

.wizard-dialog {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #e4dfef;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 42px rgba(43, 35, 70, 0.2);
}

.wizard-dialog-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  color: #1d1b25;
  text-align: center;
}

.wizard-dialog-body {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.55;
  color: #3d3950;
}

.wizard-dialog-btn {
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 50px;
  font-size: 18px;
}

.textarea-section {
  margin-top: 28px;
}

.textarea-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1f1d27;
  text-align: center;
  margin-bottom: 10px;
}

.wiz-textarea {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid #e1dcea;
  border-radius: 16px;
  font-family: var(--fb);
  font-size: 15px;
  color: #1c1b23;
  background: rgba(255, 255, 255, .9);
  resize: vertical;
  direction: rtl;
}

.wiz-textarea:focus {
  border-color: #8a73ff;
  outline: none;
}

.s8-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 10px;
}

.s8-grid.s8-three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.s8-card {
  background: rgba(255, 255, 255, .78);
  border-radius: 22px;
  padding: 26px;
  box-shadow: none;
  border: 1px solid #e4dfef;
}

.s8-card-title {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 800;
  color: #17161c;
  margin-bottom: 6px;
}

.s8-card-sub {
  font-size: 13px;
  color: #918ea3;
  margin-bottom: 18px;
}

.length-btns {
  display: flex;
  gap: 10px;
}

.length-btn {
  flex: 1;
  padding: 13px 8px;
  border-radius: 16px;
  border: 1px solid #dfd9ea;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #3e3b49;
  cursor: pointer;
}

.length-btn span.pages {
  display: block;
  font-size: 13px;
  color: #8e8aa0;
  margin-top: 3px;
}

.length-btn.selected {
  background: #f1edff;
  border: 1px solid #8467ff;
  color: var(--dark);
}

.length-btn.selected span.pages {
  color: var(--dark);
}

.style-label {
 font-family: var(--fd);
  font-size: 22px;
  font-weight: 700;
  color: #1b1922;
  margin: 18px 0 10px;
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.style-btn {
  padding: 13px 10px;
  border-radius: 16px;
  border: 1px solid #dfd9ea;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: #464353;
  cursor: pointer;
}

.style-btn.selected {
  background: #f1edff;
  border: 1px solid #8467ff;
  box-shadow: 0 8px 24px rgba(132, 103, 255, 0.10);
}

.addon-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #ebe7f2;
  cursor: pointer;
}

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

.addon-checkbox,
.sleep-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1.5px solid #ddd7e8;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.addon-checkbox.checked,
.sleep-checkbox.on {
  background: #8467ff;
  border-color: #8467ff;
}

.addon-checkbox.checked::after,
.sleep-checkbox.on::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.addon-info {
  flex: 1;
}

.addon-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f1d26;
}

.addon-desc {
  font-size: 13px;
  color: #8f8ba1;
  margin-top: 2px;
}

.badge-popular,
.badge-gift,
.badge-save {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.badge-popular {
  background: #f1df5a;
  color: #1e1a10;
}

.badge-gift {
  background: #ff8765;
  color: #fff;
}

.badge-save {
  background: #3fd37d;
  color: #fff;
}

.s8-voice-col.hidden {
  display: none;
}

.voice-btns {
  display: flex;
  gap: 10px;
}

.voice-btn {
  flex: 1;
  min-height: 104px;
  padding: 12px 8px;
  border-radius: 18px;
  border: 1px solid #dfd9ea;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.voice-btn.selected {
  background: #f1edff;
  border: 1px solid #8467ff;
  box-shadow: 0 8px 24px rgba(132, 103, 255, 0.10);
}

.voice-btn-emoji {
  font-size: 23px;
  margin-bottom: 6px;
}

.voice-btn-label {
  font-size: 15px;
  font-weight: 700;
}

.voice-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #8467ff;
  color: #fff;
  border: none;
  margin-top: 8px;
  font-size: 12px;
}

.sleep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #ebe7f2;
  cursor: pointer;
}

.sleep-name {
  font-size: 15px;
  font-weight: 700;
  color: #201d28;
}

.sleep-desc {
  font-size: 13px;
  color: #8f8ba1;
  margin-top: 3px;
}

.s8-total {
  text-align: center;
  margin-top: 26px;
}

.s8-total-label {
  font-family: var(--fd);
  font-size: 24px;
  color: #5b5868;
}

.s8-total-price {
  display: block;
  margin-top: 4px;
  font-family: var(--fd);
  font-size: 44px;
  font-weight: 900;
  color: #8467ff;
  line-height: 1;
}

.s9-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
  margin-top: 6px;
}

.s9-back-btn {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: none;
  color: #8467ff;
  font-family: var(--fd);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  transition: opacity 0.2s;
}

.s9-back-btn:hover {
  opacity: 0.7;
}

.s9-back-arrow {
  margin-left: 4px;
}

.s9-card {
  background: rgba(255, 255, 255, .78);
  border-radius: 22px;
  padding: 24px;
  border: 1px solid #e4dfef;
  box-shadow: none;
}

.s9-card-title {
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 800;
  color: #18171d;
  margin-bottom: 16px;
  border-bottom: 1px solid #ebe7f2;
  padding-bottom: 10px;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.summary-label {
  color: #6e6b7a;
  font-weight: 700;
}

.summary-val {
  color: #1d1c23;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ece8f3;
  font-size: 14px;
}

.price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 2px solid #ece8f3;
  margin-top: 8px;
}

.price-total-label {
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 800;
}

.price-total-val {
  font-family: var(--fd);
  font-size: 28px;
  font-weight: 900;
  color: #8467ff;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-btn,
.btn-continue {
  background: linear-gradient(90deg, #6d59d8 0%, #8367f0 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: var(--fd);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(122, 101, 230, .18);
}

.contact-btn {
  width: 100%;
  padding: 16px;
  margin-top: 4px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.contact-btn.is-pressed,
.contact-btn.is-submitting {
  transform: scale(0.97);
  filter: brightness(0.95);
}

.contact-btn.is-submitting {
  pointer-events: none;
  cursor: default;
}

.contact-btn.is-submitting:hover {
  transform: scale(0.97);
}

.contact-btn-loading-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  direction: rtl;
  white-space: nowrap;
}

.contact-btn-loading-label {
  display: inline-block;
}

.submit-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.submit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  animation: submitDotBounce 1.1s infinite ease-in-out;
  opacity: 0.55;
}

.submit-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.submit-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes submitDotBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.payment-logos {
  text-align: center;
  font-size: 12px;
  color: #8f8ba1;
  margin-top: 8px;
}

.bottom-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  justify-content: center;
  z-index: 50;
  transition: opacity .25s ease, transform .25s ease;
}

.bottom-bar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}

.bottom-bar-actions {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bottom-bar-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-inline-end: 8px;
  padding-inline-end: 16px;
  border-inline-end: 1px solid rgba(132, 103, 255, 0.2);
}
.bottom-bar-total[hidden] {
  display: none !important;
}

.bottom-bar-total-label {
  font-size: 15px;
  font-weight: 600;
  color: #6f6b82;
  white-space: nowrap;
}

.bottom-bar-total-price {
  font-family: var(--fd);
  font-size: 28px;
  font-weight: 800;
  color: #8467ff;
  white-space: nowrap;
}

.photo-step-reassure {
  margin: 0;
  font-size: 13px;
  color: #7a7689;
  text-align: center;
  line-height: 1.45;
  max-width: 22rem;
  font-weight: 400;
}

.btn-continue--anyway {
  display: none !important;
  background: #fff;
  color: #5b4ab8;
  border: 2px solid rgba(132, 103, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  min-width: 180px;
  max-width: 320px;
}

.btn-continue,
.btn-back {
  height: 56px;
  border-radius: 999px;
  border: none;
  font-size: 20px;
  align-items: center;
  font-weight: 700;
  font-family: var(--fd);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-continue:hover,
.btn-back:hover {
  transform: translateY(-1px);
}

.btn-continue {
  min-width: 240px;
  padding: 0 32px;
  background: linear-gradient(135deg, var(--purple-d), var(--purple));
  color: #fff;
  box-shadow: 0 10px 24px rgba(132, 103, 255, 0.22);
}

.btn-back {
  min-width: 120px;
  padding: 0 24px;
  background:var(--white);
  color: #000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.btn-back.hidden,
.btn-continue.hidden,
.bottom-bar.hidden {
  display: none;
}

.btn-continue {
  width: auto;
  max-width: none;
  /* padding: 18px 40px; */
}


/* ── STEP 8 DYNAMIC WIDTH / AUDIO LAYOUT ───────────────────── */
.wizard-main.wizard-audio-open #step-12 {
  max-width: 1280px;
}

.wizard-main.wizard-audio-open #step-12 .s8-grid.s8-three-col {
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 24px;
}

.wizard-main.wizard-audio-open #step-12 .s8-card {
  min-height: 100%;
}

.wizard-main.wizard-audio-open #step-12 .voice-btns {
  flex-direction: column;
  gap: 12px;
}

.wizard-main.wizard-audio-open #step-12 .voice-btn {
  min-height: 82px;
}

@media (max-width: 1200px) {
  .wizard-main.wizard-audio-open #step-12 {
    max-width: 1100px;
  }

  .wizard-main.wizard-audio-open #step-12 .s8-grid.s8-three-col {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .wizard-main.wizard-audio-open #step-12 {
    max-width: 760px;
  }

  .wizard-main.wizard-audio-open #step-12 .s8-grid.s8-three-col {
    grid-template-columns: 1fr;
  }

  .wizard-main.wizard-audio-open #step-12 .voice-btns {
    flex-direction: row;
  }
}

@media (max-width: 900px) {
  .step {
    max-width: 760px;
  }

  .s8-grid.s8-three-col,
  .s8-grid,
  .s9-grid {
    grid-template-columns: 1fr;
  }

  .s8-voice-col.hidden {
    display: none;
  }
}

@media (max-width: 680px) {
  .wizard-main {
    padding: 0 14px 126px;
  }

  .step {
    padding-top: 28px;
  }

  .step-title {
    font-size: 48px;
  }

  .progress-card {
    max-width: 100%;
  }

  .s3-card {
    padding: 16px;
    gap: 24px;
    flex-direction: column-reverse;
  }

  .photo-side {
    flex: unset;
    width: 100%;
  }

  .photo-upload-area {
    min-height: 130px;
    width: 100%;
  }

  .photo-plus {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .photo-txt span {
    font-size: 17px;
  }



  .form-row {
    flex-direction: column;
    gap: 14px;
  }

  .voice-btns,
  .length-btns,
  .style-grid {
    gap: 8px;
  }
}

/* ==== STEP 8 REFINEMENT ==== */

#step-12 {
  max-width: 1200px;
  padding-top: 26px;
}

#step-12 .step-title {
  font-size: clamp(42px, 4vw, 64px);
  margin-bottom: 10px;
}

#step-12 .step-sub {
  margin-bottom: 18px;
}

#step-13 {
  max-width: 1100px;
}

.s8-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.s8-grid {
  --voice-col: 0fr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, var(--voice-col));
  gap: 24px;
  align-items: start;
  margin-top: 28px !important;
  transition: gap .34s ease, grid-template-columns .44s cubic-bezier(.22, 1, .36, 1);
}

.s8-grid.voice-open,
.s8-grid.s8-three-col {
  --voice-col: 1fr;
  gap: 18px;
}

.s8-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: 22px 22px 20px;
  border: 1px solid #e7e0f0;
  box-shadow: 0 10px 30px rgba(118, 94, 210, 0.05);
}

.s8-card-title {
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 14px;
}

.s8-card-sub {
  text-align: center;
  font-size: 13px;
  margin-top: -6px;
  margin-bottom: 14px;
}

.length-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.length-btn {
  min-height: 66px;
  padding: 10px 8px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.length-btn:hover,
.style-btn:hover,
.voice-btn:hover,
.addon-row:hover {
  transform: translateY(-1px);
}

.length-btn.selected {
  box-shadow: 0 10px 20px rgba(132, 103, 255, 0.16);
}

.style-label {
   font-family: var(--fd);
  font-size: 24px;
  text-align: center;
  margin: 32px 0 10px;
}

.style-grid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.style-btn {
  min-height: 56px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.style-btn.selected {
  box-shadow: 0 10px 20px rgba(132, 103, 255, 0.16);
}

.s8-card--addons {
  display: flex;
  flex-direction: column;
}

.addon-row {
  display: block;
  padding: 0;
  border-bottom: none;
  margin-bottom: 10px;
  border-radius: 16px;
  background: #f4f2f7;
  border: 1px solid #ebe5f2;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.addon-row:last-child {
  margin-bottom: 0;
}

.addon-row.selected {
  background: #f1edff;
  border: 1px solid #8467ff;
  box-shadow: 0 8px 24px rgba(132, 103, 255, 0.10);
}

.addon-info {
  width: 100%;
  padding: 10px 12px 12px;
}

.addon-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.addon-name {
  font-size: 16px;
  margin-bottom: 2px;
}

.addon-desc {
  line-height: 1.35;
}

.badge-popular,
.badge-gift,
.badge-save {
  margin-bottom: 9px;
  padding: 4px 11px;
}

.addon-checkbox,
.sleep-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.addon-checkbox.checked,
.sleep-checkbox.on {
  transform: scale(1.03);
}

.s8-voice-col {
  overflow: hidden;
  opacity: 1;
  transform: translateX(0) scale(1);
  transition: opacity .3s ease, transform .42s cubic-bezier(.22, 1, .36, 1), padding .42s cubic-bezier(.22, 1, .36, 1), border-color .24s ease;
}

.s8-voice-col {
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  max-height: 0;
  pointer-events: none;
  transition:
    opacity 320ms ease,
    transform 320ms ease,
    max-height 360ms ease;
}

.s8-voice-col.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.s8-voice-col.hidden {
  display: none;
}

@keyframes s8VoiceContentIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.voice-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.voice-btn {
  min-height: 88px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.voice-btn.selected {
  box-shadow: 0 12px 24px rgba(132, 103, 255, 0.16);
}

.voice-btn-emoji {
  font-size: 20px;
  margin-bottom: 0;
}

.voice-btn-label {
  font-size: 14px;
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  margin-top: 0;
  font-size: 14px;
  cursor: pointer;
}

.sleep-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: none;
  border-radius: 16px;
  background: #f4f2f7;
  padding: 12px;
  min-height: 64px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.sleep-row:hover {
  transform: translateY(-1px);
}

.sleep-row.selected {
  background: #f1edff;
  border: 1px solid #8467ff;
  box-shadow: 0 8px 24px rgba(132, 103, 255, 0.10);
}

.sleep-name {
  font-size: 14px;
}

.sleep-desc {
  font-size: 12px;
  line-height: 1.35;
}

.s8-total {
  text-align: center;
  margin-top: 24px !important;
}

.s8-total-label {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #6f65c8;
}

.s8-total-price {
  margin-top: 2px;
  font-size: 40px;
  color: var(--purple);
}

.wizard-main {
  padding-bottom: 118px;
}

.bottom-bar {
  backdrop-filter: blur(8px);
}

@media (max-width: 1180px) {
  #step-12 {
    max-width: 1060px;
  }

  .s8-card {
    min-height: auto;
    height: auto;
  }

  .voice-btns {
    gap: 6px;
  }
}

@media (max-width: 980px) {

  .s8-grid,
  .s8-grid.voice-open,
  .s8-grid.s8-three-col {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .s8-card,
  .s8-voice-col,
  .s8-voice-col.is-collapsed {
    min-height: auto;
    height: auto;
    opacity: 1;
    transform: none;
    padding-inline: 16px;
    border-color: #e7e0f0;
    pointer-events: auto;
  }

  .s8-voice-col.is-collapsed {
    display: none;
  }
}

@media (max-width: 640px) {
  .bottom-bar-actions {
    flex-wrap: wrap;
  }

  .btn-continue {
    width: 100%;
    max-width: 360px;
  }

  #step-12 .step-title {
    font-size: 32px;
  }

  .length-btns,
  .voice-btns,
  .style-grid {
    grid-template-columns: 1fr;
  }

  .s8-card {
    padding: 16px;
  }

  .voice-btn {
    min-height: 72px;
  }
}

/* ==== Batch 5 Wizard refinement ==== */
#step-5 {
  max-width: 980px;
}

.char-step-shell {
  margin-top: 8px;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.char-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e4dfef;
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
}

.char-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.char-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f1d27;
}

.char-card-tag {
  font-size: 12px;
  font-weight: 700;
  color: #7f7899;
  background: #f2effd;
  border-radius: 999px;
  padding: 2px 9px;
}

.char-photo-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  direction: ltr;
}

.char-photo-row-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  direction: rtl;
  justify-content: center;
}

@media (max-width: 480px) {
  .char-photo-preview {
    width: 80px;
    height: 80px;
  }
}

.char-photo-upload {
  display: block;
  cursor: pointer;
  flex-shrink: 0;
}

.char-photo-input {
  display: none;
}

.char-photo-preview {
  width: 100px;
  height: 100px;
  border: 1px dashed #d5cdee;
  background: #f6f4fb;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color .2s ease, background .2s ease;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.char-photo-upload:hover .char-photo-preview {
  border-color: #8a73ff;
  background: #f2eeff;
}

.char-photo-preview.has-image {
  border-style: solid;
  background: #fff;
}

.char-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.char-photo-preview.has-image .char-photo-replace-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 4px 0;
  cursor: pointer;
  border-radius: 0 0 13px 13px;
}

.char-photo-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8467ff;
  color: #fff;
  font-size: 22px;
  line-height: 30px;
  text-align: center;
}

.char-photo-sub {
  font-size: 12px;
  color: #8b869d;
}

.char-input {
  height: 44px;
  border-radius: 14px;
}

.char-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.char-photo-quality {
  margin-top: 8px;
}

.char-photo-helper {
  margin: 0;
  color: #4b4858;
  font-size: 13px;
  line-height: 1.4;
}

.char-field-label {
  font-size: 12px;
  color: #706b82;
  font-weight: 600;
}

.char-relation-select {
  height: 44px;
  border-radius: 14px;
}

.char-textarea {
  min-height: 66px;
  border-radius: 14px;
  resize: none;
  padding-top: 10px;
}

.char-error {
  margin-top: auto;
  color: #e05a5a;
  font-size: 12px;
  line-height: 1.3;
}

.char-card-add {
  justify-content: center;
  align-items: center;
  border: 1px dashed #cabef4;
  background: rgba(250, 248, 255, 0.9);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.char-card-add:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #8a73ff;
  box-shadow: 0 8px 24px rgba(132, 103, 255, 0.12);
}

.char-card-add:disabled {
  cursor: default;
  opacity: .8;
}

.char-add-plus {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #8467ff;
  color: #fff;
  font-size: 26px;
  line-height: 36px;
  text-align: center;
}

.char-add-label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #3a3650;
}

#length-btns {
  direction: rtl;
}

.style-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.style-card {
  min-height: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 1px solid #dfd9ea;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.style-card-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #f4f1fa;
}

.style-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-card-name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #2c2938;
  padding: 10px 10px 4px;
}

.style-card-desc {
  display: block;
  padding: 0 12px 12px;
  font-size: 12px;
  line-height: 1.35;
  color: #6f6b82;
  text-align: center;
}

.style-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 28px rgba(123, 103, 220, 0.18);
}

.style-card.selected {
  border-color: #8467ff;
  background: #f3efff;
  box-shadow: 0 14px 28px rgba(123, 103, 220, 0.22);
}

@media (max-width: 980px) {
  .char-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .char-grid {
    grid-template-columns: 1fr;
  }

  .style-grid {
    grid-template-columns: 1fr;
  }
}

/* Topic step — flat continuous chip flow */
#topic-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  align-items: center;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.category-followup-wrap {
  display: flex;
  flex-direction: row;
  gap: 14px;
  margin-top: 24px;
}
@media (max-width: 820px) {
  .category-followup-wrap {
    flex-direction: column;
  }
}
.category-followup-wrap .form-group {
  margin-bottom: 0;
}
.category-followup-item {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e4dfef;
  border-radius: 18px;
  padding: 14px;
}
.category-followup-label {
  margin-bottom: 10px;
  line-height: 1.35;
}
.category-followup-quick-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.category-followup-chip {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.2;
}
.category-followup-note {
  color: #8c889f;
  margin-bottom: 6px;
}
.category-followup-textarea {
  min-height: 60px;
  resize: vertical;
  background: #fff;
}
.category-followup-textarea--large {
  min-height: 100px;
  resize: vertical;
}
.category-followup-wait,
.category-followup-skip {
  color: #6f6b82;
  font-size: 0.95rem;
  margin: 0.2rem 0 0.5rem;
}
.category-followup-error {
  color: #9b1c1c;
  font-size: 0.95rem;
  margin: 0.2rem 0 0.5rem;
  line-height: 1.4;
}
.btn-retry-cat {
  margin-top: 0.35rem;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid #8467ff;
  background: #fff;
  color: #5b46c9;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--fd, 'Heebo', sans-serif);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-retry-cat:hover {
  background: #f6f3ff;
  box-shadow: 0 4px 12px rgba(132, 103, 255, 0.2);
}
.summary-category-answers {
  margin-top: 0.6rem;
  text-align: right;
}
.summary-followup-count {
  margin-top: 10px;
  font-size: 14px;
  color: #5c4b8a;
  font-weight: 600;
}
.summary-category-answers summary {
  cursor: pointer;
  color: #5c4b8a;
  font-size: 0.92rem;
}
.summary-answers-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0.4rem 0 0;
  color: #4a4a57;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

#step-6 .step-sub {
  margin-bottom: 22px;
}

#step-6 #superpower-chips {
  margin-top: 6px;
}