/* Xterium Portal v2 — Home styles, xh-* prefix */

/* ============================================
   XTERIUM HOMEPAGE — styles.css
   All classes prefixed: xh-
   No aggressive global reset
   ============================================ */

/* Wave 720 (2026-05-28): `overscroll-behavior-y: contain` убран с html/body —
   owner-feedback: мешал обычному скроллу страницы. По спеке overscroll-behavior
   должен стоять только на вложенных блоках (модалки, дроверы), не на корне.
   См. правило для модалок/меню ниже. */
html { overflow-x: clip; }

/* Hard lock background scroll when modal/menu open — глобально, на всех размерах
   (раньше было только в @media max-width: 640px, не покрывало планшеты). */
html.body-modalShow,
html:has(body.body-modalShow),
html:has(body.body-menuShow) {
  overflow: hidden !important;
  height: 100% !important;
}
body.body-modalShow,
body.body-menuShow {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: contain !important;  /* блокировка скролла попадает на body, не на html */
}

.xh-page {
  /* ЕДИНЫЙ ИСТОЧНИК общих токенов --xh-* — unified-header.css (грузится сразу ПОСЛЕ этого файла
     и объявляет их под .xh-page → его значения и так применяются на портале, а на форуме это
     вообще единственный источник). Поэтому общие токены здесь НЕ дублируем (убраны при
     унификации 2026-06-06: упрощаем, не тянем мёртвый дубль). Ниже — только ПОРТАЛ-УНИКАЛЬНЫЕ
     токены, которых нет в unified-header.css. */
  --xh-bg-deep: #060a14;
  --xh-bg-primary: #0a0f1c;      /* портал-уникальная: unified объявляет её только для форума, не под .xh-page */
  --xh-text-dim: #9aa6bd;        /* alias для модалок */
  --xh-border-input: #34456a;    /* border полей формы */
  --xh-link-blue: #5fa8d1;       /* WCAG-AA синяя ссылка */
  --xh-orange-deep: #c46c14;     /* затемнённый оранжевый для CTA на светлом */
  --xh-blue: #2a7de1;
  /* Аутентичные цвета ресурсов из CSS игры */
  --xh-res-metal: #a47d7a;       /* 901 */
  --xh-res-crystal: #5ca6aa;     /* 902 */
  --xh-res-deuterium: #339966;   /* 903 */
  --xh-res-energy: #e09a3a;      /* 911 — янтарный из палитры игры z.color.css */
  --xh-bg-placeholder-grad: linear-gradient(135deg, #0d1830 0%, #162040 100%); /* placeholder-карточки */
  /* 2026-05-21: merged from 2nd .xh-page block (layout) */
  margin: 0; padding: 0;
  font-family: var(--xh-font-body);
  font-size: 16px; line-height: 1.6;
  color: var(--xh-text);
  background: var(--xh-bg-deep);
  -webkit-font-smoothing: antialiased;
  /* 2026-05-21: overflow-x moved from body to html — body overflow propagation breaks position:sticky on narrow viewports. */
}
.xh-page *, .xh-page *::before, .xh-page *::after { box-sizing: border-box; }
.xh-page img { max-width: 100%; height: auto; display: block; }
.xh-page a:not([class*="xh-btn"]) { color: inherit; }
.xh-page a { text-decoration: none; }
.xh-page button { font-family: inherit; cursor: pointer; border: none; background: none; }
.xh-page ul, .xh-page ol { list-style: none; margin: 0; padding: 0; }
.xh-page h1,.xh-page h2,.xh-page h3,.xh-page h4 { margin: 0; font-family: var(--xh-font-heading); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.xh-page p { text-wrap: pretty; }
.xh-container { width: 100%; max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); }
.xh-page::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(20,50,100,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 80%, rgba(20,40,80,.1) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
#xh-stars-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; }@media (min-width: 769px) {
  .xh-header {
    background: var(--xh-bg-header);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
}
/* 2026-05-21 STICKY-FIX: position:sticky breaks on narrow mobile when ancestor has overflow-x:hidden.
   On <769px viewport — use position:fixed + body padding-top so header is always visible. */
@media (max-width: 768px) {
  .xh-header {
    position: fixed; top: 0; left: 0; right: 0;
  }
  .xh-page {
    padding-top: var(--xh-header-h);
  }
}.xh-logo { display: flex; align-items: baseline; gap: 0; flex-shrink: 0; margin-right: 16px; }/* .xh-logo-sub removed — markup не использует этот класс */
.xh-nav { display: flex; gap: 4px; flex: 1; align-items: center; }.xh-header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-shrink: 0; }/* Wave J Phase B 2026-05-20: contrast bump. Раньше #FFCC00 на rgba(255,204,0,.14)
   поверх dark = 1.6:1 (fail 4.5:1 AA). Теперь solid dark bg + bright yellow = ~13:1. */
.xh-lang-soon-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #1a1407;
  color: #FFCC00;
  border-radius: 999px;
  vertical-align: middle;
}
.xh-login-link { font-family: var(--xh-font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--xh-text); padding: 9px 18px; border: 1px solid var(--xh-border-light); border-radius: var(--xh-radius); transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); }
.xh-login-link:hover { border-color: var(--xh-text-secondary); background: rgba(255,255,255,.04); }

/* BUTTONS */
.xh-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--xh-font-heading); font-weight: 700; font-size: 15px;
  padding: 10px 24px; border-radius: var(--xh-radius);
  letter-spacing: .5px; text-transform: uppercase;
  transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); white-space: nowrap;
}/* 2026-05-25: WCAG 2.2 SC 2.4.7 Focus Visible — все интерактивные элементы Базы знаний */
.xh-page a:focus-visible,
.xh-page button:focus-visible,
.xh-page input:focus-visible,
.xh-page summary:focus-visible,
.xh-page [tabindex]:focus-visible { outline: 2px solid var(--xh-orange); outline-offset: 2px; border-radius: 4px; }
.xh-btn--primary { background: var(--xh-orange); color: var(--xh-orange-text); font-weight: 800; box-shadow: 0 0 20px var(--xh-orange-glow); }
.xh-btn--primary:hover { background: var(--xh-orange-hover); color: var(--xh-orange-text); box-shadow: 0 0 30px rgba(232,132,30,.4); transform: translateY(-1px); }
.xh-btn--outline { background: transparent; color: var(--xh-text); border: 1px solid var(--xh-border-light); }
.xh-btn--outline:hover { border-color: var(--xh-text-secondary); background: rgba(255,255,255,.04); }.xh-btn--lg { font-size: 17px; padding: 14px 36px; }
/* BURGER */
.xh-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 10px; background: transparent; border: 0; cursor: pointer; }.xh-mobile-menu {
  -webkit-backdrop-filter: blur(12px);
  display: none; position: fixed; top: var(--xh-header-h); left: 0; right: 0; bottom: 0;
  background: rgba(6,10,20,.96); backdrop-filter: blur(12px);
  z-index: 99; padding: 24px 32px; flex-direction: column; gap: 4px; overflow-y: auto;
}
.xh-mobile-menu.is-open { display: flex; }
.xh-mobile-menu a:not([class*="xh-btn"]) {
  font-family: var(--xh-font-heading); font-size: 18px; font-weight: 600;
  padding: 14px 0; color: var(--xh-text-secondary);
  border-bottom: 1px solid var(--xh-border); transition: color var(--xh-transition);
}
.xh-mobile-menu a:not([class*="xh-btn"]):hover { color: var(--xh-text); }
.xh-mobile-menu .xh-btn { margin-top: 16px; justify-content: center; border: 0; }
.xh-mobile-menu .xh-btn--primary { color: var(--xh-orange-text); border-bottom: 0; }

/* Authed: показ ника игрока в мобильном меню (owner request 2026-05-16). */
.xh-mobile-user {
  margin: 8px 0 4px; padding: 14px 16px;
  background: rgba(255,204,0,.08); border: 1px solid rgba(255,204,0,.25); border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.xh-mobile-user-label { font-size: 12px; font-weight: 500; color: var(--xh-text-secondary); text-transform: uppercase; letter-spacing: .08em; }
.xh-mobile-user-name { font-family: var(--xh-font-heading); font-size: 20px; font-weight: 700; color: var(--xh-yellow, #FFCC00); }

/* Mobile: список вселенных для авторизованного юзера. */
.xh-mobile-universes {
  margin: 16px 0 8px; padding: 14px 0;
  border-top: 1px solid var(--xh-border);
}
.xh-mobile-universes__heading {
  font-size: 11px; font-weight: 700; color: var(--xh-text-muted, #8a99b0);
  text-transform: uppercase; letter-spacing: .1em; padding: 0 4px 8px;
}
.xh-mobile-universe-item {
  display: flex !important; align-items: center; justify-content: space-between;
  padding: 12px 14px !important; margin: 4px 0; border-bottom: 0 !important;
  background: rgba(255,255,255,.03); border: 1px solid var(--xh-border);
  border-radius: 8px; transition: border-color var(--xh-transition), background var(--xh-transition);
  font-size: 16px !important; font-weight: 600 !important;
}
.xh-mobile-universe-item:hover { border-color: rgba(232,132,30,.5); background: rgba(232,132,30,.06); }
.xh-mobile-universe-name { color: var(--xh-text); }
.xh-mobile-universe-ver { font-size: 11px; color: var(--xh-text-muted, #8a99b0); font-weight: 500; font-family: var(--xh-font-mono, monospace); }

/* .xh-user / .xh-user-nick (база + PC @media) — ЕДИНЫЙ источник: unified-header.css
   (грузится ПОСЛЕ home.css). Раньше здесь была расходящаяся копия: .xh-user с flex-shrink:0
   и .xh-user-nick без обрезки → на портале ник вёл себя иначе, чем на форуме (у форума только
   unified: min-width:0 + обрезка «…», бургер цел). Убрано 2026-06-06 для жёсткой унификации шапки. */
/* Wave J Phase 2 2026-05-20: user-dropdown — single column (раньше наследовался 2-col grid от
   xh-lang-dropdown что для языков работало, но смешивало universes/settings/logout в кривые колонки). */
.xh-user-dropdown {
  min-width: 260px;
  grid-template-columns: 1fr !important;
}
/* Wave J Phase H+ 2026-05-21 v3 — restored legacy flex-center подход.
   Mask = flex-контейнер, modal-body = relative карточка с auto-height и scroll. */
#modal-mask {
    display: none; /* jQuery fadeIn ставит inline display:block; селектор .body-modalShow ниже переключает на flex */
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(6,10,20,.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
    overflow-y: auto;
}
/* body.body-modalShow выставляется в modalShow() — используем как trigger чтобы заменить fadeIn's
   display:block на display:flex (без него flex-centering не работает). */
body.body-modalShow #modal-mask {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
#modal-mask .modal-body {
    display: none;
    background: #0c1426;
    border: 1px solid var(--xh-border);
    border-radius: var(--xh-radius-lg);
    padding: 32px;
    /* CRIT: override legacy position:absolute + width:320px из media/css/modal.css. */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 480px !important;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 0 auto;
}
#modal-mask #modal-reg { max-width: 560px !important; } /* шире для регистрации с captcha */
#modal-mask .modal-body.modal-show { display: block; }
body.body-modalShow { overflow: hidden; }
/* Override legacy fixed heights и absolute modal-content. */
#modal-mask #modal-login,
#modal-mask #modal-reg,
#modal-mask #modal-recover,
#modal-mask #modal-recoverend {
    height: auto !important;
}
#modal-mask .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 !important;
    overflow: visible !important;
}
#modal-mask .modal-close-mask { position: fixed; inset: 0; z-index: -1; cursor: pointer; }
#modal-mask .modal-title { font-family: var(--xh-font-display); font-size: 24px; color: var(--xh-text); margin-bottom: 20px; text-align: center; font-style: normal !important; font-weight: 700; height: auto; }
#modal-mask .modal-title span { display: block; font-size: 13px; color: var(--xh-text-dim); margin-top: 8px; font-family: var(--xh-font-body); }
#modal-mask .modal-title span span { display: inline; color: var(--xh-orange); cursor: pointer; text-decoration: underline; }
#modal-mask .modal-content { width: 100%; }
#modal-mask .modal-soc { margin-bottom: 16px; }
#modal-mask .modal-soc-icos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#modal-mask .modal-soc-sep { text-align: center; color: var(--xh-text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 16px 0; position: relative; }
#modal-mask .modal-soc-sep::before, #modal-mask .modal-soc-sep::after { content: ''; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; background: var(--xh-border); }
#modal-mask .modal-soc-sep::before { left: 0; }
#modal-mask .modal-soc-sep::after { right: 0; }
#modal-mask form { display: flex; flex-direction: column; gap: 12px; }
/* Wave J Phase F M-2 fix: idle border bump для WCAG 1.4.11 Non-text Contrast (≥3:1). Был --xh-border #162035 = 2.0:1 на card bg. */
#modal-mask .input-text, #modal-mask .select { background: rgba(255,255,255,.05); border: 1px solid var(--xh-border-input, #34456a); border-radius: var(--xh-radius-md); padding: 12px 14px; color: var(--xh-text); font-size: 14px; width: 100%; font-family: inherit; }
#modal-mask .input-text:focus, #modal-mask .select:focus { outline: none; border-color: var(--xh-orange); }
#modal-mask .modal-extra-text { text-align: center; font-size: 13px; }
#modal-mask .modal-extra-text a { color: var(--xh-text-dim); text-decoration: none; }
#modal-mask .modal-extra-text a:hover { color: var(--xh-orange); }
#modal-mask .btn { padding: 14px 20px; border-radius: var(--xh-radius-md); font-weight: 700; cursor: pointer; border: none; font-size: 14px; }
#modal-mask .btn-primary { background: var(--xh-orange); color: var(--xh-orange-text); font-weight: 700; }
#modal-mask .btn-primary:hover { background: var(--xh-orange-hover); }
#modal-mask .btn-big { font-size: 16px; padding: 16px; }
#modal-mask .modal-block { margin-bottom: 12px; }
#modal-mask .modal-policy-text, #modal-mask .recover-text { font-size: 12px; color: var(--xh-text-dim); line-height: 1.5; }
#modal-mask label { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--xh-text-dim); cursor: pointer; }
#modal-mask label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

/* HERO */
.xh-hero { position: relative; z-index: 1; min-height: 520px; padding: 56px 0 40px; overflow: hidden; display: flex; align-items: center; background: var(--xh-bg-deep); }
/* Hero как <picture>/<img> вместо CSS background-image — даёт LCP в 2-3x быстрее (preload + fetchpriority high).
   <picture> также position:absolute чтобы child <img> width/height: 100% работали корректно. */
.xh-hero > picture {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
}
/* Specificity boost: `.xh-page img { height: auto }` (строка 58) побивает по specificity без `.xh-hero`. */
.xh-hero .xh-hero-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
  aspect-ratio: auto;
  max-width: none;
}
/* .xh-hero-bg теперь — gradient overlay (без image, image отдельно в xh-hero-img выше). */
.xh-hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background: transparent;
  pointer-events: none;
}
.xh-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,10,20,.85) 0%, rgba(6,10,20,.5) 45%, transparent 70%),
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(6,10,20,.85) 100%);
}
@media (max-width: 860px) {
  /* Сильный мягкий gradient к bg-primary — нижние 30% сливаются полностью.
     Без mask-image (iOS Safari unreliable с radial mask). */
  .xh-hero-bg::after {
    background:
      linear-gradient(180deg,
        rgba(6,10,20,.30) 0%,
        rgba(6,10,20,.50) 35%,
        rgba(6,10,20,.80) 60%,
        rgba(6,10,20,.97) 80%,
        var(--xh-bg-primary) 95%);
  }
}
.xh-hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad);
  display: flex; align-items: center; justify-content: flex-start; gap: 40px;
}
.xh-hero-content { max-width: 560px; flex-shrink: 0; }
.xh-hero-title {
  font-family: var(--xh-font-display); font-size: clamp(38px, 4.8vw, 60px);
  line-height: 1.0; letter-spacing: 1px; color: #fff; margin: 0 0 10px; text-transform: uppercase;
  display: flex; flex-direction: column;
}
.xh-hero-title span { display: block; }
.xh-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.xh-hero-subtitle { font-family: var(--xh-font-heading); font-size: 18px; font-weight: 600; color: var(--xh-text); margin-bottom: 10px; letter-spacing: .3px; }
.xh-hero-desc { font-size: 15px; color: var(--xh-text-secondary); max-width: 460px; margin-bottom: 22px; line-height: 1.55; }

/* Hero eyebrow row — combined trust signals */
.xh-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 18px; padding: 7px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--xh-border-light); border-radius: 999px;
  font-family: var(--xh-font-heading); font-size: 12px; font-weight: 600;
  color: var(--xh-text-secondary); letter-spacing: .3px;
  flex-wrap: wrap;
}
.xh-hero-eyebrow strong { color: #fff; font-weight: 700; }
.xh-trust-pill { display: inline-flex; align-items: center; gap: 7px; }
.xh-trust-dot { width: 7px; height: 7px; border-radius: 50%; background: #20a868; box-shadow: 0 0 0 0 rgba(32,168,104,.6); animation: xh-pulse 2s infinite; flex-shrink: 0; }
.xh-trust-sep { width: 1px; height: 12px; background: var(--xh-border-light); display: inline-block; }
.xh-trust-rating { display: inline-flex; align-items: center; gap: 5px; }
.xh-trust-rating svg { width: 13px; height: 13px; color: #f5c542; flex-shrink: 0; }
.xh-trust-muted { color: var(--xh-text-muted); font-weight: 600; }
.xh-trust-season strong { color: var(--xh-orange); }

/* Wave J Phase C 2026-05-20 — hero CTA polish (conversion focus per owner feedback).
   Primary "В ИГРУ" получает stronger glow + size bump на mobile (где кнопка казалась теряющейся). */
.xh-hero-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.xh-hero-actions .xh-btn { flex-shrink: 0; }
.xh-hero-actions .xh-btn--primary {
  font-size: 16px;
  padding: 14px 28px;
  box-shadow: 0 0 28px var(--xh-orange-glow), 0 0 0 1px rgba(255, 140, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.xh-hero-actions .xh-btn--primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.25) 0%, transparent 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: xh-hero-cta-pulse 3.5s ease-in-out infinite;
}
@keyframes xh-hero-cta-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .xh-hero-actions .xh-btn--primary::after { animation: none; opacity: 0.5; }
}

/* Perks row under CTA */
.xh-hero-perks { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 22px; }
.xh-hero-perks span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--xh-text-secondary); font-family: var(--xh-font-heading); font-weight: 600; letter-spacing: .2px; }
.xh-hero-perks svg { width: 14px; height: 14px; color: #20a868; flex-shrink: 0; }

/* Ghost CTA — trailer button */
.xh-btn--ghost {
  background: transparent; color: var(--xh-text);
  border: 1px solid transparent; padding: 10px 16px;
}
.xh-btn--ghost svg { width: 18px; height: 18px; color: var(--xh-text); }
.xh-btn--ghost:hover { background: rgba(255,255,255,.05); border-color: var(--xh-border-light); }

.xh-hero-apps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xh-hero-apps-label { font-size: 12px; color: var(--xh-text-muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .5px; font-family: var(--xh-font-heading); font-weight: 600; }
.xh-store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border: 1px solid var(--xh-border-light);
  border-radius: var(--xh-radius); color: var(--xh-text);
  font-family: var(--xh-font-heading); font-weight: 600;
  transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); white-space: nowrap;
  background: rgba(255,255,255,.02);
}
.xh-store-badge:hover { border-color: var(--xh-text-secondary); background: rgba(255,255,255,.05); transform: translateY(-1px); }
.xh-store-badge svg { width: 22px; height: 22px; flex-shrink: 0; }
.xh-store-badge--browser svg { color: #4a9df5; }
.xh-store-badge--browser:hover { border-color: rgba(74,157,245,.5); box-shadow: 0 6px 20px rgba(74,157,245,.18); }
.xh-store-badge--gp svg { color: #3DDB85; }
.xh-store-badge--gp:hover { border-color: rgba(61,219,133,.5); box-shadow: 0 6px 20px rgba(61,219,133,.18); }
.xh-store-badge--as svg { color: #f5f6fa; }
.xh-store-badge--as:hover { border-color: rgba(245,246,250,.5); box-shadow: 0 6px 20px rgba(255,255,255,.10); }
.xh-store-badge-stack { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.xh-store-badge-stack strong { font-size: 13px; font-weight: 700; }
.xh-store-badge-stack small { font-size: 10px; color: var(--xh-text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* STATS BAR — open row, no card (sits between hero & galaxy card) */
.xh-stats { position: relative; z-index: 1; padding: 8px 0 8px; background: transparent; border-bottom: 1px solid var(--xh-border); border-top: 1px solid var(--xh-border); }
.xh-stats-inner { max-width: var(--xh-max-w); margin: 0 auto; padding: 18px 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.xh-stat { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 14px; min-width: 0; }
.xh-stat + .xh-stat { border-left: 1px solid var(--xh-border); padding-left: 24px; }
.xh-stat-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--xh-text-secondary); flex-shrink: 0; background: rgba(255,255,255,.03); border: 1px solid var(--xh-border); border-radius: 50%; }
.xh-stat-icon svg { width: 22px; height: 22px; }
.xh-stat-number { font-family: var(--xh-font-heading); font-size: 26px; font-weight: 700; color: var(--xh-text); line-height: 1.1; }
.xh-stat-label { font-size: 12px; color: var(--xh-text-muted); letter-spacing: .3px; line-height: 1.3; }

/* GALAXY */
.xh-galaxy { position: relative; z-index: 1; padding: 64px 0; }
.xh-galaxy-inner-wrap { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); }
.xh-galaxy-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #0d1424 0%, #0a0f1c 100%);
  border: 1px solid var(--xh-border-light); border-radius: var(--xh-radius-lg);
  padding: 40px;
}
/* Карта-галактики как integrated background (раньше была отдельной картинкой справа). */
.xh-galaxy-map-bg {
  position: absolute; right: -5%; top: 50%; transform: translateY(-50%);
  width: 70%; aspect-ratio: 1100 / 619;
  background-size: cover; background-position: center;
  opacity: .85; pointer-events: none;
}
.xh-galaxy-map-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #0d1424 0%, rgba(13,20,36,.85) 35%, rgba(13,20,36,.25) 70%, rgba(13,20,36,.7) 100%),
    radial-gradient(circle at 80% 50%, transparent 0%, rgba(13,20,36,.4) 60%);
}
@media (max-width: 860px) {
  /* На мобильном карта в нижней половине карточки — overlay убран в этой зоне чтобы
     карта была видна. Solid bg-card только в зоне где текст (верхние 50%). */
  .xh-galaxy-map-bg {
    width: 110%; right: -5%; left: -5%; top: 50%; bottom: 0; transform: none;
    aspect-ratio: auto; height: 50%;
    background-position: center top;
    background-size: cover;
    opacity: 1;
  }
  .xh-galaxy-map-overlay {
    background:
      linear-gradient(180deg,
        var(--xh-bg-card) 0%,
        var(--xh-bg-card) 48%,
        rgba(13,20,36,.55) 52%,
        rgba(13,20,36,0) 70%,
        rgba(13,20,36,0) 100%);
  }
}
.xh-galaxy-inner { display: flex; gap: 48px; align-items: flex-start; position: relative; z-index: 1; }
.xh-live-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--xh-font-heading); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--xh-text-secondary); margin-bottom: 16px;
}
/* .xh-live-dot: единое определение ниже на ~line 783 (с animation + --xh-green) */
/* Wave J Phase H+ 2026-05-21 — PageSpeed CLS fix: composited pulse animation.
   Раньше box-shadow expand → non-composited → блокирует main thread, влияет на CLS.
   Теперь transform+opacity → GPU composited, плавно даже под нагрузкой. */
.xh-trust-dot, .xh-live-dot { position: relative; }
.xh-trust-dot::after, .xh-live-dot::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: rgba(32,168,104,.7);
  animation: xh-pulse 2s infinite;
  will-change: transform, opacity;
  pointer-events: none;
}
@keyframes xh-pulse {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
.xh-galaxy-content { flex: 0 0 460px; max-width: 60%; }
@media (max-width: 860px) { .xh-galaxy-content { flex: 1; max-width: 100%; } }
.xh-galaxy-title { font-size: 28px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; color: #fff; }
.xh-galaxy-desc { font-size: 15px; color: var(--xh-text-secondary); margin-bottom: 28px; line-height: 1.6; }
/* Wave J Phase H 2026-05-20 — galaxy block уплотнён и cards-like вместо плоского списка (owner feedback "не улучшился"). */
.xh-galaxy-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.xh-galaxy-action {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: rgba(20, 35, 60, .45);
  border: 1px solid rgba(74, 157, 245, .12);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--xh-transition), border-color var(--xh-transition), transform var(--xh-transition);
}
.xh-galaxy-action:hover {
  background: rgba(28, 50, 84, .65);
  border-color: rgba(74, 157, 245, .35);
  transform: translateX(2px);
}
.xh-galaxy-action-icon {
  width: 40px; height: 40px; border-radius: var(--xh-radius);
  background: var(--xh-bg-card); border: 1px solid var(--xh-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.xh-galaxy-action-icon svg { width: 20px; height: 20px; color: var(--xh-blue); }
.xh-galaxy-action span { font-family: var(--xh-font-heading); font-size: 15px; font-weight: 600; color: var(--xh-text); }
.xh-galaxy-map { flex: 1; min-width: 0; }
.xh-galaxy-map svg { width: 100%; height: auto; }
.xh-galaxy-map-img { width: 100%; border-radius: var(--xh-radius-lg); border: 1px solid var(--xh-border); }

/* UNIVERSES */
.xh-universes { position: relative; z-index: 1; padding: 64px 0; }
.xh-universes-header { text-align: center; margin-bottom: 40px; }
.xh-universes-title {
  font-size: 26px; text-transform: uppercase; letter-spacing: 2px; color: #fff; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.xh-universes-title::before, .xh-universes-title::after { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--xh-border-light); }
.xh-universes-sub { font-size: 15px; color: var(--xh-text-secondary); }
.xh-universe-grid { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.xh-universe-card {
  position: relative; border: 1px solid var(--xh-border); border-radius: var(--xh-radius-lg);
  padding: 28px 24px; background: var(--xh-bg-card); overflow: hidden;
  transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); display: flex; flex-direction: column;
  min-height: 460px;
}
.xh-universe-card:hover { border-color: var(--xh-border-light); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.xh-universe-card--woa {
  border-color: rgba(232,132,30,.55);
  box-shadow: 0 0 0 1px rgba(232,132,30,.20) inset, 0 0 32px rgba(232,132,30,.10);
}
.xh-universe-card--woa:hover { border-color: rgba(232,132,30,.75); box-shadow: 0 0 0 1px rgba(232,132,30,.30) inset, 0 0 48px rgba(232,132,30,.18); }
.xh-universe-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--xh-font-heading); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px;
  background: var(--xh-orange); color: var(--xh-orange-text); border-radius: 999px;
  margin-bottom: 14px; align-self: flex-start;
  box-shadow: 0 0 14px var(--xh-orange-glow);
}
.xh-universe-badge::before { content: '★'; font-size: 11px; }
.xh-universe-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.xh-universe-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.xh-universe-icon svg { width: 32px; height: 32px; }
.xh-universe-name { font-family: var(--xh-font-heading); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; line-height: 1.1; }
.xh-universe-name-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xh-universe-meta { font-family: var(--xh-font-body); font-size: 12px; font-weight: 400; color: var(--xh-text-muted); letter-spacing: .2px; text-transform: none; }
.xh-universe-features { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; flex: 1; }
.xh-universe-feature { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--xh-text-secondary); }
.xh-universe-feature::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.xh-universe-card--woa .xh-universe-feature::before { background: var(--xh-orange); }
.xh-universe-card--classic .xh-universe-feature::before { background: var(--xh-blue); }
.xh-universe-card--reborn .xh-universe-feature::before { background: var(--xh-teal); }
.xh-universe-platforms { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; font-size: 13px; color: var(--xh-text-muted); }
.xh-universe-platforms svg { width: 16px; height: 16px; }
.xh-universe-platforms span { display: flex; align-items: center; gap: 5px; }
.xh-universe-card .xh-btn { align-self: stretch; justify-content: center; }
.xh-universe-cta { margin-top: auto; }
.xh-universe-card-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
}
.xh-universe-card > *:not(.xh-universe-card-bg) { position: relative; z-index: 1; }
.xh-universe-card-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,19,34,0) 0%, rgba(12,19,34,.25) 45%, rgba(12,19,34,.85) 100%);
}
/* WebP direct (image-set с type() имеет render-bug в Chromium — image renders only first url).
   Chromium 86+, Safari 14+, Firefox 65+ поддерживают WebP — ~99% trafic. */
/* Wave J Phase 3 2026-05-20: fixed missing image paths (был 404 на каждой главной).
   Wave J Phase H 2026-05-20: WoA card получает battle scene (thematic + visually distinct от Classic). */
/* Wave J Phase H 2026-05-20 — TOP blocks на /universes/{slug} (alliances / battles / players placeholders). */
.xw-top { max-width: var(--xh-max-w); margin: 56px auto; padding: 0 var(--xh-container-pad); }
.xw-top-wrap {
  background: rgba(12, 19, 34, .55);
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-lg);
  padding: 28px 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.xw-top-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.xw-top-title { font-family: var(--xh-font-display); font-size: clamp(20px, 2.4vw, 26px); margin: 0; color: var(--xh-text); }
.xw-top-update { font-size: 12px; color: var(--xh-text-muted); font-family: var(--xh-font-mono, monospace); }
.xw-top-note { margin: 16px 0 0; font-size: 11px; color: var(--xh-text-secondary); font-style: italic; } /* a11y: убран opacity:.6 (контраст), цвет → secondary (6.16:1) */

/* Top-table — table-like rows для alliances + battles head. */
.xw-top-table { display: flex; flex-direction: column; gap: 4px; }
.xw-top-row {
  display: grid;
  grid-template-columns: 50px 1fr 80px 130px 70px;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--xh-radius);
  align-items: center;
  font-size: 14px;
}
.xw-top-row--head {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--xh-text-muted);
}
.xw-top-cell { color: var(--xh-text); }
.xw-top-cell--rank { font-family: var(--xh-font-mono, monospace); font-weight: 700; }
.xw-top-rank--gold   { color: #FFCC00; }
.xw-top-rank--silver { color: #c0c8d4; }
.xw-top-rank--bronze { color: #cd7f32; }
.xw-top-cell--name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.xw-top-tag { font-family: var(--xh-font-mono, monospace); font-weight: 700; color: var(--xh-orange); font-size: 13px; }
.xw-top-fullname { color: var(--xh-text); font-weight: 600; }
.xw-top-cell--members,
.xw-top-cell--points { font-family: var(--xh-font-mono, monospace); text-align: right; }
.xw-top-cell--change { text-align: right; font-family: var(--xh-font-mono, monospace); font-size: 12px; font-weight: 600; }
.xw-top-change--up   { color: #20a868; }
.xw-top-change--down { color: #d05020; }

/* Battles — card-style вместо table */
.xw-top-battles { display: flex; flex-direction: column; gap: 10px; }
.xw-top-battle {
  padding: 14px 16px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-left: 3px solid var(--xh-border-light);
  border-radius: var(--xh-radius);
  transition: border-color .2s, background .2s;
}
.xw-top-battle:hover { background: rgba(255,255,255,.04); }
.xw-top-battle[data-xh-result="victory"] { border-left-color: #20a868; }
.xw-top-battle[data-xh-result="defeat"]  { border-left-color: #d05020; }
.xw-top-battle[data-xh-result="draw"]    { border-left-color: #FFCC00; }
.xw-top-battle-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.xw-top-battle-tags { font-family: var(--xh-font-mono, monospace); font-weight: 700; color: var(--xh-text); }
.xw-top-vs { color: var(--xh-text-muted); font-weight: 400; margin: 0 2px; }
.xw-top-battle-result {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 999px;
}
.xw-top-battle-result--victory { background: rgba(32,168,104,.18); color: #5fc88a; }
.xw-top-battle-result--defeat  { background: rgba(208,80,32,.18); color: #e88555; }
.xw-top-battle-result--draw    { background: rgba(255,204,0,.18); color: #FFCC00; }
.xw-top-battle-stats { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--xh-text-muted); }
.xw-top-battle-stats strong { color: var(--xh-text); font-weight: 600; font-family: var(--xh-font-mono, monospace); }

/* Players */
.xw-top-players { display: flex; flex-direction: column; gap: 6px; }
.xw-top-player {
  display: grid;
  grid-template-columns: 50px 1fr 80px 110px;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--xh-radius);
  align-items: center;
  font-size: 14px;
}
.xw-top-player[data-xh-rank="1"] { background: linear-gradient(90deg, rgba(255,204,0,.10), rgba(255,204,0,0)); border-color: rgba(255,204,0,.3); }
.xw-top-player[data-xh-rank="2"] { background: linear-gradient(90deg, rgba(192,200,212,.08), transparent); }
.xw-top-player[data-xh-rank="3"] { background: linear-gradient(90deg, rgba(205,127,50,.08), transparent); }
.xw-top-player-rank { font-family: var(--xh-font-mono, monospace); font-weight: 700; color: var(--xh-text-muted); }
.xw-top-player-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.xw-top-player-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-left: 4px; }
.xw-top-player-status--online { background: #20a868; box-shadow: 0 0 0 2px rgba(32,168,104,.25); }
.xw-top-player-status--offline { background: #5a6378; }
.xw-top-player-guild { font-family: var(--xh-font-mono, monospace); color: var(--xh-orange); font-weight: 600; font-size: 13px; }
.xw-top-player-points { font-family: var(--xh-font-mono, monospace); text-align: right; }

/* Mobile responsive */
@media (max-width: 720px) {
  .xw-top { padding: 0 16px; }
  .xw-top-wrap { padding: 20px 16px; }
  .xw-top-row,
  .xw-top-player {
    grid-template-columns: 40px 1fr 70px;
    font-size: 13px;
    padding: 10px 12px;
  }
  .xw-top-row .xw-top-cell--members,
  .xw-top-row .xw-top-cell--change,
  .xw-top-row--head .xw-top-cell--members,
  .xw-top-row--head .xw-top-cell--change { display: none; }
  .xw-top-battle-stats { gap: 10px; font-size: 12px; }
}

/* Wave J Phase H 2026-05-20 — factions блок (owner request — 3 фракции в galaxy section). */
.xh-galaxy-factions {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: rgba(8, 14, 28, .55);
  border: 1px solid rgba(74, 157, 245, .15);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.xh-galaxy-factions-title {
  font-family: var(--xh-font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--xh-text-secondary);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.xh-galaxy-faction {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  border-left: 3px solid var(--xh-blue);
  background: rgba(14, 24, 44, .4);
  border-radius: 0 6px 6px 0;
  transition: background .2s, border-color .2s;
}
.xh-galaxy-faction:hover { background: rgba(18, 32, 60, .6); }
.xh-galaxy-faction--grabtor { border-left-color: var(--xh-woa-red, #d05020); }
.xh-galaxy-faction--senteri { border-left-color: var(--xh-teal, #20b0b8); }
.xh-galaxy-faction--talkor { border-left-color: var(--xh-purple, #6a40b8); }
.xh-galaxy-faction-name {
  font-family: var(--xh-font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--xh-text);
}
.xh-galaxy-faction-tag {
  font-size: 12px;
  color: var(--xh-text-muted);
  text-align: right;
}
@media (max-width: 480px) {
  .xh-galaxy-faction { flex-direction: column; align-items: flex-start; gap: 2px; }
  .xh-galaxy-faction-tag { text-align: left; }
}

/* Wave J Phase H+ 2026-05-21 — PageSpeed win: content-visibility: auto на below-fold секциях.
   Браузер пропускает rendering до scroll, экономит initial paint ~150-400ms.
   contain-intrinsic-size — placeholder height чтобы scrollbar не дёргался. */
.xh-galaxy,
.xh-universes,
.xh-kb-strip,
.xh-forum-updates,
.xh-features-grid,
.xh-section-cta,
.xh-community-block {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

/* Wave J Phase H+ 2026-05-21: universe-actions — vertical stack ВСЕГДА.
   3-column grid делает карточки слишком узкими для side-by-side кнопок (обрезались на PC).
   Primary остаётся главным CTA, «Подробнее» — ghost-link под ним. */
.xh-universe-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.xh-universe-actions .xh-btn { width: 100%; box-sizing: border-box; justify-content: center; }
.xh-universe-actions .xh-btn--outline {
  /* Ghost-link стиль — лёгкая компактная кнопка. */
  padding: 8px 12px;
  font-size: 13px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
}
.xh-universe-actions .xh-btn--outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
}

.xh-universe-card--woa .xh-universe-card-bg {
  background-image: url('/media/v2/img/hero-woa-battle.webp');
  background-position: center 30%;
}
.xh-universe-card--classic .xh-universe-card-bg {
  background-image: url('/media/v2/img/universe-classic-v2.webp');
  background-position: center 30%;
}
.xh-universe-card--reborn .xh-universe-card-bg {
  background-image: url('/media/v2/img/universe-reborn-v2.webp');
  background-position: center 30%;
}

/* ADVANTAGES */
.xh-advantages { position: relative; z-index: 1; padding: 56px 0; border-top: 1px solid var(--xh-border); }
.xh-advantages-title {
  text-align: center; font-size: 22px; text-transform: uppercase; letter-spacing: 2px;
  color: #fff; margin-bottom: 40px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.xh-advantages-title::before, .xh-advantages-title::after { content: ''; flex: 1; max-width: 100px; height: 1px; background: var(--xh-border-light); }
.xh-advantages-grid { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.xh-advantage { text-align: center; padding: 0 8px; }
.xh-advantage-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.03); border: 1px solid var(--xh-border); transition: transform var(--xh-transition), box-shadow var(--xh-transition), border-color var(--xh-transition); }
.xh-advantage:hover .xh-advantage-icon { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.xh-advantage-icon svg { width: 28px; height: 28px; stroke-width: 1.5; }
/* Цветовые модификаторы — через CSS-custom-properties (DRY: один паттерн вместо 10 nth-child rule'ов).
   Modifier-классы переопределяют --xh-adv-color (hex) и --xh-adv-rgb (для rgba/alpha overlays). */
.xh-advantage--blue   { --xh-adv-color: #4a9df5; --xh-adv-rgb: 74,157,245; }
.xh-advantage--orange { --xh-adv-color: var(--xh-orange); --xh-adv-rgb: 232,132,30; }
.xh-advantage--gold   { --xh-adv-color: #f5c542; --xh-adv-rgb: 245,197,66; }
.xh-advantage--teal   { --xh-adv-color: #20b0b8; --xh-adv-rgb: 32,176,184; }
.xh-advantage--green  { --xh-adv-color: #20a868; --xh-adv-rgb: 32,168,104; }
.xh-advantage .xh-advantage-icon {
  color: var(--xh-adv-color, var(--xh-text));
  background: rgba(var(--xh-adv-rgb, 255,255,255), .10);
  border-color: rgba(var(--xh-adv-rgb, 255,255,255), .30);
}
.xh-advantage:hover .xh-advantage-icon {
  border-color: rgba(var(--xh-adv-rgb, 255,255,255), .55);
  box-shadow: 0 12px 32px rgba(var(--xh-adv-rgb, 0,0,0), .20);
}
.xh-advantage h3 { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; color: #fff; }
.xh-advantage p { margin: 0; font-size: 13px; color: var(--xh-text-muted); line-height: 1.5; text-wrap: pretty; }

/* COMMUNITY */
.xh-community { position: relative; z-index: 1; padding: 64px 0; }
.xh-community-header { text-align: center; margin-bottom: 36px; }
.xh-community-header h2 {
  font-size: 26px; text-transform: uppercase; letter-spacing: 2px; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.xh-community-header h2::before, .xh-community-header h2::after { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--xh-border-light); }
.xh-community-cards { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.xh-comm-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--xh-radius-lg);
  background: var(--xh-bg-card); border: 1px solid var(--xh-border);
  transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); position: relative; overflow: hidden;
}
.xh-comm-card::before { content: ''; position: absolute; inset: 0; background: var(--xh-cc, transparent); opacity: 0; transition: opacity var(--xh-transition); pointer-events: none; }
.xh-comm-card > * { position: relative; z-index: 1; }
.xh-comm-card:hover { transform: translateY(-3px); border-color: var(--xh-cc, var(--xh-border-light)); box-shadow: 0 8px 28px rgba(0,0,0,.35), 0 0 32px var(--xh-cc-glow, transparent); }
.xh-comm-card:hover::before { opacity: .10; }
.xh-comm-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--xh-cc-bg, rgba(255,255,255,.04));
  border: 1px solid var(--xh-cc-border, var(--xh-border));
  color: var(--xh-cc, var(--xh-text));
}
.xh-comm-card-icon svg { width: 22px; height: 22px; }
.xh-comm-card-body { min-width: 0; }
.xh-comm-card-title { font-family: var(--xh-font-heading); font-size: 15px; font-weight: 700; color: var(--xh-text); line-height: 1.2; margin-bottom: 3px; letter-spacing: .3px; }
.xh-comm-card-sub { font-size: 12px; color: var(--xh-text-muted); letter-spacing: .2px; }

.xh-comm-card--forum    { --xh-cc: #20b0b8; --xh-cc-bg: rgba(32,176,184,.10);  --xh-cc-border: rgba(32,176,184,.30);  --xh-cc-glow: rgba(32,176,184,.18); }
.xh-comm-card--discord  { --xh-cc: #5865F2; --xh-cc-bg: rgba(88,101,242,.12);  --xh-cc-border: rgba(88,101,242,.30);  --xh-cc-glow: rgba(88,101,242,.22); }
.xh-comm-card--telegram { --xh-cc: #29B6F6; --xh-cc-bg: rgba(41,182,246,.12);  --xh-cc-border: rgba(41,182,246,.30);  --xh-cc-glow: rgba(41,182,246,.20); }
.xh-comm-card--vk        { --xh-cc: #4680C2; --xh-cc-bg: rgba(70,128,194,.12);  --xh-cc-border: rgba(70,128,194,.30);  --xh-cc-glow: rgba(70,128,194,.20); }
.xh-comm-card--facebook  { --xh-cc: #1877F2; --xh-cc-bg: rgba(24,119,242,.12);  --xh-cc-border: rgba(24,119,242,.30);  --xh-cc-glow: rgba(24,119,242,.20); }
.xh-comm-card--instagram { --xh-cc: #E1306C; --xh-cc-bg: rgba(225,48,108,.12);  --xh-cc-border: rgba(225,48,108,.30);  --xh-cc-glow: rgba(225,48,108,.20); }
.xh-comm-card--youtube   { --xh-cc: #FF3D3D; --xh-cc-bg: rgba(255,61,61,.12);   --xh-cc-border: rgba(255,61,61,.30);   --xh-cc-glow: rgba(255,61,61,.20); }

/* CTA */
.xh-cta { position: relative; z-index: 1; padding: 56px 0 72px; }
.xh-cta-wrap { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); }
.xh-cta-inner {
  padding: 56px 48px;
  border: 1px solid var(--xh-border-light); border-radius: var(--xh-radius-lg);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.xh-cta-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('/media/v2/img/cta-bg.webp') center center / cover no-repeat;
}
.xh-cta-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,12,22,.94) 0%, rgba(8,12,22,.7) 50%, rgba(8,12,22,.55) 100%);
}
@media (max-width: 860px) {
  /* На мобильном картинка корабля упирается в borders карточки.
     Решение: размещаем background-position так чтобы корабль был в центре,
     + размер уменьшен. Overlay делает плавный fade к solid bg ко ВСЕМ краям. */
  .xh-cta-bg {
    background-image: url('/media/v2/img/cta-bg.webp');
    background-position: 35% center;
    background-size: 200% auto;
    background-repeat: no-repeat;
  }
  .xh-cta-bg::after {
    background:
      radial-gradient(ellipse 70% 60% at 50% 50%,
        transparent 0%,
        rgba(8,12,22,.30) 50%,
        rgba(8,12,22,.80) 85%,
        rgba(8,12,22,1) 100%);
  }
}
.xh-cta-content { position: relative; z-index: 1; flex: 1; min-width: 280px; max-width: 560px; }
.xh-cta-title { font-size: 34px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px; color: #fff; line-height: 1.05; }
.xh-cta-desc { margin: 0 0 22px; font-size: 16px; color: var(--xh-text-secondary); line-height: 1.55; }
.xh-cta-badges { display: flex; gap: 24px; flex-wrap: wrap; }
.xh-cta-badges span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--xh-text); font-family: var(--xh-font-heading); font-weight: 600; }
.xh-cta-badges svg { width: 18px; height: 18px; color: var(--xh-text-secondary); flex-shrink: 0; }
.xh-cta-action { position: relative; z-index: 1; }.xh-footer-inner { max-width: var(--xh-max-w); margin: 0 auto; padding: 0 var(--xh-container-pad); padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }

/* Footer grid: brand + 5 нав-колонок (Игра / База знаний / Сообщество / Популярное / Документы).
   Sprint 1 Phase B: расширили под архитектуру 2026-05-16. */
.xh-footer-grid {
  display: grid; gap: 28px 32px;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr 1fr;
  align-items: start;
}/* specificity boost — побивает `.xh-footer-col a { display: block; padding: 3px 0; }` */
.xh-footer-col a.xh-footer-social,
.xh-footer-social {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--xh-bg-card);
  border: 1px solid var(--xh-border); display: inline-flex; align-items: center; justify-content: center;
  color: var(--xh-text-muted); transition: color var(--xh-transition), background var(--xh-transition), border-color var(--xh-transition), box-shadow var(--xh-transition), transform var(--xh-transition); flex-shrink: 0;
}.xh-footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--xh-text-muted); margin-bottom: 14px; }/* Inline legal links — rules · agreement · privacy на одной строке */
.xh-footer-col li a + a { display: inline; padding: 0; }/* SCROLL REVEAL — JS adds .xh-reveal-init so sections stay visible without JS */
.xh-reveal.xh-reveal-init { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.xh-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1280px) { .xh-hero-bg { background-position: 70% center; } }

@media (max-width: 1024px) {
  .xh-community-cards { grid-template-columns: repeat(3, 1fr); }
  .xh-community-cards a:nth-child(4),
  .xh-community-cards a:nth-child(5) { grid-column: span 1; }
  .xh-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .xh-stat + .xh-stat:nth-child(odd) { border-left: 0; padding-left: 0; }

  .xh-nav { display: none; }
  .xh-burger { display: flex; }
  /* Login/CTA скрыты на mobile (доступны в burger menu).
     Lang остаётся видимым — owner просил видеть выбор языка прямо в шапке. */
  .xh-login-link { display: none; }
  .xh-btn--header { display: none; }
  .xh-header-right { gap: 8px; }
  /* Mobile lang — compact: только globe + 2-letter code, без full label */
  .xh-lang-wrap .xh-lang { padding: 6px 8px; font-size: 12px; }
  .xh-lang-wrap .xh-lang-icon { width: 14px; height: 14px; }
  .xh-hero { min-height: 480px; padding: 60px 0 40px; }
  .xh-galaxy-content { flex: 0 0 280px; }
  .xh-universe-card { padding: 22px 18px; }
  .xh-universe-name { font-size: 18px; }
  .xh-advantages-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet & below — обновляем единственный token, все контейнеры подхватывают */
@media (max-width: 768px) {
  .xh-page { --xh-container-pad: 20px; }
  .xh-mobile-menu { padding-left: var(--xh-container-pad); padding-right: var(--xh-container-pad); }

  .xh-header-inner { gap: 12px; }
  .xh-logo-x, .xh-logo-text { font-size: 20px; letter-spacing: 1.5px; }

  .xh-hero { min-height: auto; padding: 56px 0 40px; }
  /* .xh-hero-inner подхватывает container-pad через base CSS */
  .xh-hero-content { max-width: 100%; }
  .xh-hero-title {
    font-size: clamp(36px, 11vw, 56px);
    letter-spacing: .5px;
    word-break: break-word;
  }
  .xh-hero-subtitle { font-size: 17px; }
  .xh-hero-desc { font-size: 15px; max-width: 100%; margin-bottom: 24px; }
  .xh-hero-actions { gap: 12px; margin-bottom: 24px; }

  .xh-galaxy { padding: 56px 0 48px; }
  .xh-galaxy-inner { flex-direction: column; gap: 28px; }
  .xh-galaxy-content { flex: none; max-width: 100%; }
  .xh-galaxy-title { font-size: 24px; letter-spacing: 1.5px; }
  .xh-galaxy-desc { font-size: 14px; }
  .xh-galaxy-actions { gap: 12px; margin-bottom: 24px; }

  .xh-universes { padding: 48px 0; }
  .xh-universes-title { font-size: 22px; letter-spacing: 1.5px; }
  .xh-universes-title::before, .xh-universes-title::after { max-width: 40px; }
  .xh-universes-sub { font-size: 14px; padding: 0 8px; text-wrap: pretty; }
  .xh-universe-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 16px; }
  .xh-universe-card { padding: 24px 20px; }
  .xh-universe-name { font-size: 20px; }

  .xh-stats-inner { gap: 12px 20px; justify-content: space-between; }
  .xh-stat { min-width: 0; flex: 1 1 calc(50% - 10px); justify-content: center; }
  .xh-stat-number { font-size: 22px; }
  .xh-stat-label { font-size: 11px; }

  .xh-advantages { padding: 48px 0; }
  .xh-advantages-title { font-size: 18px; letter-spacing: 1.5px; margin-bottom: 32px; }
  .xh-advantages-title::before, .xh-advantages-title::after { max-width: 30px; }
  .xh-advantages-grid { grid-template-columns: 1fr; gap: 24px; max-width: 480px; }
  .xh-advantage { padding: 22px 20px; background: rgba(255,255,255,.025); border: 1px solid var(--xh-border); border-radius: var(--xh-radius-lg); }
  .xh-advantage h3 { font-size: 14px; text-wrap: balance; }
  .xh-advantage p { font-size: 13px; color: var(--xh-text-secondary); text-wrap: pretty; }

  .xh-community { padding: 48px 0; }

  .xh-community-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .xh-community-header h2 { font-size: 20px; letter-spacing: 1.5px; }
  .xh-community-header h2::before, .xh-community-header h2::after { max-width: 40px; }
  .xh-comm-card { padding: 14px 16px; gap: 12px; }
  .xh-comm-card-icon { width: 40px; height: 40px; }
  .xh-comm-card-icon svg { width: 20px; height: 20px; }
  .xh-comm-card-title { font-size: 14px; }
  .xh-comm-card-sub { font-size: 11px; }

  .xh-stats-inner { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 20px; }
  .xh-stat + .xh-stat { border-left: 0; padding-left: 0; }
  .xh-stat:nth-child(3), .xh-stat:nth-child(4) { border-top: 1px solid var(--xh-border); padding-top: 16px; }

  .xh-galaxy-card { padding: 28px 20px; }

  .xh-cta-inner { padding: 32px 24px; flex-direction: column; align-items: stretch; gap: 24px; }
  .xh-cta-content { max-width: 100%; }
  .xh-cta-title { font-size: 24px; letter-spacing: 1px; }
  .xh-cta-badges { gap: 14px 18px; justify-content: center; }
  .xh-cta-badges span { font-size: 13px; }
  /* Кнопка симметрично растягивается на полную доступную ширину карточки. */
  .xh-cta-action { width: 100%; display: block; }
  .xh-cta-action .xh-btn { width: 100%; justify-content: center; box-sizing: border-box; }

  .xh-footer { padding: 40px 0 24px; }
  .xh-footer-brand { flex: none; }

  /* Mobile footer-grid: Brand full-width, потом 2-col grid для 5 нав-колонок,
     последняя (Документы) — full-width. Sprint 1 Phase B rebuild. */
  .xh-footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand brand"
      "game  knowledge"
      "community popular"
      "docs  docs";
    gap: 32px 20px;
  }
  .xh-footer-brand { grid-area: brand; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(2) { grid-area: game; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(3) { grid-area: knowledge; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(4) { grid-area: community; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(5) { grid-area: popular; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(6) { grid-area: docs; padding-top: 20px; border-top: 1px solid var(--xh-border); }
  .xh-footer-grid > .xh-footer-col:nth-of-type(6) ul { display: flex; flex-wrap: wrap; gap: 12px 24px; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(6) ul li { margin: 0; }
  .xh-footer-grid > .xh-footer-col:nth-of-type(6) a { padding: 2px 0; }
  .xh-footer-col h4 { font-size: 11px; margin-bottom: 10px; }
  .xh-footer-col a { font-size: 13px; padding: 4px 0; }
}

/* Phone */
@media (max-width: 480px) {
  .xh-page { --xh-container-pad: 16px; }

  .xh-hero { padding: 40px 0 32px; }
  .xh-hero-title { font-size: clamp(32px, 10vw, 44px); }
  .xh-hero-subtitle { font-size: 16px; margin-bottom: 10px; }
  .xh-hero-actions { flex-wrap: wrap; }
  .xh-hero-actions .xh-btn { justify-content: center; width: 100%; }
  .xh-hero-apps { gap: 8px; }
  .xh-hero-apps-label { width: 100%; margin-bottom: 4px; }
  .xh-store-badge { flex: 1; justify-content: center; min-width: 130px; }

  .xh-stats-inner { gap: 14px 12px; }
  .xh-stat { gap: 10px; }
  .xh-stat-icon { width: 32px; height: 32px; }
  .xh-stat-icon svg { width: 18px; height: 18px; }
  .xh-stat-number { font-size: 20px; }

  .xh-galaxy-title { font-size: 22px; }
  .xh-galaxy-actions .xh-btn { width: 100%; justify-content: center; }
  .xh-galaxy-content > .xh-btn { width: 100%; justify-content: center; }

  .xh-universes-title { font-size: 20px; }
  .xh-universes-title::before, .xh-universes-title::after { display: none; }
  .xh-universe-card { padding: 22px 18px; }

  .xh-advantage-icon { width: 40px; height: 40px; margin-bottom: 10px; }
  .xh-advantage-icon svg { width: 26px; height: 26px; }

  .xh-cta-title { font-size: 20px; }
}

/* Small phone */
@media (max-width: 380px) {
  .xh-logo-x, .xh-logo-text { font-size: 18px; }
  .xh-hero-title { font-size: 30px; line-height: 1.05; }
  .xh-hero-subtitle { font-size: 15px; }
  .xh-hero-desc { font-size: 14px; }
  .xh-stats-inner { grid-template-columns: 1fr 1fr; }
  .xh-cta-inner { padding: 24px 18px; }
  .xh-cta-title { font-size: 19px; letter-spacing: .5px; }
}
@media (prefers-reduced-motion: reduce) {
  .xh-page, .xh-page *, .xh-page *::before, .xh-page *::after,
  main, main *, main *::before, main *::after { animation-duration: 0.01ms; transition-duration: 0.01ms; }
  .xh-reveal { opacity: 1; transform: none; }
  #xh-stars-canvas { display: none; }
  /* a11y MAJOR-15 (Wave B): keyframe-анимации с глобальным `infinite` могут stutter даже с 0.01ms duration. Полностью отключаем. */
  .xh-trust-dot, .xh-live-dot { animation: none !important; box-shadow: 0 0 0 0 rgba(32,168,104,.6) !important; }
}

/* WCAG 2.4.7 — universal focus indicator (covers links/buttons/inputs/selects/textareas + modal).
   Wave B MAJOR-9: убран prefix .xh-page — был scope-bug на pages без .xh-page wrapper (universes/, knowledge/, mobile, _detail.php).
   `:where()` держит specificity = 0, чтобы более точечные правила могли override. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--xh-orange);
  outline-offset: 2px;
  border-radius: 4px;
}
#modal-mask a:focus-visible,
#modal-mask button:focus-visible,
#modal-mask input:focus-visible,
#modal-mask select:focus-visible,
#modal-mask textarea:focus-visible {
  outline: 2px solid var(--xh-orange);
  outline-offset: 2px;
  border-radius: 4px;
}
#modal-mask .input-text:focus-visible,
#modal-mask .select:focus-visible {
  outline-offset: 0;
  border-color: var(--xh-orange);
}

/* WCAG 2.4.1 — skip link */
.xh-skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.xh-skip-link:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto; z-index: 10000;
  padding: 12px 18px; background: var(--xh-orange); color: var(--xh-orange-text);
  font-weight: 700; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.5);
}

/* Hide hero from reveal-animation (always visible — above the fold) */
.xh-hero.xh-reveal { opacity: 1; transform: none; }

/* Animated live dot in galaxy section (was missing animation) */
.xh-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--xh-green); flex-shrink: 0; animation: xh-pulse 2s infinite; }

/* Mobile community: 5th card spans full width */
@media (max-width: 768px) {
  .xh-community-cards > *:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Print stylesheet — минимальный набор для читаемой печати (legal-страницы, FAQ) */
@media print {
  .xh-page { background: #fff !important; color: #000 !important; }
  .xh-page * { background-image: none !important; box-shadow: none !important; text-shadow: none !important; }
  #xh-stars-canvas, .xh-header, .xh-mobile-menu, .xh-cta, .xh-footer-socials, #modal-mask { display: none !important; }
  .xh-page a { color: #0044cc !important; text-decoration: underline !important; }
  .xh-page a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
  .xh-page h1, .xh-page h2, .xh-page h3 { color: #000 !important; page-break-after: avoid; }
  .xh-page p, .xh-page li { page-break-inside: avoid; }
  .xh-hero, .xh-galaxy, .xh-universes, .xh-stats, .xh-advantages, .xh-community { padding: 12px 0 !important; }
}

/* Windows High Contrast Mode (forced-colors). Делает text-decoration + outline видимыми. */
@media (forced-colors: active) {
  .xh-btn--primary, .xh-btn--header { border: 2px solid CanvasText; }
  .xh-page a:focus-visible, .xh-page button:focus-visible,
  .xh-page input:focus-visible, .xh-page [tabindex]:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
  .xh-trust-pill, .xh-universe-card, .xh-advantage, .xh-comm-card, .xh-faq-item, .xh-compare-table { border: 1px solid CanvasText; }
}

/* ============================================
   WAVE B SECTIONS — About / FAQ / Compare
   ============================================ */

/* ABOUT */
.xh-about { padding: 72px 32px 24px; }
.xh-about-inner { max-width: var(--xh-max-w); margin: 0 auto; }
.xh-about-title {
  font-family: var(--xh-font-display); font-size: clamp(28px, 3.2vw, 38px);
  color: #fff; margin: 0 0 28px; text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.xh-about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.xh-about-col p { color: var(--xh-text); line-height: 1.65; margin: 0 0 14px; font-size: 16px; }
.xh-about-lead { font-size: 17px; }
.xh-about-col p strong { color: var(--xh-text); font-weight: 700; }
.xh-about-facts { margin: 0; padding: 22px 24px; background: rgba(255,255,255,.03); border: 1px solid var(--xh-border); border-radius: var(--xh-radius-lg); }
.xh-about-facts dt { font-family: var(--xh-font-heading); font-size: 12px; font-weight: 700;
  color: var(--xh-text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 12px; }
.xh-about-facts dt:first-child { margin-top: 0; }
.xh-about-facts dd { margin: 4px 0 0; color: var(--xh-text); font-size: 15px; line-height: 1.45; }
@media (max-width: 860px) { .xh-about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* COMPARE */
.xh-compare { padding: 60px 32px; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.015) 100%); }
.xh-compare-inner { max-width: var(--xh-max-w); margin: 0 auto; }
.xh-compare-title {
  font-family: var(--xh-font-display); font-size: clamp(26px, 3vw, 34px);
  color: #fff; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.xh-compare-lead { color: var(--xh-text-secondary); text-align: center; margin: 0 auto 28px; max-width: 720px; font-size: 15px; line-height: 1.5; }
.xh-compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--xh-radius-lg); border: 1px solid var(--xh-border); }
.xh-compare-table { width: 100%; border-collapse: collapse; min-width: 720px; background: rgba(255,255,255,.02); }
.xh-compare-table th, .xh-compare-table td {
  padding: 14px 16px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--xh-border); color: var(--xh-text);
}
.xh-compare-table thead th { background: rgba(255,255,255,.04); font-family: var(--xh-font-heading); font-size: 13px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--xh-text-muted); }
.xh-compare-table tbody th { font-family: var(--xh-font-heading); font-weight: 700; color: var(--xh-text); font-size: 15px; }
.xh-compare-table tbody tr:last-child td, .xh-compare-table tbody tr:last-child th { border-bottom: 0; }
.xh-compare-self { background: rgba(232,132,30,.08); }
.xh-compare-self th { color: var(--xh-orange); }
.xh-compare-summary { margin-top: 24px; color: var(--xh-text); line-height: 1.6; font-size: 15px; }

/* FAQ */
.xh-faq { padding: 60px 32px; }
.xh-faq-inner { max-width: 880px; margin: 0 auto; }
.xh-faq-title {
  font-family: var(--xh-font-display); font-size: clamp(26px, 3vw, 34px);
  color: #fff; margin: 0 0 26px; text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.xh-faq-list { display: flex; flex-direction: column; gap: 10px; }
.xh-faq-item {
  background: rgba(255,255,255,.025); border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-lg); padding: 0; transition: border-color var(--xh-transition);
}
.xh-faq-item[open] { border-color: var(--xh-border-light); }
.xh-faq-q {
  font-family: var(--xh-font-heading); font-size: 17px; font-weight: 700; color: var(--xh-text);
  padding: 18px 22px; cursor: pointer; list-style: none; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.xh-faq-q::-webkit-details-marker { display: none; }
.xh-faq-q::after {
  content: '+'; flex-shrink: 0; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--xh-orange); transition: transform var(--xh-transition);
}
.xh-faq-item[open] .xh-faq-q::after { transform: rotate(45deg); }
.xh-faq-q:hover { color: var(--xh-orange); }
.xh-faq-a { padding: 0 22px 18px; color: var(--xh-text); line-height: 1.6; font-size: 15px; }
.xh-faq-a .xh-faq-link { color: var(--xh-orange); border-bottom: 1px solid currentColor; }
.xh-faq-a .xh-faq-link:hover { color: var(--xh-orange-hover); }
@media (max-width: 600px) {
  .xh-about { padding: 48px 20px 16px; }
  .xh-compare, .xh-faq { padding: 44px 20px; }
  .xh-compare-table th, .xh-compare-table td { padding: 11px 12px; font-size: 13px; }
}

/* === Modal extras (a11y + close button + social buttons + inline-button-link) === */
#modal-mask .modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--xh-border);
  width: 32px; height: 32px; padding: 0; cursor: pointer;
  /* F-A11Y-111 (2026-05-21): explicit #c7d2e5 ≈4.7:1 contrast vs panel bg (was var(--xh-text-dim) ≈3.1:1) */
  color: #c7d2e5;
  display: flex; align-items: center; justify-content: center;
}
#modal-mask .modal-close:hover { color: var(--xh-text); background: rgba(255,255,255,.08); }
#modal-mask .modal-close::before { content: '×'; font-size: 22px; line-height: 1; }

/* Inline "switch to register/login" links — button styled like text-link */
#modal-mask .modal-link {
  background: none; border: none; padding: 0; color: var(--xh-orange);
  text-decoration: underline; cursor: pointer; font: inherit;
}
#modal-mask .modal-link:hover { color: var(--xh-orange-hover); }

/* Social login buttons (v2-friendly, since legacy sprite isn't loaded in v2) */
#modal-mask .modal-soc-btn {
  width: 44px; height: 44px; border-radius: 8px; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.05) center/22px no-repeat; border: 1px solid var(--xh-border);
  color: transparent; /* для случая если иконка не загрузилась — текст не виден через aria-label */
  transition: background-color var(--xh-transition), border-color var(--xh-transition), transform var(--xh-transition);
}
#modal-mask .modal-soc-btn:hover { background-color: rgba(255,255,255,.10); border-color: var(--xh-border-light); transform: translateY(-1px); }
#modal-mask .modal-soc-btn--vk            { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234c75a3'%3E%3Cpath d='M2.5 2.5h19v19h-19z'/%3E%3Cpath fill='%23fff' d='M13.2 16.4c-4 0-6.6-2.7-6.7-7.3h2c.1 3.4 1.6 4.8 2.8 5.1V9.1h1.9v2.9c1.2-.1 2.5-1.5 3-2.9h1.9c-.4 1.8-1.7 3.1-2.7 3.7 1 .5 2.4 1.7 3 3.6h-2.1c-.5-1.4-1.6-2.5-3-2.6v2.6h-.2z'/%3E%3C/svg%3E"); }
#modal-mask .modal-soc-btn--google        { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fbbc05' d='M3 12c0-1.6.4-3.1 1.1-4.4L8.4 11l-4.3 4.4C3.4 14.1 3 12.6 3 11z' transform='translate(0 1)'/%3E%3Cpath fill='%23ea4335' d='M12 5.7c2 0 3.4.9 4.2 1.6L19 4.5C17.4 3 14.9 2 12 2 7.7 2 4 4.5 2.2 8.1L5.5 11C6.4 8.1 9 5.7 12 5.7z'/%3E%3Cpath fill='%2334a853' d='M12 18.3c-3 0-5.6-2-6.5-4.7L2.2 16.5C4 20 7.7 22 12 22c2.8 0 5.4-1 7.2-2.8L16 16.5c-1 .8-2.5 1.8-4 1.8z'/%3E%3Cpath fill='%234285f4' d='M21.6 12.2c0-.7-.1-1.2-.2-1.8H12v3.6h5.4c-.2 1.1-.9 2.1-1.9 2.7l2.9 2.3c1.7-1.6 2.7-3.9 2.7-6.8z'/%3E%3C/svg%3E"); }
#modal-mask .modal-soc-btn--odnoklassniki { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ed812b'%3E%3Cpath d='M12 6.6c-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5S13.4 6.6 12 6.6m0-3.6c3.2 0 5.8 2.6 5.8 5.8s-2.6 5.8-5.8 5.8c-3.2 0-5.8-2.6-5.8-5.8S8.8 3 12 3M9.5 14.4c-1 0-2.1.3-3.1.9-.5.3-.6.9-.4 1.4.3.5.9.6 1.4.4 1.7-1 4.5-1 6.2 0 .2.1.3.1.5.1.4 0 .7-.2.9-.5.3-.5.1-1.1-.4-1.4-1-.6-2.1-.9-3.1-.9m1.3 4.7l-2.5 2.5c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3l1.3-1.3 1.3 1.3c.2.2.5.3.7.3.3 0 .5-.1.7-.3.4-.4.4-1 0-1.4l-2.5-2.5c-.1-.1-.3-.1-.4 0z'/%3E%3C/svg%3E"); }
#modal-mask .modal-soc-btn--mailru        { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23005ff9'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c1.8 0 3.5-.5 5-1.4l-1.2-1.6c-1.1.7-2.4 1.1-3.8 1.1-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8c0 1.3-.3 2.1-1.2 2.1-.8 0-1.1-.6-1.1-1.5V8h-2v.9c-.5-.7-1.4-1.1-2.5-1.1-2.4 0-4 2-4 4.4s1.6 4.4 4 4.4c1.4 0 2.4-.7 2.8-1.5.4 1 1.4 1.5 2.5 1.5 2.7 0 3.4-2.4 3.4-4.6 0-5.5-4.5-10-10-10zm0 12.4c-1.3 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2 2.2 1 2.2 2.2-.9 2.2-2.2 2.2z'/%3E%3C/svg%3E"); }
#modal-mask .modal-soc-btn--yandex        { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M14.5 3v17.5h-2.6V13L7.5 3.5h2.7l2.7 6.8L15.8 3z'/%3E%3C/svg%3E"); }
#modal-mask .modal-soc-btn--facebook      { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231877f2'%3E%3Cpath d='M24 12.07C24 5.4 18.63 0 12 0S0 5.4 0 12.07C0 18.1 4.39 23.1 10.13 24v-8.44H7.08v-3.49h3.05V9.41c0-3.02 1.79-4.69 4.53-4.69 1.31 0 2.69.24 2.69.24v2.97h-1.52c-1.49 0-1.96.93-1.96 1.89v2.26h3.33l-.53 3.49h-2.8V24C19.61 23.1 24 18.1 24 12.07z'/%3E%3C/svg%3E"); }

#modal-mask .modal-soc-icos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 44px; }

/* Captcha image inside reg modal */
#modal-mask .img-captcha, #modal-mask .modal-captcha img { max-width: 120px; height: auto; border-radius: 6px; }
#modal-mask .input-text-captcha { display: flex; align-items: center; gap: 12px; }
#modal-mask .input-text-captcha .input-text { max-width: 200px; }
#modal-mask .modal-captcha { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
#modal-mask .input-modal-checkbox { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--xh-orange); cursor: pointer; }
#modal-mask .modal-label { display: inline; font-size: 13px; color: var(--xh-text-dim); cursor: pointer; line-height: 1.4; flex: 1; min-width: 0; }
/* Wave J Phase H+ 2026-05-21 — Owner #2999: input + label на одной строке (раньше stacked). */
#modal-mask .modal-extra-text {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  text-align: left !important;
  flex-wrap: nowrap;
  height: auto !important;
  padding: 8px 4px;
  font-size: 13px !important;
}
#modal-mask .modal-extra-text:has(.input-modal-checkbox) { /* row with checkbox */
  margin: 10px 0;
}
/* Wave J Phase H+ 2026-05-21 — Owner #2999: galaxy <select> не открывался.
   Force native picker + pointer-events. */
#modal-mask .select {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  pointer-events: auto !important;
  cursor: pointer;
}
#modal-mask .modal-label a { color: var(--xh-orange); }

/* === Language switcher dropdown === */
.xh-lang-wrap { position: relative; }.xh-lang-dropdown a[aria-current="true"] { background: rgba(232,132,30,.12); color: var(--xh-orange); font-weight: 600; }.xh-lang-dropdown a[aria-current="true"] .xh-lang-code { color: var(--xh-orange); }
/* Mobile lang dropdown */
.xh-mobile-lang-wrap { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--xh-border); }
.xh-mobile-lang-toggle {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--xh-border);
  color: var(--xh-text); padding: 10px 14px; border-radius: var(--xh-radius-md);
  cursor: pointer; font: inherit; width: 100%; justify-content: flex-start;
  font-size: 14px;
}
.xh-mobile-lang-toggle:hover { background: rgba(255,255,255,.07); }
.xh-mobile-lang-toggle .xh-lang-icon,
.xh-mobile-lang-toggle svg {
  width: 18px !important; height: 18px !important;
  flex-shrink: 0;
  color: #FFCC00;
}
/* Wave J 2026-05-20 (#62): `display: flex !important` ломал hidden-атрибут — список всегда был виден.
   Теперь :not([hidden]) обеспечивает раскрытие только по тапу. */
.xh-lang-dropdown--mobile[hidden] { display: none; }
/* Wave J Phase C 2026-05-20 — cookie consent granular details (GDPR Art. 7). */
.xh-cookie-consent__details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--xh-border, #1e2d4a);
}
.xh-cookie-consent__details[hidden] { display: none; }
.xh-cookie-consent__fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}
.xh-cookie-consent__purpose {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--xh-border, #1e2d4a);
  border-radius: 6px;
}
.xh-cookie-consent__purpose-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #e6ecf5;
  cursor: pointer;
}
.xh-cookie-consent__purpose-label input { margin: 0; }
.xh-cookie-consent__purpose-name { user-select: none; }
.xh-cookie-consent__purpose-desc {
  margin: 6px 0 0 26px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--xh-text-muted, #9aa6bd);
}
.xh-cookie-consent__save { margin-top: 8px; }

/* Wave J Phase H 2026-05-20 — `.xh-link-btn` НЕ был определён, SVG arrow без size constraint
   расходился на весь viewport (owner screenshot: гигантская стрелка под "Смотреть все гайды"). */
.xh-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--xh-font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--xh-orange);
  padding: 8px 0;
  text-decoration: none;
  transition: color var(--xh-transition);
}
.xh-link-btn:hover { color: var(--xh-orange-hover); }
.xh-link-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Wave J Phase C 2026-05-20 — modal field labels (WCAG 3.3.2 visible labels). */
.modal-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--xh-text-secondary, #9aa6bd);
  margin: 8px 0 4px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.modal-field-label:first-child { margin-top: 0; }

/* Wave J Phase 3 2026-05-20 — Trailer modal (YouTube embed responsive 16:9).
   Wave J Phase H+ 2026-05-20: full positioning override — position:fixed + transform centering. */
#modal-mask .modal-body--video {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  max-width: 920px !important;
  width: 95vw !important;
  padding: 0 !important;
  background: #000 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: visible !important;
  margin: 0 !important;
  transition: none !important; /* legacy .modal-body has transition:top — отключаем для трейлера */
}
#modal-mask .modal-body--video.modal-show {
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}
#modal-mask .modal-body--video .modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  z-index: 2;
}
.xh-video-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  width: 100%;
  background: #000;
  border-radius: var(--xh-radius-lg);
  overflow: hidden;
}
.xh-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Wave J 2026-05-20 (#61): flag emoji в language switcher (header + mobile). */
.xh-lang-flag {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  width: 24px; min-width: 24px;
  /* Emoji rendering hint для Windows/Linux — fallback на цветную палитру. */
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
/* ============================================================
   GENERIC PAGE PRIMITIVES — для внутренних страниц (не главная)
   Подключаются автоматически (один общий home.r{REV}.css на все страницы).
   ============================================================ */

/* --- Breadcrumbs --- */
.xh-breadcrumbs {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px var(--xh-container-pad, 24px) 0;
  font-size: 14px;
  color: var(--xh-text-mute, #9aa6b6);
}
.xh-breadcrumbs-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.xh-breadcrumbs-item { display: inline-flex; align-items: center; gap: 8px; }
.xh-breadcrumbs-item a {
  color: var(--xh-text-mute, #9aa6b6);
  text-decoration: none;
  transition: color .15s;
}
.xh-breadcrumbs-item a:hover { color: var(--xh-text, #e8eef7); }
.xh-breadcrumbs-item [aria-current="page"] { color: var(--xh-text, #e8eef7); font-weight: 500; }
.xh-breadcrumbs-sep { color: var(--xh-text-mute, #9aa6b6); opacity: .5; }

/* --- Page hero (компактный, не главный) --- */
.xh-page-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px var(--xh-container-pad, 24px) 56px;
  text-align: center;
}
.xh-page-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.xh-page-hero-icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,204,0,.15), rgba(255,204,0,.05));
  border: 1px solid rgba(255,204,0,.3);
  border-radius: 16px;
  color: #FFCC00;
}
.xh-page-hero-icon svg { width: 28px; height: 28px; }
.xh-page-hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--xh-text-mute, #9aa6b6);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
}
.xh-page-hero-title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin: 0;
  color: var(--xh-text, #e8eef7);
  letter-spacing: -.01em;
}
.xh-page-hero-subtitle {
  font-size: clamp(16px, 2vw, 18px); line-height: 1.5; margin: 0;
  color: var(--xh-text-mute, #9aa6b6);
  max-width: 600px;
}

/* --- Page content container --- */
.xh-page-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 24px) 80px;
}

/* --- Prose: forматирование статичного контента (правила, политика, статьи) --- */
.xh-prose {
  color: var(--xh-text, #e8eef7);
  font-size: 17px; line-height: 1.7;
  /* Wave J 2026-05-20: длинные URL и слова не должны overflow на мобиле (owner: /ru/agreement). */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.xh-prose a {
  /* Не сламываем посередине anchor-text если можно; long URLs всё равно break благодаря .xh-prose. */
  word-break: break-word;
}
.xh-prose h2 {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  margin: 56px 0 16px;
  color: var(--xh-text, #e8eef7);
  scroll-margin-top: 80px;
}
.xh-prose h2:first-child { margin-top: 0; }
.xh-prose h3 {
  font-size: clamp(20px, 2.4vw, 24px); font-weight: 600;
  margin: 40px 0 12px;
  color: var(--xh-text, #e8eef7);
  scroll-margin-top: 80px;
}
.xh-prose h4 {
  font-size: 18px; font-weight: 600;
  margin: 28px 0 8px;
}
.xh-prose p { margin: 0 0 16px; }
.xh-prose ul, .xh-prose ol { padding-left: 24px; margin: 0 0 20px; }
.xh-prose li { margin-bottom: 8px; }
.xh-prose a {
  color: #FFCC00; text-decoration: underline; text-underline-offset: 3px;
}
.xh-prose a:hover { color: #ffd633; }
.xh-prose blockquote {
  margin: 24px 0; padding: 16px 20px;
  border-left: 3px solid #FFCC00;
  background: rgba(255,204,0,.05);
  border-radius: 0 8px 8px 0;
  color: var(--xh-text-mute, #9aa6b6); font-style: italic;
}
.xh-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  padding: 2px 6px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
}
.xh-prose hr {
  margin: 40px 0;
  border: none; border-top: 1px solid rgba(255,255,255,.08);
}
.xh-prose table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 15px;
}
.xh-prose th, .xh-prose td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.xh-prose th {
  font-weight: 600; color: var(--xh-text, #e8eef7);
  background: rgba(255,255,255,.03);
}
.xh-prose img {
  max-width: 100%; height: auto; border-radius: 12px;
  margin: 24px 0;
}

/* TOC (Table of Contents — для длинных статичных страниц) */
.xh-toc {
  padding: 20px 24px; margin: 0 0 32px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 12px;
}
.xh-toc-title {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--xh-text-mute, #9aa6b6); margin: 0 0 12px;
}
.xh-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.xh-toc li { counter-increment: toc; padding: 4px 0; }
.xh-toc li::before {
  content: counter(toc) ". "; color: #FFCC00; font-weight: 600;
  margin-right: 6px;
}
.xh-toc a { color: var(--xh-text, #e8eef7); text-decoration: none; }
.xh-toc a:hover { color: #FFCC00; }

/* --- Section CTA (для конца внутренних страниц) --- */
.xh-section-cta {
  max-width: 1180px;
  margin: 64px auto 80px;
  padding: 56px var(--xh-container-pad, 24px);
}
.xh-section-cta-inner {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, rgba(255,204,0,.08), rgba(255,204,0,.02));
  border: 1px solid rgba(255,204,0,.2);
  border-radius: 20px;
  max-width: 720px; margin: 0 auto;
}
.xh-section-cta-title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: clamp(24px, 3.5vw, 36px); line-height: 1.2;
  margin: 0 0 12px;
  color: var(--xh-text, #e8eef7);
}
.xh-section-cta-subtitle {
  font-size: 16px; line-height: 1.5;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0 0 28px;
}
.xh-section-cta-actions {
  display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}

/* Page-specific body классы (для override) — например body.xh-page--rules */
body.xh-page--rules .xh-page-content,
body.xh-page--agreement .xh-page-content,
body.xh-page--privacy .xh-page-content {
  max-width: 820px;  /* уже для legal-страниц с длинным текстом */
}

@media (max-width: 720px) {
  .xh-page-hero { padding: 32px var(--xh-container-pad, 16px) 40px; }
  .xh-page-hero-title { font-size: 28px; }
  .xh-page-content { padding-bottom: 56px; }
  .xh-prose { font-size: 16px; }
  .xh-section-cta { margin: 40px auto 56px; padding: 32px var(--xh-container-pad, 16px); }
  .xh-section-cta-inner { padding: 32px 20px; }
  /* Wave J Phase H 2026-05-20: button overflow на mobile (owner screenshot — кнопка без отступов). */
  .xh-section-cta-actions { display: flex; flex-direction: column; width: 100%; gap: 12px; }
  .xh-section-cta-actions > .xh-btn { width: 100%; box-sizing: border-box; justify-content: center; }
}

/* ============================================================
   CONTACTS PAGE — grid of channel cards + legal block
   ============================================================ */
.xh-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.xh-contacts-card {
  display: block;
  padding: 24px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 16px;
  color: var(--xh-text, #e8eef7);
  text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.xh-contacts-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,204,0,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.xh-contacts-card-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,204,0,.1);
  border-radius: 12px;
  color: #FFCC00;
  margin-bottom: 12px;
}
.xh-contacts-card-icon svg { width: 24px; height: 24px; }
.xh-contacts-card h3 {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 18px; margin: 0 0 8px;
  color: var(--xh-text, #e8eef7);
}
.xh-contacts-card p {
  font-size: 14px; line-height: 1.5;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0 0 12px;
  min-height: 42px;
}
.xh-contacts-value {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: #FFCC00;
}
.xh-contacts-value svg { width: 14px; height: 14px; }

.xh-contacts-legal {
  padding: 24px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  font-size: 15px; line-height: 1.6;
}
.xh-contacts-legal h3 {
  font-size: 16px; font-weight: 600;
  margin: 0 0 12px;
  color: var(--xh-text, #e8eef7);
  letter-spacing: .02em;
}
.xh-contacts-legal p {
  margin: 0 0 6px;
  color: var(--xh-text-mute, #9aa6b6);
}
.xh-contacts-legal strong { color: var(--xh-text, #e8eef7); }
.xh-contacts-legal a { color: #FFCC00; }
.xh-contacts-legal-note {
  margin-top: 12px;
  font-size: 13px;
  font-style: italic;
  opacity: .8;
}

@media (max-width: 480px) {
  .xh-contacts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UNIVERSES HUB + DETAIL pages
   ============================================================ */
.xh-uni-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.xh-uni-hub-card {
  position: relative;
  padding: 28px 24px 24px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 16px;
  display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.xh-uni-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.xh-uni-hub-card--woa { border-color: rgba(120,170,255,.3); }
.xh-uni-hub-card--woa:hover { border-color: rgba(120,170,255,.6); }
.xh-uni-hub-card--classic { border-color: rgba(255,180,80,.3); }
.xh-uni-hub-card--classic:hover { border-color: rgba(255,180,80,.6); }
.xh-uni-hub-card--reborn { border-color: rgba(120,255,180,.3); }
.xh-uni-hub-card--reborn:hover { border-color: rgba(120,255,180,.6); }

.xh-uni-hub-badge {
  position: absolute; top: -10px; left: 16px;
  padding: 4px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #FFCC00; color: #0d1424;
  border-radius: 999px;
}
.xh-uni-hub-card-icon {
  width: 48px; height: 48px;
  flex: 0 0 48px;          /* prevent flex-shrink/grow in column layout */
  align-self: flex-start;  /* prevent stretch on mobile (flex-direction: column) */
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,204,0,.1); color: #FFCC00;
  border-radius: 12px;
  margin-bottom: 16px;
}
.xh-uni-hub-card-icon svg { width: 24px; height: 24px; flex-shrink: 0; }

.xh-uni-hub-card-title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 22px; margin: 0 0 8px;
  color: var(--xh-text, #e8eef7);
}
.xh-uni-hub-card-desc {
  font-size: 14px; line-height: 1.55;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0 0 16px;
  flex: 1;
}
.xh-uni-hub-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.xh-uni-hub-tag {
  padding: 3px 10px;
  font-size: 11px;
  color: var(--xh-text-mute, #9aa6b6);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
}
.xh-uni-hub-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: #FFCC00; text-decoration: none;
}
.xh-uni-hub-card-link svg { width: 14px; height: 14px; transition: transform .15s; }
.xh-uni-hub-card-link:hover svg { transform: translateX(3px); }

.xh-uni-hub-compare-hint {
  padding: 16px 20px; margin-top: 16px;
  background: rgba(255,204,0,.04);
  border: 1px solid rgba(255,204,0,.15);
  border-radius: 10px;
  font-size: 14px;
  color: var(--xh-text-mute, #9aa6b6);
  text-align: center;
}

/* Universe DETAIL — features pill list */
.xh-uni-features-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0 0 32px;
}
.xh-uni-features-list li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,204,0,.08);
  border: 1px solid rgba(255,204,0,.2);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--xh-text, #e8eef7);
}
.xh-uni-features-list svg { width: 16px; height: 16px; color: #FFCC00; }

/* Related universes block */
.xh-uni-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.xh-uni-related h2 {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 24px; margin: 0 0 16px;
  color: var(--xh-text, #e8eef7);
}
.xh-uni-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.xh-uni-related-card {
  display: block;
  padding: 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.xh-uni-related-card:hover {
  border-color: rgba(255,204,0,.3);
  background: rgba(255,255,255,.05);
}
.xh-uni-related-card h3 {
  font-size: 16px; margin: 0 0 6px;
  color: var(--xh-text, #e8eef7);
  font-weight: 600;
}
.xh-uni-related-card p {
  font-size: 13px; line-height: 1.5; margin: 0 0 10px;
  color: var(--xh-text-mute, #9aa6b6);
}
.xh-uni-related-card span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: #FFCC00;
}
.xh-uni-related-card span svg { width: 13px; height: 13px; }

/* ============================================================
   KNOWLEDGE BASE HUB + ARTICLE
   ============================================================ */
.xh-kb-empty {
  text-align: center; padding: 48px 24px;
  color: var(--xh-text-mute, #9aa6b6);
  font-size: 16px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 12px;
}
.xh-kb-categories { display: flex; flex-direction: column; gap: 48px; }
.xh-kb-category-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.xh-kb-category-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,204,0,.1);
  border-radius: 8px;
  color: #FFCC00;
}
.xh-kb-category-icon svg { width: 18px; height: 18px; }
.xh-kb-category-title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 22px; margin: 0;
  color: var(--xh-text, #e8eef7);
  flex: 1;
}
.xh-kb-category-count {
  font-size: 13px; color: var(--xh-text-mute, #9aa6b6);
  background: rgba(255,255,255,.04);
  padding: 4px 10px; border-radius: 999px;
}
.xh-kb-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.xh-kb-article-card {
  display: block;
  padding: 20px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.xh-kb-article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,204,0,.4);
}
.xh-kb-article-card h3 {
  font-size: 17px; font-weight: 600;
  margin: 0 0 8px;
  color: var(--xh-text, #e8eef7);
  line-height: 1.3;
}
.xh-kb-article-card p {
  font-size: 14px; line-height: 1.5;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0 0 12px;
}
.xh-kb-article-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  color: var(--xh-text-mute, #9aa6b6);
}
.xh-kb-article-meta span:first-child { font-style: italic; }
.xh-kb-article-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: #FFCC00; font-weight: 600;
}
.xh-kb-article-link svg { width: 13px; height: 13px; }

/* Article detail — meta pills (reading time, updated, author) */
.xh-kb-meta-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0 0 32px;
  font-size: 13px;
  color: var(--xh-text-mute, #9aa6b6);
}
.xh-kb-meta-pills li {
  padding: 4px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
}

/* ============================================================
   ETAP 4: Support, Mobile, Community, News
   ============================================================ */

/* /support — quick contact cards */
.xh-support-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.xh-support-quick-card {
  display: block;
  padding: 20px;
  text-align: center;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.xh-support-quick-card:hover {
  border-color: rgba(255,204,0,.4);
  background: rgba(255,255,255,.05);
}
.xh-support-quick-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,204,0,.1);
  border-radius: 10px;
  color: #FFCC00;
  margin-bottom: 10px;
}
.xh-support-quick-icon svg { width: 20px; height: 20px; }
.xh-support-quick-card h3 {
  font-size: 15px; font-weight: 600;
  margin: 0 0 4px;
  color: var(--xh-text, #e8eef7);
}
.xh-support-quick-card p {
  font-size: 13px; margin: 0;
  color: var(--xh-text-mute, #9aa6b6);
}

/* /support — FAQ accordion (reuses xh-prose) */
.xh-support-faq details {
  padding: 16px 20px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}
.xh-support-faq summary {
  font-weight: 600; cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.xh-support-faq summary::after { content: '+'; font-size: 20px; opacity: .6; }
.xh-support-faq details[open] summary::after { content: '−'; }
.xh-support-faq details > div {
  padding-top: 12px; margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--xh-text-mute, #9aa6b6);
  font-size: 15px; line-height: 1.6;
}

.xh-support-still {
  margin-top: 48px;
  padding: 24px;
  background: rgba(255,204,0,.05);
  border: 1px solid rgba(255,204,0,.2);
  border-radius: 12px;
  text-align: center;
}
.xh-support-still h3 { margin: 0 0 8px; font-size: 18px; color: var(--xh-text); }
.xh-support-still p { margin: 0; color: var(--xh-text-mute); font-size: 15px; }
.xh-support-still a { color: #FFCC00; }

/* /mobile — store cards */
.xh-mobile-stores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.xh-mobile-store-card {
  display: flex; align-items: center; gap: 16px;
  padding: 24px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 16px;
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.xh-mobile-store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,204,0,.4);
}
.xh-mobile-store-card svg { width: 40px; height: 40px; flex-shrink: 0; }
.xh-mobile-store-card--gp svg { color: #3DDB85; }
.xh-mobile-store-card--as svg { color: #f5f6fa; }
.xh-mobile-store-card div { display: flex; flex-direction: column; line-height: 1.3; }
.xh-mobile-store-card span { font-size: 12px; color: var(--xh-text-mute); }
.xh-mobile-store-card strong { font-size: 18px; color: var(--xh-text); margin-top: 2px; }
.xh-mobile-store-card small { font-size: 12px; color: var(--xh-text-mute); margin-top: 4px; }

/* /community — channel cards */
.xh-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.xh-community-card {
  position: relative;
  display: block;
  padding: 24px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 14px;
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.xh-community-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,204,0,.4);
}
.xh-community-card--discord:hover { border-color: rgba(88,101,242,.6); }
.xh-community-card--telegram:hover { border-color: rgba(34,158,217,.6); }
.xh-community-card--vk:hover { border-color: rgba(0,119,255,.6); }
.xh-community-card--youtube:hover { border-color: rgba(255,0,0,.6); }
.xh-community-card-tag {
  position: absolute; top: 16px; right: 16px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,204,0,.1);
  color: #FFCC00;
  border-radius: 999px;
}
.xh-community-card-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  color: var(--xh-text);
  margin-bottom: 14px;
}
.xh-community-card--discord .xh-community-card-icon { background: rgba(88,101,242,.15); color: #5865F2; }
.xh-community-card--telegram .xh-community-card-icon { background: rgba(34,158,217,.15); color: #229ED9; }
.xh-community-card--vk .xh-community-card-icon { background: rgba(0,119,255,.15); color: #0077FF; }
.xh-community-card--youtube .xh-community-card-icon { background: rgba(255,0,0,.15); color: #FF0000; }
.xh-community-card-icon svg { width: 22px; height: 22px; }
.xh-community-card h3 {
  font-size: 18px; font-weight: 600;
  margin: 0 0 8px;
  color: var(--xh-text);
}
.xh-community-card p {
  font-size: 14px; line-height: 1.5;
  color: var(--xh-text-mute);
  margin: 0 0 14px;
}
.xh-community-card-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600;
  color: #FFCC00;
}
.xh-community-card-link svg { width: 13px; height: 13px; }

/* /news removed 2026-05-17: forum заменил раздел новостей (owner decision Telegram msg 2733).
   Стиль `.xh-news-empty` удалён вместе со страницей /news. */

/* ============================================================
   KNOWLEDGE HUB SEARCH (2026-05-17)
   Top-level filter UI: input bar + result cards grid.
   Default state: categories visible, results hidden.
   With query: categories hidden, matching cards visible.
   ============================================================ */
.xh-kb-search { margin: 0 0 32px; }
.xh-kb-search__wrap {
  position: relative;
  display: flex; align-items: center;
}
.xh-kb-search__icon {
  position: absolute; left: 18px;
  width: 18px; height: 18px;
  color: rgba(255,255,255,.5);
  pointer-events: none;
}
.xh-kb-search__input {
  width: 100%;
  padding: 16px 48px 16px 50px;
  font-family: inherit;
  font-size: 15px;
  color: var(--xh-text, #fff);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.xh-kb-search__input:focus,
.xh-kb-search__input:hover {
  border-color: rgba(255,204,0,.4);
  background: rgba(255,255,255,.06);
}
.xh-kb-search__input::placeholder { color: rgba(255,255,255,.4); }
.xh-kb-search__input::-webkit-search-cancel-button { display: none; }
.xh-kb-search__clear {
  position: absolute; right: 8px;
  width: 32px; height: 32px;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border: none; border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-size: 18px; line-height: 1; cursor: pointer;
  transition: background .15s;
}
.xh-kb-search__clear.is-visible { display: inline-flex; }
.xh-kb-search__clear:hover { background: rgba(255,255,255,.14); color: #FFCC00; }
.xh-kb-search__hint {
  margin: 8px 4px 0;
  font-size: 13px; color: rgba(255,255,255,.45);
}

/* Search results */
.xh-kb-results { margin-top: 8px; }
.xh-kb-results__title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 20px; margin: 0 0 4px;
}
.xh-kb-results__count {
  font-size: 13px; color: rgba(255,255,255,.5);
  margin: 0 0 18px;
}
.xh-kb-results__empty {
  padding: 32px 24px; text-align: center;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 12px;
  color: rgba(255,255,255,.7);
  font-size: 14px; line-height: 1.55;
}
.xh-kb-results__empty strong {
  color: var(--xh-text, #fff);
  display: inline-block; margin-bottom: 4px;
}
.xh-kb-results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.xh-kb-result-card {
  display: block;
  padding: 18px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  text-decoration: none;
  color: var(--xh-text, #fff);
  transition: border-color .15s, background .15s, transform .15s;
}
.xh-kb-result-card:hover,
.xh-kb-result-card:focus-visible {
  border-color: rgba(255,204,0,.5);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
  outline: none;
}
.xh-kb-result-card__meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; color: rgba(255,255,255,.5);
  margin-bottom: 6px;
}
.xh-kb-result-card__cat {
  text-transform: uppercase; letter-spacing: .05em;
  color: #FFCC00; font-weight: 600;
}
.xh-kb-result-card__rt::before { content: '·'; margin-right: 6px; opacity: .5; }
.xh-kb-result-card__title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: 16px; margin: 0 0 6px; line-height: 1.3;
}
.xh-kb-result-card__desc {
  font-size: 13px; line-height: 1.5;
  color: rgba(255,255,255,.7);
  margin: 0;
}
.xh-kb-result-card__tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 10px;
}
.xh-kb-result-card__tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(255,204,0,.08);
  color: rgba(255,204,0,.85);
  border-radius: 4px;
}

@media (max-width: 640px) {
  .xh-kb-search__input { padding: 14px 44px 14px 46px; font-size: 14px; }
  .xh-kb-search__icon { left: 16px; width: 16px; height: 16px; }
  .xh-kb-results__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   GLOBAL FIX (2026-05-16): icon containers in flex-column cards
   must not stretch on mobile. flex-direction:column + default
   align-items:stretch makes child fill parent width.
   ============================================================ */
.xh-uni-hub-card-icon,
.xh-contacts-card-icon,
.xh-community-card-icon,
.xh-kb-category-icon,
.xh-support-quick-icon,
.xh-page-hero-icon,
.xh-404-icon {
  flex: 0 0 auto;
  align-self: flex-start;
}
/* Hero icon centred in hero — override align-self */
.xh-page-hero-icon,
.xh-404-icon,
.xh-support-quick-icon {
  align-self: center;
}
/* Ensure SVG never stretches in any inline-flex/block container */
.xh-uni-hub-card-icon svg,
.xh-contacts-card-icon svg,
.xh-community-card-icon svg,
.xh-kb-category-icon svg,
.xh-support-quick-icon svg,
.xh-page-hero-icon svg,
.xh-404-icon svg {
  flex-shrink: 0;
}

/* ============================================================
   KNOWLEDGE STRIP on home page
   ============================================================ */
.xh-kb-strip { padding: 64px 0; }
.xh-kb-strip-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.xh-kb-strip-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #FFCC00;
  background: rgba(255,204,0,.1);
  border-radius: 999px;
  margin-bottom: 8px;
}
.xh-kb-strip-title {
  font-family: var(--xh-font-display, 'Archivo Black'), system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 36px); line-height: 1.15;
  margin: 0 0 8px;
  color: var(--xh-text, #e8eef7);
  letter-spacing: -.01em;
}
.xh-kb-strip-sub {
  font-size: 16px; line-height: 1.5;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0;
  max-width: 560px;
}
.xh-kb-strip-cta { flex-shrink: 0; }

.xh-kb-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.xh-kb-strip-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px;
  background: linear-gradient(rgb(13,20,36), rgb(10,15,28));
  border: 1px solid rgba(30,45,74,.6);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.xh-kb-strip-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,204,0,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.xh-kb-strip-card-icon {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,204,0,.1);
  border-radius: 10px;
  color: #FFCC00;
}
.xh-kb-strip-card--wiki .xh-kb-strip-card-icon { background: rgba(120,170,255,.12); color: #78aaff; }
.xh-kb-strip-card--mechanics .xh-kb-strip-card-icon { background: rgba(120,255,180,.12); color: #78ffb4; }
.xh-kb-strip-card-icon svg { width: 20px; height: 20px; flex-shrink: 0; }
.xh-kb-strip-card-body { flex: 1; min-width: 0; }
.xh-kb-strip-card-cat {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: #FFCC00;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.xh-kb-strip-card--wiki .xh-kb-strip-card-cat { color: #78aaff; }
.xh-kb-strip-card--mechanics .xh-kb-strip-card-cat { color: #78ffb4; }
.xh-kb-strip-card h3 {
  font-size: 16px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--xh-text, #e8eef7);
  line-height: 1.3;
}
.xh-kb-strip-card p {
  font-size: 13px; line-height: 1.5;
  color: var(--xh-text-mute, #9aa6b6);
  margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.xh-kb-strip-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--xh-text-mute, #9aa6b6);
}
.xh-kb-strip-card-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; color: #FFCC00;
}
.xh-kb-strip-card-link svg { width: 12px; height: 12px; }

@media (max-width: 720px) {
  .xh-kb-strip { padding: 48px 0; }
  .xh-kb-strip-header { flex-direction: column; align-items: flex-start; }
  .xh-kb-strip-cta { width: 100%; justify-content: center; }
}

/* ============================================================
   Cookie consent banner (152-ФЗ + GDPR) — since 2026-05-16
   ============================================================ */
.xh-cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9990;
  max-width: 920px;
  margin: 0 auto;
  background: rgba(12, 19, 34, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--xh-border-light, rgba(255,255,255,.08));
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,.5), 0 0 0 1px rgba(255,204,0,.08);
  padding: 18px 22px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.xh-cookie-consent--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.xh-cookie-consent[hidden] { display: none; }

/* a11y CRIT-5 (Wave B): visible × close button — duplicates Esc shortcut + WCAG 2.5.5/2.5.8 + GDPR Art.7. */
.xh-cookie-consent__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--xh-border, #162035);
  border-radius: 50%;
  background: transparent;
  color: var(--xh-text-muted, #9aa6bd);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s, color .15s, border-color .15s;
}
.xh-cookie-consent__close:hover { background: var(--xh-bg-card-hover, #111a2e); color: var(--xh-text, #e8ecf2); }
.xh-cookie-consent__close:focus-visible { outline: 2px solid var(--xh-orange, #e88420); outline-offset: 2px; }

.xh-cookie-consent__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-right: 44px; /* room for absolute-positioned close button */
}
.xh-cookie-consent__text { flex: 1 1 360px; min-width: 0; }
.xh-cookie-consent__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--xh-text, #e8ecf2);
  letter-spacing: .01em;
}
.xh-cookie-consent__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--xh-text-secondary, #a4b3c8);
}
.xh-cookie-consent__link {
  color: #FFCC00;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}
.xh-cookie-consent__link:hover { color: #ffd633; }
.xh-cookie-consent__link:focus-visible {
  outline: 2px solid #FFCC00;
  outline-offset: 2px;
  border-radius: 2px;
}

.xh-cookie-consent__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.xh-cookie-consent__btn {
  padding: 10px 18px;
  font-size: 13px;
  white-space: nowrap;
}
/* Override .xh-page button { background:none } — specificity 0,2,0 > 0,1,1 */
.xh-cookie-consent__btn.xh-btn--primary {
  background: var(--xh-orange, #e88420);
  color: var(--xh-orange-text, #1a0f00);
  box-shadow: 0 0 20px var(--xh-orange-glow, rgba(232,132,30,.25));
}
.xh-cookie-consent__btn.xh-btn--primary:hover {
  background: var(--xh-orange-hover, #f59a3e);
}
.xh-cookie-consent__btn.xh-btn--ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--xh-border-light, #1e2d4a);
  color: var(--xh-text, #e8ecf2);
}
.xh-cookie-consent__btn.xh-btn--ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--xh-text-secondary, #a4b3c8);
}

/* Footer trigger — "Cookie settings" link */
.xh-cookie-settings-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,.2);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.xh-cookie-settings-link:hover { color: #FFCC00; text-decoration-color: #FFCC00; }
.xh-cookie-settings-link:focus-visible {
  outline: 2px solid #FFCC00;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Mobile — stack vertically */
@media (max-width: 640px) {
  .xh-cookie-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 16px 18px;
    border-radius: 12px;
  }
  .xh-cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .xh-cookie-consent__text { flex: 1 1 auto; }
  .xh-cookie-consent__actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  .xh-cookie-consent__btn {
    width: 100%;
    justify-content: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .xh-cookie-consent {
    transition: opacity .15s ease;
    transform: none;
  }
  .xh-cookie-consent--visible { transform: none; }
}

/* ============================================================
   FORUM UPDATES — Sprint 1 Phase C (home page)
   ============================================================ */
.xh-forum-updates {
  padding: 64px 0;
  position: relative;
  z-index: 1;
}
.xh-forum-updates__header {
  text-align: center;
  margin: 0 auto 36px;
  max-width: 720px;
}
.xh-forum-updates__title {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  font-family: var(--xh-font-heading);
  color: var(--xh-text);
}
.xh-forum-updates__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--xh-text-secondary);
}
.xh-forum-updates__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 0 0 32px;
}
.xh-forum-col {
  padding: 22px 24px 18px;
  background: rgba(12, 19, 34, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
}
.xh-forum-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--xh-text);
}
.xh-forum-col__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.xh-forum-col__dot--updates { background: #FFCC00; box-shadow: 0 0 8px rgba(255,204,0,.5); }
.xh-forum-col__dot--discussions { background: #78aaff; box-shadow: 0 0 8px rgba(120,170,255,.5); }
.xh-forum-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.xh-forum-item {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.xh-forum-item:last-child { border-bottom: 0; }
.xh-forum-item__link {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}
.xh-forum-item__link:hover { color: var(--xh-text); }
.xh-forum-item__body {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  flex-wrap: wrap;
}
.xh-forum-item__cat {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(255, 204, 0, .14);
  color: #FFCC00;
  border-radius: 999px;
}
.xh-forum-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--xh-text);
  line-height: 1.4;
}
.xh-forum-item__link:hover .xh-forum-item__title { color: #FFCC00; }
.xh-forum-item__meta {
  font-size: 12px;
  color: var(--xh-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.xh-forum-item__sep { opacity: .5; }
.xh-forum-updates__cta {
  text-align: center;
}

@media (max-width: 720px) {
  .xh-forum-updates { padding: 48px 0; }
  .xh-forum-updates__title { font-size: 24px; }
  .xh-forum-updates__grid { grid-template-columns: 1fr; gap: 16px; }
  .xh-forum-col { padding: 18px 18px 14px; }
}

/* ============================================================
   Accessibility & motion preferences (Sprint 1 polishing)
   ============================================================ */

/* Universal focus-visible — чтобы клавиатурная навигация была видна */
.xh-page a:focus-visible,
.xh-page button:focus-visible,
.xh-page input:focus-visible,
.xh-page select:focus-visible,
.xh-page textarea:focus-visible,
.xh-page [tabindex]:focus-visible,
#modal-mask a:focus-visible,
#modal-mask button:focus-visible,
#modal-mask input:focus-visible,
#modal-mask select:focus-visible,
#modal-mask textarea:focus-visible {
  outline: 2px solid #FFCC00;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion — отключаем сложные transitions для пользователей с motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* F-A11Y-110 (2026-05-21): broadened scope — pages without .xh-page wrapper also honor reduced-motion */
  *:hover {
    transform: none !important;
  }
}

/* ============================================================
   Knowledge strip — sections layout (owner 2026-05-16 — разделы, не статьи)
   ============================================================ */
.xh-kb-strip-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.xh-kb-strip-section {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 20px;
  background: rgba(12, 19, 34, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.xh-kb-strip-section:hover {
  border-color: rgba(255, 204, 0, .4);
  transform: translateY(-2px);
  background: rgba(12, 19, 34, .85);
}
.xh-kb-strip-section__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 204, 0, .14);
  display: flex; align-items: center; justify-content: center;
  color: #FFCC00;
  flex-shrink: 0;
}
.xh-kb-strip-section--wiki .xh-kb-strip-section__icon { background: rgba(120, 170, 255, .14); color: #78aaff; }
.xh-kb-strip-section--mechanics .xh-kb-strip-section__icon { background: rgba(120, 255, 180, .14); color: #78ffb4; }
.xh-kb-strip-section__icon svg { width: 22px; height: 22px; }
.xh-kb-strip-section__body { flex: 1; min-width: 0; }
.xh-kb-strip-section__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--xh-text-muted, #8a99b0);
  display: block;
  margin: 0 0 6px;
}
.xh-kb-strip-section__body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--xh-text, #e8ecf2);
}
.xh-kb-strip-section__body p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--xh-text-secondary, #a4b3c8);
}
.xh-kb-strip-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #FFCC00;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.xh-kb-strip-section--wiki .xh-kb-strip-section__cta { color: #78aaff; }
.xh-kb-strip-section--mechanics .xh-kb-strip-section__cta { color: #78ffb4; }
.xh-kb-strip-section__cta svg { width: 12px; height: 12px; }

/* ============================================================
   Auth pages v2 wrapper (legacy /users/* migration)
   ============================================================ */
.xh-page--auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.xh-auth-main {
  /* Wave J 2026-05-20: убран `flex: 1` (раньше тянул main к viewport bottom = sticky-footer pattern).
     На коротком контенте (/users/personal) создавал большое пустое пространство до футера.
     Теперь main размером с контент, footer идёт сразу. */
  padding: 56px 0 80px;
  position: relative;
  z-index: 1;
}
.xh-auth-content {
  max-width: 720px;
  margin: 0 auto;
}
/* Legacy form elements внутри v2 wrapper — apply v2 styling */
.xh-page--auth form {
  background: rgba(12, 19, 34, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 32px 32px 24px;
  margin: 0 auto;
}
.xh-page--auth h1, .xh-page--auth h2, .xh-page--auth h3 {
  color: var(--xh-text);
  font-family: var(--xh-font-heading);
  margin-bottom: 20px;
}
.xh-page--auth label,
.xh-page--auth p,
.xh-page--auth li {
  color: var(--xh-text-secondary);
  line-height: 1.55;
}
.xh-page--auth input[type="text"],
.xh-page--auth input[type="email"],
.xh-page--auth input[type="password"],
.xh-page--auth input[type="number"],
.xh-page--auth input:not([type]),
.xh-page--auth textarea,
.xh-page--auth select {
  width: 100%;
  padding: 11px 14px;
  margin: 6px 0 14px;
  background: rgba(6, 10, 20, .6);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: var(--xh-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.xh-page--auth input:focus,
.xh-page--auth textarea:focus,
.xh-page--auth select:focus {
  border-color: #FFCC00;
  background: rgba(6, 10, 20, .85);
}
.xh-page--auth input[type="submit"],
.xh-page--auth button[type="submit"],
.xh-page--auth .btn-submit {
  background: var(--xh-orange);
  color: var(--xh-orange-text);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 18px var(--xh-orange-glow);
  transition: background .15s ease, transform .15s ease;
}
.xh-page--auth input[type="submit"]:hover,
.xh-page--auth button[type="submit"]:hover,
.xh-page--auth .btn-submit:hover {
  background: var(--xh-orange-hover);
  transform: translateY(-1px);
}
.xh-page--auth a:not(.xh-btn):not(.xh-nav a):not(.xh-footer a):not(.xh-logo) {
  color: #FFCC00;
}
.xh-page--auth a:not(.xh-btn):not(.xh-nav a):not(.xh-footer a):not(.xh-logo):hover {
  color: #ffd633;
}

/* Hide legacy elements that conflict с v2 layout */
.xh-page--auth .win, .xh-page--auth .bg-g, .xh-page--auth .bg-tc, .xh-page--auth .bg-p-1 {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.xh-page--auth #topnav,
.xh-page--auth .legacy-header,
.xh-page--auth .legacy-footer { display: none !important; }

/* ===== Auth fallback (для AJAX endpoints visited via GET) ===== */
.xh-auth-fallback {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 32px 28px;
  background: rgba(12, 19, 34, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  text-align: center;
}
.xh-auth-fallback__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: rgba(255, 204, 0, .14);
  display: flex; align-items: center; justify-content: center;
  color: #FFCC00;
}
.xh-auth-fallback__icon svg { width: 28px; height: 28px; }
.xh-auth-fallback h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--xh-text);
  margin: 0 0 10px;
}
.xh-auth-fallback p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--xh-text-secondary);
  margin: 0 0 18px;
}
.xh-auth-fallback__steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: inline-block;
}
.xh-auth-fallback__steps li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--xh-text-secondary);
}
.xh-auth-fallback__steps strong { color: #FFCC00; }
.xh-auth-fallback__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ============================================
   About page stats row (xh-about-stats)
   Используется на /about, между hero и prose-контентом.
   ============================================ */
.xh-about-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.xh-about-stat {
  padding: 20px 16px;
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius-lg, 10px);
  background: var(--xh-bg-card, #0c1322);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: border-color var(--xh-transition, .3s ease), transform var(--xh-transition, .3s ease);
}
.xh-about-stat:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  transform: translateY(-2px);
}
.xh-about-stat__value {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: 32px;
  line-height: 1;
  color: var(--xh-orange, #e88420);
}
.xh-about-stat__value sup { font-size: 0.55em; vertical-align: super; opacity: .8; }
.xh-about-stat__label {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--xh-text-secondary, #a4b3c8);
}

@media (max-width: 980px) {
  .xh-about-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .xh-about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .xh-about-stat { padding: 16px 14px; }
  .xh-about-stat__value { font-size: 26px; }
}
@media (max-width: 380px) {
  .xh-about-stats { grid-template-columns: 1fr 1fr; }
}

/* 2026-05-21 owner bug: .sr-only CSS missing → "Смотреть трейлер" h2 was visible above iframe.
   Standard a11y-only visually-hidden pattern. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 2026-05-21 owner bug: .xh-page--auth global a:#FFCC00 rule overrode user/lang dropdown links → all menu items yellow.
   Restore proper colors for dropdown contents. */
.xh-page--auth .xh-user-dropdown a,
.xh-page--auth .xh-lang-dropdown a,
.xh-page--auth .xh-mobile-menu a,
.xh-page--auth .xh-mobile-menu a:not([class*="xh-btn"]) {
  color: var(--xh-text) !important;
}
.xh-page--auth .xh-user-dropdown a:hover,
.xh-page--auth .xh-lang-dropdown a:hover,
.xh-page--auth .xh-mobile-menu a:hover {
  color: var(--xh-orange) !important;
}
.xh-page--auth .xh-user-dropdown__logout {
  color: var(--xh-orange) !important;
}
.xh-page--auth .xh-user-dropdown .xh-uni-ver {
  color: var(--xh-text-muted) !important;
}
/* Header user-nick на страницах /users/* (.xh-page--auth) — ЖЁЛТЫМ, как на главной
   (owner 2026-06-03: в настройках аккаунта ник был белым, должен совпадать с домашней шапкой). */
.xh-page--auth .xh-user .xh-user-nick {
  color: var(--xh-yellow, #FFCC00) !important;
}

/* 2026-05-21 owner UX: mobile hero CTA visibility (was below fold on iPhone). */
@media (max-width: 640px) {
  .xh-hero { min-height: auto; padding: 24px 0 28px; }
  .xh-hero-eyebrow { font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
  .xh-hero-title { font-size: clamp(32px, 9vw, 48px); margin-bottom: 6px; }
  .xh-hero-subtitle { font-size: 15px; margin-bottom: 8px; }
  .xh-hero-desc { font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
  .xh-hero-actions { gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
  .xh-hero-actions .xh-btn { padding: 12px 18px; font-size: 14px; min-height: 44px; }
  .xh-hero-perks { gap: 12px; margin-bottom: 14px; font-size: 12px; }
  .xh-hero-apps { gap: 8px; }
}

/* 2026-05-21 owner UX: lang dropdown overflow on mobile (3 column / 2 column 220px breaks viewport).
   Switch to single column on small screens — fits any width. */
@media (max-width: 640px) {
  .xh-lang-dropdown {
    grid-template-columns: 1fr;
    min-width: 180px;
    max-width: calc(100vw - 24px);
    right: 0;
  }
  .xh-lang-dropdown a {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Smaller phones — even tighter */
@media (max-width: 380px) {
  .xh-hero-title { font-size: 28px; }
  .xh-hero-actions { flex-direction: column; align-items: stretch; }
  .xh-hero-actions .xh-btn { width: 100%; justify-content: center; }
  .xh-lang-dropdown { min-width: 160px; }
}

/* 2026-05-21 owner UX: mobile registration form too tall — Play button below fold.
   Compress paddings/margins on mobile so form fits one screen. */
@media (max-width: 640px) {
  /* Modal container — full screen, no excessive padding */
  #modal-mask #modal-reg,
  #modal-mask #modal-login,
  #modal-mask #modal-recover,
  #modal-mask #modal-recoverend {
    max-width: 100% !important;
    width: calc(100vw - 16px) !important;
    margin: 8px !important;
    padding: 16px !important;
  }
  #modal-mask .modal-content { padding: 0 !important; }

  /* Title — much smaller, less margin */
  #modal-mask .modal-title {
    font-size: 18px !important;
    margin-bottom: 8px !important;
    line-height: 1.2;
  }
  #modal-mask .modal-title span {
    font-size: 12px !important;
    margin-top: 4px !important;
  }

  /* Social buttons — tighter spacing */
  #modal-mask .modal-soc { margin-bottom: 10px !important; }
  #modal-mask .modal-soc-icos { gap: 6px !important; }
  #modal-mask .modal-soc-icos > * {
    width: 40px !important;
    height: 40px !important;
  }
  #modal-mask .modal-soc-sep {
    margin: 8px 0 !important;
    font-size: 11px !important;
  }

  /* Field labels — smaller */
  #modal-mask .modal-field-label {
    font-size: 11px !important;
    margin-top: 8px !important;
    margin-bottom: 4px !important;
    letter-spacing: .5px;
  }

  /* Field-helper text — tighter */
  .xh-field-helper { font-size: 11px !important; min-height: 12px !important; }

  /* Inputs — slightly less padding */
  #modal-mask .input-text,
  #modal-mask .select {
    padding: 9px 12px !important;
    font-size: 14px !important;
  }

  /* Universe selector wrap — less margin */
  #modal-mask form > div { margin-bottom: 6px; }

  /* Captcha — fit width */
  #modal-mask .modal-captcha {
    margin: 8px 0 !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }
  #modal-mask .modal-captcha .img-captcha {
    height: 36px !important;
    width: auto !important;
    max-width: 80px !important;
  }
  #modal-mask .modal-captcha .modal-field-label {
    flex: 0 1 auto !important;
    margin: 0 !important;
    font-size: 10px !important;
  }
  #modal-mask .input-text-captcha .input-text {
    max-width: 100px !important;
    padding: 9px 8px !important;
    text-align: center;
  }

  /* Accept agreement / news checkboxes — compact */
  #modal-mask .modal-extra-text {
    margin: 6px 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  #modal-mask label[for*="accept"],
  #modal-mask label[for*="news"] {
    font-size: 12px !important;
    margin: 4px 0 !important;
    line-height: 1.3 !important;
  }
  #modal-mask input[type="checkbox"] {
    margin-right: 6px !important;
    width: 18px !important;
    height: 18px !important;
  }

  /* Submit button — full width, tighter */
  #modal-mask input[type="submit"],
  #modal-mask button[type="submit"] {
    width: 100% !important;
    padding: 12px !important;
    font-size: 15px !important;
    margin-top: 8px !important;
    min-height: 44px;
  }
}

/* Even smaller phones */
@media (max-width: 380px) {
  #modal-mask #modal-reg,
  #modal-mask #modal-login,
  #modal-mask #modal-recover,
  #modal-mask #modal-recoverend {
    padding: 12px !important;
  }
  #modal-mask .modal-soc-icos > * {
    width: 36px !important;
    height: 36px !important;
  }
}

/* 2026-05-21 owner request: scale lang dropdown to 30 languages with search filter. */
.xh-lang-dropdown__search {
  grid-column: 1 / -1;
  padding: 0;
  margin: 0 0 4px;
}
/* Hide items that don't match search (set via JS) */
.xh-lang-dropdown li[data-xh-lang-hidden="true"] { display: none !important; }
/* Mobile: keep single column + search visible */
@media (max-width: 640px) {
  .xh-lang-dropdown__search { padding: 0 0 6px; }
  .xh-lang-search-input { font-size: 14px; padding: 10px 12px; }
}
/* 2026-05-21 owner bug: captcha + checkboxes показывались на Step 1 регистрации (только nick).
   Legacy modal.js's $('.reg-more').hide() работает но если по timing не успел отработать —
   на CSS-уровне гарантируем что элементы скрыты до regMore() вызова. */
#modal-mask #modal-reg .reg-more { display: none !important; }
#modal-mask #modal-reg .reg-start { display: block !important; }
/* When regMore() called → JS adds .reg-active to #modal-reg → reveal reg-more, hide reg-start. */
#modal-mask #modal-reg.reg-active .reg-more { display: block !important; }
#modal-mask #modal-reg.reg-active .modal-captcha.reg-more { display: flex !important; }
#modal-mask #modal-reg.reg-active .reg-start { display: none !important; }

/* 2026-05-21 owner mobile registration UX feedback batch. */
@media (max-width: 640px) {
  /* iOS Safari/Chrome zoom-on-focus prevention — inputs MUST be >=16px font-size.
     Was 14px → каждый focus вызывал zoom + horizontal scroll bug. */
  #modal-mask .input-text,
  #modal-mask .select,
  #modal-mask textarea,
  #modal-mask input[type="email"],
  #modal-mask input[type="password"],
  #modal-mask input[type="text"],
  #modal-mask input[type="number"],
  #modal-mask input[type="tel"] {
    font-size: 16px !important;
    padding: 10px 12px !important;
  }

  /* Modal v5 — content-height на phone. Mask: viewport-cover, модалка sized к контенту.
     Scroll внутри модалки появляется ТОЛЬКО если контент >= viewport. */
  #modal-mask #modal-reg,
  #modal-mask #modal-login,
  #modal-mask #modal-recover,
  #modal-mask #modal-recoverend {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 14px 20px !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #modal-mask {
    padding: 0 !important;
    align-items: flex-start !important;
    overflow: hidden !important;
    /* iOS Safari address-bar fix: 100vh = static viewport (когда bar развёрнут).
       100dvh = dynamic viewport = всегда visible area. Mask покрывает 100% видимого. */
    height: 100dvh !important;
    min-height: 100dvh !important;
  }

  /* Modal title visibility — push down a bit so close button (×) doesn't overlap status bar */
  #modal-mask .modal-title {
    padding-top: 8px !important;
    margin-top: 0 !important;
  }
  /* Close × button — larger touch target, visible */
  #modal-mask .modal-close,
  #modal-mask .i-close {
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    z-index: 10 !important;
    background: rgba(255,255,255,.08) !important;
  }

  /* Form fields — tighter spacing (email/password closer) */
  #modal-mask form .modal-block { margin-bottom: 4px !important; }
  #modal-mask .modal-field-label {
    margin-top: 6px !important;
    margin-bottom: 2px !important;
  }

  /* Checkboxes — compact */
  #modal-mask .modal-extra-text.modal-checkbox-row {
    height: auto !important;
    min-height: 0 !important;
    margin: 4px 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  #modal-mask .modal-extra-text.modal-checkbox-row .modal-label {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }
  #modal-mask .modal-extra-text.modal-checkbox-row input[type="checkbox"] {
    margin: 2px 4px 0 0 !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
  }

  /* Submit "Играть" button — full-width, prominent BEFORE checkboxes now */
  #modal-mask #modal-reg input[type="submit"].reg-more,
  #modal-mask #modal-reg button[type="submit"].reg-more {
    width: 100% !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    padding: 14px !important;
    font-size: 16px !important;
    font-weight: 700;
  }

  /* Prevent horizontal scroll caused by inputs overflow */
  html, body { overflow-x: hidden !important; }
  #modal-mask form, #modal-mask .modal-content { max-width: 100% !important; overflow-x: hidden; }
  /* Mobile-specific tighter touch-action (hard freeze inertia scroll on iOS) */
  body.body-modalShow,
  body.body-menuShow {
    touch-action: none !important;
  }
  #modal-mask {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tiny phones — even tighter */
@media (max-width: 380px) {
  #modal-mask #modal-reg,
  #modal-mask #modal-login,
  #modal-mask #modal-recover,
  #modal-mask #modal-recoverend {
    padding: 10px 12px 12px !important;
  }
  #modal-mask .modal-title { font-size: 16px !important; }
}

/* 2026-05-21 v6 — aggressive overflow prevention for modal on mobile.
   Any descendant element capped at modal width to prevent horizontal overflow. */
@media (max-width: 640px) {
  #modal-mask .modal-body * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #modal-mask .modal-body img,
  #modal-mask .modal-body select,
  #modal-mask .modal-body input,
  #modal-mask .modal-body textarea,
  #modal-mask .modal-body button {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Modal-mask itself constrained */
  #modal-mask {
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
  }
}

/* ============================================================
   UNIFIED FORM CLASSES (2026-05-21)
   Replace inline-style duplicates across /contacts, /support, /users/* pages.
   ============================================================ */

.xh-form-grid {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
}
.xh-form-grid--row {
    margin-bottom: 16px;
}
.xh-form-label {
    display: block;
    font-size: 14px;
    color: var(--xh-text-muted, #9aa6bd);
}
.xh-form-label--sm {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--xh-text-secondary, #c7d2e5);
}
.xh-form-label--overline {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    color: var(--xh-text-muted, #9aa6bd);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.xh-form-input {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--xh-border-input, #34456a);
    border-radius: 8px;
    padding: 11px 13px;
    color: var(--xh-text, #e6ecf5);
    font-size: 15px;
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s ease;
}
.xh-form-input:focus {
    outline: none;
    border-color: var(--xh-orange, #e8841e);
}
.xh-form-input--textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}
.xh-form-error-text {
    display: block;
    margin-top: 4px;
    color: #ffb4b4;
    font-size: 12px;
}
.xh-form-helper {
    display: block;
    margin-top: 4px;
    color: var(--xh-text-muted, #9aa6bd);
    font-size: 11px;
}
.xh-link--blue {
    color: var(--xh-link-blue, #5fa8d1);
}
.xh-link--blue:hover {
    color: #7dbfe0;
}

/* ===== PERF-F9 2026-05-21: respect prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    /* Critical: stop infinite animations on hero pulse / live-count blink. */
    .xh-hero-cta-glow, .xh-trust-dot, .xh-live-pulse, [data-xh-live],
    .xh-pulse, .xh-hero-cta-pulse {
        animation: none !important;
    }
}

/* 2026-05-21 a11y: .xk-cat used H3 (heading-order failure since after H1 with no H2).
   Promoted to H2 — restyled here to keep the smaller card-title look (same as H3 was). */
.xk-cat-title {
    font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.2;
    color: var(--xh-text, #e6ecf5);
}

/* 2026-05-21 a11y tap targets: WCAG 2.2 SC 2.5.8 — min 24x24 px. */
.xh-faq-a .xh-faq-link {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
    padding: 2px 0;
}
.xh-cookie-settings-link {
    background: none;
    border: none;
    color: var(--xh-text-muted, #9aa6bd);
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 4px;  /* 24px height via padding */
    min-height: 24px;
    display: inline-block;
    font-family: inherit;
}
.xh-cookie-settings-link:hover {
    color: var(--xh-text, #e6ecf5);
}
