:root {
  --lilac: #B79CFF;
  --lilac-deep: #8F74E0;
  --lilac-soft: #EFE8FF;
  --apricot: #FFB07A;
  --apricot-deep: #F28C4B;
  --cream: #FFF6EE;
  --plum: #3A2B4F;
  --plum-soft: #6B5487;
  --white: #FFFFFF;
  --line: #EADFF5;
  --ok: #2F9E6B;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(58, 43, 79, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--plum);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--plum); }
.logo-img { height: 40px; width: auto; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lilac), var(--apricot));
  color: var(--white); font-size: 16px;
}
.logo-text { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.logo-text b { color: var(--lilac-deep); font-weight: 700; }
.topbar-actions { display: flex; gap: 8px; }
.btn-ghost {
  border: 1px solid var(--line); background: var(--white); color: var(--plum);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500;
}

/* Layout */
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; min-height: 70vh; }
.screen { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 10px; letter-spacing: -0.5px; }
h2 { font-size: 22px; line-height: 1.25; margin: 6px 0 8px; }
.sub { color: var(--plum-soft); margin: 0 0 16px; }
.center { text-align: center; }

/* Hero */
.hero { display: grid; gap: 16px; }
.hero-img {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5;
  background: var(--lilac-soft); box-shadow: var(--shadow);
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.slogan {
  display: inline-block; font-weight: 600; font-size: 13px; letter-spacing: 0.4px;
  color: var(--apricot-deep); background: #FFEBDD; padding: 4px 12px; border-radius: 999px;
}
.benefits { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; }
.benefits li {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; font-size: 15px;
}

/* Age cards */
.age-title { margin: 22px 0 10px; font-size: 18px; font-weight: 600; text-align: center; }
.age-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.age-card {
  border: 2px solid transparent; background: var(--white); border-radius: var(--radius);
  overflow: hidden; padding: 0; box-shadow: var(--shadow); text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.age-card:hover, .age-card:focus-visible { transform: translateY(-2px); border-color: var(--lilac); outline: none; }
.age-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; }
.age-card span {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--lilac-deep); color: var(--white); font-weight: 600; padding: 10px 14px; font-size: 15px;
}
.legal { font-size: 12px; color: var(--plum-soft); text-align: center; margin-top: 14px; }
.legal a { color: var(--lilac-deep); }

/* Progress */
.progress {
  max-width: 560px; margin: 0 auto; padding: 12px 16px 0;
  display: flex; align-items: center; gap: 10px;
}
.progress[hidden] { display: none; }
.back { border: none; background: none; font-size: 28px; line-height: 1; color: var(--plum); padding: 0 6px; }
.progress-track { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--lilac), var(--apricot)); transition: width 0.3s ease; }
.progress-count { font-size: 13px; color: var(--plum-soft); min-width: 42px; text-align: right; }

/* Options */
.options { display: grid; gap: 10px; margin-top: 14px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--white); border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 16px; font-size: 16px; color: var(--plum); text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--lilac); }
.option.selected { border-color: var(--lilac-deep); background: var(--lilac-soft); }
.option .emoji { font-size: 22px; }
.option .check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 14px; color: var(--white);
}
.option.selected .check { background: var(--lilac-deep); border-color: var(--lilac-deep); }

/* Inputs */
.unit-toggle { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 10px 0; }
.unit-toggle button { border: none; background: none; padding: 8px 18px; border-radius: 999px; font-weight: 600; color: var(--plum-soft); }
.unit-toggle button.on { background: var(--lilac-deep); color: var(--white); }
.num-input { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 18px 0 6px; }
.num-input input {
  width: 160px; font-size: 40px; font-weight: 600; text-align: center; color: var(--plum);
  border: none; border-bottom: 3px solid var(--lilac); background: transparent; padding: 4px; font-family: inherit;
}
.num-input input:focus { outline: none; border-color: var(--apricot-deep); }
.num-input .unit { font-size: 20px; color: var(--plum-soft); }
.hint { font-size: 13px; color: var(--plum-soft); text-align: center; min-height: 20px; }
.hint.error { color: #C2410C; }

/* Buttons */
.btn-primary {
  display: block; width: 100%; margin-top: 18px;
  background: linear-gradient(90deg, var(--apricot-deep), var(--apricot));
  color: var(--plum); border: none; border-radius: 999px;
  padding: 16px 20px; font-size: 17px; font-weight: 700; letter-spacing: 0.3px;
  box-shadow: 0 6px 18px rgba(242, 140, 75, 0.35);
}
.btn-primary:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--plum-soft); text-decoration: underline; width: 100%; margin-top: 10px; }

/* Interstitial */
.inter { text-align: center; padding-top: 10px; }
.inter img { border-radius: var(--radius); margin: 0 auto 16px; max-height: 340px; object-fit: cover; box-shadow: var(--shadow); }
.inter .big-emoji { font-size: 56px; margin: 10px 0; }

/* Summary */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--lilac-soft); border-radius: 14px; padding: 12px; }
.stat small { display: block; color: var(--plum-soft); font-size: 12px; }
.stat strong { font-size: 18px; }
.bmi-bar { position: relative; height: 10px; border-radius: 999px; margin: 18px 0 6px;
  background: linear-gradient(90deg, #8FD3F4 0%, #7BD389 30%, #FFD36E 60%, #FF8A65 100%); }
.bmi-dot { position: absolute; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--plum); border: 3px solid var(--white); transform: translateX(-50%); }
.bmi-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--plum-soft); }

/* Loading */
.loader { text-align: center; padding-top: 30px; }
.ring { width: 140px; height: 140px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; font-weight: 700;
  background: conic-gradient(var(--lilac-deep) var(--p, 0%), var(--line) 0); }
.ring::before { content: ""; position: absolute; }
.ring span { background: var(--cream); width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; }
.loader ul { list-style: none; padding: 0; text-align: left; display: inline-grid; gap: 6px; color: var(--plum-soft); }
.loader li.done { color: var(--ok); }

/* Pricing */
.offer-bar {
  position: sticky; top: 57px; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  background: var(--plum); color: var(--white); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px;
}
.offer-bar strong { color: var(--apricot); font-size: 18px; font-variant-numeric: tabular-nums; }
.plans { display: grid; gap: 12px; margin-top: 12px; }
.plan {
  position: relative; text-align: left; width: 100%;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.plan.selected { border-color: var(--lilac-deep); background: var(--lilac-soft); }
.plan .badge { position: absolute; top: -11px; right: 14px; background: var(--apricot); color: var(--plum); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-name { font-weight: 700; font-size: 17px; }
.plan-price { text-align: right; }
.plan-price s { color: var(--plum-soft); font-size: 13px; margin-right: 6px; }
.plan-price strong { font-size: 22px; }
.plan-renew { margin-top: 8px; font-size: 14px; color: var(--plum); background: #FFF1E6; border-radius: 10px; padding: 8px 10px; }
.plan-renew b { color: var(--apricot-deep); }
.trust { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 14px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.what-you-get { display: grid; gap: 8px; margin-top: 10px; }

/* Footer */
.footer { text-align: center; font-size: 12px; color: var(--plum-soft); padding: 24px 16px 40px; border-top: 1px solid var(--line); }
.footer a { color: var(--plum-soft); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(58, 43, 79, 0.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card { background: var(--white); border-radius: var(--radius); padding: 22px; max-width: 420px; width: 100%; text-align: center; }

@media (min-width: 720px) {
  h1 { font-size: 34px; }
  .age-grid { grid-template-columns: repeat(4, 1fr); }
  main { max-width: 720px; }
  .progress { max-width: 720px; }
}
