/* Kenny FX — общие анимации и пиксельные элементы для всех страниц сайта.
   Подключается на каждой странице (<link rel="stylesheet" href="/kenny-fx.css?v=1">),
   а если ссылки нет — site-components.js подгружает его сам.
   Все классы с префиксом kfx-. Скрипт: блок «Kenny FX» в site-components.js (window.KennyFX). */

:root {
  --kfx-xp: #7EFC20;
  --kfx-xp-light: #C9FF6B;
  --kfx-xp-dark: #1D3D08;
  --kfx-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Появление при прокрутке ----------
   data-kfx="up" (по умолчанию) | "fade" | "zoom" | "drop" | "left" | "right"
   data-kfx-stagger на контейнере — дети появляются по очереди.
   Скрытие включается только когда скрипт отработал (html.kfx-on), так что без JS всё видно. */
html.kfx-on [data-kfx]:not([data-kfx-in]),
html.kfx-on [data-kfx-stagger]:not([data-kfx-in]) > * {
  opacity: 0;
}
[data-kfx][data-kfx-in],
[data-kfx-stagger][data-kfx-in] > [data-kfx-item] {
  animation: kfx-up 0.6s var(--kfx-ease) var(--kfx-d, 0ms) backwards;
}
[data-kfx="fade"][data-kfx-in] { animation-name: kfx-fade; }
[data-kfx="zoom"][data-kfx-in] { animation-name: kfx-zoom; }
[data-kfx="left"][data-kfx-in] { animation-name: kfx-left; }
[data-kfx="right"][data-kfx-in] { animation-name: kfx-right; }
[data-kfx="drop"][data-kfx-in] {
  animation-name: kfx-drop;
  animation-duration: 0.5s;
}
@keyframes kfx-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes kfx-fade { from { opacity: 0; } }
@keyframes kfx-zoom { from { opacity: 0; transform: scale(0.94); } }
@keyframes kfx-left { from { opacity: 0; transform: translateX(-28px); } }
@keyframes kfx-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes kfx-drop { from { opacity: 0; transform: translateY(-26px); } }

/* ---------- Пиксельные иконки ---------- */
.kfx-pix { display: inline-block; flex: 0 0 auto; }
.kfx-pixelated, .kfx-pixelated img { image-rendering: pixelated; }

/* ---------- Полоска опыта (как в Minecraft) ---------- */
.kfx-xpbar {
  position: relative;
  height: 12px;
  background: #262626;
  border: 2px solid #000;
  overflow: hidden;
}
.kfx-xpbar.big { height: 18px; }
.kfx-xpbar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--kfx-xp-light) 0 30%, var(--kfx-xp) 30% 70%, #4FB80E 70%);
  transform-origin: 0 50%;
  transition: transform 1.4s var(--kfx-ease);
}
.kfx-xpbar::after,
#kfx-xp::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 2px), rgba(0, 0, 0, 0.55) calc(10% - 2px), rgba(0, 0, 0, 0.55) 10%);
  pointer-events: none;
}

/* Прогресс прокрутки страницы — тонкая полоска опыта у верхнего края */
#kfx-xp {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 310;
  height: 4px;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}
#kfx-xp.on { opacity: 1; }
#kfx-xp i {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, var(--kfx-xp-light) 0 35%, var(--kfx-xp) 35%);
  box-shadow: 0 0 10px rgba(126, 252, 32, 0.55);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- Фон: пиксельная сетка и парящие шарики опыта ---------- */
.kfx-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
}
.kfx-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.kfx-orbs span {
  position: absolute;
  opacity: 0.55;
  animation: kfx-float 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes kfx-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@keyframes kfx-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Медленное «наплывание» фоновой картинки первого экрана */
.kfx-kenburns { animation: kfx-kenburns 14s var(--kfx-ease) both; }
@keyframes kfx-kenburns { from { transform: scale(1.08); } }

/* ---------- Надзаголовок раздела: оранжевый номер-блок ---------- */
.kfx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font: 400 14px/1 var(--font-pixel);
  color: var(--kenny-orange, #FE5E10);
}
.kfx-eyebrow b {
  font-weight: 400;
  color: #fff;
  background: var(--kenny-orange, #FE5E10);
  padding: 6px 7px 8px;
  box-shadow: inset 0 -3px 0 var(--kenny-orange-edge, #9B430E);
}
.kfx-eyebrow i {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--kenny-orange, #FE5E10);
  opacity: 0.6;
}

/* ---------- Навигация по разделам страницы ---------- */
.kfx-subnav {
  position: sticky;
  top: 68px;
  z-index: 60;
  background: rgba(14, 14, 14, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.kfx-subnav-in {
  display: flex;
  gap: 2px;
  max-width: 1264px;
  margin: 0 auto;
  padding: 0 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kfx-subnav-in::-webkit-scrollbar { display: none; }
.kfx-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 17px 12px 14px;
  border-bottom: 3px solid transparent;
  font: 400 14px/1 var(--font-pixel);
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}
.kfx-subnav a b { font-weight: 400; font-size: 11px; color: rgba(255, 255, 255, 0.35); }
.kfx-subnav a:hover { color: #fff; }
.kfx-subnav a.on { color: #fff; border-bottom-color: var(--kenny-orange, #FE5E10); }
.kfx-subnav a.on b { color: var(--kenny-orange, #FE5E10); }
.kfx-anchor { scroll-margin-top: 124px; }

/* ---------- Карточки и кнопки ---------- */
.kfx-card { position: relative; }
.kfx-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--kfx-line, var(--kenny-orange, #FE5E10));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--kfx-ease);
  pointer-events: none;
}
.kfx-card:hover::before { transform: scaleX(1); }

.kfx-slot {
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.2s var(--kfx-ease);
}
.kfx-card:hover .kfx-slot { transform: translateY(-3px) rotate(-4deg); }

/* Блик по кнопке при наведении */
.kfx-shine { position: relative; overflow: hidden; }
.kfx-shine::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-150%) skewX(-18deg);
  pointer-events: none;
}
.kfx-shine:hover::after { animation: kfx-shine 0.7s var(--kfx-ease); }
@keyframes kfx-shine { to { transform: translateX(325%) skewX(-18deg); } }

/* Пульсирующая плашка («Выгоднее всего» и т. п.) */
.kfx-pulse { animation: kfx-pulse 2.4s ease-in-out infinite; }
@keyframes kfx-pulse {
  0%, 100% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(254, 94, 16, 0.5); }
  50% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 0 0 6px rgba(254, 94, 16, 0); }
}
.kfx-bob { animation: kfx-bob 1.8s ease-in-out infinite; }

/* Свечение карточки в цвет тарифа */
.kfx-tier { --kfx-line: var(--kfx-tc, var(--kenny-orange, #FE5E10)); transition: box-shadow 0.3s ease; }
.kfx-tier:hover { box-shadow: 0 14px 40px -18px var(--kfx-tc, #FE5E10); }
.kfx-tier img { transition: transform 0.2s var(--kfx-ease); }
.kfx-tier:hover img { transform: translateY(-3px) rotate(-8deg) scale(1.1); }

/* Карточка перевода/сборки: обложка приближается, по ней проходит блик, кнопка «выпрыгивает» */
.kfx-pcard .kfx-pcard-img { transition: transform 0.5s var(--kfx-ease); }
.kfx-pcard:hover .kfx-pcard-img,
.kfx-pcard:focus-visible .kfx-pcard-img { transform: scale(1.06); }
.kfx-pcard-media { position: relative; overflow: hidden; }
.kfx-pcard-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 9;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-110%);
  pointer-events: none;
}
.kfx-pcard:hover .kfx-pcard-media::after { animation: kfx-sweep 0.9s var(--kfx-ease); }
@keyframes kfx-sweep { to { transform: translateX(110%); } }
.kfx-pcard .kfx-pop { transform: scale(0.86) translateY(6px); transition: transform 0.22s var(--kfx-ease); }
.kfx-pcard:hover .kfx-pop,
.kfx-pcard:focus-visible .kfx-pop { transform: none; }
.kfx-badge { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3); }

/* Чипы фильтров и вкладки */
.kfx-chip { transition: transform 90ms; }
.kfx-chip:active { transform: translateY(1px); }
.kfx-chip[aria-pressed="true"] { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28); }
.kfx-chip[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--kenny-orange, #FE5E10); }
.kfx-tabpane { animation: kfx-faq 0.32s var(--kfx-ease); }
.kfx-shot { animation: kfx-fade 0.35s ease; }

/* Пиксельный «хвостик» под заголовком раздела */
.kfx-h2line::after {
  content: '';
  display: block;
  width: 24px;
  height: 4px;
  margin-top: 14px;
  background: var(--kenny-orange, #FE5E10);
  box-shadow: 30px 0 0 color-mix(in srgb, var(--kenny-orange, #FE5E10) 50%, transparent), 60px 0 0 color-mix(in srgb, var(--kenny-orange, #FE5E10) 22%, transparent);
}
.kfx-h2line.center::after { transform: translateX(-30px); }
.kfx-h2line.center::after { margin-left: auto; margin-right: auto; }

/* Лёгкое парение (логотип на первом экране) */
.kfx-levitate { animation: kfx-float 6s ease-in-out infinite; }

/* Аватар в карточке участника команды */
.kfx-card:hover .kfx-avatar { transform: translateY(-3px) scale(1.08); }
.kfx-avatar { transition: transform 0.2s var(--kfx-ease); }

/* ---------- Бегущая лента ---------- */
.kfx-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.kfx-marquee-track {
  display: flex;
  gap: var(--kfx-gap, 16px);
  width: max-content;
  animation: kfx-marquee var(--kfx-speed, 60s) linear infinite;
  will-change: transform;
}
.kfx-marquee:hover .kfx-marquee-track { animation-play-state: paused; }
@keyframes kfx-marquee { to { transform: translateX(calc(-50% - var(--kfx-gap, 16px) / 2)); } }

/* ---------- Вопросы и ответы ---------- */
.kfx-faq-item { transition: border-color 160ms, background 160ms; }
.kfx-faq-item:hover { border-color: rgba(255, 255, 255, 0.14) !important; }
.kfx-faq-answer { animation: kfx-faq 0.28s var(--kfx-ease); }
@keyframes kfx-faq { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Окна: оплата подписки и скачивание лаунчера ---------- */
.kenny-pay-overlay,
#kenny-dl-overlay,
.kfx-overlay { animation: kfx-fade 0.18s ease; }
.kenny-pay-modal,
#kenny-dl-overlay > div,
.kfx-modal-box { animation: kfx-modal 0.3s var(--kfx-ease); }
@keyframes kfx-modal { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

/* ---------- Карточка преимущества: при наведении плавно появляется картинка ---------- */
.kfx-feat { overflow: hidden; isolation: isolate; }
.kfx-feat::before { z-index: 3; }
.kfx-feat-media {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.4s var(--kfx-ease), transform 0.6s var(--kfx-ease);
}
.kfx-feat-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.kfx-feat:hover .kfx-feat-media,
.kfx-feat:focus-within .kfx-feat-media { opacity: 1; transform: none; }
/* На телефоне наведения нет — картинка просто стоит сверху карточки */
@media (hover: none) {
  .kfx-feat-media { position: relative; inset: auto; z-index: auto; opacity: 1; transform: none; margin: -28px -26px 4px; aspect-ratio: 16 / 9; }
}

/* ---------- Первый экран главной: под ним сразу видны вкладки разделов ---------- */
:root { --kfx-subnav-h: 49px; }
/* Пока страница в самом верху, кнопка «Следить за новостями» стоит над вкладками, а не на них */
.kenny-news-btn { transition: filter 120ms, transform 120ms, translate 0.35s var(--kfx-ease) !important; }
html.kfx-at-top .kenny-news-btn { translate: 0 calc(-1 * var(--kfx-subnav-h) - 8px); }
.kfx-hero-fit {
  min-height: calc(100vh - var(--kfx-subnav-h)) !important;
  min-height: calc(100svh - var(--kfx-subnav-h)) !important;
}

/* ---------- Искры за курсором ---------- */
#kfx-trail { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 2147483000; pointer-events: none; overflow: hidden; contain: layout paint style; }
#kfx-trail i { position: absolute; left: 0; top: 0; display: block; opacity: 0; will-change: transform, opacity; }

/* ---------- Шапка ---------- */
.kfx-nav-link { position: relative; }
.kfx-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  background: var(--kenny-orange, #FE5E10);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s var(--kfx-ease);
}
.kfx-nav-link:hover::after,
.kfx-nav-link.is-active::after { transform: scaleX(1); }
.kfx-logo img { transition: transform 0.2s var(--kfx-ease); }
.kfx-logo:hover img { animation: kfx-bob 0.9s ease-in-out infinite; }

/* ---------- Подвал: полоска травы ---------- */
.kfx-footer { position: relative; }
.kfx-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  background:
    repeating-linear-gradient(90deg, #5DA83A 0 12px, #4C8F2E 12px 24px, #62B043 24px 36px, #4C8F2E 36px 48px) top / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, #6B4A2B 0 8px, #7A5433 8px 20px, #5E4125 20px 28px, #7A5433 28px 40px) bottom / 100% 8px no-repeat;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* ---------- «Легендарный сундук» (набор сборок студии) — картинку рисует /kenny-bundle.js в [data-kfx-chest] ----------
   Сундук покачивается; при наведении на карточку .kfx-chest-card крышка открывается, изнутри свет и искры. */
.kfx-chest { position: relative; display: block; width: 112px; height: 98px; animation: kfx-chest-bob 3.2s ease-in-out infinite; will-change: transform; }
.kfx-chest svg { position: absolute; left: 0; z-index: 1; width: 100%; overflow: visible; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.45)); }
.kfx-chest .kfx-chest-body { bottom: 0; height: 56px; }
.kfx-chest .kfx-chest-lid { top: 0; height: 42px; transform-origin: 4% 100%; transition: transform 0.45s var(--kfx-ease); }
.kfx-chest-glow {
  position: absolute;
  z-index: 0;
  left: 4%;
  right: 4%;
  top: 14%;
  height: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 170, 0.95), rgba(255, 194, 77, 0));
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s, transform 0.45s var(--kfx-ease);
}
.kfx-chest-spark {
  position: absolute;
  z-index: 2;
  left: 46%;
  top: 38%;
  width: 6px;
  height: 6px;
  background: #FFE3A0;
  box-shadow: 0 0 8px 2px rgba(255, 194, 77, 0.6);
  opacity: 0;
}
.kfx-chest-spark.s1 { --sx: -30px; --sy: -30px; }
.kfx-chest-spark.s2 { --sx: 2px; --sy: -46px; }
.kfx-chest-spark.s3 { --sx: 30px; --sy: -28px; }
.kfx-chest-card:hover .kfx-chest-lid { transform: translateY(-6px) rotate(-14deg); }
.kfx-chest-card:hover .kfx-chest-glow { opacity: 1; transform: none; }
.kfx-chest-card:hover .kfx-chest-spark { animation: kfx-chest-spark 1.3s var(--kfx-ease) infinite; }
.kfx-chest-card:hover .kfx-chest-spark.s2 { animation-delay: 0.3s; }
.kfx-chest-card:hover .kfx-chest-spark.s3 { animation-delay: 0.6s; }
@keyframes kfx-chest-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes kfx-chest-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1); }
}
/* На телефоне наведения нет — сундук сразу приоткрыт */
@media (hover: none) {
  .kfx-chest .kfx-chest-lid { transform: translateY(-4px) rotate(-9deg); }
  .kfx-chest-glow { opacity: 0.8; transform: none; }
}

/* ---------- Короткое сообщение внизу экрана ---------- */
.kfx-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 2147483001;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  font: 600 16px/1.35 system-ui, sans-serif;
  color: #F4EAD5;
  text-align: center;
  background: #140D09;
  border: 4px solid #0A0604;
  box-shadow: inset 0 -4px 0 #B97A1C, 6px 6px 0 rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
  animation: kfx-toast-in 0.35s var(--kfx-ease);
  transition: opacity 0.4s, transform 0.4s var(--kfx-ease);
}
.kfx-toast.out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes kfx-toast-in { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- Предупреждение перед покупкой серверной версии (/kenny-server-warn.js) ----------
   Цвета и шрифт заголовка страница задаёт переменными --kfx-warn-*; текст — шрифтом страницы. */
.kfx-warn-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 3, 0.8);
}
.kfx-warn-overlay.show { display: flex; animation: kfx-fade 0.18s ease; }
html.kfx-warn-open { overflow: hidden; }
.kfx-warn {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  color: var(--kfx-warn-text, #F4EAD5);
  background: var(--kfx-warn-bg, #231A13);
  border: 4px solid var(--kfx-warn-edge, #0A0604);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.08), inset -4px -4px 0 rgba(0, 0, 0, 0.4), 10px 10px 0 rgba(0, 0, 0, 0.55);
  animation: kfx-modal 0.3s var(--kfx-ease);
}
.kfx-warn-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.kfx-warn-ic {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 24px/1 system-ui, sans-serif;
  color: #fff;
  background: #C8202B;
  border: 3px solid var(--kfx-warn-edge, #0A0604);
  box-shadow: inset 2px 2px 0 #F2646A, inset -3px -3px 0 #7E1219;
}
.kfx-warn h3 {
  margin: 0;
  font-family: var(--kfx-warn-head-font, inherit);
  font-size: var(--kfx-warn-head-size, 22px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--kfx-warn-accent, #FFC24D);
}
.kfx-warn-body p { margin: 0 0 12px; font-size: var(--kfx-warn-size, 16px); line-height: 1.5; }
.kfx-warn-body b { color: var(--kfx-warn-accent, #FFC24D); }
.kfx-warn-note {
  padding: 10px 12px;
  color: var(--kfx-warn-muted, #C2AD8E);
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid #C8202B;
}
.kfx-warn-check { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 20px; cursor: pointer; font-size: var(--kfx-warn-size, 16px); line-height: 1.4; }
.kfx-warn-check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--kfx-warn-accent, #FFC24D); cursor: pointer; }
.kfx-warn-foot { display: flex; gap: 12px; flex-wrap: wrap; }
.kfx-warn-foot > * { flex: 1 1 180px; justify-content: center; }
.kfx-warn-foot [disabled] { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); transform: none; }

/* ---------- Обложка-логотип сборки (страница студии, Avaloria): логотип парит, за ним тёплое свечение, вокруг искры ---------- */
.kfx-pack-logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 22%;
  pointer-events: none;
}
.kfx-pack-logo-wrap.is-centered { padding-bottom: 0; }
.kfx-pack-logo {
  position: relative;
  width: 56%;
  max-width: 200px;
  aspect-ratio: 1;
  animation: kfx-pack-float 4.5s ease-in-out infinite;
  will-change: transform;
}
.kfx-pack-logo::before {
  content: '';
  position: absolute;
  inset: -22%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 244, 200, 0.95), rgba(255, 214, 130, 0));
  animation: kfx-pack-glow 3s ease-in-out infinite alternate;
}
.kfx-pack-logo img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 0 rgba(110, 50, 20, 0.35));
}
.kfx-pack-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #FFF6D8;
  box-shadow: 0 0 8px 2px rgba(255, 210, 120, 0.8);
  opacity: 0;
  animation: kfx-pack-twinkle 2.4s ease-in-out infinite;
}
.kfx-pack-spark.a { left: 17%; top: 20%; }
.kfx-pack-spark.b { right: 15%; top: 32%; animation-delay: 0.8s; }
.kfx-pack-spark.c { left: 26%; top: 58%; animation-delay: 1.6s; }
@keyframes kfx-pack-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes kfx-pack-glow { from { opacity: 0.45; transform: scale(0.92); } to { opacity: 1; transform: scale(1.06); } }
@keyframes kfx-pack-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }

/* Карточка «Легендарный сундук» в блоке сборок: сундук парит, крышка приоткрывается, изнутри свет и искры */
.kfx-pack-logo.is-chest { width: 62%; max-width: 210px; aspect-ratio: 112 / 98; }
.kfx-pack-logo.is-chest::before { background: radial-gradient(closest-side, rgba(255, 214, 110, 0.7), rgba(255, 170, 60, 0)); }
.kfx-pack-logo .kfx-chest { position: absolute; inset: 0; width: 100%; height: 100%; animation: none; }
.kfx-pack-logo .kfx-chest .kfx-chest-body { height: 57.2%; }
.kfx-pack-logo .kfx-chest .kfx-chest-lid { height: 42.8%; }
.kfx-chest.is-open .kfx-chest-lid { animation: kfx-chest-peek 3.2s ease-in-out infinite; }
.kfx-chest.is-open .kfx-chest-glow { animation: kfx-pack-glow 1.6s ease-in-out infinite alternate; }
.kfx-chest.is-open .kfx-chest-spark { animation: kfx-chest-spark 1.6s var(--kfx-ease) infinite; }
.kfx-chest.is-open .kfx-chest-spark.s2 { animation-delay: 0.5s; }
.kfx-chest.is-open .kfx-chest-spark.s3 { animation-delay: 1s; }
@keyframes kfx-chest-peek {
  0%, 100% { transform: translateY(-2px) rotate(-5deg); }
  50% { transform: translateY(-7px) rotate(-16deg); }
}
/* Четыре карточки сборок: в ряд, на планшете 2×2, на телефоне одна под другой */
.kfx-packs-row.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 24px !important; }
@media (max-width: 1100px) { .kfx-packs-row.is-4 { grid-template-columns: repeat(2, minmax(0, 320px)) !important; } }
@media (max-width: 640px) { .kfx-packs-row.is-4 { grid-template-columns: minmax(0, 340px) !important; } }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  :root { --kfx-subnav-h: 44px; }
  .kfx-subnav-in { padding: 0 10px; }
  .kfx-subnav a { font-size: 13px; padding: 15px 10px 12px; }
  .kfx-anchor { scroll-margin-top: 118px; }
}

/* ---------- Меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html.kfx-on [data-kfx]:not([data-kfx-in]),
  html.kfx-on [data-kfx-stagger]:not([data-kfx-in]) > * { opacity: 1; }
  [data-kfx][data-kfx-in],
  [data-kfx-stagger][data-kfx-in] > [data-kfx-item],
  .kfx-orbs span, .kfx-marquee-track, .kfx-pulse, .kfx-bob, .kfx-kenburns,
  .kfx-logo:hover img, .kfx-shine:hover::after, .kfx-faq-answer,
  .kfx-pcard:hover .kfx-pcard-media::after, .kfx-tabpane, .kfx-shot, .kfx-levitate,
  .kenny-pay-overlay, .kenny-pay-modal, #kenny-dl-overlay, #kenny-dl-overlay > div,
  .kfx-overlay, .kfx-modal-box, .kfx-chest, .kfx-toast, .kfx-warn-overlay.show, .kfx-warn,
  .kfx-pack-logo, .kfx-pack-logo::before, .kfx-pack-spark,
  .kfx-chest.is-open .kfx-chest-lid, .kfx-chest.is-open .kfx-chest-glow, .kfx-chest.is-open .kfx-chest-spark { animation: none; }
  .kfx-pcard .kfx-pcard-img, .kfx-pcard .kfx-pop { transition: none; }
  .kfx-xpbar-fill, .kfx-card::before, .kfx-nav-link::after, .kfx-feat-media { transition: none; }
  #kfx-trail { display: none; }
}
