:root {
  --theme: #3b82f6;
  --theme-dark: #2563eb;
  --content: #6b7280;
  --title: #030712;
  --background: #f5f5f4;
  --card: #ffffff;
  --border: #e5e7eb;
  --success: #dcfce7;
  --danger: #fee2e2;
  --info: #dbeafe;
  --radius: 16px;
  --shadow: 0 14px 42px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--content);
  background: var(--background);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input { font: inherit; }

img { display: block; max-width: 100%; }

.page-shell {
  width: min(100%, 38rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 18px 46px;
}

.quiz-header {
  display: grid;
  grid-template-columns: 40px 1fr 44px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 14px;
}

.back-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7e5e4;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--theme);
  transition: width .35s ease;
}

.progress-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.quiz-card {
  width: 100%;
  min-height: 280px;
  padding: 22px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.step {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  animation: enter .28s ease both;
}

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

.layer { width: 100%; }
.layer.centered { margin-inline: auto; }

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text p { margin: 0 0 10px; }

.rich-text h1,
.rich-text h2,
.rich-text h3 {
  color: var(--title);
  font-family: "Montserrat", "Inter", sans-serif;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.rich-text h2 { font-size: clamp(22px, 5vw, 29px); }
.rich-text h3 { font-size: clamp(19px, 4.4vw, 24px); }
.rich-text p { color: var(--content); }
.rich-text p:last-child { margin-bottom: 0; }
.ql-align-center { text-align: center; }
.ql-size-small { font-size: 13px; }

.hero-image,
.content-image {
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.options-intro { margin-bottom: 14px; }

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

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

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 56px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe2ea;
  border-radius: var(--radius);
  color: #0f172a;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15,23,42,.045);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.option:hover { transform: translateY(-1px); border-color: #93c5fd; }

.option.selected {
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

.option-media {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f1f5f9;
}

.option-emoji {
  display: grid;
  min-height: 66px;
  place-items: center;
  padding-top: 10px;
  font-size: 36px;
  line-height: 1;
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 56px;
  padding: 11px 12px;
  font-weight: 600;
  text-align: center;
}

.option-label p { margin: 0; }

.options-theme .option:not(:has(.option-media)) {
  border-color: var(--theme);
  color: #fff;
  background: var(--theme);
}

.alert {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(15,23,42,.06);
}

.alert.info { background: var(--info); }
.alert.danger { background: var(--danger); }
.alert.success { background: var(--success); }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(180deg, #4f8df7, var(--theme-dark));
  box-shadow: 0 9px 20px rgba(37,99,235,.24);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button.pulse { animation: pulse 1.65s infinite; }

@keyframes pulse {
  0%,100% { transform: scale(1); box-shadow: 0 9px 20px rgba(37,99,235,.24); }
  50% { transform: scale(1.018); box-shadow: 0 12px 30px rgba(37,99,235,.36); }
}

.spacer { height: 16px; }

.carousel { position: relative; overflow: hidden; }
.carousel-stage { display: flex; transition: transform .3s ease; }
.carousel-item { min-width: 100%; text-align: center; }
.carousel-item img { width: 100%; border-radius: var(--radius); }
.carousel-dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.carousel-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: #cbd5e1; }
.carousel-dot.active { width: 20px; background: var(--theme); }

.loading-box { padding: 42px 4px; text-align: center; }
.loading-box h2 { margin: 0 0 8px; color: var(--title); font-family: "Montserrat", sans-serif; }
.loading-track { height: 14px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: #e5e7eb; }
.loading-fill { width: 0; height: 100%; background: var(--theme); transition: width .12s linear; }
.loading-percent { margin-top: 8px; color: var(--theme-dark); font-weight: 800; }

.chart-box { padding: 18px 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); }
.bars { display: grid; grid-template-columns: repeat(2,1fr); align-items: end; gap: 26px; height: 220px; padding: 22px 20px 0; border-left: 1px solid #d1d5db; border-bottom: 1px solid #d1d5db; }
.bar-wrap { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.bar { width: 62px; max-width: 90%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg,#22c55e,#fbbf24,#dc2626); }
.bar.featured { background: linear-gradient(180deg,#f59e0b,#dc2626); }
.bar-value { color: #0f172a; font-weight: 800; }
.bar-label { min-height: 44px; margin-top: 8px; color: #475569; font-size: 13px; text-align: center; }

.arguments-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.argument { padding: 15px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.argument h3 { font-size: 17px; }

.quotes-list { display: grid; gap: 12px; }
.quote-card { display: grid; grid-template-columns: 68px 1fr; gap: 13px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.quote-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }
.quote-name { color: var(--title); font-weight: 800; }
.quote-meta { color: #94a3b8; font-size: 12px; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.quote-text { grid-column: 1 / -1; margin: 0; color: #475569; }

.price-box { overflow: hidden; border: 2px solid var(--theme); border-radius: 20px; text-align: center; background: #fff; }
.price-featured { padding: 9px; color: #fff; background: var(--theme); font-size: 13px; font-weight: 800; }
.price-content { padding: 16px; }
.price-before { display: inline-block; margin-right: 10px; padding: 5px 9px; border-radius: 8px; color: #fff; background: #ef4444; font-weight: 800; }
.price-value { color: var(--title); font-family: "Montserrat", sans-serif; font-size: 38px; font-weight: 800; }
.price-after { display: block; color: #64748b; }

.pilates-plan {
  width: 100%;
  padding: 22px 18px;
  border: 1px solid #e7e5e4;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff 0%, #fffaf7 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.pilates-plan-title {
  margin: 0 0 22px;
  color: var(--title);
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: clamp(22px, 5vw, 29px);
  line-height: 1.18;
  text-align: center;
}

.body-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.body-stage { margin: 0; text-align: center; }
.body-stage img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  object-position: center top;
  background: #f5f5f4;
}
.body-stage figcaption { margin-top: 7px; color: #111827; font-size: 14px; }

.comparison-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #a78bfa, #8b5cf6);
  font-size: 29px;
  line-height: 1;
}

.pilates-benefits {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.pilates-benefits li {
  position: relative;
  padding-left: 27px;
  color: #374151;
  font-size: 14px;
}

.pilates-benefits li::before {
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #34c77b;
  content: "✓";
  font-size: 13px;
  font-weight: 800;
}

.initial-loader { display: grid; min-height: 240px; place-items: center; }
.spinner { width: 38px; height: 38px; border: 4px solid #dbeafe; border-top-color: var(--theme); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-box { padding: 24px; border-radius: var(--radius); color: #7f1d1d; background: #fee2e2; }

@media (max-width: 520px) {
  .page-shell { padding: 10px 10px 32px; }
  .quiz-card { padding: 19px 15px; border-radius: 18px; }
  .step { gap: 13px; }
  .option-label { padding: 10px 8px; font-size: 14px; }
  .quote-card { grid-template-columns: 56px 1fr; }
  .quote-avatar { width: 56px; height: 56px; }
  .pilates-plan { padding: 19px 13px; }
  .body-comparison { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 7px; }
  .comparison-arrow { width: 36px; height: 36px; }
}

@media (min-width: 760px) {
  .page-shell { padding-top: 28px; }
  .quiz-card { padding: 30px 32px; }
}
