/**
 * Входная группа (splash, онбординг, вход/регистрация). Тише и просторнее
 * основного приложения — docs/08 раздел 2.1. Всегда тёмная тема.
 */

.auth-body {
  background: var(--gradient-entry);
  height: 100dvh;
  overflow: hidden;
}

/* Между .auth-body и .auth-shell стоит контейнер точки монтирования (#app).
   Без явной высоты он рвёт цепочку процентов: .auth-shell растягивается по
   контенту, overflow-y:auto не включается, и низ экрана (чекбокс, кнопки)
   оказывается за границей body{overflow:hidden} — недостижим ни тапом,
   ни скроллом. */
.auth-body > #app {
  height: 100%;
}

.auth-shell {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: var(--sp-8) var(--screen-padding) var(--sp-6);
  color: var(--entry-text);
}

.auth-shell .text-secondary {
  color: var(--entry-text-a68);
}

/* ── Капля-герой: общий графический элемент всех экранов входной группы ── */
.auth-drop-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30dvh;
}

.auth-drop {
  width: 96px;
  height: 120px;
  background: var(--gradient-liquid);
  -webkit-mask-image: var(--mask-drop);
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: var(--mask-drop);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

@keyframes auth-drop-fall {
  0% { transform: translateY(-40px); opacity: 0; }
  60% { transform: translateY(4px); opacity: 1; }
  80% { transform: translateY(-2px); }
  100% { transform: translateY(0); opacity: 1; }
}

.auth-drop--falling {
  animation: auth-drop-fall 1.2s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes auth-drop-pulse {
  0%, 100% { filter: drop-shadow(0 0 12px var(--accent-a30)); }
  50% { filter: drop-shadow(0 0 24px var(--entry-ring-a60)); }
}

.auth-drop--pulse {
  animation: auth-drop-pulse 4s ease-in-out infinite;
}

/* ── Капля с телефонной иконкой внутри: экран "Код отправлен" при
   регистрации (signup-sms-code.html) — крупнее обычной капли-героя,
   со свечением и иконкой смс поверх. ── */
.auth-drop-envelope {
  position: relative;
  width: 104px;
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 27px var(--entry-ring-a60));
}

.auth-drop-envelope .auth-drop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-drop-envelope svg {
  position: relative;
  z-index: 1;
}

.auth-ripple {
  width: 140px;
  height: 24px;
  border: 1px solid var(--entry-ring-a35);
  border-radius: var(--radius-full);
  margin-top: var(--sp-3);
  opacity: 0;
}

@keyframes auth-ripple-expand {
  0% { transform: scaleX(.3); opacity: .8; }
  100% { transform: scaleX(1.4); opacity: 0; }
}

.auth-ripple--show {
  animation: auth-ripple-expand .8s ease-out forwards;
}

/* ── Раскадровка design/drop-storyboard.html, кадр 4 "раскрывается":
   капля запечатывания разворачивается в форму капсулы и вспыхивает —
   используется в сцене запечатывания (step7.js, capsule_new.js) сразу
   после падения, чтобы обозначить момент "запечатано". ── */
@keyframes auth-drop-seal {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 12px var(--accent-a30)); }
  55% { transform: scale(1.12) rotate(8deg); filter: drop-shadow(0 0 30px var(--entry-ring-a60)); }
  100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 18px var(--accent-a30)); }
}

.auth-drop--sealed {
  animation: auth-drop-fall 1.2s cubic-bezier(.4, 0, .2, 1) forwards,
             auth-drop-seal .9s cubic-bezier(.4, 0, .2, 1) .9s forwards;
}

/* ── Раскадровка, кадр 5 "падает в сосуд": капля-индикатор финала
   онбординга (final.js) падает сверху и оседает над наполняющимся
   сосудом. ── */
@keyframes auth-vessel-drop-fall {
  0% { transform: translateY(-36px); opacity: 0; }
  70% { transform: translateY(3px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.auth-vessel-drop--falling {
  animation: auth-vessel-drop-fall .9s cubic-bezier(.4, 0, .2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .auth-drop--falling,
  .auth-drop--pulse,
  .auth-drop--sealed,
  .auth-ripple--show,
  .auth-vessel-drop--falling {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── Текстовый блок ── */
.auth-title {
  font-size: var(--fs-entry-title);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--entry-text);
  margin-bottom: var(--sp-3);
}

.auth-text {
  font-size: var(--fs-entry-body);
  line-height: var(--lh-relaxed);
  color: var(--entry-text-a80);
}

/* ═══ Онбординг, шаги 1-4 (группа C1) ═══ */

/* Заголовки этих экранов в макете крупнее общего --fs-entry-title (28px):
   шаги 1-3 — 32px, шаг 4 — 30px. Модификатор не трогает базовый .auth-title,
   которым пользуются другие шаги/экраны с другим кеглем. */
.auth-title--lg {
  font-size: var(--fs-h1);
  line-height: 1.2;
}

.auth-title--md {
  font-size: var(--fs-h1-sm);
  line-height: 1.22;
}

/* Точка отсчёта (шаг 4): концентрические кольца с пульсирующей точкой
   в центре — отдельный от .auth-drop графический элемент, как в макете
   onboarding-4-start-point.html (там не капля-тизер, а кольца). */
.auth-rings {
  position: relative;
  width: 180px;
  height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-rings::before,
.auth-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--entry-ring-a35);
}

.auth-rings::before {
  width: 180px;
  height: 180px;
  border-color: var(--accent-ring-a16);
}

.auth-rings::after {
  width: 112px;
  height: 112px;
}

.auth-rings__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 26px var(--entry-ring-a60);
}

/* ── Поля на полупрозрачной поверхности (docs/08 2.1) ── */
.auth-shell .input {
  background: var(--entry-surface-a08);
  border-color: var(--entry-surface-a16);
  color: var(--entry-text);
}

.auth-shell .input::placeholder {
  color: var(--entry-text-a45);
}

.auth-shell .input-label {
  color: var(--entry-text-a75);
}

/* Чекбокс согласия во входной группе: базовый .checkbox берёт светлые токены
   рамки, на тёмном фоне он почти не виден. Заодно поднимаем высоту лейбла
   до тап-таргета 44px — сам квадратик 22px для пальца мал. */
.auth-shell .checkbox {
  min-height: 44px;
  color: var(--entry-text);
}

.auth-shell .checkbox-box {
  border-color: var(--entry-text-a45);
}

.auth-actions {
  margin-top: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ── Сравнение локальных данных и данных аккаунта перед объединением (merge-data.html) ── */
.merge-compare {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.merge-compare-card {
  flex: 1;
  background: var(--entry-surface-a08);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.merge-compare-card--account {
  background: var(--gradient-card-accent);
  border-color: var(--accent-ring-a30);
}

.merge-compare-label {
  font: var(--fw-semibold) var(--fs-micro) / 1 var(--font);
  color: var(--entry-text-a75);
}

.merge-compare-card--account .merge-compare-label {
  color: var(--accent-light);
}

.merge-compare-days {
  font: var(--fw-black) var(--fs-h2) / 1 var(--font-mono);
  color: var(--entry-text);
  margin-top: var(--sp-3);
}

.merge-compare-days-unit {
  font: var(--fw-regular) var(--fs-nano) / 1 var(--font);
  color: var(--entry-text-a55);
  margin-top: var(--sp-1);
}

.merge-compare-card--account .merge-compare-days-unit {
  color: var(--entry-text-a80);
}

.merge-compare-meta {
  font: var(--fw-regular) var(--fs-micro) / 1.7 var(--font);
  color: var(--entry-text-a75);
  margin-top: var(--sp-3);
}

.merge-compare-card--account .merge-compare-meta {
  color: var(--entry-text-a80);
}

.auth-shell .btn--text {
  color: var(--entry-text-a75);
}

.auth-shell .btn--secondary {
  background: var(--entry-surface-a08);
  border-color: var(--entry-surface-a16);
  color: var(--entry-text);
}

/* ── Индикатор шагов онбординга: точки, активная растянута в пилюлю ── */
.auth-steps {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-6);
}

.auth-step-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--entry-surface-a25);
  transition: all var(--transition);
}

.auth-step-dot--active {
  width: 20px;
  background: var(--accent);
}

.auth-step-dot--done {
  background: var(--entry-ring-a60);
}

/* ── Шапка с кнопкой назад ── */
.auth-header {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  margin-bottom: var(--sp-4);
}

.auth-back {
  width: var(--tap);
  height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--entry-text);
}

/* Чипы "Сегодня/Вчера/Позавчера/Выбрать дату" (шаг 4) — входная группа
   всегда тёмная независимо от темы приложения, а базовый .chip
   (components.css) берёт светлые токены --border/--text-secondary,
   поэтому здесь фиксируем entry-палитрой, как уже сделано для .input. */
.auth-shell .chip {
  border-color: var(--entry-surface-a16);
  color: var(--entry-text-a55);
}

/* ── Карточки ДАТА / ВРЕМЯ (шаг 4) ── */
.auth-datetime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.auth-datetime-card {
  background: var(--entry-surface-a75);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-align: left;
}

.auth-datetime-card__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--entry-text-a55);
  letter-spacing: .04em;
}

.auth-datetime-card__value {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--entry-text);
  margin-top: var(--sp-2);
}

.auth-datetime-card__value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Живая строка "Ты трезв уже..." (шаг 4) ── */
.auth-live-counter {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  color: var(--accent-light);
  text-shadow: 0 0 26px var(--entry-ring-a60);
  text-align: center;
  background: radial-gradient(circle at 50% 50%, var(--accent-a30), transparent 75%);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  margin-top: var(--sp-6);
}

/* ── Модалка выбора даты/времени колёсиком (шаг 4) ── */
.auth-wheel-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
}

.auth-wheel-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--entry-scrim);
}

.auth-wheel-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--entry-surface-solid);
  border-radius: var(--radius-entry-sheet) var(--radius-entry-sheet) 0 0;
  padding: var(--sp-4) var(--sp-5) 34px;
}

.auth-wheel-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-callout);
  font-weight: var(--fw-semibold);
  color: var(--entry-body);
}

.auth-wheel-sheet__header button {
  min-height: var(--tap);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
}

.auth-wheel-sheet__done {
  color: var(--accent-light) !important;
  font-weight: var(--fw-semibold) !important;
}

.auth-wheel-cols {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-2);
  position: relative;
}

.auth-wheel-col {
  flex: 1;
  height: 200px;
  overscroll-behavior: contain;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  font-family: var(--font-mono);
  text-align: center;
  scrollbar-width: none;
}

.auth-wheel-col::-webkit-scrollbar { display: none; }

.auth-wheel-col--month { flex: 1.6; font-family: var(--font); }

/* Высота строки 34px синхронна с WHEEL_ROW в onboarding/step4.js. */
.auth-wheel-col > div {
  scroll-snap-align: center;
  height: 34px;
  line-height: 34px;
  color: var(--entry-text-muted);
  font-size: var(--fs-wheel);
  cursor: pointer;
}

.auth-wheel-col > div.is-near {
  color: var(--entry-text-dim);
}

.auth-wheel-col > div.is-selected {
  color: var(--on-primary);
  font-weight: var(--fw-bold);
  font-size: var(--fs-entry-result);
}

.auth-wheel-cols::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  background: var(--entry-ring-a10);
  border-radius: var(--radius);
  pointer-events: none;
}

@keyframes auth-counter-pop {
  0% { transform: scale(.92); opacity: .5; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}

.auth-live-counter--pop {
  animation: auth-counter-pop .35s cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .auth-live-counter--pop {
    animation: none;
  }
}

/* ── Прозрачность синхронизации (регистрация): левая — сервер, правая — только на телефоне ── */
.auth-sync-table {
  display: flex;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--entry-surface-a16);
  margin: var(--sp-5) 0 0;
}

.auth-sync-col {
  flex: 1;
  padding: var(--sp-4);
  background: var(--entry-surface-solid);
}

.auth-sync-col__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  color: var(--text-light);
}

.auth-sync-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-micro);
  color: var(--text-secondary);
  margin-top: var(--sp-2);
  line-height: var(--lh-relaxed);
}

.auth-sync-col--private {
  background: linear-gradient(160deg, var(--accent-dark), var(--primary-dark));
  border: 1px solid var(--entry-ring-a35);
}

.auth-sync-col--private .auth-sync-col__head {
  color: var(--on-primary);
  font-weight: var(--fw-bold);
}

.auth-sync-col--private ul {
  color: var(--on-primary-a85);
}

/* ── Иконка-капля над заголовком: кольцо (шаг 2) ── */
.auth-icon-drop {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--entry-ring-a35);
  border-top-color: transparent;
  transform: rotate(-25deg);
  margin: 0 auto var(--sp-5);
}

/* ── Иконка-капля сплошная: маленький сосуд-тизер (шаг 3, шаг 4) ── */
.auth-icon-drop--solid {
  width: 38px;
  height: 46px;
  border-radius: var(--vessel-radius);
  border: none;
  transform: none;
  background: linear-gradient(180deg, var(--accent-light), var(--primary));
  box-shadow: 0 0 24px var(--accent-glow-a40);
}

/* ── Ореол вокруг капли-героя (обещание, шаг 1) ── */
.auth-drop-stage--glow {
  position: relative;
}

.auth-drop-stage--glow::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow-a30), transparent 70%);
  pointer-events: none;
}

/* ── Дисклеймер (шаг 2) ── */
.auth-disclaimer-block {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  background: var(--entry-surface-a08);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
}

.auth-disclaimer-block svg {
  flex: none;
  color: var(--entry-ring-a60);
}

.auth-disclaimer-block--danger {
  background: transparent;
  border-color: var(--danger-a55);
}

.auth-disclaimer-block--danger svg {
  color: var(--danger);
}

.auth-disclaimer-block--danger .auth-text {
  color: var(--danger-text-on-dark);
}

/* ── Кнопки закреплены внизу экрана (шаги входной группы) ── */
/* Липкий блок кнопок внизу экрана. Прилипая, он накрывает собой контент,
   поэтому получает фон-подложку (иначе текст просвечивает насквозь) и
   отрицательный внешний отступ, компенсирующий падинг .auth-shell —
   подложка должна доходить до краёв экрана, а не обрываться по контенту. */
.auth-actions--fixed {
  position: sticky;
  bottom: calc(var(--sp-6) * -1);
  margin-top: auto;
  margin-left: calc(var(--screen-padding) * -1);
  margin-right: calc(var(--screen-padding) * -1);
  padding: var(--sp-4) var(--screen-padding) var(--sp-6);
  background: var(--gradient-entry-actions);
}

/* ── Калькулятор напитков / цели / капсула — общие вспомогательные классы ── */
.auth-result-line {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  color: var(--accent-light);
  text-align: center;
  margin-top: var(--sp-5);
}

.auth-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.shake {
  animation: auth-shake .3s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .shake {
    animation: none;
  }
}

/* ── Соц-кнопки входа (регистрация) ── */
.auth-social-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.auth-social-btn {
  flex: 1;
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius);
  padding: var(--sp-3);
  text-align: center;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--entry-text);
  background: transparent;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--entry-surface-a16);
}

.auth-divider span {
  font-size: var(--fs-micro);
  color: var(--text-light);
}

/* ── Поле телефона: неизменяемый префикс +7 ── */
.auth-phone-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.auth-phone-prefix {
  flex: none;
  background: var(--entry-surface-solid);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius);
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  color: var(--text-secondary);
}

.auth-phone-row .input {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  letter-spacing: .01em;
}

/* ── Ячейки кода из SMS ── */
.auth-code-row {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-8);
}

.auth-code-cell {
  width: 62px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--entry-surface-solid);
  border: 1px solid var(--entry-surface-a16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  color: var(--entry-text);
}

.auth-code-cell--active {
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring-accent);
}

.auth-code-cell--empty {
  background: var(--bg-alt);
}

.auth-code-cell--error {
  border: 1.5px solid var(--danger);
}

.auth-code-caret {
  width: 2px;
  height: 28px;
  background: var(--accent-light);
}

/* ── Прозрачные подсказки под кнопками входной группы ── */
.auth-footnote {
  text-align: center;
  font-size: var(--fs-micro);
  line-height: var(--lh-relaxed);
  color: var(--text-light);
  margin-top: var(--sp-4);
}

/* ── Карточка уведомления (шаг 8) ── */
.auth-notif-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--entry-surface-solid);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.auth-notif-card__icon {
  flex: none;
  color: var(--accent-light);
}

.auth-notif-card__body {
  flex: 1;
}

.auth-notif-card__title {
  font-weight: var(--fw-semibold);
  color: var(--entry-text);
}

.auth-notif-card__hint {
  font-size: var(--fs-caption);
  color: var(--text-light);
  margin-top: var(--sp-1);
}

/* ── Пресеты-карточки цели (шаг 6) ── */
.auth-goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.auth-goal-card {
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
  text-align: left;
  position: relative;
}

.auth-goal-card__art {
  height: 74px;
  border-radius: var(--radius);
  background: var(--entry-surface-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.auth-goal-card__icon {
  transition: transform var(--transition);
}

.auth-goal-card--selected .auth-goal-card__art {
  color: var(--on-primary);
}

.auth-goal-card--selected .auth-goal-card__icon {
  transform: scale(1.12) rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) {
  .auth-goal-card__icon { transition: none; }
}

.auth-goal-card__title {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-1) var(--sp-1);
}

.auth-goal-card--selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 22px var(--accent-glow-a25);
}

.auth-goal-card--selected .auth-goal-card__art {
  background: var(--gradient-card-accent);
}

.auth-goal-card--selected .auth-goal-card__title {
  color: var(--entry-text);
}

.auth-goal-card__check {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-goal-card--custom {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  gap: var(--sp-2);
}

.auth-goal-card--custom .auth-goal-card__plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-light);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-h3);
}

/* ── Капсула: кольца пульсации вокруг кнопки записи ── */
.auth-capsule-record-stage {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-capsule-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent-ring-a16);
  animation: auth-capsule-pulse 2.2s ease-in-out infinite;
}

.auth-capsule-ring:nth-child(1) { inset: 0; }
.auth-capsule-ring:nth-child(2) { inset: 30px; border-color: var(--entry-ring-a35); animation-delay: .35s; }
.auth-capsule-ring:nth-child(3) { inset: 58px; border-color: var(--entry-ring-a60); animation-delay: .7s; }

@keyframes auth-capsule-pulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.18); opacity: .15; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-capsule-ring {
    animation: none;
  }
}

/* ── Капсула: кастомный плеер прослушивания перед печатью (design/capsule-record-done-dark.html) ── */
.auth-capsule-playback {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  background: var(--entry-surface-a72);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
}

.auth-capsule-playback-btn {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--entry-text);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.auth-capsule-playback-btn:active {
  transform: scale(.96);
}

.auth-capsule-playback-bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
}

.auth-capsule-playback-bar {
  flex: 1;
  height: var(--bar-h, 40%);
  min-height: 3px;
  border-radius: var(--radius-xs);
  background: var(--entry-surface-a16);
  transition: background .15s ease;
}

.auth-capsule-playback-bar.is-played {
  background: var(--accent-light);
}

.auth-capsule-playback-time {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--entry-text-a55);
  font-variant-numeric: tabular-nums;
}

/* ── Калькулятор напитков: нижний лист (шаг 5) ── */
.auth-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  display: flex;
  align-items: flex-end;
}

.auth-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--entry-scrim);
}

.auth-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--entry-surface-solid);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--sp-4) var(--sp-5) var(--sp-8);
}

.auth-sheet__handle {
  width: 38px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--entry-surface-a16);
  margin: 0 auto var(--sp-4);
}

.auth-calc-label {
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  color: var(--entry-text-a55);
  letter-spacing: .6px;
}

.auth-calc-volume-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.auth-calc-volume-box {
  flex: 1;
  background: var(--entry-surface-solid);
  border: 1px solid var(--entry-surface-a16);
  border-radius: var(--radius);
  padding: var(--sp-3);
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  color: var(--entry-text);
}

.auth-calc-volume-box__unit {
  font-family: Inter, sans-serif;
  font-weight: var(--fw-regular);
  font-size: var(--fs-caption);
  color: var(--entry-text-a55);
}

.auth-calc-open-link {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-caption);
  color: var(--accent-light);
}

.auth-calc-money-input {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
}

.auth-calc-period {
  flex: 1;
  text-align: center;
  padding: var(--sp-2) 0;
  border-radius: var(--radius-full);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--entry-text-a55);
}

.auth-calc-period--selected {
  background: var(--entry-surface-solid);
  color: var(--accent-light);
  font-weight: var(--fw-semibold);
}

.auth-calc-result {
  background: var(--accent-glow-a12);
  border: 1px solid var(--accent-glow-a35);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.auth-calc-result__amount {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--accent-light);
}

.auth-calc-result__hint {
  font-size: var(--fs-caption);
  color: var(--entry-text-a55);
  margin-top: var(--sp-2);
}

/* ── Шторка калькулятора: содержимое (шаг 5) ── */
.auth-calc-sheet-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--entry-text);
}

.auth-calc-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-calc-stepper__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--entry-surface-a16);
  background: none;
  color: var(--entry-text);
  font-size: var(--fs-h3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-calc-stepper__btn--primary {
  border: none;
  background: var(--accent);
  color: var(--on-primary);
}

.auth-calc-stepper__value {
  text-align: center;
}

.auth-calc-stepper__count {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  color: var(--entry-text);
}

.auth-calc-stepper__unit {
  font-size: var(--fs-caption);
  color: var(--entry-text-a55);
  margin-top: var(--sp-1);
}

.auth-calc-sheet-result {
  margin-top: var(--sp-6);
  background: var(--entry-surface-a08);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-align: center;
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  color: var(--accent-light);
}

/* ── Сосуд-финал онбординга: капля падает, наполняет вместилище "День N" ── */
.auth-vessel-drop {
  width: 16px;
  height: 20px;
  border-radius: var(--vessel-radius);
  background: var(--accent-light);
  box-shadow: 0 0 20px var(--entry-ring-a60);
  margin: 0 auto;
}

.auth-vessel {
  position: relative;
  width: 196px;
  height: 270px;
  border-radius: var(--vessel-radius);
  background: var(--entry-surface-a16);
  border: 1.5px solid var(--entry-ring-a35);
  box-shadow: 0 0 54px var(--accent-a30);
  overflow: hidden;
  margin: var(--sp-4) auto 0;
}

.auth-vessel__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, var(--accent-light), var(--accent) 50%, var(--primary-dark));
}

/* ── Вариант сосуда для экрана возвращения: меньше, без цифры, наполнен сильнее ── */
.auth-vessel--comeback {
  width: 170px;
  height: 236px;
  background: var(--entry-surface-a16);
  border-color: var(--entry-ring-a35);
}

.auth-vessel--comeback .auth-vessel__fill {
  height: 70%;
  background: linear-gradient(180deg, var(--accent-a30), var(--primary-dark));
}

.auth-vessel__number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.auth-vessel__number strong {
  font-family: var(--font-mono);
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--on-primary);
  text-shadow: 0 4px 22px var(--primary-a45);
}

.auth-vessel__number span {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--on-primary-a85);
  margin-top: var(--sp-1);
}

/* ── PIN: точки прогресса и цифровая клавиатура без чипов (pin-unlock) ── */
.auth-pin-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.auth-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--entry-surface-a16);
  transition: background var(--transition), border-color var(--transition);
}

.auth-pin-dot--filled {
  background: var(--accent);
  border-color: var(--accent);
}

.auth-pin-dot--error {
  background: var(--danger);
  border-color: var(--danger);
}

.auth-pin-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--danger-text-on-dark);
}

.auth-pin-error svg {
  flex: none;
  color: var(--danger);
}

.auth-pin-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  padding: 0 var(--sp-6);
}

.auth-pin-key {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-h3);
  color: var(--entry-text);
}

.auth-pin-key--icon {
  color: var(--entry-ring-a60);
}

.auth-pin-key--del {
  color: var(--text-light);
}

/* ═══ Онбординг: сверка с design/onboarding-*.html ═══
   Оболочка без верхних точек прогресса (в макетах их нет, кроме шага 1 —
   там они над кнопкой), кнопка «назад» висит в зоне статус-бара и не
   сдвигает контент. Отступ сверху и фон — по макету конкретного шага. */
.auth-shell--ob {
  position: relative;
  background: var(--gradient-entry-calm);
  padding: 74px var(--screen-padding) 0;
}

.auth-shell--ob-1,
.auth-shell--ob-4,
.auth-shell--ob-7 {
  background: var(--gradient-entry-teal);
}

.auth-shell--ob.auth-shell--ob-final {
  background: var(--gradient-entry-glow);
}

.auth-shell--ob > .auth-steps {
  display: none;
}

.auth-shell--ob .auth-header {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-2);
  margin: 0;
  z-index: 2;
}

.auth-shell--ob-final .auth-header {
  display: none;
}

.auth-shell--ob .auth-title {
  color: var(--on-primary);
  padding: 0 var(--sp-1);
  margin-bottom: 0;
}

/* Кнопки внизу: в макетах блок стоит в 52px от низа, ссылка 13px/500. */
.auth-shell--ob .auth-actions--fixed {
  bottom: 0;
  gap: 0;
  padding: var(--sp-4) var(--screen-padding) 36px;
  background: var(--gradient-entry-actions-calm);
}

.auth-shell--ob-1 .auth-actions--fixed,
.auth-shell--ob-4 .auth-actions--fixed,
.auth-shell--ob-7 .auth-actions--fixed,
.auth-shell--ob-final .auth-actions--fixed {
  background: var(--gradient-entry-actions);
}

.auth-shell--ob .auth-actions--fixed > .btn--primary:last-child {
  margin-bottom: var(--sp-4);
}

.auth-shell .btn--primary {
  color: var(--on-primary);
  box-shadow: var(--entry-cta-glow);
}

.auth-shell .btn--primary:disabled {
  background: var(--entry-surface-solid);
  color: var(--entry-text-muted);
  box-shadow: none;
}

.auth-shell--ob .auth-actions .btn--text {
  height: var(--tap);
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
}

.auth-shell--ob .auth-actions .btn--text-accent {
  color: var(--accent-light);
}

/* Ссылка под главной кнопкой — с воздухом, а не впритык (просьба владельца). */
.auth-shell--ob .auth-actions--fixed > .btn--primary + .btn--text {
  margin-top: var(--sp-3);
}

/* ── Шаг 1: обещание ── */
.auth-shell--ob-1 {
  padding-top: min(150px, 16dvh);
}

.auth-shell--ob-1 .auth-drop-stage {
  flex: none;
  min-height: 0;
  height: 180px;
  align-items: flex-start;
  padding-top: 46px;
}

.auth-shell--ob-1 .auth-drop-stage--glow::before {
  top: 0;
  background: radial-gradient(circle, var(--entry-glow-a28), transparent 70%);
}

.auth-shell--ob-1 .auth-drop {
  width: 66px;
  height: 82px;
}

.auth-shell--ob-1 .auth-title {
  margin-top: 22px;
  padding: 0 var(--sp-2);
  line-height: 1.24;
}

.auth-text--lead {
  margin-top: min(61px, 6dvh);
  padding: 0 var(--sp-3);
  text-align: center;
  font-size: var(--fs-entry-lead);
  line-height: var(--lh-normal);
  color: var(--entry-body-a62);
}

.auth-steps--intro {
  gap: 6px;
  margin: 0 0 var(--sp-6);
}

.auth-steps--intro .auth-step-dot {
  background: var(--entry-border);
}

.auth-steps--intro .auth-step-dot--active {
  background: var(--accent-light);
}

/* ── Шаг 2: дисклеймер ── */
.auth-shell--ob .auth-icon-drop {
  border-color: var(--entry-ring-a70);
  border-top-color: transparent;
  margin-bottom: 26px;
}

.auth-shell--ob .auth-disclaimer-block {
  background: var(--entry-surface-solid);
  border-color: var(--entry-border);
  border-radius: var(--radius-entry-card);
  padding: 14px;
}

.auth-shell--ob .auth-disclaimer-block .auth-text {
  font-size: var(--fs-label);
  line-height: var(--lh-normal);
  color: var(--entry-body);
}

.auth-shell--ob .auth-disclaimer-block svg {
  color: var(--accent-light);
}

.auth-shell--ob .auth-disclaimer-block--danger {
  background: transparent;
  border-color: var(--danger-a55);
}

.auth-shell--ob .auth-disclaimer-block--danger svg {
  color: var(--danger);
}

.auth-shell--ob .auth-disclaimer-block--danger .auth-text {
  color: var(--entry-danger-text);
}

.auth-shell--ob .checkbox {
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  font-size: var(--fs-callout);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
}

.auth-shell--ob .checkbox-box {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-entry-check);
  border-color: var(--entry-border);
}

.auth-shell--ob .checkbox input:checked ~ .checkbox-box {
  box-shadow: var(--entry-check-glow);
}

.auth-shell--ob .checkbox:has(input:checked) {
  color: var(--entry-body);
}

/* ── Шаг 3: имя ── */
.auth-shell--ob-3 {
  padding-top: 110px;
}

.auth-drop--icon {
  width: 38px;
  height: 46px;
  margin: 0 auto;
  background: var(--gradient-drop);
}

.auth-shell--ob-3 .auth-title {
  margin-top: 40px;
}

.auth-shell--ob-3 .input-group {
  margin-top: var(--sp-8);
}

.auth-shell--ob .input {
  background: transparent;
  border: 1.5px solid var(--entry-border);
  color: var(--entry-body);
}

.auth-shell--ob .input::placeholder {
  color: var(--entry-text-dim);
}

.auth-shell--ob .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow-a12);
}

.auth-shell--ob .input-hint {
  font-size: var(--fs-label);
  line-height: 1.45;
  color: var(--entry-text-soft);
  margin-top: var(--sp-3);
}

/* ── Шаг 4: точка отсчёта ── */
.auth-shell--ob-4 {
  padding-top: 80px;
}

.auth-shell--ob-4 .auth-drop-stage {
  flex: none;
  min-height: 0;
  height: 120px;
}

.auth-shell--ob-4 .auth-rings::before {
  border-color: var(--entry-ring-a16);
}

.auth-shell--ob-4 .auth-rings::after {
  border-color: var(--entry-ring-a30);
}

.auth-shell--ob-4 .auth-rings__dot {
  box-shadow: 0 0 26px var(--entry-ring-a80);
}

.auth-shell--ob-4 .auth-title {
  margin-top: var(--sp-5);
}

.auth-shell--ob-4 .auth-chip-grid {
  margin-top: var(--sp-6);
}

.auth-shell--ob-4 .chip {
  height: auto;
  min-height: 0;
  padding: 11px var(--sp-4);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  line-height: 1;
  border: 1px solid var(--entry-border);
  color: var(--entry-text-soft);
  background: transparent;
}

.auth-shell--ob-4 .chip--selected {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--entry-chip-on);
  font-weight: var(--fw-semibold);
}

.auth-shell--ob-4 .auth-datetime-card {
  border-color: var(--entry-border);
  border-radius: var(--radius-entry-card);
}

.auth-shell--ob-4 .auth-datetime-card__label {
  font-size: var(--fs-tiny);
  color: var(--entry-text-dim);
  letter-spacing: 0;
}

.auth-shell--ob-4 .auth-datetime-card__label svg {
  color: var(--accent-light);
}

.auth-shell--ob-4 .auth-datetime-card__value {
  line-height: 1;
  color: var(--entry-body);
  margin-top: 10px;
}

.auth-shell--ob-4 .auth-live-counter {
  font-size: var(--fs-entry-counter);
  line-height: 1.25;
  color: var(--accent-light);
  text-shadow: 0 0 26px var(--entry-counter-glow);
  background: radial-gradient(circle at 50% 50%, var(--entry-counter-halo), transparent 75%);
  margin-top: 26px;
  padding: var(--sp-5) var(--sp-4);
  white-space: pre-line;
}

/* ── Шаг 5: деньги ── */
.auth-shell--ob-5 {
  padding-top: 84px;
}

.auth-shell--ob-5 .auth-title {
  font-size: var(--fs-h1-sm);
  line-height: 1.22;
}

.auth-shell--ob-5 .auth-title + .auth-text {
  padding: var(--sp-3) var(--sp-1) 0;
  font-size: var(--fs-callout);
  line-height: 1.45;
  color: var(--entry-text-dim);
}

.auth-shell--ob-5 .auth-calc-label {
  color: var(--entry-text-soft);
}

.auth-shell--ob-5 .auth-calc-volume-box,
.auth-shell--ob .auth-calc-money-input {
  background: var(--entry-surface-solid);
  border: 1px solid var(--entry-border);
  border-radius: var(--radius);
  padding: 15px;
  height: auto;
  line-height: 1;
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  color: var(--entry-body);
}

.auth-shell--ob-5 .auth-calc-volume-box__unit {
  color: var(--entry-text-dim);
}

.auth-calc-period-row {
  display: flex;
  gap: var(--sp-1);
  background: var(--entry-surface-a06);
  border-radius: var(--radius-full);
  padding: var(--sp-1);
  margin-top: 10px;
}

.auth-shell--ob-5 .auth-calc-period {
  padding: 10px 0;
  font-size: var(--fs-small);
  line-height: 1;
  color: var(--entry-text-dim);
}

.auth-shell--ob-5 .auth-calc-period--selected {
  background: var(--entry-surface-solid);
  color: var(--accent-light);
}

.auth-shell--ob-5 .auth-calc-result {
  margin-top: 22px;
  padding: 18px;
}

.auth-shell--ob-5 .auth-calc-result__amount {
  font-size: var(--fs-entry-result);
  line-height: 1.3;
  text-wrap: pretty;
}

.auth-shell--ob-5 .auth-calc-result__hint {
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--entry-text-dim);
  margin-top: 10px;
}

/* ── Шаг 6: цель. Пресетов по docs/08 семь (+ «Своя цель»), макет
   показывает видимую часть сетки — остальное прокручивается. ── */
.auth-shell--ob-6 {
  padding-top: 80px;
}

.auth-title--goal {
  font-size: var(--fs-entry-title);
  line-height: 1.24;
}

.auth-shell--ob-6 .auth-goal-grid {
  margin-top: 22px;
}

.auth-shell--ob-6 .auth-goal-card {
  border-color: var(--entry-border);
}

.auth-shell--ob-6 .auth-goal-card__art {
  border-radius: var(--radius-entry-card);
}

.auth-shell--ob-6 .auth-goal-card__title {
  line-height: 1;
  padding: 10px var(--sp-1) var(--sp-1);
  color: var(--entry-text-soft);
}

.auth-shell--ob-6 .auth-goal-card--selected {
  border: 2px solid var(--accent);
}

.auth-shell--ob-6 .auth-goal-card--selected .auth-goal-card__art {
  background: linear-gradient(140deg, var(--accent-dark), var(--primary));
}

.auth-shell--ob-6 .auth-goal-card--selected .auth-goal-card__title {
  font-weight: var(--fw-semibold);
  color: var(--entry-body);
}

.auth-shell--ob-6 .auth-goal-card__check {
  top: 14px;
  right: 14px;
  color: var(--on-primary);
}

/* .hidden из base.css слабее display:flex у бейджа — без этого галочки
   видны на всех карточках сразу. */
.auth-goal-card__check.hidden {
  display: none;
}

.auth-shell--ob-6 .auth-goal-card--custom {
  border-style: dashed;
}

.auth-shell--ob-6 .auth-goal-card--custom .auth-goal-card__title {
  font-size: var(--fs-small);
  padding: 10px 0 0;
}

.auth-shell--ob-6 #step6-amount-group {
  margin-top: 18px;
}

.auth-shell--ob-6 .auth-result-line {
  text-align: left;
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  margin-top: var(--sp-4);
}

/* ── Запись капсулы (core/audio_capsule_recorder.js): общие элементы
   состояний. data-rec-state = idle | recording | done | text. ── */
.rec-done-title {
  display: none;
}

/* .hidden (base.css) слабее display:flex у плеера и .btn — без этого
   плеер и «Переписать» видны до окончания записи. */
.auth-capsule-playback.hidden,
#rec-redo.hidden {
  display: none;
}

[data-rec-state="done"] .rec-done-title {
  display: block;
}

[data-rec-state="done"] .rec-title {
  display: none;
}

.rec-sub {
  text-align: center;
  font-size: var(--fs-micro);
  color: var(--entry-text-dim);
  margin-top: 7px;
}

[data-rec-state="recording"] .rec-sub {
  color: var(--accent-light);
}

/* ── Шаг 7: капсула, сверка с onboarding-7-capsule-*.html ── */
.auth-shell--ob-7 {
  padding-top: 70px;
}

.auth-shell--ob-7 .auth-drop-stage {
  flex: none;
  min-height: 0 !important;
  height: 104px;
  position: relative;
}

.auth-shell--ob-7 .auth-drop-stage::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow-a30), transparent 70%);
}

/* Капля-контур, повёрнутая на 45° (не маска — у макета прозрачная
   заливка с обводкой и внутренним свечением). */
.auth-shell--ob-7 .auth-drop {
  position: relative;
  width: 64px;
  height: 80px;
  -webkit-mask-image: none;
  mask-image: none;
  border-radius: 0 50% 50% 50%;
  background: var(--entry-ring-a12);
  border: 1.5px solid var(--entry-ring-a70);
  box-shadow: var(--entry-capsule-drop-glow);
  transform: rotate(45deg);
}

.auth-shell--ob-7 .auth-title {
  margin-top: 18px;
  text-align: center;
  font-size: var(--fs-entry-title);
  line-height: 1.24;
}

.auth-shell--ob-7 .rec-lead {
  padding: 14px 6px 0;
  text-align: center;
  font-size: var(--fs-callout);
  line-height: var(--lh-normal);
  color: var(--entry-body-a62);
}

.auth-shell--ob-7 #rec-hint {
  padding: 26px 10px 0;
  margin-top: 0;
  font-size: var(--fs-entry-hint) !important;
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: var(--accent-light) !important;
}

.auth-shell--ob-7 #rec-hint::before { content: "«"; }
.auth-shell--ob-7 #rec-hint::after { content: "»"; }

.auth-shell--ob-7 #rec-audio-mode {
  margin-top: 22px;
}

.auth-shell--ob-7 .auth-capsule-record-stage {
  width: 150px;
  height: 150px;
}

.auth-shell--ob-7 .auth-capsule-ring:nth-child(1) {
  inset: 0;
  border: none;
  background: var(--accent-glow-a12);
  animation-duration: 3s;
}

.auth-shell--ob-7 .auth-capsule-ring:nth-child(2) {
  inset: 20px;
  border: none;
  background: var(--accent-glow-a18);
  animation-duration: 3s;
  animation-delay: .5s;
}

.auth-shell--ob-7 .auth-capsule-ring:nth-child(3) {
  display: none;
}

.auth-shell--ob-7 #rec-record-btn {
  border-radius: 50% !important;
  padding: 0;
  box-shadow: var(--entry-rec-glow);
}

.auth-shell--ob-7 #rec-canvas {
  display: none;
}

.auth-shell--ob-7 #rec-timer {
  margin-top: var(--sp-3) !important;
  padding: 0;
  background: none;
  text-shadow: none;
  font-size: var(--fs-entry-result);
  line-height: 1;
  color: var(--on-primary);
}

.auth-shell--ob-7 .auth-actions {
  margin-top: auto;
  gap: 0;
  padding: var(--sp-4) 0 34px;
}

.auth-shell--ob-7 #rec-seal:disabled {
  display: none;
}

.auth-shell--ob-7 .auth-actions .btn--text {
  height: var(--tap);
}

.auth-shell--ob-7 #rec-switch-mode {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  color: var(--accent-light);
}

.auth-shell--ob-7 #rec-skip {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  color: var(--entry-text-dim);
}

/* Идёт запись: только вопрос, кольца и таймер. */
.auth-shell--ob-7 [data-rec-state="recording"] .auth-drop-stage,
.auth-shell--ob-7 [data-rec-state="recording"] .auth-title,
.auth-shell--ob-7 [data-rec-state="recording"] .rec-lead,
.auth-shell--ob-7 [data-rec-state="recording"] #rec-skip {
  display: none;
}

.auth-shell--ob-7 [data-rec-state="recording"] #rec-hint {
  padding-top: var(--sp-6);
  font-size: var(--fs-h2) !important;
  font-weight: var(--fw-bold);
  color: var(--on-primary) !important;
}

.auth-shell--ob-7 [data-rec-state="recording"] #rec-audio-mode {
  flex: 1;
  justify-content: center;
}

.auth-shell--ob-7 [data-rec-state="recording"] .auth-capsule-record-stage {
  width: 240px;
  height: 240px;
}

.auth-shell--ob-7 [data-rec-state="recording"] .auth-capsule-ring {
  display: block;
  background: none;
  animation-duration: 2.2s;
}

.auth-shell--ob-7 [data-rec-state="recording"] .auth-capsule-ring:nth-child(1) { inset: 0; border: 2px solid var(--entry-ring-a28); animation-delay: 0s; }
.auth-shell--ob-7 [data-rec-state="recording"] .auth-capsule-ring:nth-child(2) { inset: 30px; border: 2px solid var(--entry-ring-a45); animation-delay: .35s; }
.auth-shell--ob-7 [data-rec-state="recording"] .auth-capsule-ring:nth-child(3) { inset: 58px; border: 2px solid var(--entry-ring-a60); animation-delay: .7s; }

.auth-shell--ob-7 [data-rec-state="recording"] #rec-record-btn {
  border-radius: var(--radius-rec-btn) !important;
  box-shadow: var(--entry-rec-glow-strong);
}

.auth-shell--ob-7 [data-rec-state="recording"] #rec-timer {
  margin-top: 28px !important;
  font-size: var(--fs-h1-sm);
}

.auth-shell--ob-7 [data-rec-state="recording"] #rec-switch-mode {
  color: var(--entry-ring-a35);
}

/* Запись готова: прослушать, запечатать или переписать. */
.auth-shell--ob-7 [data-rec-state="done"] .auth-drop-stage,
.auth-shell--ob-7 [data-rec-state="done"] .rec-lead,
.auth-shell--ob-7 [data-rec-state="done"] #rec-hint,
.auth-shell--ob-7 [data-rec-state="done"] #rec-audio-mode,
.auth-shell--ob-7 [data-rec-state="done"] #rec-switch-mode,
.auth-shell--ob-7 [data-rec-state="done"] #rec-skip {
  display: none;
}

.auth-shell--ob-7 [data-rec-state="done"] .rec-done-title {
  margin-top: var(--sp-6);
  font-size: var(--fs-h2);
  line-height: 1.3;
}

.auth-shell--ob-7 [data-rec-state="done"] #rec-playback-wrap {
  margin: auto var(--sp-1) 0;
  padding: 18px;
  gap: 14px;
  border-color: var(--entry-border);
}

.auth-shell--ob-7 [data-rec-state="done"] .auth-actions {
  margin-top: var(--sp-6);
  padding-bottom: 80px;
}

.auth-shell--ob-7 [data-rec-state="done"] #rec-redo {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  color: var(--entry-text-soft);
  margin-top: var(--sp-1);
}

/* Текстом: меньшая капля, поле письма во всю ширину. */
.auth-shell--ob-7 [data-rec-state="text"] .rec-lead,
.auth-shell--ob-7 [data-rec-state="text"] #rec-hint,
.auth-shell--ob-7 [data-rec-state="text"] #rec-skip {
  display: none;
}

.auth-shell--ob-7 [data-rec-state="text"] .auth-drop {
  width: 56px;
  height: 70px;
}

.auth-shell--ob-7 [data-rec-state="text"] .auth-title {
  margin-top: var(--sp-6);
  font-size: var(--fs-entry-counter);
  line-height: 1.26;
}

.auth-shell--ob-7 [data-rec-state="text"] #rec-text-mode {
  margin-top: 22px;
}

.auth-shell--ob-7 #rec-text {
  height: auto;
  min-height: 210px;
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--entry-surface-a72);
  font-size: var(--fs-callout);
  line-height: 1.6;
  resize: none;
}

.auth-shell--ob-7 [data-rec-state="text"] #rec-switch-mode {
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
}

.auth-shell--ob-7 [data-rec-state="text"] .auth-actions {
  padding-bottom: 36px;
}

/* Запечатано (step7.js playSealScene, onboarding-7-capsule-sealed.html). */
.auth-shell--ob-7:has(.auth-seal-scene) {
  background: var(--gradient-entry-glow);
}

.auth-shell--ob-7:has(.auth-seal-scene) .auth-header {
  display: none;
}

.auth-seal-scene {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -70px;
}

.auth-seal-scene .auth-drop {
  width: 150px;
  height: 190px;
  -webkit-mask-image: none;
  mask-image: none;
  border: none;
  transform: none;
  border-radius: 52% 52% 50% 50% / 62% 62% 38% 38%;
  background: var(--gradient-liquid);
  box-shadow: var(--entry-seal-glow);
}

.auth-seal-scene__date {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--accent-light);
  margin-top: 22px;
}

.auth-shell--ob-7 .auth-seal-scene .auth-title {
  margin-top: 30px;
  padding: 0 14px;
  font-size: var(--fs-h2);
  line-height: 1.4;
}

.auth-shell--ob-7 .auth-seal-actions {
  margin-top: auto;
  padding: var(--sp-4) var(--sp-1) 36px;
}

/* ── Шаг 8: уведомления ── */
.auth-shell--ob-8 {
  padding-top: 90px;
}

.auth-shell--ob-8 .auth-title + .flex-col {
  margin-top: 26px;
}

.auth-shell--ob .auth-notif-card {
  background: var(--entry-surface-solid);
  border-color: var(--entry-border);
  border-radius: var(--radius-entry-card);
  padding: 14px;
}

.auth-shell--ob .auth-notif-card__title {
  font-size: var(--fs-callout);
  line-height: 1.2;
  color: var(--entry-body);
}

.auth-shell--ob .auth-notif-card__hint {
  font-size: var(--fs-small);
  line-height: 1.3;
  color: var(--entry-text-dim);
}

.auth-shell--ob .toggle-track {
  background: var(--entry-border);
}

.auth-shell--ob .toggle-thumb {
  background: var(--entry-text-soft);
  box-shadow: none;
}

.auth-shell--ob .toggle input:checked ~ .toggle-track {
  background: var(--accent);
}

.auth-shell--ob .toggle input:checked ~ .toggle-thumb {
  background: var(--on-primary);
}

.auth-shell--ob-8 .auth-footnote {
  font-size: var(--fs-micro);
  line-height: 1.45;
  color: var(--entry-text-muted);
  margin-top: var(--sp-1);
}

.auth-shell--ob-8 #step8-how {
  height: auto;
  font-size: var(--fs-micro);
  color: var(--accent-light);
}

/* ── Финал «День 1» (onboarding-final-day1.html) ── */
.auth-shell--ob.auth-shell--ob-final {
  padding-top: 104px;
}

.auth-shell--ob-final .auth-vessel-drop {
  width: 16px;
  height: 20px;
  border-radius: 0;
  background: var(--accent-light);
  -webkit-mask-image: var(--mask-drop);
  -webkit-mask-size: 100% 100%;
  mask-image: var(--mask-drop);
  mask-size: 100% 100%;
}

.auth-shell--ob-final .auth-vessel {
  margin-top: 28px;
  border-radius: 52% 52% 50% 50% / 62% 62% 38% 38%;
  background: var(--entry-surface-a45);
  border-color: var(--entry-ring-a45);
}

.auth-shell--ob-final .auth-vessel__number span {
  font-size: var(--fs-label);
  margin-top: 6px;
}

.auth-final-text {
  margin-top: 52px;
  padding: 0 var(--sp-3);
  color: var(--entry-text-a75);
}

.auth-seal-actions .btn {
  width: 100%;
  background: var(--on-primary-a10);
  border: none;
  color: var(--on-primary);
  font-size: var(--fs-callout);
  font-weight: var(--fw-semibold);
}

/* ═══ Вход / регистрация / смена номера / объединение (layouts/auth.php):
   сверка с design/login-*, signup-*, change-phone*, merge-data ═══ */
.auth-shell--entry {
  position: relative;
  background: var(--gradient-entry-calm);
  padding: 0 var(--screen-padding);
}

.auth-shell--entry > .auth-header {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-2);
  margin: 0;
  z-index: 2;
}

.auth-shell--entry .auth-title {
  color: var(--on-primary);
  font-size: var(--fs-h1);
  margin-bottom: 0;
}

.auth-shell--entry .auth-text {
  font-size: var(--fs-label);
  line-height: var(--lh-normal);
  color: var(--entry-text-soft);
}

.auth-shell--entry .text-mono {
  font-family: var(--font-mono);
  color: var(--entry-body);
}

.auth-stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: 110px;
}

.auth-stage.hidden {
  display: none;
}

.auth-drop--logo {
  flex: none;
  width: 44px;
  height: 54px;
  margin: 0 auto;
  background: var(--gradient-drop);
}

.auth-stage--login .auth-title {
  margin-top: var(--sp-8);
}

.auth-stage--login .auth-title + .auth-text {
  margin-top: 10px;
}

/* Поле номера: префикс +7 и поле на сплошной поверхности. */
.auth-shell--entry .auth-phone-row {
  gap: 10px;
  margin-top: 30px;
}

.auth-shell--entry .auth-phone-prefix {
  background: var(--entry-surface-solid);
  border-color: var(--entry-border);
  font-size: var(--fs-callout);
  color: var(--entry-text-soft);
}

.auth-shell--entry .input {
  background: var(--entry-surface-solid);
  border: 1.5px solid var(--entry-border);
  color: var(--entry-body);
}

.auth-shell--entry .input::placeholder {
  color: var(--entry-text-dim);
}

.auth-shell--entry .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--entry-ring-a10);
}

.auth-shell--entry .auth-phone-row .input {
  font-size: var(--fs-callout);
}

.auth-phone-hint {
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--entry-text-dim);
  margin-top: 10px;
}

.auth-shell--entry .input-error {
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--entry-danger-soft);
}

.auth-stage--login .auth-actions {
  margin-top: var(--sp-6);
}

/* Ссылка «Нет аккаунта? Продолжить без регистрации» — в 52px от низа. */
.auth-link-row {
  height: var(--tap);
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
  white-space: normal;
}

.auth-shell--entry .auth-link-row {
  color: var(--entry-text-soft);
}

.auth-link-row {
  gap: .3em;
}

.auth-link-row span {
  color: var(--accent-light);
}

.auth-bottom-link {
  flex: none;
  margin-bottom: 37px;
}

/* ── Стадия кода ── */
.auth-shell--entry .auth-code-row,
.auth-shell--ob .auth-code-row {
  margin-top: 28px;
}

.auth-shell--entry .auth-code-cell,
.auth-shell--ob .auth-code-cell {
  border-radius: var(--radius-entry-card);
  border-color: var(--entry-border);
  font-size: var(--fs-otp);
  color: var(--entry-body);
  cursor: text;
}

.auth-shell--entry .auth-code-cell--active,
.auth-shell--ob .auth-code-cell--active {
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow-a12);
}

/* Каретка в активной пустой ячейке, как в signup-sms-code.html. */
.auth-shell--entry .auth-code-cell--active:empty::after,
.auth-shell--ob .auth-code-cell--active:empty::after {
  content: "";
  width: 2px;
  height: 28px;
  background: var(--accent-light);
}

.auth-shell--entry .auth-code-cell--empty,
.auth-shell--ob .auth-code-cell--empty {
  background: var(--entry-bg-alt);
}

.auth-shell--entry .auth-code-cell--error,
.auth-shell--ob .auth-code-cell--error {
  border: 1.5px solid var(--danger);
  box-shadow: none;
}

.auth-shell--entry .auth-pin-error {
  margin-top: 14px;
  color: var(--entry-danger-soft);
}

.auth-code-actions {
  margin-top: var(--sp-6);
  gap: 0;
}

.auth-shell--entry .btn--secondary {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent-light);
  font-size: var(--fs-callout);
  font-weight: var(--fw-semibold);
}

.auth-shell--entry .btn--secondary:disabled {
  border-color: var(--entry-border);
  color: var(--entry-text-muted);
  opacity: 1;
}

.auth-code-actions #flashcall-btn {
  margin-top: var(--sp-1);
  height: var(--tap);
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--entry-text-soft);
}

#flashcall-btn.hidden {
  display: none;
}

/* Регистрация: код отправлен (signup-sms-code.html) */
.auth-stage--signup-code {
  padding-top: 132px;
}

.auth-stage--signup-code .auth-drop-envelope {
  flex: none;
  margin: 0 auto;
  filter: none;
  color: var(--on-primary-a95);
}

.auth-stage--signup-code .auth-drop-envelope .auth-drop {
  -webkit-mask-image: none;
  mask-image: none;
  border-radius: 52% 52% 50% 50% / 62% 62% 38% 38%;
  box-shadow: var(--entry-envelope-glow);
}

.auth-stage--signup-code .auth-title {
  margin-top: 30px;
}

.auth-stage--signup-code .auth-title + .auth-text {
  margin-top: var(--sp-3);
  font-size: var(--fs-body);
}

.auth-stage--signup-code .auth-code-row {
  margin-top: 30px;
}

.auth-stage--signup-code .auth-footnote {
  margin-top: auto;
  padding: var(--sp-6) var(--sp-1) 52px;
  font-size: var(--fs-micro);
  line-height: var(--lh-normal);
  color: var(--entry-text-muted);
}

/* Блокировка по попыткам (login-blocked.html) */
.auth-phone-row--disabled .auth-phone-prefix,
.auth-phone-row--disabled .input {
  display: flex;
  align-items: center;
  background: var(--entry-bg-alt);
  border: 1px solid var(--entry-border);
  color: var(--entry-text-muted);
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
}

.auth-blocked-box {
  margin-top: var(--sp-4);
  border: 1px solid var(--danger-soft-border-dark);
  border-radius: var(--radius-entry-card);
  padding: 14px;
  text-align: center;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  color: var(--entry-danger-soft);
}

.auth-blocked-box__timer {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-entry-counter);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--danger);
}

.auth-blocked-actions {
  margin-top: var(--sp-5);
}

/* ── Регистрация: сохранить прогресс (signup-phone.html) ── */
.auth-stage--signup {
  padding-top: 62px;
}

.auth-stage--signup .auth-title {
  font-size: var(--fs-entry-title);
}

.auth-stage--signup .auth-title + .auth-text {
  margin-top: var(--sp-3);
  font-size: var(--fs-callout);
}

.auth-shell--entry .auth-sync-table {
  margin-top: 18px;
  border-color: var(--entry-border);
  border-radius: var(--radius-entry-card);
}

.auth-shell--entry .auth-sync-col {
  padding: 14px;
}

.auth-shell--entry .auth-sync-col--private {
  background: var(--accent-dark);
  border: none;
}

.auth-shell--entry .auth-sync-col__head {
  gap: 7px;
  line-height: 1.2;
  color: var(--entry-text-soft);
}

.auth-shell--entry .auth-sync-col__head svg {
  flex: none;
  color: var(--accent-light);
}

.auth-shell--entry .auth-sync-col--private .auth-sync-col__head,
.auth-shell--entry .auth-sync-col--private .auth-sync-col__head svg {
  color: var(--on-primary);
}

.auth-shell--entry .auth-sync-col ul {
  gap: 0;
  margin-top: 9px;
  line-height: 1.7;
  color: var(--entry-text-dim);
}

.auth-shell--entry .auth-sync-col--private ul {
  color: var(--on-primary-a85);
}

.auth-shell--entry .auth-social-row {
  margin-top: 18px;
}

.auth-shell--entry .auth-social-btn {
  border-color: var(--entry-border);
  font-size: var(--fs-small);
  color: var(--entry-body);
}

.auth-shell--entry .auth-divider {
  margin-top: 14px;
}

.auth-shell--entry .auth-divider::before,
.auth-shell--entry .auth-divider::after {
  background: var(--entry-border);
}

.auth-shell--entry .auth-divider span {
  color: var(--entry-text-dim);
}

.auth-stage--signup .auth-phone-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-stage--signup .auth-phone-row {
  margin-top: var(--sp-3);
}

.auth-stage--signup .auth-phone-hint {
  font-size: var(--fs-micro);
  margin-top: 9px;
}

.auth-consent {
  margin-top: var(--sp-1);
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--entry-text-soft);
}

.auth-shell--entry .auth-consent .checkbox-box {
  flex: none;
  border-radius: var(--radius-entry-check);
  border-color: var(--entry-border);
}

.auth-consent a {
  color: var(--accent-light);
}

.auth-shell--entry .auth-stage--signup .auth-actions--fixed {
  bottom: 0;
  gap: 0;
  margin-left: calc(var(--screen-padding) * -1);
  margin-right: calc(var(--screen-padding) * -1);
  padding: var(--sp-4) var(--screen-padding) 31px;
  background: var(--gradient-entry-actions-calm);
}

/* .hidden слабее display:flex у строки ошибки — иконка была видна всегда. */
.auth-pin-error.hidden {
  display: none;
}

#resend-timer {
  color: inherit;
}

/* Регистрация, стадия кода — бирюзовый верх, как в signup-sms-code.html. */
.auth-shell--entry:has(.auth-stage--signup-code:not(.hidden)) {
  background: var(--gradient-entry-teal);
}

/* ── Смена номера (change-phone*.html) ── */
.auth-stage--change {
  padding-top: 120px;
}

.auth-stage--change .auth-title {
  font-size: var(--fs-h1-sm);
  padding: 0 var(--sp-1);
}

.auth-stage--change .auth-title + .auth-text {
  margin-top: var(--sp-3);
  padding: 0 var(--sp-1);
  font-size: var(--fs-callout);
}

.auth-stage--change .auth-phone-row {
  margin-top: var(--sp-6);
}

.auth-stage--change .auth-actions {
  margin-top: var(--sp-5);
}

.auth-stage--change .auth-code-row {
  margin-top: 26px;
}

.auth-stage--change .auth-code-row + input + .auth-pin-error + .auth-actions {
  margin-top: 26px;
  gap: 0;
}

.auth-shell--entry .auth-actions .btn--text-accent {
  height: var(--tap);
  margin-top: var(--sp-1);
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--accent-light);
}

.auth-stage--sent {
  padding-top: 220px;
}

.auth-stage--sent .auth-drop-stage {
  flex: none;
  min-height: 0;
}

.auth-stage--sent .auth-drop-envelope {
  width: 86px;
  height: 104px;
  filter: none;
  color: var(--on-primary);
}

.auth-stage--sent .auth-drop-envelope .auth-drop {
  -webkit-mask-image: none;
  mask-image: none;
  border-radius: 52% 52% 50% 50% / 62% 62% 38% 38%;
  background: var(--gradient-drop);
  box-shadow: 0 0 40px var(--accent-glow-a40);
}

.auth-stage--sent .auth-title {
  margin-top: var(--sp-8);
  padding: 0 10px;
  font-size: var(--fs-h2);
  line-height: 1.35;
}

.auth-actions--bottom {
  margin-top: auto;
  padding-bottom: 52px;
}

.auth-shell--entry .btn--neutral {
  border-color: var(--entry-border);
  color: var(--entry-body);
}

/* ── Объединение данных (merge-data.html) ── */
.auth-stage--merge {
  padding-top: 84px;
}

.auth-stage--merge .auth-title {
  font-size: var(--fs-entry-title);
  line-height: 1.24;
  padding: 0 var(--sp-1);
}

.auth-stage--merge .merge-compare {
  margin-top: 26px;
}

.auth-stage--merge .merge-compare-card {
  background: var(--entry-surface-solid);
  border-color: var(--entry-border);
}

.auth-stage--merge .merge-compare-card--account {
  background: linear-gradient(160deg, var(--accent-dark), var(--primary));
  border-color: var(--accent-glow-a40);
}

.auth-stage--merge .merge-compare-label {
  font-size: var(--fs-small);
  color: var(--entry-text-soft);
}

.auth-stage--merge .merge-compare-card--account .merge-compare-label {
  color: var(--accent-light);
}

.auth-stage--merge .merge-compare-days {
  font-size: var(--fs-h1-sm);
  color: var(--entry-body);
}

.auth-stage--merge .merge-compare-card--account .merge-compare-days {
  color: var(--on-primary);
}

.auth-stage--merge .merge-compare-days-unit {
  font-size: var(--fs-micro);
  color: var(--entry-text-dim);
  margin-top: 5px;
}

.auth-stage--merge .merge-compare-card--account .merge-compare-days-unit {
  color: var(--on-primary-a70);
}

.auth-stage--merge .merge-compare-meta {
  font-size: var(--fs-small);
  color: var(--entry-text-soft);
}

.auth-stage--merge .merge-compare-card--account .merge-compare-meta {
  color: var(--on-primary-a85);
}

.auth-stage--merge .auth-actions {
  margin-top: 28px;
  gap: var(--sp-3);
}

.auth-merge-main {
  flex-direction: column;
  gap: 6px;
}

.auth-merge-main small {
  font-size: var(--fs-micro);
  font-weight: var(--fw-regular);
  color: var(--on-primary-a85);
}

/* ═══ Splash (design/splash.html). Таймлайн макета ~4,3 с показывается
   целиком (решение владельца продукта, отменяет лимит 1,2 с из docs/08 2.2). ═══ */
.splash {
  position: relative;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--gradient-entry-teal);
}

.splash__trail {
  position: absolute;
  left: 50%;
  top: 158px;
  width: 1.5px;
  height: 0;
  transform: translateX(-50%);
  background: var(--splash-trail);
  animation: splash-trail 1.5s cubic-bezier(.4, 0, .7, 1) .4s forwards;
}

@keyframes splash-trail {
  0% { height: 0; opacity: 0; }
  25% { opacity: 1; }
  70% { height: 200px; opacity: .85; }
  100% { height: 200px; opacity: 0; }
}

.splash__drop {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 30px;
  height: 40px;
  margin-left: -15px;
  filter: var(--splash-drop-glow);
  animation: splash-hang .4s ease-in forwards,
             splash-fall 1.1s cubic-bezier(.45, 0, .75, 1) .4s forwards,
             splash-hit .26s ease-out 1.5s forwards;
}

.splash__drop svg,
.splash__vessel svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes splash-hang { 0% { transform: translateY(-6px) scale(.86, .78); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes splash-fall { 0% { transform: translateY(0) scale(1, 1); } 55% { transform: translateY(215px) scale(.84, 1.28); } 100% { transform: translateY(384px) scale(.9, 1.14); } }
@keyframes splash-hit { 0% { transform: translateY(384px) scale(.9, 1.14); opacity: 1; } 100% { transform: translateY(392px) scale(1.8, .28); opacity: 0; } }

.splash__ring {
  position: absolute;
  left: 50%;
  top: 544px;
  border-radius: 50%;
  border: 1.5px solid var(--entry-counter-glow);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.splash__ring--1 { animation: splash-ring 1.5s cubic-bezier(.2, .7, .3, 1) 1.52s forwards; }
.splash__ring--2 { animation: splash-ring 1.7s cubic-bezier(.2, .7, .3, 1) 1.66s forwards; }
.splash__ring--3 { animation: splash-ring 1.9s cubic-bezier(.2, .7, .3, 1) 1.82s forwards; }

@keyframes splash-ring { 0% { width: 16px; height: 16px; opacity: .9; } 100% { width: 260px; height: 260px; opacity: 0; } }

.splash__core {
  position: absolute;
  left: 50%;
  top: 544px;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--splash-core);
  box-shadow: var(--splash-core-glow);
  opacity: 0;
  animation: splash-core 1s ease-out 1.5s forwards;
}

@keyframes splash-core { 0% { opacity: 1; transform: scale(.4); } 45% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }

.splash__vessel {
  position: absolute;
  left: 50%;
  top: 412px;
  width: 186px;
  height: 248px;
  margin-left: -93px;
  opacity: 0;
  transform: scale(.18);
  transform-origin: 50% 53%;
  filter: var(--splash-vessel-glow);
  animation: splash-vessel 1.05s cubic-bezier(.2, .8, .25, 1) 2.3s forwards;
}

@keyframes splash-vessel { 0% { opacity: 0; transform: scale(.18); } 55% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

.splash__fill {
  transform: translateY(248px);
  animation: splash-fill 1.6s ease-out 3.05s forwards;
}

@keyframes splash-fill { to { transform: translateY(172px); } }

.splash__wave {
  animation: splash-sway 4.4s ease-in-out infinite;
}

@keyframes splash-sway { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

.splash__title {
  position: absolute;
  left: 0;
  right: 0;
  top: 300px;
  text-align: center;
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: .3px;
  color: var(--on-primary);
  opacity: 0;
  transform: translateY(10px);
  animation: splash-up .9s ease-out 2.65s forwards;
}

.splash__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  text-align: center;
  font-size: var(--fs-micro);
  line-height: 1;
  color: var(--splash-foot);
  opacity: 0;
  animation: splash-fade .9s ease-out 3.4s forwards;
}

@keyframes splash-up { to { opacity: 1; transform: translateY(0); } }
@keyframes splash-fade { to { opacity: 1; } }

/* Без анимации — сразу финальный кадр макета. */
@media (prefers-reduced-motion: reduce) {
  .splash *,
  .splash__fill {
    animation: none !important;
  }
  .splash__drop,
  .splash__trail,
  .splash__ring,
  .splash__core {
    display: none;
  }
  .splash__vessel,
  .splash__title,
  .splash__foot {
    opacity: 1;
    transform: none;
  }
  .splash__fill {
    transform: translateY(172px);
  }
}

/* ═══ PIN-разблокировка (pin-unlock.html, pin-unlock-error.html) ═══ */
.auth-shell--lock {
  background: var(--entry-bg);
  padding: 130px 0 0;
}

.auth-drop--lock {
  flex: none;
  width: 40px;
  height: 50px;
  margin: 0 auto;
  background: var(--gradient-drop);
}

.auth-shell--lock .auth-pin-dots {
  margin-top: 44px;
}

.auth-shell--lock .auth-pin-dot {
  border-color: var(--entry-border);
}

.auth-shell--lock .auth-pin-error {
  margin-top: 18px;
  font-size: var(--fs-entry-link);
  color: var(--entry-danger-soft);
}

.auth-shell--lock .auth-pin-keys {
  gap: 14px;
  margin-top: 56px;
  padding: 0 44px;
}

/* С ошибкой клавиатура поднимается: 18 + 13 + 34 ≈ 56 (как в макете). */
.auth-shell--lock .auth-pin-error:not(.hidden) + .auth-pin-keys {
  margin-top: 34px;
}

.auth-shell--lock .auth-pin-key {
  height: 48px;
  font-size: var(--fs-pin-key);
  color: var(--entry-body);
}

.auth-shell--lock .auth-pin-key--icon {
  color: var(--accent-light);
}

.auth-shell--lock .auth-pin-key--del {
  color: var(--entry-text-soft);
}

.auth-shell--lock #lock-forgot {
  margin-top: auto;
  margin-bottom: 37px;
  height: var(--tap);
  font-size: var(--fs-entry-link);
  font-weight: var(--fw-medium);
  color: var(--accent-light);
}

/* ═══ Возвращение после паузы (comeback.html) ═══ */
.auth-shell--comeback {
  position: relative;
  background: var(--gradient-entry-comeback);
  padding: 132px var(--screen-padding) 0;
}

.auth-comeback-scene {
  position: relative;
  flex: none;
  height: 254px;
}

.auth-shell--comeback .auth-vessel--comeback {
  position: absolute;
  top: 18px;
  left: 50%;
  margin: 0 0 0 -85px;
  border-radius: 52% 52% 50% 50% / 62% 62% 38% 38%;
  background: var(--comeback-vessel-bg);
  border: 1px solid var(--comeback-vessel-border);
  box-shadow: none;
}

.auth-shell--comeback .auth-vessel--comeback .auth-vessel__fill {
  height: 70%;
  background: var(--comeback-fill);
}

.auth-shell--comeback .auth-vessel-drop {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 28px;
  margin-left: -11px;
  border-radius: 0;
  background: var(--accent-light);
  box-shadow: none;
  filter: drop-shadow(0 0 13px var(--entry-ring-a60));
  -webkit-mask-image: var(--mask-drop);
  -webkit-mask-size: 100% 100%;
  mask-image: var(--mask-drop);
  mask-size: 100% 100%;
}

.auth-shell--comeback .auth-title {
  margin-top: 50px;
  font-size: var(--fs-h1);
  color: var(--on-primary);
}

.auth-shell--comeback .auth-text {
  margin-top: var(--sp-3);
  padding: 0 var(--sp-2);
  font-size: var(--fs-comeback-lead);
  line-height: 1.45;
  color: var(--comeback-text);
}

.auth-shell--comeback .auth-actions--fixed {
  bottom: 0;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--screen-padding) 52px;
  background: var(--gradient-entry-actions);
}

.auth-shell--comeback .btn--neutral {
  background: transparent;
  border: 1.5px solid var(--entry-border);
  color: var(--entry-body);
  font-size: var(--fs-callout);
  font-weight: var(--fw-semibold);
}

/* ── Шаг 2: согласия (обязательные галочки + необязательная о рассылках) ── */
.auth-consents {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: var(--sp-4);
}

.auth-shell--ob .auth-consents .checkbox {
  align-items: flex-start;
  margin-top: 0;
  font-size: var(--fs-label);
  line-height: var(--lh-normal);
}

.auth-consents .checkbox-box {
  flex: none;
}

.auth-consents a {
  color: var(--accent-light);
  text-decoration: underline;
}
