/* Visual parity with the website. Account logout stays website-only. */

.topbar__site {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.topbar__nav-link--channel {
  background: rgba(143, 189, 146, .16);
  border-color: rgba(163, 208, 166, .38);
  color: #e5f2e6;
}
.topbar__nav-link--channel:hover {
  background: rgba(143, 189, 146, .28);
  border-color: rgba(163, 208, 166, .55);
  color: #f4faf4;
}
.topbar__nav-link--bot {
  background: rgba(126, 168, 154, .12);
  border-color: rgba(154, 196, 176, .4);
  color: #e7f3ee;
}
.topbar__nav-link--bot:hover {
  background: rgba(126, 168, 154, .22);
  border-color: rgba(154, 196, 176, .58);
  color: #f5fbf8;
}
.topbar__nav-link--support {
  background: rgba(189, 172, 130, .14);
  border-color: rgba(201, 184, 140, .4);
  color: #f3edd9;
}
.topbar__nav-link--support:hover {
  background: rgba(189, 172, 130, .24);
  border-color: rgba(201, 184, 140, .58);
  color: #fbf7ea;
}

#helpDrawer .drawer__panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#helpDrawer .drawer__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#helpDrawer .drawer__head { align-items: center; }
.drawer__group { margin-top: 6px; }
.drawer__label {
  display: block;
  margin: 16px 0 0;
  color: #7f887f;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 600;
}
.drawer__links a .drawer__ext-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text) !important;
}
.drawer__ext-name i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.drawer__ext--channel .drawer__ext-name i { background: #95bf98; box-shadow: 0 0 0 4px rgba(149, 191, 152, .12); }
.drawer__ext--bot .drawer__ext-name i { background: #9ac4b0; box-shadow: 0 0 0 4px rgba(154, 196, 176, .12); }
.drawer__ext--support .drawer__ext-name i { background: #c9b88c; box-shadow: 0 0 0 4px rgba(189, 172, 130, .14); }
.drawer__account {
  flex: none;
  margin-top: auto;
  padding-top: 16px;
}
.drawer__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(163, 208, 166, .14), transparent 46%),
    linear-gradient(180deg, #1a1f1c, #121614);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  text-align: left;
}
.drawer__avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7ece6;
  color: #161a17;
  font-size: 16px;
  font-weight: 650;
}
.drawer__profile-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.drawer__profile-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: #f3f5f1;
}
.drawer__profile-copy span { color: #8d968e; font-size: 12px; }
.drawer__profile-go { flex: none; color: #aeb6ae; font-size: 16px; }

.hero--home { padding-top: 56px; padding-bottom: 28px; }
.hero--home h1 {
  font-size: clamp(40px, 4.6vw, 64px);
  max-width: 11em;
  letter-spacing: -.05em;
  line-height: 1.02;
}
.hero--home .hero__copy p { max-width: 36em; }
.join-block { margin-top: 28px; }
.join-block h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 600;
}
.join-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.join-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; color: inherit; }
.join-card__art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #101614;
}
.join-card__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) brightness(.72);
}
.join-card__art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .32));
}
.join-card__meta { display: flex; flex-direction: column; gap: 8px; }
.join-card__title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #d5ddd6;
}
.join-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border-radius: 12px;
  background: #e4ebe4;
  color: #1a201c;
  font-size: 13px;
  font-weight: 600;
}
.join-card__cta i { font-style: normal; }
.join-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, .028);
  color: #e7ebe6;
  font-size: 14px;
  font-weight: 600;
}
.join-all span { color: #aeb6ae; font-size: 16px; }
.hero-note { display: none; }

@media (min-width: 901px) {
  .hero--home {
    display: grid;
    grid-template-columns: minmax(0, 34em) minmax(240px, 1fr);
    column-gap: 48px;
    row-gap: 8px;
    align-items: end;
  }
  .hero--home .hero__copy { grid-column: 1; grid-row: 1; }
  .hero-note {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    align-self: end;
    width: min(100%, 280px);
    margin-left: auto;
    padding: 14px 16px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .02);
  }
  .hero-note__label { display: inline-flex; align-items: center; gap: 8px; color: #8d968e; font-size: 12px; font-weight: 500; }
  .hero-note__list { display: grid; }
  .hero-note p { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 0; }
  .hero-note p + p { border-top: 1px solid var(--line); }
  .hero-note b { color: #9aa39b; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
  .hero-note p span { color: #e4e8e3; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
  .hero-note small { color: #6e776f; font-size: 11px; line-height: 1.4; }
  .hero--home .join-block { grid-column: 1 / -1; margin-top: 22px; }
  .topbar__site { display: flex; }
}

.home-flow {
  display: grid;
  grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr);
  gap: 36px 48px;
  align-items: start;
  padding: 18px 0 22px;
}
.home-flow__copy h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
}
.home-flow__copy h2 span { color: #bac0b9; }
.home-flow__copy p { margin: 14px 0 0; max-width: 34em; color: var(--muted); font-size: 15px; line-height: 1.55; }
.home-flow ol { list-style: none; margin: 0; padding: 0; }
.home-flow li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.home-flow li:last-child { border-bottom: 1px solid var(--line); }
.home-flow li > span { color: #6e776f; font-size: 12px; letter-spacing: .08em; padding-top: 3px; }
.home-flow strong { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.home-flow li p { margin: 4px 0 0; color: #808980; font-size: 13px; line-height: 1.5; }

.home-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px auto 10px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
}
.home-facts article { padding: 18px 20px 20px; }
.home-facts article + article { border-left: 1px solid var(--line); }
.home-facts span {
  display: block;
  color: #8d968e;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 600;
  text-transform: uppercase;
}
.home-facts strong { display: block; margin-top: 8px; font-size: 18px; letter-spacing: -.03em; font-weight: 600; }
.home-facts p { margin: 8px 0 0; color: #808980; font-size: 13px; line-height: 1.5; }

#site-footer.footer-info,
.footer-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 22px !important;
  padding-top: 36px !important;
  padding-bottom: 28px !important;
  text-align: center !important;
  grid-template-columns: none !important;
}
.footer-info__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 36em;
}
.footer-info__lead p { margin: 0; font-size: 15px; line-height: 1.55; color: #b7beb6; }
.footer-info__hint { color: #7d867d !important; font-size: 13px !important; }
.footer-info__links {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important;
  grid-template-columns: none !important;
}
.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: transparent;
  color: #e7ebe6;
  font-size: 13px;
  font-weight: 500;
}
.footer-pill svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#site-footer .disclaimer { text-align: center !important; font-size: 11px !important; }

.home-screen .exchange-card,
.exchange-section .exchange-card {
  position: relative !important;
  overflow: hidden !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 22px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  background:
    radial-gradient(ellipse 42% 28% at 100% 0%, rgba(255, 255, 255, .045), transparent 64%),
    linear-gradient(180deg, #181b19 0%, #131514 52%, #101211 100%) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
.exchange-form,
#exchangeForm,
.exchange-section .exchange-form,
.home-screen .exchange-form {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 18px !important;
}
.exchange-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 14px;
  align-items: stretch;
}
.pay-panel,
.exchange-form .receive-card {
  min-width: 0;
  border-radius: 22px;
}
.pay-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head .field__label,
.pay-panel .field__label,
.exchange-form .field--wallet .field__label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9aa39b;
  font-weight: 600;
}
.pay-panel .field__control--money {
  min-height: 76px;
  padding: 0 18px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(6, 8, 7, .45);
}
.pay-panel .field__control--money input {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.04em;
}
.pay-panel .field__control--money b { font-size: 20px; color: #c5cdc6; }
.exchange-form .payment-picker,
.exchange-form .asset-picker {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  justify-content: stretch !important;
}
.exchange-form .payment-option,
.exchange-form .asset-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  flex: none !important;
  min-height: 44px !important;
  padding: 4px 12px 4px 4px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(8, 10, 9, .35) !important;
  text-align: left !important;
}
.exchange-form .payment-option .asset-icon,
.exchange-form .asset-option .asset-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 32px !important;
  background: rgba(255, 255, 255, .08) !important;
  font-size: 14px !important;
}
.exchange-form .payment-option b,
.exchange-form .asset-option b { display: inline !important; font-size: 13px !important; font-weight: 600 !important; }
.exchange-form .payment-option small,
.exchange-form .asset-option small { display: none !important; }
.exchange-form .payment-option.is-active,
.exchange-form .asset-option.is-active {
  background: #f0f2ed !important;
  border-color: transparent !important;
  color: #141714 !important;
}
.exchange-form .payment-option.is-active .asset-icon,
.exchange-form .asset-option.is-active .asset-icon { background: rgba(20, 23, 20, .08) !important; color: #141714 !important; }
.exchange-form .receive-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 18px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(8, 10, 9, .42)) !important;
}
.receive-card__head { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.exchange-form .receive-card__label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d5e6d6;
  font-weight: 600;
}
.exchange-form .receive-card__amount { margin: 22px 0 0 !important; }
.exchange-form .receive-card__amount strong { font-size: clamp(34px, 3.4vw, 46px) !important; letter-spacing: -.05em !important; }
.exchange-form .receive-card__meta { margin-top: auto; padding-top: 8px; }
.exchange-form .field--wallet { margin-top: 14px; }
.exchange-form .field--wallet .field__control {
  min-height: 58px;
  border-radius: 16px;
  background: rgba(6, 8, 7, .4);
  border-color: rgba(255, 255, 255, .1);
}
.exchange-form .exchange-bottom {
  margin-top: 16px !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.exchange-form .primary-action { min-width: 196px; min-height: 52px; border-radius: 14px; }

.app-main:has(#user-menu.active),
.app-main:has(#info.active) {
  padding: 0 0 12px !important;
  background: transparent !important;
}
.home-screen .main-content,
.home-screen > .main-content {
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
.info-screen .about-main { padding-top: 78px !important; padding-bottom: 24px; }
body.is-panel #site-footer.footer-info,
body.subscription-gate-active #site-footer.footer-info,
body:has(#admin-panel.active) #site-footer.footer-info,
body:has(#admin-dashboard.active) #site-footer.footer-info,
body:has(#operator-app.active) #site-footer.footer-info,
body:has(#operator-order-detail.active) #site-footer.footer-info { display: none !important; }

#bottom-nav.mobile-dock,
#bottom-nav.mobile-dock.visible {
  display: none !important;
  position: fixed !important;
  left: 9px !important;
  right: 9px !important;
  bottom: 9px !important;
  transform: none !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  z-index: 60 !important;
  padding: 7px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 16px !important;
  background: rgba(16, 19, 17, .94) !important;
  backdrop-filter: blur(18px) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35) !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
}
#bottom-nav .nav-item {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 46px !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #838b84 !important;
  font-size: 8px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
}
#bottom-nav .dock-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
}
#bottom-nav .dock-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#bottom-nav .nav-item.active,
#bottom-nav .nav-item.is-current {
  color: #f3f6f2 !important;
  background: rgba(255, 255, 255, .05) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32) !important;
}
#bottom-nav .nav-item.dock-exchange {
  background: #edf0eb !important;
  color: #141714 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  flex-direction: row !important;
  gap: 4px !important;
}
#bottom-nav .nav-item.dock-exchange b { font-size: 14px; font-weight: 600; }
#bottom-nav .nav-item.dock-exchange.active,
#bottom-nav .nav-item.dock-exchange.is-current {
  color: #141714 !important;
  background: #edf0eb !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .62) !important;
}
body.subscription-gate-active #bottom-nav,
body.is-panel #bottom-nav { display: none !important; }

@media (max-width: 900px) {
  .hero--home { padding-top: 40px; }
  .hero--home h1 { font-size: clamp(36px, 8vw, 52px); }
  .exchange-stage { grid-template-columns: 1fr; }
  .home-flow { grid-template-columns: 1fr; gap: 18px; }
  .receive-card__head { align-items: stretch; width: 100%; }
  .exchange-form .asset-picker { justify-content: flex-start !important; }
}
@media (max-width: 720px) {
  .join-block { margin-top: 22px; }
  .join-block h2 { font-size: 22px; margin-top: 10px; }
  .join-row { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
  .join-card__title { min-height: 40px; font-size: 12px; }
  .join-card__cta { min-height: 36px; font-size: 12px; }
  .join-all { min-height: 48px; font-size: 13px; }
}
/* Header is full-bleed, like the site. Old webapp CSS was shrinking it into a floating bar. */
header.app-header.topbar {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  left: auto !important;
  right: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  justify-content: initial !important;
  align-items: stretch !important;
}
header.app-header .topbar__inner {
  width: min(calc(100% - 48px), var(--max)) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  flex: none !important;
}
header.app-header .topbar__brand,
header.app-header .topbar__nav,
header.app-header .topbar__site {
  align-items: center !important;
}

/* Ссылка и QR раньше были fixed поверх всего окна и залезали под шапку. */
.screen.referral-subpage {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
  padding-top: 8px !important;
}
/* Большая серая плашка вокруг «Назад» — только сама кнопка. */
.btn-back-wrap {
  display: flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  align-self: flex-start !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}
.btn-back-wrap:hover,
[data-theme="dark"] .btn-back-wrap:hover {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.btn-back-wrap .btn-back-unified,
.btn-back-wrap .btn-back-top {
  width: auto !important;
}

/* Заявка и похожие формы: поля ровные, карточка не прилипает к краям. */
body.is-app-screen .form-screen {
  width: min(100%, 520px) !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 16px 16px 32px !important;
  box-sizing: border-box !important;
}
body.is-app-screen .order-summary-card,
body.is-app-screen #order-summary {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
}
body.is-app-screen .order-summary-wallet-addr,
body.is-app-screen .order-summary .value.addr {
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
}
body.is-app-screen .form-screen .btn-block {
  width: 100% !important;
  box-sizing: border-box !important;
}
body.is-app-screen .referral-program-container,
body.is-app-screen .referral-subpage-container {
  width: min(100%, 520px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}

/* Внутренние экраны не листают документ: шапка стоит, крутится только содержимое. */
body.is-app-screen {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.is-app-screen #app {
  flex: 1;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.is-app-screen .app-header {
  flex: none;
}
body.is-app-screen .app-main {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.is-app-screen #site-footer.footer-info {
  display: none !important;
}
@media (min-width: 641px) {
  body.is-app-screen .app-main.has-nav {
    padding-bottom: 28px !important;
  }
}

@media (max-width: 900px) {
  header.app-header .topbar__inner { width: min(calc(100% - 32px), var(--max)) !important; height: 76px !important; }
}
@media (max-width: 640px) {
  header.app-header .topbar__inner { width: min(calc(100% - 22px), var(--max)) !important; height: 64px !important; }
}

@media (max-width: 640px) {
  body:not(.is-panel):not(.subscription-gate-active) #bottom-nav.mobile-dock.visible {
    display: grid !important;
    padding-bottom: calc(7px + env(safe-area-inset-bottom)) !important;
  }
  .home-facts { grid-template-columns: 1fr; }
  .home-facts article + article { border-left: 0; border-top: 1px solid var(--line); }
  .home-flow__copy h2 { font-size: 30px; }
  #site-footer.footer-info { padding-bottom: 108px !important; }
  .exchange-section .exchange-card,
  .home-screen .exchange-card { padding: 14px !important; border-radius: 20px !important; }
  .pay-panel .field__control--money { min-height: 64px; }
  .pay-panel .field__control--money input { font-size: 26px; }
  .exchange-form .panel-head,
  .exchange-form .receive-card__head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  .exchange-form .receive-card { align-items: center; text-align: center; }
  .exchange-form .asset-picker,
  .exchange-form .payment-picker { justify-content: stretch !important; width: 100% !important; }
  .exchange-form .asset-option,
  .exchange-form .payment-option { flex: none !important; width: 100% !important; justify-content: flex-start !important; }
  .exchange-form .asset-picker .asset-option:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 8px) / 2) !important;
  }
  .exchange-form .receive-card__amount { justify-content: center; }
  .exchange-form .primary-action { width: 100%; min-width: 0; }
  .info-screen .about-main { padding-top: 38px !important; }
  .app-main:has(#user-menu.active),
  .app-main:has(#info.active),
  .app-main:has(#profile.active) { padding-bottom: 8px !important; }
  .app-main:has(#history.active) {
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  }
  #history.history-screen {
    min-height: 0 !important;
    background: transparent !important;
  }
  #history .history-container {
    width: min(calc(100% - 22px), var(--max, 1180px)) !important;
  }
  .profile-page.page { width: min(calc(100% - 22px), var(--max)) !important; padding-top: 28px !important; }
  .profile-top,
  .profile-stats-row,
  .profile-sections { grid-template-columns: 1fr !important; }
}

/* Профиль — та же колонка и тон, что у главной и «О нас», без отдельной страницы-героя. */
.profile-screen.screen {
  background: transparent !important;
  min-height: 0 !important;
}
.profile-page.page {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  max-width: var(--max) !important;
  width: min(calc(100% - 48px), var(--max)) !important;
  margin: 0 auto !important;
  padding: 42px 0 56px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.profile-head { text-align: left; }
.profile-head h1 {
  margin: 14px 0 10px !important;
  font-size: clamp(36px, 4.5vw, 52px) !important;
  line-height: 1 !important;
  letter-spacing: -.05em !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}
.profile-head p {
  margin: 0 !important;
  max-width: 36em;
  color: var(--muted) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}
.profile-top {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: stretch;
}
.profile-identity {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 18px 18px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .02) !important;
  text-align: left !important;
}
/* Фото в шапке лежит вне круглой рамки и растягивается на весь header. */
#header-avatar-img {
  display: none !important;
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  inset: auto !important;
}
.profile-identity .profile-avatar,
.profile-screen .profile-avatar {
  position: relative !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  flex: 0 0 52px !important;
  overflow: hidden !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 50% !important;
  background: rgba(143, 189, 146, .14) !important;
  box-shadow: none !important;
}
.profile-identity .profile-avatar-img,
.profile-screen .profile-avatar-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 50% !important;
  display: block;
}
.profile-avatar-letter {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #e7f0e6 !important;
}
.profile-identity-copy { min-width: 0; }
.profile-display-name {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -.03em !important;
  line-height: 1.2 !important;
  color: var(--text) !important;
}
.profile-username {
  margin: 4px 0 0 !important;
  color: #8d968e !important;
  font-size: 13px !important;
}
.profile-wallet-card,
.profile-stat-card,
.profile-block {
  border: 1px solid var(--line-strong) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .02) !important;
  box-shadow: none !important;
}
.profile-wallet-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 18px !important;
}
.profile-wallet-icon { display: none !important; }
.profile-wallet-label,
.profile-stat-label,
.profile-block-title {
  color: #8d968e !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}
.profile-wallet-value,
.profile-stat-value {
  color: var(--text) !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: -.04em !important;
}
.profile-wallet-hint {
  margin: 0 !important;
  color: #6e776f !important;
  font-size: 12px !important;
}
.profile-wallet-deposit {
  display: flex !important;
  gap: 8px !important;
  margin-top: 4px !important;
}
.profile-balance-input {
  flex: 1 !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(6, 8, 7, .35) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
.profile-balance-deposit-btn {
  width: auto !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(163, 208, 166, .4) !important;
  background: rgba(143, 189, 146, .16) !important;
  color: #e5f2e6 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transform: none !important;
}
.profile-stats-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  margin: 0 !important;
}
.profile-stat-card,
.profile-stat-card--link,
.profile-stat-card--total {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 16px 18px !important;
  transform: none !important;
}
.profile-stat-icon { display: none !important; }
.profile-stat-card--link .profile-stat-label {
  flex: 1;
  font-size: 14px !important;
  letter-spacing: -.02em !important;
  text-transform: none !important;
  color: var(--text) !important;
  font-weight: 600 !important;
}
.profile-stat-arrow { color: #aeb6ae !important; }
.profile-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.profile-block {
  margin: 0 !important;
  padding: 18px !important;
}
.profile-block-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
}
.profile-block-badge {
  color: #e7f0e6 !important;
  background: rgba(143, 189, 146, .16) !important;
  border-radius: 999px !important;
}
.profile-tabs {
  display: flex !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
.profile-tab {
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #8d968e !important;
  box-shadow: none !important;
}
.profile-tab--active,
.profile-tab.active {
  border-color: rgba(163, 208, 166, .45) !important;
  background: rgba(143, 189, 146, .14) !important;
  color: #e7f0e6 !important;
}
.recent-deal-item,
.referral-list-item {
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.profile-wallet-body { width: 100%; min-width: 0; }
.profile-screen .profile-balance-deposit-btn,
.profile-screen .btn.profile-balance-deposit-btn {
  background: rgba(143, 189, 146, .16) !important;
  color: #e5f2e6 !important;
  border: 1px solid rgba(163, 208, 166, .4) !important;
  box-shadow: none !important;
}
#history .history-container {
  width: min(calc(100% - 48px), var(--max, 1180px)) !important;
  max-width: var(--max, 1180px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
#history .history-orders-list,
#history .history-order-card {
  width: 100% !important;
  max-width: none !important;
}
@media (max-width: 640px) {
  #history .history-container {
    width: min(calc(100% - 22px), var(--max, 1180px)) !important;
  }
  .profile-page.page { padding-bottom: 120px !important; }
  .profile-wallet-deposit { flex-direction: column !important; }
  .profile-balance-input { width: 100% !important; box-sizing: border-box !important; }
  .profile-screen .profile-balance-deposit-btn { width: 100% !important; }
  .profile-stats-row { grid-template-columns: 1fr !important; }
}

#profile.screen { animation: none !important; }
#profile.screen.active .profile-page.is-entering > .profile-head,
#profile.screen.active .profile-page.is-entering > .profile-top,
#profile.screen.active .profile-page.is-entering > .profile-stats-row,
#profile.screen.active .profile-page.is-entering > .profile-sections {
  animation: milka-rise .62s cubic-bezier(.2, .7, .2, 1) both;
}
#profile.screen.active .profile-page.is-entering > .profile-top { animation-delay: .05s; }
#profile.screen.active .profile-page.is-entering > .profile-stats-row { animation-delay: .1s; }
#profile.screen.active .profile-page.is-entering > .profile-sections { animation-delay: .15s; }

.priority-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.priority-pick.is-on {
  border-color: rgba(232, 196, 104, .55);
  background: linear-gradient(180deg, rgba(232, 196, 104, .16), rgba(232, 196, 104, .05));
}
.priority-pick__bolt {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(232, 196, 104, .16);
  color: #e8c468;
  font-size: 18px;
  flex: none;
}
.priority-pick__copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.priority-pick__copy b { font-size: 13px; font-weight: 600; color: #f4f6f3; }
.priority-pick__copy small { color: #8b948c; font-size: 11px; }
.priority-pick__state {
  font-size: 11px;
  font-weight: 600;
  color: #c5cdc6;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
}
.priority-pick.is-on .priority-pick__state {
  color: #1a160c;
  background: #e8c468;
  border-color: transparent;
}
