/* Замена framer-motion: появление при загрузке и при скролле */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-animate {
  animation: fade-up 0.5s ease forwards;
  opacity: 0;
}
.hero-animate-delay-1 {
  animation-delay: 0.05s;
}
.hero-animate-delay-2 {
  animation-delay: 0.1s;
}
.hero-animate-delay-3 {
  animation-delay: 0.15s;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease;
}
.mobile-panel.is-open {
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
}

/* ЛК: выезжающая слева направо панель как в React (framer x: 100% → 0) */
.cabinet-mobile-drawer {
  pointer-events: none;
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
  will-change: transform;
}
.cabinet-mobile-drawer.is-open {
  pointer-events: auto;
  transform: translateX(0);
  opacity: 1;
}

/* ЛК: появление секций (Framer Motion → CSS), по `data-cabinet-page` */
@keyframes cabinet-lk-greeting-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cabinet-lk-block-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cabinet-lk-filters-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes cabinet-lk-row-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes cabinet-lk-card-mobile-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cabinet-guest-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Гостевой экран ЛК (как motion.div в React Cabinet) */
[data-cabinet-guest] .cabinet-guest-hero {
  opacity: 0;
  animation: cabinet-guest-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* —— Дашборд —— */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(2):not(.cabinet-lk-stats-row) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.08s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(2).cabinet-lk-stats-row {
  opacity: 1;
  transform: none;
  animation: none;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > .cabinet-lk-stats-row > .cabinet-lk-stat-card {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--cabinet-stat, 0) * 0.1s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.28s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.38s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.48s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.56s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(7) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.64s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > *:nth-child(8) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.72s;
}

/* —— Промокоды (PromoCodes.tsx) —— классы, не nth-child: в шаблоне иначе ломают порядок пробельные текстовые узлы */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-hero > h1 {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-hero > p {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.05s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-activate {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-list-heading {
  opacity: 0;
  animation: cabinet-lk-block-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.14s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 0 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 1 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 2 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 3 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 4 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.22s + 5 * 0.06s);
}

/* Промокоды ЛК: сообщение после «Применить» (как motion.p initial y:4 в PromoCodes.tsx) */
@keyframes cabinet-promo-msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
[data-promo-cabinet-msg].cabinet-promo-msg--visible {
  animation: cabinet-promo-msg-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* —— Партнёрская программа (Referral.tsx) —— */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.18s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] .cabinet-referral-stats > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + 0 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] .cabinet-referral-stats > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + 1 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] .cabinet-referral-stats > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + 2 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] .cabinet-referral-stats > *:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + 3 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] > *:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.6s;
}

/* —— Профиль (Profile.tsx) —— */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] > *:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] .cabinet-profile-grid > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] .cabinet-profile-grid > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.35s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] > *:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
}

/* —— История платежей (PaymentHistory.tsx) —— */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-filters-in 0.35s ease forwards;
  animation-delay: 0.1s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.15s;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 0 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 1 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 2 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 3 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 4 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 5 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row]:nth-child(7) {
  opacity: 0;
  animation: cabinet-lk-row-fade 0.35s ease forwards;
  animation-delay: calc(0.15s + 6 * 0.05s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 0 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 1 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 2 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 3 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 4 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 5 * 0.06s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card]:nth-child(7) {
  opacity: 0;
  animation: cabinet-lk-card-mobile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 6 * 0.06s);
}

/* —— Аккаунты (SavedAccounts.tsx — stagger карточек) —— */
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-greeting-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 0 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 1 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 2 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 3 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 4 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 5 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(7) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 6 * 0.08s);
}
[data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > *:nth-child(8) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + 7 * 0.08s);
}

/* ЛК: нажатие на основные кнопки (аналог whileTap) */
.cabinet-press {
  transition: transform 0.12s ease;
}
.cabinet-press:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page] > *,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="dashboard"] > .cabinet-lk-stats-row > .cabinet-lk-stat-card,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-hero > h1,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-hero > p,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-activate,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-list-heading,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="promo"] .cabinet-promo-cards > .cabinet-promo-card,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="referral"] .cabinet-referral-stats > *,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="profile"] .cabinet-profile-grid > *,
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] tbody tr[data-payment-row],
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="history"] [data-payment-mobile-list] > [data-payment-card],
  [data-cabinet-outlet].cabinet-outlet--enter > div[data-cabinet-page="accounts"] .cabinet-accounts-grid > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  [data-cabinet-guest] .cabinet-guest-hero {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  [data-promo-cabinet-msg].cabinet-promo-msg--visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cabinet-press:active {
    transform: none;
  }
}

/* ЛК: кнопки-иконки (копировать / поделиться) — transition + нажатие, как в React Referral */
.cabinet-icon-btn {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}
.cabinet-icon-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.cabinet-icon-btn:not(:disabled):active {
  transform: translateY(0) scale(0.96);
}
.cabinet-copy-btn.is-copied {
  background: rgba(54, 211, 153, 0.1) !important;
  border-color: rgba(54, 211, 153, 0.2) !important;
  color: #36d399 !important;
}
.cabinet-copy-hint {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    margin-top 0.2s ease;
}
.cabinet-copy-hint.is-visible {
  max-height: 3rem;
  opacity: 1;
  margin-top: 0.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .cabinet-icon-btn,
  .cabinet-copy-hint {
    transition: none !important;
  }
  .cabinet-icon-btn:not(:disabled):hover {
    transform: none;
    filter: none;
  }
  .cabinet-icon-btn:not(:disabled):active {
    transform: none;
  }
}

.dropdown-panel {
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.dropdown-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Шапка: стрелка у аккаунта — тонкий шеврон как в React (ChevronDown), не символ ▼ */
.account-dropdown-chevron {
  display: block;
  transition: transform 0.2s ease;
}
[data-account-trigger][aria-expanded="true"] .account-dropdown-chevron {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .account-dropdown-chevron {
    transition: none;
  }
}

/* Блог: список как в React BlogList.tsx */
.blog-page .blog-page-hero {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.blog-page[data-blog-ready] [data-blog-featured] .blog-card-featured {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(1) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.15s;
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(2) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 0.07s);
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(3) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 2 * 0.07s);
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(4) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 3 * 0.07s);
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(5) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 4 * 0.07s);
}
.blog-page[data-blog-ready] [data-blog-grid] > a:nth-child(6) {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + 5 * 0.07s);
}
.blog-card-featured {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.blog-card-featured:hover {
  border-color: rgba(255, 79, 163, 0.2) !important;
  box-shadow:
    0 0 0 1px rgba(255, 79, 163, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.3) !important;
}
.blog-card-featured-title,
.blog-card-featured .blog-card-read {
  transition: color 0.2s ease;
}
.blog-card-featured:hover .blog-card-featured-title,
.blog-card-featured:hover .blog-card-read {
  color: #ff78b9 !important;
}
.blog-card-featured:hover .blog-card-arrow--md {
  transform: translateX(4px);
  color: #ff78b9;
}
.blog-card {
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.blog-card:hover {
  border-color: rgba(255, 79, 163, 0.18) !important;
  background: #1a2130 !important;
}
.blog-card-title {
  transition: color 0.2s ease;
}
.blog-card:hover .blog-card-title {
  color: #ff78b9 !important;
}
.blog-card-arrow {
  display: block;
  flex-shrink: 0;
  color: #a9b3c3;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.blog-card:hover .blog-card-arrow {
  transform: translateX(4px);
  color: #ff78b9;
}
@media (prefers-reduced-motion: reduce) {
  .blog-page .blog-page-hero,
  .blog-page[data-blog-ready] [data-blog-featured] .blog-card-featured,
  .blog-page[data-blog-ready] [data-blog-grid] > a {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .blog-card-featured:hover .blog-card-arrow--md,
  .blog-card:hover .blog-card-arrow {
    transform: none;
  }
}

/* Страница статьи блога (BlogPost.tsx): вход блоков */
@keyframes blog-post-back-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.blog-post-back {
  color: #a9b3c3;
  transition: color 0.15s ease;
}
.blog-post-back:hover {
  color: #f5f7fb;
}
.blog-post-page--enter .blog-post-block--back {
  opacity: 0;
  animation: blog-post-back-in 0.3s ease forwards;
}
.blog-post-page--enter .blog-post-block--hero {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.05s;
}
.blog-post-page--enter .blog-post-block--body {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
.blog-post-page--enter .blog-post-block--cta {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}
.blog-post-page--enter .blog-post-block--related {
  opacity: 0;
  animation: cabinet-lk-block-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.25s;
}
.blog-related-card {
  transition: border-color 0.2s ease;
}
.blog-related-card-title {
  transition: color 0.2s ease;
}
.blog-related-card:hover {
  border-color: rgba(255, 79, 163, 0.18) !important;
}
.blog-related-card:hover .blog-related-card-title {
  color: #ff78b9 !important;
}
@media (prefers-reduced-motion: reduce) {
  .blog-post-page--enter .blog-post-block--back,
  .blog-post-page--enter .blog-post-block--hero,
  .blog-post-page--enter .blog-post-block--body,
  .blog-post-page--enter .blog-post-block--cta,
  .blog-post-page--enter .blog-post-block--related {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.account-dd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #a9b3c3;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.account-dd-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7fb;
}
.account-dd-item svg {
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.92;
}
.account-dd-cta {
  transition: background 0.15s ease;
}
.account-dd-cta:hover {
  background: rgba(255, 79, 163, 0.14) !important;
}
.account-dd-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #a9b3c3;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.account-dd-logout:hover {
  background: rgba(255, 100, 100, 0.07);
  color: #ff7070;
}

/* ЛК: одинаковая высота блока значения в карточках статистики (цифры и «3 дня назад») */
.cabinet-stat-label-row {
  min-height: 2rem;
  align-items: center;
}
.cabinet-stat-metric {
  min-height: 2.35rem;
  display: flex;
  align-items: flex-end;
  line-height: 1.2;
}

.cabinet-repeat-btn {
  width: 100%;
  justify-content: center;
}
@media (min-width: 640px) {
  .cabinet-repeat-btn {
    width: auto;
    align-self: flex-end;
  }
}

.region-panel {
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.region-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  /* Выше блока «Зачислено / К оплате» (тот же z-index у соседей — порядок DOM перекрывал список) */
  z-index: 50;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.faq-item.is-open {
  border-color: rgba(255, 79, 163, 0.25);
}
.faq-chevron {
  flex-shrink: 0;
  color: #a9b3c3;
  transition:
    transform 0.25s ease,
    color 0.2s ease;
}
.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: #ff4fa3;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease-in-out;
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-answer-inner {
  overflow: hidden;
}

.modal-backdrop {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-backdrop.is-visible {
  opacity: 1;
}
.modal-box {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-box.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Модалки на коротком экране: прокрутка содержимого, без вылезания за вьюпорт */
[data-modal-root] .modal-box {
  max-height: calc(100dvh - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-banner {
  transform: translateY(16px);
  opacity: 0;
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.32, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.32, 1);
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Нижний правый угол на md+; на мобилке — на всю ширину с отступами. Safe area под «чёлку» и home indicator */
.cookie-banner--dock {
  bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 768px) {
  .cookie-banner--dock {
    width: min(24rem, calc(100vw - 3rem));
  }
}

/* Промокод: плавное раскрытие полей (как motion height в TopUpForm) */
.promo-slide-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
  transition:
    grid-template-rows 0.44s cubic-bezier(0.16, 1, 0.36, 1),
    opacity 0.38s cubic-bezier(0.16, 1, 0.32, 1),
    margin-top 0.44s cubic-bezier(0.16, 1, 0.36, 1);
}
.promo-slide-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0.5rem;
  pointer-events: auto;
}
.promo-slide-panel-inner {
  overflow: hidden;
  min-height: 0;
}

/* Быстрые суммы — как TopUpForm.tsx (active + transition) */
.quick-amount-btn {
  position: relative;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition:
    background 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.quick-amount-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.07);
}
.quick-amount-btn.is-active {
  background: rgba(255, 79, 163, 0.14);
  border-color: rgba(255, 79, 163, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 79, 163, 0.1);
}
.quick-amount-btn:active {
  transform: scale(0.97);
}
.quick-amount-btn .qa-amount {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #d0d7e3;
  transition: color 0.2s ease;
}
.quick-amount-btn.is-active .qa-amount {
  color: #ff78b9;
}
.quick-amount-btn .qa-badge {
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.14s ease;
}
.quick-amount-btn:active .qa-badge {
  transform: scale(0.96);
}

@keyframes tier-badge-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
[data-tier-badge].tier-pop {
  transform-origin: right center;
  animation: tier-badge-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-tier-badge]:not(.hidden) {
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}

.hint-amount-line:not(.hidden) {
  animation: hint-amount-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes hint-amount-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Итоги формы — максимально плавная смена цифр и комиссии */
@keyframes sum-value-in {
  0% {
    opacity: 0.42;
    transform: translateY(1px);
  }
  45% {
    opacity: 0.88;
    transform: translateY(-0.35px);
  }
  78% {
    opacity: 0.99;
    transform: translateY(0.2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes sum-value-in-pay {
  0% {
    opacity: 0.42;
    transform: translateY(1.25px);
  }
  42% {
    opacity: 0.86;
    transform: translateY(-0.4px);
  }
  75% {
    opacity: 0.99;
    transform: translateY(0.15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes sum-rate-in {
  0% {
    opacity: 0.48;
    transform: translateY(0.5px);
  }
  55% {
    opacity: 0.94;
    transform: translateY(-0.2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.sum-value-enter {
  animation: sum-value-in 0.58s cubic-bezier(0.12, 1, 0.28, 1) forwards;
}
.sum-value-enter-pay {
  animation: sum-value-in-pay 0.66s cubic-bezier(0.12, 1, 0.28, 1) forwards;
}
.sum-rate-enter {
  animation: sum-rate-in 0.52s cubic-bezier(0.12, 1, 0.28, 1) forwards;
}

/* Полоса итогов: вертикальные линии с отступом от краёв ячейки (как в макете React) */
.form-summary-strip {
  padding-top: 2px;
  padding-bottom: 4px;
}
.form-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.form-summary-mid {
  position: relative;
  padding-left: 1rem;
  padding-right: 1rem;
}
.form-summary-mid::before,
.form-summary-mid::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.form-summary-mid::before {
  left: 0;
}
.form-summary-mid::after {
  right: 0;
}

.sum-commission-rate {
  line-height: 1.2;
}
[data-sum-credited],
[data-sum-commission],
[data-sum-pay] {
  vertical-align: top;
  transition: color 0.45s cubic-bezier(0.12, 1, 0.28, 1);
}
[data-sum-commission-rate] {
  transition: color 0.52s cubic-bezier(0.12, 1, 0.28, 1);
}

.sum-pay-gradient {
  background: linear-gradient(90deg, #ff4fa3, #ff78b9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@keyframes amount-field-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 79, 163, 0.22);
  }
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}
[data-field-amount].amount-field-flash {
  animation: amount-field-flash 0.42s ease;
}

/* ЛК (static-site): вертикальные отступы слоя контента — в сжатом styles.css нет pt-8 / lg:pt-14 и т.п. из cabinet-layout.js */
[data-cabinet-outlet] {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 1024px) {
  [data-cabinet-outlet] {
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
  }
}
