:root {
  --bg: #020216;
  --accent: #b27cfd;
  --accent-rgb: 178, 124, 253;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --card-bg: rgba(255, 255, 255, 0.06);
  --choice-surface: rgba(255, 255, 255, 0.1);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-btn: 18px;
  --pad-x: 22px;
  --pad-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Повторяющиеся размеры экранов */
  /* 5.5vw на ~375px ≈ 21px → clamp упирался в min 26px. 8.5vw ≈ 32px на 375–390px */
  --headline-size: clamp(28px, 8.5vw, 32px);
  --btn-min-height: 64px;
  /* Заголовок → подзаголовок (не путать с отступом до кнопки) */
  --space-title-sub: 14px;
  /* Между заголовком / текстовым блоком и нижней кнопкой */
  --space-heading-to-btn: 42px;
  --tint-a: #b27bfd1a;
  --tint-b: #b27bfd52;
  /* Появление карточек (после Hello и на других шагах) */
  --ob-card-enter-duration: 0.48s;
  --ob-card-enter-stagger: 75ms;
  --ob-card-enter-shift: 16px;
  --tile-min-height: 180px;
  /* Длительность фона Full analysis (переопределяется JS с Lottie) */
  --analysis-dur-global: 9s;
}

@keyframes ob-card-enter {
  from {
    opacity: 0;
    transform: translate3d(0, var(--ob-card-enter-shift), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Секция с классом step--enter-cards; у потомков style="--enter-order: N" (0,1,2…) */
.step--enter-cards .choice-row,
.step--enter-cards .tile {
  animation: ob-card-enter var(--ob-card-enter-duration) cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--enter-order, 0) * var(--ob-card-enter-stagger));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

.ambience-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: radial-gradient(120% 80% at 50% 0%, #0a0a24 0%, var(--bg) 55%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

@media (min-width: 768px) {
  .app {
    align-items: center;
    padding: 0 20px;
  }
}

.onboarding-shell {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* Лес на весь экран под шагами, пока выбран вариант Forest на welcome */
.forest-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.onboarding-shell.shell--forest-bg .forest-backdrop {
  opacity: 1;
}

.onboarding-shell.shell--forest-bg {
  background: transparent;
}

.onboarding-shell.shell--forest-bg.is-welcome-step .stage {
  background: transparent;
}

.onboarding-shell.shell--forest-bg:not(.is-welcome-step) .stage {
  background: rgba(2, 2, 22, 0.84);
}

@keyframes analysis-shell-bg-flow {
  0% {
    background: #ffcb01;
  }
  28% {
    background: #e8c24a;
  }
  55% {
    background: #8a6e9a;
  }
  82% {
    background: #1a1530;
  }
  100% {
    background: #020216;
  }
}

/* Те же фазы %, что у analysis-shell-bg-flow — длительность = var(--analysis-dur-global) с оболочки */
@keyframes analysis-intro-title-fade {
  0%,
  28% {
    color: #1a1308;
  }
  55% {
    color: #c4bccf;
  }
  82% {
    color: #eae8f0;
  }
  100% {
    color: #ffffff;
  }
}

@keyframes analysis-intro-body-fade {
  0%,
  28% {
    color: rgba(26, 19, 8, 0.88);
  }
  55% {
    color: rgba(230, 226, 240, 0.92);
  }
  82% {
    color: rgba(245, 244, 250, 0.95);
  }
  100% {
    color: rgba(255, 255, 255, 0.92);
  }
}

/* Радиальный Bg.webp под Lottie: проявляется к тёмной фазе (те же %, что фон оболочки) */
@keyframes analysis-intro-glow-fade {
  0%,
  35% {
    opacity: 0;
  }
  55% {
    opacity: 0.32;
  }
  82% {
    opacity: 0.58;
  }
  100% {
    opacity: 0.68;
  }
}

.welcome-media__video--idle {
  display: none !important;
}

/* ——— Full analysis: фон жёлтый → тёмный за длительность Lottie ——— */
.onboarding-shell.shell--analysis-intro-active {
  animation: analysis-shell-bg-flow var(--analysis-dur-global, 9s) linear forwards;
}

.onboarding-shell.shell--analysis-intro-active.shell--analysis-intro-night {
  animation: none;
  background: #020216;
}

.onboarding-shell.shell--analysis-intro-active .stage {
  background: transparent;
}

.onboarding-shell.shell--analysis-intro-active .topbar {
  background: rgba(2, 2, 22, 0.06);
}

.onboarding-shell.shell--analysis-intro-active.shell--analysis-intro-night .topbar {
  background: transparent;
}

.step--analysis-intro {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.step-analysis-scene-bleed {
  margin-inline: calc(-1 * var(--pad-x));
  padding-inline: var(--pad-x);
  padding-top: 48px;
  flex-shrink: 0;
}

/* Full analysis: Lottie (Animation.json) + запасной Bg.webp */
.step-analysis-scene {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  max-height: min(72vw, 320px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.step-analysis-scene__dial-stack {
  position: relative;
  width: min(280px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: visible;
}

.step-analysis-scene__glow {
  position: absolute;
  inset: -30%;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  animation: analysis-intro-glow-fade var(--analysis-dur-global, 9s) linear forwards;
}

.step-analysis-scene__glow-img {
  width: 108%;
  height: 108%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  display: block;
}

.step--analysis-intro--night .step-analysis-scene__glow {
  animation: none;
  opacity: 0.68;
}

.step-analysis-scene__lottie {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.step-analysis-scene__lottie svg {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.step-analysis-scene__lottie-fallback-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Перебиваем глобальный .step__scroll { padding: 8px … } на этом шаге */
.step--analysis-intro .step__scroll.step--analysis-intro__scroll {
  padding: 76px var(--pad-x) 8px;
}

.step--analysis-intro__scroll {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.step--analysis-intro .step__title {
  text-align: left;
  margin-top: 0;
  margin-bottom: 16px;
  animation: analysis-intro-title-fade var(--analysis-dur-global, 9s) linear forwards;
}

.step--analysis-intro .step-analysis-intro__body {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  text-align: left;
  animation: analysis-intro-body-fade var(--analysis-dur-global, 9s) linear forwards;
}

.step--analysis-intro--night .step__title {
  color: var(--text);
  animation: none;
}

.step--analysis-intro--night .step-analysis-intro__body {
  color: rgba(255, 255, 255, 0.92);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-shell.shell--analysis-intro-active {
    animation: none;
    background: #020216;
  }

  .step--analysis-intro .step__title,
  .step--analysis-intro .step-analysis-intro__body {
    animation: none !important;
  }

  .step-analysis-scene__glow {
    animation: none !important;
    opacity: 0.68;
  }
}

@media (min-width: 768px) {
  .onboarding-shell {
    max-width: 520px;
  }
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad-x) 10px;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
}

.topbar[hidden] {
  display: none !important;
}

.onboarding-shell.is-welcome-step .topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(2, 2, 22, 0.55) 0%, rgba(2, 2, 22, 0.18) 50%, transparent 100%);
}

.onboarding-shell.is-welcome-step .topbar .icon-btn {
  background: rgba(255, 255, 255, 0.08);
}

.topbar--welcome .back-btn {
  visibility: hidden;
  pointer-events: none;
}

.topbar--welcome .progress {
  visibility: hidden;
  pointer-events: none;
}

.icon-btn,
.step--pick-cards .choice-row {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:active {
  transform: scale(0.97);
}

.back-icon {
  display: block;
}

.topbar__sound {
  flex-shrink: 0;
  position: relative;
}

.topbar__sound-emoji {
  display: block;
  font-size: 19px;
  line-height: 1;
  pointer-events: none;
}

.progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: #fff;
  transition: width 0.35s ease;
}

.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bottom-actions {
  position: relative;
  z-index: 3;
  padding: var(--space-heading-to-btn) var(--pad-x) var(--pad-bottom);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.bottom-actions__pager {
  flex-shrink: 0;
}

/* Те же точки, что у карусели на «Identify your health risks…» (.health-carousel__dot) */
.bottom-actions__pager .health-carousel__dots {
  margin: 0;
  padding: 10px 20px 4px;
}

.onboarding-shell.shell--health-scan-footer .bottom-actions {
  padding-top: 14px;
}

/* Финальный экран: фон на всю оболочку (под топбаром тоже пляж), затемнение лёгкое — картинка хорошо видна.
   Горизонтальный скролл страницы режет body; боковой peek карусели не обрезаем здесь */
.onboarding-shell.shell--social-proof {
  background:
    linear-gradient(180deg, rgba(4, 6, 18, 0.14) 0%, rgba(4, 6, 18, 0.22) 42%, rgba(4, 6, 18, 0.32) 100%),
    url("assets/Image/BeachNight.webp") center / cover no-repeat;
  overflow-x: visible;
  overflow-y: hidden;
}

.onboarding-shell.shell--social-proof .stage {
  background: transparent;
  overflow-x: visible;
}

.onboarding-shell.shell--social-proof .topbar {
  background: transparent;
}

/* Финальный экран: рейтинг + отзывы (точки в footerPager — классы health-carousel) */
.step--social-proof {
  position: relative;
  background: none;
  color: #fff;
}

.step--social-proof__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 12px;
  overflow-x: visible;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Свайп карусели только в зоне .sp-carousel — здесь не даём горизонталь «перехватывать» скролл */
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.step--social-proof__scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.sp-proof__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a56c;
}

.step--social-proof .sp-proof__title {
  margin: 0 auto 64px;
  max-width: 20ch;
  line-height: 1.12;
  text-align: center;
}

.sp-proof__rating-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 84px;
}

.sp-proof__hero-stars {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.12em;
  color: #c9a56c;
}

.sp-proof__score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sp-proof__score-num {
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #c9a56c;
  font-variant-numeric: tabular-nums;
}

.sp-proof__score-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #c9a56c;
}

.sp-proof__score-year {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

.sp-carousel {
  width: 100%;
  max-width: min(420px, 96vw);
  margin: 0 auto;
  overflow-x: visible;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.sp-carousel__viewport {
  overflow: visible;
  width: 100%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior-x: contain;
}

.sp-carousel__viewport:active {
  cursor: grabbing;
}

.sp-carousel__track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: max-content;
  transition: transform 0.38s cubic-bezier(0.25, 0.82, 0.25, 1);
  will-change: transform;
  touch-action: pan-y;
}

.sp-carousel__pane {
  box-sizing: border-box;
  flex: 0 0 min(288px, 78vw);
  min-width: 0;
  max-width: min(288px, 78vw);
}

.sp-card {
  width: 100%;
  margin: 0;
  max-width: none;
  text-align: left;
  padding: 14px 14px 16px;
  border-radius: 20px;
  background: rgba(22, 22, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.sp-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sp-card__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
}

.sp-card__avatar--female {
  background: linear-gradient(160deg, rgba(140, 180, 240, 0.45), rgba(70, 100, 170, 0.35));
}

.sp-card__avatar--male {
  background: linear-gradient(160deg, rgba(120, 150, 210, 0.5), rgba(55, 85, 140, 0.4));
}

.sp-card__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sp-card__avatar--photo {
  background: rgba(0, 0, 0, 0.2);
}

.sp-card__user {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.sp-card__date {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.sp-card__stars {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #c9a56c;
}

.sp-card__quote {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Финальный экран: отчёт + функции + отзывы + App Store; фон — переливы (::before/::after) */
.onboarding-shell.shell--report-ready {
  position: relative;
  --report-bg-ink: #05030f;
  background: var(--report-bg-ink);
  overflow-x: visible;
  overflow-y: hidden;
  isolation: isolate;
}

.onboarding-shell.shell--report-ready::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    #070518 0%,
    #140a28 18%,
    #09162e 35%,
    #1a0824 55%,
    #062028 72%,
    #10081e 100%
  );
  background-size: 360% 360%;
  animation: report-ready-gradient-flow 16s ease-in-out infinite;
}

.onboarding-shell.shell--report-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.62;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 100% 70% at 15% 20%, rgba(150, 100, 255, 0.42) 0%, transparent 50%),
    radial-gradient(ellipse 90% 60% at 90% 75%, rgba(30, 200, 200, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 60% 50%, rgba(255, 150, 90, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 40% 95%, rgba(100, 80, 200, 0.2) 0%, transparent 50%);
  animation: report-ready-aurora 22s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-shell.shell--report-ready::before,
  .onboarding-shell.shell--report-ready::after {
    animation: none;
  }

  .onboarding-shell.shell--report-ready::before {
    background: linear-gradient(180deg, #080618 0%, #0a0a1e 50%, #050510 100%);
    background-size: 100% 100%;
  }

  .onboarding-shell.shell--report-ready::after {
    opacity: 0.4;
  }
}

@keyframes report-ready-gradient-flow {
  0%,
  100% {
    background-position: 0% 45%;
  }

  50% {
    background-position: 100% 55%;
  }
}

@keyframes report-ready-aurora {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }

  100% {
    transform: translate(2.5%, -1.5%) scale(1.04);
    opacity: 0.7;
  }
}

.onboarding-shell.shell--report-ready .stage {
  position: relative;
  z-index: 2;
  background: transparent;
  overflow-x: visible;
}

.onboarding-shell.shell--report-ready .topbar {
  position: relative;
  z-index: 3;
  background: transparent;
}

.onboarding-shell.shell--report-ready .bottom-actions {
  position: relative;
  z-index: 3;
}

.step--report-ready {
  position: relative;
  background: none;
  color: #fff;
}

.step--report-ready__scroll {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 4px 4px 8px;
  max-width: min(420px, 100%);
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.step--report-ready__scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.report-ready__kicker {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.report-ready__title {
  margin: 0 0 12px;
  text-align: center;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.14;
  font-size: clamp(1.5rem, 5.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.report-ready__subtitle {
  margin: 0 0 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.report-ready__section {
  margin-bottom: 0px;
}

.report-ready__section-title {
  margin: 0 0 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 165, 108, 0.95);
  text-align: center;
}

.report-ready__section--reviews .report-ready__section-title {
  margin-bottom: 6px;
}

.report-ready__swipe-hint {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

.step--report-ready .sp-carousel--report-ready {
  width: 100%;
  max-width: min(420px, 96vw);
  margin: 0 auto;
  overflow-x: visible;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

/* «Колода» в фикс. сцене: плашки в absolute, высота не прыгает, когда 4-я въезжает */
.report-ready__stack-scene {
  --rr-h: 12.75rem;
  --rr-y1: 0;
  --rr-y2: 3.1rem;
  --rr-y3: 5.95rem;
  /* Слот «4 в очереди» — ниже видимой тройки, вне внимания */
  --rr-y-queue: 8.4rem;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: var(--rr-h);
  height: var(--rr-h);
  margin: 0 auto 6px;
  padding: 0 2px;
  overflow: visible;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .report-ready__stack-scene {
    --rr-h: 12.2rem;
    --rr-y2: 2.8rem;
    --rr-y3: 5.5rem;
    --rr-y-queue: 7.8rem;
  }
}

/* «Колода»: в DOM видны 1+2+3, 4+ скрыты. JS: верх уезжает влево (fade) и в конец <ul> по кругу. */
.report-ready__stack-scene .report-ready__features--stack {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  overflow: visible;
}

.report-ready__stack-scene .report-ready__feature {
  list-style: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1;
  transition: top 0.6s cubic-bezier(0.3, 0.68, 0.2, 1), opacity 0.45s ease, visibility 0.01s linear 0.28s;
}

.report-ready__stack-scene .report-ready__feature:nth-child(1) {
  top: var(--rr-y1);
  z-index: 6;
}

.report-ready__stack-scene .report-ready__feature:nth-child(2) {
  top: var(--rr-y2);
  z-index: 5;
}

.report-ready__stack-scene .report-ready__feature:nth-child(3) {
  top: var(--rr-y3);
  z-index: 4;
}

/* 4+ в очереди: под видимой тройкой, без влияния на высоту сцены */
.report-ready__stack-scene .report-ready__features--stack .report-ready__feature:nth-child(n + 4) {
  top: var(--rr-y-queue);
  left: 0;
  right: 0;
  z-index: 0;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: top 0.72s cubic-bezier(0.3, 0.68, 0.2, 1), opacity 0.5s ease, transform 0.4s;
}

.report-ready__stack-scene
  .report-ready__features--stack
  .report-ready__feature:nth-child(n + 4)
  .report-ready__feature-surface {
  display: flex;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  border: 0;
  box-shadow: none;
  filter: none;
  opacity: 0;
  transform: translate3d(0, 1.2rem, 0) scale(0.8);
  pointer-events: none;
  transition: transform 0.72s cubic-bezier(0.3, 0.65, 0.2, 1), opacity 0.55s ease, min-height 0.35s ease, padding 0.35s ease, filter 0.4s;
}

/* Уход 1-й: влево + затухание (параллельно .stack-cycle--active на <ul>) */
.report-ready__stack-scene .report-ready__features--stack .report-ready__feature--leaving {
  z-index: 25 !important;
  pointer-events: none;
  overflow: visible;
  min-height: 0;
  visibility: visible;
  margin-top: 0 !important;
  opacity: 1;
}

.report-ready__stack-scene .report-ready__features--stack .report-ready__feature--leaving .report-ready__feature-surface {
  display: flex !important;
  transform: translate3d(-122%, 0, 0) scale(0.9) !important;
  opacity: 0 !important;
  filter: brightness(0.6) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.72s cubic-bezier(0.3, 0.55, 0.15, 1), opacity 0.6s ease, filter 0.55s ease, box-shadow 0.5s ease !important;
}

.report-ready__feature-surface {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(22, 22, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 15px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  transform: scale(1) translate3d(0, 0, 0);
  transform-origin: 50% 0;
  transition: transform 0.62s cubic-bezier(0.25, 0.72, 0.2, 1), box-shadow 0.5s ease, filter 0.6s ease, opacity 0.55s ease;
}

/* Одна высота у всех плашек в колоде, контент по вертикали по центру */
.report-ready__stack-scene .report-ready__features--stack .report-ready__feature-surface {
  min-height: 5.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.report-ready__stack-scene
  .report-ready__features--stack
  .report-ready__feature:not(.report-ready__feature--leaving)
  .report-ready__feature-surface {
  transition: transform 0.62s cubic-bezier(0.25, 0.72, 0.2, 1), box-shadow 0.5s ease, filter 0.6s ease, opacity 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  .report-ready__stack-scene
    .report-ready__features--stack
    .report-ready__feature--leaving
    .report-ready__feature-surface {
    transform: none !important;
    opacity: 0 !important;
  }
}

/* Покой: 1 — полный; 2 и 3 — меньше + смещение; 4+ спрятаны (см. n+4) */
.report-ready__stack-scene .report-ready__features--stack .report-ready__feature:nth-child(1) .report-ready__feature-surface {
  transform: scale(1) translate3d(0, 0, 0);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  filter: brightness(1);
  opacity: 1;
}

.report-ready__stack-scene .report-ready__features--stack .report-ready__feature:nth-child(2) .report-ready__feature-surface {
  transform: scale(0.92) translate3d(0, 6px, 0);
  filter: brightness(0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0.98;
}

.report-ready__stack-scene .report-ready__features--stack .report-ready__feature:nth-child(3) .report-ready__feature-surface {
  transform: scale(0.91) translate3d(0, 12px, 0);
  filter: brightness(0.93);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  opacity: 0.97;
}

/* Активный цикл: 1) уезжает 1-я, 2–4 движутся по top, ~0,72s; затем append */
.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(2) {
  top: var(--rr-y1) !important;
  z-index: 8;
  margin-top: 0 !important;
  visibility: visible;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(2)
  .report-ready__feature-surface {
  transform: scale(1) translate3d(0, 0, 0);
  filter: brightness(1);
  opacity: 1;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.72s cubic-bezier(0.28, 0.7, 0.2, 1), box-shadow 0.55s ease, filter 0.65s ease, opacity 0.55s ease;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(3) {
  top: var(--rr-y2) !important;
  z-index: 5;
  margin-top: 0 !important;
  visibility: visible;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(3)
  .report-ready__feature-surface {
  transform: scale(0.92) translate3d(0, 6px, 0);
  filter: brightness(0.95);
  opacity: 0.99;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.72s cubic-bezier(0.28, 0.7, 0.2, 1), box-shadow 0.55s ease, filter 0.65s ease, opacity 0.55s ease;
}

/* 4-я: в третьем ряду (визуал «3-й плашки»); 5+ остаются в очереди */
.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(4) {
  top: var(--rr-y3) !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0;
  border: 0;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  z-index: 4;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(4)
  .report-ready__feature-surface {
  display: flex !important;
  min-height: 5.75rem !important;
  padding: 12px 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(22, 22, 44, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: scale(0.91) translate3d(0, 12px, 0);
  opacity: 0.97;
  filter: brightness(0.93);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28) !important;
  transition: transform 0.72s cubic-bezier(0.3, 0.68, 0.18, 1), opacity 0.65s ease, filter 0.6s ease, box-shadow 0.5s
    ease, min-height 0.45s ease, padding 0.45s ease, border 0.3s;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(n + 5) {
  top: var(--rr-y-queue) !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  padding: 0;
  border: 0;
  pointer-events: none;
  z-index: 0;
}

.report-ready__stack-scene
  .report-ready__features--stack.stack-cycle--active
  .report-ready__feature:nth-child(n + 5)
  .report-ready__feature-surface {
  min-height: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transform: translate3d(0, 0.75rem, 0) scale(0.6);
  border: 0;
  box-shadow: none;
  animation: none;
}

.report-ready__feature-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.report-ready__feature-emoji {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1.2;
}

.report-ready__feature-label {
  flex: 1;
  min-width: 0;
}

.report-ready__review-card {
  text-align: left;
}

.sp-card__quote--report-ready {
  -webkit-line-clamp: 6;
  line-clamp: 6;
}

.btn--app-store {
  gap: 10px;
  min-height: var(--btn-min-height);
  background: rgba(32, 32, 48, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.btn--app-store__glyph {
  flex-shrink: 0;
  display: block;
  margin-top: 1px;
  opacity: 0.95;
  margin-bottom: 4px;
}

.btn--app-store__text {
  line-height: 1.2;
}

.btn--app-store:not(:disabled):hover {
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.28) !important;
}

.bottom-actions[hidden] {
  display: none !important;
}

.btn-primary {
  width: 100%;
  min-height: var(--btn-min-height);
  border: 0;
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  font: 600 16px/1.2 var(--font);
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.btn-primary:not(:disabled):hover {
  filter: brightness(1.05);
}

.btn-primary:not(:disabled):active {
  transform: scale(0.99);
}

.step {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.step.is-active {
  display: flex;
  overflow: hidden;
}

.step__scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px var(--pad-x) 0;
  -webkit-overflow-scrolling: touch;
}

.step__scroll > * {
  position: relative;
  z-index: 1;
}

.step__title {
  margin: 6px 0 22px;
  font-size: var(--headline-size);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.step__title:has(+ .step__subtitle) {
  margin-bottom: var(--space-title-sub);
}

.step__subtitle {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text-muted);
  font-weight: 400;
}

/* Экран «Let's get to know you better»: Bg_P.webp только под кроватью + иконки; текст ниже */
.step--hero-bed {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.step--hero-bed .step--hero-bed__scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0 0 12px;
  min-height: 100%;
}

/* Верхняя зона: фон + кровать + эмодзи (фон не тянется за текст) */
.step-hero-bed__visual {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  min-height: min(52vh, 440px);
  max-height: min(58vh, 480px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px var(--pad-x) 0;
}

.step-hero-bed__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-position: center 40%;
  background-size: cover;
  pointer-events: none;
  will-change: opacity, transform, filter;
}

.step-hero-bed__hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
  gap: 0;
}

.step-hero-bed__bed {
  display: block;
  width: min(94%, 400px);
  height: auto;
  max-height: min(40vh, 320px);
  object-fit: contain;
  object-position: center bottom;
  will-change: opacity, transform;
}

.step-hero-bed__emoji-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* Визуально вплотную к нижнему краю кровати */
  margin-top: -18px;
  padding-bottom: 10px;
}

.step-hero-bed__emoji-pill {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  will-change: transform, opacity, box-shadow;
}

/* Старт до срабатывания JS: фон, кровать, эмодзи, текст */
.step--hero-bed:not(.step--hero-bed--entered) .step-hero-bed__backdrop {
  opacity: 0;
  transform: scale(1.07);
  filter: blur(10px);
}

.step--hero-bed:not(.step--hero-bed--entered) .step-hero-bed__bed {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
}

.step--hero-bed:not(.step--hero-bed--entered) .step-hero-bed__emoji-pill {
  opacity: 0;
  transform: translateY(28px) scale(0.35);
}

.step--hero-bed:not(.step--hero-bed--entered) .step-hero-bed__copy {
  opacity: 0;
  transform: translateY(14px);
}

/* После mount: плавное появление Bg_P, затем кровать, «пружинные» эмодзи, текст */
.step--hero-bed--entered .step-hero-bed__backdrop {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  transition:
    opacity 0.95s ease,
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s ease;
}

.step--hero-bed--entered .step-hero-bed__bed {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.75s ease 0.12s,
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.step--hero-bed--entered .step-hero-bed__copy {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s ease 0.22s,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s;
}

.step--hero-bed--entered .step-hero-bed__emoji-pill:nth-child(1) {
  animation:
    heroBedEmojiPopA 0.78s cubic-bezier(0.34, 1.5, 0.64, 1) 0.38s both,
    heroBedEmojiGlow 2.8s ease-in-out 1.2s infinite;
}

.step--hero-bed--entered .step-hero-bed__emoji-pill:nth-child(2) {
  animation:
    heroBedEmojiPopB 0.78s cubic-bezier(0.34, 1.5, 0.64, 1) 0.55s both,
    heroBedEmojiGlow 2.8s ease-in-out 1.35s infinite;
}

@keyframes heroBedEmojiPopA {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.4) rotate(-14deg);
  }
  68% {
    opacity: 1;
    transform: translateY(-8px) scale(1.14) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes heroBedEmojiPopB {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.4) rotate(14deg);
  }
  68% {
    opacity: 1;
    transform: translateY(-8px) scale(1.14) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes heroBedEmojiGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
  50% {
    box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .step--hero-bed .step-hero-bed__backdrop,
  .step--hero-bed .step-hero-bed__bed,
  .step--hero-bed .step-hero-bed__emoji-pill,
  .step--hero-bed .step-hero-bed__copy {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }
}

/* Текст отдельно ниже «картинки», по левому краю */
.step-hero-bed__copy {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 28px var(--pad-x) 8px;
  text-align: left;
}

.step--hero-bed .step-hero-bed__title {
  text-align: left;
  max-width: 18ch;
  margin-left: 0;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: var(--space-title-sub);
  color: var(--text);
}

.step--hero-bed .step-hero-bed__subtitle {
  text-align: left;
  max-width: 36ch;
  margin-left: 0;
  margin-right: auto;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
}

/* Слайд No / Yes: привычки сна + фото AnotherReason / sleep_happy */
.step--habits-compare__scroll {
  padding-top: 6px;
  padding-bottom: 8px;
  /* Анимация translate влево/вправо не должна давать горизонтальный скролл */
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
}

.step--habits-compare {
  overflow-x: hidden;
  overflow-x: clip;
}

.step--habits-compare__title {
  text-align: center;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  line-height: 1.18;
}

.habits-cards {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 540px;
  margin: 68px auto 0;
  padding: 4px 0 28px;
  min-height: 460px;
  overflow-x: hidden;
  overflow-x: clip;
}

.habits-card {
  position: relative;
  flex: 0 0 auto;
  width: 205px;
  max-width: 100%;
  min-width: 200px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
}

.habits-card--no {
  z-index: 1;
  margin-top: 22px;
  background: rgba(18, 18, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.habits-card--yes {
  z-index: 2;
  margin-left: -58px;
  margin-top: 4px;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.habits-card__head {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  text-align: left;
  width: 100%;
  margin-bottom: 12px;
}

.habits-card__list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  flex: 1 1 auto;
}

.habits-card__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-align: left;
}

.habits-card__text {
  text-align: left;
}

.habits-card__sym {
  flex: 0 0 14px;
  width: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.habits-card__sym--no {
  color: rgba(255, 255, 255, 0.55);
}

.habits-card__sym--yes {
  color: rgba(255, 255, 255, 0.95);
}

.habits-card__photo {
  display: block;
  width: calc(100% + 32px);
  max-width: none;
  margin: 10px -16px 0;
  height: auto;
  min-height: 144px;
  object-fit: cover;
  border-radius: 12px 12px 16px 16px;
}

/* assets/Icon/arrow.svg — по центру между карточками, ниже по вертикали */
.habits-cards__arrow {
  position: absolute;
  left: 45%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none; 
}

.habits-cards__arrow-img {
  display: block;
  width: min(50px, 12vw);
  height: auto;
  /* Подгонка направления кривой между левой и правой карточкой */
  transform: rotate(-18deg);
  opacity: 1;
}

/* Вход на слайд: с центра разъезжаются влево/вправо, Yes чуть выше; стрелка — после */
.habits-cards:not(.habits-cards--entered) .habits-card--no {
  opacity: 0;
  transform: translate3d(calc(-1 * min(130px, 36vw)), 22px, 0);
}

.habits-cards:not(.habits-cards--entered) .habits-card--yes {
  opacity: 0;
  transform: translate3d(min(130px, 36vw), -10px, 0);
}

.habits-cards:not(.habits-cards--entered) .habits-cards__arrow {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.45);
}

.habits-cards.habits-cards--entered .habits-card--no {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.42s ease,
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.habits-cards.habits-cards--entered .habits-card--yes {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.42s ease 0.1s,
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.habits-cards.habits-cards--entered .habits-cards__arrow {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition:
    opacity 0.38s ease 0.52s,
    transform 0.48s cubic-bezier(0.34, 1.25, 0.64, 1) 0.52s;
}

@media (prefers-reduced-motion: reduce) {
  .habits-cards:not(.habits-cards--entered) .habits-card--no,
  .habits-cards:not(.habits-cards--entered) .habits-card--yes {
    opacity: 1 !important;
    transform: none !important;
  }

  .habits-cards:not(.habits-cards--entered) .habits-cards__arrow {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .habits-cards.habits-cards--entered .habits-card--no,
  .habits-cards.habits-cards--entered .habits-card--yes,
  .habits-cards.habits-cards--entered .habits-cards__arrow {
    transition: none !important;
  }
}

@media (max-width: 400px) {
  .habits-cards {
    max-width: 100%;
  }

  .habits-card {
    width: min(256px, 47.5%);
    min-width: 162px;
  }

  .habits-card--yes {
    margin-left: -48px;
  }

  .habits-cards__arrow {
    top: 60%;
  }

  .habits-cards__arrow-img {
    width: min(104px, 30vw);
  }
}

/* Слайд 12: «93%» + график (веб; эталон — SleepChart.tsx в React Native) */
.step--sleep-trust__scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-top: 6px;
  padding-bottom: 6px;
}

.step--sleep-trust__title {
  flex: 0 0 auto;
  text-align: left;
  margin-top: 0;
  margin-bottom: 10px;
}

/* График визуально ближе к середине экрана между заголовком и текстом */
.sleep-trust-chart__stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px 0 10px;
}

.sleep-trust-chart {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* У оси Y (рядом со стрелкой) */
.sleep-trust-chart__y-label {
  position: absolute;
  top: 10px;
  left: 62px;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: #9ca3af;
  pointer-events: none;
}

.sleep-trust-chart__badge {
  position: absolute;
  top: -6px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: #fde68a;
  background: rgba(234, 179, 8, 0.22);
  border: 1px solid rgba(250, 204, 21, 0.45);
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  pointer-events: none;
}

.step--sleep-trust.sleep-trust-chart--show-badge .sleep-trust-chart__badge {
  opacity: 1;
  transform: scale(1);
}

.sleep-trust-chart__svg {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* «Time» — чуть левее и выше относительно правого края */
.sleep-trust-chart__x-label {
  margin: -3px 0 0;
  padding-right: 36px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: #9ca3af;
}

.sleep-trust-chart__subtitle {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  color: #9ca3af;
}

.sleep-trust__body {
  flex: 0 0 auto;
  margin: 8px 0 0;
  padding-bottom: 2px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
}

.sleep-trust__hl {
  color: var(--accent);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .sleep-trust-chart__curve {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }

  .sleep-trust-chart__badge {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Экран «наука / CBT-I» после сетки: звёздный фон, бейдж, слот под видео, текст с акцентом */
.step--info-video__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 12px;
  padding-bottom: 8px;
  background-image:
    radial-gradient(1px circle at 10% 14%, rgba(255, 255, 255, 0.14) 50%, transparent 52%),
    radial-gradient(1px circle at 24% 38%, rgba(255, 255, 255, 0.1) 50%, transparent 52%),
    radial-gradient(1px circle at 76% 20%, rgba(255, 255, 255, 0.12) 50%, transparent 52%),
    radial-gradient(1px circle at 90% 44%, rgba(255, 255, 255, 0.09) 50%, transparent 52%),
    radial-gradient(1px circle at 48% 10%, rgba(255, 255, 255, 0.11) 50%, transparent 52%),
    radial-gradient(1px circle at 66% 62%, rgba(255, 255, 255, 0.08) 50%, transparent 52%);
  background-repeat: no-repeat;
  background-size: 100% 420px;
}

.step--info-video .step__title {
  text-align: center;
  max-width: 22ch;
  margin: 8px auto 18px;
  line-height: 1.12;
}

/* «Identify your health risks…»: карусель, без робота, подпись ближе к кнопке */
.step--health-carousel[data-step-id="health_risks_scan"] .step--health-carousel__scroll {
  padding-top: 2px;
  padding-bottom: 0;
}

.step--health-carousel[data-step-id="health_risks_scan"] .step__title {
  margin: 0 auto 10px;
  max-width: 26ch;
}

.step--health-carousel[data-step-id="health_risks_scan"] .step-info-video__lead {
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: 2px;
}

/* «Creating your sleep report…»: Земля снизу, SVG-кольцо (веб; RN — отдельный SleepAnalysisInfo). */
.step--report-creating {
  flex: 1;
  min-height: 0;
  background: radial-gradient(120% 80% at 50% 0%, #0a1430 0%, #050816 55%, #02040c 100%);
  color: #fff;
}

.step--report-creating__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px var(--pad-x) 20px;
  overflow: hidden;
}

/* От верха экрана до зоны заголовка: #020216 → полная прозрачность */
.step--report-creating__scroll::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* padding scroll + до ~3 строк заголовка + отступ под заголовок */
  height: min(46vh, calc(14px + 3.2 * var(--headline-size) * 1.12 + 26px));
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, #020216 0%, rgba(2, 2, 22, 0) 100%);
}

.step--report-creating__scroll > .report-creating__bg {
  z-index: 0;
}

.step--report-creating__scroll > .report-creating__inner {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.report-creating__bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(52vh, 420px);
  min-height: 200px;
  pointer-events: none;
  overflow: hidden;
}

.report-creating__bg--video .report-creating__bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  pointer-events: none;
  /* без controls: стандартный UI плеера не показываем */
}

.step--report-creating__title {
  margin: 4px auto 26px;
  max-width: 22ch;
  line-height: 1.12;
}

.report-creating__ring {
  position: relative;
  width: min(200px, 54vw);
  height: min(200px, 54vw);
  margin: 0 auto 22px;
}

.report-creating__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.report-creating__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 9vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.report-creating__subtitle {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
}

.report-creating__fine {
  margin: 0;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .report-creating__prog {
    transition: none;
  }
}

/* «Find out what you did in your sleep!» — карточки ночных звуков */
.step--sleep-sounds {
  flex: 1;
  min-height: 0;
  background: var(--bg);
  color: #fff;
}

.step--sleep-sounds__scroll {
  display: flex;
  flex-direction: column;
  padding: 8px var(--pad-x) calc(12px + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow-x: hidden;
}

.step--sleep-sounds__scroll::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(46vh, calc(14px + 3.2 * var(--headline-size) * 1.12 + 28px));
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, #020216 0%, rgba(2, 2, 22, 0) 100%);
}

.step--sleep-sounds__scroll > * {
  position: relative;
  z-index: 1;
}

.sleep-sounds__eyebrow {
  margin: 0 0 8px;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #c9a86a;
  text-align: center;
}

.sleep-sounds__title {
  margin: 0 auto 22px;
  max-width: 20ch;
  text-align: center;
  line-height: 1.12;
}

.sleep-sounds__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: min(400px, 100%);
  margin: 0 auto;
}

.sleep-sounds__card {
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sleep-sounds__card:focus {
  outline: none;
}

.sleep-sounds__card:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.85);
  outline-offset: 2px;
}

.sleep-sounds__card.is-selected {
  border-color: rgba(var(--accent-rgb), 0.75);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2);
  background: rgba(255, 255, 255, 0.09);
}

.sleep-sounds__card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.sleep-sounds__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.sleep-sounds__text {
  min-width: 0;
  text-align: left;
}

.sleep-sounds__label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.sleep-sounds__time {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
}

.sleep-sounds__waves {
  position: relative;
  height: 52px;
  padding: 0 2px;
}

.sleep-sounds__wave {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  height: 52px;
}

.sleep-sounds__waves .sleep-sounds__wave--idle {
  opacity: 0.55;
}

.sleep-sounds__waves .sleep-sounds__wave--active {
  display: none;
  opacity: 1;
}

.sleep-sounds__card.is-selected .sleep-sounds__waves .sleep-sounds__wave--idle {
  display: none;
}

.sleep-sounds__card.is-selected .sleep-sounds__waves .sleep-sounds__wave--active {
  display: flex;
}

.sleep-sounds__bar {
  flex: 1 1 0;
  min-width: 0;
  max-width: 5px;
  align-self: flex-end;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.sleep-sounds__wave--active .sleep-sounds__bar {
  background: rgba(255, 255, 255, 0.92);
}

.sleep-sounds__card--playing .sleep-sounds__wave--active .sleep-sounds__bar {
  transform-origin: bottom center;
  animation: sleepSoundsBarPulse 0.44s ease-in-out infinite alternate;
  animation-delay: calc(var(--bi, 0) * 26ms);
}

@keyframes sleepSoundsBarPulse {
  from {
    transform: scaleY(0.42);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sleep-sounds__card--playing .sleep-sounds__wave--active .sleep-sounds__bar {
    animation: none;
  }
}

/* «Sleep Analytics» — сетка виджетов по мотивам `SleepAnalysisInfo.tsx` (RN → веб). */
.step--sleep-quality {
  flex: 1;
  min-height: 0;
  background: var(--bg);
  color: #fff;
}

.step--sleep-quality__scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 6px var(--pad-x) calc(8px + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
}

.step--sleep-quality__scroll::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(38vh, calc(12px + 2.8 * var(--headline-size) * 1.12 + 20px));
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, #020216 0%, rgba(2, 2, 22, 0) 100%);
}

.step--sleep-quality__scroll > * {
  position: relative;
  z-index: 1;
}

/* Шапка аналитики; тот же блок на слайде «Find out what you did…» */
.sleep-quality__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: #c8a97a;
}

.sleep-quality__title {
  margin: 0 auto 20px;
  max-width: 22ch;
  text-align: center;
  line-height: 1.12;
  font-size: clamp(22px, 6.2vw, 26px);
  font-weight: 800;
}

.step--sleep-sounds .sleep-quality__title {
  margin-bottom: 22px;
  max-width: 20ch;
}

/* «Best sounds for sleep» — карусель превью + стеклянный мини-плеер */
.step--sleep-sounds-media {
  flex: 1;
  min-height: 0;
  background: var(--bg);
  color: #fff;
}

.step--sleep-sounds-media__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px var(--pad-x) calc(12px + env(safe-area-inset-bottom, 0px));
  min-height: 0;
}

.step--sleep-sounds-media__eyebrow {
  margin-bottom: 4px;
}

.ssm-carousel {
  width: 100%;
  max-width: min(348px, 92vw);
  margin-top: 8px;
  margin-bottom: 4px;
}

.ssm-carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  touch-action: pan-y;
}

.ssm-carousel__track {
  display: flex;
  transition: transform 0.38s cubic-bezier(0.25, 0.82, 0.25, 1);
  will-change: transform;
}

.ssm-carousel__pane {
  position: relative;
  box-sizing: border-box;
}

.ssm-carousel__video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 13;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ssm-carousel__video-shell--empty {
  min-height: 200px;
  background: linear-gradient(145deg, rgba(40, 48, 90, 0.5), rgba(8, 10, 28, 0.9));
}

.ssm-carousel__video {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
}

.ssm-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: min(348px, 92vw);
  margin-top: 14px;
  box-sizing: border-box;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ssm-player__progress {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ssm-player__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.14);
  transition: width 0.12s linear;
}

.ssm-player__body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  box-sizing: border-box;
}

.ssm-player__thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.ssm-player__thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ssm-player__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

[data-ssm-label] {
  font-family: "Montserrat", var(--font), system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

[data-ssm-duration] {
  margin-top: 2px;
  font-family: "Montserrat", var(--font), system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
  text-align: left;
  width: 100%;
}

[data-ssm-toggle] {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.15s ease;
}

[data-ssm-toggle]:active {
  transform: scale(0.96);
}

[data-ssm-toggle] .ssm-player__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

[data-ssm-toggle].is-playing .ssm-player__glyph.ssm-player__glyph--pause {
  display: flex;
}

[data-ssm-toggle].is-playing .ssm-player__glyph.ssm-player__glyph--play {
  display: none;
}

[data-ssm-toggle]:not(.is-playing) .ssm-player__glyph.ssm-player__glyph--pause {
  display: none;
}

[data-ssm-toggle]:not(.is-playing) .ssm-player__glyph.ssm-player__glyph--play {
  display: flex;
}

.step--sleep-quality .sleep-quality__title {
  max-width: 24ch;
}

.sleep-quality__mosaic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: min(400px, 100%);
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.sq-card {
  background: #12122a;
  border-radius: 18px;
  border: 1px solid rgba(178, 124, 253, 0.15);
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sq-card:not(.sq-card--calendar) {
  aspect-ratio: 1;
}

.sq-card--calendar {
  grid-column: 1 / -1;
  aspect-ratio: auto;
}

.sq-card__title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 22px;
  height: 22px;
  flex-shrink: 0;
}

.sq-card__plot {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.sq-card__plot--cal {
  margin-top: 4px;
}

.sq-card__yaxis {
  position: relative;
  width: 28px;
  flex-shrink: 0;
  margin-right: 4px;
}

.sq-card__yaxis--h {
  flex-shrink: 0;
  align-self: stretch;
}

.sq-card__yl {
  position: absolute;
  right: 2px;
  font-size: 9px;
  font-weight: 500;
  color: #8888a0;
  line-height: 1;
  white-space: nowrap;
}

.sq-card__yl--warn {
  color: #ff6060;
}

.sq-card__yl--gold {
  color: #c8a97a;
}

.sq-card--stages .sq-card__plot {
  overflow: visible;
}

.sq-stages-svg {
  display: block;
  flex: 1;
  min-width: 0;
  height: auto;
  align-self: center;
  overflow: visible;
}

.sq-card__xaxis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-left: 32px;
  font-size: 9px;
  color: #8888a0;
  height: 16px;
  flex-shrink: 0;
}

.sq-card--stages .sq-card__xaxis {
  margin-top: 10px;
}

.sq-card__xsp {
  flex: 1;
}

.sq-dur-ring {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.sq-dur-svg {
  width: min(100%, 120px);
  height: auto;
  display: block;
}

.sq-dur-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.sq-dur-h {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.sq-dur-sub {
  font-size: 10px;
  font-weight: 500;
  color: #8888a0;
}

.sq-dur-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
  font-size: 10px;
  color: #8888a0;
}

.sq-dur-leg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sq-dur-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sq-noise__chart {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sq-noise__bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.sq-noise__bar {
  flex: 1 1 0;
  min-width: 0;
  max-width: 8px;
  margin: 0 auto;
  height: var(--h);
  align-self: flex-end;
  border-radius: 2px;
  background: var(--c);
  transform-origin: bottom center;
  transform: scaleY(0);
}

.sq-noise__thresh {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed #ff5050;
  pointer-events: none;
  z-index: 2;
}

.sleep-quality--entered .sq-noise__bar {
  /* both = задержка как backwards + финальное состояние как forwards (иначе после анимации снова scaleY(0)) */
  animation: sqBarPop 0.55s cubic-bezier(0.34, 1.35, 0.64, 1) both;
  animation-delay: var(--d);
}

.sq-cal__chart {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sq-cal__bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 100%;
  padding-top: 2px;
}

.sq-cal__bar {
  flex: 1 1 0;
  min-width: 0;
  height: var(--h);
  border-radius: 4px;
  background: var(--c);
  transform-origin: bottom center;
  transform: scaleY(0);
}

.sq-cal__norm {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.2px dashed #c8a97a;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.sleep-quality--entered .sq-cal__bar {
  animation: sqBarPop 0.55s cubic-bezier(0.34, 1.35, 0.64, 1) both;
  animation-delay: var(--d);
}

@keyframes sqBarPop {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.sq-cal__days {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 0 32px;
  font-size: 9px;
  color: #8888a0;
}

.sq-cal__days span {
  flex: 1;
  text-align: center;
}

.sq-cal__stats {
  display: flex;
  align-items: stretch;
  margin-top: 10px;
  padding: 0 2px;
  gap: 4px;
}

.sq-cal__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.sq-cal__stat strong {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.sq-cal__stat span {
  font-size: 9px;
  color: #8888a0;
}

.sq-cal__sub {
  font-size: 12px;
  font-weight: 500;
  color: #8888a0;
}

.sq-cal__div {
  width: 1px;
  align-self: center;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sq-cal__stat--legend {
  gap: 6px;
  justify-content: center;
}

.sq-cal__stat--legend > div {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.sq-cal__lg {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sq-score__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 0;
}

.sq-score__row {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.sq-score__num {
  font-size: clamp(28px, 9vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}

.sq-score__max {
  font-size: 12px;
  font-weight: 500;
  color: #8888a0;
  margin-bottom: 4px;
}

.sq-score__emoji {
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.2;
  opacity: 0;
  transform: scale(0.4);
}

.sleep-quality--entered:not(.sleep-quality--reduced) .sq-score__emoji {
  animation: sqScoreEmoji 0.65s cubic-bezier(0.34, 1.45, 0.64, 1) 2.15s forwards;
}

.sleep-quality--reduced .sq-score__emoji {
  opacity: 1;
  transform: none;
}

@keyframes sqScoreEmoji {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sq-score__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}

.sq-score__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dd87a;
}

.sq-score__ex {
  font-size: 10px;
  font-weight: 600;
  color: #5dd87a;
}

.sleep-quality--reduced .sq-noise__bar,
.sleep-quality--reduced .sq-cal__bar {
  animation: none !important;
  transform: scaleY(1) !important;
}

.sleep-quality--reduced .sleep-quality-stages__curve {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .sleep-quality--entered .sq-noise__bar,
  .sleep-quality--entered .sq-cal__bar {
    animation: none !important;
    transform: scaleY(1) !important;
  }

  .sleep-quality--entered:not(.sleep-quality--reduced) .sq-score__emoji {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.health-carousel {
  width: 100%;
  max-width: min(348px, 92vw);
  margin-top: 32px;
  margin-bottom: 6px;
}

.health-carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  touch-action: pan-y;
}

.health-carousel__track {
  display: flex;
  transition: transform 0.38s cubic-bezier(0.25, 0.82, 0.25, 1);
  will-change: transform;
}

.health-carousel__pane {
  position: relative;
  box-sizing: border-box;
}

/* График ниже по высоте соседних видео — центрируем блок по вертикали внутри панели */
.health-carousel__pane--apnea {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.health-carousel__video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 13;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.health-carousel__video-shell--overlay .health-carousel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
  background: #000;
}

.health-carousel__video-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.health-carousel__pane--active .health-carousel__video-scrim {
  opacity: 1;
}

.health-carousel__pane:not(.health-carousel__pane--active) .health-carousel__video-scrim {
  opacity: 0;
}

.health-carousel__pulse-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 16px;
  pointer-events: none;
  text-align: center;
}

.health-carousel__pulse-caption-line {
  opacity: 0;
  transform: translateY(18px);
  color: #fff;
  font-weight: 800;
}

.health-carousel__pane:not(.health-carousel__pane--active) .health-carousel__pulse-caption-line {
  animation: none;
  opacity: 0;
  transform: translateY(18px);
}

.health-carousel__pulse-caption-line--hero {
  font-size: clamp(44px, 14vw, 56px);
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.health-carousel__pulse-caption-line--band {
  font-size: clamp(11px, 3.4vw, 13px);
  line-height: 1.15;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
}

@keyframes hc-cap-line-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.health-carousel__pane--active .health-carousel__pulse-caption-line--hero {
  animation: hc-cap-line-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.14s;
}

.health-carousel__pane--active .health-carousel__pulse-caption-line--band:nth-child(2) {
  animation: hc-cap-line-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
}

.health-carousel__pane--active .health-carousel__pulse-caption-line--band:nth-child(3) {
  animation: hc-cap-line-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.66s;
}

@media (prefers-reduced-motion: reduce) {
  .health-carousel__pane--active .health-carousel__pulse-caption-line {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .health-carousel__pane--active .health-carousel__video-scrim {
    transition: none;
    opacity: 1;
  }
}

.health-carousel__video {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
}

.health-carousel__apnea-shell {
  width: 100%;
  aspect-ratio: 10 / 13;
  display: flex;
  align-items: stretch;
}

/* 3-й слайд (график): чуть ниже по высоте, чем 10/13 у видео */
.health-carousel__pane--apnea .health-carousel__apnea-shell {
  aspect-ratio: 15 / 11.1;
}

.health-carousel__pane--apnea .health-apnea-card {
  padding: 10px 12px;
  border-radius: 18px;
}

.health-carousel__pane--apnea .health-apnea-card__head {
  margin-bottom: 4px;
}

.health-carousel__pane--apnea .health-apnea-card__title {
  font-size: 14px;
}

.health-carousel__pane--apnea .health-apnea-card__pause {
  margin-top: 6px;
}

.health-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 20px;
}

.health-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.health-carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.28);
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.25),
    0 0 14px rgba(var(--accent-rgb), 0.65);
}

/* Карточка апноэ — веб-анимация по мотивам SleepApneaGraph.tsx */
.health-apnea-card {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 22px;
  background: #0a0a1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.health-apnea-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.health-apnea-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.health-apnea-card__risk {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.health-apnea-card__risk-svg {
  display: block;
  width: 56px;
  height: 56px;
}

.health-apnea-card__risk-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.health-apnea-card__pct-wrap {
  font-size: 11px;
  font-weight: 800;
  color: #ff3b30;
  line-height: 1;
}

.health-apnea-card__pct-suffix {
  font-size: 9px;
}

.health-apnea-card__risk-sub {
  font-size: 7px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1px;
}

.health-apnea-card__graph-wrap {
  position: relative;
  width: 100%;
}

.health-apnea-card__chart {
  display: block;
  width: 100%;
  height: auto;
}

.health-apnea-card__marker {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  min-height: 48px;
}

.health-apnea-card__marker-core {
  position: relative;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.health-apnea-card__pulse-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.35);
  opacity: 0.9;
  transform-origin: 50% 50%;
}

.health-apnea-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}

.health-apnea-card__tag {
  font-size: 9px;
  font-weight: 700;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
}

.health-apnea-card__pause {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  opacity: 0;
}

.health-apnea-card__pause-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
  flex-shrink: 0;
}

.health-apnea-card__pause-txt {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 80, 65, 0.92);
}

@keyframes ha-clip-reveal {
  from {
    width: 0;
  }

  to {
    width: 300px;
  }
}

@keyframes ha-risk-arc {
  from {
    stroke-dashoffset: 103.04;
  }

  to {
    stroke-dashoffset: 33.94;
  }
}

@keyframes ha-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ha-pulse-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(2);
    opacity: 0.35;
  }
}

.health-apnea-card--play .health-apnea-clip {
  animation: ha-clip-reveal 7s linear forwards;
}

.health-apnea-card--play .health-apnea-card__risk-arc {
  animation: ha-risk-arc 1.8s ease forwards 3.64s;
}

.health-apnea-card--play .health-apnea-card__marker {
  animation: ha-fade-in 0.5s ease forwards 3.64s;
}

.health-apnea-card--play .health-apnea-card__pause {
  animation: ha-fade-in 0.7s ease forwards 5.44s;
}

.health-apnea-card--play .health-apnea-card__pulse-ring {
  animation: ha-pulse-ring 1.4s ease-in-out infinite 3.64s;
}

.health-apnea-card--static .health-apnea-clip {
  width: 300px;
}

.health-apnea-card--static .health-apnea-card__marker,
.health-apnea-card--static .health-apnea-card__pause {
  opacity: 1;
}

.health-apnea-card--static .health-apnea-card__risk-arc {
  stroke-dashoffset: 33.94;
}

.step-info-video__badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.step-info-video__badge-face {
  font-size: 28px;
  line-height: 1;
}

.step-info-video__slot {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}

.step-info-video__stack {
  --info-video-layer-fade: 0.45s;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
}

.step--info-video[data-step-id="cbti_science"] .step-info-video__stack {
  min-height: 220px;
}

.step-info-video__stack:not(.step-info-video__stack--transitions-on) .step-info-video__layer {
  transition: none;
}

.step-info-video__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--info-video-layer-fade) ease;
}

.step-info-video__layer--active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
}

.step-info-video__layer--mirror {
  transform: scaleX(-1);
}

.step-info-video__layer--hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0 !important;
  transition: none;
}

/*
 * Слайд CBT-I / Nuts: тон через mix-blend-mode: color (--info-video-tint).
 * Синевато → добавь R, убери B (например #a855f7); слишком розово → чуть ниже R.
 */
.step--info-video[data-step-id="cbti_science"] {
  /* Ближе к фиолету/пурпуру, чем к синему: больше R, меньше B в тинте */
  --info-video-tint: #8b2fc9;
  --info-video-tint-opacity: 0.36;
  --info-video-base-filter: brightness(1.04) saturate(1.18);
}

.step--info-video[data-step-id="cbti_science"] .step-info-video__slot {
  position: relative;
  max-width: 360px;
  aspect-ratio: 4 / 3;
}

.step--info-video[data-step-id="cbti_science"] .step-info-video__video--chromeless {
  filter: var(--info-video-base-filter);
}

.step--info-video[data-step-id="cbti_science"] .step-info-video__slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: var(--info-video-tint);
  opacity: var(--info-video-tint-opacity);
  mix-blend-mode: color;
}

.step-info-video__video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  background: #000;
}

/* Без controls: подстраховка от остаточного UI в webkit */
.step-info-video__video--chromeless::-webkit-media-controls {
  display: none !important;
}

.step-info-video__video--chromeless::-webkit-media-controls-enclosure {
  display: none !important;
}

.step-info-video__lead {
  margin: 0;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  text-align: center;
}

.step-info-video__hl {
  color: var(--accent);
  font-weight: 600;
}

.choice-rows {
  display: flex;
  flex-direction: column;
}

/* Слайд «How long do you fall asleep?» (choice4): заголовок слева, часы в иконке */
.step--choice4 .step__title {
  text-align: left;
}

/* Длинный заголовок: тот же --headline-size, чуть плотнее line-height для переносов */
.step--choice4--compact-title .step__title {
  font-size: var(--headline-size);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* Поза сна: превью слева (sleep_*.webp) */
.step--choice4-images .step__title {
  text-align: left;
}

.step--choice4-images.step--pick-cards .choice-row--thumb {
  min-height: 115px;
  padding: 10px 16px;
  align-items: center;
}

.step--choice4-images.step--pick-cards .choice-row__thumb {
  width: 80px;
  height: 115px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step--pick-cards .choice-row__thumb--empty {
  background: rgba(255, 255, 255, 0.06);
}

.step--choice4-images.step--pick-cards .choice-row__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Экраны 2 и 3: один стиль карточек (белый 10 %, blur, обводка + Check.svg) */
.step--pick-cards .choice-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-lg);
  background: var(--choice-surface);
  border: 2px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.step--pick-cards .choice-row + .choice-row {
  margin-top: 12px;
}

.step--pick-cards .choice-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.step--pick-cards .choice-row__label {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}

.step--pick-cards .choice-row__check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
}

.step--pick-cards .choice-row__check-img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.step--pick-cards .choice-row.is-selected {
  border-color: var(--accent);
  background: var(--choice-surface);
}

.step--pick-cards .choice-row.is-selected .choice-row__check-img {
  opacity: 1;
  transform: scale(1);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: var(--tile-min-height);
  cursor: pointer;
  border: 2px solid transparent;
  background: #12122a;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

/* Затемнение только в зоне подписи, фото сверху без оверлея */
.tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  min-height: 72px;
  background: linear-gradient(
    180deg,
    rgba(2, 2, 22, 0) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(2, 2, 22, 0.92) 85%,
    rgba(2, 2, 22, 0.98) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.25s ease;
}

.tile:hover img {
  transform: scale(1.03);
}

.tile__label {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.tile__check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.tile__check::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.tile.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.tile.is-selected img {
  filter: brightness(1.08) saturate(1.05);
}

.tile.is-selected .tile__check {
  opacity: 1;
  transform: scale(1);
}

.tile.tile--empty-state {
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.18), rgba(2, 2, 22, 0.96));
}

.step--welcome {
  position: relative;
  flex: 1;
  min-height: 0;
}

.welcome-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.welcome-pager {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(max(14px, env(safe-area-inset-top, 0px)) + 58px);
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.welcome-pager__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
  transition: transform 0.2s ease, background 0.2s ease;
}

.welcome-pager__dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.welcome-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, #020216 0%, rgba(2, 2, 22, 0.92) 38%, rgba(2, 2, 22, 0) 56%),
    linear-gradient(180deg, var(--tint-a) 0%, var(--tint-b) 45%, transparent 70%);
}

.welcome-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px var(--pad-x) 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
  gap: 0;
  pointer-events: none;
}

.welcome-stack,
.welcome-actions {
  pointer-events: auto;
}

.welcome-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-moon {
  font-size: 28px;
  line-height: 1;
}

/* Один абзац как в приложении: все строки одного размера и веса, «Hello.» — просто первая строка */
.welcome-copy {
  margin: 0;
  font-size: var(--headline-size);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.welcome-actions {
  margin-top: var(--space-heading-to-btn);
}

.placeholder-block {
  border-radius: var(--radius-md);
  padding: 18px 16px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.placeholder-block strong {
  color: var(--text);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .step--enter-cards .choice-row,
  .step--enter-cards .tile {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
