/*
 * Блок «Один обычный вечер» (index.html#how-it-works).
 * Два телефона с живой вёрсткой приложения: Лена диктует список,
 * у Антона в магазине он появляется и отмечается.
 *
 * Экран приложения свёрстан в нативных размерах iPhone (393×852 pt)
 * и масштабируется через --jl-s. Размеры, цвета и радиусы взяты из Flutter:
 *  - карточка товара: lib/widgets/cupertino_item_card_ui_build.dart
 *  - чекбокс: lib/widgets/cupertino_completion_checkbox.dart (assets/png/circle_*)
 *  - шторка голоса: lib/widgets/voice_dictation_panel.dart + collection_ui.dart
 *  - нижняя панель: lib/widgets/bottom_widget_actions_bar.dart
 * Классы jl-* не пересекаются с product-* из hero, чтобы мобильные
 * переопределения home.css не ломали нативную геометрию.
 */

.journey-live {
  --jl-s: 0.6;
  --jl-blue: #007aff;
  --jl-label: #000000;
  --jl-muted: #66707c;
  --jl-border: rgba(216, 218, 222, 0.82);

  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 36px;
  padding: 28px 36px 64px;
  overflow: hidden;
  border: 1px solid rgba(47, 107, 255, 0.2);
  border-radius: 32px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 207, 74, 0.34), transparent 30%),
    radial-gradient(circle at 82% 80%, rgba(111, 206, 255, 0.32), transparent 35%),
    linear-gradient(145deg, #f8faff 0%, #e9f0ff 100%);
  box-shadow:
    0 24px 60px rgba(31, 62, 127, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.journey-live::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(47, 107, 255, 0.13) 0 2px, transparent 2.5px);
  background-size: 24px 24px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
}

.jl-person {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Плашка персонажа — как .person-chip на lists.html / family-sync.html.
   Активное состояние (Лена диктует, Антон отмечает покупки): плашка
   приподнимается, от аватара расходятся кольца как .sync-pulse,
   справа — индикатор действия. */
.jl-chip {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 206px;
  height: 57px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 14px 32px rgba(31, 62, 127, 0.16);
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.jl-chip-avatar {
  position: relative;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
}

.jl-chip-avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  object-fit: cover;
}

.jl-chip-avatar i {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(47, 107, 255, 0.7);
  border-radius: 50%;
  opacity: 0;
}

.jl-chip > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.jl-chip b {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.jl-chip small {
  color: rgba(60, 60, 67, 0.62);
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.jl-chip-activity {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition:
    max-width 0.35s ease,
    opacity 0.25s ease;
}

.jl-chip-cart {
  gap: 4px;
  color: #2f6bff;
}

.jl-chip-cart img {
  width: 16px;
  height: 16px;
}

.jl-chip-cart b {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.jl-chip.is-active {
  border-color: rgba(47, 107, 255, 0.34);
  box-shadow:
    0 18px 38px rgba(31, 62, 127, 0.22),
    0 0 0 4px rgba(47, 107, 255, 0.1);
  transform: translateY(-3px) scale(1.03);
}

.jl-chip.is-active .jl-chip-avatar i {
  animation: jl-ring 2.3s ease-out infinite;
}

.jl-chip.is-active .jl-chip-avatar i + i {
  animation-delay: 1.15s;
}

.jl-chip.is-active .jl-chip-activity {
  max-width: 60px;
  opacity: 1;
}

.jl-chip.is-active .jl-bars i {
  animation: jl-bar 0.8s ease-in-out infinite;
}

/* «Пинг» индикатора, когда Антон отметил ещё одну позицию */
.jl-chip-cart.is-ping img {
  animation: jl-ping 0.45s ease-out;
}

@keyframes jl-ring {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes jl-ping {
  40% {
    transform: scale(1.35);
  }
}

/* Корпус телефона — как .fc-phone на family-chat.html (family-chat.css):
   рамка 5px, скругления в процентах, боковая кнопка, лёгкое парение. */
.jl-phone {
  position: relative;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 15.7% / 7.4%;
  background: linear-gradient(110deg, #343842 0%, #0a0b0f 28%, #1d2027 69%, #050608 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    inset 0 0 0 2px rgba(255, 255, 255, 0.07),
    0 34px 46px rgba(8, 28, 80, 0.42);
}

.jl-phone-button {
  position: absolute;
  top: 22%;
  right: -3px;
  width: 3px;
  height: 10%;
  border-radius: 0 2px 2px 0;
  background: #1b1d22;
}

.jl-screen {
  position: relative;
  overflow: hidden;
  width: calc(393px * var(--jl-s));
  height: calc(852px * var(--jl-s));
  border-radius: 14.1% / 6.5%;
  background: #ffffff;
  clip-path: inset(0 round 14.1% / 6.5%);
}

@media (prefers-reduced-motion: no-preference) {
  .jl-phone {
    animation: jl-float 5s ease-in-out infinite;
  }

  .jl-person-anton .jl-phone {
    animation-delay: -2.5s;
  }
}

@keyframes jl-float {
  0%,
  100% {
    transform: translateY(0);
  }

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

/* ---------- Экран приложения, нативные размеры ---------- */

.jl-app {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 393px;
  height: 852px;
  background: #ffffff;
  color: var(--jl-label);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  transform: scale(var(--jl-s));
  transform-origin: 0 0;
  -webkit-font-smoothing: antialiased;
}

.jl-app svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jl-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 6px 30px 0 44px;
  font-size: 17px;
  font-weight: 600;
}

.jl-statusbar svg {
  width: 76px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.jl-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  color: var(--jl-blue);
}

.jl-nav strong {
  color: var(--jl-label);
  font-size: 17px;
  font-weight: 600;
}

.jl-nav-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.jl-nav-side:last-child {
  justify-content: flex-end;
}

.jl-nav svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.jl-progress {
  padding: 8px 16px 0;
}

.jl-progress-track {
  display: block;
  overflow: hidden;
  height: 4px;
  border-radius: 2px;
  background: #e5e5ea;
}

.jl-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--jl-blue);
  transition: width 0.5s ease;
}

.jl-progress small {
  display: block;
  margin-top: 4px;
  color: #8e8e93;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.jl-viewport {
  position: absolute;
  top: 138px;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.jl-list {
  position: relative;
  padding-bottom: 140px;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Схлопывание строк: grid 1fr → 0fr, без скачков высоты */
.jl-collapse {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.42s ease,
    opacity 0.32s ease;
}

.jl-collapse > div {
  min-height: 0;
  overflow: hidden;
}

.jl-collapse.is-hidden {
  grid-template-rows: 0fr;
  opacity: 0;
}

.jl-category > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 4px;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 500;
}

.jl-category b {
  font-weight: 500;
}

.jl-category span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.jl-category svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.jl-item > div {
  padding: 4px 16px;
}

.jl-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 11px;
  border: 0.95px solid var(--jl-border);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 242, 244, 0.92));
  transition: box-shadow 0.5s ease;
}

/* Короткая подсветка карточки, как _flash в приложении */
.jl-card.is-flash {
  box-shadow: 0 4px 26px 1px rgba(0, 122, 255, 0.24);
}

.jl-card-head {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  height: 32px;
  gap: 10px;
}

/* Чекбокс — общий блок .app-check (styles/app-check.css), здесь только состояние. */
.jl-check img {
  transition: opacity 0.18s ease;
}

.jl-check img + img,
.jl-card.is-checked .jl-check img:first-child {
  opacity: 0;
}

.jl-card.is-checked .jl-check img + img {
  opacity: 1;
}

.jl-name {
  position: relative;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
}

/* Зачёркивание рисуется слева направо — как _ItemNameStrikePainter */
.jl-name::after {
  position: absolute;
  top: 55%;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #8e8e93;
  content: "";
  transition: width 0.4s ease;
}

.jl-card.is-checked .jl-name {
  color: #8e8e93;
}

.jl-card.is-checked .jl-name::after {
  width: 100%;
}

.jl-chevron {
  width: 28px;
  height: 28px;
  margin-top: -10px;
  color: var(--jl-blue);
  stroke-width: 2.6;
  transition: color 0.3s ease;
}

.jl-card.is-checked .jl-chevron {
  color: #8a8a8e;
}

.jl-meta {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 24px;
  gap: 8px;
  margin: 0 40px 0 50px;
  color: rgba(0, 0, 0, 0.56);
  font-size: 14px;
  font-weight: 500;
}

.jl-meta strong {
  color: rgba(0, 0, 0, 0.72);
  font-weight: 600;
}

.jl-art {
  position: absolute;
  z-index: 1;
  top: 1px;
  right: 36px;
  width: 102px;
  height: 102px;
  object-fit: contain;
  opacity: 0.74;
  transition: opacity 0.3s ease;
}

.jl-card.is-checked .jl-art {
  opacity: 0.62;
}

.jl-card .jl-meta,
.jl-card .jl-labels {
  transition: opacity 0.25s ease;
}

.jl-card.is-checked .jl-meta,
.jl-card.is-checked .jl-labels {
  opacity: 0;
}

/* Кнопка обсуждения позиции */
.jl-discuss {
  position: absolute;
  z-index: 4;
  top: 50px;
  right: 11px;
  width: 36px;
  height: 36px;
}

.jl-discuss::before,
.jl-discuss::after {
  position: absolute;
  background: var(--jl-blue);
  content: "";
}

.jl-discuss::before {
  top: 6px;
  left: 1px;
  width: 20px;
  height: 15px;
  border-radius: 7px 7px 3px 7px;
}

.jl-discuss::after {
  top: 15px;
  left: 11px;
  width: 19px;
  height: 15px;
  border-radius: 7px 7px 7px 3px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.jl-discuss i {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--jl-blue);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.jl-card.is-checked .jl-discuss {
  filter: grayscale(0.38);
  opacity: 0.76;
}

.jl-labels {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 2px 40px 0 50px;
}

.jl-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 5px;
  padding: 4.5px 8px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.jl-label svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.jl-label-add {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(0, 122, 255, 0.05);
  color: #3478f6;
}

.jl-label-yellow {
  border-color: rgba(224, 190, 62, 0.55);
  background: rgba(255, 207, 74, 0.14);
  color: #c9a520;
}

/* Нижняя панель действий списка */
.jl-tabbar {
  position: absolute;
  z-index: 6;
  right: 14px;
  bottom: 30px;
  left: 14px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 64px;
  border: 1px solid rgba(216, 218, 222, 0.6);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
  color: var(--jl-blue);
}

.jl-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  font-size: 11px;
  font-weight: 500;
}

.jl-tab svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.jl-tab-badge {
  position: absolute;
  top: -7px;
  left: calc(50% + 5px);
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: var(--jl-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- Шторка «Голосовой ввод» ---------- */

.jl-scrim {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.jl-sheet {
  position: absolute;
  z-index: 9;
  right: 12px;
  bottom: 34px;
  left: 12px;
  padding: 16px;
  border-radius: 28px;
  background: #f2f2f7;
  transform: translateY(112%);
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.journey-live.is-voice-open .jl-scrim {
  opacity: 1;
}

.journey-live.is-voice-open .jl-sheet {
  transform: none;
}

.jl-sheet-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.jl-sheet-head strong {
  color: #1f2328;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

.jl-sheet-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--jl-blue);
}

.jl-sheet-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.jl-sheet-hints {
  margin: 8px 0 14px;
  color: var(--jl-muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.jl-field {
  border: 0.9px solid var(--jl-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.jl-wave {
  padding: 10px 12px;
  border-radius: 18px;
}

.jl-wave canvas {
  display: block;
  width: 100%;
  height: 24px;
}

.jl-sheet-status {
  margin: 10px 0 12px;
  color: var(--jl-muted);
  font-size: 13px;
  text-align: center;
}

.jl-sheet-status span + span,
.jl-sheet.is-review .jl-sheet-status span:first-child {
  display: none;
}

.jl-sheet.is-review .jl-sheet-status span + span {
  display: inline;
}

.jl-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 16px;
  background: var(--jl-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.jl-primary svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.jl-sheet-review {
  display: none;
}

.jl-sheet.is-review .jl-sheet-done {
  display: none;
}

.jl-sheet.is-review .jl-sheet-review {
  display: block;
}

.jl-text-button {
  display: grid;
  height: 44px;
  place-items: center;
  color: var(--jl-blue);
  font-size: 17px;
}

.jl-sheet-divider {
  height: 1px;
  margin: 20px 0;
  background: #d8dade;
}

.jl-sheet-title {
  margin: 0 0 12px;
  color: #1f2328;
  font-size: 20px;
  font-weight: 700;
}

.jl-transcript {
  min-height: 66px;
  padding: 14px;
  border-color: rgba(0, 122, 255, 0.42);
  border-radius: 19px;
  font-size: 16px;
  line-height: 1.2;
}

.jl-transcript::after {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 1px;
  background: var(--jl-blue);
  content: "";
  vertical-align: -3px;
  animation: jl-caret 1s steps(1) infinite;
}

.jl-sheet.is-review .jl-transcript::after {
  display: none;
}

@keyframes jl-caret {
  50% {
    opacity: 0;
  }
}

/* Касание — вспышка как .family-chat-splash */
.jl-tap {
  position: absolute;
  z-index: 20;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0 12%,
    rgba(111, 206, 255, 0.92) 24%,
    rgba(47, 107, 255, 0.72) 46%,
    rgba(47, 107, 255, 0) 72%
  );
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.16);
  animation: jl-tap 0.7s ease-out forwards;
}

@keyframes jl-tap {
  30% {
    opacity: 0.94;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.2);
  }
}

/* Фраза по слогам под телефоном Лены. Сама строка записи — готовый
   компонент .ri-rec / .ri-rec-mic / .ri-wave / .ri-rec-time из
   related-index.css (сцена «Голос» в блоке «Смотрите также»).
   Здесь только позиция, появление и тень над сценой. */
.jl-command {
  position: absolute;
  z-index: 7;
  bottom: 38px;
  left: -18px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(7px) scale(0.96);
  transform-origin: left center;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.jl-command .ri-rec {
  box-shadow: 0 16px 30px rgba(16, 39, 105, 0.22);
}

.jl-command .ri-wave {
  flex: 0 0 auto;
  width: 58px;
}

.jl-phrase {
  font-weight: 650;
}

.journey-live.is-speaking .jl-command {
  opacity: 1;
  transform: none;
}

.jl-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.jl-bars i {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: #2f6bff;
}

.journey-live.is-speaking .jl-bars i {
  animation: jl-bar 0.8s ease-in-out infinite;
}

.jl-bars i:nth-child(2) { animation-delay: 0.15s; }
.jl-bars i:nth-child(3) { animation-delay: 0.3s; }
.jl-bars i:nth-child(4) { animation-delay: 0.45s; }

@keyframes jl-bar {
  50% {
    height: 14px;
  }
}

.jl-syllable {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.jl-syllable.is-on {
  opacity: 1;
}

/* ---------- Пересылка данных между телефонами ---------- */

.jl-transfer {
  position: absolute;
  z-index: 15;
  inset: 0;
  pointer-events: none;
}

.jl-sync-pulse {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(47, 107, 255, 0.55);
  border-radius: 50%;
  opacity: 0;
}

.journey-live.is-syncing .jl-sync-pulse {
  animation: jl-sync-pulse 1.3s ease-out infinite;
}

.journey-live.is-syncing .jl-sync-pulse + .jl-sync-pulse {
  animation-delay: 0.65s;
}

@keyframes jl-sync-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.45);
  }

  100% {
    opacity: 0;
    transform: scale(3.3);
  }
}

/* Летящая копия карточки — тот же DOM, что в списке, в нативном размере */
.jl-flight {
  position: absolute;
  top: 0;
  left: 0;
  width: 361px;
  filter: drop-shadow(0 16px 22px rgba(8, 28, 80, 0.3));
  transform-origin: 0 0;
  will-change: transform, opacity;
}

.jl-flight .jl-card {
  background: linear-gradient(135deg, #ffffff, #f0f2f4);
}

.jl-flight-badge {
  position: absolute;
  z-index: 5;
  top: -12px;
  right: -12px;
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #2f6bff;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Раскладка блока ----------
   Десктоп: анимация слева, справа заголовок, шаги и ссылка.
   ≤1080px: заголовок → анимация → шаги → ссылка (тот же HTML). */

.journey-layout {
  display: grid;
  grid-template-areas:
    "stage heading"
    "stage steps"
    "stage more";
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.journey-layout > .journey-heading {
  grid-area: heading;
  display: block;
  padding-top: 18px;
}

.journey-layout > .journey-heading > span {
  display: block;
  margin-bottom: 18px;
}

.journey-layout > .journey-heading h2 {
  margin: 0;
  font-size: clamp(34px, 3.3vw, 50px);
}

.journey-layout > .journey-live {
  grid-area: stage;
}

.journey-layout > .journey-steps {
  grid-area: steps;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 40px;
}

.journey-layout > .journey-more {
  grid-area: more;
  align-self: start;
}

.journey-layout .journey-steps h3 {
  font-size: 20px;
}

/* ---------- Шаги под сценой ---------- */

.journey-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 36px);
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

/* Полоска прогресса стоит под текстом шага */
.journey-step {
  display: flex;
  flex-direction: column;
}

.journey-step-progress {
  order: 3;
  display: block;
  overflow: hidden;
  height: 2px;
  margin-top: 18px;
  border-radius: 2px;
  background: rgba(47, 107, 255, 0.14);
}

.journey-step-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue-600);
}

.journey-steps h3 {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-family: "Onest", "Inter", sans-serif;
  font-size: 21px;
  letter-spacing: -0.035em;
  line-height: 1.15;
  transition: color 0.3s ease;
}

.journey-steps p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.journey-step.is-active h3 {
  color: var(--ink);
}

/* До старта анимации и без JS все шаги равноправны */
.journey-live-wrap:not(.is-running) .journey-steps h3 {
  color: var(--ink);
}

/* ---------- Адаптив ---------- */

@media (max-width: 1280px) {
  .journey-live {
    --jl-s: 0.52;
    gap: 28px;
    padding: 24px 28px 60px;
  }
}

@media (max-width: 1080px) {
  .journey-layout {
    grid-template-areas:
      "heading"
      "stage"
      "steps"
      "more";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .journey-layout > .journey-heading {
    display: grid;
    padding-top: 0;
  }

  .journey-layout > .journey-heading > span {
    margin-bottom: 0;
  }

  .journey-layout > .journey-heading h2 {
    margin-top: -8px;
    font-size: clamp(38px, 4.8vw, 60px);
  }

  .journey-layout > .journey-live {
    --jl-s: 0.56;
    justify-self: center;
    gap: 36px;
    margin-top: 48px;
  }

  .journey-layout > .journey-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
  }
}

@media (max-width: 820px) {
  .journey-layout > .journey-heading {
    display: block;
  }

  .journey-layout > .journey-heading > span {
    display: block;
    margin-bottom: 20px;
  }

  .journey-layout > .journey-heading h2 {
    margin-top: 0;
  }

  .journey-layout > .journey-live {
    --jl-s: 0.5;
    gap: 28px;
    margin-top: 34px;
  }

  .journey-layout > .journey-steps {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 580px) {
  .journey-layout > .journey-heading h2 {
    font-size: 37px;
  }

  .journey-layout > .journey-live {
    --jl-s: 0.37;
    justify-self: stretch;
    gap: 10px;
    margin-right: -10px;
    margin-left: -10px;
    padding: 16px 8px 58px;
    border-radius: 24px;
  }

  .jl-person {
    gap: 12px;
  }

  .journey-layout > .journey-live .jl-person > .jl-chip {
    contain: inline-size;
    width: 100%;
    min-height: 44px;
    height: auto;
  }

  .journey-layout > .journey-live .jl-chip :is(b, small) {
    white-space: normal;
  }

  .jl-chip {
    min-width: 0;
    height: 44px;
    gap: 7px;
    padding: 6px 10px 6px 6px;
  }

  .jl-chip-avatar,
  .jl-chip-avatar img {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .jl-chip.is-active .jl-chip-activity {
    max-width: 40px;
  }

  .jl-chip-cart b {
    display: none;
  }

  .jl-chip b {
    font-size: 10px;
  }

  .jl-chip small {
    font-size: 8.5px;
  }

  .jl-phone {
    padding: 3px;
  }

  .jl-command {
    bottom: 26px;
    left: calc(100% + 5px);
    transform: translate(-50%, 7px) scale(0.96);
    transform-origin: center;
  }

  .journey-live.is-speaking .jl-command {
    transform: translate(-50%, 0);
  }

  .jl-command .ri-wave {
    display: none;
  }

  .journey-steps h3 {
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  .journey-layout > .journey-live {
    --jl-s: 0.34;
  }
}

@media (max-width: 350px) {
  .journey-layout > .journey-live {
    --jl-s: 0.30;
  }
}
