:root {
  --exchange-ink: #1a1a1a;
  --exchange-muted: #6b6b6b;
  --exchange-line: #e4e4e4;
  --exchange-thumb: #ededed;
  --exchange-pill: #e9e9e9;
  --exchange-red: #e60023;
  --exchange-green: #1a9d4b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: #fff;
  min-height: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar { display: none; }

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

body {
  font-family: -apple-system, "SF Pro Text", "SF Pro Display", BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.24px;
  background: #fff;
  color: var(--exchange-ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  overflow-x: hidden;
  width: 100%;
}

.exchange-phone {
  background: #fff;
  isolation: isolate;
  max-width: 430px;
  min-height: 100svh;
  position: relative;
  width: 100%;
  z-index: 1;
}

.exchange-screen { padding: 16px 18px 32px; }

.exchange-screen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.exchange-screen__title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

.exchange-pending-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: #fff7e6;
  color: #111;
  border-radius: 0;
  padding: 7px 18px;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-pending-banner[hidden] { display: none; }
.exchange-pending-banner-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8a327;
  animation: exchange-pulse-dot 1.2s ease-in-out infinite;
}
@keyframes exchange-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.exchange-pending-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
  font-weight: 700;
}
.exchange-pending-banner-sub { font-size: 11px; font-weight: 500; color: #8a6d1f; }
.exchange-pending-banner svg { flex-shrink: 0; color: #8a6d1f; }

.exchange-icon-btn {
  border: none;
  background: none;
  color: var(--exchange-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-icon-btn:hover,
.exchange-icon-btn:focus,
.exchange-icon-btn:active { background: none; outline: none; }

.exchange-balance { align-items: center; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.exchange-balance__label { font-size: 15px; font-weight: 500; color: var(--exchange-ink); margin-bottom: 4px; }
.exchange-balance__usd-row { align-items: baseline; display: flex; flex-wrap: wrap; gap: 5px; }
.exchange-balance__usd-label { color: var(--exchange-ink); font-size: 13px; font-weight: 520; letter-spacing: 0; line-height: 1; }
.exchange-balance__value { font-size: 24.5px; font-weight: 470; letter-spacing: -0.018em; line-height: 1; color: var(--exchange-ink); }
.exchange-balance__idr-row {
  color: var(--exchange-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.24px;
  line-height: normal;
  margin-top: 5px;
}
.exchange-balance__convert {
  appearance: none;
  -webkit-appearance: none;
  background: #111114;
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  height: 34px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 11px;
  -webkit-tap-highlight-color: transparent;
}


.exchange-field { display: block; margin-bottom: 20px; margin-top: -10px; -webkit-tap-highlight-color: transparent; }
.exchange-field__label { display: block; font-size: 15px; font-weight: 500; color: var(--exchange-ink); margin-bottom: 12px; }
.exchange-field__input-wrap { position: relative; display: block; }
.exchange-field__search-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--exchange-muted);
  pointer-events: none;
}
.exchange-field__input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--exchange-line);
  font-size: 16px;
  padding: 6px 2px 10px 32px;
  color: var(--exchange-ink);
  outline: none;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-field__input::placeholder { color: #9a9a9a; }
.exchange-field__input:focus { border-bottom-color: var(--exchange-ink); }


.exchange-tabs {
  display: flex;
  background: #e9e9e9;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 28px;
}
.exchange-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--exchange-muted);
  border-radius: 999px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.exchange-tab--active {
  background: #fff;
  color: var(--exchange-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}


.exchange-fields {
  display: flex;
  flex-direction: column;
}
#exchange-pay-group { order: 1; }
.exchange-swap-btn { order: 2; }
#exchange-hint { order: 3; }
#exchange-receive-group { order: 4; }
#exchange-receive-hint { order: 5; }
#exchange-rate { order: 6; }
.exchange-field-group { margin-bottom: 6px; }
.exchange-field-group__label { display: block; font-size: 13px; font-weight: 400; color: #6E6E73; margin-bottom: 10px; }
.exchange-field-group__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--exchange-line);
  padding-bottom: 12px;
}
.exchange-field-group__row:focus-within { border-bottom-color: var(--exchange-ink); }
.exchange-field-group__input {
  border: none;
  outline: none;
  font-size: 28px;
  font-weight: 600;
  color: var(--exchange-ink);
  font-family: inherit;
  width: 100%;
  padding: 0;
  background: transparent;
}
.exchange-field-group__input::placeholder { color: #c7c7c7; }
.exchange-field-group__input:read-only { color: var(--exchange-ink); }

.exchange-max-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #C9A646;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 2px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-max-btn:active { color: #C9A646; }
.exchange-max-btn::after {
  content: "|";
  color: #d1d1d1;
  margin-left: 8px;
  font-weight: 400;
}

.exchange-swap-btn {
  align-self: center;
  width: 36px;
  height: 36px;
  margin: -25px 0 -11px;
  border: 0.5px solid #eeeeee;
  border-radius: 50%;
  background: #fff;
  color: #6E6E73;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-swap-btn:active {
  background: #f2f2f2;
  transform: scale(0.96);
}
.exchange-fields:has(#exchange-pay-group .exchange-field-group__row:focus-within) .exchange-swap-btn {
  border-color: var(--exchange-ink);
}
.exchange-swap-btn[hidden] { display: none; }

.exchange-currency-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  height: 32px;
  border: none;
  background: var(--exchange-pill);
  color: var(--exchange-ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 0 9px 0 3px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-currency-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.exchange-currency-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}
.exchange-currency-option-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}
.exchange-currency-icon--usdt {
  background: #26a17b;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.exchange-currency-code { font-size: 15px; font-weight: 500; color: var(--exchange-ink); line-height: 1; }
.exchange-currency-chevron {
  flex-shrink: 0;
  color: var(--exchange-muted);
}
.exchange-currency-search-wrap {
  position: relative;
  width: calc(100% + 8px);
  margin-left: -4px;
  margin-right: -4px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.exchange-currency-search-icon {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--exchange-muted);
  pointer-events: none;
}
.exchange-currency-search {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--exchange-line);
  border-radius: 0;
  padding: 6px 40px 10px 32px;
  font-size: 16px;
  font-family: inherit;
  color: var(--exchange-ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-currency-search:focus { border-bottom-color: var(--exchange-ink); }
.exchange-currency-search::placeholder { color: #9a9a9a; }
.exchange-currency-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--exchange-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 6px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-currency-search-clear[hidden] { display: none; }
.exchange-currency-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 55vh;
  overflow-y: auto;
  width: calc(100% + 8px);
  margin-left: -4px;
  margin-right: -4px;
  scrollbar-width: none;
}
#exchange-crypto-list {
  height: auto;
}
.exchange-currency-list::-webkit-scrollbar { display: none; }
.exchange-currency-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--exchange-ink);
  font-family: inherit;
  text-align: left;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.exchange-currency-option:active { background: #f2f2f2; }
.exchange-currency-option-text { flex: 1; min-width: 0; }
.exchange-currency-option-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exchange-currency-option-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  overflow: hidden;
  background: #fff;
}
.exchange-flag-icon {
  border: 1px solid #dedede;
}
.exchange-currency-option-code { font-size: 14px; font-weight: 500; }
.exchange-currency-option-name { font-size: 13px; font-weight: 400; color: #6E6E73; margin-top: 1px; }
.exchange-currency-empty { text-align: center; color: var(--exchange-muted); font-size: 14px; padding: 24px 0; }

.exchange-hint {
  font-size: 13px;
  font-weight: 400;
  color: #6E6E73;
  margin: 10px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.exchange-rate {
  display: inline-block;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 400;
  color: #6E6E73;
  margin: 0 0 22px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--exchange-muted);
}
.exchange-rate[hidden] { display: none; }

.exchange-note { font-size: 13px; font-weight: 400; color: #6E6E73; line-height: 1.55; margin-bottom: 26px; }
.exchange-note--convert { margin-top: 6px; }

.exchange-btn-primary {
  width: 100%;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 17px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}

.exchange-btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.exchange-transaction-list { margin-top: 4px; }

body.exchange-tx-scroll .exchange-pinned-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  padding-bottom: 12px;
}
body.exchange-tx-scroll .exchange-tabs {
  margin-bottom: 0;
}
body.exchange-tx-scroll .exchange-transaction-list {
  padding-top: 8px;
}

.exchange-skeleton {
  display: block;
  border-radius: 6px;
  background: var(--exchange-thumb);
  animation: exchange-skeleton-pulse 1.1s ease-in-out infinite;
}
@keyframes exchange-skeleton-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

body.exchange-rates-loading #exchange-hint,
body.exchange-fields-loading #exchange-hint {
  width: fit-content;
  max-width: 100%;
  color: transparent;
  background: var(--exchange-thumb);
  border-color: transparent;
  border-radius: 6px;
  animation: exchange-skeleton-pulse 1.1s ease-in-out infinite;
  user-select: none;
}

body.exchange-rates-loading #exchange-receive-hint,
body.exchange-fields-loading #exchange-receive-hint {
  width: fit-content;
  max-width: 100%;
  color: transparent;
  background: var(--exchange-thumb);
  border-color: transparent;
  border-radius: 6px;
  animation: exchange-skeleton-pulse 1.1s ease-in-out infinite;
  user-select: none;
}

body.exchange-rates-loading #exchange-rate,
body.exchange-fields-loading #exchange-rate {
  width: fit-content;
  max-width: 100%;
  color: transparent;
  background: var(--exchange-thumb);
  border-color: transparent;
  border-radius: 6px;
  animation: exchange-skeleton-pulse 1.1s ease-in-out infinite;
  user-select: none;
}

body.exchange-rates-loading #exchange-balance-value,
body.exchange-rates-loading #exchange-balance-idr,
body.exchange-fields-loading #exchange-balance-value,
body.exchange-fields-loading #exchange-balance-idr {
  width: fit-content;
  max-width: 100%;
  color: transparent;
  background: var(--exchange-thumb);
  border-radius: 6px;
  animation: exchange-skeleton-pulse 1.1s ease-in-out infinite;
  user-select: none;
}

.exchange-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  box-shadow: 0 1px 0 0 var(--exchange-line);
}
.exchange-tx-empty { text-align: center; color: var(--exchange-muted); font-size: 14px; padding: 40px 0; }
.exchange-tx-empty--skeleton .exchange-skeleton {
  width: 190px;
  height: 17px;
  margin: 0 auto;
}
.exchange-tx-item:first-child { padding-top: 0; }
.exchange-tx-item:last-child { box-shadow: none; }

.exchange-tx-left { min-width: 0; }
.exchange-tx-title { font-size: 15px; font-weight: 550; line-height: 1.3; margin-bottom: 6px; }
.exchange-tx-title b { font-weight: 550; }
.exchange-tx-type--buy { color: #17824f; }
.exchange-tx-type--sell { color: #c22a4d; }
.exchange-tx-date { font-size: 13px; font-weight: 400; line-height: 1.3; color: #6E6E73; margin-bottom: 10px; }
.exchange-tx-line { font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--exchange-ink); margin-bottom: 3px; }

.exchange-tx-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; }
.exchange-tx-status-row { display: flex; align-items: center; gap: 2px; line-height: 1.3; margin-bottom: 10px; cursor: pointer; }
.exchange-tx-status { font-size: 13px; font-weight: 400; }
.exchange-tx-status--cancelled { color: var(--exchange-red, #e60023); }
.exchange-tx-status--progress { color: var(--exchange-muted); }
.exchange-tx-status--completed { color: var(--exchange-green, #1a9d4b); }
.exchange-tx-chevron { color: var(--exchange-muted); }
.exchange-tx-amount { font-size: 15px; font-weight: 550; line-height: 1.3; margin-bottom: 14px; }

.exchange-tx-chat {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--exchange-pill);
  color: var(--exchange-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}


.exchange-tx-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; position: relative; }
.exchange-tx-detail-title { font-size: 18px; font-weight: 700; color: #111; margin: 0; }
.exchange-tx-detail-status { font-size: 14px; font-weight: 500; margin: 0 0 22px; }
.exchange-tx-detail-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.exchange-tx-detail-section-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--exchange-ink);
  margin: 4px 0 -2px;
}
#exchange-tx-detail-bank-rows,
#exchange-tx-detail-crypto-rows,
#exchange-send-payment-bank-rows,
#exchange-send-payment-crypto-rows { display: flex; flex-direction: column; gap: 14px; }
#exchange-tx-detail-bank-rows[hidden],
#exchange-tx-detail-crypto-rows[hidden],
#exchange-send-payment-bank-rows[hidden],
#exchange-send-payment-crypto-rows[hidden] { display: none; }
.exchange-tx-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.exchange-tx-detail-row[hidden] { display: none; }

.exchange-seller-bank-section { margin-bottom: 22px; display: flex; flex-direction: column; gap: 12px; }
.exchange-seller-bank-section[hidden] { display: none; }
.exchange-seller-bank-card {
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid var(--exchange-line);
  border-radius: 14px;
  background: #fafafa;
}
.exchange-seller-bank-card[hidden] { display: none; }
.exchange-seller-bank-change {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--exchange-ink);
  text-decoration: underline;
}
.exchange-seller-bank-change[hidden] { display: none; }
.exchange-seller-account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exchange-seller-account-edit {
  font-size: 13px;
  font-weight: 500;
  color: var(--exchange-ink);
  text-decoration: underline;
}
.exchange-tx-detail-row span:first-child { font-size: 13px; font-weight: 400; color: #6E6E73; }
.exchange-tx-detail-row span:last-child { font-size: 14px; font-weight: 500; color: var(--exchange-ink); text-align: right; }
.exchange-tx-detail-row--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.exchange-tx-detail-row--stack span:last-child {
  text-align: left;
  word-break: break-all;
}
.exchange-tx-detail-row--wrap {
  align-items: flex-start;
  gap: 48px;
}
.exchange-tx-detail-row--wrap span:first-child { flex: 0 0 auto; }
.exchange-tx-detail-row--wrap span:last-child {
  flex: 1 1 0%;
  min-width: 0;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-align: right;
}
.exchange-tx-detail-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.exchange-tx-detail-row--stack .exchange-tx-detail-copy-row { width: 100%; }
.exchange-tx-detail-copy-row span {
  word-break: break-all;
  text-align: left;
}
#exchange-tx-detail-crypto-address,
#exchange-tx-detail-bank-number,
#exchange-send-payment-bank-number,
#exchange-send-payment-crypto-address {
  color: var(--exchange-ink);
  font-weight: 500;
}
.exchange-tx-detail-copy-btn {
  flex-shrink: 0;
  border: none;
  background: var(--exchange-pill);
  color: #111;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-tx-detail-copy-btn[hidden] { display: none; }
.exchange-tx-detail-note {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #6E6E73;
  margin: 2px 0 0;
}
.exchange-tx-detail-note[hidden] { display: none; }
.exchange-tx-detail-proof-btn {
  border: 1px solid var(--exchange-line);
  background: #fff;
  color: var(--exchange-ink);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-proof-image { display: flex; flex-direction: column; padding: 8px 0 4px; }
.exchange-proof-gallery {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  touch-action: pan-y;
}
.exchange-proof-gallery-track {
  display: flex;
  transition: transform 0.25s ease;
}
.exchange-proof-gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.exchange-proof-gallery-slide img {
  width: 100%;
  max-height: 60vh;
  border-radius: 10px;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.exchange-proof-gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.exchange-proof-gallery-dots[hidden] { display: none; }
.exchange-proof-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--exchange-line); }
.exchange-proof-gallery-dot--active { background: #111; }
.exchange-proof-hidden { display: none !important; }

.exchange-proof-upload-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--exchange-line);
  background: #fafafa;
  color: var(--exchange-muted);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 6px;
}
.exchange-proof-upload-btn[hidden] { display: none; }

.exchange-proof-waiting { cursor: default; }

.exchange-proof-uploaded { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.exchange-proof-uploaded[hidden] { display: none; }
.exchange-proof-thumb-wrap { position: relative; flex-shrink: 0; display: flex; }
.exchange-proof-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--exchange-line);
  flex-shrink: 0;
}
.exchange-proof-thumb-count {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.exchange-proof-thumb-count[hidden] { display: none; }
.exchange-proof-uploaded-actions { display: flex; gap: 8px; flex: 1; }
.exchange-proof-delete-btn { color: var(--exchange-red); border-color: var(--exchange-red); }
.exchange-proof-uploaded-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0.5px solid var(--exchange-line);
  background: #fff;
  color: var(--exchange-ink);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-proof-uploaded-btn[hidden] { display: none; }


.exchange-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 430px;
  max-width: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  overflow: hidden;
}
.exchange-overlay[hidden] { display: none; }
.exchange-sheet {
  width: 430px;
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 22px 22px max(22px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 8px rgba(0,0,0,.05);
  animation: exchange-slideUp .28s ease;
}
@keyframes exchange-slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (hover: hover) and (pointer: fine) {
  html,
  body { background: #000; }
}

.exchange-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; position: relative; }
.exchange-currency-sheet-heading { display: flex; flex-direction: column; gap: 4px; }
.exchange-currency-sheet-sub { font-size: 13px; font-weight: 400; color: #6E6E73; margin: 0; }
.exchange-sheet-head::before,
.exchange-tx-detail-head::before,
.exchange-matching::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: #e2e2e2;
}
.exchange-close-sheet-btn-cls {
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #111;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-left: auto;
  margin-right: 6px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.exchange-close-sheet-btn-cls:focus,
.exchange-close-sheet-btn-cls:active,
.exchange-close-sheet-btn-cls:hover {
  outline: none;
  box-shadow: none;
  background: transparent;
}
.exchange-sheet-title { font-size: 18px; font-weight: 700; color: #111; margin: 0; }
.exchange-sheet-sub { font-size: 13px; color: #8a8a8a; }

.exchange-balance-convert-sheet {
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
.exchange-balance-convert-card {
  margin: 18px 0 22px;
  padding: 16px;
  border-radius: 14px;
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exchange-balance-convert-label,
.exchange-balance-convert-local {
  color: var(--exchange-muted);
  font-size: 13px;
}
.exchange-sheet-convert-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.exchange-sheet-convert-row > div:first-child { display: flex; flex-direction: column; gap: 5px; }
.exchange-sheet-convert-amount { color: var(--exchange-ink); font-size: 27px; font-weight: 500; line-height: 1; }
.exchange-sheet-convert-divider { height: 1px; background: var(--exchange-line); margin: 12px 0; }
.exchange-sheet-convert-currency {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--exchange-ink);
  font-size: 15px;
  font-weight: 500;
}
.exchange-sheet-convert-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.exchange-sheet-convert-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
#exchange-balance-convert-success-close,
#exchange-balance-convert-failed-close {
  width: 100%;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
}
.exchange-convert-failed-outer {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fdecec;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.exchange-convert-failed-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #d92d20;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exchange-sheet-content-group { display: flex; flex-direction: column; gap: 0; }
.exchange-amount-box { margin: 0 0 22px; }
.exchange-amount-label { font-size: 13px; font-weight: 400; color: #6E6E73; }
.exchange-amount-value { font-size: 24.5px; font-weight: 470; letter-spacing: -0.018em; line-height: 1; color: var(--exchange-ink); margin-top: 4px; }

.exchange-method-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.exchange-method-title { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--exchange-ink); margin: 0; }
.exchange-method-order { font-size: 13px; font-weight: 400; color: #6E6E73; margin: 0; }
.exchange-methods { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.exchange-method {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid var(--exchange-line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 15px;
}
.exchange-method.exchange-selected { border-color: var(--exchange-line); background: #f2f2f2; }
.exchange-method .exchange-m-icon {
  flex-shrink: 0;
  width: 24px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}
.exchange-method .exchange-m-icon svg {
  display: block;
  height: 24px;
  width: 24px;
}
.exchange-method .exchange-m-icon--btc {
  align-items: center;
  border: 1.7px solid currentColor;
  border-radius: 50%;
  display: flex;
  font-size: 18px;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.exchange-method .exchange-m-body { flex: 1; }
.exchange-method .exchange-m-name { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--exchange-ink); }
.exchange-method .exchange-m-sub { font-size: 13px; font-weight: 400; color: #6E6E73; margin-top: 2px; }
.exchange-method .exchange-m-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid #c8c8c8;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.exchange-method.exchange-selected .exchange-m-radio { border-color: #777; }
.exchange-method .exchange-m-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.exchange-method.exchange-selected .exchange-m-radio::after { background: #111; }


.exchange-slide-pay {
  position: relative;
  width: 100%;
  height: 52px;
  background: #111;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  touch-action: none;
}
.exchange-slide-pay__label {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  font-family: inherit;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.15s ease;
}
.exchange-slide-pay__handle {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.exchange-slide-pay__handle:active { cursor: grabbing; }
.exchange-slide-pay.exchange-is-dragging .exchange-slide-pay__handle { transition: none; }
.exchange-slide-pay:not(.exchange-is-dragging) .exchange-slide-pay__handle { transition: transform 0.2s ease; }
.exchange-slide-pay--disabled { opacity: 0.4; pointer-events: none; }


.exchange-matching { position: relative; text-align: center; padding: 30px 0 4px; }
.exchange-matching-back {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  fill: #111;
  color: #111;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-matching[hidden] { display: none; }
.exchange-matching-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 4px solid var(--exchange-line);
  border-top-color: #111;
  animation: exchange-spin 0.8s linear infinite;
}
@keyframes exchange-spin {
  to { transform: rotate(360deg); }
}
.exchange-matching-title { font-size: 18px; font-weight: 700; color: #111; margin: 0 0 6px; }
.exchange-matching-sub { font-size: 13px; font-weight: 400; color: #6E6E73; margin: 0; }
.exchange-matching-help { font-size: 13px; font-weight: 400; color: #6E6E73; margin: 10px 0 0; line-height: 1.5; }
.exchange-matching-help-link { color: #111; font-weight: 600; text-decoration: underline; cursor: pointer; }
#exchange-success-report {
  margin: -16px 0 20px;
}
#exchange-proof-waiting-report {
  margin: -2px 0 8px;
}
.exchange-matching-timer { font-size: 13px; font-weight: 400; color: #6E6E73; margin: 18px 0 0; }
.exchange-matching-timer span { font-weight: 700; color: #111; }
.exchange-matching-cancel {
  width: 100%;
  border: none;
  background: var(--exchange-pill);
  color: #111;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 22px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}


.exchange-success { text-align: center; padding: 14px 0 6px; }
.exchange-success[hidden] { display: none; }
#exchange-success-view { margin-bottom: -14px; }
.exchange-check-outer { width: 76px; height: 76px; border-radius: 50%; background: #e8f7ee; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.exchange-check-inner { width: 52px; height: 52px; border-radius: 50%; background: var(--exchange-green); color: #fff; font-size: 28px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.exchange-check-outer--pending { background: #fdf3e2; }
.exchange-check-inner--pending { background: #d98c1f; }
.exchange-success-title { font-size: 20px; font-weight: 800; color: #111; margin: 0 0 6px; }
.exchange-success-text { font-size: 14px; color: #6a6a6a; line-height: 1.5; margin: 0 0 6px; }
.exchange-success-sub { font-size: 13.5px; color: #8a8a8a; line-height: 1.5; margin: 0 0 24px; }
.exchange-done-btn {
  width: 100%; border: none; cursor: pointer;
  background: #111; color: #fff; font-family: inherit; font-weight: 700; font-size: 16px;
  padding: 11px 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  margin: 0;
  white-space: nowrap;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .exchange-field__input { border-bottom-width: 0.5px; }
  .exchange-field-group__row { border-bottom-width: 0.5px; }
  .exchange-tx-item { box-shadow: 0 0.5px 0 0 var(--exchange-line); }
  .exchange-tx-item:last-child { box-shadow: none; }
  .exchange-currency-search { border-bottom-width: 0.5px; }
  .exchange-tab { border-width: 0.5px; }
  .exchange-method { border-width: 0.5px; }
  .exchange-seller-bank-card { border-width: 0.5px; }
  .exchange-tx-detail-proof-btn { border-width: 0.5px; }
}


.exchange-pin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.exchange-pin-back {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  fill: #111;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.exchange-pin-back:hover,
.exchange-pin-back:focus,
.exchange-pin-back:active { background: none; outline: none; }
.exchange-pin-title { font-size: 18px; font-weight: 700; color: #111; margin: 0; }
.exchange-pin-sub { font-size: 13px; font-weight: 400; color: var(--exchange-muted); margin: 0 0 22px; }
.exchange-pin-dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; }
.exchange-pin-dots .exchange-pd { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #111; }
.exchange-pin-dots .exchange-pd.exchange-on { background: #111; }
.exchange-pin-notice { display: grid; margin: 0 0 14px; }
.exchange-pin-notice > * { grid-area: 1 / 1; }
.exchange-pin-error { text-align: center; color: #e60023; font-size: 13px; font-weight: 600; margin: 0; visibility: hidden; }
.exchange-pin-error.exchange-is-visible { visibility: visible; }
.exchange-pin-error.exchange-is-success { color: #1a9d4b; }
.exchange-pin-forgot { text-align: center; color: var(--exchange-muted); font-size: 13px; font-weight: 400; margin: 0; visibility: visible; }
.exchange-pin-notice.exchange-is-notice .exchange-pin-forgot { visibility: hidden; }
.exchange-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exchange-keypad .exchange-key {
  border: none; cursor: pointer; background: #f2f2f2; color: #111;
  font-family: inherit; font-weight: 700; font-size: 18px;
  padding: 16px 0; border-radius: 12px;
}
.exchange-keypad .exchange-key.exchange-blank { background: transparent; cursor: default; }
.exchange-keypad .exchange-key.exchange-action { background: transparent; font-size: 16px; font-weight: 700; color: #111; }
