.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity .2s ease-in;
  z-index: 1050;
}

.modal__content {
  position: relative;
  width: 100%;
  max-width: 380px;
  font-size: 15px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .08);
  overflow: hidden;
  transform: translateY(8px) scale(.98);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* Праздничная «вспышка» сверху модалки */
.modal__content::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 460px;
  height: 280px;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(203, 17, 171, .22) 0%, rgba(111, 45, 189, .15) 35%, rgba(0, 119, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.modal__body { position: relative; z-index: 1; }

.modal__show .modal__backdrop {
  opacity: 1;
  pointer-events: auto;
}

.modal__show .modal__content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__header { display: none; }

.modal__body {
  position: relative;
  flex: 1 1 auto;
  padding: 24px 20px 18px;
  overflow: auto;
  color: #000000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  font-size: 15px;
  text-align: center;
}

.modal__body p { margin: 0 0 6px; }
.modal__body p:last-child { margin-bottom: 0; }

.modal__btn-close {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 16px 16px;
  padding: 13px 18px;
  width: calc(100% - 32px);
  background: linear-gradient(90deg, #0077ff 0%, #6f2dbd 50%, #cb11ab 100%);
  background-size: 200% 100%;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1px;
  box-shadow:
    0 6px 18px rgba(111, 45, 189, .35),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: background-position .25s ease, transform .12s ease, box-shadow .2s ease;
  user-select: none;
  min-height: 46px;
  z-index: 1;
}

.modal__btn-close:hover,
.modal__btn-close:focus {
  background-position: 100% 0;
  text-decoration: none;
  color: #fff;
  box-shadow:
    0 8px 22px rgba(203, 17, 171, .42),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

.modal__btn-close:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(111, 45, 189, .35);
}

/* === Rich modal content (VK-style) === */
.m-brands {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eef0f4 100%);
  border-radius: 100px;
  margin-bottom: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 2px 6px rgba(15, 31, 58, .08),
    0 0 0 1px rgba(15, 31, 58, .04);
}

.m-brands img {
  height: 40px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 31, 58, .14);
}

.m-icon {
  width: 72px;
  height: 72px;
  margin: 2px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, #ffffff 0%, #f3e6ff 45%, #e7d2ff 100%);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(203, 17, 171, .08),
    0 8px 22px rgba(111, 45, 189, .25),
    inset 0 0 0 1px rgba(255, 255, 255, .9);
  animation: mPop .35s cubic-bezier(.34, 1.56, .64, 1) both, mFloat 3.2s ease-in-out 0.4s infinite;
}

@keyframes mFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.m-icon--small {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
}

@keyframes mPop {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.m-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 0 0 4px;
  background: linear-gradient(90deg, #0077ff 0%, #6f2dbd 50%, #cb11ab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.18;
}

.m-title--sm {
  font-size: 19px;
}

.m-subtitle {
  font-size: 14px;
  color: #555a64;
  margin: 0 0 14px;
  line-height: 1.4;
}

.m-subtitle strong { color: #000000; font-weight: 600; }

.m-stats {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 6px;
  margin: 14px 0 12px;
  text-align: center;
}

.m-stat {
  background: #f0f1f3;
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.m-stat--accent {
  background: #e5f0ff;
}

.m-stat__num {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: #000000;
  line-height: 1.1;
  white-space: nowrap;
}

.m-stat--accent .m-stat__num {
  color: #0077ff;
  font-size: 18px;
}

.m-stat__cur {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
}

.m-stat__label {
  font-size: 11px;
  color: #818c99;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.25;
}

.m-cta-hint {
  font-size: 13px;
  color: #818c99;
  margin: 6px 0 0;
  line-height: 1.4;
}

/* ───────── Official / banking style ───────── */

.m-brands--official {
  gap: 10px;
  padding: 8px 16px;
  margin-bottom: 22px;
}
.m-brands--official img { height: 28px; border-radius: 6px; }
.m-brands__sep {
  color: #a1a8b2;
  font-weight: 400;
  font-size: 14px;
  user-select: none;
}

.m-shield {
  width: 76px;
  height: 76px;
  margin: 2px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(0, 119, 255, .08),
    0 6px 18px rgba(0, 119, 255, .18),
    inset 0 0 0 1px rgba(15, 31, 58, .04);
  animation: mPop .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

.m-title--official {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 0 0 6px;
  background: none;
  -webkit-text-fill-color: initial;
  color: #000;
  line-height: 1.25;
}

.m-subtitle--official {
  font-size: 14px;
  color: #5a6470;
  margin: 0 0 18px;
  line-height: 1.45;
}

.m-cert {
  margin: 4px auto 16px;
  text-align: center;
}
.m-cert__img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 12px;
  filter: drop-shadow(0 8px 22px rgba(111, 45, 189, .25));
  animation: mCertPop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes mCertPop {
  0%   { transform: scale(.7) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.m-cert__source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #22a06b;
  font-weight: 600;
}

.m-amount-card {
  background: linear-gradient(180deg, #f5f9ff 0%, #eef4ff 100%);
  border: 1px solid rgba(0, 119, 255, .15);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 14px;
  text-align: center;
}
.m-amount-card__label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}
.m-amount-card__value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #0a0a0a;
  line-height: 1;
  margin-bottom: 8px;
}
.m-amount-card__cur {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}
.m-amount-card__source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #22a06b;
  font-weight: 600;
}

.m-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f7f8fa;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.m-period__label { color: #6b7280; }
.m-period__value {
  font-weight: 600;
  color: #0a0a0a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

.m-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  color: #818c99;
}
.m-meta__lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #22a06b;
  font-weight: 500;
}
.m-meta__sep { color: #d0d4db; }
.m-meta__link {
  color: #818c99;
  text-decoration: underline;
  text-decoration-color: rgba(129, 140, 153, .35);
  text-underline-offset: 2px;
}
.m-meta__link:hover { color: #0077ff; }

/* ───────── Compact welcome modal ───────── */

.modal__content--compact { max-width: 340px; }
.modal__content--compact .modal__body { padding: 18px 18px 12px; }

.mc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f1f4;
  animation: mPop .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* Wordmark внутри текстовой колонки модала (над заголовком, слева) */
.mc-head__wordmark {
  display: block;
  width: 110px;
  height: auto;
  margin-bottom: 3px;
}
.mc-head__shield {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(0, 119, 255, .08),
    0 2px 6px rgba(0, 119, 255, .14),
    inset 0 0 0 1px rgba(15, 31, 58, .04);
  flex-shrink: 0;
}
/* Verified-badge: фирменная "звёздочка с галочкой" — без белой подложки, чтобы бэйдж читался как полноцветный значок */
.mc-head__shield--verified {
  background: transparent;
  box-shadow: 0 2px 6px rgba(111, 45, 189, .22);
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Logo-badge: используется кастомный PNG-значок Wildberries */
.mc-head__shield--logo {
  background: transparent;
  box-shadow: none;
  width: 56px;
  height: 56px;
  border-radius: 0;
  overflow: visible;
}
.mc-head__shield--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(15, 31, 58, .15));
}
.mc-head__text { min-width: 0; }
.mc-head__title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -.1px;
  line-height: 1.2;
}
.mc-head__sub {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
  margin-top: 2px;
}

.mc-amount {
  text-align: left;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f9 100%);
  border: 1px solid rgba(15, 31, 58, .06);
  border-radius: 10px;
  margin-bottom: 10px;
}
.mc-amount__label {
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.mc-amount__value {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.8px;
  color: #0a0a0a;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mc-amount__cur {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -.2px;
}

.mc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #f7f8fa;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.mc-row__label { color: #6b7280; }
.mc-row__value {
  font-weight: 600;
  color: #0a0a0a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

/* CTA-блок: вместо технического "период активации" — призыв к действию */
.mc-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(0, 119, 255, .08) 0%, rgba(111, 45, 189, .08) 60%, rgba(203, 17, 171, .08) 100%);
  border: 1px solid rgba(0, 119, 255, .14);
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.25;
  animation: mctaPulse 2.4s ease-in-out infinite;
}
.mc-cta__arrow {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0077ff 0%, #6f2dbd 100%);
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(111, 45, 189, .28);
  animation: mctaArrow 1.4s ease-in-out infinite;
}
.mc-cta__text {
  letter-spacing: -.2px;
  /* "прямо сейчас" должны переноситься вместе, чтобы не зависало одно "сейчас" на второй строке */
}

/* На узких экранах ужимаем ещё, чтобы фраза влезала в одну строку */
@media (max-width: 380px) {
  .mc-cta {
    gap: 6px;
    padding: 9px 10px;
    font-size: 12px;
  }
  .mc-cta__arrow { width: 18px; height: 18px; }
  .mc-cta__arrow svg { width: 11px; height: 11px; }
}
@keyframes mctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111, 45, 189, .0); }
  50%      { box-shadow: 0 0 0 4px rgba(111, 45, 189, .06); }
}
@keyframes mctaArrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(2px); }
}

.mc-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #818c99;
  padding-bottom: 2px;
}
.mc-meta__lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #22a06b;
  font-weight: 500;
}
.mc-meta__sep { color: #d0d4db; }
.mc-meta__link {
  color: #818c99;
  text-decoration: underline;
  text-decoration-color: rgba(129, 140, 153, .35);
  text-underline-offset: 2px;
}
.mc-meta__link:hover { color: #0077ff; }

/* Подтянуть кнопку под компактный модал */
.modal__content--compact .modal__btn-close {
  margin: 4px 14px 14px;
  width: calc(100% - 28px);
  padding: 11px 16px;
  font-size: 15px;
  min-height: 42px;
  border-radius: 10px;
}

/* Убрать декоративную «вспышку» сверху — компакт-модал не использует */
.modal__content--compact::before { display: none; }

/* ───────── Preloader (full-screen, до window.load) ───────── */

html.wb-no-scroll, html.wb-no-scroll body { overflow: hidden; }

.wb-preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483647; /* выше любого модала */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #cb11ab 0%, #7b3bd6 100%);
  color: #ffffff;
  opacity: 1;
  transition: opacity .35s ease;
  -webkit-font-smoothing: antialiased;
}

.wb-preloader.is-hiding { opacity: 0; pointer-events: none; }

.wb-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  animation: wbPreLogo .6s ease-out both;
}

.wb-preloader__wordmark {
  display: block;
  width: 200px;
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .15));
}

.wb-preloader__ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #ffffff;
  animation: wbPreSpin .9s linear infinite;
}

@keyframes wbPreSpin {
  to { transform: rotate(360deg); }
}
@keyframes wbPreLogo {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
