/* ===== Аккаунт: кошелёк, меню, окна входа и пополнения, инвентарь ===== */
[hidden] { display: none !important; }

/* ---------- Кошелёк в шапке ---------- */
.wallet {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 4px 0 10px;
  border-radius: 12px;
  background: rgba(245, 245, 250, 0.020);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.100);
}
.wallet::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);
}
.wallet__coin {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b3daff, var(--accent) 55%, var(--accent-deep));
  box-shadow: inset 0 1px 0 #ffffff80, 0 0 8px rgb(var(--accent-rgb) / 0.500);
  font: 900 12px/1 var(--font-title);
  color: #fff;
}
.wallet__sum {
  font: 900 14px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wallet__add {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #5aa4ff, var(--accent) 52%, var(--accent-deep));
  box-shadow: inset 0 1px 0 #ffffff70;
  color: #fff;
  transition: filter 0.150s, transform 0.150s;
}
.wallet__add svg { width: 16px; height: 16px; }
.wallet__add:hover { filter: brightness(1.120); }
.wallet__add:active { transform: translateY(1px); }
.wallet__add:focus-visible, .avatar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Аватар и меню ---------- */
.udrop { position: relative; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #b98cff, #6a3df0);
  box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / 0.850), 0 0 12px rgb(var(--accent-rgb) / 0.350);
  font: 900 17px/1 var(--font-title);
  color: #fff;
  text-shadow: 0 1px 0 #00000059;
}
.umenu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: 220px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(27, 28, 29, 0.980);
  box-shadow: inset 0 0 0 1px rgba(245, 245, 250, 0.060), 0 18px 40px rgba(0, 0, 0, 0.500);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.160s, transform 0.160s, visibility 0.160s;
}
.udrop.is-open .umenu { opacity: 1; visibility: visible; transform: none; }
.umenu__head { padding: 8px 10px 10px; border-bottom: 1px solid #ffffff12; margin-bottom: 4px; }
.umenu__name { display: block; font: 900 15px/1.200 var(--font-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__tag { display: block; margin-top: 3px; font: 600 11px/1.200 var(--font-text); color: var(--text-3); }
.umenu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 700 14px/1 var(--font-title);
  color: rgba(245, 245, 250, 0.850);
  text-align: left;
  transition: background-color 0.150s, color 0.150s;
}
.umenu__item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.umenu__item b { margin-left: auto; padding: 3px 7px; border-radius: 7px; background: #ffffff14; font-size: 11px; }
.umenu__item:hover { color: #fff; background: rgba(245, 245, 250, 0.070); }
.umenu__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.umenu__item--out { color: #ff8a8a; }

@media (min-width: 1024px) {
  .wallet { height: 48px; padding: 0 4px 0 14px; border-radius: 14px; gap: 10px; }
  .wallet__sum { font-size: 16px; }
  .wallet__add { width: 40px; height: 40px; border-radius: 12px; }
  .avatar { width: 48px; height: 48px; border-radius: 14px; }
}
/* на телефоне в шапке вошедшего пользователя язык и колокольчик уступают место кошельку */
@media (max-width: 480px) {
  body.is-logged .hdr__right .lang,
  body.is-logged .hdr__right .iconbtn--bell { display: none; }
}

/* ---------- Окна входа и пополнения ---------- */
.modal__sub { margin: 6px 0 0; font: 500 13px/1.400 var(--font-text); color: var(--text-2); }
/* --- окно входа: на телефоне шторка снизу, на десктопе две колонки --- */
.login {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  border-radius: 28px;
  background: #17181b;
  overflow: hidden auto;
}

/* арт-панель */
.login__side {
  position: relative;
  height: 132px;
  overflow: hidden;
  isolation: isolate;
}
.login__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 20%;
  animation: login-art 9s ease-in-out infinite alternate;
}
@keyframes login-art {
  0% { transform: scale(1.200); }
  100% { transform: scale(1.320) translateX(-2%); }
}
.login__side::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #17181bf2 0, #17181b99 42%, transparent 75%),
    linear-gradient(180deg, transparent 55%, #17181b 100%);
}
.login__pitch { position: absolute; left: 20px; top: 50%; translate: 0 -50%; }
.login__logo { height: 44px; }
.login__perks { display: none; }

/* основная часть */
.login__main { position: relative; padding: 4px 16px 18px; }
.login__main .modal__close { position: absolute; top: -118px; right: 12px; background: #0b0b0e99; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.login__step {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.160);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.450);
  font: 900 10px/1 var(--font-title);
  letter-spacing: 0.080em;
  text-transform: uppercase;
  color: var(--accent-hi);
}
.login__title { margin: 10px 0 0; font: 900 28px/1.100 var(--font-title); letter-spacing: -0.010em; }

/* способы входа — список строк */
.ways { display: grid; gap: 8px; margin-top: 16px; }
.way {
  --w: #2f8cff;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 64px;
  padding: 0 14px 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #ffffff0a;
  box-shadow: inset 0 0 0 1px #ffffff14;
  text-align: left;
  color: #fff;
  transition: background-color 0.220s, box-shadow 0.220s, transform 0.150s, opacity 0.250s;
}
.way--tg { --w: #2aabee; --logo: #29a9eb; }
.way--steam { --w: #6f9fc8; --logo: #171d25; }
.way--google { --w: #f2f2f5; }
/* цветной отсвет слева, разгорается при наведении */
.way::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--w) 26%, transparent), transparent 60%);
  opacity: 0.350;
  transition: opacity 0.250s;
  pointer-events: none;
}
.way__ico {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 -2px 0 #00000014, 0 4px 14px color-mix(in srgb, var(--w) 40%, transparent);
  color: var(--logo, #17181b);
  transition: transform 0.300s cubic-bezier(0.340, 1.500, 0.500, 1);
}
/* логотипы сервисов на белых плитках */
.way__ico svg { width: 30px; height: 30px; }
.way--google .way__ico svg { width: 26px; height: 26px; }
.way__text { position: relative; display: grid; gap: 3px; min-width: 0; flex: 1; }
.way__text b { font: 900 16px/1.100 var(--font-title); }
.way__text small { font: 600 12px/1.100 var(--font-text); color: var(--text-2); }
.way__tag {
  position: relative;
  padding: 4px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8cc8ff, var(--accent) 60%, var(--accent-deep));
  box-shadow: inset 0 1px 0 #ffffff66;
  font: 900 10px/1 var(--font-title);
  letter-spacing: 0.080em;
  text-transform: uppercase;
}
.way__go { position: relative; flex: 0 0 auto; width: 18px; height: 18px; opacity: 0.500; transition: transform 0.250s, opacity 0.250s; }
.way:hover { background: #ffffff12; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w) 70%, transparent); }
.way:hover::before { opacity: 1; }
.way:hover .way__ico { transform: scale(1.080) rotate(-5deg); }
.way:hover .way__go { transform: translateX(4px); opacity: 1; }
.way:active { transform: scale(0.985); }
.way:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* согласие 18+ — переключатель */
.consent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  background: #0000003d;
  box-shadow: inset 0 0 0 1px #ffffff14;
  font: 500 13px/1.400 var(--font-text);
  color: #c9c9cf;
  cursor: pointer;
  transition: box-shadow 0.250s;
}
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent__track {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: #0d0d10;
  box-shadow: inset 0 0 0 1px #ffffff26;
  transition: background-color 0.250s, box-shadow 0.250s;
}
.consent__track::after {
  content: "18+";
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #8a8a93;
  font: 900 8px/1 var(--font-title);
  color: #17181b;
  transition: transform 0.300s cubic-bezier(0.340, 1.400, 0.500, 1), background-color 0.250s;
}
.consent input:checked + .consent__track {
  background: rgb(var(--accent-rgb) / 0.350);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 14px rgb(var(--accent-rgb) / 0.450);
}
.consent input:checked + .consent__track::after { transform: translateX(18px); background: #fff; }
.consent input:focus-visible + .consent__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.login.is-ready .consent { box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.400); }
.consent a, .login__foot a { color: var(--accent-hi); text-decoration: underline; text-decoration-color: rgb(var(--accent-rgb) / 0.450); text-underline-offset: 2px; }
.consent a:hover, .login__foot a:hover { color: #fff; }
.agree.is-shake { animation: code-shake 0.400s; }
.login__foot { margin: 4px 0 0; font: 500 12px/1.450 var(--font-text); color: var(--text-3); }

/* десктоп: окно по центру, слева арт во всю высоту, справа вход */
@media (min-width: 720px) {
  .login {
    display: none;
    width: min(780px, calc(100vw - 48px));
    grid-template-columns: 300px 1fr;
  }
  .login[open] { display: grid; }
  .login__side { height: auto; min-height: 460px; }
  .login__art { object-position: 72% 30%; }
  .login__side::after {
    background:
      linear-gradient(180deg, transparent 30%, #17181bd9 68%, #17181b 100%),
      linear-gradient(90deg, transparent 80%, #17181b 100%);
  }
  .login__pitch { top: auto; bottom: 26px; left: 24px; right: 20px; translate: none; }
  .login__logo { height: 48px; }
  .login__perks {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font: 700 13px/1.300 var(--font-title);
    color: #e6e6ea;
  }
  .login__perks li { display: flex; align-items: center; gap: 8px; }
  .login__perks li::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    rotate: 45deg;
  }
  .login__main { padding: 30px 28px 26px; align-self: center; }
  .login__main .modal__close { top: 14px; right: 14px; background: #ffffff14; }
  .login__title { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .login__art { animation: none; }
}


.modal__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  font: 700 12px/1 var(--font-title);
  color: var(--text-3);
}
.modal__or::before, .modal__or::after { content: ""; flex: 1; height: 1px; background: #ffffff14; }
.field {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: #0000004d;
  box-shadow: inset 0 0 0 1px #ffffff1a;
  font: 800 15px/1 var(--font-title);
  color: #fff;
  outline: none;
  transition: box-shadow 0.200s;
}
.field::placeholder { color: var(--text-3); font-weight: 700; }
.field:focus { box-shadow: inset 0 0 0 1.500px var(--accent), 0 0 18px rgb(var(--accent-rgb) / 0.200); }
.modal__msg { min-height: 18px; margin: 8px 0 0; font: 600 12px/1.400 var(--font-text); color: #ffb86b; }
.modal__note { margin: 12px 0 0; font: 500 12px/1.450 var(--font-text); color: var(--text-3); }
.modal .cta { --h: var(--accent); margin-top: 6px; border: 0; }
.modal .cta:disabled { background: #ffffff12; box-shadow: inset 0 0 0 1px #ffffff1f; color: #8a8a93; text-shadow: none; cursor: default; }
.modal .cta:disabled::after { display: none; }

.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 10px; }
.amount {
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: #ffffff0a;
  box-shadow: inset 0 0 0 1px #ffffff14;
  font: 900 13px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
  color: #d6d6dc;
  transition: background-color 0.200s, box-shadow 0.200s, color 0.200s;
}
.amount:hover { background: #ffffff14; color: #fff; }
.amount.is-active { color: #fff; background: rgb(var(--accent-rgb) / 0.160); box-shadow: inset 0 0 0 1.500px var(--accent); }
.amount:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Инвентарь ---------- */
.inv { display: none; }
body.is-inv .inv { display: block; animation: cview-in 0.400s cubic-bezier(0.230, 1, 0.320, 1); }
body.is-inv .promo,
body.is-inv .cases,
body.is-inv .cview { display: none; }
.inv__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.inv__total { font: 700 13px/1 var(--font-title); color: var(--text-2); }
.inv__sell-all {
  margin-left: auto;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: rgb(var(--accent-rgb) / 0.160);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.550);
  font: 800 13px/1 var(--font-title);
  color: #fff;
  transition: background-color 0.200s;
}
.inv__sell-all:hover { background: rgb(var(--accent-rgb) / 0.300); }
.inv__sell-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 761px) {
  .inv__grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
}
.inv .icard { width: auto; aspect-ratio: auto; min-height: 168px; padding: 10px 12px 12px; }
.inv .icard__img { top: 30px; left: 22%; width: 56%; }
.inv .icard__type { margin-top: 92px; }
.icard__sell {
  position: relative;
  z-index: 1;
  height: 34px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: #ffffff14;
  box-shadow: inset 0 0 0 1px #ffffff14;
  font: 800 12px/1 var(--font-title);
  color: #fff;
  transition: background-color 0.200s;
}
.icard__sell:hover { background: color-mix(in srgb, var(--r) 45%, #ffffff14); }
.icard__sell:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.inv__empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 36px 16px;
  border-radius: 22px;
  background: #18181c;
  box-shadow: inset 0 0 0 1px #ffffff12;
  text-align: center;
}
.inv__empty p { margin: 0; max-width: 36ch; font: 600 14px/1.450 var(--font-text); color: var(--text-2); }
.inv__empty .cta { --h: var(--accent); width: auto; min-width: 180px; margin: 0; border: 0; }

/* ---------- Меню профиля: на телефоне шторка снизу, на десктопе панель под аватаром ---------- */
.drawer {
  width: 100%;
  max-width: 100vw;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: #17181b;
  box-shadow: inset 0 1px 0 #ffffff1f, 0 -20px 60px #000000a6;
  color: #fff;
  overflow: hidden auto;
}
.drawer::backdrop { background: #08080ab8; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.drawer[open] { animation: sheet-up 0.420s cubic-bezier(0.230, 1, 0.320, 1); }
@keyframes sheet-up {
  0% { transform: translateY(100%); }
  100% { transform: none; }
}
.drawer__in { padding: 0 10px calc(12px + env(safe-area-inset-bottom, 0px)); }
/* «ручка» шторки */
.drawer__in::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: #ffffff2e;
}

/* шапка: аватар, ник, статус */
.phead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 16px;
  border-bottom: 1px solid #ffffff14;
}
.phead__ava {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, #b98cff, #6a3df0);
  box-shadow: inset 0 0 0 2.500px rgb(var(--accent-rgb) / 0.900), 0 0 18px rgb(var(--accent-rgb) / 0.400);
  font: 900 24px/1 var(--font-title);
  text-shadow: 0 1px 0 #00000059;
}
.phead__id { flex: 1; display: grid; gap: 6px; min-width: 0; }
.phead__name { font: 900 20px/1.100 var(--font-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phead__meta { display: flex; align-items: center; gap: 8px; font: 800 13px/1 var(--font-title); font-variant-numeric: tabular-nums; color: #e6e6ea; }
.phead__chip {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.160);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.450);
  font: 800 11px/1 var(--font-title);
  font-style: normal;
  color: var(--accent-hi);
  white-space: nowrap;
}

/* строки меню */
.mlist { display: grid; padding: 6px 0; }
.mrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 6px 8px;
  border: 0;
  border-radius: 16px;
  background: none;
  font: 800 15px/1.200 var(--font-title);
  color: #f2f2f5;
  text-align: left;
  transition: background-color 0.180s;
}
.mrow__ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ffffff0f;
  box-shadow: inset 0 0 0 1px #ffffff12;
  color: #fff;
  transition: background-color 0.220s, color 0.220s, transform 0.300s cubic-bezier(0.340, 1.500, 0.500, 1);
}
.mrow__ico svg { width: 20px; height: 20px; }
.mrow__ico--flag svg { width: 24px; height: 24px; }
.mrow__name { flex: 1; min-width: 0; }
.mrow__val { font: 900 15px/1 var(--font-title); font-variant-numeric: tabular-nums; }
.mrow__val--dim { color: var(--text-2); font-weight: 800; }
.mrow__go { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-3); transition: transform 0.220s, color 0.220s; }
.mrow__soon {
  padding: 4px 7px;
  border-radius: 7px;
  background: #ffffff14;
  font: 800 10px/1 var(--font-title);
  letter-spacing: 0.040em;
  text-transform: uppercase;
  color: #b9b9c2;
}
a.mrow:hover, button.mrow:hover { background: #ffffff0d; }
a.mrow:hover .mrow__ico, button.mrow:hover .mrow__ico {
  background: linear-gradient(145deg, #8cc8ff, var(--accent) 55%, var(--accent-deep));
  transform: rotate(-6deg) scale(1.060);
}
a.mrow:hover .mrow__go, button.mrow:hover .mrow__go { transform: translateX(3px); color: #fff; }
.mrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mrow--soon .mrow__name { color: #8a8a93; }
.mrow--soon .mrow__ico { color: #8a8a93; }

/* звук: переключатель-надпись и ползунок под строкой */
.sndtoggle { cursor: pointer; }
.sndtoggle input { position: absolute; opacity: 0; pointer-events: none; }
.sndtoggle span {
  display: none;
  padding: 5px 9px;
  border-radius: 9px;
  font: 900 12px/1 var(--font-title);
  letter-spacing: 0.040em;
  text-transform: uppercase;
}
.sndtoggle input:checked ~ .sndtoggle__on {
  display: inline-block;
  background: rgb(var(--accent-rgb) / 0.180);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 12px rgb(var(--accent-rgb) / 0.350);
  color: var(--accent-hi);
}
.sndtoggle input:not(:checked) ~ .sndtoggle__off { display: inline-block; background: #ffffff14; color: #b9b9c2; }
.sndtoggle input:focus-visible ~ span { outline: 2px solid var(--accent); outline-offset: 2px; }
.range {
  --v: 50%;
  flex: 1 1 100%;
  height: 22px;
  margin: 0 2px 4px;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--v), #ffffff1f var(--v));
}
.range::-moz-range-track { height: 6px; border-radius: 3px; background: #ffffff1f; }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: #fff;
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.600);
}
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); background: #fff; }
.range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.range:disabled { opacity: 0.400; cursor: default; }

/* выход отделён чертой */
.mrow--out { margin-top: 2px; border-top: 1px solid #ffffff14; border-radius: 0 0 16px 16px; padding-top: 12px; color: #ff9c9c; }
.mrow--out .mrow__ico { color: #ff9c9c; background: #ff4d4d1a; box-shadow: inset 0 0 0 1px #ff4d4d33; }
button.mrow--out:hover { background: #ff4d4d14; color: #fff; }
button.mrow--out:hover .mrow__ico { background: #ff4d4d; color: #fff; }

/* десктоп: панель справа под шапкой */
@media (min-width: 720px) {
  .drawer {
    width: 380px;
    max-height: calc(100dvh - var(--header-h) - 24px);
    margin: calc(var(--header-h) + 8px) 16px auto auto;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px #ffffff1a, 0 24px 60px #000000b3;
  }
  .drawer::backdrop { background: #08080a66; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .drawer[open] { animation: modal-in 0.280s cubic-bezier(0.230, 1, 0.320, 1); transform-origin: 100% 0; }
  .drawer__in { padding: 0 10px 10px; }
  .drawer__in::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open] { animation: none; }
}

/* телефон: меню профиля открывается по центру экрана */
@media (max-width: 719px) {
  .drawer {
    width: min(400px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px #ffffff1a, 0 24px 60px #000000b3;
  }
  .drawer[open] { animation: modal-in 0.350s cubic-bezier(0.230, 1, 0.320, 1); }
  .drawer__in { padding: 0 10px 10px; }
  .drawer__in::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open] { animation: none; }
}

/* ---------- Меню профиля: простые белые иконки без плиток ---------- */
.mrow { gap: 16px; min-height: 58px; padding: 6px 10px; font-size: 16px; }
.mrow__ico {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
}
.mrow__ico svg { width: 28px; height: 28px; }
.mrow__ico--flag svg { width: 30px; height: 30px; }
a.mrow:hover .mrow__ico, button.mrow:hover .mrow__ico {
  background: none;
  color: var(--accent-hi);
  transform: scale(1.100);
}
.mrow--soon .mrow__ico, .mrow--soon .mrow__name { color: #8a8a93; }
.mrow__val--dim { font-size: 15px; }
/* звук: состояние текстом в скобках, как подпись */
.sndtoggle span {
  padding: 4px 2px;
  border-radius: 6px;
  background: none !important;
  box-shadow: none !important;
  font: 900 14px/1 var(--font-title);
  letter-spacing: 0.020em;
}
.sndtoggle span::before { content: "("; }
.sndtoggle span::after { content: ")"; }
.sndtoggle input:checked ~ .sndtoggle__on { color: var(--accent); text-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.600); }
.sndtoggle input:not(:checked) ~ .sndtoggle__off { color: #8a8a93; }
/* выход */
.mrow--out { color: #fff; }
.mrow--out .mrow__ico { background: none; box-shadow: none; color: #fff; }
button.mrow--out:hover { background: #ff4d4d14; color: #ff9c9c; }
button.mrow--out:hover .mrow__ico { background: none; color: #ff9c9c; }

/* ---------- Инвентарь: выбор игры, фильтры, две кнопки на карточке ---------- */
.invgame { margin-top: 14px; }
.inv .wfil { margin-top: 10px; }
.icard__acts { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.icard__acts .icard__sell { margin-top: 0; padding: 0 4px; min-width: 0; }
.icard__out { background: rgb(var(--accent-rgb) / 0.220); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.550); }
.icard__out:hover { background: rgb(var(--accent-rgb) / 0.380); }

/* ===== Инвентарь, новая версия: обложка, плитки, фильтры, отметка предметов ===== */
body.is-inv .inv { max-width: 980px; margin: 0 auto; }
.icover { position: relative; height: clamp(140px, 40vw, 260px); margin-top: 6px; border-radius: 20px; overflow: hidden; background: #18181c; box-shadow: inset 0 0 0 1px #ffffff14; }
.icover__art { width: 100%; height: 100%; object-fit: cover; -webkit-mask: linear-gradient(180deg, #000 60%, transparent 100%); mask: linear-gradient(180deg, #000 60%, transparent 100%); pointer-events: none; user-select: none; }
.ihead { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ihead__ico { color: var(--accent); filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.700)); }
.ihead__ico svg { display: block; width: 28px; height: 28px; fill: currentColor; }
.ihead__title { margin: 0; font: 900 23px/1 var(--font-title); letter-spacing: -0.015em; color: #fff; }
.istats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.istat { display: grid; gap: 10px; padding: 12px 12px 13px; border-radius: 16px; background: #1a1b1e; box-shadow: inset 0 0 0 1px #ffffff12; min-width: 0; }
.istat span { font: 700 12px/1.150 var(--font-title); color: #a9abbd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.istat b { font: 900 15px/1 var(--font-title); font-variant-numeric: tabular-nums; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.istat--pick b { color: var(--accent-hi); }
.iacts { margin-top: 10px; }

.ibox { margin-top: 14px; padding: 14px 12px; border-radius: 22px; }
.isearch { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; background: #222327; box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.300); transition: box-shadow 0.200s; }
.isearch:focus-within { box-shadow: inset 0 0 0 1.500px var(--accent), 0 0 16px rgb(var(--accent-rgb) / 0.200); }
.isearch svg { flex: 0 0 auto; width: 18px; height: 18px; fill: #7b7d8e; }
.isearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font: 700 14px/1 var(--font-title); color: #fff; }
.isearch input::placeholder { color: #7b7d8e; }
.irow { display: grid; grid-template-columns: minmax(0, 1.150fr) minmax(0, 1fr); gap: 6px; margin-top: 8px; }
.igame { display: grid; grid-template-columns: 1fr 1.300fr; gap: 2px; padding: 3px; border-radius: 14px; background: #222327; box-shadow: inset 0 0 0 1px #ffffff12; }
.igame button { height: 38px; padding: 0 6px; border: 0; border-radius: 11px; background: none; font: italic 900 14px/1 var(--font-title); letter-spacing: -0.020em; text-transform: uppercase; color: #6f7080; cursor: pointer; white-space: nowrap; transition: color 0.200s, background-color 0.200s; }
.igame button:hover { color: #c9c9d6; }
.igame button.is-active { background: rgb(var(--accent-rgb) / 0.200); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.600); color: #fff; }
.isort { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 12px; border: 0; border-radius: 14px; background: #222327; box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.300); font: 800 13px/1 var(--font-title); color: #fff; cursor: pointer; white-space: nowrap; }
.isort::after { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-right: 2.200px solid currentColor; border-bottom: 2.200px solid currentColor; rotate: 45deg; translate: 0 -2px; }
.ikind { display: flex; gap: 2px; margin-top: 8px; padding: 3px; border-radius: 14px; background: #222327; box-shadow: inset 0 0 0 1px #ffffff12; overflow-x: auto; scrollbar-width: none; }
.ikind::-webkit-scrollbar { display: none; }
.ikind button { flex: 0 0 auto; height: 36px; padding: 0 14px; border: 0; border-radius: 11px; background: none; font: 800 13px/1 var(--font-title); color: #8d8d9b; cursor: pointer; white-space: nowrap; transition: color 0.200s, background-color 0.200s; }
.ikind button:hover { color: #fff; }
.ikind button.is-active { background: #34353d; box-shadow: inset 0 1px 0 #ffffff1f; color: #fff; }
.igame button:focus-visible, .ikind button:focus-visible, .isort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.isell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.isell button { height: 44px; padding: 0 16px; border: 0; border-radius: 14px; font: 900 13px/1 var(--font-title); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter 0.200s, background-color 0.200s, color 0.200s; }
.isell__sel { background: linear-gradient(180deg, #ffffff, #d2d3dc); color: #17171b; }
.isell__sel:disabled { background: #26272d; color: #7b7d8e; cursor: default; }
.isell__all { background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-deep)); box-shadow: inset 0 1px 0 #ffffff66, 0 6px 18px rgb(var(--accent-rgb) / 0.400); color: #fff; }
.isell__all:disabled { background: rgb(var(--accent-rgb) / 0.220); box-shadow: none; color: #ffffff66; cursor: default; }
.isell button:hover:not(:disabled) { filter: brightness(1.080); }
.isell button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ibox .inv__grid { margin-top: 12px; gap: 6px; }
.inv .icard { cursor: pointer; border-radius: 14px; transition: box-shadow 0.200s, transform 0.200s; }
.icard__check { position: absolute; top: 9px; left: 9px; z-index: 2; width: 20px; height: 20px; border-radius: 7px; background: #0000004d; box-shadow: inset 0 0 0 1.500px #ffffff40; transition: background-color 0.150s, box-shadow 0.150s; }
.icard__check::after { content: ""; position: absolute; left: 6.500px; top: 3px; width: 5px; height: 9px; border-right: 2.500px solid #fff; border-bottom: 2.500px solid #fff; rotate: 45deg; opacity: 0; }
.inv .icard.is-sel { box-shadow: inset 0 0 0 2px var(--accent), 0 0 20px rgb(var(--accent-rgb) / 0.400); transform: translateY(-2px); }
.inv .icard.is-sel .icard__check { background: var(--accent); box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.800); }
.inv .icard.is-sel .icard__check::after { opacity: 1; }
.inv .icard:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.iempty { display: grid; justify-items: center; gap: 14px; padding: 38px 12px 28px; text-align: center; }
.iempty[hidden] { display: none; }
.iempty__ghost { width: 46px; height: 46px; fill: #54556a; animation: ighost 3s ease-in-out infinite; }
@keyframes ighost { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.iempty b { font: 900 20px/1.200 var(--font-title); color: #fff; }
.iempty .pbtn { height: 42px; background: #2b2b31; box-shadow: none; color: #fff; }
.iempty .pbtn[hidden] { display: none; }
@media (min-width: 761px) {
  .iacts { max-width: 520px; }
  .irow { grid-template-columns: 260px 220px; }
  .ikind { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .iempty__ghost { animation: none; } }
/* кнопка сортировки: текст не упирается в стрелку */
.isort { padding: 0 14px 0 12px; font-size: 12px; overflow: hidden; }
.irow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* выбор игры в инвентаре: у каждой игры свой цвет подсветки — CS2 оранжевый, Standoff 2 голубой */
.igame button[data-inv-game="cs2"] { --g: #ff9d2e; }
.igame button[data-inv-game="standoff"] { --g: #38b6f0; }
.igame button:hover { color: color-mix(in srgb, var(--g) 55%, #fff); }
.igame button.is-active {
  background: color-mix(in srgb, var(--g) 22%, transparent);
  box-shadow: inset 0 0 0 1.500px var(--g), 0 0 16px color-mix(in srgb, var(--g) 45%, transparent);
  color: #fff;
  text-shadow: 0 0 12px var(--g);
}

/* ---------- вход: настоящие провайдеры ---------- */
.way-tg { display: flex; justify-content: center; padding: 4px 0 2px; min-height: 44px; }
.way-tg[hidden] { display: none; }
.login__dev { width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(255, 194, 74, .5);
  background: rgba(255, 194, 74, .08); color: #ffc24a; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.login__dev:hover { background: rgba(255, 194, 74, .16); }
.login__dev[hidden] { display: none; }

/* ПК: инвентарь по размерам как у Midas — ширина 1328, панель с отступом 16, фильтры в одну строку высотой 40, скины ~176 px (7 в ряд) */
@media (min-width: 1024px) {
  body.is-inv .inv { max-width: min(1328px, calc(100vw - 112px)); }
  .icover { height: 240px; }
  .ihead { margin-top: 20px; }
  .ihead__title { font-size: 24px; }
  .istats { gap: 10px; margin-top: 16px; }
  .ibox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 16px; border-radius: 16px; }
  .ibox > .isearch { flex: 1 1 260px; height: 40px; }
  .ibox > .irow { flex: 0 0 auto; grid-template-columns: 240px 200px; gap: 10px; margin: 0; }
  .ibox .igame button { height: 34px; }
  .ibox .isort { height: 40px; }
  .ibox > .ikind { flex: 0 1 auto; margin: 0; }
  .ibox .ikind button { height: 34px; }
  .ibox > .isell { flex: 1 0 100%; grid-template-columns: minmax(0, 1fr) auto; margin: 0; }
  .ibox .isell button { height: 40px; }
  .ibox > .inv__grid, .ibox > .iempty { flex: 1 0 100%; }
  .ibox .inv__grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-top: 6px; }
}@media (min-width: 1024px) { .inv .ibox.dcard { padding: 16px; border-radius: 16px; } }
