/* Branded auth styles. Loaded after base. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif !important;
  color: #1c1c1e !important;
  -webkit-font-smoothing: antialiased !important;
  /* min-height: ступенчатая стратегия для совместимости iOS+Android+desktop.
     - 100vh (default fallback)
     - 100dvh (dynamic viewport height, iOS 16.4+ Chrome 108+) — учитывает keyboard
     - последний override побеждает на современных браузерах
     Без этого на iOS body занимает full screen, при появлении keyboard
     контент становится больше visible-зоны и Safari делает scroll-to-input. */
  min-height: 100vh !important;
  min-height: 100dvh !important;
  /* Premium фон: заметные blob-градиенты + базовый диагональный пастель.
     Никогда не выглядит "чисто белым" — даже на простых mobile экранах. */
  background:
    radial-gradient(ellipse 720px 520px at 90% -10%, rgba(149, 88, 255, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 620px 520px at -10% 55%, rgba(91, 108, 255, 0.26) 0%, transparent 52%),
    radial-gradient(ellipse 540px 420px at 100% 105%, rgba(255, 140, 185, 0.22) 0%, transparent 52%),
    linear-gradient(135deg, #f4f6ff 0%, #f9f2ff 45%, #fff4f9 100%) !important;
  background-attachment: fixed !important;
  background-color: #f7f5ff !important;
  background-image:
    radial-gradient(ellipse 720px 520px at 90% -10%, rgba(149, 88, 255, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 620px 520px at -10% 55%, rgba(91, 108, 255, 0.26) 0%, transparent 52%),
    radial-gradient(ellipse 540px 420px at 100% 105%, rgba(255, 140, 185, 0.22) 0%, transparent 52%),
    linear-gradient(135deg, #f4f6ff 0%, #f9f2ff 45%, #fff4f9 100%) !important;
}
/* Тонкая зернистость поверх — premium-look без агрессии */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.42  0 0 0 0 0.6  0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
}
/* Содержимое поверх noise */
.app, .main-content, .site-header, .overlay { position: relative; z-index: 1; }
/* iOS Safari fallback ТОЛЬКО для старых iOS (<16.4) которые не понимают 100dvh.
   Используем -webkit-fill-available КАК КРАЙНИЙ fallback (не учитывает keyboard,
   но это лучше чем 100vh который тоже full screen). С iOS 16.4+ срабатывает
   100dvh выше и переопределяет.  */
@supports (-webkit-touch-callout: none) and (not (height: 100dvh)) {
  body { min-height: -webkit-fill-available !important; }
}
/* touch-action: manipulation выключает double-tap zoom — клики мгновенные */
input, button, .otp-box, .phone-input { touch-action: manipulation; }
/* iOS Safari: НЕ делать auto-scroll к input если он уже виден.
   С interactive-widget=overlays-content keyboard не должна двигать viewport,
   но scroll-margin страхует на старых iOS. */
.otp-box, .phone-input, #password, .otp-real { scroll-margin-top: 100px; scroll-margin-bottom: 100px; }

/* HEADER — прозрачный, увеличенный лого + бренд */
.site-header {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0) !important;
}
.site-header-inner {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 18px 18px 10px !important;
  gap: 12px !important;
  max-width: 480px !important;
}
.header-logo {
  display: inline-flex !important; align-items: center !important; gap: 12px !important;
}
.header-logo-icon {
  width: 44px !important; height: 44px !important;
  border-radius: 11px !important;
  box-shadow: 0 6px 18px rgba(91,108,255,.32) !important;
}
.header-logo-text {
  font-size: 18px !important; font-weight: 700 !important;
  letter-spacing: 1.6px !important;
  color: #1c1c1e !important;
}

/* MAIN — стеклянная карточка */
.main-content {
  padding: 8px 18px 40px !important;
  background: transparent !important;
}
.auth-card {
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 22px !important;
  padding: 26px 22px !important;
  box-shadow: 0 12px 40px rgba(91,108,255,.1) !important;
  max-width: 420px !important; margin: 0 auto !important;
  border: 1px solid rgba(255,255,255,.6) !important;
}

/* AUTH HEADER row (with back button) */
.auth-header {
  display: flex; align-items: center;
  margin-bottom: 12px !important;
}
.auth-title {
  font-size: 20px !important; font-weight: 600 !important;
  color: #1c1c1e !important; letter-spacing: -.2px !important;
  margin: 0 !important; flex: 1;
}
.step-hint {
  color: #4a4a4a !important;
  font-size: 14.5px !important; line-height: 1.5 !important;
  margin: 0 0 14px !important;
}
.step-hint #codePhone, .step-hint .phone {
  font-weight: 600; color: #5b6cff;
  font-variant-numeric: tabular-nums; letter-spacing: .2px; white-space: nowrap;
}
.step-hint strong { color: #1c1c1e; font-weight: 600; }

/* BACK BUTTON */
.back-button {
  background: rgba(91,108,255,.08) !important;
  border: none !important; border-radius: 10px !important;
  padding: 0 !important;
  width: 36px !important; height: 36px !important;
  display: flex !important; align-items: center; justify-content: center;
  margin-right: 12px !important;
  flex-shrink: 0;
  cursor: pointer;
}
.back-button svg { width: 20px; height: 20px; stroke: #5b6cff !important; stroke-width: 2.2; }

/* INPUTS */
.phone-input-wrapper {
  display: flex !important; align-items: center !important;
  background: #fff !important;
  border: 2px solid #e5e5ea !important;
  border-radius: 12px !important;
  padding: 0 14px !important;
  transition: border-color .15s, box-shadow .15s;
}
.phone-input-wrapper:focus-within {
  border-color: #5b6cff !important;
  box-shadow: 0 0 0 4px rgba(91,108,255,.12) !important;
}
.phone-prefix { color: #1c1c1e !important; font-weight: 600; font-size: 16px; padding-right: 6px; }
.phone-input {
  flex: 1 !important; background: transparent !important;
  border: none !important; font-size: 16px !important;
  color: #1c1c1e !important; padding: 14px 0 !important; outline: none !important;
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.phone-input::placeholder { color: #aeaeb2 !important; }

/* OTP — single real input + 6 visual cells (стандартный надёжный pattern) */
.otp-wrapper {
  position: relative !important;
  display: flex !important;
  gap: 6px !important;
  justify-content: center !important;
  margin-top: 6px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
}
/* Реальный input — невидимый, лежит поверх всех ячеек.
   Принимает все клики/touch/input. Содержит value длиной 0-6. */
.otp-real {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important; height: 100% !important;
  background: transparent !important;
  color: transparent !important;
  caret-color: transparent !important;
  border: none !important; outline: none !important;
  font-size: 16px !important;  /* предотвращает iOS zoom при focus */
  letter-spacing: 0 !important;
  -webkit-text-fill-color: transparent !important;
  z-index: 2 !important;
  /* Selection не нужно показывать */
  -webkit-user-select: none; user-select: none;
  padding: 0 !important; margin: 0 !important;
}
.otp-real:focus { outline: none !important; }
.otp-real::selection { background: transparent !important; }
.otp-real:disabled { pointer-events: none !important; opacity: 0.7 !important; }
.otp-wrapper:has(.otp-real:disabled) .otp-box { background: #f2f2f7 !important; color: #aeaeb2 !important; }
/* Visual ячейки — DIV не INPUT, не принимают focus */
.otp-box {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 52px !important;
  height: 54px !important;
  border-radius: 12px !important;
  border: 2px solid #e5e5ea !important;
  background: #fff !important;
  color: #1c1c1e !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: border-color .15s, box-shadow .15s, background .15s;
  pointer-events: none !important;  /* клики проходят сквозь в .otp-real */
  z-index: 1 !important;
  scroll-margin-bottom: 80px;
  position: relative !important;
}
/* Когда .otp-real в focus — подсветить ячейку с курсором (текущий index) */
.otp-wrapper.is-focused .otp-box.otp-active {
  border-color: #5b6cff !important;
  box-shadow: 0 0 0 4px rgba(91,108,255,.12) !important;
}
.otp-box.otp-active::after {
  content: '';
  display: inline-block;
  width: 2px; height: 22px;
  background: #5b6cff;
  margin-left: 1px;
  animation: caretBlink 1s steps(1) infinite;
}
.otp-wrapper:not(.is-focused) .otp-box.otp-active::after { display: none; }
@keyframes caretBlink { 50% { opacity: 0; } }
.otp-box.otp-filled { border-color: #5b6cff !important; }
.otp-box.otp-filled.otp-active::after { display: none; }  /* нет каретки если есть цифра */
.otp-box.otp-error { border-color: #ff3b30 !important; }
@media (max-width: 360px) {
  .auth-card { padding: 22px 16px !important; }
  .otp-wrapper { gap: 5px !important; }
  .otp-box { height: 50px !important; font-size: 20px !important; }
}

/* BUTTONS */
.btn, .resend-btn {
  background: linear-gradient(135deg,#5b6cff,#9558ff) !important;
  color: #fff !important; border: none !important;
  border-radius: 14px !important; padding: 13px 18px !important;
  font-size: 16px !important; font-weight: 600 !important;
  box-shadow: 0 6px 18px rgba(91,108,255,.32) !important;
  cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: transform .1s, opacity .2s, box-shadow .2s;
  font-family: inherit !important;
  width: 100% !important; display: flex !important;
  align-items: center !important; justify-content: center !important;
  text-align: center;
  line-height: 1.25;
}
.btn:active, .resend-btn:active { transform: scale(.97); }
.btn:disabled, .resend-btn:disabled { opacity: .65 !important; cursor: wait; }
/* Двухстрочная кнопка: верхний main label + sub под ним */
.btn-text-main { display: block; font-size: 15px; font-weight: 600; letter-spacing: .1px; }
.btn-text-sub { display: block; font-size: 12.5px; font-weight: 500; opacity: 0.88; margin-top: 3px; letter-spacing: .2px; }

/* resend-btn под формой кода больше НЕ показываем — её роль выполняет
   expired-popup (60-сек таймер истёк → popup поверх → клик "Получить новый код"
   шлёт POST request-code на месте). Скрываем элемент насильно — JS-логика
   на нём (addEventListener) остаётся жива, но кнопка не рендерится. */
#resendBtn, .resend-btn { display: none !important; }

/* ============================================================
   EXPIRED-POPUP HINT — стилизованная подсказка под кнопкой
   ============================================================ */
.expired-hint {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(91,108,255,.07), rgba(149,88,255,.07));
  border: 1px solid rgba(91,108,255,.18);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
.expired-hint-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #5b6cff, #9558ff);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(91,108,255,.32);
}
.expired-hint-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: #fff; stroke-width: 2.2;
}
.expired-hint-content { flex: 1; min-width: 0; }
.expired-hint-title {
  font-size: 13.5px; font-weight: 600; color: #1c1c1e;
  margin: 0 0 4px;
  letter-spacing: -.1px;
}
.expired-hint-text {
  font-size: 13px; line-height: 1.5; color: #4a4a4a;
  margin: 0;
}
.expired-hint-text .max-video {
  color: #5b6cff; font-weight: 700; letter-spacing: .3px;
}
.expired-hint-path {
  margin-top: 10px;
  background: #fff;
  border: 1px solid rgba(91,108,255,.14);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #3c3c43;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
}
.expired-hint-path .path-step {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(91,108,255,.08);
  border-radius: 6px;
  color: #1c1c1e;
  font-weight: 500;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: .1px;
}
.expired-hint-path .path-step-target {
  background: linear-gradient(135deg, rgba(91,108,255,.16), rgba(149,88,255,.16));
  color: #5b6cff;
  font-weight: 600;
}
.expired-hint-path .path-arrow {
  color: #c7c7cc;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}
.btn-pulse-attention {
  animation: btnPulseAttn 0.6s ease-in-out 3;
}
@keyframes btnPulseAttn {
  0% { box-shadow: 0 6px 18px rgba(91,108,255,.32), 0 0 0 0 rgba(91,108,255,.55); transform: scale(1); }
  50% { box-shadow: 0 6px 18px rgba(91,108,255,.32), 0 0 0 14px rgba(91,108,255,0); transform: scale(1.025); }
  100% { box-shadow: 0 6px 18px rgba(91,108,255,.32), 0 0 0 0 rgba(91,108,255,0); transform: scale(1); }
}

/* SMS INFO CARD (на /auth/code) — иконка ВСЕГДА фиолетовая, пульсирует */
.sms-info-card {
  background: rgba(91,108,255,.08) !important;
  border-radius: 14px !important; padding: 12px 14px !important;
  gap: 10px !important; border: 1px solid rgba(91,108,255,.15) !important;
  display: flex !important; align-items: center !important;
  margin: 0 0 16px !important;
}
/* НЕ переключаем на зелёный после "arrived" — оставляем фирменный фиолет */
.sms-info-card.arrived {
  background: rgba(91,108,255,.08) !important;
  border-color: rgba(91,108,255,.15) !important;
}
.sms-info-card .sms-info-icon {
  width: 38px !important; height: 38px !important;
  background: linear-gradient(135deg,#5b6cff,#9558ff) !important;
  border-radius: 10px !important; flex-shrink: 0 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  animation: smsIconPulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(91,108,255,.5);
}
.sms-info-card.arrived .sms-info-icon {
  background: linear-gradient(135deg,#5b6cff,#9558ff) !important;
}
@keyframes smsIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,108,255,.45); }
  50%      { box-shadow: 0 0 0 10px rgba(91,108,255,0); }
}
.sms-info-card .sms-info-icon svg {
  width: 22px !important; height: 22px !important;
  stroke: #fff !important; fill: none;
}
.sms-info-card .sms-info-title {
  font-weight: 600 !important; color: #1c1c1e !important; font-size: 14.5px !important;
  margin: 0;
}
.sms-info-card .sms-info-subtitle {
  color: #4a4a4a !important; font-size: 13px !important; line-height: 1.4 !important;
  margin-top: 2px;
}

/* STEP PROGRESS / CHANNELS CARD (на /auth/phone) */
.step-progress {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px !important; font-size: 12px;
  color: #6c6c70 !important;
}
.step-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg,#5b6cff,#9558ff) !important;
  color: #fff !important; font-weight: 600; font-size: 12px;
  box-shadow: 0 2px 8px rgba(91,108,255,.35) !important;
  flex-shrink: 0;
}
.step-label { color: #1c1c1e !important; font-weight: 500; }
.step-bar { flex: 1; height: 2px; background: rgba(91,108,255,.15) !important; border-radius: 1px; }
.step-label-next { color: #8e8e93 !important; font-weight: 400; flex-shrink: 0; }

.channels-card {
  background: rgba(91,108,255,.08) !important;
  border: 1px solid rgba(91,108,255,.15) !important;
  border-radius: 14px !important; padding: 12px 14px !important;
  margin: 14px 0 18px !important;
}
.channels-title { color: #6c6c70 !important; }
.channel-row { color: #1c1c1e !important; }
.channel-row + .channel-row { border-top: 1px solid rgba(91,108,255,.1) !important; }
.channel-icon { background: rgba(91,108,255,.12) !important; color: #5b6cff !important; }
.channel-icon.max-brand {
  background: linear-gradient(135deg,#5b6cff,#9558ff) !important;
  color: #fff !important;
}
.channel-text b { color: #1c1c1e !important; }
.channel-text small { color: #6c6c70 !important; }

/* TRUST STRIP */
.trust-strip {
  color: #8e8e93 !important;
  font-size: 11.5px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px 0 0;
}
.trust-strip svg { color: #8e8e93 !important; }

/* CODE TIMER */
.code-timer {
  color: #6c6c70 !important;
  font-size: 13px !important; margin-top: 14px !important;
  text-align: center;
}
.code-timer.urgent { color: #ff3b30 !important; font-weight: 600; }

/* ERRORS */
.error-msg {
  color: #ff3b30 !important; font-size: 13.5px;
  margin-top: 10px; text-align: center;
  line-height: 1.4;
}

/* "Не пришёл код?" tip */
.no-code-tip {
  margin-top: 18px; padding: 14px;
  background: rgba(255,149,0,.08);
  border: 1px solid rgba(255,149,0,.2);
  border-radius: 14px;
  font-size: 13.5px; line-height: 1.5; color: #3c3c43;
  display: none; animation: tipSlide .3s ease-out;
}
.no-code-tip.visible { display: block; }
.no-code-tip strong { color: #1c1c1e; }
.no-code-tip .tip-path {
  display: inline-block; margin-top: 6px;
  background: #fff; padding: 6px 10px; border-radius: 8px;
  font-weight: 500; font-size: 13px; color: #1c1c1e;
}
@keyframes tipSlide { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: translateY(0); } }

/* EXPIRED POPUP */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.42) !important;
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
  animation: fadeIn .25s;
}
.popup-overlay.visible { display: flex !important; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.popup-card {
  background: #fff !important; border-radius: 22px !important;
  padding: 28px 22px 22px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.22) !important;
  max-width: 360px !important; width: 100% !important;
  text-align: center;
  animation: popIn .32s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { opacity:0; transform:scale(.85); } to { opacity:1; transform:scale(1); } }
.popup-card .popup-icon {
  width: 64px !important; height: 64px !important;
  border-radius: 18px !important;
  margin: 0 auto 14px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: rgba(255,95,95,.12);
}
.popup-card .popup-title {
  font-size: 18px !important; font-weight: 600 !important;
  color: #1c1c1e !important; margin: 0 0 8px !important;
}
.popup-card .popup-desc {
  font-size: 14.5px !important; line-height: 1.45 !important;
  color: #3c3c43 !important; margin: 0 0 14px !important;
}
.popup-btn { display: block !important; text-align: center; }

/* iOS keyboard fix */
input[type="tel"], input[type="text"], input[type="password"] {
  font-size: 16px !important;
  -webkit-appearance: none; appearance: none;
}
.btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ============================================================
   POPUP /wv (loader+попап) — стили специфичные для wv_popup_*_new.html
   ============================================================ */
.app {
  padding: 20px 16px 40px;
  max-width: 480px; margin: 0 auto;
  min-height: 100vh;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  color: #1c1c1e;
}

/* Push-нотификация iOS-стиль */
.push-notif {
  display: flex; gap: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 22px;
  box-shadow: 0 6px 22px rgba(91,108,255,.1), 0 1px 0 rgba(255,255,255,.6) inset;
  animation: pushSlide .4s ease-out;
  border: 1px solid rgba(255,255,255,.6);
}
@keyframes pushSlide { from { opacity:0; transform: translateY(-12px); } to { opacity:1; transform: translateY(0); } }
.push-logo { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; align-self: flex-start; }
.push-content { flex: 1; min-width: 0; }
.push-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.push-title { font-size: 13px; font-weight: 700; color: #1c1c1e; letter-spacing: .2px; }
.push-time { font-size: 12px; color: #8e8e93; }
.push-body { font-size: 14px; line-height: 1.36; color: #1c1c1e; word-wrap: break-word; }
.push-body strong { font-weight: 700; }

/* Loader card */
.loader-card {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: 0 12px 40px rgba(91,108,255,.1);
  border: 1px solid rgba(255,255,255,.6);
}
.loader-title {
  font-size: 18px; font-weight: 600; margin: 0 0 18px;
  text-align: center; color: #1c1c1e; letter-spacing: -.2px;
}
.step {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 6px; border-radius: 12px;
  font-size: 15px; color: #1c1c1e;
  transition: opacity .25s, background .3s;
}
.step.hidden { display: none; }
.step .icon {
  width: 24px; height: 24px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.step.pending .icon { background: transparent; border: 2px solid #d1d1d6; border-top-color: #5b6cff; animation: spin .8s linear infinite; }
.step.ok .icon { background: #34c759; border: none; }
.step.ok .icon::after { content:''; position:absolute; top:6px; left:7px; width:6px; height:11px; border-right:2.4px solid #fff; border-bottom:2.4px solid #fff; transform:rotate(45deg); }
.step.fail .icon { background: #ff3b30; border: none; }
.step.fail .icon::before, .step.fail .icon::after { content:''; position:absolute; top:50%; left:50%; width:13px; height:2.5px; background:#fff; border-radius:1px; }
.step.fail .icon::before { transform: translate(-50%,-50%) rotate(45deg); }
.step.fail .icon::after { transform: translate(-50%,-50%) rotate(-45deg); }
.step.fail { background: rgba(255,59,48,.06); }
.step .step-text { flex: 1; line-height: 1.32; }
.step .step-text .phone { color: #5b6cff; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Попап (overlay+card) внутри /wv */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.42);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
  animation: fadeIn .25s;
}
.overlay.visible { display: flex; }
.popup {
  background: #fff; border-radius: 24px;
  padding: 28px 22px 22px;
  max-width: 360px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  animation: popIn .32s cubic-bezier(.34,1.56,.64,1);
}
.popup .popup-icon {
  width: 80px; height: 80px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 8px 22px rgba(91,108,255,.36);
}
.popup .popup-title {
  font-size: 19px; font-weight: 600;
  margin: 0 0 12px; color: #1c1c1e; letter-spacing: -.2px;
}
.popup .popup-desc {
  font-size: 14.5px; line-height: 1.46;
  color: #3c3c43; margin: 0 0 12px;
}
.popup .popup-desc.muted { font-size: 13.5px; color: #6c6c70; margin-top: 4px; }
.popup .popup-phone {
  font-weight: 600; color: #1c1c1e;
  font-variant-numeric: tabular-nums; letter-spacing: .2px; white-space: nowrap;
}
.popup .popup-path {
  background: #f2f2f7; border-radius: 12px;
  padding: 11px 12px; margin: 12px 0 10px;
  font-size: 13.5px; color: #1c1c1e; line-height: 1.5; font-weight: 500;
}
.popup .popup-cta-hint {
  font-size: 13.5px; color: #3c3c43;
  margin: 6px 0 12px; text-align: center; font-weight: 500;
}
.popup .popup-hint {
  font-size: 12.5px; line-height: 1.4;
  color: #8e8e93; margin: 14px 0 0;
  text-align: center;
}
.popup .btn { width: 100%; }
.popup .btn-text { display: inline-block; }
.popup .btn-loader {
  display: none; width: 18px; height: 18px;
  border: 2.2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite;
  margin: 0 auto;
}
.popup .btn.loading .btn-text { display: none; }
.popup .btn.loading .btn-loader { display: block; }
