/* ============================================================================
   Payment Page — premium checkout. Дизайн-система: near-monochrome, один акцент,
   много воздуха, мягкая глубина, медленное «дорогое» движение. Light-first.
   Всё из системы: 8px-сетка, типо-шкала, единый easing.
   ============================================================================ */

:root {
  /* --- палитра --- */
  --canvas: #f4f4f6;
  --canvas-2: #eeeef1;
  --card: #ffffff;
  --ink: #0a0a0b;
  --ink-2: #55575e; /* вторичный текст */
  --ink-3: #8a8d95; /* третичный / подписи */
  --hairline: rgba(10, 10, 11, 0.08);
  --hairline-2: rgba(10, 10, 11, 0.06);
  --fill: #f5f5f7; /* поля/вторичные поверхности */
  --fill-hover: #ececef;
  --accent: #2f6bff; /* сдержанный синий — фокус/маркер/ссылки */
  --accent-soft: rgba(47, 107, 255, 0.12);
  --success: #17886a;
  --success-soft: rgba(23, 136, 106, 0.12);
  --danger: #b4423a;

  /* --- радиусы --- */
  --r-card: 26px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* --- тени (мягкие, многослойные, свет сверху) --- */
  --shadow-card: 0 1px 2px rgba(10, 10, 11, 0.04), 0 8px 24px rgba(10, 10, 11, 0.06),
    0 24px 60px rgba(10, 10, 11, 0.05);
  --shadow-soft: 0 1px 2px rgba(10, 10, 11, 0.05), 0 6px 18px rgba(10, 10, 11, 0.06);
  --shadow-pop: 0 12px 40px rgba(10, 10, 11, 0.16);

  /* --- движение --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 520ms;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter",
    "Segoe UI", Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c0d0f;
    --canvas-2: #101216;
    --card: #16181d;
    --ink: #ededef;
    --ink-2: #adb0b8;
    --ink-3: #8a8e98;
    --hairline: rgba(255, 255, 255, 0.09);
    --hairline-2: rgba(255, 255, 255, 0.06);
    --fill: #1e2127;
    --fill-hover: #242830;
    --accent: #5b8cff;
    --accent-soft: rgba(91, 140, 255, 0.16);
    --success: #37b394;
    --success-soft: rgba(55, 179, 148, 0.16);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 16px 50px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  /* тонкий ambient-свет сверху, не отвлекающий */
  background-image: radial-gradient(120% 60% at 50% -10%, var(--canvas-2) 0%, var(--canvas) 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  line-height: 1.5;
}

.app {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
}

/* --- карточка --- */
.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 36px 34px 28px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 520px) {
  .app {
    padding: 0;
    align-items: stretch;
  }
  .card {
    max-width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
  }
}

/* --- типографика --- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.title {
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
}
.subtle {
  color: var(--ink-2);
  font-size: 14px;
}
.tiny {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* --- шапка мерчанта --- */
.merchant {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.merchant .avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--card);
  display: grid;
  place-items: center;
  font-weight: 640;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex: none;
}
.merchant .m-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.merchant .m-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}
.secure {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.secure svg {
  width: 13px;
  height: 13px;
}

/* --- герой: сумма --- */
.amount {
  font-size: 46px;
  font-weight: 660;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.amount .cur {
  font-size: 24px;
  font-weight: 560;
  color: var(--ink-2);
  margin-left: 4px;
  letter-spacing: -0.01em;
}
.order-line {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14px;
}

/* --- прогресс-рейл --- */
/* Прогресс-рейка — РАЗДЕЛЕНА НА ШАГИ (сегменты), но живая: пройденные шаги залиты,
   текущий — частично; заливка растёт (transition, см. animateRail), у активного шага
   при обработке банком бежит мягкий блик. */
.rail {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 22px 0 4px;
}
.rail-seg {
  flex: 1;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--hairline);
  overflow: hidden;
}
.rail-seg > i {
  position: relative;
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ink);
  overflow: hidden;
  transition: width 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* processing (банк подтверждает — waiting/soft): по заливке активного шага бежит блик. */
.rail-seg.processing > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: rail-sheen 1.9s ease-in-out infinite;
}
@keyframes rail-sheen {
  0% {
    transform: translateX(-130%);
  }
  55%,
  100% {
    transform: translateX(130%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail-seg > i {
    transition: none;
  }
  .rail-seg.processing > i::after {
    animation: none;
  }
}

/* --- секции / переходы экранов --- */
.section {
  margin-top: 22px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-3);
  padding: 6px 10px 6px 6px;
  margin: -6px 0 8px -6px;
  border-radius: var(--r-pill);
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.back-btn:hover {
  color: var(--ink);
  background: var(--fill);
}
.back-btn svg {
  flex: none;
}
.screen {
  animation: screen-in var(--dur) var(--ease) both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- поля ввода --- */
.field {
  margin-top: 18px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.input::placeholder {
  color: var(--ink-3);
}
.input:focus {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* --- кнопки --- */
.btn {
  appearance: none;
  border: 0;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 160ms var(--ease), background 200ms var(--ease),
    box-shadow 200ms var(--ease), opacity 200ms var(--ease);
  user-select: none;
}
.btn:active {
  transform: scale(0.985);
}
.btn-primary {
  width: 100%;
  height: 54px;
  background: var(--ink);
  color: var(--card);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  opacity: 0.92;
}
.btn-primary[disabled] {
  opacity: 0.4;
  cursor: default;
}
.btn-ghost {
  width: 100%;
  height: 48px;
  background: var(--fill);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--fill-hover);
}
.btn-text {
  background: transparent;
  color: var(--ink-2);
  height: 40px;
  padding: 0 8px;
}
.btn-text:hover {
  color: var(--ink);
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-row .btn {
  flex: 1;
}
.stack {
  margin-top: 22px;
}
.spacer {
  flex: 1;
}

/* --- список банков --- */
.banks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
/* Карточка банка — ровная сетка: логотип | текст (2 строки) | действие. Фикс-высота,
   всё по центру по вертикали, длинные имена не ломают композицию (min-width:0 + nowrap). */
.bank {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--ink); /* button не наследует color — иначе имя банка = системный чёрный */
  cursor: pointer;
  text-align: left;
  transition: border-color 200ms var(--ease), background 200ms var(--ease),
    transform 160ms var(--ease), box-shadow 200ms var(--ease);
}
.bank:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.bank .logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex: none;
}
.bank .b-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.bank .b-name {
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bank .b-sub {
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink-3);
}
.bank .b-right {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
.bank .chev {
  color: var(--ink-3);
}
.bank[disabled],
.bank.disabled {
  cursor: default;
}
/* Приглушаем только логотип/бейдж, а не текст (иначе в тёмной теме название сливается). */
.bank.disabled .logo {
  opacity: 0.55;
}
.bank.disabled .b-name {
  color: var(--ink-2);
}
.bank.disabled:hover {
  transform: none;
  box-shadow: none;
}
.badge-soon {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--fill);
  border-radius: var(--r-pill);
  padding: 5px 11px;
}

/* --- QR-карточка --- */
.qr-wrap {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
/* Премиум-свечение ЗА окном QR — РЕАЛЬНЫЙ элемент (не ::after с z-index:-1 и не filter:blur —
   iOS Safari их не рендерит на подобных слоях). Чистый radial-gradient сам по себе мягкий;
   пульсируют только opacity + scale (композитные) => плавно и видно на любом устройстве. */
.qr-halo {
  position: absolute;
  left: 50%;
  top: calc(min(264px, 78vw) / 2);
  /* Размер-в-размер с QR-окном + та же скруглённость (22px) — свет исходит РОВНО из-за
     краёв/углов квадрата QR, а не кругом. box-shadow повторяет форму скруглённого квадрата. */
  width: min(264px, 78vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  background: transparent;
  box-shadow:
    0 0 34px 3px rgba(255, 255, 255, 0.42),
    0 0 82px 14px rgba(255, 255, 255, 0.16);
  pointer-events: none;
  /* Тень статична (значения не анимируем — это дёргало), пульсируют только opacity+scale. */
  animation: qr-halo-pulse 6s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}
@keyframes qr-halo-pulse {
  0%,
  100% {
    opacity: 0.26;
    transform: translate(-50%, -50%) scale(0.985);
  }
  50% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1.03);
  }
}
.qr-frame {
  width: 264px;
  max-width: 78vw;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(10, 10, 11, 0.05);
  position: relative;
  /* Синусоидный ease-in-out — «дыхание» без рывков; свечение — отдельный .qr-halo (см. .qr-wrap). */
  animation: qr-breathe 6s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}
.qr-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes qr-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.014);
  }
}
.qr-caption {
  margin-top: 16px;
  text-align: center;
  color: var(--ink-2);
  font-size: 13.5px;
  max-width: 300px;
}

/* --- инфо-строка / реквизиты --- */
.rows {
  margin-top: 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  font-size: 13.5px;
}
.row + .row {
  border-top: 1px solid var(--hairline-2);
}
.row .k {
  color: var(--ink-3);
}
.row .v {
  color: var(--ink);
  font-weight: 560;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- список инструкции (ровная таблица: номер сверху-слева, текст, равные отступы) --- */
.steps-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
}
.steps-list li + li {
  border-top: 1px solid var(--hairline-2);
}
.s-num {
  flex: none;
  width: 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.s-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.s-act {
  display: block;
}

/* --- guided wizard overlay --- */
.wizard {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(6, 7, 9, 0.965);
  backdrop-filter: blur(8px) saturate(112%);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  animation: fade-in 320ms var(--ease) both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.wizard-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 18px 12px;
  color: #fff;
}
.wizard-top .w-step {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}
.wizard-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.wizard-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  min-height: 0;
  overflow: hidden;
}
/* Карточка-скриншот: реальный скрин банка по его натуральному аспекту (без кропа),
   поэтому подходит любой скриншот (вертикальный/квадратный). Мягкая рамка-тень. */
.shot {
  position: relative;
  display: inline-block;
  line-height: 0;
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-pop);
  animation: phone-in var(--dur) var(--ease) both;
}
@keyframes phone-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(330px, 88vw);
  max-height: 62vh;
}
/* Интро-шаг: QR-превью (единый компонент, см. .qr-preview-*) + запасная эмблема. */
.wz-emblem {
  width: 96px;
  height: 96px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  animation: phone-in var(--dur) var(--ease) both;
}
.wz-emblem svg {
  width: 40px;
  height: 40px;
}
.wz-emblem-lg {
  width: 112px;
  height: 112px;
}
.wz-emblem-lg svg {
  width: 46px;
  height: 46px;
}
/* Финальный экран wizard — рисующаяся галочка на светлом круге. */
.wz-check {
  width: 100px;
  height: 100px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  animation: pop 700ms var(--ease) both;
}
.wz-check svg {
  width: 46px;
  height: 46px;
  stroke: #fff;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wz-check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 620ms 160ms var(--ease) forwards;
}

/* Spotlight: активная зона яркая, остальной скрин статично затемнён. Затемнение — через
   radial-gradient МАСКУ (мягкий feather-край, БЕЗ рамок/outline). Фон не двигается. */
.spot-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(6, 7, 9, 0.87);
  -webkit-mask: radial-gradient(
    ellipse var(--rx) var(--ry) at var(--cx) var(--cy),
    transparent 0,
    transparent 44%,
    #000 82%
  );
  mask: radial-gradient(
    ellipse var(--rx) var(--ry) at var(--cx) var(--cy),
    transparent 0,
    transparent 44%,
    #000 82%
  );
}
/* Круглый spotlight (для мелких целей типа «Поделиться») — радиус в vmin. */
.spot-mask.round {
  -webkit-mask: radial-gradient(circle var(--cr) at var(--cx) var(--cy), transparent 0, transparent 55%, #000 100%);
  mask: radial-gradient(circle var(--cr) at var(--cx) var(--cy), transparent 0, transparent 55%, #000 100%);
}
/* Пульсирует ТОЛЬКО активная зона: мягкое рассеянное свечение (не «фонарик»).
   Низкая яркость + крупный радиус + плавный многоступенчатый falloff. Без рамок/кружков. */
.spot-pulse {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 66%);
  will-change: opacity, transform;
  animation: spot-pulse 2.3s var(--ease) infinite;
}
@keyframes spot-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}
/* Скрытие приватных данных на реальном скрине (баланс) — frosted-блюр. */
.redact {
  position: absolute;
  pointer-events: none;
  border-radius: 8px;
  -webkit-backdrop-filter: blur(11px) brightness(0.82);
  backdrop-filter: blur(11px) brightness(0.82);
}
.wizard-bottom {
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  color: #fff;
}
.wizard-caption {
  text-align: center;
  max-width: 420px;
  margin: 0 auto 14px;
}
.wizard-caption h3 {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.wizard-caption p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  line-height: 1.5;
}
.wizard-actions {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.btn-ondark {
  background: #fff;
  color: #0a0a0b;
}
.btn-ondark:hover {
  opacity: 0.92;
}
.btn-ondark-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.btn-ondark-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* --- статус / ожидание --- */
.status-panel {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* Ожидание — спокойный «дышащий» узел с расходящимися кругами (радар) + мягкий glow.
   Не спиннер: без вращения, медленно, дорого. */
.wait-orb {
  width: 84px;
  height: 84px;
  border-radius: var(--r-pill);
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.wait-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: wait-radar 3s var(--ease) infinite;
}
.wait-ring:nth-child(2) {
  animation-delay: 1.5s;
}
@keyframes wait-radar {
  0% {
    transform: scale(0.55);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
.wait-core {
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px var(--accent-soft), 0 0 0 8px var(--accent-soft);
  animation: wait-breathe 3s var(--ease) infinite;
}
.wait-core svg {
  width: 24px;
  height: 24px;
}
@keyframes wait-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.wait-progress {
  margin-top: 24px;
  width: 190px;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--hairline);
  overflow: hidden;
  position: relative;
}
.wait-progress span {
  position: absolute;
  top: 0;
  height: 100%;
  width: 45%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: wait-sweep 2s var(--ease) infinite;
}
@keyframes wait-sweep {
  0% {
    left: -45%;
  }
  100% {
    left: 100%;
  }
}
/* «Не оплачивайте повторно» — спокойный акцент (не тревожный). */
.wait-warn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}
.wait-warn svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* --- успех --- */
.success-panel {
  padding-top: 8px;
}
.success-mark {
  width: 100px;
  height: 100px;
  border-radius: var(--r-pill);
  background: var(--success-soft);
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  /* Выразительная, «дорогая» зелёная галочка: мягкое зелёное свечение (без анимации свечения). */
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--success) 26%, transparent),
    0 0 40px 2px color-mix(in srgb, var(--success) 26%, transparent),
    0 20px 50px -14px color-mix(in srgb, var(--success) 55%, transparent);
  animation: pop 720ms var(--ease) both;
}
@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.success-mark svg {
  width: 52px;
  height: 52px;
  stroke: var(--success);
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-amount {
  font-size: 38px;
  margin: 10px 0 2px;
}
.success-mark path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 640ms 180ms var(--ease) forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Единый receipt-блок «чек придёт на email» — под кнопкой во всех финальных состояниях. */
.receipt-info {
  margin: 16px auto 0;
  max-width: 340px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 6px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
}
.receipt-info svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  opacity: 0.75;
}

/* --- trust badges --- */
.trust {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline-2);
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.trust .t {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.trust .t svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

/* --- спокойные состояния (skeleton / expired / error) --- */
.center {
  text-align: center;
}
.icon-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--r-pill);
  background: var(--fill);
  display: grid;
  place-items: center;
  margin: 6px auto 18px;
  color: var(--ink-2);
}
.icon-badge svg {
  width: 28px;
  height: 28px;
}
.skeleton {
  background: linear-gradient(100deg, var(--fill) 40%, var(--fill-hover) 50%, var(--fill) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.6s var(--ease) infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* уважение к настройкам движения */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* iOS QR save modal (long-press -> «Сохранить в Фото» / скриншот) */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 7, 9, 0.9);
  backdrop-filter: blur(8px) saturate(112%);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  animation: fade-in 260ms var(--ease) both;
}
/* --- ЕДИНОЕ QR-превью: кликабельный QR на главной + лайтбокс + интро wizard'а --- */
.qr-frame.qr-clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qr-frame.qr-clickable:active {
  transform: scale(0.985);
}
.qr-preview {
  overflow: auto;
}
.qr-preview-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-preview-img {
  width: min(86vw, 380px);
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: #fff;
  /* Дисплейный «паспарту»: QR чуть меньше, белые рамки чуть шире (сам PNG-файл не меняем —
     скачивается/сохраняется прежний крупный, который Сбер сканирует лучше). */
  padding: 22px;
  display: block;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  /* long-press iOS: разрешаем контекстное «Сохранить в Фото», убираем серую вспышку */
  -webkit-touch-callout: default;
  -webkit-tap-highlight-color: transparent;
  animation: phone-in var(--dur) var(--ease) both;
}
.qr-preview-hint {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  line-height: 1.4;
}
.qr-preview-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}
/* «Готово» — крупная, как основные кнопки чекаута (а не тонкая дефолтная). */
.qr-preview-card .btn-ondark {
  height: 54px;
  font-size: 16.5px;
  font-weight: 700;
  border-radius: 16px;
  margin-top: 6px;
}
/* Внутри wizard-stage превью чуть компактнее, чтобы оставить воздух под подпись/кнопку. */
.wizard-stage .qr-preview-img {
  width: min(64vw, 250px);
}
