/* ===== Шапка ===== */
.hdr-space { height: var(--header-h); flex: 0 0 auto; }

.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(21, 22, 23, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* точечная «карта» в подложке шапки */
.hdr::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgb(var(--accent-rgb) / 0.550) 0.900px, transparent 1.300px) 0 0 / 7px 7px,
    radial-gradient(circle, #ffffff40 0.800px, transparent 1.200px) 3.500px 3.500px / 7px 7px;
  -webkit-mask:
    radial-gradient(22% 120% at 12% 60%, #000 0, transparent 100%),
    radial-gradient(16% 110% at 34% 30%, #000 0, transparent 100%),
    radial-gradient(20% 130% at 56% 70%, #000 0, transparent 100%),
    radial-gradient(18% 120% at 76% 35%, #000 0, transparent 100%),
    radial-gradient(14% 110% at 93% 65%, #000 0, transparent 100%);
  mask:
    radial-gradient(22% 120% at 12% 60%, #000 0, transparent 100%),
    radial-gradient(16% 110% at 34% 30%, #000 0, transparent 100%),
    radial-gradient(20% 130% at 56% 70%, #000 0, transparent 100%),
    radial-gradient(18% 120% at 76% 35%, #000 0, transparent 100%),
    radial-gradient(14% 110% at 93% 65%, #000 0, transparent 100%);
  opacity: 0.340;
}
/* тонкая розовая линия снизу */
.hdr::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / 0.450) 18%, #ffffff1f 50%, rgb(var(--accent-rgb) / 0.450) 82%, transparent);
  opacity: 0.600;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hdr { background: var(--surface-1); }
}

.hdr__in {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
  padding-inline: var(--page-pad);
}
.hdr__left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hdr__right { display: flex; align-items: center; gap: 10px; }

/* ===== Логотип ===== */
.logo {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  padding-right: 6px;
}
.logo::before {
  content: "";
  position: absolute;
  inset: 14px -8px 8px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(rgb(var(--accent-rgb) / 0.300), rgb(var(--accent-rgb) / 0.080) 50%, transparent 74%);
  filter: blur(8px);
  pointer-events: none;
}
.logo__ring {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2f8cff, #b3daff, #b04bff, #2f8cff 60%, #ffffff, #2f8cff);
  animation: logo-spin 5s linear infinite;
  box-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.550);
}
.logo__ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #17131a;
}
.logo__ring i {
  position: absolute;
  inset: 0;
  animation: logo-spin 5s linear infinite reverse; /* X внутри стоит на месте */
}
.logo__ring i::before,
.logo__ring i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}
.logo__ring i::after { transform: translate(-50%, -50%) rotate(-45deg); background: var(--accent-hi); }
.logo:hover .logo__ring { animation-duration: 0.900s; }
.logo:hover .logo__ring i { animation-duration: 0.900s; }

.logo__word {
  font: italic 900 26px/1 var(--font-title);
  letter-spacing: -0.500px;
  color: #fff;
  text-shadow: 0 2px 0 #00000080, 0 0 18px rgb(var(--accent-rgb) / 0.350);
  transform: skewX(-4deg);
}
.logo__word b {
  font-size: 1.220em;
  margin-left: 1px;
  background: linear-gradient(180deg, #b3daff 0%, var(--accent) 48%, #1250c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.700));
}
@keyframes logo-spin { to { transform: rotate(360deg); } }

/* ===== Стеклянные кнопки-иконки ===== */
.iconbtn, .lang {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  line-height: 0;
  color: #c9c9cf;
  background: rgba(245, 245, 250, 0.020);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.100);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  transition: background-color 0.250s, color 0.250s;
}
.iconbtn::before, .lang::before, .hnav__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-edge);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.iconbtn:hover, .lang:hover { background: rgba(92, 72, 84, 0.550); color: #fff; }
.iconbtn:focus-visible, .lang:focus-visible, .hnav__btn:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.iconbtn svg, .lang__flag { display: block; width: 22px; height: 22px; }
.iconbtn--bell:hover svg { animation: bell-ring 0.700s ease-in-out; transform-origin: 50% 10%; }
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-5deg); }
}
.iconbtn__dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface-3);
}
.iconbtn__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: dot-pulse 1.600s ease-out infinite;
}
@keyframes dot-pulse {
  0% { opacity: 0.900; transform: scale(0.600); }
  70%, 100% { opacity: 0; transform: scale(1.600); }
}

/* ===== Кнопка «Войти» ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--login {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  font: 900 14px/1 var(--font-title);
  letter-spacing: 0.040em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #5aa4ff 0%, var(--accent) 52%, var(--accent-deep) 100%);
  box-shadow: inset 0 1px 0 #ffffff70, 0 0 18px rgb(var(--accent-rgb) / 0.450);
  text-shadow: 0 1px 0 #00000040;
  transition: transform 0.120s, box-shadow 0.120s, filter 0.120s;
}
.btn--login:hover { filter: brightness(1.080); box-shadow: inset 0 1px 0 #ffffff70, 0 0 26px rgb(var(--accent-rgb) / 0.700); }
.btn--login:active { filter: none; transform: translateY(1px); }
.btn__ghost {
  position: absolute;
  left: -10px;
  top: -6px;
  z-index: -1;
  width: 52px;
  height: 52px;
  opacity: 0.280;
  transform: rotate(-18deg);
  fill: #002a5c;
}
.btn__label { position: relative; }
/* блик */
.btn--login::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, #ffffff73, transparent);
  transform: skewX(-20deg);
  animation: login-shine 3.600s ease-in-out infinite;
  pointer-events: none;
}
@keyframes login-shine {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

/* ===== Навигация (десктоп) ===== */
.hnav { display: none; }

@media (min-width: 1024px) {
  .hdr__in { padding-inline: 16px; }
  .hdr__right { gap: 16px; }
  .logo { margin-right: 6px; }
  .logo__ring { width: 34px; height: 34px; }
  .logo__ring i::before, .logo__ring i::after { width: 15px; }
  .logo__word { font-size: 30px; }
  .iconbtn, .lang { width: 44px; height: 44px; border-radius: 14px; }
  .iconbtn svg, .lang__flag { width: 26px; height: 26px; }
  .iconbtn__dot { top: 8px; right: 9px; }
  .btn { height: 44px; padding: 0 22px; font-size: 15px; }

  .hnav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
  .hnav__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: none;
    font: 700 14px/1 var(--font-title);
    color: rgba(245, 245, 250, 0.820);
    white-space: nowrap;
    transition: background-color 0.200s, color 0.200s, box-shadow 0.200s;
  }
  .hnav__btn::before { opacity: 0; transition: opacity 0.200s; }
  .hnav__btn:hover,
  .hnav__drop:hover > .hnav__btn,
  .hnav__drop.is-open > .hnav__btn,
  .hnav__btn.is-active {
    color: #fff;
    background: rgba(245, 245, 250, 0.020);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.100);
  }
  .hnav__btn:hover::before,
  .hnav__drop:hover > .hnav__btn::before,
  .hnav__drop.is-open > .hnav__btn::before,
  .hnav__btn.is-active::before { opacity: 1; }
  .hnav__btn.is-active .hnav__ico { color: var(--accent-hi); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.800)); }

  .hnav__ico { flex: 0 0 auto; width: 20px; height: 20px; transition: color 0.200s, transform 0.200s; }
  .hnav__btn:hover .hnav__ico { transform: translateY(-1px); }
  .hnav__chev { opacity: 0.700; margin-left: -2px; transition: transform 0.200s; }

  .hnav__drop { position: relative; }
  .hnav__drop:hover .hnav__chev,
  .hnav__drop.is-open .hnav__chev { transform: rotate(180deg); }

  .hnav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    display: grid;
    gap: 2px;
    min-width: 210px;
    margin-top: 6px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(27, 28, 29, 0.970);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: inset 0 0 0 1px rgba(245, 245, 250, 0.060), 0 18px 40px rgba(0, 0, 0, 0.500), 0 0 40px rgb(var(--accent-rgb) / 0.080);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.160s, transform 0.160s, visibility 0.160s;
  }
  .hnav__menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
  .hnav__menu--grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); min-width: 380px; }
  .hnav__drop:hover .hnav__menu,
  .hnav__drop.is-open .hnav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .hnav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 10px 4px 6px;
    border: 0;
    border-radius: 10px;
    background: none;
    font: 700 14px/1.200 var(--font-title);
    color: rgba(245, 245, 250, 0.850);
    text-align: left;
    transition: background-color 0.150s, color 0.150s;
  }
  .hnav__item:hover { color: #fff; background: rgba(245, 245, 250, 0.070); }
  .hnav__item:hover .gico { transform: scale(1.080) rotate(-4deg); }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .hnav__btn { gap: 6px; padding: 0 10px; }
  .hnav__btn--inv > span { display: none; }
}

/* иконка-плитка игры */
.gico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 #ffffff66, inset 0 -2px 0 #00000033, 0 4px 10px #00000059;
  color: #fff;
  transition: transform 0.180s;
}
.gico svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 0 #00000059); }

/* ===== Нижняя панель (мобильные) ===== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(21, 22, 23, 0.860);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 #ffffff12;
}
.tabbar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 800 10px/1 var(--font-title);
  color: var(--text-2);
  transition: color 0.200s;
}
.tabbar__btn svg { width: 22px; height: 22px; }
.tabbar__btn.is-active { color: #fff; }
.tabbar__btn.is-active svg { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.800)); }
@media (min-width: 1024px) {
  .tabbar { display: none; }
}

@media (max-width: 400px) {
  .hdr__in { gap: 4px; padding-inline: 12px; }
  .hdr__right { gap: 6px; }
  .logo__word { font-size: 22px; }
  .iconbtn, .lang { width: 36px; height: 36px; border-radius: 10px; }
  .btn--login { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo__ring, .logo__ring i, .btn--login::after, .iconbtn__dot::after { animation: none; }
  .hnav__menu, .hnav__chev { transition: none; }
}

/* ===== Нижняя панель, новая: парящая стеклянная полоса, иконки без подписей, кнопка-орб по центру ===== */
.tabbar {
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  height: 62px;
  padding: 0 6px;
  grid-template-columns: 1fr 1fr 78px 1fr 1fr;
  align-items: center;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgb(var(--accent-rgb) / 0.100), transparent 60%),
    linear-gradient(180deg, rgb(34 34 40 / 0.820), rgb(20 20 24 / 0.900));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 #ffffff29, inset 0 0 0 1px #ffffff14, 0 14px 34px #000000a6;
}
.tabbar__btn {
  position: relative;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  gap: 0;
  color: #8f8f9c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.200s, transform 0.200s;
}
.tabbar__btn svg { position: relative; width: 26px; height: 26px; fill: currentColor; transition: transform 0.250s cubic-bezier(0.230, 1, 0.320, 1), filter 0.250s; }
.tabbar__btn:active svg { transform: scale(0.880); }
.tabbar__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 18px; }
/* активный пункт: розовая подложка-капля под иконкой и полоска-индикатор сверху */
.tabbar__btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 44px;
  translate: -50% -50%;
  border-radius: 16px;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / 0.420), transparent);
  opacity: 0;
  scale: 0.600;
  transition: opacity 0.250s, scale 0.250s cubic-bezier(0.230, 1, 0.320, 1);
}
.tabbar__btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  width: 0;
  height: 3px;
  translate: -50% 0;
  border-radius: 0 0 4px 4px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 4px #fff;
  transition: width 0.250s cubic-bezier(0.230, 1, 0.320, 1);
}
.tabbar__btn.is-active { color: #fff; }
.tabbar__btn.is-active::before { opacity: 1; scale: 1; }
.tabbar__btn.is-active::after { width: 28px; }
.tabbar__btn.is-active svg { color: #fff; filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.900)); transform: translateY(-1px); }
/* центральная кнопка: приподнятый орб с розовым кольцом */
.tabbar__btn--main::before, .tabbar__btn--main::after { display: none; }
.tabbar__orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: -22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, #3a3340, #1c1a20 70%);
  box-shadow:
    0 0 0 2px #17171b,
    0 0 0 4px rgb(var(--accent-rgb) / 0.850),
    0 0 22px rgb(var(--accent-rgb) / 0.550),
    inset 0 2px 0 #ffffff24,
    0 10px 20px #00000099;
  color: #fff;
  transition: transform 0.250s cubic-bezier(0.230, 1, 0.320, 1), box-shadow 0.250s;
}
.tabbar__orb svg { width: 28px; height: 28px; color: var(--accent-hi); filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.800)); }
.tabbar__btn--main:active .tabbar__orb { transform: scale(0.940); }
.tabbar__btn--main.is-active .tabbar__orb {
  background: linear-gradient(160deg, var(--accent-hi), var(--accent-deep));
  box-shadow: 0 0 0 2px #17171b, 0 0 0 4px #fff, 0 0 28px rgb(var(--accent-rgb) / 0.900), inset 0 2px 0 #ffffff59, 0 10px 20px #00000099;
}
.tabbar__btn--main.is-active .tabbar__orb svg { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .tabbar__btn, .tabbar__btn svg, .tabbar__btn::before, .tabbar__btn::after, .tabbar__orb { transition: none; }
}

/* ===== Нижняя панель, вторая версия: стекло с вырезом под центральную кнопку, подписи, вращающееся кольцо ===== */
.tabbar {
  height: 66px;
  padding: 0 4px;
  grid-template-columns: 1fr 1fr 84px 1fr 1fr;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  isolation: isolate;
}
/* само стекло — отдельным слоем, чтобы вырезать в нём полукруг под кнопку */
.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 26px;
  background:
    linear-gradient(180deg, #ffffff1f, transparent 34%),
    radial-gradient(90% 120% at 50% 110%, rgb(var(--accent-rgb) / 0.220), transparent 62%),
    linear-gradient(180deg, rgb(38 36 46 / 0.880), rgb(16 16 20 / 0.940));
  box-shadow: inset 0 0 0 1px #ffffff1a, inset 0 1px 0 #ffffff33;
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-mask: radial-gradient(circle 41px at 50% -4px, transparent 40px, #000 41px);
  mask: radial-gradient(circle 41px at 50% -4px, transparent 40px, #000 41px);
}
/* тонкая светящаяся кромка по вырезу */
.tabbar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -45px;
  z-index: -1;
  width: 82px;
  height: 82px;
  translate: -50% 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #ffffff1f, 0 0 18px rgb(var(--accent-rgb) / 0.350);
  clip-path: inset(45px -30px -30px -30px);
  pointer-events: none;
}
.tabbar__btn { flex-direction: column; gap: 3px; color: #8d8d9b; }
.tabbar__btn svg { width: 25px; height: 25px; }
.tabbar__lbl {
  position: relative;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font: 800 10px/1 var(--font-title);
  letter-spacing: 0.020em;
  color: #fff;
  transition: max-height 0.250s cubic-bezier(0.230, 1, 0.320, 1), opacity 0.200s;
}
.tabbar__btn.is-active .tabbar__lbl { max-height: 12px; opacity: 1; }
/* активный пункт: стеклянная «таблетка» с розовым градиентом вместо пятна, точка-огонёк сверху */
.tabbar__btn::before {
  width: 62px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / 0.340), rgb(var(--accent-rgb) / 0.080));
  box-shadow: inset 0 1px 0 #ffffff40, inset 0 0 0 1px rgb(var(--accent-rgb) / 0.450), 0 6px 18px rgb(var(--accent-rgb) / 0.280);
}
.tabbar__btn::after {
  top: 3px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px var(--accent), 0 0 16px 4px rgb(var(--accent-rgb) / 0.600);
}
.tabbar__btn.is-active::after { width: 4px; }
.tabbar__btn.is-active svg { color: #fff; transform: none; filter: drop-shadow(0 0 7px rgb(var(--accent-rgb) / 0.950)); }
/* центральная кнопка: шар в вырезе, вокруг — вращающееся розово-фиолетовое кольцо */
.tabbar__orb {
  width: 66px;
  height: 66px;
  margin-top: -38px;
  background: radial-gradient(circle at 50% 28%, #4a3a52, #1b1820 68%);
  box-shadow: inset 0 2px 0 #ffffff2e, inset 0 -6px 12px #00000080, 0 10px 22px #000000b3, 0 0 26px rgb(var(--accent-rgb) / 0.450);
}
.tabbar__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #b06bff, #5cd6ff, var(--accent-hi), var(--accent));
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3.500px), #000 calc(100% - 3px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3.500px), #000 calc(100% - 3px));
  animation: tab-ring 5s linear infinite;
}
@keyframes tab-ring { to { rotate: 360deg; } }
.tabbar__orb svg { position: relative; width: 30px; height: 30px; color: #fff; filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.900)); }
.tabbar__btn--main.is-active .tabbar__orb {
  background: radial-gradient(circle at 50% 28%, var(--accent-hi), var(--accent-deep) 72%);
  box-shadow: inset 0 2px 0 #ffffff66, inset 0 -6px 12px #0000004d, 0 10px 22px #000000b3, 0 0 34px rgb(var(--accent-rgb) / 0.900);
}
@media (prefers-reduced-motion: reduce) {
  .tabbar__ring { animation: none; }
  .tabbar__lbl { transition: none; }
}

/* ===== Нижняя панель, третья версия: без подписей; апгрейд — круг внутри панели с тонким кольцом ===== */
.tabbar { height: 64px; grid-template-columns: 1fr 1fr 80px 1fr 1fr; }
.tabbar::before { -webkit-mask: none; mask: none; }
.tabbar::after { display: none; }
.tabbar__btn { gap: 0; }
.tabbar__orb {
  width: 56px;
  height: 56px;
  margin-top: 0;
  background: radial-gradient(circle at 50% 25%, #34343c, #222227 75%);
  box-shadow:
    0 0 0 3px #17171b,
    0 0 0 4.500px #ffffff24,
    inset 0 1px 0 #ffffff24,
    0 6px 14px #00000080;
}
.tabbar__orb svg { width: 28px; height: 28px; fill: currentColor; color: #8d8d9b; filter: none; transition: color 0.200s, filter 0.200s; }
.tabbar__btn--main:active .tabbar__orb { transform: scale(0.930); }
.tabbar__btn--main.is-active .tabbar__orb {
  background: radial-gradient(circle at 50% 25%, #4a2f42, #2a1f29 75%);
  box-shadow:
    0 0 0 3px #17171b,
    0 0 0 4.500px var(--accent),
    0 0 20px rgb(var(--accent-rgb) / 0.650),
    inset 0 1px 0 #ffffff33,
    0 6px 14px #00000080;
}
.tabbar__btn--main.is-active .tabbar__orb svg { color: #fff; filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.950)); }

/* ===== Нижняя панель прижата к краям экрана ===== */
.tabbar {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
}
.tabbar::before {
  border-radius: 0;
  box-shadow: inset 0 1px 0 #ffffff29;
}

/* ===== Нижняя панель как в образце: плоская тёмная, у активной иконки мягкое свечение и полоска сверху ===== */
.tabbar { height: calc(68px + env(safe-area-inset-bottom, 0px)); grid-template-columns: repeat(5, 1fr); padding-inline: 0; }
.tabbar::before {
  background: #17181b;
  box-shadow: inset 0 1px 0 #ffffff14;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.tabbar__btn { color: #7b7d8e; }
.tabbar__btn svg { width: 27px; height: 27px; }
/* свечение-пятно вместо «таблетки» */
.tabbar__btn::before {
  width: 84px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / 0.380), rgb(var(--accent-rgb) / 0.120) 55%, transparent);
  box-shadow: none;
}
/* полоска у верхнего края панели */
.tabbar__btn::after {
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.tabbar__btn.is-active::after { width: 30px; }
.tabbar__btn.is-active svg { color: #fff; filter: none; }
/* круг апгрейда: тёмный, с тонким кольцом */
.tabbar__orb {
  width: 58px;
  height: 58px;
  background: #26272d;
  box-shadow: 0 0 0 3px #17181b, 0 0 0 4.500px #ffffff1f;
}
.tabbar__orb svg { width: 30px; height: 30px; color: #7b7d8e; }
.tabbar__btn--main.is-active .tabbar__orb {
  background: #2d2630;
  box-shadow: 0 0 0 3px #17181b, 0 0 0 4.500px var(--accent), 0 0 18px rgb(var(--accent-rgb) / 0.550);
}
.tabbar__btn--main.is-active .tabbar__orb svg { color: #fff; filter: none; }

/* ===== Шапка: вместо значка — название и анимированная девушка-маскот ===== */
.logo { gap: 0; padding-right: 2px; }
.logo::before { inset: 12px -10px 6px; }
/* название: металлический отлив и пробегающий блик */
.logo__word {
  font: italic 900 28px/1 var(--font-title);
  letter-spacing: -0.800px;
  background: linear-gradient(100deg, #ffffff 0%, #ffe3f1 30%, #ffffff 46%, #9cc9ff 54%, #ffffff 62%, #d0e6ff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 0 #0000008c) drop-shadow(0 0 10px rgb(var(--accent-rgb) / 0.450));
  animation: logo-shine 5.500s ease-in-out infinite;
}
.logo__word b { position: relative; font-size: 1.240em; filter: none; }
/* новогодняя шапка на букве X: размеры в em — растёт и уменьшается вместе с логотипом */
/* шапка надета прямо на верх буквы: оторочка лежит на верхнем краю X, кончик с помпоном свисает влево */
.logo__hat { position: absolute; left: -0.200em; top: -0.140em; width: 0.820em; height: auto; rotate: -12deg; transform: scaleX(-1); pointer-events: none;
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.450)); transform-origin: 60% 85%; animation: logo-hat 3.600s ease-in-out infinite; }
@keyframes logo-hat { 0%, 100% { rotate: -12deg; } 50% { rotate: -7deg; } }
@media (prefers-reduced-motion: reduce) { .logo__hat { animation: none; } }
@keyframes logo-shine { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
@media (min-width: 1024px) { .logo__word { font-size: 32px; } }
@media (max-width: 400px) { .logo__word { font-size: 24px; } }

/* девушка: выглядывает из шапки, покачивается и кивает */
.hgirl {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-end;
  width: 54px;
  height: var(--header-h);
  margin-left: 2px;
  pointer-events: none;
}
.hgirl::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 64px;
  height: 46px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / 0.500), transparent);
  filter: blur(6px);
  animation: hgirl-glow 3.600s ease-in-out infinite;
}
.hgirl__img {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 66px;
  height: 66px;
  max-width: none;
  translate: -50% 0;
  object-fit: contain;
  transform-origin: 50% 92%;
  filter: drop-shadow(0 4px 8px #00000099);
  animation: hgirl-idle 3.600s ease-in-out infinite;
  user-select: none;
}
@keyframes hgirl-idle {
  0%, 100% { transform: translateY(0) rotate(-2.500deg) scale(1); }
  22% { transform: translateY(-3px) rotate(2deg) scale(1.020); }
  46% { transform: translateY(0) rotate(3deg) scale(1); }
  58% { transform: translateY(1.500px) rotate(1deg) scale(1, 0.975); }  /* кивок */
  70% { transform: translateY(-2px) rotate(-1.500deg) scale(1.015); }
}
@keyframes hgirl-glow { 0%, 100% { opacity: 0.550; } 50% { opacity: 1; } }
@media (min-width: 1024px) {
  .hgirl { width: 64px; margin-left: 6px; }
  .hgirl__img { width: 78px; height: 78px; bottom: -10px; }
}
@media (max-width: 400px) {
  .hgirl { width: 44px; }
  .hgirl__img { width: 56px; height: 56px; bottom: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo__word, .hgirl__img, .hgirl::before { animation: none; }
}

/* девушка прежнего размера; рамка по высоте шапки обрезает всё, что выходит за её края */
.hgirl { width: 66px; height: var(--header-h); overflow: hidden; }
.hgirl::before { bottom: -2px; }
@media (min-width: 1024px) { .hgirl { width: 78px; } }
@media (max-width: 400px) { .hgirl { width: 56px; } }

/* ===== Переключение языка (js/i18n.js): нажатие меняет RU ↔ EN, строка коротко подсвечивается ===== */
.mrow--lang { cursor: pointer; }
.mrow--lang .mrow__val { display: inline-block; min-width: 24px; text-align: right; }
.mrow--lang.is-flash, .lang.is-flash { animation: lang-flash 0.700s ease-out; }
.mrow--lang.is-flash .mrow__val { animation: lang-val 0.350s cubic-bezier(0.230, 1, 0.320, 1); }
.mrow--lang.is-flash .mrow__ico--flag svg, .lang.is-flash .lang__flag { animation: lang-flag 0.450s cubic-bezier(0.230, 1, 0.320, 1); }
@keyframes lang-flash { 0% { background: rgb(255 255 255 / 0.140); } 100% { background: rgb(255 255 255 / 0.050); } }
@keyframes lang-val { from { opacity: 0; transform: translateY(6px); } }
@keyframes lang-flag { 0% { transform: rotateY(90deg) scale(0.800); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mrow--lang.is-flash, .lang.is-flash, .mrow--lang.is-flash .mrow__val, .mrow--lang.is-flash .mrow__ico--flag svg, .lang.is-flash .lang__flag { animation: none; } }
/* ===== Компьютер: разделы шапки — плитки с объёмными картинками; «Игры» — список всех игр в две колонки ===== */
.hnav__pic { display: none; }
@media (min-width: 1024px) {
  .hnav { gap: 8px; margin-left: 14px; }
  .hnav__btn { height: 48px; padding: 0 16px 0 56px; gap: 6px; border-radius: 15px; font: 900 13px/1 var(--font-title); letter-spacing: 0.050em; text-transform: uppercase; color: #e6ecfb;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.065), rgb(255 255 255 / 0.020)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.080); }
  .hnav__btn .hnav__ico { display: none; }
  .hnav__pic { display: block; position: absolute; left: 4px; bottom: 1px; width: 50px; height: 50px; object-fit: contain; pointer-events: none;
    filter: drop-shadow(0 5px 6px rgb(0 0 0 / 0.550)); transition: transform 0.250s cubic-bezier(0.230, 1.400, 0.320, 1); }
  .hnav__btn:hover .hnav__pic, .hnav__drop.is-open > .hnav__btn .hnav__pic { transform: translateY(-4px) rotate(-7deg) scale(1.080); }
  .hnav__btn:hover, .hnav__drop:hover > .hnav__btn, .hnav__drop.is-open > .hnav__btn { color: #fff; background: linear-gradient(180deg, rgb(255 255 255 / 0.110), rgb(255 255 255 / 0.040)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.140); }
  .hnav__btn.is-active { color: #fff; background: linear-gradient(180deg, rgb(47 140 255 / 0.300), rgb(47 140 255 / 0.080)); box-shadow: inset 0 0 0 1px rgb(92 170 255 / 0.550), 0 8px 20px -10px #2f8cff; }

  /* список игр */
  .hnav__menu--games { left: 50%; margin-left: -262px; grid-template-columns: repeat(2, 250px); gap: 4px 12px; padding: 12px; border-radius: 22px;
    max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
    background: linear-gradient(180deg, rgb(30 36 60 / 0.980), rgb(20 24 42 / 0.980)); box-shadow: inset 0 0 0 1px rgb(140 170 255 / 0.140), 0 24px 60px rgb(0 0 0 / 0.600); }
  .hgame { min-height: 54px; gap: 12px; padding: 5px 10px 5px 6px; border-radius: 14px; font: 800 15px/1.200 var(--font-title); color: #eef2ff; text-decoration: none; }
  .hgame__ico { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(145deg, var(--c1, #5cc8ff), var(--c2, #2f6dff)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.450), 0 5px 12px -5px var(--c2, #2f6dff); }
  .hgame__ico img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.400)); transition: transform 0.200s; }
  .hgame:hover .hgame__ico img { transform: scale(1.120) rotate(-6deg); }
  .hgame.is-soon { cursor: default; color: #9aa4c2; }
  .hgame.is-soon .hgame__ico { filter: saturate(0.550) brightness(0.800); }
  .hgame.is-soon:hover { background: rgb(255 255 255 / 0.030); }
  .hgame__soon { margin-left: auto; padding: 4px 7px; border-radius: 7px; font: 800 9.500px/1 var(--font-title); font-style: normal; letter-spacing: 0.060em; text-transform: uppercase;
    color: #9aa6c6; background: rgb(255 255 255 / 0.070); }
}
/* средние экраны: плитки поуже, у «Инвентаря» и «Бонусов» остаются только картинки */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hnav { gap: 6px; margin-left: 8px; }
  .hnav__btn { padding: 0 12px 0 50px; font-size: 12px; }
  .hnav__pic { width: 44px; height: 44px; }
  .hnav__btn--inv, .hnav__drop:not(.hnav__drop--games) > .hnav__btn { padding: 0 6px 0 50px; }
  .hnav__btn--inv > span, .hnav__drop:not(.hnav__drop--games) > .hnav__btn > span { display: none; }
}