:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --text: #f6f6f6;
  --track: #2a2a2a;
  --fill: #ffffff;
  --logo-width: 160px;
  --container-max: 1400px;
  --container-pad: 16px;
  --top-offset: 85px;
  --safe-area-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px)
  );
  --safe-area-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px),
    var(--tg-safe-area-inset-bottom, 0px)
  );
  --safe-area-left: max(
    env(safe-area-inset-left, 0px),
    var(--tg-content-safe-area-inset-left, 0px),
    var(--tg-safe-area-inset-left, 0px)
  );
  --safe-area-right: max(
    env(safe-area-inset-right, 0px),
    var(--tg-content-safe-area-inset-right, 0px),
    var(--tg-safe-area-inset-right, 0px)
  );
  --page-pad-left: calc(var(--container-pad) + var(--safe-area-left));
  --page-pad-right: calc(var(--container-pad) + var(--safe-area-right));
  --top-gap: max(var(--top-offset), var(--safe-area-top));
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  touch-action: manipulation;
}

body {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body.is-sheet-open {
  overflow: hidden;
}

body.is-modal-open {
  overflow: hidden;
}

.app {
  min-height: var(--tg-viewport-stable-height, 100vh);
  position: relative;
}

.screen {
  min-height: var(--tg-viewport-stable-height, 100vh);
}

.screen--loading {
  position: fixed;
  inset: 0;
  min-height: var(--tg-viewport-height, 100vh);
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 10;
}

.screen--market {
  opacity: 0;
  pointer-events: none;
}

body.is-loaded .screen--loading {
  opacity: 0;
  pointer-events: none;
}

body.is-loaded .screen--market {
  opacity: 1;
  pointer-events: auto;
}

.loading {
  width: var(--logo-width);
  display: grid;
  place-items: center;
  gap: 30px;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.progress__fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--fill);
}

.market {
  min-height: var(--tg-viewport-stable-height, 100vh);
  width: min(100%, var(--container-max));
  margin: 0 auto;
  padding: calc(16px + var(--top-gap)) var(--page-pad-right) calc(110px + var(--safe-area-bottom))
    var(--page-pad-left);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.market-header {
  width: 100%;
  align-self: stretch;
  display: grid;
  gap: 10px;
}

.market-top {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

.balance-pill {
  height: 50px;
  padding: 0 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 92vw;
  border-radius: 50px;
  background: #141414;
  flex: 0 0 auto;
}

.balance-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.balance-main:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.ton-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ton-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.balance-value {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
}

.balance-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  appearance: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.balance-plus svg {
  width: 11px;
  height: 11px;
  display: block;
}

.balance-plus:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.search-pill {
  flex: 1 1 260px;
  height: 50px;
  background: #141414;
  border-radius: 999px;
  padding: 0;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-field {
  height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 0 14px;
  background: #0a0a0a;
  border-radius: 999px;
  position: relative;
  min-width: 0;
}

.search-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #d0d0d0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 0;
  min-width: 0;
}

.search-input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  display: none;
}

.search-input::-ms-clear {
  display: none;
}

.search-input::placeholder {
  color: #5d5d5d;
  text-align: center;
}

.search-clear {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
}

.search-clear svg {
  width: 16px;
  height: 16px;
  display: block;
  transform: rotate(45deg);
}

.search-input:not(:placeholder-shown) ~ .search-clear {
  opacity: 1;
  pointer-events: auto;
}

.segment-control {
  width: 100%;
  height: 50px;
  background: #141414;
  border-radius: 21.4px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.segment-button {
  height: 100%;
  border: none;
  background: transparent;
  border-radius: 18px;
  color: #5d5d5d;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.segment-button.is-active {
  background: #0a0a0a;
  color: #ffffff;
}

.select-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 56px 56px;
  gap: 6px;
}

.select-card {
  --select-height: 56px;
  --dot-size: 8px;
  height: var(--select-height);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 calc((var(--select-height) - var(--dot-size)) / 2) 0 16px;
  background: #141414;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  text-align: left;
}

.select-text {
  display: grid;
  gap: 3px;
}

.select-label {
  font-size: 11px;
  font-weight: 600;
  color: #5d5d5d;
}

.select-value {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.select-dot {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: #ffffff;
}

.icon-card {
  width: 56px;
  height: 56px;
  border-radius: 24px;
  border: none;
  background: #141414;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-card svg {
  width: 28px;
  height: 28px;
}

.card-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}

.nft-card {
  width: 100%;
  padding: 4px;
  border-radius: 20px;
  background: #141414;
  display: grid;
  gap: 8px;
}

.nft-card.is-hidden {
  display: none;
}

.nft-media {
  aspect-ratio: 1;
  border-radius: 16px;
  background: #0a0a0a;
}

.nft-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0;
  min-width: 0;
}

.nft-title {
  font-size: 16px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-id {
  font-size: 14px;
  font-weight: 600;
  color: #5d5d5d;
  flex: 0 0 auto;
}

.nft-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nft-price {
  --nft-control-height: 40px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--nft-control-height);
  padding: 0 16px;
  background: #0a0a0a;
  border-radius: 17.8px;
  border: none;
  cursor: pointer;
  color: inherit;
  font-weight: 600;
  font-size: 14px;
  justify-content: center;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.nft-price svg {
  width: 14px;
  height: 14px;
}

.nft-action {
  width: 40px;
  height: 40px;
  border-radius: 17.8px;
  background: #0a0a0a;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.nft-action svg {
  width: 18px;
  height: 18px;
}

.bottom-bar {
  --tab-size: clamp(44px, 13vw, 60px);
  --tab-gap: clamp(6px, 2vw, 10px);
  --bar-padding: clamp(10px, 2.5vw, 14px);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0;
  display: flex;
  justify-content: stretch;
}

.bottom-bar__inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #141414;
  border-radius: 26px 26px 0 0;
  padding: var(--bar-padding) var(--page-pad-right) calc(var(--bar-padding) + var(--safe-area-bottom, 0px))
    var(--page-pad-left);
}

.bottom-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tab-gap);
}

.bottom-tab {
  width: var(--tab-size);
  height: var(--tab-size);
  border-radius: 18px;
  background: #0a0a0a;
  border: none;
  cursor: pointer;
  color: #5d5d5d;
  font-family: inherit;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
}

.bottom-tab.is-active {
  color: #ffffff;
}

.bottom-tab:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.balance-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.balance-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 220ms ease;
}

.balance-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
}

.balance-sheet.is-open .balance-sheet__backdrop {
  opacity: 1;
}

.balance-sheet__panel {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(100%);
  width: 100%;
  max-width: 100%;
  background: #141414;
  border-radius: 26px 26px 0 0;
  padding: 16px var(--page-pad-right) calc(18px + var(--safe-area-bottom, 0px)) var(--page-pad-left);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
  will-change: transform, opacity;
}

.balance-sheet.is-open .balance-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}

.balance-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.balance-sheet__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.balance-sheet__close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.balance-sheet__close svg {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.balance-sheet__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.balance-card {
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.balance-card--primary {
  background: #0098ea;
  color: #ffffff;
  min-height: calc(56px + 34px + 8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  height: 100%;
}

.balance-card--secondary {
  background: #0a0a0a;
  color: #5d5d5d;
  min-height: 56px;
  align-content: center;
}

.balance-card--button {
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.balance-card--button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.balance-card.is-connected {
  color: #ffffff;
}

.balance-card.is-connected .balance-card__label {
  color: #ffffff;
}

.balance-card__label {
  font-size: 12px;
  font-weight: 600;
}

.balance-card__label--muted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.wallet-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

[data-wallet-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-balance {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  opacity: 0.85;
}

.balance-card__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.balance-card__value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 20px;
  font-weight: 700;
}

.balance-card__value svg {
  width: 18px;
  height: 18px;
}

.balance-side {
  display: grid;
  gap: 8px;
  height: 100%;
  align-content: space-between;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.balance-action {
  height: 56px;
  border-radius: 18px;
  border: none;
  background: #0a0a0a;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.balance-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.balance-history {
  margin-top: 12px;
}

.selection-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.selection-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 220ms ease;
}

.selection-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
}

.selection-sheet.is-open .selection-sheet__backdrop {
  opacity: 1;
}

.selection-sheet__panel {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(100%);
  width: 100%;
  max-width: 100%;
  background: #141414;
  border-radius: 26px 26px 0 0;
  padding: 16px var(--page-pad-right) calc(18px + var(--safe-area-bottom, 0px)) var(--page-pad-left);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
  will-change: transform, opacity;
}

.selection-sheet.is-open .selection-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}

.selection-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.selection-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.selection-sheet__close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.selection-sheet__close svg {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.selection-sheet__content {
  display: grid;
  gap: 8px;
}

.selection-sheet__current {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #5d5d5d;
}

.selection-sheet__hint {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #bdbdbd;
}

.selection-sheet__list {
  display: grid;
  gap: 8px;
}

.selection-sheet[data-selection-type="sort"] .selection-sheet__hint {
  display: none;
}

.selection-sheet:not([data-selection-type="sort"]) .selection-sheet__list {
  display: none;
}

.selection-sheet__option {
  height: 44px;
  border-radius: 16px;
  border: none;
  background: #0a0a0a;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}

.selection-sheet__option.is-active {
  background: #0098ea;
  color: #ffffff;
}

.card-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.card-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 220ms ease;
}

.card-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
}

.card-sheet.is-open .card-sheet__backdrop {
  opacity: 1;
}

.card-sheet__panel {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(100%);
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, calc(100vh - var(--safe-area-top, 0px) - 60px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #141414;
  border-radius: 26px 26px 0 0;
  padding: 16px var(--page-pad-right) calc(18px + var(--safe-area-bottom, 0px)) var(--page-pad-left);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
  will-change: transform, opacity;
  display: grid;
  gap: 12px;
}

.card-sheet.is-open .card-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}

.card-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-sheet__heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.card-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.card-sheet__id {
  font-size: 12px;
  font-weight: 600;
  color: #5d5d5d;
  white-space: nowrap;
}

.card-sheet__close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.card-sheet__close svg {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.card-sheet__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.card-sheet__preview {
  width: 100%;
  display: grid;
}

.card-sheet__media {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  background: #0a0a0a;
  position: relative;
}

.card-sheet__summary {
  display: grid;
  gap: 10px;
  align-content: start;
}

.card-sheet__pills {
  display: grid;
  gap: 8px;
}

.card-sheet__pill {
  background: #0a0a0a;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  min-height: 46px;
}

.card-sheet__pill-label {
  font-size: 12px;
  font-weight: 600;
  color: #5d5d5d;
}

.card-sheet__pill-value {
  font-size: 14px;
  font-weight: 700;
}

.card-sheet__mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.card-sheet__mini {
  height: 66px;
  border-radius: 14px;
  border: none;
  background: #0a0a0a;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #e3e3e3;
  padding: 0;
}

.card-sheet__table {
  background: #0f0f0f;
  border-radius: 18px;
  overflow: hidden;
}

.card-sheet__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.card-sheet__row + .card-sheet__row {
  border-top: 1px solid #1b1b1b;
}

.card-sheet__row-label {
  font-size: 13px;
  font-weight: 600;
  color: #5d5d5d;
}

.card-sheet__row-value {
  font-size: 14px;
  font-weight: 700;
}

.card-sheet__row-badge {
  font-size: 11px;
  font-weight: 600;
  color: #bdbdbd;
  background: #0a0a0a;
  padding: 4px 8px;
  border-radius: 999px;
}

.card-sheet__cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-sheet__cta-button {
  height: 50px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.card-sheet__cta-button--ghost {
  background: #0a0a0a;
  color: #ffffff;
}

.card-sheet__cta-button--primary {
  background: #0098ea;
  color: #ffffff;
}

.card-sheet__cta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.card-sheet__cta-icon {
  width: 14px;
  height: 14px;
}

.card-sheet__cta-price {
  font-size: 13px;
  font-weight: 700;
}

.deposit-modal,
.withdraw-modal,
.disconnect-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.deposit-modal.is-open,
.withdraw-modal.is-open,
.disconnect-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 220ms ease;
}

.deposit-modal__backdrop,
.withdraw-modal__backdrop,
.disconnect-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
}

.deposit-modal.is-open .deposit-modal__backdrop,
.withdraw-modal.is-open .withdraw-modal__backdrop,
.disconnect-modal.is-open .disconnect-modal__backdrop {
  opacity: 1;
}

.deposit-modal__panel,
.withdraw-modal__panel,
.disconnect-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 420px);
  transform: translate(-50%, -45%);
  background: #141414;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: transform 240ms ease, opacity 240ms ease;
  will-change: transform, opacity;
}

.deposit-modal.is-open .deposit-modal__panel,
.withdraw-modal.is-open .withdraw-modal__panel,
.disconnect-modal.is-open .disconnect-modal__panel {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.deposit-modal__header,
.withdraw-modal__header,
.disconnect-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.deposit-modal__title,
.withdraw-modal__title,
.disconnect-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.deposit-modal__close,
.withdraw-modal__close,
.disconnect-modal__close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.deposit-modal__close svg,
.withdraw-modal__close svg,
.disconnect-modal__close svg {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.deposit-modal__form,
.withdraw-modal__form {
  display: grid;
  gap: 12px;
}

.deposit-modal__label,
.withdraw-modal__label {
  font-size: 12px;
  font-weight: 600;
  color: #5d5d5d;
}

.deposit-modal__field,
.withdraw-modal__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 48px;
  border-radius: 16px;
  background: #0a0a0a;
}

.deposit-modal__input,
.withdraw-modal__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 0;
}

.deposit-modal__input::placeholder,
.withdraw-modal__input::placeholder {
  color: #5d5d5d;
}

.deposit-modal__unit,
.withdraw-modal__unit {
  font-size: 13px;
  font-weight: 600;
  color: #5d5d5d;
}

.deposit-modal__submit,
.withdraw-modal__submit {
  height: 48px;
  border-radius: 16px;
  border: none;
  background: #0098ea;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.withdraw-modal__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.withdraw-modal__max {
  border: none;
  background: transparent;
  color: #0098ea;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.withdraw-modal__max:focus-visible {
  outline: 2px solid rgba(0, 152, 234, 0.4);
  outline-offset: 2px;
  border-radius: 6px;
}

.disconnect-modal__text {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: #bdbdbd;
  line-height: 1.4;
}

.disconnect-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.disconnect-modal__cancel,
.disconnect-modal__confirm {
  height: 44px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.disconnect-modal__cancel {
  background: #0a0a0a;
  color: #ffffff;
}

.disconnect-modal__confirm {
  background: #ff4d4f;
  color: #ffffff;
}

.balance-history__title {
  font-size: 14px;
  font-weight: 700;
}

.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;
}

@media (max-width: 480px) {
  :root {
    --logo-width: 140px;
  }
}

@media (max-width: 720px) {
  :root {
    --container-pad: 16px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .search-pill {
    flex: 1 1 0;
  }

  .balance-sheet__row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 431px) {
  .market-top {
    flex-wrap: nowrap;
  }

  .search-pill {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .balance-sheet,
  .balance-sheet__backdrop,
  .balance-sheet__panel,
  .selection-sheet,
  .selection-sheet__backdrop,
  .selection-sheet__panel,
  .card-sheet,
  .card-sheet__backdrop,
  .card-sheet__panel,
  .deposit-modal,
  .deposit-modal__backdrop,
  .deposit-modal__panel,
  .withdraw-modal,
  .withdraw-modal__backdrop,
  .withdraw-modal__panel,
  .disconnect-modal,
  .disconnect-modal__backdrop,
  .disconnect-modal__panel {
    transition: none;
  }

  .balance-sheet__panel {
    transform: translateY(0);
  }

  .selection-sheet__panel {
    transform: translateY(0);
  }

  .card-sheet__panel {
    transform: translateY(0);
  }

  .deposit-modal__panel {
    transform: translate(-50%, -50%);
  }

  .withdraw-modal__panel {
    transform: translate(-50%, -50%);
  }

  .disconnect-modal__panel {
    transform: translate(-50%, -50%);
  }
}
