/* ======================================================================
   DonateTeam — GAME.CSS
   Стили страницы игры: хлебные крошки, шапка, каталог товаров, корзина,
   описание/SEO, переключатель режима и модалка, мобильный док и шит.

   Структура файла:
   0) Токены/алиасы (game-*)
   1) База
   2) Навигация (крошки + переключатель режима)
   3) Шапка игры (лого, тайтл, фильтры)
   4) Сетка/карточки товаров
   5) Корзина (ПК) + состояния
   6) Описание + SEO-блок
   7) Переключатели режима (кнопки/чип)
   8) Модалка выбора режима
   9) Мобильный док-бар
   10) Мобильный нижний шит корзины
   11) Доп.правила: ховеры, юридические страницы, шрифты в контролах
   12) Адаптив (порядок брейкпоинтов сохранён)
   ====================================================================== */


/* ========== 0) TOKENS / АЛИАСЫ ДЛЯ СТРАНИЦЫ ИГРЫ ===================== */
:root{
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Jura", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-accent:  "Jura", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --game-bg: var(--bg, #0f0f0f);
  --game-panel: var(--panel, #151515);
  --game-panel-2: var(--panel-2, #111111);
  --game-text: var(--text, #fff);
  --game-muted: var(--muted, #bdbdbd);

  --game-brand: var(--brand, #a75eff);
  --game-brand-2: var(--brand-2, #8a3df6);
  --game-brand-soft: var(--brand-soft, rgba(167,94,255,.35));

  --card-accent: var(--game-brand);
  --card-accent-2: var(--game-brand-2);
  --card-accent-soft: color-mix(in srgb, var(--card-accent) 35%, transparent);

  --game-border: var(--border-soft, 1px solid rgba(255,255,255,.06));
  --game-shadow: var(--card-shadow, 0 8px 24px rgba(0,0,0,.35));

  --game-radius: var(--radius, 16px);
  
  /* Активное состояние кнопок (переопределяем токены для использования game-* переменных) */
  --active-button-border: 1.5px solid var(--game-brand);
  --active-button-shadow: 
    0 0 0 2px var(--game-brand-soft),
    0 0 0 1.5px var(--game-brand) inset,
    0 0 14px var(--game-brand-soft);
  
  /* Ховер-эффекты для кнопок (с game-* переменными) */
  /* Для неактивных кнопок при hover - только яркая рамка, без внешнего свечения */
  --button-hover-border-only:
    inset 0 0 0 1.5px var(--game-brand);
  /* Для активных кнопок при hover - рамка + свечение */
  --active-button-hover:
    inset 0 0 0 1.5px var(--game-brand),
    0 0 14px var(--game-brand-soft);
  --active-button-hover-soft:
    inset 0 0 0 1px var(--game-brand),
    0 0 8px var(--game-brand-soft);
  --active-button-hover-enhanced:
    0 0 20px var(--game-brand-soft),
    0 0 30px var(--game-brand-soft);
  
  /* Крестики закрытия и кнопки оплаты используют токены из tokens.css напрямую */
  
  /* Правила для правильного отображения бордюра без артефактов */
  --button-border-base: 1px solid rgba(255,255,255,.08);
  /* При hover делаем border того же цвета, что и фон, чтобы он не был виден */
  --button-border-hover: 1px solid var(--game-panel-2);
  /* При hover используем только box-shadow для эффекта бордюра */
  --button-hover-shadow: 
    inset 0 0 0 1px var(--game-brand),
    0 0 8px var(--game-brand-soft);

  --game-h1: 44px; --game-h2: 34px; --game-h3: 22px;
  --game-text-lg: 18px; --game-text-md: 16px; --game-text-sm: 14px;

  --game-lh-base: 1.55;

  /* Локальные алиасы (не конфликтуют с глобалкой) */
  --page-x: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius-xl: 16px;

  /* UI-шрифт, чтобы не ругался на var(--font-ui) */
  --font-ui: var(--font-accent);

  /* Минимальная ширина товарной карточки в сетке */
  --card-min: 220px;

  /* Тени/высоты, чтобы не было undefined переменных */
  --elev-2: 0 16px 38px rgba(0,0,0,.45);

  /* Крупный текст для заголовков корзины */
  --game-text-xl: 20px;

}

/* ========== 1) БАЗА =================================================== */
body{ font-family: var(--font-body); }
.page-title,.faq-title,.desc-title,.footer-title{ font-family: var(--font-heading); }
.num,.btn-pay,.filter-btn,.mode-btn,.mode-chip,.counter .count{ font-family: var(--font-accent); }
[hidden]{ display:none !important; }


/* ========== 2) НАВИГАЦИЯ (крошки + переключатель режима) ============== */
.navigation{ margin-block-start: var(--space-4); margin-block-end: var(--space-4); padding-bottom: 0; }
.navigation .page-1400{
  display: flex; align-items: center; justify-content: space-between; height: 35px;
}

/* Когда не влазит в одну строку - две строки по центру */
.navigation .page-1400.is-stacked{
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  gap: var(--space-4) !important;
}
.navigation .page-1400.is-stacked .nav-crumbs{
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  flex: 0 0 auto !important;
}
.navigation .page-1400.is-stacked .mode-switch,
.navigation .page-1400.is-stacked #nav-mode-switch{
  margin-left: 0 !important;
  margin-right: 0 !important;
  flex: 0 0 auto !important;
}

/* Слева — хлебные крошки */
.nav-crumbs{ display: flex; align-items: center; height: 100%; }

/* Ссылки/разделители */
.navigation-link, .navigation-current, .navigation-sep{
  display: flex; align-items: center; height: 100%;
  font-size: 20px; line-height: 1;
}
.navigation-link{
  font-weight: 700; color: #fff; text-decoration: none !important;
  transition: color .25s ease, filter .25s ease;
}
.navigation-link:hover{
  color: var(--game-brand);
  text-shadow: none;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--game-brand) 45%, transparent));
}
.navigation-current{ color:#fff; font-weight:700; }
.navigation-sep{ margin-inline: var(--space-2); color: var(--game-muted); }

/* Справа — переключатель режима в хедере */
.navigation .mode-switch{ margin-left: auto; }
#nav-mode-switch .mode-btn[data-mode="inapp"],
#nav-mode-switch .mode-btn[data-mode="web"]{
  width: 110px !important; min-width: 110px; white-space: nowrap;
  height: 35px; padding: 8px 20px !important; display:flex; align-items:center; justify-content:center;
  font-size: 14px; line-height: 1;
  
}


/* ========== 3) ШАПКА ИГРЫ ============================================ */
.game-header{ display:flex; align-items:flex-start; gap:var(--space-6); margin-bottom:var(--space-8); }
.game-header-content{ flex:1; }
.page-title{ font-size:var(--game-h2); line-height:1.2; font-weight:700; color:var(--game-text); margin:0 0 var(--space-4) 0; text-align:left; }
.page-title .hdr-br{ display:block; }
.game-logo{ width:120px; height:120px; border-radius:var(--game-radius); object-fit:cover; flex-shrink:0; }
.header-actions{ display:flex; flex-wrap:wrap; gap:var(--space-3); }

.filter-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:var(--space-3) var(--space-5);
  font-size:var(--game-text-md); color:var(--game-text);
  background:var(--game-panel-2); 
  border: none; /* Убираем border полностью */
  border-radius:var(--game-radius);
  /* Используем box-shadow для базового border вместо реального border */
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
  transition: all 0.2s ease;
  font-weight: 600;
  position: relative;
}
.filter-btn:hover:not(.active){ 
  /* Для неактивных кнопок при hover - только яркая рамка, без внешнего свечения */
  box-shadow: var(--button-hover-border-only);
  color: var(--game-brand);
  text-shadow: 0 0 8px var(--game-brand-soft);
}
/* Усиление свечения при hover для активных кнопок */
.filter-btn.active:hover {
  box-shadow:
    inset 0 0 0 1.5px var(--game-brand),
    0 0 14px var(--game-brand-soft),
    var(--active-button-hover-enhanced);
}
.filter-btn:active:not(.active){ transform: translateY(1px); }
.filter-btn.active{ 
  background:var(--game-panel-2); 
  border: none !important; /* Полностью убираем border */
  color:var(--game-brand);
  font-weight: 700;
  text-shadow: 0 0 12px var(--game-brand-soft), 0 0 20px var(--game-brand-soft);
  cursor: default;
  position: relative;
  /* Интенсивный яркий бордюр и свечение, как у поиска */
  box-shadow:
    inset 0 0 0 1.5px var(--game-brand),
    0 0 14px var(--game-brand-soft);
}

/* ========== 3.1) ШАПКА: АДАПТАЦИЯ ПО КОЛИЧЕСТВУ ФИЛЬТРОВ ============== */

/* 1 фильтр: центрирован, ограниченная ширина */
.header-actions[data-filters-count="1"]{
  justify-content: center;
}
.header-actions[data-filters-count="1"] .filter-btn{
  max-width: 200px;
  width: auto;
  min-width: 140px;
}

/* 2 фильтра: в ряд на десктопе, 2 колонки на мобильных */
.header-actions[data-filters-count="2"]{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.header-actions[data-filters-count="2"] .filter-btn{
  flex: 0 1 auto;
  min-width: 0;
}

/* 3 фильтра: в ряд на десктопе, адаптивно на мобильных */
.header-actions[data-filters-count="3"]{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.header-actions[data-filters-count="3"] .filter-btn{
  flex: 0 1 auto;
  min-width: 0;
}

/* 4 фильтра: как есть (без специальных правил, используем базовые стили) */


/* ========== 4) СЕТКА / КАРТОЧКИ ТОВАРОВ =============================== */
.main-content{ display:flex; gap:var(--space-5); }
.products{
  display:grid; flex:1 1 auto; gap:var(--space-6);
  grid-template-columns:repeat(auto-fill, minmax(var(--card-min), 1fr));
}

/* Карточка товара */
.product-card{
  --card-accent: var(--game-brand);
  --card-accent-2: var(--game-brand-2);
  --card-accent-soft: color-mix(in srgb, var(--card-accent) 35%, transparent);
  position:relative; display:flex; flex-direction:column; gap:var(--space-3);
  text-align:center; overflow:hidden; z-index:0;
  padding:var(--space-5) var(--space-4) var(--space-4);
  background:var(--game-panel); border:var(--game-border);
  border-radius:var(--game-radius); box-shadow:var(--game-shadow);
  transition: box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
.product-card::before{ /* внутренняя окантовка */
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset;
}
.product-card::after{ /* свечение при hover/focus */
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  opacity:0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0) inset,
    0 0 0 0 color-mix(in srgb, var(--game-brand) 0%, transparent),
    0 0 0 0 color-mix(in srgb, var(--game-brand) 0%, transparent);
  transition: opacity .22s ease, box-shadow .22s ease, filter .22s ease;
}
.product-card:hover{
  box-shadow:var(--elev-2);
  border-color: color-mix(in srgb, var(--game-brand) 45%, #2e2e2e);
  background: color-mix(in srgb, var(--game-panel) 94%, var(--game-brand) 6%);
}
.product-card:hover::after,
.product-card:focus-visible::after{
  opacity:1;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--game-brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 0 2px color-mix(in srgb, var(--game-brand) 24%, transparent),
    0 16px 38px color-mix(in srgb, var(--game-brand) 22%, transparent);
}
.product-card:focus-visible{ outline:none; }

@keyframes shimmer{ 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Медиа-подиум */
.card-media{
  position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden;
  aspect-ratio:4/3; border-radius:var(--game-radius); border:var(--game-border);
  background:
    radial-gradient(65% 55% at 50% 15%, color-mix(in srgb, var(--card-accent) 18%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
}
.card-media::after{
  content:""; position:absolute; inset:auto 8% 8% 8%; height:16%; border-radius:50%;
  background:radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--card-accent) 25%, transparent), transparent 70%);
  filter:blur(12px); pointer-events:none;
}
.card-media.is-loading::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04));
  animation:shimmer 1.1s linear infinite; border-radius:inherit;
}
.card-media img{
  width:82%; height:82%; object-fit:contain;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.35));
  transition:transform .25s ease;
}
.product-card:hover .card-media img{ transform:none; } /* без масштабирования */

/* Скрытые товары (только в режиме админа) */
.card-media--no-image{
  background:
    radial-gradient(60% 46% at 50% 18%, color-mix(in srgb, var(--card-accent) 14%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
}
.card-media__placeholder{
  width:100%;
  height:100%;
}
.product-card--hidden{
  opacity: 0.65;
  border-color: rgba(255, 193, 7, 0.3);
  position: relative;
}
.product-card--hidden::before{
  box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2) inset;
}
.product-card__hidden-badge{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* Подсветка товаров с activeUntil */
.product-card--active-until{
  position: relative;
  border-color: rgba(139, 92, 246, 0.4) !important;
  overflow: visible; /* чтобы плашка с датой при наведении не обрезалась */
}
.product-card--active-until::before{
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}
/* Карточки с подсказкой условий покупки (наборы) — обводка как у часиков (фиолетовая) */
.product-card--purchase-hint{
  position: relative;
  border-color: rgba(139, 92, 246, 0.4) !important;
  overflow: visible;
}
.product-card--purchase-hint::before{
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.product-card--expired{
  opacity: 0.7;
  border-color: rgba(239, 68, 68, 0.4) !important;
}
.product-card--expired::before{
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) inset;
}

/* Бейдж с часами для товаров с activeUntil */
.product-card__active-until-badge{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: help;
  transition: background 0.2s ease, transform 0.2s ease;
}
.product-card--expired .product-card__active-until-badge{
  background: rgba(239, 68, 68, 0.9);
}
.product-card__active-until-badge:hover{
  background: rgba(139, 92, 246, 1);
}
.product-card__active-until-badge:active{
  transform: scale(0.98);
}
.product-card--expired .product-card__active-until-badge:hover{
  background: rgba(239, 68, 68, 1);
}

/* Плашка с датой истечения — показывается сразу при наведении (ПК), фирменный стиль */
.product-card__active-until-badge::after{
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--game-panel-2, #111);
  color: var(--game-text, #fff);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--game-radius, 12px);
  border: 1px solid rgba(167, 94, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 4px 16px var(--game-brand-soft, rgba(167,94,255,.35));
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 0.06s ease-out, transform 0.06s ease-out;
  transition-delay: 0s;
  z-index: 20;
}
.product-card__active-until-badge:hover::after{
  opacity: 1;
  transform: translateY(0);
}
/* На тач-устройствах только JS-плашка по тапу; CSS-тултип не показываем, чтобы не было двух плашек */
@media (pointer: coarse) {
  .product-card__active-until-badge::after,
  .product-card__purchase-hint-badge::after { display: none !important; }
}

/* Бейдж «?» — подсказка условий покупки (наборы), в одном стиле с часиками (фиолетовый) */
.product-card__purchase-hint-badge{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: help;
  transition: background 0.2s ease, transform 0.2s ease;
}
.product-card__purchase-hint-badge:hover{
  background: rgba(139, 92, 246, 1);
}
.product-card__purchase-hint-badge:active{
  transform: scale(0.98);
}
.product-card__purchase-hint-badge::after{
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--game-panel-2, #111);
  color: var(--game-text, #fff);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--game-radius, 12px);
  border: 1px solid rgba(167, 94, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 4px 16px var(--game-brand-soft, rgba(167,94,255,.35));
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 0.06s ease-out, transform 0.06s ease-out;
  z-index: 20;
}
.product-card__purchase-hint-badge:hover::after{
  opacity: 1;
  transform: translateY(0);
}

/* Если на одной карточке и часики, и «?» — сдвигаем «?» влево */
.product-card--active-until .product-card__purchase-hint-badge{ right: 44px; }

/* Плашка по тапу на часики (мобилка) — фирменный стиль */
.timer-tooltip-popover{
  position: fixed;
  z-index: 99999;
  padding: 10px 14px;
  background: var(--game-panel-2, #111);
  color: var(--game-text, #fff);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  border-radius: var(--game-radius, 12px);
  border: 1px solid rgba(167, 94, 255, 0.4);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 4px 16px var(--game-brand-soft, rgba(167,94,255,.35)),
    0 4px 24px rgba(0,0,0,.4);
  pointer-events: none;
  animation: timerPopoverIn 0.2s ease-out;
}
@media (max-width: 400px) {
  .timer-tooltip-popover { white-space: normal; }
}
@keyframes timerPopoverIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.price-row{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.price-chip{
  display:flex; align-items:center; justify-content:center; flex:1 1 auto; height:40px;
  font-weight:600; font-family: var(--font-accent);
  color:var(--game-text); background:rgba(255,255,255,.02);
  border:1px solid #5a5a5a; border-radius:var(--game-radius);
  white-space: nowrap; min-width: 0;
}

/* Кнопка «+» */
.add-btn{
  display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px;
  border:none; border-radius:50%; cursor:pointer; font-size:20px; color:var(--game-text);
  background: radial-gradient(120% 120% at 50% 0%, var(--game-brand) 0%, var(--game-brand-2) 65%);
  box-shadow: 0 10px 26px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: box-shadow .2s ease, filter .2s ease;
}
.add-btn:hover{ box-shadow:0 14px 32px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.10) inset; }
.add-btn:active{ transform:none; }

/* Счётчик */
.counter{
  display:flex; align-items:center; justify-content:center; gap:var(--space-4);
  min-width:0; height:40px; padding:0 var(--space-2);
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
}
.counter .count{ min-width:2ch; text-align:center; font-weight:600; line-height:1; }
.counter .inc, .counter .dec{
  display:flex; align-items:center; justify-content:center; width:28px; height:28px;
  border:none; border-radius:50%; cursor:pointer; font-size:18px; color:var(--game-text);
  transition: box-shadow .2s ease, filter .2s ease; aspect-ratio: 1 / 1;
}
.counter .dec{
  background:linear-gradient(180deg,#2a2a2a,#232323);
  box-shadow:0 6px 14px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.counter .inc{
  background: radial-gradient(140% 140% at 50% 20%, var(--game-brand) 0 60%, var(--game-brand-2) 100%);
  box-shadow:0 6px 16px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Когда внизу счётчик — сетка «цена | счётчик» */
.price-row:has(.counter){
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--space-3); align-items: center;
}
.price-row:has(.counter) .counter{ width: auto; }
.price-row:has(.counter) .price-chip{ width: auto; }

/* Стабилизация высоты карточек на десктопе */
@media (min-width: 901px){
  .products{ align-items: start; }
  .product-card{
    display: grid; grid-template-rows: auto 1fr auto; /* media | spacer | price */
    min-height: 0;
  }
  .product-card .card-media{ align-self: start; }
  .product-card .price-row{ min-height: 40px; }
  .product-card .price-row:has(.counter){
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  }
}


/* ========== 5) КОРЗИНА (ПК) ========================================== */
.cart{
  align-self:flex-start; position:sticky; overflow:visible;
  flex:0 0 300px; width:300px;
  max-height:calc(100dvh - var(--space-8));
  padding: 12px var(--space-3) var(--space-3);
  top:var(--space-3);
  background:var(--game-panel);
  border:var(--game-border);
  border-radius:var(--game-radius);
}

/* Шапка корзины */
.cart-header{ margin-bottom:var(--space-3); }
.cart-header-top{
  display:grid; grid-template-columns:1fr auto 1fr;
  align-items:center; gap:var(--space-3);
  min-height:40px;
}
.cart-header{ --cart-header-size: var(--game-text-xl, 20px); }
.cart-header h2{ margin:0; font-weight:700; font-size:var(--cart-header-size); line-height:1.2; }
.cart-header h2.cart-title{ display:flex; align-items:center; gap:8px; justify-self:start; }
.cart-title .cart-title-text{ font-weight:700; }

.cart-count{
  display:inline-flex; align-items:center; padding:0; border:none; border-radius:0; background:none;
  font-size:var(--cart-header-size); line-height:1.2; color:var(--game-text); font-weight:700;
}
#cart-total{ justify-self:center; color:var(--game-brand); font-size:var(--cart-header-size); line-height:1.2; }
.cart-actions{ justify-self:end; display:inline-flex; align-items:center; gap:var(--space-2); }

.cart ul{ list-style: none; margin: 0 0 var(--space-4) 0; padding: 0; }
#cart-items > .cart-item-card:last-child{ margin-bottom: 0; }

.cart.scrollable #cart-items{ max-height:420px; overflow-y:auto; }

.cart-clear-btn{
  cursor:pointer; padding:var(--space-1); border-radius:var(--radius-sm);
  background:none; border:none; transition:background .2s ease, transform .2s ease;
}
.cart-clear-btn:hover{ background:rgba(255,255,255,.05); transform:scale(1.05); }
.cart-clear-btn .icon-trash{ stroke:var(--game-muted); transition:stroke .2s ease; }
.cart-clear-btn:hover .icon-trash{ stroke:#ff5555; }

.cart-item-card{
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:var(--space-3);
  padding:var(--space-3); margin-bottom:var(--space-3);
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
}
/* Тайтл в 2 строки */
.cart .cart-item-card .item-name,
.cart .cart-item-card .cart-item__title{
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.2; max-height: calc(1.2em * 2);
  font-weight: 600;
  font-size: 14px;
}
/* Цена в корзине — фиолетовая */
.cart .cart-item-card .item-price,
.cart .cart-item-card .cart-item__price{
  color: var(--brand, #8b5cf6);
  font-weight: 700;
  font-size: 14px;
}
/* Увеличенная цена для Steam подарков в десктопной корзине */
.cart .cart-item-card .cart-item__price--large{
  font-size: 18px !important;
  font-weight: 700 !important;
}

.item-counter{
  grid-column:1/-1; display:flex; align-items:center; justify-content:space-between;
  height:36px; padding:0 var(--space-2); background:var(--game-panel-2);
  border:var(--game-border); border-radius:var(--game-radius);
}
.item-counter button{
  width:28px; height:28px; cursor:pointer; background:none; border:none;
  color:var(--game-brand); font-size:18px; transition:filter .2s;
}
.item-counter button:hover{ filter:drop-shadow(0 0 4px var(--game-brand)); }

.item-source{
  grid-column:1 / -1; height:36px; display:flex; align-items:center; justify-content:center;
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
  font-size:14px; color:var(--game-text); font-family:var(--font-accent);
}

.btn-pay{
  width:100%; cursor:pointer; padding:var(--space-3) var(--space-4);
  border:none; /* Убираем border */
  border-radius:var(--game-radius);
  font-size:var(--game-text-md); font-weight:700; color:var(--game-brand);
  background:var(--game-panel-2);
  transition: all 0.2s ease;
  position: relative;
  /* В спокойном состоянии без свечения */
  box-shadow: none;
}
/* Интенсивный яркий бордюр и свечение только в активном состоянии (не disabled) - используем токены */
.btn-pay:not(:disabled) {
  box-shadow: var(--pay-btn-active-shadow);
}
/* Усиление свечения при hover для активных кнопок - используем токены */
.btn-pay:hover:not(:disabled) {
  box-shadow: var(--pay-btn-hover-enhanced);
}
.btn-pay:active:not(:disabled){ 
  transform: translateY(1px);
}
.btn-pay:disabled{ 
  background:var(--game-panel-2); 
  border:none;
  color:var(--game-muted);
  opacity:.5; 
  cursor:not-allowed;
  box-shadow: none;
}

#cart-mode-switch, #cart .mode-chip{ display:none !important; } /* в корзине скрываем чип/свитч */

.cyber-total.total-highlight{ animation:totalPulse .6s ease; }
@keyframes totalPulse{
  0%{text-shadow:none;filter:none}
  35%{text-shadow:0 0 12px var(--game-brand);filter:saturate(1.1)}
  100%{text-shadow:none;filter:none}
}

/* Скролл-обёртка */
.cart-items-wrap { position: relative; }
.cart-nav { display: none; }      /* стрелки скрыты базово */
#cart-items{ overflow: visible; } /* базово без фикс.высоты */

/* Невидимый скролл, включаем только при необходимости */
.cart-items-wrap #cart-items{ scrollbar-width: none; -ms-overflow-style: none; }
.cart-items-wrap #cart-items::-webkit-scrollbar{ width:0; height:0; display:none; }
.cart-items-wrap.is-scroll #cart-items{
  overflow-y: auto !important; scroll-snap-type: y proximity; scroll-padding-bottom: 2px; max-height: 420px;
}
/* Если есть ≥3 элемента (поддержка :has) — включаем скролл */
@supports(selector(:has(*))){
  .cart-items-wrap:has(#cart-items > *:nth-child(3)) #cart-items{
    overflow-y: auto !important; scroll-snap-type: y proximity; scroll-padding-bottom: 2px; max-height: 420px;
  }
}

/* Пустая корзина — одна «пилюля» во всю ширину */
.cart .cart-empty{ 
  margin: 12px 0;                  /* сверху и СНИЗУ по 12px */
}
.cart .cart-empty[hidden]{          /* на всякий случай: если JS ставит hidden */
  display: none !important;
}
.cart .cart-empty-bar{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: var(--game-radius);
  background: var(--panel-2, #151515);
  border: 1px solid color-mix(in srgb, var(--text-2, #fff) 12%, transparent);
  box-shadow: none;
  color: var(--text-1, #fff);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: default;              /* это не интерактивный элемент */
  user-select: none;
}


/* ========== 6) ОПИСАНИЕ + SEO ======================================== */
#game-desc-title#game-desc-title{ margin-bottom:12px; }
.desc-intro{ margin-block: var(--space-3); display: flow-root; }
/* extra-description: базовое поведение + корректное раскрытие */
.extra-description{
  margin-block: var(--space-3);
}
.extra-description[hidden]{ display:none !important; }
.extra-description:not([hidden]){ display: flow-root; }

#game-desc-content{ margin-top:0; }
#game-desc-intro, #game-desc-extra{ margin-top: 12px; }
#game-desc-intro p + p, #game-desc-content p + p { margin-top: 12px; }

.game-desc{ margin-block:var(--space-8); }
.desc-head{ display:flex; align-items:center; gap:12px; padding:0; background:none; border:none; cursor:pointer; color:var(--game-text); }
.desc-title{ margin:0; font-size:var(--game-h2); line-height:1.2; letter-spacing:.2px; }
.arrow-icon{ color:var(--game-brand); transition:transform .25s ease; }
.desc-head[aria-expanded="true"] .arrow-icon{ transform:rotate(180deg); }

.extra-description{
  position:relative; margin-top:var(--space-4); padding:var(--space-8) var(--space-5);
  background:var(--game-panel); border-radius:var(--game-radius); overflow:hidden;
}
.extra-description::before{
  content:""; position:absolute; inset:0; border-radius:inherit;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset; pointer-events:none;
}
.extra-description .category-seo > :first-child{ margin-top:0 !important; }
.extra-description .category-seo > :last-child{  margin-bottom:0 !important; }
.extra-description p{
  margin:0 0 var(--space-4); color:var(--game-text); line-height:var(--game-lh-base);
  max-width: none; /* текст описания во всю строку */
}
.extra-description h3{ margin:var(--space-6) 0 var(--space-3); font-size:var(--game-h3); line-height:1.25; }
.extra-description .dot-list{ margin:0 0 var(--space-4); padding-left:0; list-style:none; }
.extra-description .dot-list li{
  position:relative; margin:.4em 0; padding-left:1.25em; color:var(--game-text);
}
.extra-description .dot-list li::before{
  content:""; position:absolute; left:0; top:.55em; width:.5em; height:.5em; border-radius:50%;
  background:var(--game-brand); box-shadow:0 0 0 2px color-mix(in srgb, var(--game-brand) 20%, transparent);
}
.extra-description a{ color:var(--game-brand); text-decoration:underline; text-underline-offset:2px; }


/* ========== 7) ПЕРЕКЛЮЧАТЕЛИ РЕЖИМА ================================== */
.mode-switch{
  display:inline-flex; 
  align-items:center; 
  gap:0;
  margin-left:var(--space-4);
  background:transparent; 
  border:none; /* Убираем внешний бордюр */
  border-radius:999px; 
  overflow:visible; /* Убираем hidden, чтобы видеть закругления */
  width: auto; /* Автоматическая ширина, но стабильная */
  flex-shrink: 0; /* Не сжимается */
  position: relative;
  isolation: isolate;
}
.mode-switch.disabled{ opacity:.5; pointer-events:none; }
.mode-btn{
  padding:8px 20px; /* Увеличили padding справа для лучшего отступа текста */
  font-size:14px;
  color:var(--game-text);
  background:var(--game-panel-2);
  border:none; /* Убираем границы, чтобы не было шва между кнопками */
  border-radius:999px; /* Делаем все кнопки закругленными */
  cursor:pointer;
  transition: all 0.2s ease;
  min-width: 110px; /* Фиксированная минимальная ширина для стабильности */
  width: 110px; /* Фиксированная ширина для обеих кнопок */
  flex: 0 0 110px; /* Фиксированный размер, не растягивается и не сжимается */
  text-align: center; /* Центрируем текст */
  white-space: nowrap; /* Не переносим текст */
  box-sizing: border-box; /* Padding включается в ширину */
  font-weight: 600;
  position: relative;
  z-index: 1;
  margin: 0;
}
/* Убираем шов между кнопками - убираем закругление у внутренних сторон */
.mode-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.mode-btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
/* Одиночная кнопка - полностью закругленная со всех сторон */
.mode-btn:only-child {
  border-radius: 999px;
  margin-left: 0;
}
.mode-btn:hover:not(.active){
  /* Для неактивных кнопок при hover - только яркая рамка, без внешнего свечения */
  color: var(--game-brand);
  text-shadow: 0 0 8px var(--game-brand-soft);
  box-shadow: var(--button-hover-border-only);
}
/* Усиление свечения при hover для активных кнопок - используем стиль из токенов как у .btn-pay */
.mode-btn.active:hover {
  box-shadow: var(--pay-btn-hover-enhanced);
}
.mode-btn:active:not(.active){ transform: translateY(1px); }
.mode-btn.active{
  color:var(--game-brand);
  background:var(--game-panel-2);
  font-weight: 700;
  text-shadow: 0 0 12px var(--game-brand-soft), 0 0 20px var(--game-brand-soft);
  cursor: default;
  /* Ширина не меняется при активации */
  width: 110px; /* Та же фиксированная ширина */
  min-width: 110px; /* Та же минимальная ширина */
  flex: 0 0 110px; /* Та же фиксированная ширина */
  z-index: 2;
  /* Подсветка для активной кнопки - используем стиль из токенов как у .btn-pay */
  box-shadow: var(--pay-btn-active-shadow);
}
.mode-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  margin-right:var(--space-2);
  border-radius: 999px;
  font-size:13px;
  color:var(--game-text);
  background:color-mix(in srgb, var(--game-brand) 22%, transparent);
  border:1px solid rgba(255,255,255,.06);
}

/* ========== 8) МОДАЛКА ВЫБОРА РЕЖИМА ================================= */
.mode-modal{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:grid; place-items:center; z-index:9999; padding:24px; }
.mode-modal[hidden]{ display:none; }
.mode-modal__card{
  width:min(720px,100%); background:var(--game-panel); border:var(--game-border);
  border-radius:var(--game-radius); padding:20px; box-shadow:var(--game-shadow);
}
.mode-modal__card h3{ margin:0 0 6px 0; font-size:20px; color:var(--game-text, #fff) !important; }
.mode-modal__hint{ margin:0 0 16px 0; color:var(--game-muted); font-size:14px; }
.mode-modal__grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:10px; }
.mode-modal__option{
  display:grid; gap:4px; padding:14px; border-radius:12px;
  border:1px solid rgba(255,255,255,.08) !important; 
  background:var(--game-panel-2) !important;
  cursor:pointer; text-align:left;
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
  /* Убираем все автоподсветки - только hover */
  outline: none !important;
  box-shadow: none !important;
  /* Явно задаем цвет текста для всех браузеров и iOS */
  color: var(--game-text, #fff) !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}
/* ТОЛЬКО hover подсвечивает */
.mode-modal__option:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb, var(--game-brand) 32%, transparent) !important;
  box-shadow:0 10px 26px rgba(168,85,247,.2) !important;
}

/* Убираем ВСЕ подсветки при любых состояниях, кроме hover */
.mode-modal__option:focus,
.mode-modal__option:focus-visible,
.mode-modal__option:active,
.mode-modal__option:focus-within {
  outline: none !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  background: var(--game-panel-2) !important;
  transform: none !important;
  color: var(--game-text, #fff) !important;
  -webkit-tap-highlight-color: transparent !important;
}
.mode-modal__option::-moz-focus-inner{ border: 0 !important; }

/* Убираем класс active если он где-то устанавливается */
.mode-modal__option.active,
.mode-modal__option[class*="active"],
.mode-modal__option[aria-selected="true"] {
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  background: var(--game-panel-2) !important;
  transform: none !important;
}

/* Гарантируем отсутствие подсветки для всех состояний, кроме hover */
.mode-modal__option:not(:hover) {
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  background: var(--game-panel-2) !important;
  color: var(--game-text, #fff) !important;
}

#mode-modal-title, .mode-modal__title{ font-weight: 600; color:var(--game-text, #fff) !important; }
.mode-modal__option-title{ margin:0 0 6px 0; font-size:16px; line-height:1.2; color:var(--game-text, #fff) !important; }
.mode-modal__option-note{ color:var(--game-muted); font-size:14px; }
.mode-modal__footer-hint{ margin:12px 0 0 0; font-size:14px; color:var(--game-muted); }

/* Исправление для iOS - убираем синий цвет при нажатии */
.mode-modal__option * {
  color: inherit !important;
  -webkit-tap-highlight-color: transparent !important;
}
.mode-modal__option-title,
.mode-modal__option-note {
  -webkit-tap-highlight-color: transparent !important;
}

/* ======================================================================
   MODE MODAL — SINGLE (одна опция) : текст + компактная кнопка по центру
   ====================================================================== */

.mode-modal.is-single .mode-modal__card{
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px;
}
  
/* hint компактнее и ровнее */
.mode-modal.is-single .mode-modal__hint{
  max-width: 460px;
  margin: 0;
  line-height: 1.45;
}
  
/* footer-hint используем как "вторую строку текста" над кнопкой */
.mode-modal.is-single .mode-modal__footer-hint{
  order: 3;
  max-width: 460px;
  margin: 0;
  line-height: 1.45;
}
  
/* если footer-hint пустой — не занимаем место */
.mode-modal.is-single .mode-modal__footer-hint:empty{
  display: none;
}
  
/* grid превращаем в контейнер под кнопку */
.mode-modal.is-single .mode-modal__grid{
  order: 4;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  width: 100%;
  margin: 6px 0 0;
}
  
/* опция становится именно кнопкой */
.mode-modal.is-single .mode-modal__option{
  width: auto;
  min-width: 200px;
  max-width: 240px;
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  padding: 0 18px;
  text-align: center;
  line-height: 1;
 
  border-radius: 14px;
}
  
/* внутри плитки обычно есть title/note — прячем note, title центрируем */
.mode-modal.is-single .mode-modal__option-note{
  display: none;
}
.mode-modal.is-single .mode-modal__option-title{
  margin: 0;
  text-align: center;
}
  
/* ========== 9) МОБИЛЬНЫЙ ДОК-БАР ===================================== */
.mobile-bar{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none; /* включаем на ≤755px ниже */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px));
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.mobile-bar__inner{
  max-width: 1400px; margin: 0 auto;
  padding: 10px var(--page-x);
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0;
}
.mbtn{
  appearance: none; border: 0; background: transparent; box-shadow: none; color: var(--text);
  height: 64px; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; user-select: none;
}
.mbtn__icon{ width: 22px; height: 22px; display: grid; place-items: center; }
.mbtn__label{ font: 600 13px/1 var(--font-accent); opacity: .9; min-height: 16px; }
.mbtn--cart .mbtn__label{ display: none; }
.mbtn__badge{
  position: static; transform: none; min-width: auto; height: auto; padding: 2px 6px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font: 700 12px/1 var(--font-accent); margin-top: 2px;
}
.mbtn--cart .mbtn__badge[hidden]{ display: none; }

/* Уточнение размеров SVG в доке (более специфично, чем legacy-правило ниже) */
.mobile-bar .mbtn__icon svg{ width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; }

/* ========== 10) МОБИЛЬНЫЙ НИЖНИЙ ШИТ КОРЗИНЫ ========================= */
.cart-drawer{ position: fixed; inset:0; z-index: 120; display: contents; }
.cart-drawer[aria-hidden="true"] .cart-drawer__overlay{ opacity:0; pointer-events:none; }
.cart-drawer[aria-hidden="true"] .cart-drawer__sheet{ transform: translateY(100%); }

.cart-drawer__overlay{ position: fixed; inset:0; background: rgba(0,0,0,.5); transition: opacity .25s ease; }
.cart-drawer__sheet{
  position: fixed; left:0; right:0; bottom:0;
  margin: 0 auto; max-width: 1400px;
  background: var(--panel-2); color: var(--text);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  box-shadow: 0 -20px 40px rgba(0,0,0,.6);
  transform: translateY(0); transition: transform .28s ease;
  max-height: calc(100vh - 70px); display:flex; flex-direction:column;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}
.cart-drawer__grip{ width: 54px; height: 6px; border-radius: 3px; background: #2a2a2a; margin: 10px auto 6px; }
.cart-drawer__header{ display:flex; align-items:center; justify-content:space-between; padding: 8px 16px 4px; }
.cart-drawer__header h3{ font-size:18px; font-weight:800; margin:0; }
.cart-drawer__close{ background: transparent; color: var(--muted); border:0; font-size:20px; line-height:1; padding:8px; cursor:pointer; }
.cart-drawer__clear{ background: transparent; border:0; color: var(--muted); padding:8px; cursor:pointer; line-height:1; display:inline-flex; align-items:center; justify-content:center; }
.cart-drawer__clear:hover{ color:#ff6b6b; }

.cart-drawer__body{ padding: 8px 16px; overflow:auto; }
.cart-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.cart-item{
  display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center;
  background: var(--panel); border-radius: 14px; padding: 12px;
}
.cart-item__title{ font-weight:600; font-size:14px; }
.cart-item__price{ color: var(--brand); font-weight:700; font-size:14px; }
.cart-item__price--large{ font-size:18px !important; font-weight:700 !important; }
/* Убираем плашку "Вход в игру" для Steam подарков */
.cart-item-card:has(.cart-item__price--large) .item-source{ display:none !important; }

.cart-qty{ display:flex; align-items:center; gap:8px; }
.cart-qty button{
  width:34px; height:34px; border-radius:10px; background: transparent; border: 0; color: var(--brand);
  font-weight:800; line-height:1; display:grid; place-items:center; cursor:pointer;
}
.cart-qty button:active{ transform: translateY(1px); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 50%, transparent)); }
.cart-qty input{
  width:48px; height:34px; text-align:center; border:0; background:#1a1a1a; color:#fff; border-radius:10px; font-weight:700;
}
.cart-qty .js-rem{ display:none !important; } /* старый элемент — скрыт */

.cart-drawer__footer{
  margin-top:auto; padding: 12px 16px 16px; display:grid; gap:10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 30%, rgba(0,0,0,.35) 100%);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
}
.cart-total{ display:flex; align-items:baseline; justify-content:space-between; font-size:16px; font-weight:700; }
.cart-drawer__pay {
  width: 100%;
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  border: none; /* Убираем border, переносим в ::before */
  border-radius: var(--game-radius);
  font-size: var(--game-text-md);
  font-weight: 700;
  color: var(--game-brand);
  background: var(--game-panel-2);
  transition: all 0.2s ease;
  min-height: 48px;
  font-family: var(--font-accent);
  position: relative;
}
/* Подсветка через ::before, как у переключателей - красиво на скруглениях */
.cart-drawer__pay::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--game-brand);
  box-shadow: 
    0 0 0 2px var(--game-brand-soft),
    0 0 0 1px color-mix(in srgb, var(--game-brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 12px var(--game-brand-soft);
  pointer-events: none;
  z-index: -1;
  transition: all 0.2s ease;
}
.cart-drawer__pay:hover:not(:disabled)::before {
  box-shadow: 
    0 0 0 2px var(--game-brand-soft), 
    0 0 0 1px color-mix(in srgb, var(--game-brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 12px var(--game-brand-soft),
    0 0 20px var(--game-brand-soft);
}
.cart-drawer__pay:active:not(:disabled) {
  transform: translateY(1px);
}
.cart-drawer__pay:disabled {
  background: var(--game-panel-2);
  border-color: rgba(255,255,255,.06);
  color: var(--game-muted);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.btn--brand{ 
  height: 48px; 
  border-radius: 14px; 
  border: none; /* Убираем border, переносим в ::before */
  font-weight:700; 
  cursor:pointer; 
  background: var(--game-panel-2); 
  color: var(--brand);
  transition: all 0.2s ease;
  position: relative;
}
/* Подсветка через ::before, как у переключателей - красиво на скруглениях */
.btn.btn--brand::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--brand);
  box-shadow: 
    0 0 0 2px var(--game-brand-soft, rgba(168,85,255,.35)),
    0 0 0 1px color-mix(in srgb, var(--brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 12px var(--game-brand-soft, rgba(168,85,255,.35));
  pointer-events: none;
  z-index: -1;
  transition: all 0.2s ease;
}
.btn.btn--brand:hover:not(:disabled)::before { 
  box-shadow: 
    0 0 0 2px var(--game-brand-soft, rgba(168,85,255,.35)), 
    0 0 0 1px color-mix(in srgb, var(--brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 12px var(--game-brand-soft, rgba(168,85,255,.35)),
    0 0 20px var(--game-brand-soft, rgba(168,85,255,.35));
}
.btn.btn--brand:active:not(:disabled){ 
  transform: translateY(1px);
}
.btn.btn--brand:disabled{ 
  background: var(--game-panel-2); 
  border-color: rgba(255,255,255,.06); 
  color: var(--game-muted);
  opacity: .5; 
  cursor: not-allowed;
  box-shadow: none;
}

body.drawer-open .mobile-bar{ opacity:0; pointer-events:none; } /* шит перекрывает док */

/* LEGACY 18px (оставляем для совместимости; выше есть более специфичное правило на 22px) */
.mbtn__icon svg{ width:18px; height:18px; display:block; fill:none; stroke:currentColor; stroke-width:2; }

/* Лок-боди при открытом шите + видимое фокус-кольцо */
body.drawer-open { overflow: hidden; }
:where(button, [role="button"], .mode-modal__option):focus-visible{
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 2px;
}


/* Заголовки разделов на странице игры выровнены по весу */
.desc-title,
.faq-title,
#faq-title{
  font-weight: 700;
  font-family: var(--font-heading);
}

/* Крошки/легал — IBM для читабельности */
.navigation, .navigation *{ font-family: var(--font-body) !important; }
.navigation .navigation-link, .navigation .navigation-current{ font-weight: 700; }

.legal, .legal *{ font-family: var(--font-body) !important; }
.legal h1, .legal h2, .legal h3{ font-family: var(--font-heading) !important; font-weight: 700; }
.legal a{ font: inherit; color: #b793ff; text-decoration: underline; text-underline-offset: 2px; }

/* Счётчики/кнопки в корзине — на акцентном шрифте */
.counter .count, .item-counter, .cart-qty input, .cart-qty button{ font-family: var(--font-accent) !important; font-weight: 700; }
.cart :where(button, input){ font: inherit; } /* наследование на всякий случай */

/* Фикс ширины при появлении/исчезновении вертикального скролла */
html { scrollbar-gutter: stable both-edges; }
@supports not (scrollbar-gutter: stable){
  html { overflow-y: scroll; } /* fallback для старых движков */
}

/* === CARD TITLE (единая логика) === */
.product-card :is(.card-title,.product-title,.title){
  margin-block: 0 !important;
}

/* База заголовка: фиксированная высота под 2 строки — все карточки одного размера */
.product-card .card-title{
  margin: 0 !important;
  font-size: var(--game-text-lg);
  line-height: 1.2;
  font-weight: 700;
  color: var(--game-text);
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(2 * 1.2em + 16px); /* всегда место под 2 строки — единая высота карточек */
  height: calc(2 * 1.2em + 16px);
  max-height: calc(2 * 1.2em + 16px);
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none; /* без переноса по слогам (све-та), только по пробелам */
}

/* По умолчанию (ПК) обе части в блок */
.product-card .card-title .ct-top,
.product-card .card-title .ct-rest{
  display: block;
}

/* Мобилка: фиксированная высота под 3 строки — карточки одного размера */
@media (max-width: 767px){
  .product-card .card-title{
    font-size: 15px;
    line-height: 1.25;
    min-height: calc(3 * 1.25em + 16px);
    height: calc(3 * 1.25em + 16px);
    max-height: calc(3 * 1.25em + 16px);
  }
}


/* ========================== MODAL PAY ========================== */

.pay-modal {
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw; /* Явно задаём ширину на весь viewport */
  height: 100vh; /* Явно задаём высоту на весь viewport */
  z-index: 99999;
  display: none !important; 
  align-items: center; 
  justify-content: center;
  overflow: hidden; /* Убираем скролл у модалки */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.pay-modal.active { 
  display: flex !important; 
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Убеждаемся, что pay-step скрыты, когда модалка не активна */
.pay-modal:not(.active) .pay-step {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.pay-modal__overlay {
  position: absolute; /* Возвращаем absolute, так как родитель уже fixed */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%; /* На всю ширину родителя */
  height: 100%; /* На всю высоту родителя */
  background: rgba(0,0,0,.65); 
  backdrop-filter: blur(4px);
  z-index: 1; /* Ниже окна, но выше фона */
}

.pay-modal__window {
  position: relative; z-index: 2; width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #11131b; color: #fff;
  border-radius: 20px; padding: 32px;
  box-shadow: 0 22px 55px rgba(0,0,0,.55);
  font-family: var(--font-body);
  overflow-y: auto;
  overflow-x: hidden;
  /* Скрываем скроллбар */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE и Edge */
}

.pay-modal__window::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

.pay-modal__close {
  position: absolute; 
  right: 16px; 
  top: 16px;
  width: var(--close-btn-size, 32px);
  height: var(--close-btn-size, 32px);
  border: none;
  background: var(--close-btn-base-bg, rgba(255, 255, 255, 0.08));
  border-radius: var(--close-btn-border-radius, 50%); /* Круглые */
  color: var(--close-btn-base-color, var(--muted));
  font-size: 20px; 
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  box-shadow: none;
}
.pay-modal__close:hover {
  background: var(--close-btn-hover-bg, rgba(168, 85, 247, 0.15));
  color: var(--close-btn-hover-color, var(--game-brand));
  /* Используем токен для единого hover-эффекта (адаптируем для игр) */
  box-shadow:
    inset 0 0 0 1px var(--game-brand),
    0 0 8px var(--game-brand-soft);
}

.pay-modal__title { 
  font-size: 22px; 
  margin-bottom: 0; /* Убираем отступ снизу, чтобы было одинаково */
}
.pay-modal__subtitle {
  font-size: 14px; opacity: .75; margin: 8px 0 20px; line-height: 1.5;
}

/* Опции */
.pay-modal__options { display: grid; gap: 12px; }
.pay-modal__option {
  width: 100%; display: flex; align-items: center; text-align: left;
  background: #1a1d26; 
  border: none; /* Убираем border полностью */
  border-radius: 14px;
  padding: 14px 20px; cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease;
  /* Используем box-shadow для базового border вместо реального border */
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset !important;
  outline: none !important;
}
/* ТОЛЬКО hover подсвечивает - используем токен */
.pay-modal__option:hover {
  /* Заменяем базовый border (box-shadow) на подсветку */
  box-shadow: var(--button-hover-shadow) !important;
  background: #222633 !important;
}
/* Убираем ВСЕ подсветки при любых состояниях, кроме hover */
.pay-modal__option:focus,
.pay-modal__option:focus-visible,
.pay-modal__option:active,
.pay-modal__option:focus-within {
  outline: none !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  background: #1a1d26 !important;
  transform: none !important;
}
/* Hover имеет приоритет над focus */
.pay-modal__option:focus:hover,
.pay-modal__option:focus-visible:hover,
.pay-modal__option:active:hover,
.pay-modal__option:focus-within:hover {
  /* Убираем transform, чтобы не дергались соседние кнопки */
  /* Заменяем базовый border (box-shadow) на подсветку */
  box-shadow: var(--button-hover-shadow) !important;
  background: #222633 !important;
}
.pay-modal__option::-moz-focus-inner{ border: 0 !important; }
/* Убираем класс active если он где-то устанавливается */
.pay-modal__option.active,
.pay-modal__option[class*="active"],
.pay-modal__option[aria-selected="true"] {
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  background: #1a1d26 !important;
  transform: none !important;
}
/* Гарантируем отсутствие подсветки для всех состояний, кроме hover */
/* Убираем это правило - оно конфликтует с hover */
/* FreeKassa использует тот же стиль, что и остальные опции - единый токен */
.pay-modal__option--fk:hover {
  /* Заменяем базовый border (box-shadow) на подсветку */
  box-shadow: var(--button-hover-shadow) !important;
}

.pay-modal__option-icon {
  width: 42px; height: 42px; margin-right: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #262b38; border-radius: 12px; font-size: 20px;
}
.pay-modal__option-title { font-size: 16px; margin: 0 0 4px; }
.pay-modal__option-desc { font-size: 13px; opacity: .75; }

/* Шаги */
.pay-step { 
  display: none !important; 
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}
.pay-modal.active .pay-step.is-active { 
  display: block !important; 
  visibility: visible !important;
  opacity: 1 !important;
  position: static;
  left: auto;
  width: auto;
  height: auto;
  overflow: visible;
}

/* Кнопка "Назад" (шаг 2) */
.pay-modal__back {
  margin: -4px 0 12px; padding: 4px 10px;
  background: none; border: none; border-radius: 999px;
  color: var(--game-muted, #9ca3af); font: inherit; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  transition: color .15s, background-color .15s, transform .1s;
}
.pay-modal__back::before { content: "←"; }
.pay-modal__back:hover {
  color: var(--game-brand, #a855f7);
  background: rgba(88, 28, 135, 0.18); transform: translateX(-1px);
}
.pay-modal__back:active { transform: translateX(-0.5px) scale(0.98); }

/* Форма */
.pay-modal__form {
  display: flex; flex-direction: column; gap: 20px; margin: 32px 0 16px;
}
.pay-modal__field { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  margin-bottom: 4px;
}
.pay-modal__label { font-size: 13px; line-height: 1.4; color: var(--game-muted, #9ca3af); }
.pay-modal__hint { 
  font-size: 12px; 
  line-height: 1.3; 
  color: var(--game-muted, #6b7280); 
  margin-top: 4px; 
  opacity: 0.8; 
}
.pay-modal__label .optional {
  color: var(--game-muted, #6b7280);
  font-weight: normal;
}
.pay-modal__error {
  font-size: 14px; /* Увеличили размер текста */
  line-height: 1.4;
  color: #ef4444;
  margin-top: 6px; /* Увеличили отступ сверху */
  display: block; /* Упрощаем до блока, так как иконки больше нет */
  opacity: 0;
  transform: translateY(-8px); /* Начинаем снизу */
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-height: 20px; /* Минимальная высота для плавной анимации */
}
.pay-modal__error:not([hidden]) {
  opacity: 1;
  transform: translateY(0); /* Сдвигаем вверх при появлении */
}
.pay-modal__field input[aria-invalid="true"],
.pay-modal__field textarea[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.pay-modal__input,
.pay-modal__select,
.pay-modal__textarea,
.pay-modal__field input,
.pay-modal__field textarea {
  width: 100%; font: inherit; color: var(--game-foreground, #f9fafb);
  background: var(--game-input-bg, rgba(8,10,24,.9));
  border: 1px solid var(--game-border-soft, rgba(255,255,255,.06));
  border-radius: 12px; padding: 10px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s, transform .06s;
  position: relative;
}
/* Исключаем readonly поля из базового стиля border */
.pay-modal__input--readonly,
input.pay-modal__input--readonly,
input[readonly].pay-modal__input,
.pay-modal__field input[name="nickname"],
.pay-modal__field input[name="server"],
#order-nickname,
#order-server,
#webpay-nickname,
#webpay-server {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.pay-modal__input::placeholder,
.pay-modal__textarea::placeholder { color: #6b7280; }

/* Сразу после базовых стилей - переопределяем для readonly полей */
.pay-modal__input--readonly,
input.pay-modal__input--readonly,
input[readonly].pay-modal__input,
input[name="nickname"].pay-modal__input,
input[name="server"].pay-modal__input,
.pay-modal__field input[name="nickname"],
.pay-modal__field input[name="server"],
#order-nickname,
#order-server,
#webpay-nickname,
#webpay-server {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.pay-modal__field input:hover,
.pay-modal__field textarea:hover,
.pay-modal__input:hover,
.pay-modal__textarea:hover {
  border-color: color-mix(in srgb, var(--game-brand, #a855f7) 40%, transparent);
}
/* Исключаем readonly поля из hover эффекта */
.pay-modal__field input[readonly]:hover,
.pay-modal__field input.pay-modal__input--readonly:hover,
.pay-modal__input[readonly]:hover,
.pay-modal__input.pay-modal__input--readonly:hover {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.pay-modal__field input:focus,
.pay-modal__field textarea:focus,
.pay-modal__input:focus,
.pay-modal__textarea:focus {
  border-color: transparent; /* Убираем border, используем стиль как у поиска */
  background: radial-gradient(circle at top left,
              color-mix(in srgb, var(--game-brand, #a855f7) 16%, transparent),
              rgba(7,9,20,.98));
  /* Красивая подсветка для активных инпутов, как у поиска на главной */
  box-shadow:
    inset 0 0 0 1.5px var(--game-brand, #a855f7),
    0 0 14px var(--game-brand-soft, rgba(168,85,255,.35));
}
/* Исключаем readonly поля из focus эффекта */
.pay-modal__field input[readonly]:focus,
.pay-modal__field input.pay-modal__input--readonly:focus,
.pay-modal__input[readonly]:focus,
.pay-modal__input.pay-modal__input--readonly:focus {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(34, 197, 94, 0.12) !important;
  box-shadow: none !important;
}

/* Текстовое поле */
.pay-modal__textarea,
.pay-modal__field textarea {
  resize: none; min-height: 72px; max-height: 120px; line-height: 1.4;
  overflow-y: auto; scrollbar-width: none;
}
.pay-modal__textarea::-webkit-scrollbar,
.pay-modal__field textarea::-webkit-scrollbar { width: 0; height: 0; }

/* Общее сообщение об ошибке */
.pay-modal__general-error {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  color: #ef4444;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease;
}
.pay-modal__general-error::before {
  content: "⚠";
  font-size: 18px;
  flex-shrink: 0;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Сабмит */
.pay-modal__submit {
  margin-top: 8px; width: 100%; 
  border: none; /* Убираем border полностью */
  border-radius: 10px; 
  padding: 12px 20px;
  font: inherit; 
  font-weight: 700; /* Как у .btn-pay */
  color: var(--game-brand, #a855f7); /* Как у .btn-pay */
  cursor: pointer;
  background: var(--game-panel-2, #1a1d26);
  transition: box-shadow 0.2s ease, color 0.2s ease;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Используем токены для единого стиля */
  box-shadow: var(--pay-btn-active-shadow);
  /* Исправление для iOS Safari */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.pay-modal__submit:hover:not(:disabled),
button.pay-modal__submit:hover:not(:disabled) { 
  /* Усиление свечения при hover, как у .btn-pay */
  box-shadow: var(--pay-btn-hover-enhanced);
  color: var(--game-brand, #a855f7) !important;
  text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35)) !important;
}
.pay-modal__submit:active:not(:disabled) { 
  transform: translateY(1px); 
}
.pay-modal__submit:disabled {
  background: var(--game-panel-2, #1a1d26);
  border: none;
  color: var(--game-muted, #9ca3af);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}
.pay-modal__submit-text,
.pay-modal__submit-loader {
  display: inline-block;
}
.pay-modal__submit-loader {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================== WEBPAY BLOCK ========================== */
.pay-webpay-info {
  order: -1; /* Размещаем ПЕРВЫМ в flex-контейнере формы */
  margin-top: 0; /* Убираем верхний отступ, так как он первый */
  margin-bottom: 20px; /* Добавляем отступ снизу */
}
.pay-webpay-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px; /* Унифицируем отступ снизу с формой FreeKassa */
}
.pay-webpay-total,
.pay-webpay-purpose {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pay-webpay-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--game-muted, #9ca3af);
  margin-bottom: 4px;
}
.pay-webpay-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--game-foreground, #f9fafb);
  font-variant-numeric: tabular-nums;
}
.pay-webpay-purpose-text {
  background: var(--game-input-bg, rgba(8,10,24,.9));
  border: 1px solid var(--game-border-soft, rgba(255,255,255,.06));
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--game-foreground, #f9fafb);
  word-break: break-word;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.pay-webpay-copy-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: none; /* Убираем border полностью */
  background: var(--game-panel-2, #1a1d26);
  color: var(--game-text, #fff);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 44px;
  position: relative;
  /* Используем box-shadow для базового border вместо реального border */
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}

.pay-webpay-copy-btn:hover {
  /* Заменяем базовый border (box-shadow) на подсветку */
  color: var(--game-brand, #a855f7);
  text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35));
  box-shadow: var(--button-hover-shadow);
}

.pay-webpay-copy-btn:active:not(.copied) {
  transform: translateY(1px);
}

.pay-webpay-copy-btn.copied {
  background: var(--game-panel-2, #1a1d26);
  border-color: transparent; /* Убираем border, переносим в ::before */
  color: var(--game-brand, #a855f7);
  font-weight: 700;
  text-shadow: 0 0 12px var(--game-brand-soft, rgba(168,85,255,.35)), 0 0 20px var(--game-brand-soft, rgba(168,85,255,.35));
}
/* Подсветка через ::before, как у переключателей - красиво на скруглениях */
.pay-webpay-copy-btn.copied::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--game-brand, #a855f7);
  box-shadow: 
    0 0 0 2px var(--game-brand-soft, rgba(168,85,255,.35)),
    0 0 0 1px color-mix(in srgb, var(--game-brand, #a855f7) 55%, rgba(255,255,255,.08)) inset,
    0 0 12px var(--game-brand-soft, rgba(168,85,255,.35));
  pointer-events: none;
  z-index: -1;
}

/* Кнопки действий WebPay */
.pay-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.pay-modal__back-btn,
button.pay-modal__back-btn,
#pay-fk-back {
  padding: 12px 20px;
  border-radius: 10px;
  border: none !important; /* Убираем border полностью */
  background: var(--game-panel-2, #1a1d26) !important;
  color: var(--game-text, #fff) !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
  flex: 0 0 auto;
  /* Используем box-shadow для базового border вместо реального border */
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset !important;
}
.pay-modal__back-btn:hover,
button.pay-modal__back-btn:hover,
#pay-fk-back:hover {
  /* Заменяем базовый border (box-shadow) на подсветку */
  color: var(--game-brand, #a855f7) !important;
  text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35)) !important;
  background: var(--game-panel-2, #1a1d26) !important;
  box-shadow: var(--button-hover-shadow) !important;
}
.pay-modal__back-btn:active {
  transform: translateY(1px);
}
.pay-modal__submit-btn,
button.pay-modal__submit-btn,
#pay-fk-submit,
#webpay-submit-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  border: none !important; /* Убираем border полностью */
  background: var(--game-panel-2, #1a1d26) !important;
  color: var(--game-brand, #a855f7) !important; /* Как у .btn-pay */
  font: inherit;
  font-size: 14px;
  font-weight: 700 !important; /* Как у .btn-pay */
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  /* Используем токены для единого стиля, как у .btn-pay */
  box-shadow: var(--pay-btn-active-shadow) !important;
  /* Исправление для iOS Safari */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
/* Прямой hover для активных кнопок */
.pay-modal__submit-btn:hover:not(:disabled),
button.pay-modal__submit-btn:hover:not(:disabled),
#pay-fk-submit:hover:not(:disabled),
#webpay-submit-btn:hover:not(:disabled) {
  /* Усиление свечения при hover, как у .btn-pay */
  color: var(--game-brand, #a855f7) !important;
  text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35)) !important;
  background: var(--game-panel-2, #1a1d26) !important;
  box-shadow: var(--pay-btn-hover-enhanced) !important;
}
.pay-modal__submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.pay-modal__submit-btn:disabled {
  background: var(--game-panel-2, #1a1d26);
  border-color: rgba(255,255,255,.06);
  color: var(--game-muted, #9ca3af);
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   12) АДАПТИВ
   Порядок: от больших экранов к маленьким (desktop-first)
   Главное: плавные переходы между брейкпоинтами без "прыжков"
   -------------------------------------------------------------------------- */

/* ============================================================
   1. БОЛЬШИЕ ЭКРАНЫ (min-width, от большего к меньшему)
   ============================================================ */

/* ≥1281px — Большой десктоп */
@media (min-width: 1281px){
  /* Заголовок: 1 строка по центру или 2, запас для выносных элементов */
  .product-card .card-title{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    overflow: hidden;
    min-height: calc(1.2em + 16px);
    max-height: calc(2 * 1.2em + 16px);
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: none;
  }
  .product-card .card-title .ct-top,
  .product-card .card-title .ct-rest{
    display: block;
  }
}

/* 1187–1280px — Стандартный десктоп с правой корзиной */
@media (min-width: 1187px) and (max-width: 1280px){
  :root{ --cart-w: 300px; }
  .main-content{
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) var(--cart-w) !important;
    gap: var(--space-5) !important;
    align-items: start !important;
  }
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid){
    grid-column: 1 / span 3 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
  }
  #cart.cart{
    grid-column: 4 !important;
    width: var(--cart-w) !important;
    flex: 0 0 var(--cart-w) !important;
    position: sticky;
    top: 16px;
  }
  /* Заголовок: 1 строка по центру или 2, запас для выносных элементов */
  .product-card .card-title{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    overflow: hidden;
    min-height: calc(1.2em + 16px);
    max-height: calc(2 * 1.2em + 16px);
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: none;
  }
  .product-card .card-title .ct-top,
  .product-card .card-title .ct-rest{
    display: block;
  }
  .card-title{ --title-maxch: 10.8ch; }
}

/* 1086–1186px — Узкий десктоп с правой корзиной */
@media (min-width: 1086px) and (max-width: 1186px){
  :root{ --cart-w: 300px; }
  .main-content{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) var(--cart-w) !important;
    gap: var(--space-5);
    align-items: start;
  }
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid){
    grid-column: 1 / span 3 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--space-4);
  }
  #cart.cart{
    grid-column: 4 !important;
    width: var(--cart-w) !important;
    flex: 0 0 var(--cart-w) !important;
    position: sticky;
    top: 16px;
  }
  /* price-row в столбик (более плотная верстка карточки) */
  .product-card .price-row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 10px !important;
    align-items: center !important;
  }
  .product-card .price-row > *{ min-width: 0 !important; }
  .product-card .price-row .add-btn{
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    margin: 0 !important;
  }
  .product-card .price-row .counter{
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    column-gap: 12px !important;
    align-items: center !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }
  /* Заголовок: 1 строка по центру или 2, запас для выносных элементов */
  .product-card .card-title{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    overflow: hidden;
    min-height: calc(1.2em + 16px);
    max-height: calc(2 * 1.2em + 16px);
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: none;
  }
  .product-card .card-title .ct-top,
  .product-card .card-title .ct-rest{
    display: block;
  }
}

/* ≥1086px — Десктоп-корзина (скрыть мобильный шит) */
@media (min-width: 1086px){
  .cart-drawer{ display: none; }
}

/* ≥1025px — ПК: шапка с выравниванием */
@media (min-width: 1025px){
  /* Шапка: верхний край лого = верхний край тайтла, нижний край лого = нижний край переключателей */
  .game-header{
    align-items: flex-start;
  }
  .game-header-content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    height: 120px; /* Фиксированная высота = высота логотипа */
  }
  .page-title{
    margin: 0 0 var(--space-3) 0;
    padding-top: 0;
    line-height: 1.2;
  }
  .game-header .header-actions{
    margin-top: auto;
    align-self: flex-start;
  }
  /* Навигация: название слева, переключатель справа */
  .navigation .page-1400{
    align-items: center;
    justify-content: space-between;
  }
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    margin-left: auto;
  }
  /* Отступы навигации */
  .navigation{
    margin-block-start: var(--space-4);
    margin-block-end: var(--space-4);
  }
  .hr-section{
    margin-block-start: 32px;
    margin-block-end: 32px;
  }
}

/* ≥732px — ПК/планшет: базовая компоновка */
@media (min-width: 732px){
  /* Шапка: верхний край лого = верхний край тайтла, нижний край лого = нижний край переключателей */
  .game-header{
    align-items: flex-start;
  }
  .game-logo{
    width: 120px;
    height: 120px;
  }
  .game-header-content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    height: 120px; /* Фиксированная высота = высота логотипа */
  }
  .page-title{
    margin: 0 0 var(--space-3) 0;
    text-align: left;
    padding-top: 0;
    line-height: 1.2;
  }
  .game-header .header-actions{
    margin-top: auto;
    align-self: flex-start;
  }
  /* Навигация: название слева, переключатель справа */
  .navigation .page-1400{
    align-items: center;
    justify-content: space-between;
  }
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    margin-left: auto;
    gap: 0 !important;
  }
  /* Отступы навигации */
  .navigation{
    margin-block-start: var(--space-4);
    margin-block-end: var(--space-4);
  }
  .hr-section{
    margin-block-start: 32px;
    margin-block-end: 32px;
  }
}

/* ≥951px — Универсально для всех видов переключателей: лого 130×130px */
@media (min-width: 951px){
  .game-logo{
    width: 130px !important;
    height: 130px !important;
  }
  .game-header-content{
    min-height: 130px !important;
    height: 130px !important;
  }
}

/* ============================================================
   2. СРЕДНИЕ ДИАПАЗОНЫ (min-width AND max-width)
   ============================================================ */

/* 700–740px — Каталог: 2 колонки (больше места для текста) */
@media (min-width: 700px) and (max-width: 740px){
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid){
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid) > .product-card{
    grid-column: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* 741–1085px — Каталог: 3 колонки */
@media (min-width: 741px) and (max-width: 1085px){
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid){
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }
  :is(#products, .products, .products-grid, .cards-grid, .goods-grid) > .product-card{
    grid-column: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* 700–850px — Шапка: 5 и 6 переключателей — лого 160×160px */
@media (min-width: 700px) and (max-width: 850px){
  /* 5 и 6 фильтров: лого 160×160px для правильного выравнивания */
  .game-header:has(.header-actions[data-filters-count="5"]) .game-logo,
  .game-header:has(.header-actions[data-filters-count="6"]) .game-logo{
    width: 160px !important;
    height: 160px !important;
  }
  .game-header:has(.header-actions[data-filters-count="5"]) .game-header-content,
  .game-header:has(.header-actions[data-filters-count="6"]) .game-header-content{
    min-height: 160px !important;
    height: 160px !important;
  }
}

/* 851–950px — Шапка: 5 и 6 переключателей — лого 150×150px */
@media (min-width: 851px) and (max-width: 950px){
  /* 5 и 6 фильтров: лого 150×150px для правильного выравнивания */
  .game-header:has(.header-actions[data-filters-count="5"]) .game-logo,
  .game-header:has(.header-actions[data-filters-count="6"]) .game-logo{
    width: 150px !important;
    height: 150px !important;
  }
  .game-header:has(.header-actions[data-filters-count="5"]) .game-header-content,
  .game-header:has(.header-actions[data-filters-count="6"]) .game-header-content{
    min-height: 150px !important;
    height: 150px !important;
  }
}

/* 700–950px — Шапка: 5 и 6 переключателей */
@media (min-width: 700px) and (max-width: 950px){
  /* 5 фильтров: 3×2 сетка (3 колонки, 2 ряда), два нижних по центру */
  .game-header .header-actions[data-filters-count="5"]{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  /* Два нижних переключателя по центру вместе, одинаковой ширины как верхние */
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(4),
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(5){
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: calc((100% - 2 * 14px) / 3) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  /* Первый переключатель: справа от центра (выровнен по правому краю центра) */
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(4){
    justify-self: end !important;
    margin-right: calc(50% - ((100% - 2 * 14px) / 3) - 7px) !important;
  }
  /* Второй переключатель: слева от центра (выровнен по левому краю центра) */
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(5){
    justify-self: start !important;
    margin-left: calc(50% - ((100% - 2 * 14px) / 3) - 7px) !important;
  }
  
  /* 6 фильтров: 3×2 сетка (3 колонки, 2 ряда), растягивается на всю ширину */
  .game-header .header-actions[data-filters-count="6"]{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(100px, 1fr)) !important;
    grid-template-rows: 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="6"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    min-width: 0;
  }
}

/* 700–731px — Планшет: навигация "как на десктопе" (такие же стили как на ≥732px) */
@media (min-width: 700px) and (max-width: 731px){
  /* Навигация: название слева, переключатель справа (такие же стили как на ≥732px) */
  .navigation .page-1400{
    align-items: center;
    justify-content: space-between;
  }
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    margin-left: auto;
  }
  /* Исправляем "/" - он должен быть на одном уровне с текстом */
  .navigation-sep{
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }
  /* Переключатель должен быть такого же размера как на 732px (одинаковые размеры везде) */
  #nav-mode-switch .mode-btn[data-mode="inapp"],
  #nav-mode-switch .mode-btn[data-mode="web"]{
    width: 110px !important;
    min-width: 110px !important;
    white-space: nowrap !important;
    padding: 0 10px !important;
  }
  /* Gap между кнопками переключателя (убрали шов, кнопки вплотную) */
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    gap: 0 !important;
  }
  /* Шапка: стили как на ПК (≥732px) */
  .game-header{
    align-items: flex-start;
  }
  .game-logo{
    width: 120px;
    height: 120px;
  }
  .game-header-content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    height: 120px; /* Фиксированная высота = высота логотипа */
  }
  .page-title{
    margin: 0 0 var(--space-3) 0;
    text-align: left;
    padding-top: 0;
    line-height: 1.2;
  }
  .game-header .header-actions{
    margin-top: auto;
    align-self: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  
  /* 1 фильтр: центрирован, ограниченная ширина */
  .game-header .header-actions[data-filters-count="1"]{
    justify-content: center;
  }
  .game-header .header-actions[data-filters-count="1"] .filter-btn{
    max-width: 200px;
    width: auto;
    min-width: 140px;
  }
  
  /* 2 фильтра: в ряд, центрированы */
  .game-header .header-actions[data-filters-count="2"]{
    justify-content: center;
  }
  .game-header .header-actions[data-filters-count="2"] .filter-btn{
    flex: 0 1 auto;
    min-width: 0;
  }
  
  /* 3 фильтра: в ряд */
  .game-header .header-actions[data-filters-count="3"]{
    justify-content: flex-start;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn{
    flex: 0 1 auto;
    min-width: 0;
  }
}

/* ============================================================
   3. МОБИЛЬНЫЕ (max-width, от большего к меньшему)
   ============================================================ */

/* ≤1085px — Док-бар + мобильный шит корзины */
@media (max-width: 1085px){
  :root{
    --dock-h: 72px;                         /* высота док-бара при закрытой корзине */
    --drawer-gap: 32px;                     /* зазор снизу при открытой корзине */
    --sheet-bg: var(--game-panel, var(--panel, #111111));
    --grip-color: color-mix(in srgb, #fff 35%, transparent);
  }

  /* Резерв под док-бар / под 32px при открытом шите */
  body{ padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px)) !important; }
  body.drawer-open{ padding-bottom: calc(var(--drawer-gap) + env(safe-area-inset-bottom, 0px)) !important; }

  /* Док-бар и десктоп-корзина */
  .mobile-bar{ display: block !important; }
  .mobile-bar[hidden]{ display: none !important; }
  #cart.cart, .cart-nav{ display: none !important; }
  .cart-drawer{ display: contents !important; }

  /* Скрыт = вообще не виден */
  .cart-drawer[aria-hidden="true"]{ pointer-events: none !important; }
  .cart-drawer[aria-hidden="true"] .cart-drawer__overlay,
  .cart-drawer[aria-hidden="true"] .cart-drawer__sheet{ display: none !important; }

  /* Открыт = шит над 32px, оверлей до самого низа */
  body.drawer-open .mobile-bar{ opacity: 0; pointer-events: none; }
  body.drawer-open .cart-drawer__sheet{
    bottom: calc(var(--drawer-gap) + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100vh - var(--drawer-gap) - 70px) !important;
  }
  body.drawer-open .cart-drawer__overlay{ bottom: 0 !important; }

  /* Подкрашиваем нижний зазор тем же цветом, что и шит */
  body.drawer-open .cart-drawer__overlay::after{
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--drawer-gap) + env(safe-area-inset-bottom, 0px));
    background: var(--sheet-bg);
    pointer-events: none;
  }

  /* Сам шит: одинаковый фон, без теней, хэндл над окном */
  #cart-drawer .cart-drawer__sheet{
    background: var(--sheet-bg) !important;
    box-shadow: none !important;
    filter: none !important;
    padding: 8px 0 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  #cart-drawer .cart-drawer__sheet::before,
  #cart-drawer .cart-drawer__sheet::after{ content: none !important; display: none !important; }

  #cart-drawer .cart-drawer__grip{
    display: block !important;
    position: absolute;
    left: 50%;
    top: -26px;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--grip-color);
    pointer-events: auto;
    cursor: grab;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  }
  #cart-drawer .cart-drawer__grip:empty{ height: 0; }
  #cart-drawer .cart-drawer__grip:empty::after{
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--grip-color);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  }

  /* Футер в цвет шита */
  #cart-drawer .cart-drawer__footer{
    background: transparent !important;
    box-shadow: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    padding: 12px 16px 16px !important;
    margin-top: auto !important;
  }

  /* Карточка заказа «как на ПК» (фон/бордеры) */
  #cart-drawer .cart-item{
    background: var(--game-panel-2) !important;
    border: var(--game-border) !important;
    border-radius: var(--game-radius) !important;
  }

  /* Без лишних «пустых» отступов снизу */
  #cart-drawer .cart-drawer__body,
  #cart-drawer .cart-drawer__content{
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
  }
  #cart-drawer .cart-drawer__sheet > *:last-child,
  #cart-drawer .cart-drawer__body > *:last-child{
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Служебные «спейсеры»/тени — off */
  #cart-drawer .sheet-spacer,
  #cart-drawer [data-spacer],
  #cart-drawer .spacer,
  #cart-drawer .cart-drawer__bottom,
  #cart-drawer .drawer-bottom,
  #cart-drawer .bottom-shadow,
  #cart-drawer .cart-bottom-sheet{
    display: none !important;
    height: 0 !important;
    content: none !important;
  }

  /* На мобайле заголовок карточки делаем на две строки */
  .card-title{ --title-maxch: 12.5ch; }
}

/* ≤919px — "Плюс" под ценой, счётчик на всю ширину */
@media (max-width: 919px){
  .product-card .price-row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px;
    align-items: center;
  }
  .product-card .add-btn{
    justify-self: center !important;
  }
  .product-card .price-row .counter{
    justify-self: stretch !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 0 8px;
  }
  .product-card .counter .dec{ justify-self: start; }
  .product-card .counter .count{
    justify-self: center;
    min-width: 2ch;
    text-align: center;
    font-weight: 600;
  }
  .product-card .counter .inc{ justify-self: end; }
}

/* ≤685px — Принудительный перенос навигации в две строки */
@media (max-width: 685px){
  .navigation .page-1400{
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    row-gap: var(--space-4) !important;
  }
  /* Левая часть навигации (хлебные крошки) - первая строка */
  .navigation .nav-crumbs{
    flex: 0 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    order: 1 !important;
  }
  /* Переключатель - вторая строка */
  .navigation .page-1400 > #nav-mode-switch,
  .navigation .mode-switch{
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: max-content !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: static !important;
    order: 2 !important;
  }
}

/* ≤699px — Мобильная навигация и шапка */
@media (max-width: 699px){
  /* Навигация: по умолчанию пытаемся в 1 строку */
  .navigation .page-1400{
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 35px !important;
    width: 100% !important;
  }
  .navigation .nav-crumbs{
    flex: 0 1 auto !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .navigation .nav-crumbs .navigation-sep{
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    line-height: 1 !important;
    margin: 0 8px !important;
    vertical-align: middle !important;
  }
  /* Переключатель: такие же размеры как на 700px */
  #nav-mode-switch .mode-btn[data-mode="inapp"],
  #nav-mode-switch .mode-btn[data-mode="web"]{
    width: 110px !important;
    min-width: 110px !important;
    white-space: nowrap !important;
    padding: 8px 20px !important;
  }
  .navigation .page-1400 > #nav-mode-switch,
  .navigation .mode-switch{
    flex: 0 0 auto !important;
    width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin-left: var(--space-4) !important;
    margin-right: 0 !important;
    position: static !important;
  }
  
  /* Если не влазит в одну строку - переключатель под текстом по центру (аккуратный перенос) */
  .navigation .page-1400.is-stacked{
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    row-gap: var(--space-4) !important;
  }
  .navigation .page-1400.is-stacked .nav-crumbs{
    flex: 0 0 100% !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: visible;
    text-overflow: clip;
  }
  .navigation .page-1400.is-stacked .mode-switch,
  .navigation .page-1400.is-stacked > #nav-mode-switch{
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 2 !important;
  }
  
  .navigation{
    margin-bottom: var(--space-3) !important;
  }
  
  /* Шапка: нижний край лого = нижний край переключателя (такие же стили как на 700px для плавного перехода) */
  .game-header{
    align-items: flex-end !important;
  }
  .game-logo{
    align-self: flex-end !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .game-header-content{
    display: flex !important;
    flex-direction: column !important;
    /* justify-content: flex-end применяется только для ≤530px, для 531-699px переопределяется ниже */
    justify-content: flex-end !important;
  }
  .page-title{
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .game-header .header-actions{
    margin-top: var(--space-3) !important;
  }
  /* Точное выравнивание нижнего края лого с переключателями */
  .navigation .page-1400{
    align-items: flex-end !important;
    padding-bottom: 0 !important;
  }
  .navigation .mode-switch,
  #nav-mode-switch{
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* 3 фильтра: 2 колонки (2+1), последний по центру */
  .game-header .header-actions[data-filters-count="3"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px;
    gap: 12px 14px;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:not(:last-child){
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(3){
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(4){
    display: none !important;
  }

  /* Каталог: 2 колонки */
  #products.products{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }
  /* Заголовок: до 3 строк на мобилке, чуть меньший шрифт — чтобы вмещался длинный текст */
  .product-card .card-title{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.25;
    min-height: calc(1.25em + 16px);
    max-height: calc(3 * 1.25em + 16px);
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: none;
  }
  .product-card .card-title .ct-top,
  .product-card .card-title .ct-rest{
    display: block;
  }
}

/* 531–641px — Сетка шапки (лого | контент) */
@media (min-width: 531px) and (max-width: 641px){
  .game-header{
    display: grid;
    grid-template-columns: 166px 1fr;
    column-gap: var(--space-5);
    align-items: start;
    margin-bottom: 32px;
  }
  .game-logo{
    grid-column: 1;
    width: 166px;
    height: 176px;
    object-fit: cover;
    margin: 0;
    align-self: start;
  }
  .game-header-content{
    grid-column: 2;
    display: flex;
    flex-direction: column;
    /* Переопределяем justify-content: flex-end из max-width: 699px */
    /* Используем space-between для выравнивания: тайтл вверху, переключатели внизу */
    justify-content: space-between !important;
    min-height: 176px;
  }
  .page-title{
    margin: 0 0 var(--space-3) 0 !important;
    line-height: 1.05;
    text-align: center;
    margin-inline: auto;
    text-wrap: balance;
    max-inline-size: 28ch;
    hyphens: none;
    overflow-wrap: break-word;
  }
  .game-header .header-actions{
    margin-block-start: 0;
    margin-top: 0 !important;
    align-content: end;
  }
  
  /* 1 фильтр: центрирован, ограниченная ширина */
  .game-header .header-actions[data-filters-count="1"]{
    display: flex !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="1"] .filter-btn{
    width: auto !important;
    max-width: 200px !important;
    min-width: 140px !important;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 2 фильтра: центрированы, в ряд */
  .game-header .header-actions[data-filters-count="2"]{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px 14px !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="2"] .filter-btn{
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 3 фильтра: 2 колонки (2+1), последний по центру */
  .game-header .header-actions[data-filters-count="3"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px;
    gap: 12px 14px;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:not(:last-child){
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(3){
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(4){
    display: none !important;
  }
  
  /* 5 фильтров: 2×3 сетка (2 колонки, 3 ряда), первые 4 в первых 2 строках, 5-я по центру */
  .game-header .header-actions[data-filters-count="5"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:not(:last-child){
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(5){
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  
  /* 4 фильтра: 2x2 сетка (как было) */
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]):not([data-filters-count="6"]),
  .game-header .header-actions[data-filters-count="4"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 36px;
    gap: 12px 14px;
    justify-items: stretch;
  }
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]):not([data-filters-count="6"]) .filter-btn,
  .game-header .header-actions[data-filters-count="4"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 6 фильтров: 2x3 сетка, растягивается на всю ширину */
  .game-header .header-actions[data-filters-count="6"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="6"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  /* Навигация */
  .navigation .page-1400{
    align-items: center;
  }
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    margin-left: auto;
  }
  .navigation .page-1400.is-stacked{
    flex-direction: column !important;
    align-items: center !important;
    height: auto !important;
    gap: var(--space-4) !important;
  }
  .navigation .page-1400.is-stacked .nav-crumbs{
    width: 100%;
    justify-content: center;
  }
  .navigation .page-1400.is-stacked .mode-switch,
  .navigation .page-1400.is-stacked #nav-mode-switch{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ≤530px — Мобильная шапка: лого убрать */
@media (max-width: 530px){
  .game-header{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 14px !important;
    margin-bottom: var(--space-6) !important;
  }
  .game-logo{ display: none !important; }
  .page-title{
    order: 1 !important;
    margin: 0 !important;
    text-align: center !important;
    max-width: 100% !important;
    text-wrap: balance !important;
    line-height: 1.15 !important;
  }
  .game-header .header-actions{
    order: 2 !important;
    width: 100% !important;
    margin: var(--space-4) 0 0 !important;
  }
  .game-header .header-actions > *{ min-width: 0 !important; }
  .game-header .filter-btn{
    height: 38px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  
  /* 1 фильтр: центрирован, ограниченная ширина */
  .game-header .header-actions[data-filters-count="1"]{
    display: flex !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="1"] .filter-btn{
    width: auto !important;
    max-width: 200px !important;
    min-width: 140px !important;
  }
  
  /* 2 фильтра: центрированы, в ряд */
  .game-header .header-actions[data-filters-count="2"]{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="2"] .filter-btn{
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
  
  /* 3 фильтра: 2 колонки (2+1) */
  .game-header .header-actions[data-filters-count="3"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 14px !important;
    row-gap: 12px !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(1),
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(2){
    width: 100% !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(3){
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 38px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(4){
    display: none !important;
  }
  
  /* 5 фильтров: 2×3 сетка (2 колонки, 3 ряда), первые 4 в первых 2 строках, 5-я по центру */
  .game-header .header-actions[data-filters-count="5"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 38px 38px 38px !important;
    column-gap: 14px !important;
    row-gap: 12px !important;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:not(:last-child){
    width: 100% !important;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(5){
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 38px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  
  /* 4 фильтра: 2x2 сетка (как было) */
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]),
  .game-header .header-actions[data-filters-count="4"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 14px !important;
    row-gap: 12px !important;
  }
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]) .filter-btn,
  .game-header .header-actions[data-filters-count="4"] .filter-btn{
    width: 100% !important;
  }
}

/* ≤449px — В крошках только "Главная" */
@media (max-width: 449px){
  .navigation .nav-crumbs .navigation-sep{ display: none !important; }
  .navigation .nav-crumbs > :not(:first-child){ display: none !important; }
  .navigation{ margin-bottom: var(--space-4) !important; }
}

/* ≤399px — Каталог: 1 колонка + компактная крошка */
@media (max-width: 399px){
  #products.products{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }
  .nav-crumbs{
    font-size: clamp(11px, 3.3vw, 15px) !important;
  }
}

/* 642–699px — Сетка шапки (объединяем 642-681px и 682-699px для плавного перехода) */
@media (min-width: 642px) and (max-width: 699px){
  .game-header{
    display: grid;
    grid-template-columns: 166px 1fr;
    column-gap: var(--space-5);
    align-items: start;
    margin-bottom: 32px;
  }
  .game-logo{
    grid-column: 1;
    width: 166px;
    height: 176px;
    object-fit: cover;
    margin: 0;
    align-self: start;
  }
  .game-header-content{
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between !important;
    min-height: 176px;
  }
  .page-title{
    margin: 0 0 var(--space-3) 0 !important;
    line-height: 1.05;
    text-align: center;
    margin-inline: auto;
    text-wrap: balance;
    max-inline-size: 28ch;
    hyphens: none;
    overflow-wrap: break-word;
  }
  .game-header .header-actions{
    margin-block-start: 0;
    margin-top: 0 !important;
    align-content: end;
  }
  
  /* 1 фильтр: центрирован, ограниченная ширина */
  .game-header .header-actions[data-filters-count="1"]{
    display: flex !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="1"] .filter-btn{
    width: auto !important;
    max-width: 200px !important;
    min-width: 140px !important;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 2 фильтра: центрированы, в ряд */
  .game-header .header-actions[data-filters-count="2"]{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px 14px !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="2"] .filter-btn{
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 3 фильтра: 2 колонки (2+1), последний по центру */
  .game-header .header-actions[data-filters-count="3"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px;
    gap: 12px 14px;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:not(:last-child){
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(3){
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  .game-header .header-actions[data-filters-count="3"] .filter-btn:nth-child(4){
    display: none !important;
  }
  
  /* 5 фильтров: 2×3 сетка (2 колонки, 3 ряда), первые 4 в первых 2 строках, 5-я по центру */
  .game-header .header-actions[data-filters-count="5"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:not(:last-child){
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
    justify-self: stretch;
  }
  .game-header .header-actions[data-filters-count="5"] .filter-btn:nth-child(5){
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: center !important;
    align-self: center !important;
    width: calc((100% - 14px) / 2) !important;
    height: 36px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  
  /* 4 фильтра: 2x2 сетка (как было) */
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]):not([data-filters-count="6"]),
  .game-header .header-actions[data-filters-count="4"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 36px;
    gap: 12px 14px;
    justify-items: stretch;
  }
  .game-header .header-actions:not([data-filters-count="1"]):not([data-filters-count="2"]):not([data-filters-count="3"]):not([data-filters-count="5"]):not([data-filters-count="6"]) .filter-btn,
  .game-header .header-actions[data-filters-count="4"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  
  /* 6 фильтров: 2x3 сетка, растягивается на всю ширину */
  .game-header .header-actions[data-filters-count="6"]{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 36px 36px 36px;
    gap: 12px 14px;
    justify-items: stretch;
    width: 100%;
  }
  .game-header .header-actions[data-filters-count="6"] .filter-btn{
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
    justify-content: center;
  }
  /* Навигация */
  .navigation .page-1400{
    align-items: center;
    justify-content: space-between;
  }
  .navigation .mode-switch,
  .navigation #nav-mode-switch{
    margin-left: auto;
  }
  .navigation .page-1400.is-stacked{
    flex-direction: column !important;
    align-items: center !important;
    height: auto !important;
    gap: var(--space-4) !important;
    justify-content: center !important;
  }
  .navigation .page-1400.is-stacked .nav-crumbs{
    width: 100%;
    justify-content: center;
  }
  .navigation .page-1400.is-stacked .mode-switch,
  .navigation .page-1400.is-stacked #nav-mode-switch{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ========================== UID HELP BUTTON ========================== */
/* Обёртка для input с кнопкой помощи внутри */
.pay-modal__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  /* Красивая подсветка для активных инпутов, как у поиска на главной */
  box-shadow: inset 0 0 0 1.5px rgba(167,94,255,.35);
  transition: box-shadow 0.2s ease;
}
.pay-modal__input-wrapper:focus-within {
  box-shadow:
    inset 0 0 0 1.5px var(--game-brand, #a855f7),
    0 0 14px var(--game-brand-soft, rgba(168,85,255,.35));
}

/* Кнопка помощи внутри поля ввода */
.pay-modal__help-btn--inside {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  z-index: 1;
}
.pay-modal__help-btn--inside:hover {
  color: var(--game-brand, #a855f7);
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-50%) scale(1.05);
}
.pay-modal__help-btn--inside:active {
  transform: translateY(-50%) scale(0.98);
}
.pay-modal__help-btn--inside svg {
  width: 16px;
  height: 16px;
}

/* Добавляем padding-right для input, чтобы текст не перекрывался с кнопкой */
.pay-modal__input-wrapper .pay-modal__input {
  padding-right: 46px; /* Место для кнопки (28px + 10px справа + 8px отступ) */
}

/* ========================== UID HELP MODAL ========================== */
.uid-help-modal {
  position: fixed;
  inset: 0;
  z-index: 100000; /* Выше, чем pay-modal */
  display: none; /* По умолчанию скрыта */
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}
.uid-help-modal[aria-hidden="false"]:not([hidden]) {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.uid-help-modal[hidden],
.uid-help-modal[aria-hidden="true"] {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.uid-help-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.uid-help-modal__window {
  position: relative;
  z-index: 2;
  width: clamp(300px, 90vw, 600px);
  background: #11131b;
  color: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.75);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 90vh;
  overflow-y: auto;
}

.uid-help-modal__content {
  width: 100%;
}

.uid-help-modal__text {
  color: #fff;
  line-height: 1.6;
}

.uid-help-modal__text h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
}

.uid-help-modal__text ol {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.uid-help-modal__text li {
  margin-bottom: 12px;
}

.uid-help-modal__text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.uid-help-modal__text p {
  margin: 16px 0 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.uid-help-modal__close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: var(--close-btn-size, 32px);
  height: var(--close-btn-size, 32px);
  background: var(--close-btn-base-bg, rgba(255, 255, 255, 0.08));
  border: none;
  border-radius: var(--close-btn-border-radius, 50%); /* Круглые */
  color: var(--close-btn-base-color, var(--game-muted, #9ca3af));
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
}
.uid-help-modal__close:hover {
  background: var(--close-btn-hover-bg, rgba(168, 85, 247, 0.15));
  color: var(--close-btn-hover-color, var(--game-brand, #a855f7));
  /* Используем токен для единого hover-эффекта (адаптируем для игр) */
  box-shadow:
    inset 0 0 0 1px var(--game-brand, #a855f7),
    0 0 8px var(--game-brand-soft, rgba(168,85,255,.35));
}

.uid-help-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 8px;
}

.uid-help-modal__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================== NICKNAME & SERVER FIELDS ========================== */
/* Readonly поля для автоматически заполненных данных */
/* Усиленная специфичность для переопределения всех других правил */
.pay-modal__input--readonly,
input.pay-modal__input--readonly,
input[readonly].pay-modal__input,
input[name="nickname"].pay-modal__input,
input[name="server"].pay-modal__input,
.pay-modal__field input[name="nickname"],
.pay-modal__field input[name="server"],
#order-nickname,
#order-server,
#webpay-nickname,
#webpay-server,
.pay-modal__field #order-nickname,
.pay-modal__field #order-server,
.pay-modal__field #webpay-nickname,
.pay-modal__field #webpay-server {
  background: rgba(34, 197, 94, 0.12) !important; /* Зеленый фон */
  border: 1px solid rgba(255, 255, 255, 0.08) !important; /* Обычная граница без фиолетового */
  border-color: rgba(255, 255, 255, 0.08) !important; /* Обычная граница без фиолетового */
  color: var(--game-text, #f9fafb) !important;
  cursor: default !important;
  pointer-events: none !important; /* Запрещаем взаимодействие */
  user-select: none !important; /* Запрещаем выделение текста */
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  opacity: 0.9;
  touch-action: none !important; /* Запрещаем touch события на мобильных */
  box-shadow: none !important; /* Убираем все тени */
}

/* Переопределяем hover и focus для readonly полей - убираем фиолетовый */
/* Максимальная специфичность для переопределения всех правил */
.pay-modal__input--readonly:hover,
.pay-modal__input--readonly:focus,
.pay-modal__input--readonly:active,
input.pay-modal__input--readonly:hover,
input.pay-modal__input--readonly:focus,
input.pay-modal__input--readonly:active,
input[readonly].pay-modal__input:hover,
input[readonly].pay-modal__input:focus,
input[readonly].pay-modal__input:active,
#order-nickname:hover,
#order-nickname:focus,
#order-nickname:active,
#order-server:hover,
#order-server:focus,
#order-server:active,
#webpay-nickname:hover,
#webpay-nickname:focus,
#webpay-nickname:active,
#webpay-server:hover,
#webpay-server:focus,
#webpay-server:active,
.pay-modal__field input[name="nickname"]:hover,
.pay-modal__field input[name="nickname"]:focus,
.pay-modal__field input[name="nickname"]:active,
.pay-modal__field input[name="server"]:hover,
.pay-modal__field input[name="server"]:focus,
.pay-modal__field input[name="server"]:active,
.pay-modal__field #order-nickname:hover,
.pay-modal__field #order-nickname:focus,
.pay-modal__field #order-server:hover,
.pay-modal__field #order-server:focus,
.pay-modal__field #webpay-nickname:hover,
.pay-modal__field #webpay-nickname:focus,
.pay-modal__field #webpay-server:hover,
.pay-modal__field #webpay-server:focus {
  border: 1px solid rgba(255, 255, 255, 0.08) !important; /* Обычная граница без фиолетового */
  border-color: rgba(255, 255, 255, 0.08) !important; /* Обычная граница без фиолетового */
  background: rgba(34, 197, 94, 0.12) !important; /* Зеленый фон */
  box-shadow: none !important;
  outline: none !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* Индикатор загрузки для полей */
.pay-modal__field--loading {
  position: relative;
}

.pay-modal__field--loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-top-color: var(--game-brand, #a855f7);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  pointer-events: none;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Заполненные поля (успешная валидация) */
/* Стили для успешно заполненных полей (зеленый фон) */
.pay-modal__input--filled,
.pay-modal__input--readonly.pay-modal__input--filled,
input.pay-modal__input--readonly.pay-modal__input--filled,
input[readonly].pay-modal__input--filled,
#order-nickname.pay-modal__input--filled,
#order-server.pay-modal__input--filled,
#webpay-nickname.pay-modal__input--filled,
#webpay-server.pay-modal__input--filled {
  background: rgba(34, 197, 94, 0.12) !important; /* Зеленый фон вместо фиолетового */
  border-color: rgba(255, 255, 255, 0.08) !important; /* Обычная граница, без зеленой подсветки */
  color: var(--game-text, #f9fafb) !important;
  box-shadow: none !important; /* Убираем зеленую тень */
  position: relative;
  padding-right: 36px !important; /* Место для галочки */
}

/* Убеждаемся, что readonly поля всегда зеленые, даже с классом filled */
.pay-modal__input--readonly.pay-modal__input--filled:hover,
.pay-modal__input--readonly.pay-modal__input--filled:focus,
input.pay-modal__input--readonly.pay-modal__input--filled:hover,
input.pay-modal__input--readonly.pay-modal__input--filled:focus,
input[readonly].pay-modal__input--filled:hover,
input[readonly].pay-modal__input--filled:focus,
#order-nickname.pay-modal__input--filled:hover,
#order-nickname.pay-modal__input--filled:focus,
#order-server.pay-modal__input--filled:hover,
#order-server.pay-modal__input--filled:focus,
#webpay-nickname.pay-modal__input--filled:hover,
#webpay-nickname.pay-modal__input--filled:focus,
#webpay-server.pay-modal__input--filled:hover,
#webpay-server.pay-modal__input--filled:focus {
  background: rgba(34, 197, 94, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

/* Галочка через JavaScript элемент - позиционируется внутри input-wrapper */
.pay-modal__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pay-modal__checkmark {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(34, 197, 94, 1);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Для полей с кнопкой помощи внутри - сдвигаем галочку левее */
.pay-modal__input-wrapper:has(.pay-modal__help-btn--inside) .pay-modal__checkmark {
  right: 48px; /* Сдвигаем левее, чтобы не перекрывалась с кнопкой помощи */
}

@media (max-width: 520px) {
  .uid-help-modal__window {
    width: 95%;
    padding: 20px;
  }
  
  /* Модалка оплаты для мобильных */
  .pay-modal__window {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px 20px;
    border-radius: 16px;
    margin: 12px;
  }
  
  .pay-modal__title {
    font-size: 20px;
  }
  
  .pay-modal__form {
    gap: 16px;
    margin: 24px 0 12px;
  }
  
  .pay-modal__actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  
  .pay-modal__back-btn,
  .pay-modal__submit-btn {
    width: 100%;
    min-height: 48px;
  }
  
  /* Принудительно применяем стиль для iOS Safari - используем токены как у .btn-pay */
  .pay-modal__submit-btn,
  .pay-modal__submit {
    background: var(--game-panel-2, #1a1d26) !important;
    border: none !important; /* Убираем border полностью */
    color: var(--game-brand, #a855f7) !important; /* Как у .btn-pay */
    font-weight: 700 !important; /* Как у .btn-pay */
    /* Используем токены для единого стиля, как у .btn-pay */
    box-shadow: var(--pay-btn-active-shadow) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 10px !important;
  }
}

/* ========================================================================
   КРИТИЧЕСКИ ВАЖНО: Переопределение border для readonly полей
   Размещено в конце файла для максимального приоритета
   ======================================================================== */
.pay-modal__field #order-nickname,
.pay-modal__field #order-server,
.pay-modal__field #webpay-nickname,
.pay-modal__field #webpay-server,
.pay-modal__field input[name="nickname"].pay-modal__input--readonly,
.pay-modal__field input[name="server"].pay-modal__input--readonly,
.pay-modal__field input[readonly][name="nickname"],
.pay-modal__field input[readonly][name="server"],
#order-nickname.pay-modal__input--readonly,
#order-server.pay-modal__input--readonly,
#webpay-nickname.pay-modal__input--readonly,
#webpay-server.pay-modal__input--readonly,
input#order-nickname.pay-modal__input--readonly,
input#order-server.pay-modal__input--readonly,
input#webpay-nickname.pay-modal__input--readonly,
input#webpay-server.pay-modal__input--readonly,
.pay-modal__field input[name="nickname"],
.pay-modal__field input[name="server"] {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(34, 197, 94, 0.12) !important;
  box-shadow: none !important;
  outline: none !important;
}

.pay-modal__field #order-nickname:hover,
.pay-modal__field #order-nickname:focus,
.pay-modal__field #order-nickname:active,
.pay-modal__field #order-server:hover,
.pay-modal__field #order-server:focus,
.pay-modal__field #order-server:active,
.pay-modal__field #webpay-nickname:hover,
.pay-modal__field #webpay-nickname:focus,
.pay-modal__field #webpay-nickname:active,
.pay-modal__field #webpay-server:hover,
.pay-modal__field #webpay-server:focus,
.pay-modal__field #webpay-server:active,
.pay-modal__field input[name="nickname"].pay-modal__input--readonly:hover,
.pay-modal__field input[name="nickname"].pay-modal__input--readonly:focus,
.pay-modal__field input[name="nickname"].pay-modal__input--readonly:active,
.pay-modal__field input[name="server"].pay-modal__input--readonly:hover,
.pay-modal__field input[name="server"].pay-modal__input--readonly:focus,
.pay-modal__field input[name="server"].pay-modal__input--readonly:active,
input#order-nickname.pay-modal__input--readonly:hover,
input#order-nickname.pay-modal__input--readonly:focus,
input#order-nickname.pay-modal__input--readonly:active,
input#order-server.pay-modal__input--readonly:hover,
input#order-server.pay-modal__input--readonly:focus,
input#order-server.pay-modal__input--readonly:active,
input#webpay-nickname.pay-modal__input--readonly:hover,
input#webpay-nickname.pay-modal__input--readonly:focus,
input#webpay-nickname.pay-modal__input--readonly:active,
input#webpay-server.pay-modal__input--readonly:hover,
input#webpay-server.pay-modal__input--readonly:focus,
input#webpay-server.pay-modal__input--readonly:active {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(34, 197, 94, 0.12) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
  .pay-modal__window {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 20px 16px;
    margin: 8px;
  }
  
  .pay-modal__title {
    font-size: 18px;
  }
}

/* Исправление для iOS Safari - принудительно применяем единый стиль */
@supports (-webkit-touch-callout: none) {
  .pay-modal__submit-btn,
  .pay-modal__submit,
  button.pay-modal__submit-btn,
  button.pay-modal__submit {
    background: var(--game-panel-2, #1a1d26) !important;
    border: none !important; /* Убираем border полностью */
    color: var(--game-brand, #a855f7) !important; /* Как у .btn-pay */
    font-weight: 700 !important; /* Как у .btn-pay */
    /* Используем токены для единого стиля, как у .btn-pay */
    box-shadow: var(--pay-btn-active-shadow) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .pay-modal__submit-btn:active,
  .pay-modal__submit:active,
  button.pay-modal__submit-btn:active,
  button.pay-modal__submit:active {
    background: var(--game-panel-2, #1a1d26) !important;
    border: none !important;
    color: var(--game-brand, #a855f7) !important;
  }
  
  .pay-modal__submit-btn:hover:not(:disabled),
  .pay-modal__submit:hover:not(:disabled),
  button.pay-modal__submit-btn:hover:not(:disabled),
  button.pay-modal__submit:hover:not(:disabled),
  #pay-fk-submit:hover:not(:disabled),
  #webpay-submit-btn:hover:not(:disabled) {
    background: var(--game-panel-2, #1a1d26) !important;
    /* Усиление свечения при hover, как у .btn-pay */
    color: var(--game-brand, #a855f7) !important;
    text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35)) !important;
    box-shadow: var(--pay-btn-hover-enhanced) !important;
  }
  /* Hover для кнопки "Назад" */
  .pay-modal__back-btn:hover {
    /* Заменяем базовый border (box-shadow) на подсветку */
    color: var(--game-brand, #a855f7) !important;
    text-shadow: 0 0 8px var(--game-brand-soft, rgba(168,85,255,.35)) !important;
    box-shadow: var(--button-hover-shadow) !important;
  }
}

/* Дополнительные стили для всех кнопок в модалке на iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .pay-modal__submit-btn,
  .pay-modal__submit {
    -webkit-appearance: none !important;
    appearance: none !important;
  }
}




