.profile-screen {
  position: relative;
  z-index: 1;
  width: 100%;
}

.profile-hero {
  width: 100%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff12;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.profile-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff22;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.profile-hero__info {
  flex: 1;
  min-width: 0;
}

.profile-hero__name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-hero__nick {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff80;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-promo-open {
  appearance: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex-shrink: 0;
  width: 100px;
  height: 36px;
  padding: 0 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #ffffffe6;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  white-space: normal;
  text-align: center;
}

.profile-promo-open::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 46%);
}

.profile-promo-open:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.promo-captcha {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #141414;
  cursor: pointer;
  overflow: hidden;
}

.promo-captcha img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: contain;
}

.profile-promo__row {
  display: flex;
  gap: 8px;
}

.profile-promo__row + .profile-promo__row {
  margin-top: 8px;
}

.profile-promo__input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #00000033;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 12px;
  outline: none;
}

.profile-promo__input::placeholder {
  color: #ffffff4d;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.profile-promo__input:focus {
  border-color: rgba(115, 255, 157, 0.45);
}

.profile-promo__btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: #0c0d0e;
  background: #73ff9d;
  flex-shrink: 0;
}

.profile-promo__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.profile-promo__btn:active:not(:disabled) {
  opacity: 0.85;
  transform: scale(0.98);
}

.profile-invite {
  --ru: calc(100cqw / 368);
  position: relative;
  width: 100%;
  aspect-ratio: 368 / 307;
  margin: 0 auto 16px;
  border-radius: 10.03% / 12.023%;
  overflow: hidden;
  clip-path: inset(0 round 10.03% / 12.023%);
  isolation: isolate;
  will-change: transform;
  container-type: inline-size;
  background: #0b0b0b;
  font-family: var(--font-sf);
  color: #fff;
}

.profile-invite::before,
.profile-invite::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  pointer-events: none;
}

.profile-invite::before {
  box-shadow:
    inset 1.086px 1.086px 0 -0.543px #333,
    inset -1.086px -1.086px 0 -0.543px #262626;
  mix-blend-mode: plus-lighter;
}

.profile-invite::after {
  box-shadow:
    inset 0 0 3.257px 0 rgba(255, 255, 255, 0.5),
    inset -1.086px -1.086px 0.543px -1.086px #fff,
    inset 1.086px 1.086px 0.543px -1.086px #fff;
  mix-blend-mode: overlay;
}

.profile-invite__art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profile-invite__layer,
.profile-invite__glow {
  position: absolute;
  left: calc(var(--x) * var(--ru));
  top: calc(var(--y) * var(--ru));
  width: calc(var(--w) * var(--ru));
  height: calc(var(--h) * var(--ru));
}

.profile-invite__layer img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-invite__glow {
  border-radius: 50%;
  filter: blur(calc(var(--bl) * var(--ru)));
}

.profile-invite__content {
  position: absolute;
  left: calc(25 * var(--ru));
  top: calc(13 * var(--ru));
  width: calc(319 * var(--ru));
  display: flex;
  flex-direction: column;
  gap: calc(21 * var(--ru));
}

.profile-invite__title {
  margin: 0;
  font-size: calc(17.364 * var(--ru));
  font-weight: 590;
  line-height: normal;
  letter-spacing: -0.0875px;
}

.profile-invite__pct {
  position: relative;
  display: inline-block;
  font-weight: 900;
}

.profile-invite__pct::after {
  content: "";
  position: absolute;
  left: calc(-5 * var(--ru));
  right: calc(1 * var(--ru));
  top: calc(23.35 * var(--ru));
  height: calc(10.166 * var(--ru));
  background: var(--squiggle) center / 100% 100% no-repeat;
  pointer-events: none;
}

.profile-invite__stats {
  display: flex;
  flex-direction: column;
  gap: calc(8.71 * var(--ru));
}

.profile-invite__stat,
.profile-invite__btn,
.profile-invite__copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.profile-invite__glass {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.profile-invite__stat {
  width: calc(155.032 * var(--ru));
  height: calc(65.322 * var(--ru));
  border-radius: calc(18 * var(--ru));
}

.profile-invite__stat .profile-invite__glass {
  -webkit-backdrop-filter: blur(calc(3.085 * var(--ru)));
  backdrop-filter: blur(calc(3.085 * var(--ru)));
  background: rgba(229, 68, 66, 0.18);
  box-shadow:
    inset 1.028px 1.028px 0 -0.514px rgba(255, 255, 255, 0.28),
    inset -1.028px -1.028px 0 -0.514px rgba(255, 255, 255, 0.21),
    inset 0 0 5px 0 rgba(255, 255, 255, 0.11),
    inset 0 0 calc(16.454 * var(--ru)) 0 rgba(0, 0, 0, 0.18);
}

.profile-invite__stat--earned .profile-invite__glass {
  background: rgba(85, 66, 66, 0.18);
}

.profile-invite__stat-body {
  position: absolute;
  left: calc(50% - 1.02 * var(--ru));
  top: calc(50% + 0.95 * var(--ru));
  width: calc(125 * var(--ru));
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: calc(5 * var(--ru));
  letter-spacing: -0.2057px;
}

.profile-invite__stat-label {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--ru));
  margin: 0;
  font-size: calc(14.293 * var(--ru));
  font-weight: 510;
  line-height: normal;
}

.profile-invite__stat-label img {
  display: block;
  width: calc(16.83 * var(--ru));
  height: calc(16.83 * var(--ru));
}

.profile-invite__stat-value {
  margin: 0;
  font-size: calc(20 * var(--ru));
  font-weight: 700;
  line-height: normal;
}

.profile-invite__stat-value small {
  font-size: calc(8 * var(--ru));
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.profile-invite__actions {
  display: flex;
  align-items: center;
  gap: calc(5.291 * var(--ru));
  height: calc(58.201 * var(--ru));
}

.profile-invite__btn,
.profile-invite__copy {
  appearance: none;
  flex-shrink: 0;
  height: calc(41.809 * var(--ru));
  padding: 0;
  border: none;
  border-radius: 999px;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-invite__btn {
  width: calc(270.583 * var(--ru));
  margin-left: calc(0.16 * var(--ru));
  margin-right: calc(0.16 * var(--ru));
  font-size: calc(17.36 * var(--ru));
  font-weight: 590;
  letter-spacing: -0.1508px;
}

.profile-invite__btn .profile-invite__glass {
  -webkit-backdrop-filter: blur(calc(5.655 * var(--ru))) brightness(0.55);
  backdrop-filter: blur(calc(5.655 * var(--ru))) brightness(0.55);
  background:
    linear-gradient(141.18deg, rgba(255, 255, 255, 0) 41.946%, rgba(255, 255, 255, 0.46) 135.61%),
    rgba(255, 33, 39, 0.12);
  box-shadow:
    inset 1.885px 1.885px 0 -0.942px rgba(255, 255, 255, 0.28),
    inset -1.885px -1.885px 0 -0.942px rgba(255, 255, 255, 0.21),
    inset 0 0 9.6px 0 rgba(255, 255, 255, 0.11);
}

.profile-invite__copy {
  width: calc(41.809 * var(--ru));
  display: grid;
  place-items: center;
}

.profile-invite__copy .profile-invite__glass {
  -webkit-backdrop-filter: blur(calc(1.845 * var(--ru))) brightness(0.55);
  backdrop-filter: blur(calc(1.845 * var(--ru))) brightness(0.55);
  background:
    linear-gradient(105.19deg, rgba(255, 255, 255, 0) 10.661%, rgba(255, 255, 255, 0.387) 167.84%),
    rgba(255, 33, 39, 0.038);
  box-shadow:
    inset 0.615px 0.615px 0 -0.307px rgba(255, 255, 255, 0.28),
    inset -0.615px -0.615px 0 -0.307px rgba(255, 255, 255, 0.21),
    inset 0 0 3.1px 0 rgba(255, 255, 255, 0.11),
    inset 0 0 calc(9.837 * var(--ru)) calc(2 * var(--ru)) rgba(0, 0, 0, 0.42);
}

.profile-invite__copy img {
  display: block;
  width: calc(17.215 * var(--ru));
  height: calc(17.215 * var(--ru));
}

.profile-invite__btn:active {
  color: rgba(255, 255, 255, 0.7);
}

.profile-invite__copy:active img {
  opacity: 0.7;
}

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.promo-modal[hidden] {
  display: none !important;
}

.promo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.promo-modal__sheet {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
  padding: 18px 16px 20px;
  border-radius: 20px;
  background: #17181c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.promo-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.promo-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.promo-modal__close {
  appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff14;
  color: #ffffffcc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-tabs {
  width: 100%;
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-tab {
  appearance: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #ffffffcc;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 8px;
  cursor: pointer;
}

.profile-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 46%);
}

.profile-tab.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.profile-tab:active:not(.is-active) {
  opacity: 0.8;
}

.profile-section {
  width: 100%;
  margin: 0 auto;
}

.profile-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.profile-section__count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffffcc;
}

.profile-ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-ledger__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff12;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-ledger__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-ledger__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-ledger__time {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff66;
}

.profile-ledger__delta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.profile-ledger__item.is-credit .profile-ledger__delta {
  color: #73ff9d;
}

.profile-ledger__item.is-debit .profile-ledger__delta {
  color: #ff8e8e;
}

.profile-ledger__star {
  width: 13px;
  height: 13px;
  object-fit: contain;
  display: block;
}

.profile-ledger__loading {
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff80;
}

.profile-inv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.profile-inv__card {
  background: #ffffff12;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.profile-inv__art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #00000022;
  overflow: hidden;
  flex: 0 0 auto;
}

.profile-inv__art > * {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
}

.profile-inv__art canvas,
.profile-inv__art svg {
  display: block;
  object-fit: contain;
}

.profile-inv__img {
  object-fit: contain;
  display: block;
}

.profile-inv__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 18px;
  flex: 0 0 18px;
  min-width: 0;
}

.profile-inv__name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.profile-inv__qty {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: #9ec1ff;
  background: #ffffff14;
  border-radius: 999px;
  padding: 2px 6px;
}

.profile-inv__actions {
  display: grid;
  grid-template-rows: 28px 28px;
  gap: 4px;
  margin-top: auto;
  flex: 0 0 auto;
}

.profile-inv__btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0 4px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
}

.profile-inv__btn--out {
  background: #73ff9d;
  color: #0c0d0e;
}

.profile-inv__btn--sell {
  background: #ff3b3b;
}

.profile-inv__btn--ghost {
  visibility: hidden;
  pointer-events: none;
}

.profile-inv__upgrade-only {
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 191, 50, 0.45);
  background: rgba(255, 191, 50, 0.12);
  color: #ffbf32;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.profile-inv__btn:active:not(.profile-inv__btn--ghost) {
  opacity: 0.85;
  transform: scale(0.98);
}

.profile-inv__star {
  width: 11px;
  height: 11px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.profile-empty {
  text-align: center;
  padding: 36px 16px;
  border-radius: 18px;
  background: #ffffff0c;
}

.profile-empty p {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.profile-empty span {
  font-size: 13px;
  color: #ffffff80;
  font-weight: 500;
}

.screen-game.is-profile,
.app-scroll.is-profile {
  background: #141414;
}

.screen-game.is-profile {
  padding: 0;
}
