:root {
  --bg: #fdfbf9;
  --bg-card: #ffffff;
  --text: #1c1c1c;
  --muted: #6f6f6f;
  --border: #ebe6e6;
  --accent: #d4a5a5;
  --pink: #d4a5a5;
  --pink-light: #f3e6e6;
  --accent-green: #d4a5a5;
  --ring-track: #f0eded;
  --ring-fill: #d4a5a5;
  --ring-inner: transparent;
  --btn: #1f1f1f;
  --btn-text: #ffffff;
  --max: 450px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, #fffcfb 0%, var(--bg) 55%, #f7f0ee 100%);
  color: var(--text);
  overflow-x: hidden;
}

.quiz {
  min-height: 100dvh;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom));
  animation: fadeIn 0.28s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 14px 0 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

.topbar--minimal {
  grid-template-columns: 40px 1fr 40px;
}

.topbar__back {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.topbar__section {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.topbar__brand {
  text-align: center;
  font-weight: 700;
  color: #b8a8a8;
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

.topbar__spacer {
  width: 40px;
}

.progress-track {
  padding: 0 0 18px;
}

.progress-bar {
  height: 4px;
  background: var(--ring-track);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-phases {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.progress-phase {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ring-track);
  transition: background 0.25s ease, transform 0.25s ease;
}

.progress-phase--active {
  background: var(--accent);
  transform: scale(1.15);
}

.progress-phase--done {
  background: var(--accent);
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content--center {
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 20px 0;
}

.title {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.body {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 340px;
}

.mirror {
  margin: 16px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.option {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 17px 16px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 2px rgba(28, 20, 20, 0.03);
}

.option:active {
  transform: scale(0.98);
  border-color: var(--accent);
  background: var(--pink-light);
}

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

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
}

.check--on {
  border-color: var(--accent);
  background: var(--pink-light);
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check__box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check--on .check__box {
  border-color: var(--accent);
  background: var(--accent);
}

.check--on .check__box::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.check__text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.cta {
  padding-top: 16px;
  margin-top: auto;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-text);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 20px;
  box-shadow: 0 4px 14px rgba(31, 31, 31, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.screen--hook {
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  align-items: center;
}

.hook {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0;
  min-height: 0;
  width: 100%;
}

.hook__polaroids {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 310px;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.polaroid {
  position: absolute;
  width: 158px;
  padding: 8px 8px 36px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.11);
}

.polaroid__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  background: #e8dfd6;
}

.polaroid__photo--ph1 {
  background: #e8d4d4;
}

.polaroid__photo--ph2 {
  background: #ddd0d0;
}

.polaroid__photo--ph3 {
  background: #e6d6d0;
}

/* Top-left: middle layer, tilted counter-clockwise */
.polaroid--left {
  top: 4px;
  left: 6%;
  transform: rotate(-9deg);
  z-index: 2;
}

/* Top-right: back layer, tilted clockwise, sits slightly lower */
.polaroid--right {
  top: 16px;
  right: 4%;
  transform: rotate(7deg);
  z-index: 1;
}

/* Bottom-center: front layer, overlaps both top cards */
.polaroid--center {
  top: 120px;
  left: 50%;
  transform: translateX(-50%) rotate(4deg);
  z-index: 3;
}

.hook__eyebrow {
  font-family: "Dancing Script", "Segoe Script", cursive;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pink);
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}

.hook__title {
  margin: 0 0 14px;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.06;
  max-width: 320px;
  letter-spacing: -0.035em;
  color: var(--text);
}

.hook__title-line {
  display: block;
}

.hook__title-line--highlight {
  margin-top: 2px;
}

.hook__highlight {
  position: relative;
  display: inline-block;
  color: var(--pink);
  padding: 0 4px;
  z-index: 0;
}

.hook__highlight::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.12em;
  height: 0.36em;
  background: var(--pink-light);
  border-radius: 4px 6px 3px 5px;
  transform: rotate(-0.8deg);
  z-index: -1;
}

.hook__highlight::after {
  display: none;
}

.hook__body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 300px;
  font-weight: 500;
}

.hook__body-line {
  display: block;
}

.hook__features {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 340px;
  margin: 20px 0 0;
}

.hook__feature {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
}

.hook__feature + .hook__feature {
  border-left: 1px solid rgba(212, 165, 165, 0.35);
}

.hook__feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(212, 165, 165, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--pink-light);
  box-shadow: none;
}

.hook__feature-icon svg {
  width: 20px;
  height: 20px;
}

.hook__feature-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  max-width: 88px;
}

.screen--hook .cta {
  padding-top: 18px;
  width: 100%;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  flex-shrink: 0;
}

.screen--hook .btn {
  min-height: 56px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(31, 31, 31, 0.14);
}

.hook__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.hook__hint-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}

.screen--hook .legal {
  padding-top: 14px;
  width: 100%;
  max-width: 360px;
}

.screen--hook .legal p {
  font-size: 10px;
  color: #9a9a9a;
  line-height: 1.35;
}

.screen--hook .legal a {
  text-decoration: underline;
  color: #7a7a7a;
}

@media (max-width: 480px) {
  .screen--hook {
    min-height: 100dvh;
    min-height: 100svh;
    padding: 8px 20px calc(10px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }

  .hook {
    flex: 0 1 auto;
    width: 100%;
  }

  .hook__polaroids {
    height: 310px;
    margin: 0 auto 12px;
  }

  .polaroid {
    width: 158px;
    padding: 8px 8px 36px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.11);
  }

  .polaroid--left {
    top: 4px;
    left: 6%;
    transform: rotate(-9deg);
  }

  .polaroid--right {
    top: 16px;
    right: 4%;
    transform: rotate(7deg);
  }

  .polaroid--center {
    top: 120px;
    transform: translateX(-50%) rotate(4deg);
  }

  .hook__eyebrow {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .hook__title {
    font-size: 34px;
    margin-bottom: 10px;
    line-height: 1.05;
    max-width: 290px;
  }

  .hook__body {
    font-size: 14.5px;
    line-height: 1.45;
    max-width: 280px;
    color: var(--muted);
  }

  .hook__body-line + .hook__body-line {
    margin-top: 2px;
  }

  .hook__features {
    margin-top: 16px;
    max-width: 100%;
  }

  .hook__feature {
    gap: 7px;
    padding: 0 5px;
  }

  .hook__feature-icon {
    width: 40px;
    height: 40px;
  }

  .hook__feature-icon svg {
    width: 17px;
    height: 17px;
  }

  .hook__feature-label {
    font-size: 9.5px;
    max-width: 76px;
  }

  .screen--hook .cta {
    margin-top: auto;
    padding-top: 16px;
    padding-bottom: 0;
    max-width: 100%;
  }

  .screen--hook .btn {
    min-height: 52px;
    font-size: 16px;
  }

  .hook__hint {
    margin-top: 9px;
    font-size: 11.5px;
  }

  .screen--hook .legal {
    padding-top: 8px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) and (max-height: 700px) {
  .hook__title {
    font-size: 31px;
    margin-bottom: 8px;
  }

  .hook__features {
    margin-top: 12px;
  }

  .screen--hook .cta {
    padding-top: 12px;
  }
}

.legal {
  padding: 16px 0 8px;
  text-align: center;
}

.legal p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #999;
}

.legal a {
  color: #666;
}

.ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 28px auto 8px;
}

.ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__track {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 6;
}

.ring__fill {
  fill: none;
  stroke: var(--ring-fill);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.interstitial-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pink-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.interstitial-icon svg {
  width: 26px;
  height: 26px;
}

.screen--interstitial .title {
  font-size: 26px;
  margin-bottom: 12px;
}

.screen--interstitial .body {
  font-size: 16px;
  line-height: 1.55;
}

.screen--loader {
  position: relative;
}

.loader-steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loader-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.loader-step__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.loader-step--done {
  color: var(--text);
}

.loader-step--done .loader-step__icon {
  border-color: var(--accent);
  background: var(--accent);
}

.loader-step--done .loader-step__icon::after {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 100%;
  height: 100%;
}

.loader-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.loader-modal[hidden] {
  display: none;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 24px 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.modal__lead {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.modal__q {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

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

.modal__btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.modal__btn:active {
  border-color: var(--accent);
}

.field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  background: var(--bg-card);
  margin-bottom: 8px;
}

.field:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.error {
  margin: 0 0 12px;
  font-size: 13px;
  color: #c0392b;
  display: none;
}

.error[data-show="true"] {
  display: block;
}

.privacy {
  margin-top: 16px;
  padding: 16px;
  background: var(--pink-light);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid rgba(212, 165, 165, 0.25);
}

.privacy strong {
  display: block;
  margin-bottom: 6px;
}

.privacy p {
  margin: 0;
  color: var(--muted);
}

.reveal-greeting {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--accent);
}

.reveal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(28, 20, 20, 0.04);
}

.reveal-card__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8d4d4, #d4c0c0);
  margin: 0 auto 16px;
  filter: blur(0);
}

.reveal-card__line {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
}

.goals {
  background: var(--pink-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(212, 165, 165, 0.2);
}

.goals__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.goals__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.perks {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.perks li {
  margin-bottom: 4px;
}

.restart {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}

/* Reveal: profile card layout (white theme) */
.profile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px 20px 22px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.profile__avatar {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #eee;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.profile__online-dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2ecc71;
  border: 3px solid #fff;
}

.profile__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eafaf0;
  color: #1e9e56;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile__name {
  margin: 10px 0 6px;
  font-size: 24px;
  font-weight: 800;
}

.profile__bio {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}

.gallery__tile {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background-color: #f1ecea;
  background-size: cover;
  background-position: center;
}

.gallery__tile--locked {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.gallery__blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.55);
  transform: scale(1.2);
}

.gallery__lock {
  position: relative;
  z-index: 1;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}

.gallery__tile--locked svg {
  width: 18px;
  height: 18px;
}

.hook__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}

.hook__privacy svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.redirect-note {
  margin: 0 0 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.profile__meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.btn--profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.btn--profile__label {
  font-weight: 700;
}

.btn--profile__sub {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.85;
}

/* Reveal: type badge and the optional email save */
.reveal-type {
  display: inline-block;
  margin: 0 auto 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-light, #f3e6e6);
  color: #8a5f5f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.screen--reveal .content {
  text-align: center;
}

.screen--reveal .goals,
.screen--reveal .perks {
  text-align: left;
}

.reveal-optin {
  margin-top: 14px;
  text-align: center;
}

.reveal-optin__prompt {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted, #6f6f6f);
}

.reveal-optin__row {
  display: flex;
  gap: 8px;
}

.field--inline {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.btn--ghost {
  width: auto;
  flex-shrink: 0;
  padding: 0 16px;
  background: transparent;
  color: #1f1f1f;
  border: 1.5px solid #1f1f1f;
}

.reveal-optin__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted, #6f6f6f);
}

.reveal-optin__done {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #4a7a4a;
}
