:root {
  --bg-deep: #05050a;
  --site-background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    #0b0f13;
  --bg-panel: rgba(20, 14, 28, 0.9);
  --purple: #7dd8ff;
  --purple-soft: #d3a7ff;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.16);
  --dark-soft: rgba(9, 14, 18, 0.92);
  --gold: #f5b941;
  --gold-dark: #8a560d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--site-background);
  color: var(--white);
}

body {
  min-height: 100vh;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 10, 0.96);
  padding: 34px 24px 26px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 32px;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.site-footer__brand {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.site-footer__links a,
.site-footer__links span,
.site-footer__copyright {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  line-height: 1.5;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--white);
}

.menu-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.menu-social {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.72);
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}

.menu-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.menu-social:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.profile-screen,
.upgrade-screen,
.case-detail,
.case-detail__panel,
.site-footer {
  background: var(--site-background);
}

@media (max-width: 760px) {
  .page-shell > .topbar .topbar__decoration {
    width: min(180px, 45vw);
    height: 32px;
    max-width: 180px;
    max-height: 32px;
  }

  .page-shell > .topbar .brand__logo {
    left: -32px;
    transform: scale(1.35);
    transform-origin: left center;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

body.menu-open,
body.case-modal-open,
body.upgrade-screen-open,
body.contract-screen-open {
  overflow: hidden;
}

.contract-screen {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: flex;
  flex-direction: column;
  padding: 72px 16px 32px;
  overflow-y: auto;
  background: var(--site-background);
}

.contract-screen[hidden] {
  display: none !important;
}

body.contract-screen-open .live-section,
body.contract-screen-open .cases-section,
body.contract-screen-open .site-footer,
body.contract-screen-open .upgrade-screen,
body.contract-screen-open .case-detail {
  display: none !important;
}

body.contract-screen-open .side-menu,
body.contract-screen-open .menu-overlay {
  z-index: 340;
}

.contract-panel {
  position: relative;
  width: min(760px, 100%);
  margin: 20px auto 0;
  padding: 28px 0;
}

.contract-panel__header h2 { margin: 0; color: #d3a7ff; font-size: 2rem; font-weight: 900; letter-spacing: 0.08em; }

.contract-panel__top {
  display: grid;
  grid-template-columns: minmax(0, 360px) 180px;
  gap: 20px;
  margin-top: 22px;
}

.contract-panel__summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  color: rgba(255,255,255,0.72);
}

.contract-stat {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(125,93,255,0.32);
  background: linear-gradient(135deg, rgba(125,93,255,0.16), rgba(255,255,255,0.035));
  box-shadow: 0 10px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.contract-stat span { color: rgba(255,255,255,0.58); font-size: 0.86rem; }
.contract-stat strong { color: #fff; font-size: 1.25rem; }

.contract-reward-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 12px;
  border: 1px solid rgba(211,167,255,0.42);
  background: linear-gradient(180deg, rgba(125,93,255,0.2), rgba(255,255,255,0.035));
  box-shadow: 0 12px 28px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.08);
  text-align: center;
}

.contract-reward-card__label { color: rgba(255,255,255,0.56); font-size: 0.7rem; letter-spacing: 0.12em; }
.contract-reward-card__image { display: grid; place-items: center; width: 94px; height: 82px; color: rgba(255,255,255,0.18); font-size: 3rem; font-weight: 900; }
.contract-reward-card__image img { width: 100%; height: 100%; object-fit: contain; }
.contract-reward-card > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.contract-reward-card > span:last-child { color: #d3a7ff; font-size: 0.76rem; }

.contract-panel__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  width: 100%;
}

.contract-item {
  position: relative;
  min-height: 132px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: 3px solid var(--rarity);
  background: rgba(255,255,255,0.035);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.contract-item::before {
  content: attr(data-contract-position);
  position: absolute;
  top: 7px;
  left: 8px;
  color: rgba(255,255,255,0.35);
  font-weight: 800;
}

.contract-item.is-selected { border-color: #d3a7ff; background: rgba(125,93,255,0.2); }
.contract-item:hover:not(:disabled) { border-color: rgba(211,167,255,0.8); background: rgba(125,93,255,0.14); transform: translateY(-2px); }
.contract-item--empty { display: grid; place-items: center; color: rgba(255,255,255,0.12); font-size: 1.3rem; font-weight: 800; cursor: default; }
.contract-item img { width: 100%; height: 88px; object-fit: contain; }
.contract-item__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.contract-item__price { display: block; color: rgba(255,255,255,0.62); font-size: 0.72rem; }

.contract-panel__submit {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1px solid rgba(170,122,255,0.65);
  border-radius: 0;
  background: #7d5dff;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.contract-panel__submit:disabled { opacity: 0.4; cursor: not-allowed; }
.contract-panel__status { min-height: 24px; margin-top: 12px; color: rgba(255,255,255,0.72); text-align: center; }

.contract-panel__items { margin-top: 24px; }

@media (max-width: 560px) {
  .contract-screen { padding: 60px 12px 20px; }
  .contract-panel { margin-top: 8px; padding: 20px 0; }
  .contract-panel__top { grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; }
  .contract-panel__summary { gap: 10px; }
  .contract-stat { min-height: 76px; padding: 10px; }
  .contract-reward-card { min-height: 164px; padding: 8px; }
  .contract-reward-card__image { width: 76px; height: 72px; }
  .contract-panel__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.app-shell {
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.case-modal-open .app-shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.case-detail__icon {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 58%;
  width: 250px;
  height: 250px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4));
}

.page-shell {
  width: 100vw;
  margin: 0;
  position: relative;
  padding: 0;
}

.topbar {
  position: relative;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 70px;
  min-height: 70px;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-right: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.topbar > button {
  align-self: center;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand__logo {
  display: block;
  width: 104px;
  max-width: 104px;
  height: 52px;
  max-height: 52px;
  object-fit: contain;
  margin-left: 0;
  position: relative;
  left: -10px;
  transform: scale(1.2);
  transform-origin: left center;
}

.topbar__decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(220px, 18vw);
  height: 38px;
  max-width: 220px;
  max-height: 38px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.menu-toggle {
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 0;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 90;
}

body.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  padding: 36px 22px 26px;
  background: linear-gradient(180deg, rgba(7, 12, 17, 0.95), rgba(7, 12, 17, 0.98));
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.28s ease, opacity 0.25s ease, visibility 0.25s ease;
}

body.menu-open .side-menu,
.side-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.menu-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.menu-auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 0;
  border: none;
  background: transparent;
  position: relative;
  z-index: 600;
  opacity: 1;
  filter: none;
}

.menu-profile[hidden] {
  display: none !important;
}

.menu-profile__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff7a18, #f5d142, #7d5dff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.menu-profile__avatar img,
.profile-screen__avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.menu-profile__meta {
  flex: 1;
  min-width: 0;
}

.menu-profile__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}

.menu-profile__balance {
  font-size: 0.88rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.7);
}

.menu-profile__topup {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d3a7ff;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.menu-profile__topup:hover,
.menu-profile__topup:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.menu-profile__action {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-right: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  position: relative;
  z-index: 601;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  box-shadow: 0 6px 18px rgba(185, 108, 255, 0.28);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.menu-profile__action:hover,
.menu-profile__action:focus-visible {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  transform: none;
}

.menu-profile__action svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .menu-auth-buttons {
    width: calc(100% + 14px);
  }

  .menu-profile__action {
    margin-right: -14px;
  }
}

@media (min-width: 761px) {
  .page-shell > .side-menu .menu-profile__action {
    z-index: 600;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.menu-login,
.menu-register {
  border: 1px solid rgba(170, 122, 255, 0.65);
  border-radius: 12px;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.menu-register {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.side-menu .menu-auth-buttons .menu-register {
  display: none;
}

.menu-close {
  position: fixed;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--white);
  border-radius: 0;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 430;
  display: none;
}

body.menu-open .page-shell > .topbar .brand,
body.menu-open .page-shell > .topbar .menu-toggle {
  display: none;
}

body.menu-open .page-shell > .topbar .topbar__decoration {
  display: none;
}

body.menu-open .page-shell > .topbar {
  height: 0;
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

body.menu-open .page-shell > .topbar .menu-close {
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 13, 0.72);
  backdrop-filter: blur(3px);
}

.auth-modal__dialog {
  position: relative;
  width: min(46rem, calc(100vw - 1rem));
  background: #151515;
  border: 1px solid #474747;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.auth-modal__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #151515;
}

.auth-modal__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 22rem;
  padding: 3.5rem 1.4rem 2rem;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.38) 0%, rgba(21,21,21,1) 100%),
    radial-gradient(circle at center, rgba(82, 196, 140, 0.15), rgba(21, 21, 21, 1) 55%);
  overflow: hidden;
}

.auth-modal__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(21,21,21,1) 100%);
}

.auth-modal__logo {
  position: relative;
  z-index: 2;
  width: 7rem;
  height: 7rem;
  object-fit: contain;
}

.auth-modal__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}

.auth-modal__copy h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 2.3rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-modal__copy p {
  margin: 0;
  max-width: 22rem;
  font-size: 1.2rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.5);
  font-family: Arial, Helvetica, sans-serif;
}

.auth-modal__content {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  padding: 1.5rem 1.4rem 2rem;
  background: #151515;
}

.auth-modal__checks {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

.auth-modal__check {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  width: 100%;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 1.05rem;
  line-height: 1.4;
}

.auth-modal__check a {
  color: #9d72ff;
  text-decoration: none;
}

.auth-modal__checkbox {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0.1rem;
  background: transparent;
  cursor: pointer;
  margin-top: 0.15rem;
}

.auth-modal__checkbox[aria-checked="true"] {
  background: #9d72ff;
  border-color: #9d72ff;
  box-shadow: inset 0 0 0 2px rgba(21,21,21,1);
}

.auth-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.auth-modal__submit,
.auth-modal__register {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  height: 4.2rem;
  border-radius: 0;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-modal__submit {
  border: 1px solid rgba(170, 122, 255, 0.65);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.auth-modal__submit:disabled {
  border-color: rgba(255,255,255,0.15);
  background: #4B4B4F;
  color: rgba(255,255,255,0.4);
  cursor: not-allowed;
  box-shadow: inset 0 0 1.66rem rgba(125,125,125,0.45);
}

.auth-modal__register {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
}

.auth-modal__close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 10;
  width: 2.8rem;
  height: 2.8rem;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 1.7rem;
  cursor: pointer;
}

.settings-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 230;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.settings-modal.is-open {
  display: flex;
}

.settings-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 13, 0.72);
  backdrop-filter: blur(3px);
}

.settings-modal__dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(60rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5rem);
  padding: 1rem;
  background: #131216;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.settings-modal__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-height: calc(100vh - 7rem);
  padding: 0 0 0.5rem;
}

.settings-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 4.4rem;
  width: 100%;
  padding-right: 0;
}

.settings-modal__header span {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 2.2rem;
  line-height: 3.3rem;
  text-transform: uppercase;
  color: #fff;
}

.settings-modal__content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  padding: 0 2rem;
  overflow-y: auto;
}

.settings-modal__group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.settings-modal__field span {
  font-size: 1.8rem;
  line-height: 2.2rem;
  font-weight: 600;
  color: #fff;
}

.settings-modal__field input {
  width: 100%;
  height: 4.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #0f0f10;
  color: #fff;
  padding: 0 1rem;
  font-size: 1.6rem;
  outline: none;
}

.settings-modal__field input::placeholder {
  color: rgba(255,255,255,0.55);
}

.settings-avatar-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4.2rem;
  border: 1px solid rgba(170, 122, 255, 0.65);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.settings-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.settings-modal__field--trade {
  position: relative;
}

.settings-modal__trade-wrap {
  position: relative;
}

.settings-modal__trade-wrap input {
  padding-right: 1rem;
}

.settings-modal__link {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  font-size: 1.6rem;
  line-height: 1.6rem;
}

.settings-modal__streamer {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.settings-modal__streamer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.settings-modal__streamer-head span {
  font-size: 1.8rem;
  line-height: 1.8rem;
  font-weight: 600;
  color: #fff;
}

.settings-modal__toggle {
  position: relative;
  width: 4.8rem;
  height: 2.4rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 1.5rem;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.3rem;
}

.settings-modal__toggle span {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.settings-modal__toggle[aria-pressed="true"] {
  background: rgba(255,255,255,0.12);
}

.settings-modal__toggle[aria-pressed="true"] span {
  transform: translateX(2.2rem);
}

.settings-modal__streamer p {
  margin: 0;
  padding-right: 6rem;
  font-size: 1.6rem;
  line-height: 1.9rem;
  color: rgba(255,255,255,0.55);
}

.settings-modal__submit {
  width: clamp(21.3rem, 40vw, 21.3rem);
  height: 4.4rem;
  border: 1px solid rgba(170, 122, 255, 0.65);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

@media (max-width: 480px) {
  .settings-modal {
    padding: 0.75rem;
  }
  .settings-modal__dialog {
    width: min(100%, calc(100vw - 1.5rem));
    max-height: calc(100vh - 1.5rem);
    padding: 0.75rem;
  }

  .settings-modal__panel {
    gap: 1.2rem;
    max-height: calc(100vh - 3rem);
  }

  .settings-modal__header {
    min-height: 3rem;
  }

  .settings-modal__icon {
    width: 2.8rem;
    height: 2.8rem;
  }

  .settings-modal__icon svg {
    width: 2.1rem;
    height: 2.1rem;
  }

  .settings-modal__header span {
    font-size: 1.55rem;
    line-height: 2rem;
  }

  .settings-modal__content {
    gap: 1.4rem;
    padding: 0 0.4rem;
  }

  .settings-modal__field span,
  .settings-modal__streamer-head span {
    font-size: 1.1rem;
    line-height: 1.4rem;
  }

  .settings-modal__field input {
    height: 3.1rem;
    font-size: 1rem;
  }

  .settings-modal__copy {
    right: 0.75rem;
    top: 0.75rem;
  }

  .settings-modal__copy svg {
    width: 1.8rem;
    height: 1.8rem;
  }

  .settings-modal__link {
    font-size: 0.92rem;
    line-height: 1.2rem;
  }

  .settings-modal__streamer-head {
    align-items: flex-start;
  }

  .settings-modal__toggle {
    width: 3.7rem;
    height: 1.9rem;
  }

  .settings-modal__toggle span {
    width: 1.35rem;
    height: 1.35rem;
  }

  .settings-modal__toggle[aria-pressed="true"] span {
    transform: translateX(1.7rem);
  }

  .settings-modal__streamer p {
    padding-right: 0;
    font-size: 0.92rem;
    line-height: 1.35rem;
  }

  .settings-modal__submit {
    width: 100%;
    height: 3.6rem;
    font-size: 1.1rem;
  }

  .settings-modal__close {
    right: 0.5rem;
    top: 0.5rem;
    width: 3.2rem;
    height: 3.2rem;
  }

  .settings-modal__close svg {
    width: 1.8rem;
    height: 1.8rem;
  }
}

.settings-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  width: 3.2rem;
  height: 3.2rem;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.settings-modal__close svg {
  width: 2.1rem;
  height: 2.1rem;
  fill: rgba(255,255,255,0.8);
}

.login-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 210;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-modal.is-open {
  display: flex;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 13, 0.72);
  backdrop-filter: blur(3px);
}

.login-modal__dialog {
  position: relative;
  width: min(26rem, calc(100vw - 1rem));
  background: linear-gradient(180deg, rgba(17, 20, 25, 0.94), rgba(12, 15, 18, 0.94));
  border: 1px solid rgba(164, 122, 255, 0.45);
  border-radius: 0;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.login-modal__card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.6rem 1.25rem 1.25rem;
}

.login-modal__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
}

.login-modal__logo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.login-modal__top h3 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}

.register-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 210;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.register-modal.is-open {
  display: flex;
}

.register-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 13, 0.72);
  backdrop-filter: blur(3px);
}

.register-modal__dialog {
  position: relative;
  width: min(26rem, calc(100vw - 1rem));
  background: linear-gradient(180deg, rgba(17, 20, 25, 0.94), rgba(12, 15, 18, 0.94));
  border: 1px solid rgba(164, 122, 255, 0.45);
  border-radius: 0;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.register-modal__card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.6rem 1.25rem 1.25rem;
}

.register-modal__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
}

.register-modal__logo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.register-modal__top h3 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}

.register-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.register-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.96rem;
}

.register-modal__field input {
  width: 100%;
  height: 3.2rem;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 0.8rem 0.95rem;
  outline: none;
}

.register-modal__field input:focus {
  border-color: rgba(170, 122, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(170, 122, 255, 0.18);
}

.register-modal__submit {
  margin-top: 0.25rem;
  height: 3.4rem;
  border: 1px solid rgba(170, 122, 255, 0.65);
  border-radius: 0;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.register-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 1.5rem;
  cursor: pointer;
}

.login-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.96rem;
}

.login-modal__field input {
  width: 100%;
  height: 3.2rem;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 0.8rem 0.95rem;
  outline: none;
}

.login-modal__field input:focus {
  border-color: rgba(170, 122, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(170, 122, 255, 0.18);
}

.login-modal__error,
.register-modal__error {
  min-height: 1.2rem;
  font-size: 0.8rem;
  color: #ff8d8d;
}

.login-modal__submit {
  margin-top: 0.25rem;
  height: 3.4rem;
  border: 1px solid rgba(170, 122, 255, 0.65);
  border-radius: 0;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.login-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 10px;
  }

  .auth-modal__dialog {
    width: calc(100vw - 20px);
  }

  .auth-modal__hero {
    min-height: 18rem;
    padding: 3rem 1rem 1.5rem;
  }

  .auth-modal__content {
    padding: 1.2rem 1rem 1.4rem;
    gap: 1.7rem;
  }

  .auth-modal__copy h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .auth-modal__copy p {
    font-size: 1.05rem;
    max-width: 18rem;
  }

  .auth-modal__check {
    font-size: 0.98rem;
  }

  .auth-modal__submit {
    height: 3.8rem;
    font-size: 1.1rem;
  }

  .login-modal {
    padding: 12px;
  }

  .login-modal__dialog {
    width: calc(100vw - 24px);
  }

  .login-modal__card {
    padding: 1.1rem 0.9rem 1rem;
  }

  .login-modal__top h3 {
    font-size: 1.45rem;
  }
}

.profile-screen {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 220;
  padding: 88px 24px 24px;
  background: #0f1114;
  color: #e8ebf3;
  overflow-y: auto;
}

.profile-screen.is-open {
  display: block;
}

body.profile-screen-open.menu-open .menu-overlay,
.menu-overlay.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 320;
}

body.profile-screen-open.menu-open .side-menu,
.side-menu.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateX(0) !important;
  z-index: 340;
}

body.profile-screen-open .page-shell {
  position: static;
  z-index: 0;
}

body.profile-screen-open .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  z-index: 300 !important;
}

body.profile-screen-open .profile-screen {
  padding-top: 88px !important;
}

.profile-screen__shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(640px, 100%);
  margin: 0 auto;
  min-height: 100%;
}

.profile-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem 0.9rem;
  background: #12161b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.profile-screen-open .topbar {
  background: #0d1117 !important;
}

.profile-screen__user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.profile-screen__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff7a18, #f5d142, #7d5dff);
}

.profile-screen__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-screen__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.profile-screen__id {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.profile-screen__tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.profile-screen__tool {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.profile-screen__tool svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.9);
}

.profile-screen__bg-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.9rem 0.9rem 0.7rem;
}

.profile-screen__balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.profile-screen__balance-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.profile-screen__balance-value {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.profile-screen__topup {
  padding: 0.9rem 1.5rem;
  border: 1px solid rgba(170, 122, 255, 0.8);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

.profile-screen__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.profile-screen__stat-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 86px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.profile-screen__stat-icon {
  width: 2rem;
  height: 2rem;
  display: block;
  flex-shrink: 0;
  color: #fff;
  opacity: 1;
}

.profile-screen__stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 2.4rem;
  color: #fff;
}

.profile-screen__stat-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}

.profile-screen__stat-item:hover .profile-screen__stat-tooltip {
  opacity: 1;
}

.profile-screen__stat-tooltip-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.4rem;
  padding: 0 0.8rem;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0.2rem;
}

.profile-screen__stat-tooltip-box span {
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.profile-screen__row,
.profile-screen__drop-card,
.profile-screen__items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem 1rem;
}

.profile-screen__line-label,
.profile-screen__drop-title,
.profile-screen__items-title {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-screen__line-value {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.profile-screen__drop-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 118px;
  padding: 0.7rem 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  color: rgba(255,255,255,0.52);
}

.profile-screen__drop-title {
  position: absolute;
  left: 1rem;
  top: 0.7rem;
  margin: 0;
}

.profile-screen__drop-name {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.profile-screen__drop-name--empty {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.profile-screen__drop-icon {
  position: relative;
  width: 122px;
  height: 122px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
  align-self: center;
}

.profile-screen__drop-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.profile-screen__drop-icon--empty {
  background: transparent;
  border: none;
}

.profile-screen__drop-icon-placeholder {
  position: relative;
  width: 56%;
  height: 56%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  filter: grayscale(1);
  opacity: 0.45;
}

.profile-screen__drop-icon-placeholder::before,
.profile-screen__drop-icon-placeholder::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.profile-screen__drop-icon-placeholder::before {
  width: 14%;
  height: 54%;
  left: 46%;
  top: 14%;
  transform: rotate(34deg);
  box-shadow: 20px 10px 0 rgba(255, 255, 255, 0.12);
}

.profile-screen__drop-icon-placeholder::after {
  width: 52%;
  height: 12%;
  left: 22%;
  bottom: 18%;
  transform: rotate(-28deg);
  border-radius: 8px;
}

.profile-screen__drop-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(1.1) drop-shadow(0 0 14px rgba(255, 75, 224, 0.18));
}

.profile-screen__items-header {
  padding: 0.7rem 0.9rem;
}

.profile-screen__inventory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  justify-items: stretch;
  align-items: stretch;
}

.profile-screen__inventory-item {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  background: transparent;
  border: none;
  transition: transform 0.2s ease;
}

.profile-screen__inventory-item.is-active {
  transform: translateY(-2px);
}

.profile-screen__inventory-art {
  position: relative;
  width: 100%;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 0.8rem 0.8rem;
  background: rgba(255,255,255,.025);
  border-bottom: 3px solid var(--rarity);
  border-radius: 0;
  overflow: hidden;
  transform: none;
  filter: none;
}

.profile-screen__inventory-tag {
  position: absolute;
  left: 0.8rem;
  bottom: 0.7rem;
  z-index: 2;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-screen__inventory-art img {
  width: 80%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
}

.profile-screen__inventory-price {
  position: absolute;
  right: 0.8rem;
  top: 0.7rem;
  z-index: 2;
  color: rgba(255,255,255,0.82);
  font-size: 0.8rem;
  font-weight: 700;
}

.profile-screen__inventory-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.22s ease;
  margin-top: 0;
}

.profile-screen__inventory-item.is-active .profile-screen__inventory-actions {
  max-height: 80px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  margin-top: 0.45rem;
}

.profile-screen__inventory-art--pending {
  background: rgba(255, 255, 255, 0.08);
  filter: grayscale(1) brightness(0.7);
}

.profile-screen__inventory-pending {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-align: center;
  background: rgba(17, 17, 20, 0.28);
  backdrop-filter: blur(1px);
}

.profile-screen__inventory-status-icon {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  line-height: 1;
  color: #d4c2ff;
  text-shadow: 0 0 20px rgba(212, 194, 255, 0.45);
  opacity: 1;
}

.profile-screen__inventory-status-text {
  position: relative;
  z-index: 7;
  max-width: 150px;
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.profile-screen__action {
  height: 3rem;
  border: 1px solid rgba(170, 122, 255, 0.65);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.profile-screen__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-screen__inventory-empty {
  padding: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-screen__items-actions {
  display: flex;
  gap: 0.5rem;
}

.profile-screen__sell-all {
  padding: 0.75rem 1.15rem;
  border: 1px solid rgba(170, 122, 255, 0.8);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 88, 255, 0.28);
}

@media (max-width: 520px) {
  body.profile-screen-open .profile-screen {
    padding-top: 84px;
  }

  .profile-screen {
    padding: 12px;
  }

  .profile-screen__shell {
    width: 100%;
  }

  .profile-screen__balance-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-screen__topup {
    width: 100%;
  }

  .profile-screen__stats {
    gap: 0.55rem;
  }
}

.menu-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.menu-list a {
  color: var(--white);
  text-decoration: none;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-transform: uppercase;
}

.upgrade-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  overflow-y: auto;
  padding: 90px 20px 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(120, 45, 255, 0.17), transparent 35%),
    #06050a;
}

body.upgrade-screen-open .upgrade-screen {
  display: flex;
  z-index: 160;
}

body.upgrade-screen-open .page-shell {
  display: block;
}

body.upgrade-screen-open .topbar {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 400 !important;
}

body.upgrade-screen-open .menu-overlay {
  z-index: 310;
}

body.upgrade-screen-open .side-menu {
  z-index: 320;
}

body.upgrade-screen-open .upgrade-screen {
  box-sizing: border-box;
}


.upgrade-screen .upgrader {
  width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.upgrade-screen .wheel-area {
  position: relative;
  width: 580px;
  height: 580px;
  margin-top: -8px;
}

.upgrade-screen .upgrade-celebration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
  overflow: visible;
}

.upgrade-speed-toggle {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(211, 167, 255, 0.7);
  border-radius: 50%;
  background: rgba(20, 14, 28, 0.9);
  color: #d3a7ff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(211, 167, 255, 0.24);
}

.upgrade-speed-toggle:hover,
.upgrade-speed-toggle[aria-pressed="true"] {
  background: rgba(211, 167, 255, 0.2);
  box-shadow: 0 0 24px rgba(211, 167, 255, 0.5);
}

.upgrade-speed-toggle svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(211, 167, 255, 0.9));
}

.upgrade-speed-toggle__flash {
  fill: #d3a7ff;
}

.upgrade-speed-toggle__shade {
  fill: rgba(0, 0, 0, 0.12);
}

.upgrade-speed-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upgrade-screen .upgrade-panel {
  width: min(100%, 620px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -16px;
}

.upgrade-screen .upgrade-panel__header {
  display: none;
}

.upgrade-screen .upgrade-panel__slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.upgrade-screen .upgrade-panel__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 126px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.upgrade-screen .upgrade-panel__slot--selectable {
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.upgrade-screen .upgrade-panel__slot--selectable:hover,
.upgrade-screen .upgrade-panel__slot--selectable:focus-visible {
  border-color: rgba(162, 110, 255, 0.8);
  background: rgba(122, 77, 255, 0.09);
  outline: none;
}

.upgrade-screen .upgrade-panel__slot-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  text-align: left;
}

.upgrade-screen .upgrade-panel__slot-preview--selected {
  padding: 10px;
}

.upgrade-screen .upgrade-panel__slot-preview img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
}

.upgrade-screen .upgrade-panel__slot-price {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 700;
  background: rgba(8,10,14,0.55);
  padding: 3px 6px;
  border-radius: 999px;
}

.upgrade-screen .upgrade-panel__slot-meta {
  display: none;
}

.upgrade-screen .upgrade-panel__slot-empty {
  color: rgba(255,255,255,0.5);
}

.upgrade-screen .upgrade-panel__slot-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  margin-top: -4px;
  padding: 10px;
  background: rgba(13, 16, 19, 0.8);
  border: 1px solid rgba(255,255,255,0.08);
}

.upgrade-screen .upgrade-panel__slot-option {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-item {
  width: 100%;
  max-width: none;
  margin: 0;
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-art {
  position: relative;
  min-height: 110px;
  padding: 0.7rem 0.7rem 0.6rem;
  background: rgba(255,255,255,.025);
  border-bottom: 3px solid var(--rarity, rgba(255,255,255,0.5));
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--rarity, rgba(255,255,255,0.5));
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-art img {
  width: 72%;
  max-width: 105px;
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-tag {
  left: 0.7rem;
  bottom: 0.6rem;
  font-size: 0.82rem;
}

.upgrade-screen .upgrade-panel__slot-option .profile-screen__inventory-price {
  top: 0.7rem;
  right: 0.7rem;
  bottom: auto;
  font-size: 0.76rem;
}

.upgrade-screen .upgrade-panel__slot-option.is-active .profile-screen__inventory-art {
  border-bottom-color: rgba(182, 126, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(182, 126, 255, 0.7);
}

.upgrade-screen .upgrade-panel__balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.upgrade-screen .upgrade-panel__balance-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(127, 88, 255, 0.9), rgba(101, 69, 220, 0.9));
  color: rgba(255, 255, 255, 0.96);
  border-radius: 0;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.upgrade-screen .upgrade-panel__balance-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.upgrade-screen .upgrade-panel__coin {
  color: #7dd8ff;
  font-size: 13px;
}

.upgrade-screen .upgrade-panel__balance-max {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}
.upgrade-screen .upgrade-panel__balance-add {
  display: flex; gap: 8px; width: 100%;
}
.upgrade-screen .upgrade-panel__balance-add input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04); color: #fff; outline: none;
}
.upgrade-screen .upgrade-panel__balance-add button,
.upgrade-screen .upgrade-panel__desired-btn {
  border: 1px solid rgba(136,87,255,.45); background: rgba(112,76,214,.55); color:#fff;
  padding: 10px 14px; font-weight: 800; cursor:pointer;
}
.upgrade-screen .upgrade-panel__desired-btn { width:100%; }
.upgrade-screen .upgrade-panel__desired {
  width:100%; padding:12px; border:1px solid rgba(255,255,255,.09); background:rgba(10,10,15,.96);
}
.upgrade-screen .upgrade-panel__desired-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.upgrade-screen .upgrade-panel__desired-head div { display:flex; gap:9px; align-items:center; }
.upgrade-screen .upgrade-panel__desired-head span { color:#b98cff; font-size:11px; }
.upgrade-screen .upgrade-panel__desired-head button { border:0; background:transparent; color:#fff; font-size:22px; cursor:pointer; }
.upgrade-screen .upgrade-panel__desired-filters { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
.upgrade-screen .upgrade-panel__desired-filters label { color:rgba(255,255,255,.58); font-size:11px; }
.upgrade-screen .upgrade-panel__desired-filters input { width:100%; margin-top:5px; box-sizing:border-box; padding:9px 10px; border:1px solid rgba(255,255,255,.09); background:rgba(255,255,255,.035); color:#fff; outline:none; }
.upgrade-screen .upgrade-panel__desired-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; max-height:320px; overflow:auto; }
.upgrade-screen .upgrade-panel__desired-item { position:relative; min-width:0; border:1px solid rgba(255,255,255,.07); background:rgba(255,255,255,.025); color:#fff; padding:8px; cursor:pointer; text-align:left; }
.upgrade-screen .upgrade-panel__desired-item:hover, .upgrade-screen .upgrade-panel__desired-item.is-selected { border-color:rgba(184,140,255,.8); box-shadow:0 0 0 1px rgba(184,140,255,.25); }
.upgrade-screen .upgrade-panel__desired-item img { width:100%; height:72px; object-fit:contain; }
.upgrade-screen .upgrade-panel__desired-name { font-size:10px; line-height:1.25; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upgrade-screen .upgrade-panel__desired-price { font-size:10px; color:rgba(255,255,255,.65); margin-top:3px; }
.upgrade-screen .upgrade-panel__desired-percent { position:absolute; top:5px; right:5px; padding:2px 5px; border-radius:999px; background:rgba(123,53,255,.45); font-size:9px; }
@media (max-width:640px) { .upgrade-screen .upgrade-panel__desired-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.upgrade-screen .upgrade-panel__multipliers {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.upgrade-screen .upgrade-panel__multiplier {
  border: 1px solid rgba(136, 87, 255, 0.45);
  background: linear-gradient(180deg, rgba(130, 91, 255, 0.9), rgba(103, 73, 214, 0.9));
  color: rgba(255,255,255,0.96);
  border-radius: 0;
  min-height: 42px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.upgrade-screen .upgrade-panel__multiplier.active {
  background: linear-gradient(180deg, rgba(144, 109, 255, 1), rgba(112, 82, 222, 1));
  border-color: rgba(183, 152, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 0 1px rgba(183, 152, 255, 0.2);
}

.upgrade-screen .upgrade-panel__multiplier:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
}

.upgrade-screen .ambient {
  position: absolute;
  width: 480px;
  height: 480px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(123, 53, 255, 0.17);
  filter: blur(100px);
  transition: .5s ease;
}

.upgrade-screen .upgrader.win .ambient {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(159, 82, 255, 0.32);
}

.upgrade-screen .drum {
  position: absolute;
  width: 470px;
  height: 470px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #19161f 0%, #100e14 52%, #08080b 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 45px 110px rgba(0,0,0,.78), 0 0 0 7px rgba(255,255,255,.015), 0 0 0 9px rgba(137,67,255,.12), inset 0 0 90px rgba(0,0,0,.9);
  z-index: 5;
}

.upgrade-screen .drum::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(177,110,255,.42);
  box-shadow: 0 0 20px rgba(142,68,255,.18), inset 0 0 25px rgba(120,50,255,.08);
  z-index: 15;
  pointer-events: none;
}

.upgrade-screen .drum::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.055);
  box-shadow: inset 0 0 45px rgba(0,0,0,.8);
  z-index: 15;
  pointer-events: none;
}

.upgrade-screen .win-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.upgrade-screen .win-arc {
  fill: none;
  stroke: url(#purpleGradient);
  stroke-width: 24;
  stroke-linecap: butt;
  filter: url(#purpleGlow);
}

.upgrade-screen .win-arc-inner {
  fill: none;
  stroke: rgba(205,155,255,.45);
  stroke-width: 7;
  stroke-linecap: butt;
  opacity: .75;
}

.upgrade-screen .ticks {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(168, 111, 255, 0.26) 0deg 1deg,
    rgba(255, 255, 255, 0.02) 1deg 9deg,
    transparent 9deg 18deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 92.5%, #000 93.2% 100%);
  mask: radial-gradient(circle, transparent 0 92.5%, #000 93.2% 100%);
  opacity: .8;
  z-index: 7;
  pointer-events: none;
}

.upgrade-screen .center {
  position: absolute;
  width: 218px;
  height: 218px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #211a2c, #0a090e 72%);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 25px 70px rgba(0,0,0,.78), inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 50px rgba(134,59,255,.09);
  z-index: 10;
}

.upgrade-screen .center::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(165,91,255,.15);
}

.upgrade-screen .center-label {
  color: rgba(255,255,255,.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.upgrade-screen .chance {
  font-size: 49px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -2px;
  text-shadow: 0 0 25px rgba(177,112,255,.45);
}

.upgrade-screen .center-sub {
  margin-top: 9px;
  color: rgba(255,255,255,.24);
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
}

.upgrade-screen .upgrade-loss-message {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  color: #ff6f91;
  font-size: clamp(17px, 4vw, 27px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255,72,119,.55);
}

.upgrade-screen .center.has-loss .center-label,
.upgrade-screen .center.has-loss .chance,
.upgrade-screen .center.has-loss .center-sub {
  display: none;
}

.upgrade-screen .center.has-loss .upgrade-loss-message {
  display: flex;
  animation: upgradeLossMessageIn .28s ease-out both;
}

@keyframes upgradeLossMessageIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.upgrade-screen .arrow-orbit {
  position: absolute;
  width: 580px;
  height: 580px;
  left: 0;
  top: 0;
  transform: rotate(0deg);
  transform-origin: center center;
  z-index: 30;
  pointer-events: none;
  will-change: transform;
}

.upgrade-screen .arrow {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 26px;
  height: 26px;
  transform: translateX(-50%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px white) drop-shadow(0 0 12px #c28aff) drop-shadow(0 0 30px rgba(137,50,255,.9));
}

.upgrade-screen .arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  transform: rotate(180deg) translateY(2px);
}

.upgrade-screen .arrow::before,
.upgrade-screen .arrow::after {
  content: none;
}

.upgrade-screen .controls {
  display: none;
}

.upgrade-screen .upgrade-button {
  width: min(100%, 620px);
  height: 52px;
  border: 1px solid rgba(179, 132, 255, 0.7);
  border-radius: 0;
  cursor: pointer;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  background: linear-gradient(180deg, rgba(126, 87, 255, 0.96), rgba(101, 72, 211, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform .18s ease, filter .18s ease, opacity .2s ease;
}

.upgrade-screen .upgrade-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.upgrade-screen .upgrade-button:active {
  transform: translateY(0) scale(.99);
}

.upgrade-screen .upgrade-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  background: linear-gradient(180deg, rgba(98, 104, 112, 0.9), rgba(78, 81, 88, 0.9));
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  transform: none;
}

.upgrade-screen .status {
  min-height: 16px;
  color: rgba(255,255,255,.3);
  font-size: 10px;
  font-weight: 650;
}

.upgrade-screen .result {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: .3s ease;
}

.upgrade-screen .result.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.upgrade-screen .result-box {
  min-width: 290px;
  padding: 14px 25px;
  border-radius: 13px;
  text-align: center;
  background: rgba(10,9,14,.95);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.65);
}

.upgrade-screen .result-title {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.5px;
}

.upgrade-screen .result-value {
  margin-top: 5px;
  font-size: 15px;
  font-weight: 800;
}

.upgrade-screen .win-text {
  color: #65ffb0;
}

.upgrade-screen .lose-text {
  color: #ff5878;
}

@media (max-width: 680px) {
  .upgrade-screen {
    overflow: auto;
  }

  .upgrade-screen .upgrader {
    width: 390px;
  }

  .upgrade-screen .wheel-area {
    width: 390px;
    height: 390px;
  }

  .upgrade-screen .drum {
    width: 320px;
    height: 320px;
  }

  .upgrade-screen .arrow-orbit {
    width: 390px;
    height: 390px;
  }

  .upgrade-speed-toggle {
    right: 18px;
    bottom: 18px;
  }

  .upgrade-screen .arrow {
    width: 28px;
    height: 28px;
    top: 8px;
  }

  .upgrade-screen .center {
    width: 145px;
    height: 145px;
  }

  .upgrade-screen .chance {
    font-size: 33px;
  }

  .upgrade-screen .center-label {
    font-size: 8px;
  }

  .upgrade-screen .upgrade-button {
    width: 100%;
  }
}

.menu-list a.accent {
  color: var(--white);
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.live-section {
  width: 100vw;
  margin: 0;
  background: rgba(4, 10, 16, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  padding: 0;
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.live-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.live-cards {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 0 0 0 0;
}

.live-cards::-webkit-scrollbar {
  display: none;
}

.live-card {
  min-width: 130px;
  flex: 0 0 130px;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.card-image {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(208, 182, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.card-image img {
  position: absolute;
  inset: 5px 10px 5px 10px;
  width: calc(100% - 20px);
  height: calc(100% - 10px);
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(19, 27, 39, 0.45));
  z-index: 1;
}

.card-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 0;
  z-index: 2;
}

.card-image--pink { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(168, 92, 255, 0.18)); }
.card-image--pink::after { background: rgba(255, 90, 215, 0.9); }

.card-image--blue { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(76, 116, 255, 0.18)); }
.card-image--blue::after { background: rgba(94, 152, 217, 0.9); }

.card-image--gold { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255, 182, 61, 0.18)); }
.card-image--gold::after { background: rgba(255, 174, 57, 0.9); }

.card-image--green { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(76, 220, 126, 0.18)); }
.card-image--green::after { background: rgba(92, 196, 122, 0.9); }

.card-image--gray::after { background: rgba(139, 146, 156, 0.9); }
.card-image--red { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255, 64, 80, 0.18)); }
.card-image--red::after { background: rgba(255, 64, 80, 0.9); }
.card-image--purple { background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(155, 69, 255, 0.18)); }
.card-image--purple::after { background: rgba(155, 69, 255, 0.9); }

.card-meta {
  display: none;
}

.case-card__image-wrap,
.case-card__name,
.case-card button {
  cursor: pointer;
}

.cases-section {
  width: 100%;
  margin-top: 18px;
  padding: 18px 0 26px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 14px;
  margin-bottom: 6px;
}

.section-crystal {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
  background: linear-gradient(135deg, #8a6bff 0%, #d9d0ff 25%, #7de6ff 50%, #f4a7ff 75%, #8a6bff 100%);
  background-size: 220% 220%;
  animation: crystalShift 3s linear infinite;
  transform: rotate(45deg);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(168, 124, 255, 0.8);
}

@keyframes crystalShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.case-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.case-search svg { width: 19px; height: 19px; fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.8; flex: 0 0 auto; }
.case-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; }
.case-search input::placeholder { color: rgba(255,255,255,.42); }

.cases-row {
  padding: 0 18px;
}

.home-case-group + .home-case-group {
  margin-top: 28px;
}

.home-case-group__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.home-case-group__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

.case-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  min-width: 0;
}

.home-case-group__cards .case-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: min(100%, 170px);
  justify-self: center;
}

.case-card__image-wrap {
  width: 100%;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  margin-bottom: 8px;
}

.case-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.18);
}

.case-card__name {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.case-card button {
  width: 58%;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 7px 8px;
  color: #fff;
  background: linear-gradient(90deg, #7e5dff 0%, #a65ef7 35%, #d47dff 100%);
  box-shadow: 0 8px 18px rgba(146, 88, 255, 0.35);
}

.case-card--blue .case-card__image-wrap { background: transparent; }
.case-card--green .case-card__image-wrap { background: transparent; }
.case-card--red .case-card__image-wrap { background: transparent; }
.case-card--pink .case-card__image-wrap { background: transparent; }
.case-card--rainbow .case-card__image-wrap { background: transparent; }

.case-detail {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
  background: rgba(5, 7, 10, 0.82);
}

body.case-modal-open .case-detail {
  display: block;
}

.case-detail__panel {
  width: 100%;
  max-width: 470px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(14, 18, 20, 0.98), rgba(11, 14, 17, 0.96));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
  padding: 72px 0 22px;
}

.topbar {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 70px;
  padding: 0 8px;
  border-radius: 0;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-right: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.case-detail__panel .topbar {
  z-index: 0;
}

.case-detail__scene {
  position: relative;
  z-index: 2;
  min-height: 246px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(28, 28, 28, 0.18), rgba(28, 28, 28, 0.18)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.04),
      rgba(255,255,255,0.04) 2px,
      rgba(255,255,255,0.01) 2px,
      rgba(255,255,255,0.01) 8px
    );
  overflow: hidden;
  padding-top: 12px;
  padding-bottom: 12px;
  isolation: isolate;
}

.case-roll {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: transparent;
}

.case-roll__reel {
  position: absolute;
  left: 0;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translate3d(0, -50%, 0);
  opacity: 1;
  filter: brightness(1) saturate(1) blur(0);
  transition: opacity 0.25s ease, filter 0.25s ease;
  will-change: transform;
}

.case-detail.case-opening .case-roll__circle,
.case-detail.case-opening .case-roll__line {
  opacity: 1;
  visibility: visible;
}

.case-detail.case-result .case-roll__circle,
.case-detail.case-result .case-roll__line {
  opacity: 0;
  visibility: hidden;
}

.case-roll__item {
  position: relative;
  width: 150px;
  height: 145px;
  flex: 0 0 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1);
  transition: opacity .08s linear, filter .08s linear, transform .15s ease;
  background: rgba(255,255,255,.025);
  border-bottom: 3px solid var(--rarity);
}

.case-roll__item img {
  width: 120px;
  height: 95px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
}

.case-roll__circle {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 50%;
  background: rgba(255,255,255,0);
  border: 1px solid rgba(255,255,255,0);
  box-shadow: 12px 0 18px rgba(0, 0, 0, 0.26), -12px 0 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.case-roll__line {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 150px;
  transform: translate(-50%, -50%) scaleY(0.84);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 6px rgba(255,255,255,0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.case-detail.case-opening .case-roll__circle,
.case-detail.case-opening .case-roll__line {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.case-detail.case-opening .case-roll__line {
  transform: translate(-50%, -50%) scaleY(1);
}

.case-detail__actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0 14px 12px;
}

.case-detail__drop-price {
  padding: 0 14px 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  text-align: center;
}

.case-detail__open,
.case-detail__sell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  height: 48px;
  border: none;
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
  padding: 0 16px;
  margin: 0;
}

.case-detail__open {
  flex: 1 1 auto;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  box-shadow: none;
}

.case-detail__sell {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-detail:not(.case-result) .case-detail__sell,
.case-detail.case-opening .case-detail__sell {
  display: none !important;
}

.case-detail.case-opening .case-detail__open,
.case-detail__open:disabled {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  cursor: default;
}

.case-roll__item.is-winner {
  transform: scale(1.08) !important;
  filter: brightness(1.08) saturate(1.08) blur(0) !important;
}

.blue { --rarity: #4b65ff; }
.gray { --rarity: #8b929c; }
.purple { --rarity: #9b45ff; }
.pink { --rarity: #e13bd0; }
.red { --rarity: #ff4050; }
.gold { --rarity: #ffb52e; }

.spinner__container,
.spinner__content-wrapper,
.spinner__content {
  position: relative;
  width: 100%;
}

.spinner__content-wrapper {
  display: block;
  width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

.spinner__content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 0 10px;
  transform: none;
  opacity: 1;
  visibility: visible;
}

.spinner__item {
  transform: none;
  opacity: 1;
  filter: none;
}

body.case-modal-open .spinner__content,
body.case-modal-open .spinner__item {
  animation: none;
}

.case-detail__items .item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 118px;
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px 10px;
  background: linear-gradient(180deg, rgba(76, 50, 88, 0.9), rgba(45, 30, 49, 0.9));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  opacity: 1;
}

.case-detail.case-opening .case-detail__icon,
.case-detail.case-result .case-detail__icon {
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none;
}

.case-detail:not(.case-opening):not(.case-result) .case-roll__item {
  opacity: 0.52;
  filter: brightness(0.52) saturate(0.58) blur(2.2px);
}

.case-detail.case-opening .case-roll__item,
.case-detail.case-result .case-roll__item {
  opacity: 1 !important;
  filter: brightness(1) saturate(1) blur(0px) !important;
  transform: scale(1) !important;
}

.case-detail.case-result .case-roll__item:not(.is-winner) {
  opacity: 0.55 !important;
  filter: brightness(0.55) saturate(0.7) blur(2.4px) !important;
}

.case-detail.case-result .case-roll__item.is-winner {
  opacity: 1 !important;
  transform: scale(1.08) !important;
  filter: brightness(1.08) saturate(1.08) blur(0px) !important;
}

@keyframes caseIconFadeOut {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -48%) scale(0.84); }
}

.case-detail__items .item:nth-child(1),
.case-detail__items .item:nth-child(3) {
  filter: brightness(0.82);
}

.case-detail__items .item__picture {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.case-detail__items .item__picture img {
  display: block;
  width: 66%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.26));
}

.case-detail__items .item__subtitle,
.case-detail__items .item__title,
.case-detail__items .item__price {
  position: static;
  z-index: 1;
  width: 100%;
  text-align: left;
}

.case-detail__items .item__subtitle {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255,255,255,0.42);
}

.case-detail__content-item .profile-screen__inventory-price {
  top: 0.7rem;
  right: 0.8rem;
  bottom: auto;
}

.case-detail__items .item__title {
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(255,255,255,0.96);
}

.case-detail__items .item__price {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  opacity: 0;
}

.case-detail__items .item__rarity {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 98%;
  height: 8px;
  margin: 0 auto;
  display: block;
  background: linear-gradient(90deg, rgba(130, 118, 251, 0.9), rgba(165, 139, 255, 0.9), rgba(122, 215, 255, 0.9));
  border-radius: 10px 10px 0 0;
  z-index: 3;
}

.case-detail__items .item__rarity_bottom {
  top: auto;
  bottom: 0;
  opacity: 0.2;
  transform: scaleY(-1);
  border-radius: 0 0 10px 10px;
}

.case-detail__crate {
  display: none;
}

.case-detail__open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 24px);
  min-height: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border: none;
  border-radius: 0;
  background: linear-gradient(90deg, #7e5dff 0%, #a65ef7 35%, #d47dff 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: none;
}

.case-detail.case-result .case-detail__open {
  width: calc(50% - 8px);
  margin: 0;
}

.case-detail__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 8px;
  padding: 0 10px;
  max-height: min(440px, max(180px, calc(100vh - 430px)));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.case-detail__item {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  background: linear-gradient(180deg, rgba(76, 50, 88, 0.9), rgba(45, 30, 49, 0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.case-detail__item-card {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.case-detail__item-card img {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto 4px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
}

.case-detail__empty {
  grid-column: 1 / -1;
  padding: 24px 12px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.case-detail__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.case-detail__meta span {
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}

.case-detail__meta small {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.72);
}

.page-shell {
  padding-top: 70px;
}

.page-shell > .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
}

html,
body,
.profile-screen,
.upgrade-screen,
.case-detail,
.case-detail__panel,
.site-footer,
.contract-screen {
  background: var(--site-background);
  background-size: 32px 32px;
}

@media (min-width: 761px) {
  .page-shell {
    width: 100%;
    max-width: none;
    padding-top: 70px;
  }

  .page-shell > .topbar {
    width: 100%;
    height: 70px;
    min-height: 70px;
    padding: 0;
    background: rgba(13, 17, 23, 0.96);
    border-bottom: 1px solid rgba(125, 216, 255, 0.2);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  }

  .page-shell > .topbar .brand__logo {
    width: 112px;
    height: 52px;
    max-width: none;
    max-height: 52px;
    left: -32px;
    transform: scale(1.35);
    transform-origin: left center;
  }

  .page-shell > .topbar .menu-toggle {
    width: 48px;
    height: 48px;
  }

  .live-section,
  .cases-section {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .live-section {
    margin-top: 0;
    padding: 0 clamp(28px, 4vw, 72px) 12px;
  }

  .live-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
  }

  .live-card {
    min-width: 0;
  }

  .cases-section {
    margin-top: 12px;
    padding: 24px clamp(28px, 4vw, 72px) 56px;
    scroll-margin-top: 92px;
  }

  .section-title {
    padding: 0 0 20px;
    margin-bottom: 4px;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .cases-row {
    padding: 0;
  }

  .home-case-group__cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
  }

  .home-case-group__cards .case-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }

  .case-card {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    transition: transform 0.2s ease;
  }

  .case-card:hover { transform: translateY(-5px); }

  .case-card__image-wrap {
    height: clamp(170px, 14vw, 240px);
    margin-bottom: 14px;
  }

  .case-card__name {
    min-height: 20px;
    margin-bottom: 12px;
    font-size: 0.92rem;
  }

  .case-card button {
    width: 78%;
    min-height: 38px;
    font-size: 0.8rem;
  }

  .case-detail {
    padding: 78px 0 0;
    overflow-y: auto;
    z-index: 350;
    background: #0b0f13;
  }

  .case-detail__panel {
    width: 100%;
    max-width: none;
    min-height: 100%;
    border: none;
    border-radius: 0;
    overflow: visible;
    padding: 0 0 24px;
    background: linear-gradient(180deg, rgba(14, 18, 20, 0.98), rgba(11, 14, 17, 0.98));
    box-shadow: none;
  }

  .case-detail__scene {
    min-height: 330px;
    padding: 16px 24px;
  }

  .case-roll {
    height: 300px;
  }

  .case-detail__actions {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 18px 24px 20px;
  }

  .case-detail__open {
    width: 100%;
    margin: 0;
  }

  .case-detail__items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    max-height: none;
    padding: 0 24px;
  }

  .case-detail__item {
    min-height: 150px;
  }

  .site-footer__inner {
    width: 100%;
    padding-left: clamp(28px, 4vw, 72px);
    padding-right: clamp(28px, 4vw, 72px);
  }

  .page-shell > .menu-overlay {
    display: none;
  }

  .page-shell > .side-menu {
    position: fixed;
    inset: 0;
    z-index: 501;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    height: 70px;
    min-height: 70px;
    padding: 0;
    background: transparent;
    border: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none;
    pointer-events: none;
  }

  .page-shell > .side-menu .menu-actions {
    width: auto;
    height: 70px;
    margin: 0;
    flex-shrink: 0;
    align-items: center;
    pointer-events: auto;
  }

  .page-shell > .side-menu .menu-auth-buttons {
    flex-wrap: nowrap;
    align-items: center;
  }

  .page-shell > .side-menu .menu-profile {
    width: auto;
    min-height: 70px;
    align-items: center;
  }

  .page-shell > .side-menu .menu-list {
    width: auto;
    flex: 1;
    flex-direction: row;
    justify-content: flex-end;
    gap: clamp(18px, 2.5vw, 44px);
    margin: 0;
    pointer-events: auto;
  }

  .page-shell > .side-menu .menu-list {
    pointer-events: none;
  }

  .page-shell > .side-menu .menu-list a {
    pointer-events: auto;
  }

  .page-shell > .topbar {
    z-index: 400;
  }

  .page-shell > .topbar .brand {
    position: relative;
    z-index: 2;
  }

  .page-shell > .side-menu .menu-list {
    padding-left: clamp(150px, 13vw, 230px);
  }

  .page-shell > .side-menu .menu-actions {
    order: 2;
  }

  .page-shell > .side-menu .menu-list {
    order: 1;
  }

  .page-shell > .side-menu .menu-list a {
    width: auto;
    padding: 22px 0 20px;
    border-bottom: 2px solid transparent;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    line-height: 1;
    white-space: nowrap;
  }

  .page-shell > .side-menu .menu-list a:hover {
    color: #d3a7ff;
    border-bottom-color: #d3a7ff;
  }

  /* Desktop: social icons are part of the top navigation, so reset the
     mobile menu spacing and keep all three buttons on one line. */
  .page-shell > .side-menu .menu-socials {
    order: 3;
    width: auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border-top: 0;
    pointer-events: auto;
  }

  .page-shell > .side-menu .menu-social {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 8px;
    flex: 0 0 32px;
  }

  .page-shell > .side-menu .menu-social svg {
    width: 17px;
    height: 17px;
    display: block;
  }

  .page-shell > .topbar .menu-toggle,
  .page-shell > .topbar .menu-close {
    display: none;
  }

  body.menu-open .page-shell > .topbar {
    height: 70px;
    min-height: 70px;
    padding: 0 clamp(28px, 4vw, 72px);
    border-color: rgba(125, 216, 255, 0.2);
    background: rgba(13, 17, 23, 0.96);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    pointer-events: auto;
  }

  body.menu-open .page-shell > .topbar .brand {
    display: flex;
  }

  body.menu-open .page-shell > .topbar .menu-close {
    display: none;
  }

  body.profile-screen-open .page-shell > .side-menu,
  body.upgrade-screen-open .page-shell > .side-menu,
  body.contract-screen-open .page-shell > .side-menu {
    z-index: 501;
  }

  .live-section {
    padding: 0;
  }

  .live-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
  }

  .live-card {
    width: auto;
    min-width: 0;
    flex: 0 0 8.3333%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .live-cards:has(> .live-card:nth-child(9)) {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .live-cards:has(> .live-card:nth-child(9)) .live-card {
    flex-basis: 8.3333%;
  }

  .live-card:last-child {
    border-right: none;
  }

  .card-image {
    height: clamp(80px, 6.5vw, 115px);
  }

  .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
  }

  .card-meta strong {
    color: #fff;
  }

  .profile-screen {
    padding-top: 104px;
    padding-bottom: 40px;
  }

  .profile-screen__shell {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    grid-template-areas:
      "header header"
      "balance balance"
      "row drop"
      "items items"
      "inventory inventory";
    gap: 18px;
    align-content: start;
  }

  .profile-screen__header { grid-area: header; min-height: 78px; padding: 16px 22px; }
  .profile-screen__bg-card { grid-area: balance; padding: 18px 22px 16px; }
  .profile-screen__row { grid-area: row; min-height: 72px; padding: 16px 22px; }
  .profile-screen__drop-card { grid-area: drop; min-height: 180px; padding: 18px 22px; }
  .profile-screen__items-header { grid-area: items; padding: 16px 22px; }
  .profile-screen__inventory {
    grid-area: inventory;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }

  .profile-screen__inventory-item {
    max-width: none;
  }

  .profile-screen__inventory-art {
    min-height: clamp(170px, 15vw, 240px);
  }

  .contract-screen {
    padding: 118px clamp(28px, 4vw, 72px) 48px;
  }

  .contract-panel {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 28px 0;
  }

  .contract-panel__top {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }

  .contract-panel__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contract-panel__items {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .upgrade-screen {
    padding: 90px clamp(28px, 4vw, 72px) 36px;
  }

  .upgrade-screen .upgrader {
    width: min(100%, 760px);
  }

  .upgrade-screen .upgrade-panel {
    width: 100%;
  }

  .upgrade-screen .upgrade-button {
    width: 100%;
  }

  .profile-screen {
    padding-left: 0;
    padding-right: 0;
  }

  .profile-screen__shell {
    width: 100%;
    max-width: none;
    padding: 0 clamp(28px, 4vw, 72px) 32px;
  }
}

/* v2 fixes/features */
.topup-modal { position:fixed; inset:0; z-index:360; display:none; align-items:center; justify-content:center; padding:16px; }
.topup-modal.is-open { display:flex; }
.topup-modal__backdrop { position:absolute; inset:0; background:rgba(4,6,10,.78); backdrop-filter:blur(6px); }
.topup-modal__dialog { position:relative; width:min(520px,100%); padding:28px; background:#111720; border:1px solid rgba(255,255,255,.12); box-shadow:0 24px 80px rgba(0,0,0,.45); }
.topup-modal__dialog h2 { margin:0 0 8px; }
.topup-modal__hint { color:rgba(255,255,255,.58); margin:0 0 20px; }
.topup-modal__close { position:absolute; right:12px; top:12px; background:transparent; border:0; color:#fff; font-size:20px; cursor:pointer; }
.topup-modal__amounts { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.topup-modal__amounts button,.topup-modal__promo button,.topup-modal__pay { min-height:44px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.05); color:#fff; cursor:pointer; font-weight:700; }
.topup-modal__field { display:grid; gap:7px; margin-bottom:12px; }
.topup-modal__field input,.topup-modal__promo input { min-height:44px; border:1px solid rgba(255,255,255,.12); background:#0b1017; color:#fff; padding:0 12px; outline:none; }
.topup-modal__promo { display:grid; grid-template-columns:1fr auto; gap:8px; }
.topup-modal__promo button { padding:0 16px; }
.topup-modal__status { min-height:22px; margin:8px 0; color:#d3a7ff; font-size:.9rem; }
.topup-modal__pay { width:100%; background:linear-gradient(90deg,#7d5dff,#b96cff); border:0; }
.auth-modal__steam { width:100%; min-height:46px; margin-top:10px; border:1px solid rgba(90,170,255,.5); background:linear-gradient(90deg,#1b4f8c,#2a75b9); color:#fff; font-weight:700; cursor:pointer; }
.menu-profile__avatar,.profile-screen__avatar { overflow:hidden; flex:0 0 52px; }
.menu-profile__avatar img,.profile-screen__avatar img { display:block; width:52px !important; height:52px !important; min-width:52px; min-height:52px; max-width:52px; max-height:52px; object-fit:cover !important; object-position:center; }
@media(max-width:560px){.topup-modal__amounts{grid-template-columns:repeat(2,1fr)}}

/* =========================================
   LONG DRAMATIC CASE / UPGRADE ANIMATION
   Stages build suspense without changing the predetermined result.
========================================= */
.case-detail.case-opening.case-drama-start .case-roll__item {
  animation: caseDramaStart 0.55s ease-out both;
}

.case-detail.case-opening.case-drama-mid .case-roll__item {
  transition-duration: .14s;
}

.case-detail.case-opening.case-drama-slow .case-roll__item {
  filter: brightness(1.04) saturate(1.08) blur(0) !important;
}

.case-detail.case-opening.case-drama-slow .case-roll__line {
  box-shadow: 0 0 16px rgba(255,255,255,.34), 0 0 42px rgba(181,115,255,.18);
  animation: caseMarkerPulse .72s ease-in-out infinite alternate;
}

.case-detail.case-opening.case-drama-reveal .case-roll__line {
  box-shadow: 0 0 22px rgba(255,255,255,.55), 0 0 70px rgba(181,115,255,.3);
}

.case-detail.case-result.case-drama-reveal .case-roll__item.is-winner {
  animation: caseWinnerReveal .8s cubic-bezier(.16,1,.3,1) both;
}

@keyframes caseDramaStart {
  from { transform: scale(.985); filter: brightness(.9) saturate(.9); }
  to { transform: scale(1); filter: brightness(1) saturate(1); }
}

@keyframes caseMarkerPulse {
  from { opacity: .65; transform: translate(-50%, -50%) scaleY(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scaleY(1.04); }
}

@keyframes caseWinnerReveal {
  0% { transform: scale(1.02); filter: brightness(1) saturate(1); }
  55% { transform: scale(1.16); filter: brightness(1.28) saturate(1.3); }
  100% { transform: scale(1.08); filter: brightness(1.08) saturate(1.08); }
}

.upgrader.upgrade-drama-start .drum {
  animation: upgradeDrumStart .7s ease-out both;
}

.upgrader.upgrade-drama-mid .ambient {
  animation: upgradeAmbientPulse 1.2s ease-in-out infinite alternate;
}

.upgrader.upgrade-drama-slow .arrow-orbit {
  filter: drop-shadow(0 0 12px rgba(211,167,255,.85));
}

.upgrader.upgrade-drama-slow .center {
  /* Keep the center badge anchored to the wheel while applying the pulse. */
  transform: translate(-50%, -50%) scale(1.035);
  transition: transform .35s ease;
}

.upgrader.upgrade-drama-reveal .drum {
  animation: upgradeReveal .7s cubic-bezier(.16,1,.3,1) both;
}

.upgrader.win.upgrade-drama-reveal .ambient {
  animation: upgradeWinPulse .8s ease-out both;
}

@keyframes upgradeDrumStart {
  from { transform: translate(-50%, -50%) scale(.965); filter: brightness(.9); }
  to { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes upgradeAmbientPulse {
  from { opacity: .7; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes upgradeReveal {
  0% { transform: translate(-50%, -50%) scale(1); }
  55% { transform: translate(-50%, -50%) scale(1.045); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes upgradeWinPulse {
  0% { opacity: .65; transform: translate(-50%, -50%) scale(1); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: .9; transform: translate(-50%, -50%) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .case-detail.case-opening .case-roll__item,
  .case-detail.case-opening .case-roll__line,
  .upgrader .drum,
  .upgrader .ambient {
    animation: none !important;
  }
}


.case-search-empty { padding: 20px; text-align:center; color:rgba(255,255,255,.5); }
.live-card--name-only .card-image.hidden { display:none; }
.live-card--name-only { min-height:58px; display:flex; align-items:center; }
.live-card--name-only .card-meta { padding:14px 12px; }
/* v19: keep the upgrade wheel geometrically fixed during start/reveal. */
.upgrader.upgrade-drama-start .drum,
.upgrader.upgrade-drama-reveal .drum {
  animation: none !important;
  transform: translate(-50%, -50%) !important;
}

/* Crypto / SBP top-up methods */
.topup-modal__methods{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 16px}
.topup-modal__method{min-height:58px;padding:10px 14px;text-align:left;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;cursor:pointer;display:flex;flex-direction:column;justify-content:center;gap:3px}
.topup-modal__method span{font-weight:800}
.topup-modal__method small{color:rgba(255,255,255,.5);font-size:.75rem}
.topup-modal__method.is-active{border-color:#9a72ff;background:rgba(125,93,255,.14);box-shadow:inset 0 0 0 1px rgba(185,108,255,.18)}
.topup-modal__method.is-disabled{opacity:.42;cursor:not-allowed}
.topup-modal__pay:disabled{opacity:.6;cursor:wait}


/* Manual SBP top-up admin modal */
.users-section-head {
  align-items: center;
  gap: 14px;
}
.users-section-head .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-modal.is-open {
  display: flex;
}
.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.admin-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid #3c3c3c;
  border-radius: 14px;
  background: #151515;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.admin-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.admin-modal__head h3 {
  margin: 0 0 6px;
}
.manual-sbp-preview {
  padding: 12px 14px;
  border: 1px solid #303030;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  line-height: 1.55;
}
.admin-form-status {
  min-height: 20px;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .users-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .users-section-head .inline-actions {
    justify-content: stretch;
  }
  .users-section-head .inline-actions .field {
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* Upgrade slot actions: each control belongs directly to its slot. */
.upgrade-screen .upgrade-panel__slot-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upgrade-screen .upgrade-panel__slot-column .upgrade-panel__slot {
  width: 100%;
}
.upgrade-screen .upgrade-panel__inventory-btn,
.upgrade-screen .upgrade-panel__desired-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(136,87,255,.45);
  background: rgba(112,76,214,.55);
  color: #fff;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .4px;
  cursor: pointer;
}
.upgrade-screen .upgrade-panel__inventory-btn:hover,
.upgrade-screen .upgrade-panel__desired-btn:hover {
  background: rgba(126,87,255,.72);
  border-color: rgba(179,132,255,.72);
}
.upgrade-screen .upgrade-panel__inventory-btn:disabled,
.upgrade-screen .upgrade-panel__desired-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Upgrade action must react immediately to a finger tap and never wait for
   browser double-tap/gesture interpretation. */
.upgrade-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.upgrade-button[aria-busy="true"] {
  pointer-events: none;
}


.steam-profile-lock-note {
  font-size: 13px;
  line-height: 1.45;
  opacity: .72;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}

.topup-sbp[hidden]{display:none}
.topup-sbp{margin:8px 0 12px}
.topup-sbp__lead{margin:0 0 8px;font-size:.9rem;color:#e9dcff}
.topup-sbp__code{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.topup-sbp__code code{flex:1;padding:10px 12px;background:rgba(255,255,255,.07);border:1px dashed #b96cff;color:#fff;font-size:1.2rem;font-weight:800;letter-spacing:.12em;text-align:center}
.topup-sbp__code button{min-height:44px;padding:0 14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#fff;cursor:pointer;font-weight:700}
.topup-sbp__frame{width:100%;height:380px;border:0;background:#fff}
.topup-sbp__note{margin:8px 0 0;font-size:.85rem;color:#d3a7ff}

/* модалка пополнения: прокрутка на телефонах */
.topup-modal { align-items:flex-start; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.topup-modal__dialog { margin:auto; max-height:none; }
.topup-sbp__frame { height:560px; }
@media (max-width:600px){ .topup-modal__dialog{padding:18px 14px} .topup-sbp__frame{height:760px} }

.topup-sbp__open{display:block;width:100%;box-sizing:border-box;min-height:48px;line-height:48px;text-align:center;text-decoration:none;color:#fff;font-weight:800;background:linear-gradient(90deg,#7d5dff,#b96cff)}
.topup-sbp__open:not([href]){opacity:.5;pointer-events:none}
.topup-sbp__frame{display:none}

#topupAmounts[hidden],#topupAmountField[hidden],#topupSkinsHint[hidden]{display:none!important}
.topup-modal__hint{margin:8px 0;font-size:.9rem;color:#e9dcff}

/* несколько кейсов + быстрое открытие */
.case-multi{display:flex;flex-direction:column;align-items:center;gap:8px;margin-bottom:10px;width:100%}
.case-multi__counts{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.case-multi__btn{min-width:38px;height:38px;padding:0 8px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;font-weight:800;cursor:pointer;border-radius:8px}
.case-multi__btn.is-active{background:linear-gradient(90deg,#7d5dff,#b96cff);border-color:transparent}
.case-multi__fast{display:flex;align-items:center;gap:8px;color:#e9dcff;font-size:.9rem;cursor:pointer;user-select:none}
.case-multi__fast input{width:18px;height:18px;accent-color:#b96cff}
.case-multi__total{min-height:18px;color:#d3a7ff;font-size:.9rem}
.case-batch[hidden]{display:none}
.case-batch{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(5,6,12,.82);overflow-y:auto}
.case-batch__panel{width:min(960px,100%);max-height:100%;overflow-y:auto;padding:20px;background:#111720;border:1px solid rgba(255,255,255,.12);box-shadow:0 24px 80px rgba(0,0,0,.5);border-radius:12px}
.case-batch__title{margin:0 0 6px;color:#fff;text-align:center}
.case-batch__note{min-height:18px;margin-bottom:8px;color:#ffb4a8;text-align:center;font-size:.9rem}
.case-batch__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-bottom:14px}
.case-batch__item{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 8px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:10px;text-align:center}
.case-batch__item img{width:100%;max-width:110px;height:80px;object-fit:contain}
.case-batch__name{color:#fff;font-size:.8rem;line-height:1.2;word-break:break-word}
.case-batch__price{color:#d3a7ff;font-weight:800;font-size:.9rem}
.case-batch__actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.case-batch__sell,.case-batch__keep{flex:1 1 200px;min-height:46px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;font-weight:800;cursor:pointer;border-radius:8px}
.case-batch__sell{background:linear-gradient(90deg,#7d5dff,#b96cff);border:0}
.case-batch__sell:disabled,.case-batch__keep:disabled{opacity:.6;cursor:wait}

/* рулетки для нескольких кейсов */
.mroll[hidden]{display:none}
.mroll{position:fixed;inset:0;z-index:99990;display:flex;align-items:flex-start;justify-content:center;padding:12px;background:rgba(5,6,12,.92);overflow-y:auto}
.mroll__panel{width:min(1100px,100%);margin:auto}
.mroll__title{margin-bottom:10px;color:#fff;font-weight:800;text-align:center}
.mroll__rows{display:flex;flex-direction:column;gap:8px}
.mroll__row{position:relative;height:calc(var(--iw) + 14px);overflow:hidden;background:#0d1219;border:1px solid rgba(255,255,255,.1);border-radius:10px}
.mroll__track{position:absolute;left:0;top:7px;display:flex;gap:var(--gap);will-change:transform}
.mroll__item{display:flex;flex:0 0 var(--iw);align-items:center;justify-content:center;width:var(--iw);height:var(--iw);background:rgba(255,255,255,.04);border-bottom:3px solid var(--c);border-radius:8px;transition:transform .3s,box-shadow .3s}
.mroll__item img{max-width:88%;max-height:88%;object-fit:contain;pointer-events:none}
.mroll__item.is-winner{background:rgba(255,255,255,.14);box-shadow:0 0 18px var(--c);transform:scale(1.06)}
.mroll__marker{position:absolute;top:0;bottom:0;left:50%;width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 8px #b96cff;pointer-events:none}

/* исправления: блок выбора количества теперь отдельно от flex-ряда кнопок */
.case-multi{width:min(720px,100%);margin:0 auto;padding:0 14px 10px;box-sizing:border-box}
.mroll__head{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:10px}
.mroll__head .mroll__title{margin:0}
.mroll__skip{position:absolute;right:0;top:50%;transform:translateY(-50%);padding:8px 12px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;font-weight:700;cursor:pointer;border-radius:8px}



/* апгрейд: кнопка не должна «убегать» из-под пальца/курсора при наведении и нажатии */
.upgrade-screen .upgrade-button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.upgrade-screen .upgrade-button:hover,.upgrade-screen .upgrade-button:active{transform:none}
.upgrade-screen .upgrade-button:active{filter:brightness(.92)}

.upgrade-toast{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:100000;max-width:min(92vw,520px);padding:12px 16px;border-radius:12px;background:#1a1226;border:1px solid #b96cff;color:#fff;font-weight:700;text-align:center;box-shadow:0 14px 40px rgba(0,0,0,.55);transform:translate(-50%,24px);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.upgrade-toast.is-visible{opacity:1;transform:translate(-50%,0)}

/* ===== История предметов: фильтры, источник и статус ===== */
.inv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.9rem;
}
.inv-filters[hidden] { display: none; }
.inv-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(170, 122, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.inv-filter:hover { border-color: rgba(170, 122, 255, 0.75); color: #fff; }
.inv-filter.is-active {
  border-color: rgba(170, 122, 255, 0.9);
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 55%, #f28fff 100%);
  color: #fff;
}
.inv-filter__count {
  min-width: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.7rem;
  line-height: 1.35rem;
  text-align: center;
}

/* Значок «как получен» в левом верхнем углу карточки */
.inv-source {
  position: absolute;
  left: 0.6rem;
  top: 0.55rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  background: rgba(10, 8, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
}
.inv-source--case { border-color: rgba(255, 170, 70, 0.55); }
.inv-source--upgrade { border-color: rgba(120, 220, 140, 0.55); }
.inv-source--contract { border-color: rgba(120, 190, 255, 0.55); }
.inv-source--unknown { border-color: rgba(255, 255, 255, 0.14); opacity: 0.8; }

/* Подпись под карточкой: источник, что стало с предметом, дата */
.profile-screen__inventory-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.4rem 0.15rem 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.6);
  overflow-wrap: anywhere;
}
.inv-meta__source { color: #d9c8ff; font-weight: 700; }
.inv-meta__detail { color: rgba(255, 255, 255, 0.82); }
.inv-meta__date { font-size: 0.66rem; color: rgba(255, 255, 255, 0.42); }

/* Предметы, которых уже нет в инвентаре */
.profile-screen__inventory-item.is-past { cursor: default; }
.profile-screen__inventory-item.is-past .profile-screen__inventory-art {
  background: rgba(255, 255, 255, 0.012);
}
.profile-screen__inventory-item.is-past .profile-screen__inventory-art img {
  filter: grayscale(0.9) brightness(0.55) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
}
.inv-past-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 0.18rem 0.7rem;
  border: 2px solid currentColor;
  border-radius: 0.35rem;
  background: rgba(10, 8, 18, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.inv-past-badge--sold { color: #ffd166; }
.inv-past-badge--upgraded { color: #7ee08f; }
.inv-past-badge--contracted { color: #7fc4ff; }
.inv-past-badge--withdrawn { color: #d4c2ff; }
/* Исход апгрейда: зелёный - удался, красный - не удался */
.inv-past-badge--upgraded-win { color: #4be36b; }
.inv-past-badge--upgraded-loss { color: #ff5a5a; }
/* Исход контракта: другая пара цветов, чтобы не путать с апгрейдом - синий / малиновый */
.inv-past-badge--contracted-win { color: #4aa8ff; }
.inv-past-badge--contracted-loss { color: #ff5fc8; }

.inv-more {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 2.6rem;
  padding: 0.4rem 1.6rem;
  border: 1px solid rgba(170, 122, 255, 0.55);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.inv-more:hover { background: rgba(170, 122, 255, 0.18); }

/* Результат контракта в строке статуса (те же цвета, что у плашек в инвентаре) */
.contract-panel__status[data-result="win"] { color: #4aa8ff; }
.contract-panel__status[data-result="loss"] { color: #ff5fc8; }

/* ===== Живая лента: значок способа получения, обрезка длинных названий ===== */
.live-section[hidden] { display: none; }
.live-card { position: relative; }
.live-source { position: absolute; left: 6px; top: 6px; z-index: 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(10, 8, 18, 0.65); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 12px; line-height: 1; user-select: none; }
.live-source--case { border-color: rgba(255, 170, 70, 0.6); }
.live-source--upgrade { border-color: rgba(120, 220, 140, 0.6); }
.live-source--contract { border-color: rgba(120, 190, 255, 0.6); }
.live-card .card-meta { min-width: 0; }
.live-card .card-meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card .card-meta span { flex: 0 0 auto; white-space: nowrap; }

/* ===== Инвентарь: панель поиска/сортировки, выбор нескольких, статус вывода ===== */
.inv-toolbar, .inv-selectbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; width: 100%; margin: 0 0 0.8rem; }
.inv-toolbar[hidden], .inv-selectbar[hidden] { display: none; }
.inv-search, .inv-select { min-height: 2.2rem; padding: 0.3rem 0.7rem; border: 1px solid rgba(170, 122, 255, 0.35); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.05); color: #fff; font: inherit; font-size: 0.82rem; }
.inv-search { flex: 1 1 180px; min-width: 140px; }
.inv-select { flex: 0 1 auto; }
.inv-select option { color: #111; }
.inv-search:focus, .inv-select:focus { outline: none; border-color: rgba(170, 122, 255, 0.9); }
.inv-btn { min-height: 2.2rem; padding: 0.3rem 0.9rem; border: 1px solid rgba(170, 122, 255, 0.5); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.05); color: #fff; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.inv-btn:hover:not(:disabled) { background: rgba(170, 122, 255, 0.2); }
.inv-btn.is-active { background: linear-gradient(90deg, #7d5dff 0%, #b96cff 55%, #f28fff 100%); border-color: transparent; }
.inv-btn:disabled { opacity: 0.45; cursor: default; }
.inv-btn--danger { border-color: rgba(255, 90, 90, 0.6); }
.inv-selectbar { padding: 0.5rem 0.7rem; border: 1px solid rgba(170, 122, 255, 0.3); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.04); }
.inv-selectbar span { flex: 1 1 200px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); }

/* режим выбора: кнопки продать/вывести скрыты, карточка кликается целиком */
.inv-select-mode .profile-screen__inventory-actions { display: none !important; }
.inv-select-mode .profile-screen__inventory-item.is-selectable { cursor: pointer; }
.inv-select-mode .profile-screen__inventory-item:not(.is-selectable) { opacity: 0.45; }
.inv-check { position: absolute; right: 8px; top: 8px; z-index: 6; display: none; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #7d5dff; color: #fff; font-size: 13px; font-weight: 800; }
.inv-select-mode .profile-screen__inventory-item.is-selected .inv-check { display: grid; }
.inv-select-mode .profile-screen__inventory-item.is-selected .profile-screen__inventory-art { outline: 2px solid #b96cff; outline-offset: -2px; }

/* статус вывода под карточкой */
.inv-withdraw { margin-top: 0.4rem; padding: 0.45rem 0.55rem; border: 1px solid rgba(170, 122, 255, 0.35); border-radius: 0.4rem; background: rgba(125, 93, 255, 0.1); font-size: 0.72rem; line-height: 1.35; }
.inv-withdraw--failed { border-color: rgba(255, 90, 90, 0.55); background: rgba(255, 90, 90, 0.1); }
.inv-withdraw__title { font-weight: 800; color: #fff; }
.inv-withdraw__time { font-weight: 400; color: rgba(255, 255, 255, 0.55); }
.inv-withdraw__text { margin-top: 2px; color: rgba(255, 255, 255, 0.85); }
.inv-withdraw__support { margin-top: 4px; color: rgba(255, 255, 255, 0.62); }
.inv-withdraw a { color: #d9c8ff; text-decoration: underline; }

/* последние попытки апгрейда/контракта */
.recent-attempts { width: 100%; max-width: 640px; margin: 14px auto 0; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.03); font-size: 0.78rem; text-align: left; }
.recent-attempts[hidden] { display: none; }
.recent-attempts__title { margin-bottom: 6px; font-weight: 800; color: rgba(255, 255, 255, 0.8); }
.recent-attempts ul { list-style: none; margin: 0; padding: 0; }
.recent-attempts li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.recent-attempts li:first-child { border-top: none; }
.ra-chip { flex: 0 0 auto; padding: 1px 8px; border: 1px solid currentColor; border-radius: 4px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.ra-chip--upgrade-win { color: #4be36b; }
.ra-chip--upgrade-loss { color: #ff5a5a; }
.ra-chip--contract-win { color: #4aa8ff; }
.ra-chip--contract-loss { color: #ff5fc8; }
.ra-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.85); }
.ra-time { flex: 0 0 auto; color: rgba(255, 255, 255, 0.45); font-size: 0.68rem; }

/* ===== SEO: служебный H1 и блок «О проекте» ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.seo-about { width: 100%; max-width: 1180px; margin: 0 auto 26px; padding: 0 clamp(28px, 4vw, 72px); color: rgba(255, 255, 255, 0.62); font-size: 0.85rem; line-height: 1.6; }
.seo-about h2 { margin: 0 0 8px; color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; font-weight: 800; }
.seo-about p { margin: 0 0 10px; }
.seo-about details { margin: 6px 0; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.025); }
.seo-about summary { cursor: pointer; color: rgba(255, 255, 255, 0.85); font-weight: 700; }
.seo-about details[open] summary { margin-bottom: 6px; }
.seo-about details p { margin: 0; }
.seo-about a { color: #d9c8ff; text-decoration: underline; }

/* ==========================================================================
   Mobile fixes (2026-11-23)
   1) upgrade / profile / case screens must not scroll sideways
   2) upgrade wheel scales to the screen width instead of fixed 390px
   3) profile stat tooltips stay inside their column
   4) case screen scrolls as one page on phones (not only the item list)
   ========================================================================== */

/* 1. no horizontal drift on full-screen overlays (phones only) */
@media (max-width: 760px) {
  .upgrade-screen,
  .profile-screen,
  .case-detail {
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }
}

/* 2. wheel sized from one variable; proportions match the old 390px layout */
@media (max-width: 680px) {
  .upgrade-screen {
    --wheel: min(390px, calc(100vw - 24px));
    padding-left: 12px;
    padding-right: 12px;
  }
  .upgrade-screen .upgrader,
  .upgrade-screen .wheel-area,
  .upgrade-screen .arrow-orbit {
    width: var(--wheel);
  }
  .upgrade-screen .wheel-area,
  .upgrade-screen .arrow-orbit {
    height: var(--wheel);
  }
  .upgrade-screen .drum {
    width: calc(var(--wheel) * 0.8205);
    height: calc(var(--wheel) * 0.8205);
  }
  .upgrade-screen .center {
    width: calc(var(--wheel) * 0.3718);
    height: calc(var(--wheel) * 0.3718);
  }
  .upgrade-screen .chance {
    font-size: calc(var(--wheel) * 0.0846);
  }
}

/* 3. stat tooltips: first/last of the 3-item row anchor to the screen-side edge (phones only) */
@media (max-width: 760px) {
  .profile-screen__stat-item:first-child .profile-screen__stat-tooltip {
    left: 0;
    transform: none;
  }
  .profile-screen__stat-item:last-child .profile-screen__stat-tooltip {
    left: auto;
    right: 0;
    transform: none;
  }
}

/* 4. case screen: whole screen scrolls, item list is part of the page */
@media (max-width: 760px) {
  .case-detail {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .case-detail__panel {
    min-height: 100%;
  }
  .case-detail__items {
    max-height: none;
    overflow: visible;
  }
}

/* ==========================================================================
   Feature styles (2026-11-23)
   1) "not enough balance" hint on the case screen
   2) upgrade: quick-pick settings button + settings dialog
   ========================================================================== */

/* ---- 1. Not enough balance (case screen) ---- */
.case-lowbalance[hidden] { display: none; }
.case-lowbalance {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 28px);
  margin: 0 auto 12px;
  padding: 12px 14px;
  box-sizing: border-box;
  background: rgba(125, 93, 255, 0.1);
  border: 1px solid rgba(185, 108, 255, 0.38);
}
.case-lowbalance__text {
  flex: 1 1 auto;
  color: #e9dcff;
  font-size: 0.95rem;
  line-height: 1.4;
}
.case-lowbalance__text strong { color: #fff; font-weight: 800; white-space: nowrap; }
.case-lowbalance__btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: none;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 55%, #f28fff 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.case-lowbalance.is-attn { animation: caseLowShake 0.45s ease; }
@keyframes caseLowShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.case-detail__open.is-insufficient { opacity: 0.5; }
@media (min-width: 761px) {
  .case-lowbalance { width: min(672px, calc(100% - 48px)); }
}
@media (max-width: 560px) {
  .case-lowbalance { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
}

/* ---- 2. Upgrade quick-pick settings ---- */
.upgrade-screen .upgrade-panel__multipliers { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 680px) {
  .upgrade-screen .upgrade-panel__multipliers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.upgrade-screen .upgrade-quick-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(136, 87, 255, 0.45);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #c9b6ff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.upgrade-screen .upgrade-quick-settings-btn svg { transition: transform 0.25s ease; }
.upgrade-screen .upgrade-quick-settings-btn:hover { color: #fff; border-color: rgba(183, 152, 255, 0.9); background: rgba(130, 91, 255, 0.25); }
.upgrade-screen .upgrade-quick-settings-btn:hover svg { transform: rotate(60deg); }

.upgrade-quick {
  position: fixed;
  inset: 0;
  z-index: 380;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.upgrade-quick.is-open { display: flex; }
.upgrade-quick__backdrop { position: fixed; inset: 0; background: rgba(4, 6, 10, 0.78); backdrop-filter: blur(6px); }
.upgrade-quick__dialog {
  position: relative;
  width: min(520px, 100%);
  margin: auto;
  padding: 22px;
  box-sizing: border-box;
  background: #111720;
  border: 1px solid rgba(136, 87, 255, 0.38);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  color: #fff;
}
.upgrade-quick__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upgrade-quick__head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.upgrade-quick__close { border: none; background: transparent; color: rgba(255, 255, 255, 0.7); font-size: 1.3rem; cursor: pointer; padding: 6px 8px; }
.upgrade-quick__close:hover { color: #fff; }
.upgrade-quick__section { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.upgrade-quick__section h4 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.upgrade-quick__link { border: none; background: transparent; color: #b96cff; font-weight: 700; cursor: pointer; padding: 4px 0; }
.upgrade-quick__link:hover { color: #d9a8ff; }
.upgrade-quick__card { margin-top: 12px; padding: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.upgrade-quick__card p { margin: 0 0 12px; color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; line-height: 1.4; }
.upgrade-quick__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upgrade-quick__inputs { display: flex; gap: 10px; flex: 1 1 auto; min-width: 0; }
.upgrade-quick__field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: 0 8px;
  box-sizing: border-box;
  background: #0b0f15;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.upgrade-quick__field:focus-within { border-color: #b96cff; box-shadow: 0 0 0 2px rgba(185, 108, 255, 0.25); }
.upgrade-quick__field:has(.is-invalid) { border-color: #ff5a6e; }
.upgrade-quick__field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}
.upgrade-quick__field input.is-invalid { color: #ff8a98; }
.upgrade-quick__affix { color: rgba(255, 255, 255, 0.55); font-size: 1.05rem; font-weight: 700; }
.upgrade-quick__reset {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(185, 108, 255, 0.35);
  background: transparent;
  color: #b96cff;
  cursor: pointer;
}
.upgrade-quick__reset:hover { background: rgba(185, 108, 255, 0.15); color: #fff; }
.upgrade-quick__status { min-height: 20px; margin-top: 12px; color: #ff8a98; font-size: 0.9rem; }
.upgrade-quick__note { margin: 4px 0 14px; color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; }
.upgrade-quick__save {
  width: 100%;
  min-height: 48px;
  border: none;
  background: linear-gradient(90deg, #7d5dff 0%, #b96cff 50%, #f28fff 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
}
@media (max-width: 480px) {
  .upgrade-quick__dialog { padding: 16px 14px; }
  .upgrade-quick__inputs { gap: 8px; }
}

/* ==========================================================================
   Case opening animation (2026-11-23)
   charge (icon shakes, glow + rays grow)  ->  burst (flash + ring)  ->  reel
   ========================================================================== */
.case-intro-fx { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.case-intro-fx > i {
  position: absolute;
  left: var(--cx, 50%);
  top: var(--cy, 58%);
  width: var(--fx, 420px);
  height: var(--fx, 420px);
  margin: calc(var(--fx, 420px) / -2) 0 0 calc(var(--fx, 420px) / -2);
  border-radius: 50%;
  opacity: 0;
}
.case-intro-fx__glow {
  z-index: 1;
  background: radial-gradient(circle, rgba(185, 108, 255, 0.6) 0%, rgba(125, 93, 255, 0.28) 38%, transparent 68%);
}
.case-intro-fx__rays {
  z-index: 1;
  background: repeating-conic-gradient(from 0deg, rgba(214, 168, 255, 0.55) 0deg 5deg, transparent 5deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 66%);
  mask-image: radial-gradient(circle, #000 0%, transparent 66%);
}
.case-intro-fx__ring {
  z-index: 3;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 30px rgba(185, 108, 255, 0.85), inset 0 0 30px rgba(185, 108, 255, 0.55);
}
.case-intro-fx__flash {
  z-index: 3;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.85) 18%, rgba(185, 108, 255, 0.45) 42%, transparent 66%);
}

/* charge */
.case-detail.is-charging .case-detail__icon {
  will-change: transform, filter;
  animation: caseIconCharge 0.85s cubic-bezier(0.4, 0, 0.9, 1) forwards, caseIconHold 0.45s ease-in-out 0.85s infinite alternate;
}
.case-detail.is-charging .case-intro-fx__glow { animation: caseFxGlowIn 0.85s ease-in forwards; }
.case-detail.is-charging .case-intro-fx__rays { animation: caseFxRaysIn 0.85s ease-in forwards, caseFxSpin 7s linear infinite; }

/* burst */
.case-detail.is-bursting .case-detail__icon { animation: caseIconBurst 0.38s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
.case-detail.is-bursting .case-intro-fx__glow { animation: caseFxGlowBurst 0.7s ease-out forwards; }
.case-detail.is-bursting .case-intro-fx__rays { animation: caseFxRaysBurst 0.7s ease-out forwards, caseFxSpin 2.4s linear infinite; }
.case-detail.is-bursting .case-intro-fx__ring { animation: caseFxRing 0.65s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
.case-detail.is-bursting .case-intro-fx__flash { animation: caseFxFlash 0.55s ease-out forwards; }

@keyframes caseIconCharge {
  0%   { transform: translate(-50%, -50%) scale(1) rotate(0deg); filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4)) brightness(1); }
  14%  { transform: translate(calc(-50% - 2px), -50%) scale(1.02) rotate(-1.4deg); }
  28%  { transform: translate(calc(-50% + 3px), calc(-50% - 1px)) scale(1.035) rotate(1.8deg); }
  42%  { transform: translate(calc(-50% - 4px), -50%) scale(1.05) rotate(-2.5deg); }
  56%  { transform: translate(calc(-50% + 5px), calc(-50% + 1px)) scale(1.065) rotate(3deg); }
  70%  { transform: translate(calc(-50% - 6px), -50%) scale(1.085) rotate(-3.4deg); }
  84%  { transform: translate(calc(-50% + 6px), calc(-50% - 1px)) scale(1.1) rotate(3.6deg); }
  100% { transform: translate(-50%, -50%) scale(1.12) rotate(0deg); filter: drop-shadow(0 0 26px rgba(185, 108, 255, 0.95)) brightness(1.35); }
}
@keyframes caseIconHold {
  from { transform: translate(-50%, -50%) scale(1.12); filter: drop-shadow(0 0 26px rgba(185, 108, 255, 0.95)) brightness(1.35); }
  to   { transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 0 38px rgba(222, 160, 255, 1)) brightness(1.55); }
}
@keyframes caseIconBurst {
  0%   { transform: translate(-50%, -50%) scale(1.12); opacity: 1; filter: drop-shadow(0 0 30px rgba(222, 160, 255, 1)) brightness(1.6); }
  35%  { transform: translate(-50%, -50%) scale(1.3); opacity: 1; filter: drop-shadow(0 0 50px #fff) brightness(2.4); }
  100% { transform: translate(-50%, -50%) scale(1.75); opacity: 0; filter: drop-shadow(0 0 60px #fff) brightness(3); }
}
@keyframes caseFxGlowIn    { from { opacity: 0; scale: 0.45; } to { opacity: 0.95; scale: 1; } }
@keyframes caseFxRaysIn    { from { opacity: 0; scale: 0.5; } to { opacity: 0.85; scale: 1; } }
@keyframes caseFxSpin      { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes caseFxGlowBurst { from { opacity: 0.95; scale: 1; } to { opacity: 0; scale: 1.7; } }
@keyframes caseFxRaysBurst { from { opacity: 0.85; scale: 1; } 25% { opacity: 1; scale: 1.2; } to { opacity: 0; scale: 1.7; } }
@keyframes caseFxRing      { from { opacity: 1; scale: 0.25; } to { opacity: 0; scale: 1.15; } }
@keyframes caseFxFlash     { from { opacity: 0; scale: 0.35; } 22% { opacity: 1; scale: 0.7; } to { opacity: 0; scale: 1.25; } }

@media (prefers-reduced-motion: reduce) {
  .case-detail.is-charging .case-detail__icon,
  .case-detail.is-bursting .case-detail__icon,
  .case-detail.is-charging .case-intro-fx > i,
  .case-detail.is-bursting .case-intro-fx > i { animation: none !important; }
}

/* ==========================================================================
   Top-up by SBP (NicePay): requisites screen inside the top-up dialog
   ========================================================================== */
.topup-modal__dialog.is-sbp > :not(.topup-sbp):not(.topup-modal__close):not(h2) { display: none !important; }
.topup-sbp[hidden], .topup-sbp [hidden] { display: none !important; }
.topup-sbp { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.topup-sbp__title { margin: 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.topup-sbp__lead { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; line-height: 1.45; }
.topup-sbp__lead:empty { display: none; }
.topup-sbp__amount { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 14px; background: rgba(125, 93, 255, 0.12); border: 1px solid rgba(185, 108, 255, 0.4); }
.topup-sbp__amount span { flex: 1 0 100%; font-size: 0.78rem; color: rgba(255, 255, 255, 0.65); text-transform: uppercase; letter-spacing: 0.05em; }
.topup-sbp__amount strong { flex: 1 1 auto; font-size: 1.6rem; font-weight: 800; color: #fff; }
.topup-sbp__rows { display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, 0.1); }
.topup-sbp__row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.topup-sbp__row:first-child { border-top: 0; }
.topup-sbp__row[hidden] { display: none; }
.topup-sbp__label { flex: 0 0 82px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
#topupSbpWallet { white-space: nowrap; }
.topup-sbp__value { flex: 1 1 auto; min-width: 0; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.topup-sbp__copy { flex: 0 0 auto; padding: 6px 10px; border: 1px solid rgba(185, 108, 255, 0.5); background: transparent; color: #d9b8ff; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.topup-sbp__copy:hover { background: rgba(185, 108, 255, 0.18); color: #fff; }
.topup-sbp__timer { font-size: 0.95rem; font-weight: 700; color: #ffd479; }
.topup-sbp__timer:empty { display: none; }
.topup-sbp__timer.is-over { color: #ff9aab; }
.topup-sbp__status { min-height: 20px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); line-height: 1.45; }
.topup-sbp__status.is-error { color: #ff9aab; }
.topup-sbp__status.is-ok { color: #6fe0a8; }
.topup-sbp__link { display: block; padding: 11px 14px; text-align: center; border: 1px solid rgba(185, 108, 255, 0.55); color: #fff; font-weight: 700; text-decoration: none; }
.topup-sbp__link:hover { background: rgba(185, 108, 255, 0.18); }
.topup-sbp__actions { display: flex; flex-direction: column; gap: 8px; }
.topup-sbp__actions .topup-modal__pay[hidden], .topup-sbp__secondary[hidden] { display: none; }
.topup-sbp__secondary { padding: 11px 14px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: rgba(255, 255, 255, 0.8); font-weight: 700; cursor: pointer; }
.topup-sbp__secondary:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.topup-sbp__resume { display: block; width: 100%; margin: 0 0 12px; padding: 11px 14px; text-align: left; border: 1px solid rgba(255, 212, 121, 0.55); background: rgba(255, 212, 121, 0.08); color: #ffd479; font-weight: 700; cursor: pointer; }
.topup-sbp__resume[hidden] { display: none; }
@media (max-width: 480px) { .topup-sbp__label { flex-basis: 66px; } .topup-sbp__copy { padding: 6px 8px; } .topup-sbp__amount strong { font-size: 1.4rem; } }


/* Кейс закрыт по отдаче (RTP выше максимума): серая карточка в меню (остаётся кликабельной), на странице кейса серый кейс и надпись вместо кнопок */
.case-card--locked .case-card__image-wrap,
.case-card--locked .case-card__name { filter: grayscale(1); opacity: 0.5; }
.case-card--locked button {
  filter: grayscale(1);
  opacity: 0.55;
  box-shadow: none;
}
.case-card--locked:hover { transform: none; }
.case-detail__unavailable {
  display: none;
  width: calc(100% - 28px);
  margin: 0 auto 12px;
  padding: 14px;
  box-sizing: border-box;
  text-align: center;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.case-detail--unavailable .case-detail__unavailable { display: block; }
.case-detail--unavailable .case-multi,
.case-detail--unavailable .case-detail__actions,
.case-detail--unavailable .case-lowbalance { display: none !important; }
.case-detail--unavailable .case-detail__icon { filter: grayscale(1); opacity: 0.5; }
