* {
  box-sizing: border-box;
}

/* Semantic hidden state must win over component display declarations. */
[hidden] {
  display: none !important;
}

html {
  background: var(--color-bg-canvas);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

html.i18n-pending [data-i18n],
html.i18n-pending [data-i18n-placeholder],
html.i18n-pending [data-i18n-title],
html.i18n-pending [data-i18n-aria-label],
html.i18n-pending [data-i18n-alt] {
  visibility: hidden;
}

button,
input,
select {
  font: inherit;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button,
a,
[role="button"],
.select-trigger,
.form-select-trigger,
.picker-panel button,
.language-options button {
  -webkit-tap-highlight-color: transparent;
}

button {
  appearance: none;
  cursor: pointer;
}

:where(button, a, [role="button"], .select-trigger, .form-select-trigger):focus:not(:focus-visible) {
  outline: none;
}

/* Keep keyboard navigation visible without showing a ring for pointer input. */
:where(button, a, [role="button"], input, select, textarea, .select-trigger, .form-select-trigger):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

select {
  appearance: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.phone-page {
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  padding: 18px 18px calc(136px + env(safe-area-inset-bottom));
  background: var(--bg);
  animation: page-enter 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: opacity, transform;
}

body.page-transition-leaving .phone-page {
  pointer-events: none;
  animation: page-leave 130ms cubic-bezier(0.4, 0, 1, 1) both;
}

body.page-transition-leaving .bottom-nav {
  pointer-events: none;
}

@keyframes page-enter {
  from {
    opacity: 0.001;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes page-leave {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.001;
    transform: translate3d(0, -4px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .phone-page,
  body.page-transition-leaving .phone-page {
    animation: none;
    transform: none;
  }
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--black);
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.segmented-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 3px;
  border-radius: 18px;
  background: #f4f4f4;
}

.segmented-tabs span,
.segmented-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 15px;
  color: #555555;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.segmented-tabs .active {
  background: #ffffff;
  color: var(--black);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.muted {
  color: var(--muted);
}

.green {
  color: var(--green-2);
}

.red {
  color: var(--red);
}

.is-loading {
  display: inline-block;
  min-height: 1em;
  vertical-align: middle;
  /* Loading placeholders must never briefly expose stale account values. */
  color: transparent !important;
  border-radius: 6px;
  background: linear-gradient(90deg, #eeeeee 25%, #f7f7f7 50%, #eeeeee 75%);
  background-size: 200% 100%;
  animation: value-loading 1.1s linear infinite;
  user-select: none;
}

[data-asset-total].is-loading {
  display: inline-block;
  min-width: 150px;
}

[data-asset-change].is-loading {
  display: inline-block;
  min-width: 128px;
}

[data-asset-total-card].is-loading,
[data-holding-value].is-loading {
  display: inline-block;
  min-width: 86px;
}

[data-holding-price].is-loading {
  display: inline-block;
  min-width: 74px;
  min-height: 14px;
}

@keyframes value-loading {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.small-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #222222;
  font-size: 13px;
  text-decoration: none;
}

.primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 22px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 22px;
  background: #f2f2f2;
  color: #111111;
  font-weight: 800;
  text-decoration: none;
}

.max-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: #111111;
  color: #ffffff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.field-hint {
  color: #777777;
  font-size: 12px;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: #f7f7f7;
  color: #111111;
  padding: 0 14px;
  font-weight: 900;
}

.select-trigger.compact {
  background: #ffffff;
}

.select-trigger svg {
  width: 18px;
  height: 18px;
  transition: transform 180ms ease;
}

.picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

.picker-sheet.open {
  display: block;
}

.picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  animation: picker-fade 160ms ease forwards;
}

.picker-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(430px, 100vw);
  padding: 18px;
  border-radius: 22px 22px 0 0;
  background: #ffffff;
  transform: translate(-50%, 100%);
  animation: picker-up 200ms ease forwards;
}

.picker-panel h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.picker-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #f7f7f7;
  color: #111111;
  padding: 0 14px;
  margin-top: 8px;
  font-weight: 900;
}

.picker-panel .picker-coin-option {
  justify-content: flex-start;
  gap: 12px;
}

.picker-panel .picker-coin-option b {
  font-size: 16px;
}

.confirm-dialog {
  width: min(370px, calc(100vw - 36px));
  border: 0;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.22);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.confirm-dialog h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.confirm-dialog p {
  margin: 0 0 18px;
  color: #555555;
  line-height: 1.6;
}

.result-dialog {
  width: min(360px, calc(100vw - 36px));
  max-width: calc(100vw - 32px);
  max-height: min(78vh, 560px);
  box-sizing: border-box;
  border: 0;
  border-radius: 20px;
  padding: 22px 18px 18px;
  background: #ffffff;
  color: #111111;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.22);
}

.result-dialog[open] {
  position: fixed;
  inset: 50% auto auto 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

.result-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.result-dialog-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eaf8ee;
  color: var(--green);
}

.result-dialog[data-type="error"] .result-dialog-icon {
  background: #fff0f1;
  color: var(--red);
}

.result-dialog-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 3;
}

.result-dialog h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.result-dialog p {
  max-height: 220px;
  margin: 0 auto 18px;
  color: #666666;
  line-height: 1.55;
  font-size: 14px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

.kyc-required-dialog {
  width: min(360px, calc(100vw - 40px));
  padding: 22px 18px 18px;
}

.kyc-required-dialog .result-dialog-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  background: #eaf8ee;
  color: var(--green);
}

.kyc-required-dialog h2 {
  margin-bottom: 10px;
  font-size: 23px;
}

.kyc-required-dialog p {
  max-width: 270px;
  margin-bottom: 18px;
}

.kyc-required-dialog [data-kyc-required-close] {
  width: 100%;
  min-height: 42px;
  border-radius: 22px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.home-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.home-popup.open {
  pointer-events: auto;
  opacity: 1;
}

.home-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.46);
}

.home-popup-panel {
  position: relative;
  width: min(352px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  display: grid;
  gap: 12px;
  padding: 24px 18px 18px;
  border-radius: 18px;
  background: #ffffff;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms ease;
}

.home-popup.open .home-popup-panel {
  transform: translateY(0) scale(1);
}

.home-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.home-popup-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 8px;
  margin: 0;
  border-radius: 999px;
  background: #f4f4f4;
  color: #777777;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-popup-panel h2 {
  margin: 22px 0 4px;
  color: #111111;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-popup-panel p {
  margin: 8px auto 0;
  max-width: 100%;
  color: #555555;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.home-popup-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-popup-actions a,
.home-popup-actions button {
  width: 100%;
  text-decoration: none;
}

@keyframes picker-fade {
  to {
    opacity: 1;
  }
}

@keyframes picker-up {
  to {
    transform: translate(-50%, 0);
  }
}

.soft-card {
  border-radius: 16px;
  background: var(--card);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(430px, 100vw);
  min-height: 76px;
  padding: 9px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  color: #888888;
  font-size: 11px;
  text-decoration: none;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.bottom-nav a.active {
  color: var(--black);
  font-weight: 800;
}

.bottom-nav .trade-fab {
  width: 56px;
  height: 56px;
  margin-top: -20px;
  border-radius: 50%;
  background: var(--black);
  color: #ffffff;
  border: 4px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.bottom-nav .trade-fab svg {
  width: 22px;
  height: 22px;
}

.bottom-nav .trade-fab span {
  margin-top: -3px;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
}

.side-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: #f7f7f7;
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(430px, 100vw);
  padding: 18px 18px 22px;
  overflow-y: auto;
  background: #f7f7f7;
  transform: translateX(-50%);
  scrollbar-width: none;
}

.drawer-panel::-webkit-scrollbar {
  display: none;
}

.side-drawer.open {
  display: block;
}

.drawer-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
}

.drawer-status .language-menu {
  display: none;
}

.language-menu {
  position: relative;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 12px;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.language-trigger svg {
  width: 16px;
  height: 16px;
  transition: transform 180ms ease;
}

.language-menu.open .language-trigger svg {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 132px;
  padding: 8px;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.language-menu.open .language-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.language-options button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0 10px;
  color: #555555;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.language-options button:hover,
.language-options button.active {
  background: #f4f4f4;
  color: #111111;
}

.settings-language-menu {
  position: relative;
  width: 100%;
  margin-bottom: 2px;
}

.settings-language-menu .language-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  justify-content: initial;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.settings-language-menu .language-trigger span:first-child {
  min-width: 0;
  text-align: left;
}

.settings-language-menu .language-trigger [data-language-label] {
  justify-self: end;
  text-align: right;
}

.settings-language-menu .language-trigger svg {
  justify-self: end;
}

.settings-language-menu .language-options {
  left: 0;
  right: 0;
  min-width: 0;
  transform-origin: top center;
}

.drawer-profile {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 22px 0 18px;
}

.avatar-photo {
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.25), transparent 18%),
    linear-gradient(135deg, #17100c, #d66b05 48%, #27130a);
}

.avatar-upload input {
  display: none;
}

.guest-avatar {
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(135deg, #dfe5ef, #a8b2c6 52%, #e8edf5);
}

.drawer-profile h2 {
  max-width: 100%;
  margin: 0;
  display: block;
  overflow: visible;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.drawer-profile-main {
  min-width: 0;
}

.drawer-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.drawer-role-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  border-radius: 999px;
  background: #fff7ec;
  color: #b57920;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.drawer-role-pill i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #c97919;
}

.drawer-uid {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: #eeeeee;
  color: #777777;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.drawer-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.drawer-profile-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 0;
  border-radius: 15px;
  background: #eeeeee;
  color: #555555;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.drawer-profile-actions .drawer-qr-button {
  width: 30px;
  flex: 0 0 30px;
  padding: 0;
}

.account-settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
}

.account-settings-sheet.open {
  display: block;
}

.account-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
  opacity: 0;
  animation: picker-fade 160ms ease forwards;
}

.account-settings-panel {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: min(430px, 100vw);
  padding: 18px 18px 28px;
  overflow-y: auto;
  background: #f7f7f7;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  animation: settings-in 180ms ease forwards;
  scrollbar-width: none;
}

.account-settings-panel::-webkit-scrollbar {
  display: none;
}

.account-settings-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 48px;
  margin-bottom: 18px;
}

.account-settings-header h2 {
  margin: 0;
  text-align: center;
  font-size: 20px;
}

.settings-summary-card {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 15px 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.settings-summary-card strong {
  font-size: 17px;
  font-weight: 900;
}

.settings-summary-card p {
  margin: 0;
  color: #777777;
  font-size: 13px;
  line-height: 1.45;
}

.settings-action-list,
.settings-form {
  display: grid;
  gap: 10px;
}

.settings-action-list {
  margin-bottom: 18px;
}

.settings-group-title {
  margin: 8px 2px 0;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.settings-action-list > button {
  display: grid;
  grid-template-columns: 28px 1fr 22px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  padding: 0 14px;
  text-align: left;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.settings-action-list > button.is-active {
  background: #eef8f0;
  color: var(--green);
}

.settings-action-list > button svg {
  width: 21px;
  height: 21px;
}

.settings-action-list > button.danger {
  color: #d94c58;
}

.settings-form {
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.settings-form-head {
  display: grid;
  gap: 5px;
}

.settings-form-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.settings-form-head p {
  margin: 0;
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

.settings-form label {
  display: grid;
  gap: 8px;
  color: #666666;
  font-size: 13px;
  font-weight: 800;
}

.settings-form input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f5;
  color: #111111;
  padding: 0 13px;
  font-size: 15px;
  font-weight: 800;
}

.device-session-list {
  display: grid;
  gap: 10px;
}

.device-session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.device-session-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.device-session-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.device-session-card span,
.device-session-empty {
  margin: 0;
  color: #777777;
  font-size: 12px;
  line-height: 1.4;
}

.device-session-card .outline-pill {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.settings-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef8f0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.45;
}

.settings-status[data-type="error"] {
  background: #fff0f1;
  color: var(--red);
}

@keyframes settings-in {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.drawer-profile-actions a.drawer-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 15px;
  background: #eeeeee;
  color: #555555;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.drawer-profile-actions a.drawer-auth-link.primary {
  background: var(--green);
  color: #ffffff;
}

.drawer-account-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.drawer-account-status article {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.drawer-account-status span {
  display: block;
  margin-bottom: 7px;
  color: #8a8a8a;
  font-size: 11px;
  line-height: 1.2;
}

.drawer-account-status strong {
  display: block;
  color: #111111;
  font-size: 15px;
  line-height: 1.2;
  word-break: keep-all;
}

.drawer-account-status strong.is-ok {
  color: var(--green);
}

.drawer-account-status strong.is-warn {
  color: #b57920;
}

.vip-card,
.drawer-card,
.drawer-about {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.vip-card {
  position: relative;
  margin-bottom: 14px;
  padding: 15px 14px 13px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(196, 151, 83, 0.14), transparent 42%),
    #ffffff;
}

.vip-card > button {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #999999;
}

.vip-card h3 {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 14px;
  color: #b48a4a;
  font-size: 17px;
}

.vip-card div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: #7b633c;
  font-size: 11px;
}

.vip-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.drawer-card {
  margin-bottom: 14px;
  padding: 16px 16px 18px;
}

.drawer-card h3,
.drawer-section-head h3 {
  margin: 0;
  font-size: 18px;
}

.drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-card > h3 {
  margin-bottom: 18px;
}

.drawer-grid {
  display: grid;
  gap: 18px 12px;
}

.drawer-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.drawer-grid a {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 58px;
  min-width: 0;
  color: #151515;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.drawer-grid svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.drawer-about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 14px;
  color: #202020;
  font-size: 14px;
}

.drawer-about span,
.drawer-about b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.coin-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.coin-icon.has-image {
  background: transparent;
  color: #ffffff;
}

.coin-icon.has-image img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Use each source image's backing and visible bounds without adding a rim. */
.coin-icon.has-image[data-coin-symbol]:not(.image-failed) {
  position: relative;
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.coin-icon.has-image[data-coin-symbol]:not(.image-failed)::before {
  content: "";
  position: absolute;
  inset: var(--coin-icon-fill-inset, 0);
  border-radius: 50%;
  background: var(--coin-icon-fill, transparent);
}

.coin-icon.has-image img {
  position: relative;
  object-fit: contain;
  transform: scale(var(--coin-icon-scale, 1));
  transform-origin: center;
}

.coin-icon.has-image .coin-fallback {
  display: none;
}

.coin-icon.has-image.image-failed {
  background: #111111;
}

.coin-icon.has-image.image-failed .coin-fallback {
  display: block;
}

.coin-icon.teal {
  background: #17a49a;
}

.coin-icon.orange {
  background: #f5a524;
}

.coin-icon.blue {
  background: #5f89ff;
}

.coin-icon.black {
  background: #111111;
}

.coin-icon.line {
  border: 2px solid #104538;
  background: #c8f3dd;
  color: #104538;
}

@media (max-width: 380px) {
  .phone-page {
    padding: 16px 14px calc(144px + env(safe-area-inset-bottom));
  }

  .drawer-panel {
    padding: 16px 14px 22px;
  }

  .drawer-profile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 0 15px;
  }

  .avatar-photo {
    width: 58px;
    height: 58px;
  }

  .drawer-profile h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .drawer-profile-actions {
    gap: 6px;
  }

  .drawer-account-status {
    gap: 6px;
  }

  .drawer-account-status article {
    padding: 10px 7px;
  }

  .drawer-account-status span {
    font-size: 10px;
  }

  .drawer-account-status strong {
    font-size: 14px;
  }

  .drawer-card {
    padding: 15px 12px 17px;
  }

  .drawer-grid {
    gap: 20px 8px;
  }

  .drawer-grid a {
    gap: 8px;
    font-size: 10.5px;
  }
}

html,
body {
  background:
    radial-gradient(circle at 50% -10%, rgba(247, 167, 7, 0.1), transparent 30%),
    linear-gradient(180deg, var(--color-bg-canvas) 0%, var(--bg) 100%);
}

.phone-page {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, transparent 0 17%, rgba(247, 167, 7, 0.34) 17.1% 17.25%, transparent 17.35% 44%, rgba(247, 167, 7, 0.22) 44.1% 44.25%, transparent 44.35%),
    radial-gradient(circle at 96% 26%, rgba(247, 167, 7, 0.09) 0 1px, transparent 1.4px) 0 0 / 11px 11px,
    radial-gradient(circle at 50% -8%, rgba(247, 167, 7, 0.08), transparent 26%),
    linear-gradient(180deg, var(--color-bg-page) 0%, var(--page) 100%);
  color: var(--text);
}

.phone-page::before,
.phone-page::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(247, 167, 7, 0.28);
  opacity: 0.48;
  transform: rotate(30deg);
}

.phone-page::before {
  width: 210px;
  height: 210px;
  right: -128px;
  top: 80px;
}

.phone-page::after {
  width: 230px;
  height: 230px;
  left: -160px;
  bottom: 72px;
}

.phone-page > * {
  position: relative;
  z-index: 1;
}

.top-row,
.simple-header,
.trade-header,
.records-header,
.discover-header,
.market-detail-header,
.convert-header {
  color: var(--text);
}

.icon-button {
  color: var(--text);
}

.history-link-button,
.assets-overview-link {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.history-link-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line);
  background: var(--card);
  box-shadow: none;
}

.primary-pill,
.wide-button.primary-pill,
.drawer-profile-actions a.drawer-auth-link.primary {
  border: 0;
  background: var(--brand-gradient);
  color: var(--black);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 28%, transparent),
    0 6px 12px color-mix(in srgb, var(--brand) 14%, transparent);
}

.outline-pill,
.secondary-inline-button,
.select-trigger,
.form-select-trigger,
.stack-form input,
.picker-panel button,
.language-trigger {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card) 0%, var(--card-soft) 100%);
  color: var(--text);
  box-shadow: none;
}

.primary-pill:hover,
.outline-pill:hover,
.secondary-inline-button:hover {
  transform: translateY(-1px);
}

.operation-confirm-dialog[data-tone="danger"] .primary-pill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 88%, var(--text)), var(--red));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 24%, transparent),
    0 6px 12px color-mix(in srgb, var(--red) 14%, transparent);
}

.small-link,
.auth-switch a,
.news-link,
.view-more,
.bottom-nav a.active,
.form-card code,
.form-status,
.form-status[data-type="success"] {
  color: var(--brand);
}

.soft-card,
.form-card,
.market-info-card,
.drawer-card,
.settings-summary-card,
.settings-action-list button,
.confirm-dialog,
.result-dialog {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.96), rgba(10, 15, 21, 0.96));
  box-shadow: var(--shadow-soft);
}

.bottom-nav {
  min-height: 82px;
  border: 1px solid #1d232b;
  border-bottom: 0;
  border-radius: 0;
  background: rgba(6, 10, 15, 0.94);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.34);
}

.bottom-nav a {
  color: #8f96a2;
  font-size: 12px;
}

/* Account settings: Oh bits dark alignment */
.account-settings-panel {
  padding: 24px 17px calc(34px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--brand) 5%, transparent) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, var(--bg) 0%, var(--card-soft) 100%);
  background-size: auto, 154px 154px, auto;
  color: var(--text);
}

.account-settings-header {
  min-height: 44px;
  margin-bottom: 18px;
}

.account-settings-header .icon-button {
  color: var(--text);
}

.account-settings-header h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.settings-summary-card {
  min-height: 58px;
  margin-bottom: 26px;
  padding: 0 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 86% 26%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  box-shadow: none;
}

.settings-summary-card strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.settings-action-list {
  gap: 10px;
}

.settings-group-title {
  margin: 18px 2px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-language-menu {
  margin-bottom: 6px;
}

.settings-language-menu .language-trigger,
.settings-action-list > button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
  box-shadow: none;
}

.settings-language-menu .language-trigger {
  padding: 0 14px;
}

.settings-language-menu .language-trigger span:first-child,
.settings-action-list > button span {
  color: var(--text);
  font-weight: 900;
}

.settings-language-menu .language-trigger [data-language-label],
.settings-language-menu .language-trigger svg,
.settings-action-list > button > svg:last-child {
  color: var(--brand);
}

.settings-action-list > button {
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  gap: 12px;
  padding: 0 14px;
}

.settings-action-list > button > svg:first-child {
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.settings-action-list > button.is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, var(--card));
  color: var(--brand);
}

.settings-action-list > button.danger,
.settings-action-list > button.danger span,
.settings-action-list > button.danger > svg:last-child {
  color: var(--red);
}

.settings-action-list > button.danger > svg:first-child {
  border-color: color-mix(in srgb, var(--red) 36%, var(--line));
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}

.settings-language-menu .language-options {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--card-soft));
  box-shadow: var(--shadow-soft);
}

.settings-language-menu .language-options button {
  color: var(--muted);
}

.settings-language-menu .language-options button:hover,
.settings-language-menu .language-options button.active {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.settings-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--card), var(--card-soft));
  box-shadow: none;
}

.settings-form-head h3 {
  color: var(--text);
}

.settings-form-head p,
.settings-form label {
  color: var(--muted);
}

.settings-form input {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-soft) 78%, transparent);
  color: var(--text);
}

.settings-status {
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  color: var(--brand);
}

.settings-status[data-type="error"] {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red);
}

.bottom-nav a.active {
  color: var(--brand);
}

.bottom-nav svg {
  width: 24px;
  height: 24px;
}

.bottom-nav .trade-fab {
  width: auto;
  height: auto;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8f96a2;
  box-shadow: none;
}

.bottom-nav .trade-fab span {
  color: inherit;
  font-size: 12px;
}

.bottom-nav .trade-fab.active,
.bottom-nav .trade-fab.active span {
  color: var(--brand);
}

.is-loading {
  background: linear-gradient(90deg, #151b23 25%, #242b35 50%, #151b23 75%);
}

.drawer-panel,
.account-settings-panel,
.picker-panel,
.home-popup-panel {
  border-color: var(--line);
  background:
    radial-gradient(circle at 86% 0%, rgba(247, 167, 7, 0.1), transparent 28%),
    linear-gradient(180deg, #10161f 0%, #080d13 100%);
  color: var(--text);
}

.picker-backdrop,
.drawer-backdrop,
.account-settings-backdrop,
.home-popup-backdrop,
.confirm-dialog::backdrop,
.result-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.section-title h2,
.simple-header h1,
.trade-header h1,
.convert-header h1 {
  color: var(--text);
}

.coin-icon {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.coin-icon.teal {
  background: linear-gradient(135deg, #21c977, #10864f);
}

.coin-icon.orange {
  background: linear-gradient(135deg, #ffbd28, #f7931a);
}

.coin-icon.blue {
  background: linear-gradient(135deg, #6f7bff, #4e5cf3);
}

.coin-icon.black {
  background: #05070a;
}

@media (min-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(247, 167, 7, 0.12), transparent 28%),
      #020408;
  }

  .phone-page {
    border: 1px solid #1d232b;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  }
}

/* Oh bits dark drawer overrides */
.side-drawer .drawer-backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.side-drawer .drawer-panel {
  padding: 18px 18px 28px;
  border-right: 1px solid rgba(247, 167, 7, 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(247, 167, 7, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(247, 167, 7, 0.08) 0 1px, transparent 1px) 0 0 / 92px 92px,
    radial-gradient(circle, rgba(247, 167, 7, 0.16) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(180deg, #05080c 0%, #080d13 100%);
  color: var(--text);
}

.side-drawer .drawer-status .icon-button {
  color: var(--text);
}

.side-drawer .drawer-profile {
  margin: 4px 0 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(247, 167, 7, 0.18);
}

.side-drawer .avatar-photo {
  border: 2px solid rgba(247, 167, 7, 0.48);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.35), transparent 18%),
    linear-gradient(135deg, #1f2937, #05080c);
  box-shadow: 0 0 24px rgba(247, 167, 7, 0.18);
}

.side-drawer .drawer-profile h2,
.side-drawer .drawer-card h3,
.side-drawer .drawer-section-head h3 {
  color: var(--text);
}

.side-drawer .drawer-role-pill,
.side-drawer .drawer-uid {
  border: 1px solid rgba(247, 167, 7, 0.3);
  background: rgba(247, 167, 7, 0.1);
  color: var(--brand);
}

.side-drawer .drawer-role-pill i {
  background: var(--brand);
}

.side-drawer .drawer-profile-actions button,
.side-drawer .drawer-profile-actions a.drawer-auth-link {
  border: 1px solid rgba(247, 167, 7, 0.34);
  background: rgba(247, 167, 7, 0.08);
  color: var(--brand);
}

.side-drawer .drawer-profile-actions a.drawer-auth-link.primary {
  border-color: transparent;
  background: var(--brand-gradient);
  color: #05080c;
}

.side-drawer .drawer-account-status article,
.side-drawer .drawer-card,
.side-drawer .drawer-about {
  border: 1px solid #1d232b;
  background:
    radial-gradient(circle at 100% 0%, rgba(247, 167, 7, 0.08), transparent 32%),
    linear-gradient(180deg, #101720 0%, #0b1017 100%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.side-drawer .drawer-account-status span,
.side-drawer .drawer-about span,
.side-drawer .drawer-about b {
  color: var(--muted);
}

.side-drawer .drawer-account-status strong,
.side-drawer .drawer-grid a {
  color: var(--text);
}

.side-drawer .drawer-account-status strong.is-ok {
  color: var(--green);
}

.side-drawer .drawer-account-status strong.is-warn {
  color: var(--brand);
}

.side-drawer .drawer-grid a svg {
  border: 1px solid rgba(247, 167, 7, 0.3);
  background: rgba(247, 167, 7, 0.08);
  color: var(--brand);
}

.account-settings-panel {
  background:
    radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--brand) 5%, transparent) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, var(--bg), var(--card-soft));
  background-size: auto, 154px 154px, auto;
}

.security-verification-dialog {
  width: min(246px, calc(100vw - 48px));
  max-width: 246px;
  padding: 15px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% -12%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(180deg, #111821 0%, #070a0f 100%);
  color: var(--text);
  box-shadow:
    0 26px 72px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
  text-align: center;
}

.security-verification-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.security-verification-dialog .security-dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.security-verification-dialog .security-dialog-close svg {
  width: 16px;
  height: 16px;
}

.security-dialog-art {
  position: relative;
  display: grid;
  width: 74px;
  height: 62px;
  margin: -2px auto 8px;
  place-items: center;
}

.security-dialog-art::before,
.security-dialog-art::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  pointer-events: none;
}

.security-dialog-art::before {
  inset: -6px 0;
  background:
    radial-gradient(circle, transparent 44%, color-mix(in srgb, var(--brand) 22%, transparent) 45% 46%, transparent 47%),
    repeating-conic-gradient(from 8deg, color-mix(in srgb, var(--brand) 22%, transparent) 0 4deg, transparent 4deg 12deg);
  opacity: 0.38;
  mask: radial-gradient(circle, transparent 47%, #000 48% 65%, transparent 66%);
}

.security-dialog-art::after {
  inset: 8px 12px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent), transparent 68%);
  filter: blur(10px);
}

.security-dialog-art span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 54px;
  place-items: center;
  color: var(--brand);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 15%, transparent), transparent),
    rgba(9, 13, 19, 0.92);
  clip-path: polygon(50% 0, 92% 16%, 86% 72%, 50% 100%, 14% 72%, 8% 16%);
  box-shadow:
    inset 0 0 0 2px var(--brand),
    0 0 24px color-mix(in srgb, var(--brand) 30%, transparent);
}

.security-dialog-art span svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.5;
}

.security-verification-dialog h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.security-verification-dialog p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.security-dialog-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 19px;
  margin: 10px auto 14px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 7%, transparent);
  color: var(--brand);
  font-size: 9px;
  font-weight: 700;
}

.security-dialog-badge svg {
  width: 10px;
  height: 10px;
}

.security-verification-dialog .primary-pill,
.security-verification-dialog .outline-pill {
  width: 100%;
  min-height: 34px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.security-verification-dialog .primary-pill {
  margin-bottom: 8px;
  color: #080b0f;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 25%, transparent);
}

.security-verification-dialog .outline-pill {
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: rgba(5, 8, 12, 0.58);
  color: var(--text);
}

.security-verification-dialog .security-dialog-help {
  margin-top: 12px;
  font-size: 9px;
}

.security-dialog-help a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

/* Dialog components for the Oh bits dark UI. */
.confirm-dialog,
.result-dialog {
  width: min(342px, calc(100vw - 34px));
  max-width: calc(100vw - 34px);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.confirm-dialog::backdrop,
.result-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.confirm-dialog h2,
.result-dialog h2,
.home-popup-panel h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.confirm-dialog p,
.result-dialog p,
.home-popup-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.confirm-dialog label {
  color: var(--muted);
}

.confirm-dialog input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--text);
  padding: 0 13px;
  font-size: 15px;
  font-weight: 800;
}

.confirm-dialog input::placeholder {
  color: var(--muted);
}

.dialog-actions {
  gap: 10px;
}

.dialog-actions .outline-pill,
.dialog-actions .primary-pill,
.home-popup-actions a,
.home-popup-actions button {
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.result-dialog-icon {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

.result-dialog[data-type="error"] .result-dialog-icon {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}

.home-popup-panel {
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  background:
    radial-gradient(circle at 84% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
}

.home-popup-tag {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.security-verification-dialog {
  width: min(246px, calc(100vw - 48px));
  max-width: 246px;
  padding: 15px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% -12%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 34%),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--text) 6%, transparent), transparent 30%),
    linear-gradient(180deg, #111821 0%, #070a0f 100%);
  box-shadow:
    0 26px 72px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
  overflow: visible;
  text-align: center;
}

.security-verification-dialog h2 {
  font-size: 16px;
}

.security-verification-dialog p {
  font-size: 10px;
}

/* Unified Oh bits mobile UI pass */
body[data-page="home"] .phone-page,
body[data-page="discover"] .phone-page,
body[data-page="trade"] .phone-page,
body[data-page="convert"] .phone-page,
body[data-page="assets"] .phone-page,
body[data-center-page] .phone-page,
.records-page {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.bottom-nav {
  z-index: 45;
  min-height: 78px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 46%),
    color-mix(in srgb, var(--black) 92%, transparent);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav a.active,
.bottom-nav a.active span,
.bottom-nav a.active svg {
  color: var(--brand);
}

.bottom-nav .trade-fab {
  width: auto;
  height: auto;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.bottom-nav .trade-fab span {
  margin-top: 0;
  color: inherit;
  font-size: 11px;
}

.ui-scroll-tabs,
.center-filter-tabs,
.notification-tabs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ui-scroll-tabs::-webkit-scrollbar,
.center-filter-tabs::-webkit-scrollbar,
.notification-tabs::-webkit-scrollbar {
  display: none;
}

.ui-scroll-tabs button,
.center-filter-tabs button,
.notification-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.money-display,
[data-asset-total],
[data-ledger-inflow],
[data-ledger-outflow],
[data-ledger-net] {
  font-variant-numeric: tabular-nums;
  overflow: visible;
  text-overflow: clip;
}

.notification-card .outline-pill,
.history-record-card .outline-pill {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: color-mix(in srgb, var(--card) 82%, transparent);
  color: var(--brand);
}

.settings-summary-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
}

.settings-summary-card strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.settings-summary-card > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-settings-panel .settings-summary-card > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.settings-form-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 34px;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.settings-form-back svg {
  width: 16px;
  height: 16px;
}

.account-settings-panel .settings-form:not([hidden]) {
  display: grid;
  gap: 16px;
  margin-top: 2px;
  padding: 4px 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-settings-panel .settings-form-back {
  min-height: 38px;
  margin: -4px 0 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
}

.account-settings-panel .settings-form-back span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.account-settings-panel .settings-form-head {
  gap: 5px;
  padding: 2px 0 4px;
  border: 0;
}

.account-settings-panel .settings-form-head h3 {
  display: none;
}

.account-settings-panel .settings-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-settings-panel .settings-form label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-settings-panel .settings-form input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--black) 20%, transparent);
  color: var(--text);
  padding: 0 13px;
}

.account-settings-panel .settings-form .primary-pill,
.account-settings-panel .settings-form .outline-pill {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
}

/* Mobile touch targets */
.icon-button {
  width: 44px;
  height: 44px;
}

.account-settings-header {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.balance-visibility-toggle {
  min-width: 44px;
  min-height: 44px;
}

/* Account security summary and compact settings rhythm. */
.account-settings-panel .settings-summary-card {
  gap: 12px;
  min-height: 0;
  margin-bottom: 14px;
  padding: 14px;
}

.security-summary-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 11px;
  align-items: center;
}

.security-summary-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 36%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.security-summary-icon svg {
  width: 21px;
  height: 21px;
}

.security-summary-heading > div {
  min-width: 0;
}

.security-summary-heading > div > span {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
}

.security-summary-heading > b {
  grid-column: 2;
  color: var(--brand);
  font-size: 11px;
  line-height: 1.3;
}

.security-summary-statuses {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.security-summary-status {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0;
}

.security-summary-status > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.security-summary-status > span {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.security-summary-status > b {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.25;
}

.security-summary-status > b[data-state="active"] {
  background: color-mix(in srgb, var(--green) 13%, transparent);
  color: var(--green);
}

.security-summary-status > b[data-state="attention"] {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

.account-settings-panel .settings-action-list {
  gap: 8px;
}

.account-settings-panel .settings-group-title {
  margin: 14px 2px 5px;
  color: color-mix(in srgb, var(--text) 66%, var(--muted));
}

.settings-language-menu {
  margin-bottom: 2px;
}

.settings-language-menu .language-trigger {
  grid-template-columns: 40px minmax(0, 1fr) auto 18px;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
}

.settings-language-menu .settings-language-icon {
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.settings-language-menu .language-options button {
  min-height: 44px;
}

/* Mobile shell layout for tested phone widths. */
body[data-page="home"] .phone-page,
body[data-page="discover"] .phone-page,
body[data-page="trade"] .phone-page,
body[data-page="convert"] .phone-page,
body[data-page="assets"] .phone-page {
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
}

.bottom-nav {
  min-height: calc(74px + env(safe-area-inset-bottom));
  padding-bottom: calc(7px + env(safe-area-inset-bottom));
}

.bottom-nav a {
  min-height: 58px;
}

.side-drawer .drawer-profile {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.side-drawer .avatar-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.side-drawer .drawer-profile h2 {
  margin-bottom: 7px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-drawer .drawer-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.side-drawer .drawer-role-pill,
.side-drawer .drawer-uid {
  min-height: 24px;
  max-width: 100%;
}

.side-drawer .drawer-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.side-drawer .drawer-profile-actions button,
.side-drawer .drawer-profile-actions a.drawer-auth-link {
  min-height: 34px;
  border-radius: 999px;
}

.side-drawer .drawer-profile-actions .drawer-qr-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
}

.side-drawer .drawer-account-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.side-drawer .drawer-account-status article {
  min-width: 0;
  min-height: 78px;
  padding: 11px 10px;
}

.side-drawer .drawer-account-status span {
  min-height: 14px;
  font-size: 10px;
  line-height: 1.2;
}

.side-drawer .drawer-account-status strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-drawer .drawer-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px;
}

.side-drawer .drawer-panel > .drawer-card:nth-of-type(2) .drawer-grid.four,
.side-drawer .drawer-card:has([data-i18n="drawer.commonFeatures"]) .drawer-grid.four {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
}

.side-drawer .drawer-grid a {
  min-width: 0;
  min-height: 72px;
  gap: 8px;
}

.side-drawer .drawer-grid a svg {
  width: 21px;
  height: 21px;
}

.side-drawer .drawer-grid a span {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: center;
}

.result-dialog {
  width: min(320px, calc(100vw - 44px));
  padding: 24px 18px 18px;
}

.result-dialog .wide-button,
.result-dialog [data-result-close] {
  width: auto;
  min-width: 76px;
  min-height: 44px;
  justify-self: center;
  border-radius: 12px;
  padding-inline: 18px;
}

.result-dialog-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 2px;
}

.result-dialog h2 {
  font-size: 21px;
}

.result-dialog p {
  max-width: 250px;
  margin-inline: auto;
  line-height: 1.45;
}

@media (max-width: 340px) {
  .side-drawer .drawer-profile {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
  }

  .side-drawer .avatar-photo {
    width: 52px;
    height: 52px;
  }

  .side-drawer .drawer-account-status {
    gap: 7px;
  }

  .side-drawer .drawer-account-status article {
    padding-inline: 8px;
  }

  .side-drawer .drawer-grid.four {
    gap: 12px 6px;
  }

  .side-drawer .drawer-panel > .drawer-card:nth-of-type(2) .drawer-grid.four,
  .side-drawer .drawer-card:has([data-i18n="drawer.commonFeatures"]) .drawer-grid.four {
    gap: 12px 8px;
  }

  .side-drawer .drawer-grid a {
    font-size: 10px;
  }
}

/* Global dialog alignment: same shell, typography, and touch targets. */
.confirm-dialog,
.result-dialog,
.home-popup-panel {
  width: min(336px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
}

.confirm-dialog h2,
.result-dialog h2,
.home-popup-panel h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.confirm-dialog p,
.result-dialog p,
.home-popup-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.dialog-actions {
  gap: 10px;
}

.dialog-actions .outline-pill,
.dialog-actions .primary-pill,
.home-popup-actions a,
.home-popup-actions button {
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
}

.confirm-dialog input {
  min-height: 48px;
  border-radius: 12px;
}

.home-popup-tag {
  min-height: 22px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  letter-spacing: 0;
}

/* Unified mobile picker and icon controls. */
body.picker-open {
  overflow: hidden;
  touch-action: none;
}

.picker-panel {
  width: min(430px, 100vw);
  max-height: min(78dvh, 620px);
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 28%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
  scrollbar-width: thin;
}

.picker-panel::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 42%, transparent);
}

.picker-panel h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.picker-panel button {
  min-height: 52px;
  margin-top: 8px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-soft) 88%, transparent);
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}

.picker-panel button:is(:hover, :focus-visible),
.picker-panel button.is-selected,
.picker-panel button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--brand) 64%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--card-soft));
  color: var(--brand);
}

.picker-panel .picker-coin-option {
  gap: 12px;
}

.picker-panel .picker-coin-option .coin-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.picker-panel .field-hint {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.simple-header .icon-button,
.trade-header .icon-button,
.convert-header .icon-button,
.market-detail-header .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
}

.simple-header .icon-button svg,
.trade-header .icon-button svg,
.convert-header .icon-button svg,
.market-detail-header .icon-button svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 340px) {
  .picker-panel {
    padding-inline: 14px;
  }

  .picker-panel h2 {
    font-size: 18px;
  }
}

/* KYC gate dialog: readable hierarchy and consistent mobile actions. */
.security-verification-dialog {
  display: none;
  width: min(328px, calc(100vw - 32px));
  max-width: 328px;
  max-height: calc(100dvh - 32px);
  padding: 24px 20px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% -8%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 30%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  color: var(--text);
  text-align: center;
  box-shadow:
    0 26px 72px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
}

.security-verification-dialog[open] {
  display: block;
}

.security-verification-dialog .security-dialog-close {
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--muted);
}

.security-verification-dialog .security-dialog-close:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text);
}

.security-verification-dialog .security-dialog-close svg {
  width: 20px;
  height: 20px;
}

.security-verification-dialog .security-dialog-art {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
}

.security-verification-dialog .security-dialog-art::before {
  inset: -5px;
  opacity: 0.28;
}

.security-verification-dialog .security-dialog-art::after {
  inset: 8px;
}

.security-verification-dialog .security-dialog-art span {
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 10%, var(--card-soft));
  clip-path: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 16%, transparent);
}

.security-verification-dialog .security-dialog-art span svg {
  width: 23px;
  height: 23px;
}

.security-verification-dialog h2 {
  max-width: 100%;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.security-verification-dialog > p:not(.security-dialog-help) {
  max-width: 252px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.security-verification-dialog .security-dialog-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  min-height: 26px;
  margin: 14px auto 16px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.security-verification-dialog .security-dialog-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.security-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  width: 100%;
}

.security-verification-dialog .security-dialog-actions button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
}

.security-verification-dialog .security-dialog-actions .outline-pill {
  border-color: var(--line);
  background: color-mix(in srgb, var(--card-soft) 82%, transparent);
  color: var(--text);
}

.security-verification-dialog .security-dialog-help {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.security-verification-dialog .security-dialog-help a {
  color: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 340px) {
  .security-verification-dialog {
    width: min(292px, calc(100vw - 28px));
    padding: 22px 16px 16px;
  }

  .security-verification-dialog h2 {
    font-size: 19px;
  }

  .security-verification-dialog > p:not(.security-dialog-help) {
    font-size: 13px;
  }

  .security-dialog-actions {
    grid-template-columns: 1fr;
  }

  .security-verification-dialog .security-dialog-actions [data-security-dialog-verify] {
    grid-row: 1;
  }
}
/* Shared notice presentation for home and all existing notification pages. */
[data-home-popup] .home-popup-panel { padding:20px; gap:16px; text-align:left; max-height:calc(100dvh - 48px); }
[data-home-popup] .home-popup-tag { position:static; justify-self:start; margin:0 44px 0 0; font-size:12px; font-weight:500; letter-spacing:0; text-transform:none; }
[data-home-popup] .home-popup-panel h2 { margin:0; padding-right:28px; font-size:18px; font-weight:600; line-height:1.4; }
[data-home-popup] .home-popup-panel p { margin:0; white-space:pre-wrap; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
[data-home-popup] .home-popup-actions { margin:0; gap:10px; }
[data-home-popup] [hidden] { display:none !important; }

/* Shared public market provenance; reuse the existing typography and colors. */
.market-source-time { display:block;min-height:14px;margin-top:3px;font-size:var(--font-size-xs);line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums;overflow-wrap:normal; }
.pair-name > .market-source-time,.discover-market-name > .market-source-time { max-width:170px;min-height:18px;height:18px;line-height:18px; }
.market-source-time.is-empty { display:none; }
.is-stale .market-source-time { color:var(--brand-2); }
.market-refresh-row:has([data-global-updated]) { min-height:48px; }
.market-refresh-row > [data-global-updated] { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:18px;max-height:36px;overflow:hidden; }
/* Match the mobile viewport without a desktop scrollbar gutter. */
@media (max-width: 680px) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}


/* Oh bits design tokens: the canonical visual vocabulary for the user app. */
:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;

  --color-bg-canvas: #020408;
  --color-bg-page: #05080c;
  --color-surface: #10151c;
  --color-surface-raised: #0c1117;
  --color-border: #2a3038;
  --color-text: #f7f8fb;
  --color-text-secondary: #c1c7d0;
  --color-text-muted: #9aa1ad;
  --color-brand: #f7a707;
  --color-brand-strong: #ffbe1a;
  --color-success: #22c761;
  --color-success-strong: #35d875;
  --color-danger: #ff4d57;
  --color-warning: #f7a707;
  --color-focus: #ffcd4d;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --control-height-md: 44px;
  --control-height-lg: 48px;
  --control-height: var(--control-height-md);
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --shadow-raised: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.24);
  --shadow-md: var(--shadow-soft);
  --shadow-lg: var(--shadow-raised);
  --safe-area-bottom: env(safe-area-inset-bottom);

  /* Legacy aliases are retained while page CSS is consolidated. */
  --bg: var(--color-bg-page);
  --page: #080c11;
  --card: var(--color-surface);
  --card-soft: var(--color-surface-raised);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --green: var(--color-success);
  --green-2: var(--color-success-strong);
  --red: var(--color-danger);
  --black: var(--color-bg-page);
  --blue: var(--color-brand);
  --amber: var(--color-warning);
  --brand: var(--color-brand);
  --brand-2: var(--color-brand-strong);
  --brand-gradient: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
  --focus-ring: var(--color-focus);
  --shadow: var(--shadow-raised);
}

/* Approved v2 vocabulary. Opt in per batch so unreviewed pages keep their UI. */
:root.ui-batch-1 {
  --bg: #080A0D;
  --surface-1: #0E1115;
  --surface-2: #13171C;
  --surface-3: #181D23;
  --border: #252B33;
  --divider: rgba(255,255,255,.08);
  --text-primary: #F4F6F8;
  --text-secondary: #9199A5;
  --text-muted: #626B77;
  --brand: #F5A707;
  --brand-strong: #FFB52E;
  --brand-soft: rgba(245,167,7,.10);
  --positive: #25D695;
  --negative: #F0505F;

  --color-bg-canvas: var(--bg);
  --color-bg-page: var(--bg);
  --color-surface: var(--surface-1);
  --color-surface-raised: var(--surface-2);
  --color-border: var(--border);
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-secondary);
  --color-brand: var(--brand);
  --color-brand-strong: var(--brand-strong);
  --color-success: var(--positive);
  --color-success-strong: var(--positive);
  --color-danger: var(--negative);
  --color-warning: var(--brand);
  --color-focus: var(--brand-strong);
  --page: var(--bg);
  --brand-gradient: var(--brand);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --control-height-lg: 50px;
  --shadow-raised: 0 16px 40px rgba(0,0,0,.32);
  --shadow-soft: none;

  /* Second-pass scale. Keep the existing color/size aliases for legacy views. */
  --font-size-secondary: 13px;
  --font-size-primary: 15px;
  --font-size-section: 18px;
  --font-size-content: 22px;
  --font-weight-title: 600;
  --line-height-body: 1.5;
  --line-height-title: 1.25;
  --header-height: 56px;
  --control-height-sm: 34px;
  --radius-dialog: 12px;
  --space-field: 18px;
  --app-shell-width: 430px;
}

@media (min-width: 768px) {
  :root.ui-batch-1 { --app-shell-width: 600px; }
}


/* Assets page: single black-gold mobile-first layout. */
body[data-page="assets"] .assets-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) calc(132px + var(--safe-area-bottom));
  overflow-x: clip;
  background:
    radial-gradient(circle at 24% 0%, color-mix(in srgb, var(--color-brand) 9%, transparent), transparent 27%),
    linear-gradient(135deg, transparent 0 46%, color-mix(in srgb, var(--color-brand) 20%, transparent) 46.2% 46.5%, transparent 46.8%),
    var(--color-bg-page);
}

.assets-hero-header {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  margin-bottom: var(--space-4);
}

.assets-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  color: var(--color-text);
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.assets-brand img {
  width: 30px;
  height: 30px;
}

.assets-overview-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: var(--space-2);
  min-height: 168px;
  padding: var(--space-5) var(--space-4);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-brand) 34%, var(--color-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 28%, color-mix(in srgb, var(--color-brand) 17%, transparent), transparent 36%),
    linear-gradient(150deg, var(--color-surface-raised), var(--color-surface));
  box-shadow: var(--shadow-lg);
}

.assets-overview-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.assets-overview-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.assets-inline-eye {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -4px 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
}

.assets-inline-eye svg {
  width: 17px;
  height: 17px;
}

.assets-overview-total {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-4);
  font-variant-numeric: tabular-nums;
}

.assets-overview-total strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--color-text);
  font-size: clamp(28px, 8.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assets-overview-total span {
  flex: 0 0 auto;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.assets-overview-pnl {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.assets-overview-pnl b {
  color: var(--color-success);
  font-size: var(--font-size-md);
  font-variant-numeric: tabular-nums;
}

.assets-overview-pnl b.red {
  color: var(--color-danger);
}

.assets-overview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: var(--space-3);
  color: var(--color-brand-strong);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: none;
}

.assets-overview-link svg {
  width: 16px;
  height: 16px;
}

.assets-wallet-art {
  position: relative;
  align-self: stretch;
  min-width: 0;
  opacity: 0.72;
}

.assets-art-chart {
  position: absolute;
  right: 2px;
  bottom: 22px;
  width: 65px;
  height: 70px;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--color-brand) 36%, transparent) 0 34%, transparent 34% 100%) 0 100% / 9px 100% no-repeat,
    linear-gradient(to top, color-mix(in srgb, var(--color-brand) 36%, transparent) 0 52%, transparent 52% 100%) 20px 100% / 9px 100% no-repeat,
    linear-gradient(to top, color-mix(in srgb, var(--color-brand) 36%, transparent) 0 76%, transparent 76% 100%) 40px 100% / 9px 100% no-repeat,
    linear-gradient(to top, color-mix(in srgb, var(--color-brand) 36%, transparent) 0 100%, transparent 100%) 60px 100% / 9px 100% no-repeat;
}

.assets-art-orbit {
  position: absolute;
  top: 8px;
  right: -20px;
  width: 84px;
  height: 84px;
  border: 1px dashed color-mix(in srgb, var(--color-brand) 44%, transparent);
  border-radius: 50%;
}

.assets-art-wallet {
  position: absolute;
  right: -8px;
  bottom: 7px;
  width: 81px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--color-brand) 42%, var(--color-border));
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 84% 53%, var(--color-brand) 0 6px, transparent 7px),
    linear-gradient(150deg, color-mix(in srgb, var(--color-brand) 11%, var(--color-surface)), var(--color-surface-raised));
  box-shadow: var(--shadow-md);
}

.assets-art-wallet::after {
  position: absolute;
  top: 20px;
  right: -6px;
  width: 30px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--color-brand) 38%, var(--color-border));
  border-radius: 9px;
  background: var(--color-surface);
  content: "";
}

.assets-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.assets-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  min-height: var(--control-height-lg);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: none;
}

.assets-action span,
.assets-entry-copy strong,
.assets-entry-copy small,
.token-main strong,
.token-main small,
.token-value strong,
.token-value small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assets-action svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--color-brand);
}

.assets-action--primary {
  border-color: transparent;
  background: var(--brand-gradient);
  color: var(--color-bg-canvas);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--color-brand) 20%, transparent);
}

.assets-action--primary svg {
  color: currentColor;
}

.assets-entry-card,
.assets-fiat-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.assets-entry-card {
  padding: 0 var(--space-3);
}

.assets-entry-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  gap: var(--space-3);
  align-items: center;
  min-height: 80px;
  color: var(--color-text);
  text-decoration: none;
}

.assets-entry-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  color: var(--color-brand);
}

.assets-entry-icon svg,
.assets-entry-row > svg {
  width: 21px;
  height: 21px;
}

.assets-entry-row > svg {
  color: var(--color-text-muted);
}

.assets-entry-copy {
  min-width: 0;
}

.assets-entry-copy strong,
.assets-entry-copy small {
  display: block;
}

.assets-entry-copy strong {
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: 700;
}

.assets-entry-copy small {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.assets-token-section {
  margin-top: var(--space-5);
}

.assets-token-section h2,
.assets-section-head h2 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-lg);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.assets-token-list,
.assets-fiat-list {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.assets-token-list {
  margin-top: var(--space-3);
}

.assets-fiat-section {
  margin-top: var(--space-5);
  padding: var(--space-4);
}

.assets-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 42%);
  gap: var(--space-3);
  align-items: center;
  min-height: 76px;
  padding: var(--space-3);
}

.token-row + .token-row {
  border-top: 1px solid var(--color-border);
}

.token-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.token-main > div,
.token-value {
  min-width: 0;
}

.token-main .coin-icon,
.token-main img {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

/* Fiat wallets show the currency symbol (₫ ₩ ¥ €) instead of a single letter. */
.token-main .coin-icon.fiat-mark {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  background: color-mix(in srgb, var(--brand) 16%, var(--card));
  color: var(--brand);
}

html:is([lang="ko"], [lang="th"]) .token-main .coin-icon.fiat-mark {
  font-size: 17px;
}

html:is([lang="zh"], [lang="zh-hant"], [lang="ja"]) .token-main .coin-icon.fiat-mark {
  font-size: 16px;
}


.token-main strong,
.token-main small,
.token-value strong,
.token-value small {
  display: block;
}

.token-main strong {
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: 700;
}

.token-main small,
.token-value small {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.token-value {
  color: var(--color-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.token-value strong {
  font-size: var(--font-size-md);
  font-weight: 700;
}

.assets-token-empty,
.assets-fiat-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-5) var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  text-align: center;
}

.assets-token-empty strong,
.assets-fiat-empty strong {
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
}

.assets-token-empty small {
  font-size: var(--font-size-sm);
}

.assets-token-empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  color: var(--color-brand);
}

.assets-token-empty-icon svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 340px) {
  body[data-page="assets"] .assets-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .assets-overview-card {
    grid-template-columns: minmax(0, 1fr) 62px;
    min-height: 154px;
    padding: var(--space-4) var(--space-3);
  }

  .assets-overview-total strong {
    font-size: 28px;
  }

  .assets-wallet-art {
    opacity: 0.55;
  }

  .token-row {
    grid-template-columns: minmax(0, 1fr) minmax(98px, 40%);
    gap: var(--space-2);
    padding: var(--space-3) 10px;
  }

  .token-main {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .assets-overview-card,
  .assets-action {
    scroll-behavior: auto;
    transition: none;
  }
}
.asset-display-status { display: block; font-size: 12px; line-height: 1.5; color: var(--muted, #8b949e); margin-top: 8px; }


/* Home and announcement surfaces share the black-gold page vocabulary. */
body[data-page="home"] .phone-page {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4) calc(132px + var(--safe-area-bottom));
  overflow-x: clip;
  background:
    radial-gradient(circle at 70% -4%, color-mix(in srgb, var(--color-brand) 8%, transparent), transparent 23%),
    var(--color-bg-page);
}

.home-top-row {
  display: grid;
  grid-template-columns: var(--control-height-md) minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  min-height: 56px;
}

.home-top-row > div {
  display: flex;
  gap: 2px;
}

.home-top-row .icon-button {
  color: var(--color-text-secondary);
}

.home-title {
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kyc-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  gap: var(--space-3);
  align-items: center;
  min-height: 76px;
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--color-brand) 34%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface));
  color: var(--color-text);
  text-decoration: none;
}

.kyc-banner > svg:first-child {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-brand) 14%, transparent);
  color: var(--color-brand);
}

.kyc-banner strong,
.kyc-banner p {
  display: block;
  overflow: hidden;
}

.kyc-banner strong {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kyc-banner p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kyc-banner > svg:last-child {
  width: 19px;
  height: 19px;
  color: var(--color-brand);
}

.asset-preview-card--home.exchange-hero {
  position: relative;
  min-height: 154px;
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-4);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-brand) 34%, var(--color-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 84% 20%, color-mix(in srgb, var(--color-brand) 16%, transparent), transparent 29%),
    linear-gradient(145deg, var(--color-surface), var(--color-surface-raised));
  box-shadow: var(--shadow-lg);
}

.asset-preview-card--home.exchange-hero::after {
  position: absolute;
  top: 26px;
  right: -11px;
  width: 104px;
  height: 94px;
  border: 1px dashed color-mix(in srgb, var(--color-brand) 44%, transparent);
  border-radius: 50%;
  content: "";
}

.asset-preview-card--home > div[data-auth-only],
.guest-auth-card {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 80px);
  min-width: 0;
}

.asset-preview-card--home .asset-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 650;
}

.balance-visibility-toggle {
  width: 32px;
  height: 32px;
  margin: -4px 0;
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.balance-visibility-toggle svg {
  width: 17px;
  height: 17px;
}

.btc-total {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-4);
  font-variant-numeric: tabular-nums;
}

.btc-total strong {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: clamp(29px, 8.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btc-total span {
  flex: 0 0 auto;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.mini-profit {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.mini-profit b {
  color: var(--color-success-strong);
  font-variant-numeric: tabular-nums;
}

.mini-profit b.red {
  color: var(--color-danger);
}

.exchange-hero:has(.guest-auth-card:not([hidden])) {
  min-height: 190px;
}

.guest-auth-card {
  display: grid;
  gap: var(--space-3);
  max-width: 292px;
}

.guest-auth-card strong {
  color: var(--color-text);
  font-size: clamp(24px, 7.2vw, 29px);
  line-height: 1.1;
}

.guest-auth-card p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.guest-auth-actions,
.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.guest-auth-actions a,
.hero-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--control-height-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 750;
  text-decoration: none;
}

.guest-auth-actions .primary-pill,
.hero-action-pill {
  background: var(--brand-gradient);
  color: var(--color-bg-canvas);
}

.hero-actions {
  margin: var(--space-3) 0 var(--space-4);
}

.hero-action-pill.is-alt {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.promo-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 72px;
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.promo-card.is-clickable {
  cursor: pointer;
}

.promo-card > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  color: var(--color-brand);
  font-style: normal;
}

.promo-card > i svg {
  width: 21px;
  height: 21px;
}

.promo-card-content {
  min-width: 0;
}

.promo-card strong,
.promo-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-card strong {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.promo-card span {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.market-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin: var(--space-4) calc(var(--space-4) * -1) 0;
  padding: 0 var(--space-4);
  scrollbar-width: none;
}

.market-tabs::-webkit-scrollbar {
  display: none;
}

.market-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.market-tabs button.active {
  border-color: color-mix(in srgb, var(--color-brand) 52%, var(--color-border));
  background: color-mix(in srgb, var(--color-brand) 12%, var(--color-surface));
  color: var(--color-brand-strong);
}

.pair-list {
  overflow: hidden;
  margin-top: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(58px, auto) 66px;
  gap: var(--space-3);
  align-items: center;
  min-height: 68px;
  padding: 10px var(--space-3);
}

.pair-row + .pair-row {
  border-top: 1px solid var(--color-border);
}

.pair-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.pair-main .coin-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}

.pair-name,
.pair-price {
  min-width: 0;
}

.pair-name strong,
.pair-name > small,
.pair-price strong,
.pair-price small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pair-name strong {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.pair-name strong small,
.pair-name > small,
.pair-price small {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.pair-price {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.pair-price strong {
  width: 100%;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.change-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-success) 15%, transparent);
  color: var(--color-success-strong);
  font-size: var(--font-size-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.change-badge.down {
  background: color-mix(in srgb, var(--color-danger) 15%, transparent);
  color: var(--color-danger);
}

.pair-row.is-stale {
  opacity: 1;
}

.view-more,
.news-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  margin: var(--space-2) 0 var(--space-5);
  color: var(--color-brand-strong);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: none;
}

.section-title h2 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-lg);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.market-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.market-info-card {
  min-width: 0;
  min-height: 78px;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.market-info-card:first-child {
  grid-column: span 2;
  min-height: 92px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)), var(--color-surface));
}

.market-info-card span,
.market-info-card strong,
.market-info-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-info-card span,
.market-info-card small {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.market-info-card strong {
  margin: 7px 0 4px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.market-info-card small.green,
.market-info-card .green {
  color: var(--color-success-strong);
}

.market-info-card small.red,
.market-info-card .red {
  color: var(--color-danger);
}

.news-link {
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding: 0 var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.news-link svg {
  width: 18px;
  height: 18px;
}

.announcement-list {
  display: grid;
  overflow: hidden;
  margin-top: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.announcement-list article + article {
  border-top: 1px solid var(--color-border);
}

.announcement-list a {
  display: block;
  padding: var(--space-3);
  color: inherit;
  text-decoration: none;
}

.announcement-list article h3,
.announcement-list article time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-list article h3 {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.announcement-list article time {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

/* Announcement pages use the same compact rows without the home shell. */
.announcement-page-list {
  margin-top: var(--space-4);
}

.announcement-detail {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.announcement-detail h2 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.35;
}

.announcement-detail time {
  display: block;
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.announcement-detail p {
  margin: var(--space-4) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.home-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  pointer-events: none;
  opacity: 0;
}

.home-popup.open {
  pointer-events: auto;
  opacity: 1;
}

.home-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.home-popup-panel {
  position: relative;
  display: grid;
  gap: var(--space-3);
  width: min(352px, calc(100vw - 32px));
  max-height: calc(100dvh - 56px);
  padding: var(--space-6) var(--space-4) var(--space-4);
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.home-popup-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

.home-popup-tag {
  justify-self: center;
  min-height: 22px;
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-brand) 12%, transparent);
  color: var(--color-brand-strong);
  font-size: 10px;
  font-weight: 700;
  line-height: 22px;
  text-transform: uppercase;
}

.home-popup-panel h2 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.35;
}

.home-popup-panel p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.home-popup-actions {
  display: grid;
  gap: var(--space-2);
}

.home-popup-actions a,
.home-popup-actions button {
  width: 100%;
  text-decoration: none;
}

@media (max-width: 340px) {
  body[data-page="home"] .phone-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .market-tabs {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .asset-preview-card--home.exchange-hero {
    padding: var(--space-3);
  }

  .asset-preview-card--home > div[data-auth-only],
  .guest-auth-card {
    max-width: calc(100% - 62px);
  }

  .btc-total strong {
    font-size: 28px;
  }

  .pair-row {
    grid-template-columns: minmax(0, 1fr) minmax(52px, auto) 56px;
    gap: var(--space-2);
    padding-right: 10px;
    padding-left: 10px;
  }

  .pair-main {
    gap: 10px;
  }

  .pair-main .coin-icon {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-popup,
  .kyc-banner {
    transition: none;
  }
}
/* Optional admin-configured banner artwork; copy remains available on image failure. */
.promo-card [data-banner-image] { grid-column:1 / -1; width:100%; aspect-ratio:3 / 1; object-fit:cover; border-radius:var(--radius-md); }
.promo-card [data-banner-image][hidden] { display:none; }
.promo-card[role="link"]:focus-visible { outline:2px solid var(--color-brand); outline-offset:3px; }


html[lang="vi"] .bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-inline: 10px;
}

html[lang="vi"] .bottom-nav a {
  min-width: 0;
  gap: 2px;
  font-size: 10px;
  line-height: 1.05;
  text-align: center;
}

html[lang="vi"] .bottom-nav a span {
  display: block;
  max-width: 58px;
  min-height: 22px;
  overflow: hidden;
  overflow-wrap: anywhere;
}

html[lang="vi"] .bottom-nav .trade-fab span {
  max-width: 44px;
  min-height: 18px;
  font-size: 8px;
  line-height: 1.05;
}

html[lang="vi"] .asset-shortcuts {
  gap: 6px;
  padding-inline: 8px;
}

html[lang="vi"] .asset-shortcuts a {
  gap: 6px;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}

html[lang="vi"] .asset-shortcuts a span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 72px;
  overflow: hidden;
}

html[lang="vi"] .asset-shortcuts i {
  width: 40px;
  height: 40px;
}

html[lang="vi"] .asset-hub-card {
  gap: 8px;
  padding: 13px 11px;
}

html[lang="vi"] .asset-hub-card strong {
  font-size: 14px;
  line-height: 1.15;
}

html[lang="vi"] .asset-hub-card span,
html[lang="vi"] .account-card span {
  font-size: 11px;
  line-height: 1.2;
}

html[lang="vi"] .account-card {
  min-height: 100px;
  padding-inline: 11px;
}

html[lang="vi"] .account-card strong,
html[lang="vi"] .token-value strong {
  font-size: clamp(14px, 3.8vw, 17px);
}

html[lang="vi"] .center-header h1,
html[lang="vi"] .records-header h1,
html[lang="vi"] .section-title h2 {
  font-size: 22px;
  line-height: 1.18;
}

html[lang="vi"] .center-filter-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 2px 1px 4px;
  overflow: visible;
  scrollbar-width: none;
}

html[lang="vi"] .center-filter-tabs::-webkit-scrollbar {
  display: none;
}

html[lang="vi"] .center-filter-tabs button {
  min-width: 0;
  min-height: 34px;
  padding-inline: 4px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[lang="vi"] .center-card {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 44%);
  gap: 8px;
  align-items: start;
  padding: 14px 12px;
}

html[lang="vi"] .center-card strong {
  font-size: 15px;
  line-height: 1.18;
}

html[lang="vi"] .center-card span,
html[lang="vi"] .center-card small {
  font-size: 12px;
  line-height: 1.35;
}

html[lang="vi"] .center-card > div:last-child {
  align-self: stretch;
  align-content: space-between;
  gap: 8px;
}

html[lang="vi"] .center-card b {
  max-width: 148px;
  font-size: 12px;
  line-height: 1.12;
}

html[lang="vi"] .center-card b span {
  max-width: 148px;
  overflow: visible;
  font-size: clamp(12px, 3.2vw, 14px);
  text-overflow: clip;
  white-space: nowrap;
}

html[lang="vi"] .center-card b small {
  font-size: 11px;
}

html[lang="vi"] .center-card em {
  min-width: 0;
  max-width: 94px;
  min-height: 24px;
  padding-inline: 8px;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

html[lang="vi"] .center-empty-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 16px 18px;
  text-align: center;
}

html[lang="vi"] .center-empty-card > div,
html[lang="vi"] .center-empty-card > div:last-child {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  align-self: auto;
  align-content: normal;
  justify-items: center;
}

html[lang="vi"] .center-empty-card strong {
  font-size: 16px;
  line-height: 1.25;
}

html[lang="vi"] .center-empty-card span {
  display: block;
  width: 100%;
  max-width: none;
  margin: 10px auto 0;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

html[lang="vi"] .records-list-page article {
  gap: 10px;
  padding: 14px 12px;
}

html[lang="vi"] .records-list-page strong {
  font-size: 15px;
  line-height: 1.2;
}

html[lang="vi"] .records-list-page span,
html[lang="vi"] .records-list-page span small {
  font-size: 12px;
  line-height: 1.35;
}

html[lang="vi"] .records-list-page b {
  min-width: 0;
  max-width: 86px;
  padding-inline: 8px;
  font-size: 10px;
  line-height: 1.1;
  white-space: normal;
}


/* Handoff v2, Batch 1 only. Loaded after legacy page CSS on the three reviewed routes. */
html.ui-batch-1,
.ui-batch-1 body {
  background: var(--bg);
}

.ui-batch-1 body .phone-page {
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100dvh;
  padding: 8px 16px calc(96px + var(--safe-area-bottom));
  background: var(--bg);
}

.ui-batch-1 .phone-page::before,
.ui-batch-1 .phone-page::after,
.ui-batch-1 .exchange-hero::after {
  content: none;
}

.ui-batch-1 .icon-button,
.ui-batch-1 .balance-visibility-toggle {
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  border-radius: 6px;
}

.ui-batch-1 .home-top-row,
.ui-batch-1 .trade-header,
.ui-batch-1 .assets-hero-header {
  min-height: 56px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--divider);
}

.ui-batch-1 .home-title,
.ui-batch-1 .assets-brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.035em;
}

.ui-batch-1 .home-title {
  background: linear-gradient(90deg, var(--text-primary) 1.55em, var(--brand) 1.55em);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.ui-batch-1 .trade-header h1 { font-size: var(--font-size-content); font-weight: 650; }
.ui-batch-1 .trade-header { margin-bottom: 12px; }

.ui-batch-1 .bottom-nav {
  width: min(430px, 100vw);
  min-height: 72px;
  padding: 8px 12px calc(8px + var(--safe-area-bottom));
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
}

.ui-batch-1 .bottom-nav a,
.ui-batch-1 .bottom-nav .trade-fab {
  min-height: 48px;
  gap: 5px;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: var(--font-size-xs);
  font-weight: 550;
}

.ui-batch-1 .bottom-nav a span,
.ui-batch-1 .bottom-nav .trade-fab span {
  color: inherit;
  font-size: var(--font-size-xs);
  line-height: 1.2;
}

.ui-batch-1 .bottom-nav a.active,
.ui-batch-1 .bottom-nav a.active svg,
.ui-batch-1 .bottom-nav a.active span { color: var(--brand); }
.ui-batch-1 .bottom-nav svg { width: 23px; height: 23px; filter: none; }

.ui-batch-1 .primary-pill,
.ui-batch-1 .trade-page .primary-pill.wide-button,
.ui-batch-1 .assets-action--primary {
  min-height: 50px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--bg);
  box-shadow: none;
  font-weight: 650;
}

.ui-batch-1 .outline-pill,
.ui-batch-1 .hero-action-pill.is-alt {
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: none;
}

.ui-batch-1 button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.ui-batch-1 .is-loading { background: var(--surface-3); }

/* Home: the balance lives on the page, followed by a continuous market list. */
.ui-batch-1 .asset-preview-card--home.exchange-hero {
  min-height: 0;
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ui-batch-1 .asset-preview-card--home > div[data-auth-only],
.ui-batch-1 .guest-auth-card { max-width: 100%; }
.ui-batch-1 .asset-label { font-weight: 450; }
.ui-batch-1 .btc-total { margin-top: 6px; }
.ui-batch-1 .btc-total strong,
.ui-batch-1 .assets-overview-total strong {
  font-size: clamp(30px, 8.5vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.035em;
}
.ui-batch-1 .mini-profit { margin-top: 12px; font-size: var(--font-size-secondary); }
.ui-batch-1 .hero-actions { gap: 10px; margin: 0 0 20px; }
.ui-batch-1 .hero-action-pill { gap: 10px; font-size: var(--font-size-primary); }
.ui-batch-1 .hero-action-pill svg { width: 20px; height: 20px; }
.ui-batch-1 .guest-auth-card { gap: 12px; }
.ui-batch-1 .guest-auth-card strong { font-size: var(--font-size-content); line-height: 1.3; }
.ui-batch-1 .guest-auth-card p { font-size: var(--font-size-secondary); }
.ui-batch-1 .guest-auth-actions { margin-top: 4px; }
.ui-batch-1 .kyc-banner { min-height: 64px; background: var(--surface-1); border-color: var(--border); }
.ui-batch-1 .kyc-banner p { white-space: normal; }

.ui-batch-1 .market-tabs,
.ui-batch-1 .trade-mode-tabs {
  gap: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.ui-batch-1 .market-tabs button,
.ui-batch-1 .trade-mode-tabs button {
  min-height: 48px;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: none;
}
.ui-batch-1 .market-tabs button.active,
.ui-batch-1 .trade-mode-tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.ui-batch-1 .pair-list { margin: 0; border: 0; border-radius: 0; background: transparent; }
.ui-batch-1 .home-markets-heading { margin: 24px 0 4px; }
.ui-batch-1 .market-column-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, 1fr) 74px;
  gap: 8px;
  padding: 12px 0 4px;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
}
.ui-batch-1 .market-column-head > :not(:first-child) { text-align: right; }
.ui-batch-1 .pair-row {
  grid-template-columns: minmax(0, 1fr) minmax(80px, 1fr) 74px;
  min-height: 64px;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.ui-batch-1 .pair-row + .pair-row { border-top: 0; }
.ui-batch-1 .pair-main { gap: 8px; }
.ui-batch-1 .pair-main .coin-icon { width: 30px; height: 30px; }
.ui-batch-1 .pair-name strong { font-size: var(--font-size-sm); font-weight: 600; }
.ui-batch-1 .pair-name strong small { font-size: var(--font-size-xs); }
.ui-batch-1 .pair-name strong { overflow: visible; }
.ui-batch-1 .pair-price { gap: 0; }
.ui-batch-1 .pair-price strong { color: var(--text-primary); font-weight: 600; }
.ui-batch-1 .change-badge { justify-content: flex-end; padding: 0; background: none; font-size: var(--font-size-secondary); color: var(--positive); }
.ui-batch-1 .change-badge.down { background: none; color: var(--negative); }
.ui-batch-1 .view-more { min-height: 44px; margin: 4px 0 20px; font-size: var(--font-size-secondary); font-weight: 550; }
.ui-batch-1 .section-title h2 { font-size: 19px; font-weight: 650; }
.ui-batch-1 .market-info-grid { display: block; margin-top: 12px; }
.ui-batch-1 .market-info-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--divider);
  border-radius: 0;
  background: transparent;
}
.ui-batch-1 .market-info-card strong { margin: 0; color: var(--text-primary); font-size: var(--font-size-primary); font-weight: 600; }
.ui-batch-1 .news-link { color: var(--text-secondary); padding: 0; font-size: var(--font-size-xs); font-weight: 400; }
.ui-batch-1 .announcement-list { border: 0; border-radius: 0; background: transparent; }
.ui-batch-1 .announcement-list a { padding: 14px 0; }
.ui-batch-1 .announcement-list article h3 { white-space: normal; color: var(--text-primary); font-weight: 550; line-height: 1.5; }

/* Quick Sell retains every field and server quote row in one compact workflow. */
.ui-batch-1 .asset-preview-card--trade.trade-hero {
  grid-template-columns: 1fr;
  min-height: 88px;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-1);
  box-shadow: none;
}
.ui-batch-1 .trade-balance-main strong { margin-top: 4px; font-size: 28px; font-weight: 650; }
.ui-batch-1 .history-link-button { background: transparent; border: 0; box-shadow: none; }
.ui-batch-1 .trade-balance-meta { display: flex; justify-content: space-between; align-items: center; max-width: none; text-align: left; }
.ui-batch-1 .trade-balance-meta a { min-height: 44px; display: inline-flex; align-items: center; margin: -14px 0; background: none; border: 0; padding: 0 4px; }
.ui-batch-1 .trade-mode-tabs { display: flex; gap: 24px; }
.ui-batch-1 .panel-heading { margin: 12px 0 10px; }
.ui-batch-1 .panel-heading h2 { font-size: var(--font-size-section); font-weight: 650; }
.ui-batch-1 .panel-heading span { margin-top: 4px; font-size: var(--font-size-xs); }
.ui-batch-1 .quick-form { gap: 12px; }
.ui-batch-1 .field-block,
.ui-batch-1 .amount-input-card { padding: 0; gap: 8px; border: 0; border-radius: 0; background: transparent; }
.ui-batch-1 .quick-form .field-block { grid-template-columns: 88px minmax(0, 1fr); align-items: center; }
.ui-batch-1 .field-block > span,
.ui-batch-1 .amount-card-head > label { color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 450; }
.ui-batch-1 .field-block .select-trigger {
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  font-size: var(--font-size-md);
}
.ui-batch-1 .field-block .select-trigger svg { color: var(--text-secondary); }
.ui-batch-1 .amount-card-head { position: relative; min-height: 20px; padding-right: 52px; }
.ui-batch-1 .max-chip { min-height: 44px; border: 0; border-radius: 6px; background: none; font-weight: 600; }
.ui-batch-1 .amount-card-head > .max-chip { position: absolute; right: 0; top: -12px; }
.ui-batch-1 .amount-entry-row { min-height: 52px; background: var(--surface-1); }
.ui-batch-1 .amount-entry-row input { font-size: var(--font-size-content); font-weight: 550; }
.ui-batch-1 .field-hint { font-size: var(--font-size-xs); line-height: 1.4; }
.ui-batch-1 .quote-card { display: block; padding: 6px 0 0; border: 0; border-top: 1px solid var(--divider); border-radius: 0; background: transparent; }
.ui-batch-1 .quote-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 26px;
  padding: 4px 0;
  background: transparent;
}
.ui-batch-1 .quote-card span { font-size: var(--font-size-xs); white-space: normal; }
.ui-batch-1 .quote-card strong { font-size: var(--font-size-secondary); font-weight: 550; text-align: right; color: var(--text-primary); }
.ui-batch-1 .quote-card .quote-card-final { min-height: 44px; margin-top: 6px; border-top: 1px solid var(--divider); background: transparent; }
.ui-batch-1 .quote-card-final strong { font-size: 17px; font-weight: 650; }
.ui-batch-1 .quote-expiry { min-height: 28px; padding: 0; background: none; }
.ui-batch-1 .wide-button { margin-top: 0; }
.ui-batch-1 .phone-page :is(button, input, a) { scroll-margin-bottom: 96px; }
.ui-batch-1 .group-order { padding: 16px 0; border: 0; border-bottom: 1px solid var(--divider); border-radius: 0; background: transparent; }
.ui-batch-1 .group-order:has(.panel-heading:only-child) { padding: 28px 12px; text-align: center; }
.ui-batch-1 .order-metrics > div { min-height: 54px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; }
.ui-batch-1 .welfare-ribbon,
.ui-batch-1 .order-top b { border-radius: 6px; }
.ui-batch-1 .join-summary-card { background: var(--surface-1); }

/* Assets: direct balance, existing shortcuts, and flat token/fiat rows. */
.ui-batch-1 .assets-overview-card { display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ui-batch-1 .assets-overview-label { font-weight: 450; }
.ui-batch-1 .assets-overview-total { margin-top: 6px; }
.ui-batch-1 .assets-overview-pnl { margin-top: 12px; font-size: var(--font-size-secondary); }
.ui-batch-1 .assets-overview-pnl b { font-size: var(--font-size-secondary); font-weight: 550; }
.ui-batch-1 .assets-overview-link { min-height: 44px; margin-top: 6px; background: none; border: 0; font-size: var(--font-size-secondary); font-weight: 550; }
.ui-batch-1 .assets-action-row { margin: 8px 0 20px; gap: 10px; }
.ui-batch-1 .assets-action { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 12px; border-radius: var(--radius-md); background: var(--surface-1); border: 1px solid var(--border); color: var(--text-primary); font-size: var(--font-size-primary); font-weight: 650; }
.ui-batch-1 .assets-action--primary { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.ui-batch-1 .assets-action svg { width: 20px; height: 20px; color: inherit; }
.ui-batch-1 .assets-entry-card { padding: 0; border: 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); border-radius: 0; background: transparent; }
.ui-batch-1 .assets-entry-row { min-height: 72px; grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 12px; }
.ui-batch-1 .assets-entry-icon { width: 28px; height: 28px; background: none; color: var(--text-secondary); }
.ui-batch-1 .assets-entry-copy strong { font-size: var(--font-size-sm); font-weight: 600; }
.ui-batch-1 .assets-entry-copy small { font-size: var(--font-size-xs); line-height: 1.4; white-space: normal; }
.ui-batch-1 .assets-token-section,
.ui-batch-1 .assets-fiat-section { margin-top: 24px; }
.ui-batch-1 .assets-token-section h2,
.ui-batch-1 .assets-section-head h2 { font-size: 19px; font-weight: 650; }
.ui-batch-1 .assets-token-list,
.ui-batch-1 .assets-fiat-list,
.ui-batch-1 .assets-fiat-section { padding: 0; border: 0; border-radius: 0; background: transparent; }
.ui-batch-1 .assets-section-head { margin-bottom: 8px; }
.ui-batch-1 .assets-token-list { margin-top: 8px; }
.ui-batch-1 .token-row { min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.ui-batch-1 .token-row + .token-row { border-top: 0; }
.ui-batch-1 .token-main { gap: 10px; }
.ui-batch-1 .token-main .coin-icon,
.ui-batch-1 .token-main img { width: 34px; height: 34px; }
.ui-batch-1 .token-main strong,
.ui-batch-1 .token-value strong { font-size: var(--font-size-primary); font-weight: 600; }
.ui-batch-1 .token-main small,
.ui-batch-1 .token-value small { font-size: var(--font-size-xs); }
.ui-batch-1 .assets-token-empty,
.ui-batch-1 .assets-fiat-empty { padding: 24px 12px; border: 0; border-radius: 0; background: var(--surface-1); }
.ui-batch-1 .assets-token-empty-icon { background: none; color: var(--text-secondary); }
.ui-batch-1 .assets-token-empty strong,
.ui-batch-1 .assets-fiat-empty strong { font-size: var(--font-size-sm); font-weight: 550; }

/* Existing overlays use the same palette without changing their behavior. */
.ui-batch-1 .drawer-panel,
.ui-batch-1 .account-settings-panel,
.ui-batch-1 .picker-panel,
.ui-batch-1 .confirm-dialog { background: var(--surface-1); border-color: var(--border); }
.ui-batch-1 .drawer-card { background: transparent; border-color: var(--divider); box-shadow: none; }
.ui-batch-1 .drawer-profile { border-color: var(--divider); }
.ui-batch-1 .drawer-card { padding: 20px 0; margin-top: 0; border: 0; border-top: 1px solid var(--divider); border-radius: 0; }
.ui-batch-1 .drawer-card h3 { font-size: var(--font-size-section); font-weight: 650; }
.ui-batch-1 .drawer-grid a { color: var(--text-primary); }
.ui-batch-1 .drawer-grid a svg { color: var(--text-secondary); background: none; }
.ui-batch-1 .drawer-account-status { gap: 0; }
.ui-batch-1 .drawer-account-status article { background: transparent; border: 0; border-radius: 0; }
.ui-batch-1 .drawer-account-status article + article { border-left: 1px solid var(--divider); }
.ui-batch-1 .drawer-role-pill,
.ui-batch-1 .drawer-uid,
.ui-batch-1 .drawer-profile-actions button { border-radius: 6px; border-color: var(--border); background: var(--surface-2); }
.ui-batch-1 .confirm-dialog { border-radius: var(--radius-dialog); }
.ui-batch-1 .picker-panel { border-radius: 16px 16px 0 0; }

@media (max-width: 350px) {
  .ui-batch-1 body .phone-page { padding-inline: 14px; }
  .ui-batch-1 .pair-row { grid-template-columns: minmax(0, 1fr) 84px 62px; gap: 6px; }
  .ui-batch-1 .pair-main { gap: 6px; }
  .ui-batch-1 .pair-main .coin-icon { width: 26px; height: 26px; }
  .ui-batch-1 .pair-name strong small { font-size: 9px; }
}

@media (min-width: 768px) {
  .ui-batch-1 body .phone-page { width: 600px; max-width: 600px; padding-inline: 24px; }
  .ui-batch-1 .bottom-nav { width: 600px; }
}


/* Shared presentation rules, loaded after legacy page batches. */
html.ui-batch-1 body { font-size: var(--font-size-sm); line-height: var(--line-height-body); }
html.ui-batch-1 body .phone-page { padding-inline: var(--space-4); }
/* One content shell for every route and its fixed navigation. */
html.ui-batch-1 body :is(.phone-page,.kyc-flow-page) { width: min(100%,var(--app-shell-width)); max-width: var(--app-shell-width); }
html.ui-batch-1 body :is(.bottom-nav,.kyc-sticky-action,.kyc-step-actions,.picker-panel,.order-detail-panel) { width: min(100%,var(--app-shell-width)); max-width: var(--app-shell-width); }
html.ui-batch-1 body :is(.drawer-panel,.account-settings-panel) { width: min(100vw,var(--app-shell-width)); max-width: var(--app-shell-width); }
html.ui-batch-1 body :is(.auth-form-card,.auth-support-link,.auth-security-note) { max-width: 430px; margin-inline: auto; }
html.ui-batch-1 body .phone-page :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.discover-header,.auth-header,.trade-header,.home-top-row,.assets-hero-header) {
  min-height: var(--header-height); height: auto; margin-bottom: var(--space-6); padding-block: 0; align-items: center;
}
html.ui-batch-1 body :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.discover-header,.auth-header,.trade-header) :is(h1,.discover-title) {
  font-size: var(--font-size-lg); font-weight: var(--font-weight-title); line-height: var(--line-height-title); letter-spacing: -.02em;
}
html.ui-batch-1 body :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.auth-header,.trade-header) :is(.icon-button,.auth-nav-button,.history-link-button) {
  width: var(--control-height-md); height: var(--control-height-md); min-width: var(--control-height-md); padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none; color: var(--text-secondary);
}
html.ui-batch-1 body :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.auth-header,.trade-header) :is(.icon-button,.auth-nav-button,.history-link-button) svg { width: 20px; height: 20px; }
html.ui-batch-1 body :is(.primary-pill,.outline-pill,.auth-primary-button,.assets-action) {
  min-height: var(--control-height-lg); border-radius: var(--radius-md); font-size: var(--font-size-primary); font-weight: 600; line-height: 1.4;
}
html.ui-batch-1 body :is(.stack-form,.kyc-form-card,.auth-form-card) { gap: var(--space-5); }
html.ui-batch-1 body :is(.stack-form,.kyc-form-card,.auth-form-card) label { font-size: var(--font-size-secondary); }
html.ui-batch-1 body :is(.stack-form,.kyc-form-card) :is(input:not([type="file"]),select,.form-select-trigger) {
  min-height: var(--control-height-lg); border-radius: var(--radius-md); font-size: var(--font-size-sm);
}
html.ui-batch-1 body :is(.field-hint,.field-note,.secure-note,.auth-security-note,.panel-heading > span) { font-size: var(--font-size-secondary); line-height: var(--line-height-body); }
html.ui-batch-1 body .bottom-nav svg { width: 22px; height: 22px; }
html.ui-batch-1 body .bottom-nav a span { font-size: var(--font-size-xs); }
html.ui-batch-1 body :is(.section-title h2,.assets-section-head h2,.assets-token-section h2,.panel-heading h2,.address-section-title,.related-head h2) { font-size: var(--font-size-section); font-weight: 600; }
html.ui-batch-1 body :is(.history-record-status,.order-status,.notification-tag,.merchant-status-badge) { min-height: 24px; font-size: var(--font-size-xs); font-weight: 500; line-height: 1.4; }
html.ui-batch-1 body :is(.history-record-status,.merchant-status-badge) { padding: 4px 8px; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-secondary); }
html.ui-batch-1 body .history-record-status { max-width: none; white-space: nowrap; align-self: start; }
html.ui-batch-1 body :is(.history-record-status,.merchant-status-badge).success { background: color-mix(in srgb,var(--positive) 12%,transparent); color: var(--positive); }
html.ui-batch-1 body :is(.history-record-status,.merchant-status-badge).danger { background: color-mix(in srgb,var(--negative) 12%,transparent); color: var(--negative); }
html.ui-batch-1 body :is(.history-record-status,.merchant-status-badge).pending { background: var(--brand-soft); color: var(--brand-strong); }
html.ui-batch-1 body :is(.history-record-card,.center-card,.announcement-list article,.announcement-page-list article,.merchant-overview-row) { border-color: var(--divider); }
html.ui-batch-1 body :is(.order-detail-row,.order-detail-panel > header,.order-detail-timeline li,.order-detail-ledgers > div) { border-color: var(--divider); }
html.ui-batch-1 body :is(time,.order-detail-timeline time,.order-detail-ledgers time) { white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body [data-picker-option].is-selected::after { content: '✓'; flex: 0 0 20px; margin-left: auto; color: var(--brand); font-size: 18px; }
html.ui-batch-1 body .saved-address-value { color: var(--text-primary); font-family: ui-monospace,monospace; font-size: var(--font-size-secondary); font-weight: 400; line-height: 1.5; word-break: break-all; overflow-wrap: anywhere; }
html.ui-batch-1 body [data-address-book-option] { border-radius: var(--radius-md); }
html.ui-batch-1 body [data-address-book-option] strong { font-size: var(--font-size-primary); font-weight: 500; }
html.ui-batch-1 body [data-address-book-option] small { font-weight: 400; }
html.ui-batch-1 body .picker-panel { border-radius: var(--radius-dialog) var(--radius-dialog) 0 0; }
html.ui-batch-1 body :is(.result-dialog,.confirm-dialog) { padding: var(--space-5); border-radius: var(--radius-dialog); background: var(--surface-1); }
html.ui-batch-1 body :is(.result-dialog,.confirm-dialog,.picker-panel) h2 { font-size: var(--font-size-section); font-weight: 600; line-height: 1.4; }
html.ui-batch-1 body :is(.result-dialog,.confirm-dialog) :is(p,dt,dd,.quote-card span,.quote-card strong) { font-size: var(--font-size-sm); line-height: var(--line-height-body); }
html.ui-batch-1 body :is(.result-dialog,.confirm-dialog) :is(.primary-pill,.outline-pill) { min-height: 46px; font-size: var(--font-size-primary); }
html.ui-batch-1 body :is(.picker-panel,.confirm-dialog) :is(small,.field-hint) { font-size: var(--font-size-secondary); }

/* Audit batch A: shared notice and confirmation presentation. */
/* Batch B reuses the same tokens for transient feedback and existing UI states. */
html.ui-batch-1 body .ui-feedback {
  position: fixed; z-index: 120; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(358px,calc(100vw - 32px)); margin: 0; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
  color: var(--positive); font-size: var(--font-size-sm); line-height: 1.5; box-shadow: var(--shadow-raised); pointer-events: none;
}
html.ui-batch-1 body .ui-feedback[data-tone="error"] { color: var(--negative); }
html.ui-batch-1 body :is([role="dialog"],dialog) > .ui-feedback { position: sticky; left: auto; bottom: 0; transform: none; width: auto; margin-top: 12px; }
html.ui-batch-1 body .center-detail-feedback { grid-column: 1 / -1; display: grid; gap: 12px; padding-block: 12px; font-size: var(--font-size-secondary); color: var(--text-secondary); }
html.ui-batch-1 body .center-detail-feedback[data-type="error"] { color: var(--negative); }
html.ui-batch-1 body .center-detail-feedback button { justify-self: start; min-height: 44px; padding: 8px 16px; }
html.ui-batch-1 body .ui-unavailable-note { margin: 0 0 16px; color: var(--text-secondary); font-size: var(--font-size-xs); line-height: 1.5; }
html.ui-batch-1 body .unavailable-control:disabled { color: var(--text-muted); opacity: .65; cursor: default; border-color: transparent; }
html.ui-batch-1 body .chart-range-tabs .unavailable-control:disabled::after { display: none; }
html.ui-batch-1 body .home-popup-panel {
  display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 12px;
  width: min(352px,calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-dialog);
  background: var(--surface-1); text-align: left; overflow: hidden;
}
html.ui-batch-1 body .home-popup-tag {
  position: static; justify-self: start; min-height: 24px; margin: 0; padding: 0 8px;
  max-width: calc(100% - 44px); border: 0; border-radius: var(--radius-sm);
  background: var(--surface-3); color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 500;
}
html.ui-batch-1 body .home-popup-close { top: 10px; right: 10px; width: 44px; height: 44px; }
html.ui-batch-1 body .home-popup-panel h2 {
  margin: 0; padding: 0; color: var(--text-primary); font-size: var(--font-size-section);
  font-weight: 600; line-height: 1.4; overflow-wrap: anywhere;
}
html.ui-batch-1 body .home-popup-panel > p {
  min-height: 0; max-width: 100%; margin: 0; overflow-y: auto; overscroll-behavior: contain;
  color: var(--text-secondary); font-size: var(--font-size-sm); line-height: var(--line-height-body);
  text-align: left; white-space: pre-wrap;
}
html.ui-batch-1 body .home-popup-actions { margin: 4px 0 0; gap: 8px; }
html.ui-batch-1 body .home-popup-actions:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
html.ui-batch-1 body :is(.confirm-dialog,.result-dialog) { max-height: calc(100dvh - 32px); overflow-y: auto; }
html.ui-batch-1 body .confirmation-summary { display: grid; gap: 0; margin: 20px 0; padding: 0; }
html.ui-batch-1 body .confirmation-summary[hidden] { display: none; }
html.ui-batch-1 body .confirmation-summary > div {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); align-items: start;
  gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--divider);
}
html.ui-batch-1 body .confirmation-summary dt { margin: 0; color: var(--text-secondary); font-weight: 400; overflow-wrap: anywhere; }
html.ui-batch-1 body .confirmation-summary dd { min-width: 0; margin: 0; color: var(--text-primary); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
html.ui-batch-1 body .confirmation-summary > .confirmation-address { grid-template-columns: minmax(0,1fr); }
html.ui-batch-1 body .confirmation-address dd { text-align: left; font-family: var(--font-family-mono,monospace); font-size: var(--font-size-secondary); }
html.ui-batch-1 body .confirmation-summary > :last-child { border-bottom: 0; }
html.ui-batch-1 body .confirmation-summary :is(.confirmation-total,.withdraw-confirm-total) dd { font-weight: 600; }
html.ui-batch-1 body .confirmation-summary :is(.confirmation-total,.withdraw-confirm-total) dt { color: var(--text-primary); }
html.ui-batch-1 body .result-dialog[data-type="success"] .result-dialog-icon { background: color-mix(in srgb,var(--positive) 12%,transparent); color: var(--positive); }
html.ui-batch-1 body .result-dialog[data-type="error"] .result-dialog-icon { background: color-mix(in srgb,var(--negative) 12%,transparent); color: var(--negative); }
html.ui-batch-1 body #kycRequiredDialog {
  width: min(336px,calc(100vw - 32px)); max-width: 336px;
  border-color: var(--border); background: var(--surface-1); box-shadow: var(--shadow-raised);
}
html.ui-batch-1 body #kycRequiredDialog .security-dialog-art { width: 52px; height: 52px; margin: 8px auto 16px; }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-art::before,
html.ui-batch-1 body #kycRequiredDialog .security-dialog-art::after { display: none; }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-art span { width: 52px; height: 52px; border: 0; background: var(--surface-3); color: var(--text-secondary); box-shadow: none; }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-close { border-radius: var(--radius-md); }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 24px; }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-actions button { grid-row: auto; border-radius: var(--radius-md); font-weight: 600; }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-help { font-size: var(--font-size-secondary); }
html.ui-batch-1 body #kycRequiredDialog .security-dialog-help a { font-weight: 500; }
html.ui-batch-1:lang(zh) body :is(p,label,small,.field-hint,.notification-card-body,.kyc-copy,.address-value) { line-height: var(--line-height-body); }
html.ui-batch-1:lang(zh) body :is(button,.primary-pill,.outline-pill) { white-space: normal; overflow-wrap: break-word; }

/* P0 — improve quote legibility without changing Quick Sell layout. */
html.ui-batch-1 body .trade-page .trade-hero { padding: 12px; border-radius: var(--radius-md); }
html.ui-batch-1 body .trade-page .quick-form { gap: var(--space-field); }
html.ui-batch-1 body .trade-page :is(.trade-balance-meta,.trade-balance-main > span,.field-hint,.quote-card span) { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .trade-page .quote-card strong { font-size: var(--font-size-sm); font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body .trade-page .quote-card > div { min-height: 28px; padding-block: 3px; }
html.ui-batch-1 body .trade-page .quote-card-final strong { font-size: var(--font-size-md); font-weight: 600; }
html.ui-batch-1 body .trade-page .trade-mode-tabs { gap: var(--space-5); overflow-x: auto; }
html.ui-batch-1 body .trade-page .trade-mode-tabs button { flex: 0 0 auto; font-size: var(--font-size-primary); white-space: nowrap; }
html.ui-batch-1 body .trade-page .quick-form .field-block { grid-template-columns: 94px minmax(0,1fr); }

/* Order cards: type/status first, amount next, then metadata in aligned rows.
   display:contents reflows existing markup without changing copy/detail bindings. */
html.ui-batch-1 body .order-card { display: grid; grid-template-columns: minmax(0,1fr) auto 44px; gap: 8px 10px; padding-block: 20px; }
html.ui-batch-1 body .order-card :is(.order-card-top,.order-card-title,.order-card-primary,.order-card-meta) { display: contents; }
html.ui-batch-1 body .order-card-title > strong { grid-column: 1; grid-row: 1; font-size: var(--font-size-primary); font-weight: 600; white-space: normal; }
html.ui-batch-1 body .order-card .order-status { grid-column: 2; grid-row: 1; align-self: start; min-height: 26px; font-size: var(--font-size-xs); padding-inline: 6px; }
html.ui-batch-1 body .order-details-trigger { grid-column: 3; grid-row: 1; width: 44px; height: 44px; align-self: start; background: transparent; }
html.ui-batch-1 body .order-card-primary > div:first-child { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 8px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
html.ui-batch-1 body .order-card-primary > div:first-child b { font-size: var(--font-size-md); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body .order-card-primary > div:nth-child(2) { grid-column: 1 / -1; grid-row: 3; }
html.ui-batch-1 body .order-card-meta > div:first-child { grid-column: 1 / -1; grid-row: 4; }
html.ui-batch-1 body .order-card-meta > div:nth-child(2) { grid-column: 1 / -1; grid-row: 6; }
html.ui-batch-1 body .order-card :is(.order-card-primary > div:nth-child(2),.order-card-meta > div) { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 8px; align-items: center; text-align: left; }
html.ui-batch-1 body .order-id-label { grid-column: 1; grid-row: 5; align-self: center; font-size: var(--font-size-xs); }
html.ui-batch-1 body .order-card-title .copy-line { grid-column: 1 / -1; grid-row: 5; padding-left: 90px; justify-content: flex-end; }
html.ui-batch-1 body .order-card :is(.copy-line code,.order-card-primary span,.order-card-meta span) { font-size: var(--font-size-xs); font-weight: 400; }
html.ui-batch-1 body .order-card :is(.order-card-meta b,.order-card-primary > div:nth-child(2) b) { display: flex; justify-content: flex-end; min-width: 0; text-align: right; font-size: var(--font-size-secondary); font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body .order-card .copy-line button,
html.ui-batch-1 body .order-card-meta b button { width: 44px; height: 44px; flex: 0 0 44px; background: transparent; border: 0; }
html.ui-batch-1 body .order-detail-panel { padding: var(--space-5); border-radius: var(--radius-dialog) var(--radius-dialog) 0 0; }
html.ui-batch-1 body .order-detail-panel > header h2 { font-size: var(--font-size-section); font-weight: 600; }
html.ui-batch-1 body .order-detail-row { grid-template-columns: 90px minmax(0,1fr); padding-block: 12px; }
html.ui-batch-1 body .order-detail-row > b { font-size: var(--font-size-sm); font-weight: 500; }
html.ui-batch-1 body .order-detail-row > span { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .order-detail-row button { width: 44px; height: 44px; background: transparent; border: 0; }
html.ui-batch-1 body :is(.order-detail-timeline time,.order-detail-ledgers time) { font-size: var(--font-size-xs); }

/* Deposit: smaller QR and no redundant spacing around its frame. */
html.ui-batch-1 body .deposit-qr-frame { width: 150px; min-height: 150px; height: 150px; padding: 0; margin-top: 6px; border-radius: var(--radius-md); }
html.ui-batch-1 body .deposit-qr-frame > img { width: 150px; height: 150px; }
html.ui-batch-1 body:has(#depositAmount) .form-page-context { margin-bottom: 16px; }
html.ui-batch-1 body:has(#depositAmount) .stack-form { gap: var(--space-field); }
html.ui-batch-1 body .deposit-address-row { margin-top: 0; }
html.ui-batch-1 body .deposit-address-row code { font-size: var(--font-size-sm); color: var(--text-primary); }
html.ui-batch-1 body .deposit-address-row .secondary-inline-button { min-height: var(--control-height-sm); }

/* Address cards retain both add entry points; the fixed one becomes secondary. */
html.ui-batch-1 body .address-book-card.address-book-card--saved { gap: 8px; padding-block: 16px; }
html.ui-batch-1 body .address-book-head { gap: 8px; }
html.ui-batch-1 body .address-book-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
html.ui-batch-1 body .address-book-head span { margin-top: 0; font-size: var(--font-size-secondary); }
html.ui-batch-1 body .address-value-wrap { gap: 4px; }
html.ui-batch-1 body .address-value { font-size: var(--font-size-sm); line-height: var(--line-height-body); }
html.ui-batch-1 body .address-card-actions { gap: 12px; }
html.ui-batch-1 body .address-action-button { min-height: var(--control-height-sm); font-size: var(--font-size-secondary); }
html.ui-batch-1 body .address-floating-add { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); }
html.ui-batch-1 body .records-header .address-add-trigger { color: var(--brand); }
@media (min-width: 768px) { html.ui-batch-1 body .phone-page { padding-inline: var(--space-6); } }

/* P1 — finance summaries, verification and authentication. */
html.ui-batch-1 body .ledger-summary-card { margin-bottom: var(--space-6); }
html.ui-batch-1 body .ledger-summary-card article { padding-inline: 8px; gap: 6px; min-width: 0; }
html.ui-batch-1 body .ledger-summary-card article:first-child { padding-left: 0; }
html.ui-batch-1 body .ledger-summary-card article:last-child { padding-right: 0; }
html.ui-batch-1 body .ledger-summary-card strong { font-size: var(--font-size-section); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body .ledger-summary-card span { font-size: var(--font-size-xs); }
html.ui-batch-1 body .ledger-summary-card small { font-size: var(--font-size-xs); }
html.ui-batch-1 body .center-filter-tabs { overflow-x: auto; gap: var(--space-field); }
html.ui-batch-1 body .center-filter-tabs button { flex: 0 0 auto; min-width: max-content; font-size: var(--font-size-secondary); white-space: nowrap; }
html.ui-batch-1 body .ledger-main strong { font-size: var(--font-size-primary); font-weight: 500; }
html.ui-batch-1 body .ledger-main span { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .ledger-main small { font-size: var(--font-size-xs); }
html.ui-batch-1 body :is(.ledger-values b,.ledger-pair-leg b) { font-size: var(--font-size-md); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
html.ui-batch-1 body .center-card.ledger-card { grid-template-columns: minmax(0,1fr) minmax(130px,46%); }
html.ui-batch-1 body .ledger-pair-values { width: 100%; max-width: none; }
html.ui-batch-1 body :is(.ledger-values b,.ledger-pair-leg b) { overflow-wrap: normal; word-break: normal; }
html.ui-batch-1 body .ledger-pair-leg span { font-size: var(--font-size-xs); }
html.ui-batch-1 body .history-record-status { min-height: 24px; padding-block: 3px; font-size: var(--font-size-xs); }
html.ui-batch-1 body .history-record-meta small { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .history-record-meta .history-record-amount { color: var(--text-primary); font-size: var(--font-size-sm); }
html.ui-batch-1 body .history-record-meta .history-record-time { color: var(--text-secondary); font-size: var(--font-size-xs); }
html.ui-batch-1 body .history-record-meta .history-record-reason { color: var(--negative); }
html.ui-batch-1 body .history-record-card strong { font-size: var(--font-size-primary); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }

html.ui-batch-1 body .kyc-section-label { font-size: var(--font-size-section); font-weight: 600; }
html.ui-batch-1 body .kyc-verify-hero h2 { font-size: var(--font-size-content); font-weight: 600; }
html.ui-batch-1 body .kyc-level-card strong { font-size: var(--font-size-md); font-weight: 500; }
html.ui-batch-1 body :is(.kyc-level-card > div > span,.kyc-requirements-card span,.kyc-status-card span) { font-size: var(--font-size-secondary); line-height: var(--line-height-body); }
html.ui-batch-1 body .kyc-level-card li { font-size: var(--font-size-xs); }
html.ui-batch-1 body .kyc-progress { padding-bottom: 12px; margin-bottom: 18px; }
html.ui-batch-1 body .kyc-progress > em { margin-top: 4px; }
html.ui-batch-1 body .kyc-form-card { gap: var(--space-field); }
html.ui-batch-1 body .kyc-form-card label { gap: 6px; }
html.ui-batch-1 body .kyc-form-card h2 { font-size: var(--font-size-section); font-weight: 600; }
html.ui-batch-1 body .kyc-form-page .simple-header { margin-bottom: 18px; }
html.ui-batch-1 body .kyc-upload-row > div:not(.kyc-file-picker) strong { font-size: var(--font-size-primary); font-weight: 600; }
html.ui-batch-1 body :is(.kyc-upload-row > div:not(.kyc-file-picker) span,.kyc-file-name,.kyc-file-error) { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .kyc-review-summary strong { font-size: var(--font-size-sm); font-weight: 500; }
html.ui-batch-1 body .kyc-copy h1 { font-size: var(--font-size-content); font-weight: 600; }

html.ui-batch-1 body .convert-box { min-height: 98px; padding-block: 10px; }
html.ui-batch-1 body .box-head { margin-bottom: 8px; }
html.ui-batch-1 body .box-head small { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .convert-swap-slot { height: 12px; }
html.ui-batch-1 body .quote-summary { margin: 8px 0 16px; padding-top: 6px; }
html.ui-batch-1 body .quote-summary > div { min-height: 34px; padding-block: 5px; }
html.ui-batch-1 body .quote-summary > div:has(#receiveText) { margin-top: 4px; padding-top: 10px; }
html.ui-batch-1 body #receiveText { font-size: var(--font-size-md); font-weight: 600; }

html.ui-batch-1 body .phone-page .records-header.notifications-header { margin-bottom: var(--space-4); }
html.ui-batch-1 body .notifications-header .mark-read-button { position: static; grid-column: 3; grid-row: 1; width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); }
html.ui-batch-1 body .notifications-header .mark-read-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ui-batch-1 body .notifications-header .mark-read-button svg { width: 22px; height: 22px; }
html.ui-batch-1 body .notification-card:not(.is-empty) { padding-block: 18px; }
html.ui-batch-1 body .notification-card-body { gap: 6px; }
html.ui-batch-1 body .notification-card-body > strong { font-size: var(--font-size-primary); font-weight: 600; }
html.ui-batch-1 body .notification-card:not(.is-empty) p { font-size: var(--font-size-sm); line-height: var(--line-height-body); }
html.ui-batch-1 body .notification-card:not(.is-empty) footer { min-height: 28px; }
html.ui-batch-1 body .notification-view-link { min-height: 32px; }

html.ui-batch-1 body .auth-brand-block { grid-template-columns: 28px minmax(0,1fr); margin-block: 20px; gap: 8px; }
html.ui-batch-1 body .auth-brand-block img { width: 28px; height: 28px; }
html.ui-batch-1 body .auth-brand-block strong { font-size: var(--font-size-content); font-weight: 600; }
html.ui-batch-1 body .auth-form-card { gap: var(--space-field); }
html.ui-batch-1 body .auth-input { gap: 6px; }
html.ui-batch-1 body .auth-input input { min-height: var(--control-height-lg); font-size: var(--font-size-sm); }
html.ui-batch-1 body .auth-input > :is(i,svg) { top: 38px; }
html.ui-batch-1 body .auth-password-toggle { top: 27px; }
html.ui-batch-1 body[data-auth-page] .auth-input > :is(.auth-password-rule,.auth-caps-lock),
html.ui-batch-1 body .auth-send-code-button { font-size: var(--font-size-secondary); }
html.ui-batch-1 body :is(.auth-support-link,.auth-security-note) { margin-block: 12px; }
html.ui-batch-1 body .auth-security-note { padding-top: 0; }

/* P2 — small density changes, retaining the existing page composition. */
html.ui-batch-1 body .featured-market-card { padding: 12px; border-radius: var(--radius-md); }
html.ui-batch-1 body .featured-market-card > div > b { margin-top: 10px; font-size: 28px; font-weight: 600; }
html.ui-batch-1 body .featured-market-card p { margin-top: 4px; }
html.ui-batch-1 body .featured-market-card p small { font-size: var(--font-size-xs); }
html.ui-batch-1 body .featured-market-head em { font-size: var(--font-size-xs); }
html.ui-batch-1 body .discover-summary { margin: 18px 0 6px; gap: 2px; }
html.ui-batch-1 body .discover-summary strong { font-size: var(--font-size-secondary); font-weight: 500; }
html.ui-batch-1 body .discover-summary span { font-size: var(--font-size-secondary); }
html.ui-batch-1 body :is(.discover-market-name strong,.discover-market-quote strong) { font-size: var(--font-size-primary); }
html.ui-batch-1 body .discover-market-row { min-height: 68px; padding-block: 10px; }
html.ui-batch-1 body .market-detail-price strong { font-size: 34px; font-weight: 600; }
/* Only the current empty placeholder shrinks; future real chart content does not match. */
html.ui-batch-1 body .market-chart-card:has(> .candles > [data-i18n="common.noData"]:only-child) { min-height: 160px; }
html.ui-batch-1 body .market-detail-stats span { font-size: var(--font-size-secondary); }
html.ui-batch-1 body .market-detail-stats strong { font-size: var(--font-size-primary); }
html.ui-batch-1 body .market-detail-stats article { min-height: 66px; }
html.ui-batch-1 body .related-markets-card :is(strong,b) { font-size: var(--font-size-primary); font-weight: 500; }

html.ui-batch-1 body .invite-qr-card { padding: 12px 16px; gap: 12px; border-radius: var(--radius-md); }
html.ui-batch-1 body .invite-qr-stage { width: 150px; height: 150px; }
html.ui-batch-1 body .invite-code-box { min-height: 36px; }
html.ui-batch-1 body .invite-code-box b { font-size: 20px; }
html.ui-batch-1 body .invite-link-panel > div { grid-template-columns: minmax(0,1fr) 44px; }
html.ui-batch-1 body .invite-link-panel :is(span,.outline-pill) { min-height: 44px; }
html.ui-batch-1 body .invite-link-panel .outline-pill { width: 44px; }
html.ui-batch-1 body .invite-link-panel { margin-top: 20px; }
html.ui-batch-1 body .invite-scan-copy { font-size: var(--font-size-secondary); }

/* Reserve a separate row for guidance on phones, regardless of QR dimensions. */
@media(max-width:767px){
 html.ui-batch-1 body .invite-qr-card{grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center}
 html.ui-batch-1 body .invite-qr-stage{max-width:100%}
 html.ui-batch-1 body .invite-scan-copy{grid-column:1;min-width:0;max-width:100%;justify-content:center;align-items:center;overflow-wrap:break-word}
 html.ui-batch-1 body .invite-scan-copy svg{flex-shrink:0}
 html.ui-batch-1 body .invite-scan-copy span{min-width:0}
}
html.ui-batch-1 body .merchant-overview-row { min-height: 76px; padding-block: 14px; }
html.ui-batch-1 body .merchant-overview-row strong { font-size: var(--font-size-primary); font-weight: 500; }
html.ui-batch-1 body .merchant-overview-row span { margin-top: 6px; font-size: var(--font-size-sm); }
html.ui-batch-1 body .merchant-overview-card .outline-pill { min-width: 52px; min-height: var(--control-height-sm); padding-inline: 8px; font-size: var(--font-size-secondary); }
html.ui-batch-1 body .merchant-overview-card .outline-pill { min-height: var(--control-height-md); }
html.ui-batch-1 body #luckyOrderList .empty-record { min-height: 200px; margin: var(--space-5) 0; padding: var(--space-6); border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: center; }
html.ui-batch-1 body #luckyOrderList .empty-record strong { font-size: var(--font-size-primary); font-weight: 600; }
html.ui-batch-1 body .merchant-action-label { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 400; }
html.ui-batch-1 body .merchant-address-row { grid-template-columns: minmax(0,1fr) 52px; }
html.ui-batch-1 body .merchant-overview-row .merchant-address-value { font-size: var(--font-size-sm); color: var(--text-primary); overflow-wrap: anywhere; }

html.ui-batch-1 body .announcement-page-list a { min-height: 80px; padding-block: 16px; gap: 8px; align-content: center; }
html.ui-batch-1 body .announcement-list article h3 { font-size: var(--font-size-primary); font-weight: 600; }
html.ui-batch-1 body .announcement-list article time { font-size: var(--font-size-xs); }
html.ui-batch-1 body .announcement-detail h2 { font-size: var(--font-size-content); font-weight: 600; }
html.ui-batch-1 body .announcement-detail p { font-size: var(--font-size-sm); line-height: 1.6; }

html.ui-batch-1 body .home-top-row .icon-button svg { width: 22px; height: 22px; }
html.ui-batch-1 body .market-column-head { font-size: var(--font-size-xs); }
/* Keep long translated column headings aligned with the quote rows. */
html.ui-batch-1 body :is(.market-column-head,.pair-row) { grid-template-columns: minmax(0,1.2fr) minmax(80px,1fr) 92px; }
html.ui-batch-1 body .market-column-head span { white-space: nowrap; }
/* Equal icon and label rows prevent translated labels from shifting the icons. */
html.ui-batch-1 body .bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(74px + var(--safe-area-bottom));
}
html.ui-batch-1 body .bottom-nav :is(a, .trade-fab) {
  display: grid;
  grid-template-rows: 22px 2.5em;
  place-items: center;
  align-content: center;
  min-width: 0;
  min-height: 56px;
  padding-inline: 0;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  text-align: center;
}
html.ui-batch-1 body .bottom-nav :is(a, .trade-fab) span {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 2.5em;
  margin: 0;
  font-size: var(--font-size-xs);
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  overflow: visible;
  text-wrap: balance;
}
html.ui-batch-1 body .pair-name strong { font-size: var(--font-size-primary); }
html.ui-batch-1 body :is(.pair-name small,.pair-name strong small,.pair-price small) { font-size: var(--font-size-xs); }
html.ui-batch-1 body .btc-total strong,
html.ui-batch-1 body .assets-overview-total strong { font-size: 35px; font-weight: 600; }
html.ui-batch-1 body .assets-overview-total { margin-top: 10px; }
/* Show the complete asset total; allow the currency to wrap before truncating digits. */
html.ui-batch-1 body :is(.btc-total,.assets-overview-total) { flex-wrap: wrap; }
html.ui-batch-1 body :is(.btc-total,.assets-overview-total) [data-asset-total] { max-width: 100%; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
html.ui-batch-1 body .assets-overview-pnl { margin-top: 14px; }
html.ui-batch-1 body .assets-entry-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--font-size-secondary); }
html.ui-batch-1 body .assets-entry-copy strong { font-size: var(--font-size-primary); }
html.ui-batch-1 body .token-row { padding-block: 12px; }
html.ui-batch-1 body .token-value strong { font-size: var(--font-size-md); font-weight: 600; }
html.ui-batch-1 body .token-value small { margin-top: 4px; font-size: var(--font-size-xs); }
html.ui-batch-1 body .form-select-trigger small { font-size: var(--font-size-secondary); white-space: normal; }
html.ui-batch-1 body .withdraw-summary-card strong { text-align: right; font-size: var(--font-size-sm); }
html.ui-batch-1 body .withdraw-total-debit strong { font-size: var(--font-size-md); font-weight: 600; }
html.ui-batch-1 body .max-chip { font-size: var(--font-size-secondary); font-weight: 500; }
html.ui-batch-1 body .error-page { padding-bottom: 102px; }
html.ui-batch-1 body .error-brand img { width: 25px; height: 25px; }
html.ui-batch-1 body .error-brand span { font-size: var(--font-size-section); }

/* Compact the KYC progress area rather than reducing field sizes or readability. */
html.ui-batch-1 body .kyc-form-page .simple-header { margin-bottom: 12px; }
html.ui-batch-1 body .kyc-form-page .kyc-progress { gap: 4px 8px; padding-bottom: 8px; margin-bottom: 18px; }
html.ui-batch-1 body .kyc-form-page .kyc-progress article { grid-template-columns: 26px minmax(0,1fr); align-items: center; justify-items: start; gap: 6px; text-align: left; }
html.ui-batch-1 body .kyc-form-page .kyc-progress > em { margin-top: 0; }
html.ui-batch-1 body .kyc-form-card h2 { line-height: 1.4; margin-bottom: -6px; }

/* Settings uses the approved page, list and form scale. Keep these overrides
   inside the existing sheet so the completed routes retain their appearance. */
html.ui-batch-1 #accountSettingsSheet .account-settings-panel {
  padding: var(--space-2) var(--space-4) calc(var(--space-6) + var(--safe-area-bottom));
  background: var(--bg); color: var(--text-primary); font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
}
#accountSettingsSheet .account-settings-header {
  grid-template-columns: var(--control-height-md) minmax(0,1fr) var(--control-height-md);
  min-height: var(--header-height); margin: 0 0 var(--space-6); padding: 0;
  border-bottom: 1px solid var(--divider);
}
#accountSettingsSheet .account-settings-header h2 {
  font-size: var(--font-size-lg); font-weight: var(--font-weight-title);
  line-height: var(--line-height-title); letter-spacing: -.02em; color: var(--text-primary);
  white-space: normal; overflow-wrap: break-word;
}
#accountSettingsSheet .account-settings-header .icon-button {
  width: var(--control-height-md); height: var(--control-height-md); padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  box-shadow: none; color: var(--text-secondary);
}
#accountSettingsSheet .account-settings-header .icon-button svg { width: 20px; height: 20px; }
#accountSettingsSheet .settings-summary-card {
  gap: var(--space-3); padding: var(--space-4); margin: 0 0 var(--space-6);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-1); box-shadow: none;
}
#accountSettingsSheet .security-summary-heading { grid-template-columns: 20px minmax(0,1fr); gap: 6px 10px; align-items: start; }
#accountSettingsSheet .security-summary-icon {
  width: 20px; height: 24px; grid-row: 1; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--text-secondary);
}
#accountSettingsSheet .security-summary-icon svg { width: 20px; height: 20px; }
#accountSettingsSheet .security-summary-heading > div { display: grid; gap: 6px; }
#accountSettingsSheet .security-summary-heading strong { font-size: var(--font-size-md); font-weight: 600; line-height: 1.5; }
#accountSettingsSheet .security-summary-heading > div > span {
  margin: 0; color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 400; line-height: 1.5;
}
#accountSettingsSheet .security-summary-heading > b { font-size: var(--font-size-secondary); font-weight: 500; line-height: 1.5; }
#accountSettingsSheet .security-summary-statuses { gap: 0; padding-top: 0; border-top: 1px solid var(--divider); }
#accountSettingsSheet .security-summary-status { min-height: 44px; gap: 8px; padding-block: 8px; }
#accountSettingsSheet .security-summary-status + .security-summary-status { border-top: 1px solid var(--divider); }
#accountSettingsSheet .security-summary-status > svg { color: var(--text-secondary); }
#accountSettingsSheet .security-summary-status > span { color: var(--text-primary); font-size: var(--font-size-secondary); font-weight: 400; }
#accountSettingsSheet .security-summary-status > b {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 24px; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: var(--font-size-xs); font-weight: 500; line-height: 1.5; white-space: nowrap;
}
#accountSettingsSheet .security-summary-status > b[data-state="active"] { background: color-mix(in srgb,var(--positive) 12%,transparent); color: var(--positive); }
#accountSettingsSheet .security-summary-status > b[data-state="attention"] { background: var(--surface-3); color: var(--text-secondary); }

#accountSettingsSheet .settings-action-list { gap: 0; margin-bottom: 0; }
#accountSettingsSheet .settings-group-title {
  margin: var(--space-6) 0 var(--space-2); color: var(--text-secondary);
  font-size: var(--font-size-secondary); font-weight: 600; line-height: 1.5;
  letter-spacing: 0; text-transform: none;
}
#accountSettingsSheet .settings-group-title:first-child { margin-top: 0; }
#accountSettingsSheet .settings-action-list > button,
#accountSettingsSheet .settings-language-menu .language-trigger {
  display: grid; grid-template-columns: 20px minmax(0,1fr) 18px;
  gap: var(--space-3); min-height: 56px; padding: 12px 0; margin: 0;
  border: 0; border-bottom: 1px solid var(--divider); border-radius: 0;
  background: transparent; box-shadow: none; color: var(--text-primary);
  font-size: var(--font-size-primary); font-weight: 500; line-height: 1.5;
  text-align: left; white-space: normal;
}
#accountSettingsSheet .settings-action-list > button span,
#accountSettingsSheet .settings-language-menu .language-trigger span { min-width: 0; color: inherit; font-weight: 500; }
#accountSettingsSheet .settings-action-list > button > svg:first-child,
#accountSettingsSheet .settings-language-menu .settings-language-icon {
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--text-secondary); transform: none;
}
#accountSettingsSheet .settings-action-list > button > svg:last-child,
#accountSettingsSheet .settings-language-menu .language-trigger > svg:last-child { width: 18px; height: 18px; color: var(--text-secondary); }
#accountSettingsSheet .settings-action-list > button.danger,
#accountSettingsSheet .settings-action-list > button.danger > svg:first-child { color: var(--negative); }
#accountSettingsSheet .settings-action-list > button:hover,
#accountSettingsSheet .settings-language-menu .language-trigger:hover { background: var(--surface-1); }
#accountSettingsSheet .settings-language-menu { margin: 0; }
#accountSettingsSheet .settings-language-menu .language-trigger { grid-template-columns: 20px minmax(0,1fr) auto 18px; }
#accountSettingsSheet .settings-language-menu .language-trigger [data-language-label] { color: var(--text-secondary); font-size: var(--font-size-secondary); }
#accountSettingsSheet .settings-language-menu .language-options {
  display: none; position: static; min-width: 0; margin-top: var(--space-2); padding: var(--space-1);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); box-shadow: none; transform: none; transition: none;
}
#accountSettingsSheet .settings-language-menu.open .language-options { display: grid; }
#accountSettingsSheet .settings-language-menu .language-options button {
  min-height: var(--control-height-md); padding: 8px 12px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-primary); font-size: var(--font-size-sm); font-weight: 400; line-height: 1.5;
}
#accountSettingsSheet .settings-language-menu .language-options button:is(:hover,.active) { color: var(--brand); background: var(--surface-3); }

#accountSettingsSheet .settings-form:not([hidden]) { gap: var(--space-field); padding: 0; margin: 0; background: transparent; }
#accountSettingsSheet .settings-form-head { padding: 0; }
#accountSettingsSheet .settings-form-head p { color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 400; line-height: 1.5; }
#accountSettingsSheet .settings-form label { gap: var(--space-2); color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 400; line-height: 1.5; }
#accountSettingsSheet .settings-form input {
  width: 100%; min-width: 0; height: var(--control-height-lg); min-height: var(--control-height-lg);
  padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-1); color: var(--text-primary); font-size: var(--font-size-sm); font-weight: 400; box-shadow: none;
}
#accountSettingsSheet .settings-form input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#accountSettingsSheet .settings-form :is(.primary-pill,.outline-pill) {
  min-height: var(--control-height-lg); margin: 0; padding: 12px;
  border-radius: var(--radius-md); font-size: var(--font-size-primary); font-weight: 600; line-height: 1.5;
  white-space: normal; overflow-wrap: break-word;
}
#accountSettingsSheet .settings-form .primary-pill { background: var(--brand); border: 0; color: var(--bg); box-shadow: none; }
#accountSettingsSheet .settings-form .outline-pill { min-height: 46px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-weight: 500; }
#accountSettingsSheet [data-pay-password-setup-code-wrap]:not([hidden]) { display: grid; gap: var(--space-field); }
#accountSettingsSheet .settings-form :is([data-pay-password-reset-open],[data-pay-password-reset-back]) {
  min-height: var(--control-height-md); border: 0; background: transparent; color: var(--text-secondary); font-size: var(--font-size-sm); font-weight: 400;
}
#accountSettingsSheet .device-session-list { gap: 0; }
#accountSettingsSheet .device-session-card {
  grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: var(--space-3); padding: var(--space-4) 0;
  border: 0; border-bottom: 1px solid var(--divider); border-radius: 0; background: transparent;
}
#accountSettingsSheet .device-session-card strong { font-size: var(--font-size-primary); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
#accountSettingsSheet .device-session-card span,
#accountSettingsSheet .device-session-empty { color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
#accountSettingsSheet .device-session-card .outline-pill { width: auto; max-width: 116px; min-height: var(--control-height-sm); padding: 6px 10px; color: var(--negative); font-size: var(--font-size-xs); font-weight: 500; }
#accountSettingsSheet .device-session-card .outline-pill:disabled { min-height: 26px; padding: 4px 8px; border: 0; background: var(--surface-2); color: var(--text-secondary); opacity: 1; }
#accountSettingsSheet .settings-status { padding: var(--space-3); border-radius: var(--radius-md); font-size: var(--font-size-secondary); line-height: 1.5; }
#accountSettingsSheet .settings-status[data-type="ok"] { border-color: color-mix(in srgb,var(--positive) 24%,var(--border)); background: color-mix(in srgb,var(--positive) 8%,transparent); color: var(--positive); }

/* Personal drawer: the same typography, controls and spacing as the page UI. */
html.ui-batch-1 #homeDrawer .drawer-panel {
  padding: var(--space-2) var(--space-4) calc(var(--space-6) + var(--safe-area-bottom));
  background: var(--surface-1); border-color: var(--divider); color: var(--text-primary);
}
#homeDrawer .drawer-status { display: flex; align-items: center; min-height: var(--header-height); margin: 0; }
#homeDrawer .drawer-status .icon-button { width: var(--control-height-md); height: var(--control-height-md); border: 0; background: transparent; color: var(--text-secondary); box-shadow: none; }
#homeDrawer .drawer-status .icon-button svg { width: 20px; height: 20px; }
#homeDrawer .drawer-profile {
  position: relative; grid-template-columns: 52px minmax(0,1fr) 64px; gap: var(--space-3); align-items: start;
  margin: 0; padding: var(--space-3) 0 var(--space-6); border: 0;
}
#homeDrawer .avatar-photo { width: 52px; height: 52px; border: 1px solid var(--border); box-shadow: none; }
#homeDrawer .drawer-profile h2 {
  margin: 0; color: var(--text-primary); font-size: 17px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#homeDrawer .drawer-profile-meta { gap: 4px 12px; margin-top: var(--space-1); }
#homeDrawer :is(.drawer-role-pill,.drawer-uid) {
  min-height: 18px; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5;
}
#homeDrawer .drawer-role-pill i { width: 5px; height: 5px; background: var(--brand); }
#homeDrawer .drawer-uid { min-width: 0; flex-wrap: wrap; gap: 0 4px; }
#homeDrawer .drawer-uid b { min-width: 0; font-weight: 400; overflow-wrap: anywhere; }
#homeDrawer .drawer-profile-actions { gap: var(--space-2); margin-top: 6px; }
#homeDrawer .drawer-profile-actions button {
  min-height: var(--control-height-sm); padding: 6px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2); color: var(--text-secondary);
  font-size: var(--font-size-xs); font-weight: 500; line-height: 1.5; white-space: normal;
}
#homeDrawer .drawer-profile-actions [data-account-settings-open] { min-height: 32px; padding: 0; gap: var(--space-2); border: 0; border-radius: 0; background: transparent; color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 500; text-align: left; }
#homeDrawer [data-account-settings-open]::after { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); pointer-events: none; }
#homeDrawer .drawer-profile-actions .drawer-qr-button { position: absolute; top: var(--space-3); right: calc((64px - var(--control-height-sm)) / 2); display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: var(--control-height-sm); height: var(--control-height-sm); flex-basis: var(--control-height-sm); padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text-secondary); }
#homeDrawer .drawer-qr-button svg { width: 20px; height: 20px; }
#homeDrawer .drawer-profile [data-unavailable-note="ui.qrUnavailable"] { position: absolute; top: calc(var(--space-3) + var(--control-height-sm) + var(--space-1)); right: 0; width: 64px; margin: 0; text-align: center; }
#homeDrawer .drawer-account-status {
  grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0 0 var(--space-6);
  padding: 0; border: 0; border-radius: var(--radius-md); background: var(--surface-2);
}
#homeDrawer .drawer-account-status article {
  min-width: 0; min-height: 72px; padding: 12px 10px; gap: var(--space-1);
  display: grid; align-content: center; border: 0; border-radius: 0; background: transparent;
}
#homeDrawer .drawer-account-status article + article { border-left: 0; }
#homeDrawer .drawer-account-status span { min-height: 0; margin: 0; color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; }
#homeDrawer .drawer-account-status strong { display: block; color: var(--text-primary); font-size: var(--font-size-md); font-weight: 600; line-height: 1.5; overflow: visible; overflow-wrap: anywhere; }
#homeDrawer .drawer-account-status strong.is-ok { color: var(--positive); }
#homeDrawer .drawer-account-status strong.is-warn { color: var(--brand); }
#homeDrawer .drawer-card { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#homeDrawer .drawer-card + .drawer-card { margin-top: var(--space-6); padding-top: 0; border-top: 0; }
#homeDrawer .drawer-card h3 { display: flex; align-items: center; gap: var(--space-2); color: var(--text-primary); font-size: var(--font-size-section); font-weight: 600; line-height: 1.5; white-space: normal; }
#homeDrawer .drawer-card h3::before { content: ""; flex: 0 0 3px; width: 3px; height: 14px; border-radius: var(--radius-sm); background: var(--brand); }
#homeDrawer .drawer-section-head,
#homeDrawer .drawer-card > h3 { margin-bottom: var(--space-4); }
#homeDrawer .drawer-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-2) 0; }
#homeDrawer .drawer-card:has([data-i18n="drawer.commonFeatures"]) .drawer-grid {
  grid-template-columns: repeat(5,minmax(0,1fr)); gap: var(--space-2) 0;
}
#homeDrawer .drawer-grid a { grid-template-rows: 24px minmax(2.6em,auto); min-height: 72px; gap: var(--space-2); align-content: start; align-items: center; padding: 0 var(--space-1); color: var(--text-primary); font-size: var(--font-size-xs); }
#homeDrawer .drawer-grid a svg { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text-secondary); stroke-width: 1.8; }
#homeDrawer .drawer-grid a span { min-width: 0; max-width: 100%; align-self: start; font-size: var(--font-size-xs); font-weight: 500; line-height: 1.3; white-space: normal; word-break: normal; overflow-wrap: normal; text-wrap: balance; }
#homeDrawer .drawer-grid [data-i18n="common.announcements"] { max-inline-size: 100%; hyphens: auto; overflow-wrap: normal; }
#homeDrawer .drawer-profile-guest { grid-template-columns: 52px minmax(0,1fr); }
#homeDrawer .drawer-profile-guest h2 { white-space: normal; overflow-wrap: anywhere; }
#homeDrawer .drawer-profile-guest > div > span { color: var(--text-secondary); font-size: var(--font-size-secondary); line-height: 1.5; }
/* Group order estimates share the existing card tokens and wrap their explanation. */
.group-order .join-summary-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: var(--space-3); }
.group-order .join-summary-card > strong { text-align: right; white-space: normal; overflow-wrap: anywhere; }
.group-order .join-summary-card > .field-hint { grid-column: 1 / -1; margin: 0; line-height: 1.5; }
.group-order [data-order-profit].is-negative { color: var(--color-danger); }
.trade-panel .group-refresh { align-self: flex-start; min-height: var(--control-height-md); margin-top: var(--space-2); }

[data-withdraw-minimum][data-type="error"] { color: var(--color-danger, #f6465d); }

/* A deposit requires an available address on the selected network. */
html.ui-batch-1 #depositSubmitButton:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }

html.ui-batch-1 #homeDrawer .drawer-panel{background:var(--bg)}


/* Shared result prompts follow the existing dark surface and gold accent tokens. */
#operationResultDialog {
  position: fixed;
  width: min(380px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: 36px 24px 26px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-dialog, 16px);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 26px 72px rgba(0, 0, 0, .48);
  text-align: center;
}

#operationResultDialog:focus { outline: none; }

#operationResultDialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
}

#operationResultDialog .result-dialog-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md, 10px);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

#operationResultDialog .result-dialog-dismiss:hover,
#operationResultDialog .result-dialog-dismiss:focus-visible {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

#operationResultDialog .result-dialog-dismiss svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

#operationResultDialog .result-dialog-icon,
html.ui-batch-1 body #operationResultDialog[data-type="error"] .result-dialog-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border: 2px solid color-mix(in srgb, var(--color-brand) 28%, var(--color-border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand) 5%, var(--color-surface));
  color: var(--color-brand);
  box-shadow: none;
}

#operationResultDialog[data-type="success"] .result-dialog-icon {
  border-color: color-mix(in srgb, var(--color-success) 30%, var(--color-border));
  background: color-mix(in srgb, var(--color-success) 6%, var(--color-surface));
  color: var(--color-success);
}

#operationResultDialog .result-dialog-alert-mark {
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
}

#operationResultDialog h2 {
  margin: 0 0 12px;
  color: var(--color-text);
  font-size: var(--font-size-xl, 24px);
  font-weight: 600;
  line-height: 1.3;
}

#operationResultDialog p {
  max-width: 100%;
  max-height: min(30dvh, 180px);
  margin: 0 auto 26px;
  overflow-y: auto;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm, 14px);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

#operationResultDialog [data-result-confirm] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(176px, 100%);
  min-width: min(176px, 100%);
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-md, 10px);
  background: var(--brand-gradient);
  color: var(--color-bg-page);
  font-size: var(--font-size-md, 16px);
  font-weight: 600;
}

@media (max-width: 340px) {
  #operationResultDialog { padding-inline: 20px; }
}


.product-notice { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:16px; margin:12px 0; border:1px solid #30343a; border-radius:10px; background:#11151a; color:#aeb5bf; font-size:13px; line-height:1.6; }
.product-notice[hidden], .product-field-error[hidden] { display:none; }
.product-notice .outline-pill { padding:8px 14px; flex-shrink:0; }
.product-field-error { color:#ef6b75; font-size:12px; margin:8px 0; }
.result-dialog[data-structured="true"] { width:420px; max-height:calc(100dvh - 32px); overflow-y:auto; }
.result-dialog [data-result-details] { text-align:left; margin:20px 0; }
.result-dialog [data-result-details] > div { display:flex; gap:16px; justify-content:space-between; padding:10px 0; border-bottom:1px solid #30343a; font-size:13px; }
.result-dialog [data-result-details] dt { color:#939aa5; flex-shrink:0; }
.result-dialog [data-result-details] dd { margin:0; text-align:right; overflow-wrap:anywhere; color:#f1f3f6; }
.result-dialog[data-type="pending"] .result-dialog-icon { background:#302611; color:#f7b500; }
.result-dialog .result-actions { display:flex; justify-content:center; gap:10px; }
.result-dialog[data-structured="true"] .result-actions > * { width:auto; flex:1; min-width:0; text-align:center; padding:12px 8px; }
.result-dialog .result-actions > [hidden] { display:none; }
.market-refresh-row { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:12px; color:#929aa5; }
.market-refresh-row button { padding:8px 12px; }
.home-popup-panel { max-height:calc(100dvh - 40px); overflow-y:auto; }
.home-popup-panel p { white-space:pre-wrap; overflow-wrap:anywhere; }
.merchant-overview-card details { margin-top:16px; }
.merchant-overview-card summary { cursor:pointer; color:#f7b500; padding:10px 0; }

html.ui-batch-1 body #operationResultDialog[data-structured="true"] .result-actions [data-result-confirm] { background:transparent; color:var(--color-text); border:1px solid var(--color-border); min-width:0; }
html.ui-batch-1 body #operationResultDialog[data-type="pending"] .result-dialog-icon { background:#302611; color:#f7b500; border-color:#66501e; }
.announcement-state { padding:20px; }
.announcement-state h3 { margin:0 0 12px; }
/* Also suppress the legacy success footer during a partial resource update. */
[data-page="trade"] [data-trade-status][data-type="success"] { display:none; }
.asset-sync-status { display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap; margin-top:var(--space-2); color:var(--color-text-secondary); font-size:var(--font-size-xs); line-height:1.5; }
.asset-sync-status[hidden] { display:none; }
[data-asset-total-wrap] { position:relative; }
html body [data-asset-total-wrap] > .asset-sync-status { position:absolute;top:100%;right:0;max-width:48%;margin-top:var(--space-2);justify-content:flex-end;text-align:right;line-height:18px; }
html body [data-asset-total-wrap] > .asset-sync-status span { font-size:var(--font-size-xs);font-weight:400;color:var(--color-text-secondary);white-space:normal;overflow-wrap:break-word;min-width:0;max-width:100%;flex-basis:100%; }
.asset-sync-retry { padding:var(--space-1) 0; border:0; background:transparent; color:var(--color-brand); font:inherit; cursor:pointer; }
.asset-sync-retry:disabled { opacity:.6; cursor:wait; }

/* Shared total-balance motion: inherit existing typography and colors. */
html body [data-asset-total] .balance-roll-visual,
html body [data-asset-total] .balance-roll-digit,
html body [data-asset-total] .balance-roll-track,
html body [data-asset-total-card] .balance-roll-visual,
html body [data-asset-total-card] .balance-roll-digit,
html body [data-asset-total-card] .balance-roll-track {
  font:inherit;
  color:inherit;
  margin:0;
  padding:0;
}
html body [data-asset-total] .balance-roll-visual,
html body [data-asset-total-card] .balance-roll-visual { display:inline; }
[data-asset-total] .balance-roll-digit,
[data-asset-total-card] .balance-roll-digit {
  display:inline-block;
  position:relative;
  height:1lh;
  line-height:inherit;
  overflow:hidden;
  vertical-align:bottom;
  font-variant-numeric:tabular-nums;
}
.balance-roll-track { display:block; position:relative; }
.balance-roll-track::before { content:attr(data-previous); position:absolute; left:0; top:-100%; }
.balance-roll-track.is-down::before { top:100%; }
@media (prefers-reduced-motion:reduce) {
  .balance-roll-track { transform:none !important; }
  .balance-roll-track::before { content:none; }
}

/* Concise shared loading and notice layouts, using the existing tokens. */
.ui-loading-placeholder { width:100%; min-height:64px; border-radius:var(--radius-sm); background:var(--color-surface); }
.product-notice.product-loading { padding:0; border:0; background:transparent; }
.market-refresh-row > [data-global-updated] { min-width:0; overflow-wrap:break-word; line-height:1.5; }
.group-order .panel-heading > span { font-size:var(--font-size-sm); line-height:1.5; }
.group-order .join-summary-card .field-hint { line-height:1.5; }

/* Read failures share the existing secondary typography without a card or action. */
html body .product-notice.product-notice--network {
  display:block; padding:0; margin:var(--space-2) 0 var(--space-3);
  border:0; border-radius:0; background:transparent;
  color:var(--color-text-secondary); font-size:var(--font-size-xs); font-weight:400;
  line-height:1.6; text-align:left; overflow-wrap:break-word;
}
html body .product-notice.product-notice--network[hidden] { display:none; }
html body .product-notice--network > span { font:inherit; color:inherit; }
html body dialog.gp-point-dialog > .product-notice.product-notice--network { margin-inline:var(--space-4); }
html body .asset-sync-status.product-notice--network { position:static; max-width:none; width:auto; justify-content:initial; }
html body .asset-sync-status.product-notice--network > span { max-width:none; flex-basis:auto; text-align:left; }

.home-entry-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}.home-entry-track::-webkit-scrollbar{display:none}.home-entry-track .home-trade-entry{flex:0 0 100%;box-sizing:border-box;scroll-snap-align:start;margin:0;min-width:0}.home-entry-track .home-trade-entry[hidden]{display:none}.home-entry-dots{display:flex;justify-content:center;gap:0;margin:0 0 12px}.home-entry-dots button{width:44px;height:44px;border:0;background:transparent;padding:19px 15px}.home-entry-dots button::after{content:'';display:block;height:5px;width:14px;border-radius:4px;background:var(--muted);opacity:.35;transition:background-color .18s,opacity .18s}.home-entry-dots button[aria-current=true]::after{background:var(--brand);opacity:1}.home-entry-track{scroll-behavior:smooth}.discover-market-quote strong,[data-market-price],#spotLastPrice{font-variant-numeric:tabular-nums}.home-entry-carousel{min-width:0}@media(prefers-reduced-motion:reduce){.home-entry-track{scroll-behavior:auto}.home-entry-dots button::after{transition:none}}
@view-transition{navigation:auto}
::view-transition-old(root){animation:ohbits-page-out 100ms ease-out both}
::view-transition-new(root){animation:ohbits-page-in 140ms ease-out both}
@keyframes ohbits-page-out{to{opacity:0}}
@keyframes ohbits-page-in{from{opacity:0}}
@media(prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none}}


/* Shared activity entrance and public pre-launch page. */
.drawer-activity-section [data-get-points-name] { overflow-wrap: anywhere; }
.activity-square-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.activity-square-icon svg { width: 21px; height: 21px; }
.activity-page { --activity-muted: #a0a8b3; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.activity-page::before, .activity-page::after { display: none; }
.activity-page .records-header { margin-bottom: 18px; grid-template-columns:44px minmax(0,1fr) max-content; }
.activity-page h2, .activity-page h3, .activity-page p { margin: 0; }
.activity-page svg { flex-shrink: 0; }
.activity-page a { text-decoration: none; }
.activity-page a:focus-visible, .activity-page summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.activity-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #5a421d; border-radius: 18px; padding: 22px 20px; background: radial-gradient(ellipse at 100% 55%, rgba(245,167,7,.14), transparent 64%), linear-gradient(130deg,#1b1812,#101215 70%); }
.activity-hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.activity-eyebrow { color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.activity-status { padding: 5px 9px; border: 1px solid rgba(245,167,7,.24); border-radius: 20px; color: #efbd68; font-size: 11px; line-height: 1.3; text-align: center; }
.activity-hero h2 { position: relative; max-width: 240px; margin-top: 28px; font-size: 26px; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; }
.activity-hero p { position: relative; max-width: 270px; margin-top: 12px; color: #bcc0c7; font-size: 13px; line-height: 1.8; }
.activity-hero-art { position: absolute; z-index: -1; right: 16px; top: 49px; width: 80px; color: var(--brand); transform: rotate(9deg); opacity: .13; }
.activity-hero-art span { font-size: 134px; font-weight: 900; line-height: 1; }
.activity-hero-art svg { position: absolute; right: -4px; top: 5px; width: 30px; height: 30px; }
.activity-rule-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 17px; min-height: 30px; color: var(--brand); font-size: 12px; font-weight: 650; }
.activity-rule-link svg { width: 15px; height: 15px; }
.activity-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface-1); }
.activity-points { margin-top: 16px; padding: 18px; }
.activity-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity-section-heading h2, .activity-section > h2 { font-size: 17px; font-weight: 750; line-height: 1.5; }
.activity-muted-status { color: var(--activity-muted); font-size: 11px; }
.activity-page .activity-total-label { margin-top: 20px; color: var(--activity-muted); font-size: 12px; }
.activity-total { display: block; margin: 5px 0 8px; font-size: 34px; line-height: 1.2; font-weight: 750; }
.activity-points-hint { color: var(--activity-muted); font-size: 12px; line-height: 1.6; }
.activity-points-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.activity-points-split > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--activity-muted); }
.activity-points-split > div + div { padding-left: 14px; border-left: 1px solid var(--border); }
.activity-points-split svg { width: 15px; height: 15px; }
.activity-points-split strong { flex-basis: 100%; padding-left: 22px; color: var(--text-primary); font-size: 18px; }
.activity-section { margin-top: 28px; }
.activity-section > h2 { margin-bottom: 13px; }
.activity-earn-card { padding: 18px; margin-top: 10px; }
.activity-earn-heading { display: flex; align-items: center; gap: 12px; }
.activity-earn-heading > div { min-width: 0; }
.activity-earn-heading h3 { font-size: 15px; line-height: 1.5; }
.activity-accent { display: block; margin-top: 3px; font-size: 11px; color: var(--brand); line-height: 1.5; }
.activity-earn-card > p { margin-top: 15px; color: #c0c5cc; font-size: 13px; line-height: 1.8; }
.activity-earn-card > small { display: block; margin-top: 9px; color: var(--activity-muted); font-size: 11px; line-height: 1.7; }
.activity-trade-link { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--brand); font-size: 12px; }
.activity-trade-link svg { width: 16px; height: 16px; }
.activity-cycle { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; list-style: none; padding: 0; margin: 18px 0 0; }
.activity-cycle li { position: relative; display: flex; align-items: center; flex-direction: column; text-align: center; gap: 7px; }
.activity-cycle li:not(:last-child)::after { content: ''; position: absolute; left: calc(50% + 23px); top: 17px; width: calc(100% - 36px); height: 1px; background: var(--border); }
.activity-step { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 3px; border: 1px solid #614720; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 13px; font-weight: 700; }
.activity-cycle strong { font-size: 12px; line-height: 1.5; }
.activity-cycle small { color: var(--activity-muted); font-size: 10px; line-height: 1.5; }
.activity-reward-empty { padding: 24px 20px; text-align: center; }
.activity-reward-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 13px; border-radius: 14px; color: var(--activity-muted); background: var(--surface-2); }
.activity-reward-icon svg { width: 23px; height: 23px; }
.activity-reward-empty h3 { font-size: 14px; line-height: 1.5; }
.activity-reward-empty p { margin-top: 9px; color: var(--activity-muted); font-size: 12px; line-height: 1.8; }
.activity-rules { scroll-margin-top: 20px; }
.activity-rules details { border-bottom: 1px solid var(--border); }
.activity-rules summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 12px 0; cursor: pointer; list-style: none; color: #d9dee5; font-size: 13px; line-height: 1.5; }
.activity-rules summary::-webkit-details-marker { display: none; }
.activity-rules summary svg { width: 16px; height: 16px; color: var(--activity-muted); }
.activity-rules details[open] summary svg { transform: rotate(180deg); }
.activity-rules details p { padding-bottom: 16px; color: var(--activity-muted); font-size: 12px; line-height: 1.85; }
.activity-page .activity-footer { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: 24px; color: var(--activity-muted); font-size: 11px; line-height: 1.6; }
.activity-footer svg { width: 13px; height: 13px; margin-top: 2px; }
@media (min-width: 600px) { .activity-page { max-width: 480px; } }

.activity-page .activity-rolling-note { margin-top: 18px; padding: 14px; border-left: 2px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--surface-1); color: var(--activity-muted); font-size: 12px; line-height: 1.85; }
.activity-reward-category { padding: 18px; margin-top: 12px; }
.activity-reward-category > header { display: flex; align-items: flex-start; gap: 12px; }
.activity-reward-category > header > div { min-width: 0; }
.activity-reward-category h3 { font-size: 15px; line-height: 1.5; }
.activity-reward-category > header p { margin-top: 6px; color: var(--activity-muted); font-size: 12px; line-height: 1.75; }
.activity-page .activity-reward-pending { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--activity-muted); font-size: 11px; line-height: 1.7; }
.activity-reward-item { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.activity-reward-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.activity-reward-item h4 { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.activity-reward-item-head > span { flex-shrink: 0; color: var(--brand); font-size: 11px; line-height: 1.7; }
.activity-reward-item > p { margin-top: 8px; font-size: 13px; color: #c0c5cc; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-line; }
.activity-reward-item > small { display: block; margin-top: 8px; color: var(--activity-muted); font-size: 11px; line-height: 1.7; }
.activity-page .activity-catalog-notice { margin: 14px 0; color: var(--activity-muted); font-size: 12px; line-height: 1.75; }
.activity-catalog-status { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12px; color: var(--activity-muted); }
.activity-catalog-status[hidden] { display: none; }
.activity-catalog-status button { padding: 8px 12px; color: var(--brand); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); }
.gp-button,.gp-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:10px 16px;border-radius:10px;font:inherit;font-size:13px;cursor:pointer;max-width:100%;white-space:normal}.gp-button{background:var(--accent,#f3b500);color:#101215;border:0;font-weight:600}.gp-secondary{background:transparent;color:var(--text,#fff);border:1px solid #29313a}.gp-button:disabled{opacity:.45;cursor:default}.gp-progress h2{font-size:16px;margin:0 0 14px}.gp-progress p,.gp-current-rules p{font-size:12px;color:var(--muted,#99a1ad);line-height:1.8;overflow-wrap:anywhere}.gp-current-rules{margin-top:16px}.gp-current-rules table{border-collapse:collapse;width:100%;font-size:12px}.gp-current-rules td,.gp-current-rules th{text-align:left;border-bottom:1px solid #26303a;padding:10px 4px}.gp-coupon-list{display:grid;gap:12px}.gp-coupon-list h3{font-size:14px}.gp-coupon-list small,.gp-record small{display:block;color:#8e97a2;font-size:11px;overflow-wrap:anywhere;margin-bottom:12px}#gpRecords details{margin-top:12px}#gpRecords summary{cursor:pointer;font-weight:600;font-size:14px}#gpRecords p{font-size:12px;line-height:1.7;overflow-wrap:anywhere}.gp-record{border-bottom:1px solid #26303a;padding:16px 0}.gp-reward-extra{font-size:11px!important;color:#99a1ad}.gp-form-dialog{background:#11161c;color:#eef2f7;border:1px solid #303b49;border-radius:16px;width:min(380px,calc(100vw - 32px));padding:22px;box-sizing:border-box}.gp-form-dialog::backdrop{background:#0009}.gp-form-dialog h2{font-size:18px}.gp-form-dialog label{display:grid;gap:8px;margin:14px 0;font-size:13px}.gp-form-dialog input,.gp-form-dialog select{background:#0b0f13;color:#eef2f7;border:1px solid #303b49;border-radius:8px;min-height:42px;padding:10px;width:100%;box-sizing:border-box}.gp-form-dialog form>div{display:flex;gap:10px;justify-content:end}

/* Compact 7 Points layout; detailed rules and reward conditions remain accessible. */
.activity-records-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:44px;min-height:44px;padding:0;background:transparent;border:0;color:var(--activity-muted);cursor:pointer;font:inherit;font-size:10px}
.activity-records-button svg{width:20px;height:20px}.activity-records-button:focus-visible,.gp-records-close:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.activity-hero{padding:18px}.activity-hero h2{margin-top:18px;font-size:24px}.activity-hero p{margin-top:9px;font-size:12px;line-height:1.7}.activity-rule-link{margin-top:10px}
.activity-section{margin-top:20px}.activity-page .activity-total-label{margin-top:14px}.activity-points{padding:16px}.activity-points-split{margin-top:14px;padding-top:12px}
.gp-progress{padding:14px 16px}.gp-progress .activity-section-heading{margin-bottom:8px}.gp-progress h2{margin:0;font-size:15px}.gp-inline-link{font-size:12px;color:var(--brand)}
.gp-update-note{margin-top:10px;padding-top:8px;border-top:1px solid var(--border);display:grid;gap:3px;font-size:11px;color:var(--activity-muted)}.gp-update-note small{font-size:10px;line-height:1.5}
.activity-rewards-section>h2{margin-bottom:6px}.activity-page .activity-catalog-notice{margin:6px 0 10px;font-size:11px}
#activityRewardCatalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.activity-reward-category{min-width:0;padding:0;margin:0}.activity-reward-category[open]{grid-column:1/-1}
.activity-reward-category>summary{display:flex;align-items:center;gap:8px;min-height:54px;padding:10px;cursor:pointer;list-style:none}.activity-reward-category>summary::-webkit-details-marker{display:none}
.activity-reward-category>summary h3{min-width:0;flex:1;font-size:12px;overflow-wrap:anywhere;line-height:1.4}.activity-reward-category>summary>svg{width:14px;height:14px;color:var(--activity-muted)}.activity-reward-category[open]>summary>svg{transform:rotate(180deg)}
.activity-reward-category .activity-square-icon{width:28px;height:28px;flex-basis:28px;border-radius:8px}.activity-reward-category .activity-square-icon svg{width:17px;height:17px}
.activity-reward-body{padding:0 14px 14px}.activity-reward-body>p{font-size:12px;line-height:1.7;color:var(--activity-muted)}.activity-page .activity-reward-pending{margin-top:8px;padding-top:8px}
.activity-reward-item{margin-top:12px;padding-top:12px}.activity-reward-item>p{font-size:12px}.activity-reward-item .gp-redeem{margin-top:8px;min-height:36px;padding:8px 12px;font-size:12px}
#gpRecords>.gp-rewards-fold{margin-top:0}.gp-rewards-fold>summary{display:flex;align-items:center;gap:10px;min-height:50px;padding:12px 14px;list-style:none}.gp-rewards-fold>summary::-webkit-details-marker{display:none}.gp-rewards-fold>summary h2{flex:1;font-size:15px}.gp-rewards-fold>summary span{color:var(--activity-muted);font-size:12px}.gp-rewards-fold>summary svg{width:16px;height:16px;color:var(--activity-muted)}.gp-rewards-fold[open]>summary svg{transform:rotate(180deg)}
.gp-rewards-body{padding:0 14px 14px}.gp-coupon-list{gap:8px}.gp-coupon-list>article{padding:12px}.gp-rewards-body>details{padding:10px 12px}.gp-coupon-list small{margin:6px 0}
.activity-earning-rules h3{font-size:13px;margin:0 0 12px}.activity-earning-rules h4{font-size:12px;font-weight:600;margin:12px 0 5px}.activity-earning-rules>p{color:var(--activity-muted);font-size:12px;line-height:1.8}.activity-rules summary{min-height:46px}.gp-current-rules{margin:8px 0 12px}
.gp-point-dialog{width:min(420px,calc(100vw - 32px));max-height:85dvh;margin:auto;padding:0;box-sizing:border-box;border:1px solid var(--border);border-radius:16px;background:var(--surface-1,#101215);color:var(--text-primary,#eef2f7);overflow:auto}.gp-point-dialog::backdrop{background:#000a}
.gp-point-dialog>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--surface-1,#101215);border-bottom:1px solid var(--border)}.gp-point-dialog h2{margin:0;font-size:17px}.gp-records-close{min-width:44px;min-height:44px;border:0;background:transparent;color:inherit;font-size:25px;cursor:pointer}.gp-point-dialog [data-gp-records-body]{padding:16px}.gp-point-dialog h3{margin:16px 0 8px;font-size:13px}.gp-point-dialog h3:first-child{margin-top:0}.gp-point-dialog p{font-size:12px;color:var(--activity-muted);line-height:1.7}
.gp-form-dialog{max-height:calc(100dvh - 32px);overflow-y:auto;overflow-wrap:anywhere}.gp-form-dialog .gp-form-error{color:var(--error,#ff8091);font-size:13px;line-height:1.6}.gp-form-dialog button:disabled{opacity:.55;cursor:wait}
.activity-total,.activity-points-split strong,.gp-progress{font-variant-numeric:tabular-nums}
.activity-points-hint.gp-expiring-soon{color:#efbd68}
.gp-progress .activity-points-split{margin-top:12px;margin-bottom:12px}
.gp-reward-conditions{margin-top:8px;color:var(--activity-muted);font-size:11px}
.gp-reward-conditions>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--brand);list-style:none}
.gp-reward-conditions>summary::-webkit-details-marker{display:none}
.gp-reward-conditions>summary::after{content:'+';margin-left:8px;font-size:14px}
.gp-reward-conditions[open]>summary::after{content:'−'}
.gp-reward-conditions>p{margin:0 0 6px;font-size:11px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.gp-point-entry{padding:10px 0;border-bottom:1px solid var(--border);font-size:12px}.gp-point-entry>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.gp-point-entry small{display:block;margin-top:5px;color:var(--activity-muted);font-size:10px;line-height:1.5}.gp-point-in{color:#29c89c}.gp-point-out{color:var(--text-primary)}

/* Clear progress and compact, actionable rewards. */
.activity-page [hidden]{display:none!important}
.activity-hero{padding:10px 16px 16px;border-radius:14px}
.activity-hero-top{min-height:44px}.activity-hero h2{max-width:none;margin-top:0;font-size:20px;line-height:1.4}
.activity-hero p{max-width:none;margin-top:6px;line-height:1.65}.activity-hero .activity-rule-link{margin:0;min-height:44px}
.activity-page .activity-total-label{margin-top:8px;font-size:11px}.activity-total{margin:8px 0;font-size:32px}
.activity-muted-status{max-width:45%;text-align:right;line-height:1.5}
.gp-progress-zone{padding-top:14px}.gp-progress-zone+.gp-progress-zone{border-top:1px solid var(--border);margin-top:14px}
.gp-day-label{font-size:10px;line-height:1.5;color:var(--activity-muted);text-align:right}
.gp-metric,.gp-score{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12px}
.gp-metric>span,.gp-score>span{color:var(--activity-muted);min-width:0;line-height:1.6}
.gp-metric strong{max-width:65%;text-align:right;font-size:17px;font-weight:650;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.gp-metric strong>small{display:block;font-size:10px;color:var(--activity-muted);margin-top:2px;font-weight:400}
.gp-score{margin-top:10px}.gp-score>strong{color:var(--brand);font-size:18px;flex-shrink:0}.gp-score small{font-size:11px;font-weight:400;color:var(--activity-muted)}
.gp-meter{appearance:none;-webkit-appearance:none;display:block;border:0;width:100%;height:4px;border-radius:4px;overflow:hidden;background:var(--surface-2);margin:10px 0 8px}
.gp-meter::-webkit-progress-bar{background:var(--surface-2)}.gp-meter::-webkit-progress-value{background:var(--brand);border-radius:4px}.gp-meter::-moz-progress-bar{background:var(--brand);border-radius:4px}
.gp-progress-zone>p{font-size:11px;margin-top:8px}.gp-trade-links{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;line-height:1.5;color:var(--activity-muted)}
.gp-trade-links>a{display:inline-flex;align-items:center;min-height:44px;color:var(--brand);flex-shrink:0}
.gp-stale-note{display:flex;gap:12px;align-items:center;justify-content:space-between;background:var(--surface-1);border:1px solid #614720;border-radius:10px;padding:8px 12px;margin-bottom:10px;font-size:12px;line-height:1.6;color:#efbd68}
.gp-stale-note button{background:none;border:0;font:inherit;color:var(--brand);min-height:44px;flex-shrink:0;cursor:pointer}
.gp-guest{padding:12px 0 4px}.gp-guest .gp-button{margin-top:12px;width:100%;box-sizing:border-box}
.gp-button,.gp-secondary,.activity-reward-item .gp-redeem{min-height:44px}
#activityRewardCatalog.gp-single-category{grid-template-columns:minmax(0,1fr)}
.gp-category-title{flex:1;min-width:0}.gp-category-title>small{display:block;margin-top:4px;font-size:10px;color:var(--activity-muted);line-height:1.5}
.activity-reward-category>summary{padding:12px;min-height:64px}.activity-reward-category>summary h3{font-size:13px}
.activity-reward-item-head>span{font-size:12px;font-variant-numeric:tabular-nums}.activity-reward-item .gp-redeem{width:100%}
.gp-rewards-fold>summary{flex-wrap:wrap;gap:6px}.gp-rewards-fold>summary h2{flex:1 0 auto}.gp-rewards-fold>summary>span{max-width:100%;font-size:11px;line-height:1.5}
.gp-owned-reward{padding:12px 0;border-bottom:1px solid var(--border);scroll-margin-top:20px}.gp-owned-reward:last-child{border-bottom:0}
.gp-owned-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.gp-owned-head>h3{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.gp-state{font-size:10px;color:var(--activity-muted);flex-shrink:0;max-width:45%;line-height:1.6;text-align:right}.gp-state.gp-soon,.gp-address-deadline{color:#efbd68}
.gp-owned-reward>p{margin-top:6px}.gp-owned-reward>small,.gp-active-benefits>small{display:block;margin-top:6px;color:var(--activity-muted);font-size:10px;line-height:1.6;overflow-wrap:anywhere}
.gp-owned-reward>button{margin-top:10px}.gp-rewards-body>.gp-reward-history{padding:0;border-top:1px solid var(--border);margin-top:12px}
.gp-reward-history>summary{display:flex;align-items:center;min-height:44px;color:var(--activity-muted);font-size:12px!important;list-style:none}.gp-reward-history>summary::after{content:'+';margin-left:auto}.gp-reward-history[open]>summary::after{content:'−'}
.gp-active-benefits{padding:12px 0;border-top:1px solid var(--border);margin-top:12px;scroll-margin-top:20px}.gp-active-benefits>h3{font-size:13px;margin-bottom:8px}.gp-active-benefits p{color:var(--activity-muted)}.gp-active-benefits strong{color:var(--text-primary);font-weight:600}
.activity-page button:focus-visible,.gp-form-dialog button:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
#gpRecords{scroll-margin-top:20px}

.activity-page{overflow-anchor:none}

/* Record pagination and private reward details. */
.gp-point-dialog{overflow:hidden;display:none;flex-direction:column}.gp-point-dialog[open]{display:flex}
.gp-point-dialog>header{flex:0 0 auto}.gp-point-dialog [data-gp-records-body],.gp-order-dialog [data-order-body]{overflow:auto;overscroll-behavior:contain;min-height:0;padding:16px}
.gp-record-tabs{display:flex;border-bottom:1px solid var(--border);gap:16px}.gp-record-tabs>button{min-height:44px;padding:8px 0;border:0;border-bottom:2px solid transparent;color:var(--activity-muted);background:transparent;font:inherit;font-size:13px;cursor:pointer}
.gp-record-tabs>button[aria-selected=true]{border-bottom-color:var(--brand);color:var(--brand);font-weight:650}
.gp-record-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 4px}
.gp-record-filter{display:flex;flex-wrap:wrap;max-width:100%;align-items:center;gap:8px;font-size:11px;color:var(--activity-muted)}
.gp-record-filter select{min-height:44px;max-width:180px;padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface-2);color:var(--text-primary);font:inherit;font-size:12px}
.gp-rewards-body>.gp-inline-link,.gp-record-toolbar button,.gp-point-parts button,.gp-order-dialog .gp-inline-link,.gp-owned-reward .gp-inline-link,.gp-active-benefit .gp-inline-link{min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--brand);font:inherit;font-size:12px;cursor:pointer}
.gp-point-entry>div>strong{overflow-wrap:anywhere;min-width:0}.gp-point-entry b{flex-shrink:0;font-variant-numeric:tabular-nums}
.gp-point-parts>summary,.gp-active-benefit>details>summary,.gp-order-number>summary{display:flex;align-items:center;min-height:44px;color:var(--activity-muted);cursor:pointer;list-style:none;font-size:11px}
.gp-point-parts>summary::after,.gp-active-benefit>details>summary::after,.gp-order-number>summary::after{content:'+';margin-left:8px}.gp-point-parts[open]>summary::after,.gp-active-benefit>details[open]>summary::after,.gp-order-number[open]>summary::after{content:'−'}
.gp-point-parts p{white-space:pre-line;overflow-wrap:anywhere;margin-bottom:8px}
.gp-allocation{padding:8px 12px;border-left:2px solid var(--border);margin:6px 0;font-size:11px;color:var(--activity-muted)}.gp-allocation>div{display:flex;justify-content:space-between;gap:12px;line-height:1.7}.gp-allocation strong{color:var(--text-primary);white-space:nowrap;font-variant-numeric:tabular-nums}
.gp-record-error{color:#efbd68!important;margin:8px 0}.gp-record-sync,.gp-record-end{display:block;margin-top:16px;font-size:10px;color:var(--activity-muted);line-height:1.7}.gp-load-more{width:100%;margin-top:14px}
.gp-point-dialog button:focus-visible,.gp-point-dialog select:focus-visible,.gp-point-dialog summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.gp-active-benefit{padding-top:10px}.gp-active-benefit>details{margin-top:0!important}.gp-active-benefit details p{font-size:11px!important;line-height:1.7;color:var(--activity-muted)}
.gp-order-dialog h3{font-size:13px;margin:18px 0 8px}.gp-order-dialog .gp-order-name{margin:0;font-size:16px;line-height:1.6;overflow-wrap:anywhere}.gp-order-dialog p,.gp-order-dialog small{font-size:12px;line-height:1.8;overflow-wrap:anywhere;white-space:pre-line}.gp-order-dialog small{display:block;color:var(--activity-muted);font-size:11px}.gp-order-state{color:var(--brand);margin:6px 0 12px}
.gp-order-fields{margin:12px 0;font-size:12px}.gp-order-fields>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;padding:8px 0;border-bottom:1px solid var(--border);line-height:1.7}.gp-order-fields dt{color:var(--activity-muted)}.gp-order-fields dd{margin:0;text-align:right;overflow-wrap:anywhere;white-space:pre-line;font-variant-numeric:tabular-nums}
.gp-delivery-timeline{padding:0 0 0 16px;margin:8px 0 16px}.gp-delivery-timeline>li{padding:0 0 14px 8px;color:var(--brand);font-size:12px}.gp-delivery-timeline strong{color:var(--text-primary);font-weight:500}.gp-order-number code{display:block;font-size:11px;overflow-wrap:anywhere;color:var(--activity-muted);padding:6px 0}
.gp-order-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.gp-order-actions>*{flex:1 0 auto;max-width:100%}
.gp-point-dialog button:disabled{opacity:.5;cursor:default}
@media(max-width:360px){.gp-record-tabs{gap:12px}.gp-record-filter{gap:4px}.gp-record-filter select{max-width:145px}.gp-record-toolbar{gap:8px}.gp-order-fields>div{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}}


/* The mobile layout is retained below 1024px; wide screens get a website shell. */
.site-header, .site-sidebar { display: none; }
.desktop-home-market, .desktop-home-insights { display: contents; }
.desktop-home-heading { display: none; }
.desktop-account-title { display: none; }
/* Keep the auth language choices above the brand and form, including on phones. */
body[data-auth-page] .auth-header { position: relative; z-index: 30; }

@media (min-width: 768px) and (max-width: 1023px) {
  html.ui-batch-1 body[data-site-page] .phone-page {
    width: 100%; max-width: 840px; padding-inline: 32px;
  }
  html.ui-batch-1 body[data-site-page] .bottom-nav { width: min(840px, 100%); }
}

@media (min-width: 1024px) {
  body[data-site-page] {
    --site-header-height: 72px; --site-sidebar-width: 224px;
    --app-shell-width: 1280px;
    background: var(--bg); padding-top: var(--site-header-height);
  }
  body.site-desktop-ready { padding-left: var(--site-sidebar-width); }
  body.site-desktop-ready[data-auth-page], body.site-desktop-ready.error-body { padding-left: 0; }
  html.ui-batch-1 body[data-site-page] :is(.phone-page, .kyc-flow-page) {
    width: 100%; max-width: 1280px; min-height: calc(100dvh - var(--site-header-height));
    margin: 0 auto; padding: 32px clamp(24px, 3vw, 48px) 48px;
    overflow-x: visible; background: var(--bg); will-change: auto;
    border: 0; border-radius: 0; box-shadow: none;
  }
  html.ui-batch-1 body[data-site-page] .phone-page > * { min-width: 0; }
  html.ui-batch-1 body[data-site-page] .bottom-nav { display: none; }
  .site-header {
    position: fixed; inset: 0 0 auto; z-index: 40; height: var(--site-header-height);
    display: flex; align-items: center; gap: 28px; padding: 0 28px;
    border-bottom: 1px solid var(--border); background: var(--surface-1);
  }
  .site-brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 12px; min-width: 168px; color: var(--text-primary); text-decoration: none; font-size: 21px; font-weight: 650; }
  .site-brand img { width: 32px; height: 32px; }
  .site-primary-nav { display: flex; height: 100%; gap: 4px; align-items: stretch; }
  .site-primary-nav a { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
  .site-primary-nav a > svg { display: none; }
  .site-primary-nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
  .site-header-actions { display: flex; align-items: center; justify-content: end; gap: 12px; margin-left: auto; min-width: 0; }
  .site-header .language-trigger { background: transparent; color: var(--text-secondary); border-color: var(--border); box-shadow: none; border-radius: 8px; min-height: 40px; }
  .site-header .language-options { background: var(--surface-2); border-color: var(--border); }
  .site-header .language-options button { color: var(--text-secondary); }
  .site-header .language-options button:is(:hover,.active) { color: var(--brand); background: var(--brand-soft); }
  .site-login, .site-register, .site-account { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; color: var(--text-primary); text-decoration: none; font-size: 13px; white-space: nowrap; }
  .site-register { border-radius: 8px; background: var(--brand); color: var(--bg); font-weight: 600; }
  .site-account svg { width: 18px; height: 18px; }
  .site-sidebar { position: fixed; top: var(--site-header-height); bottom: 0; left: 0; z-index: 25; width: var(--site-sidebar-width); display: flex; flex-direction: column; gap: 24px; padding: 24px 14px; border-right: 1px solid var(--border); background: var(--surface-1); overflow-y: auto; overscroll-behavior: contain; }
  body:is([data-auth-page],.error-body) .site-sidebar { display: none; }
  .site-nav-group + .site-nav-group { margin-top: 24px; }
  .site-nav-group h2, .site-nav-group summary { margin: 0 0 8px; padding: 0 12px; color: var(--text-muted); font-size: 12px; font-weight: 500; line-height: 1.6; }
  .site-nav-group > a, .site-support { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: 13px; line-height: 1.5; }
  .site-nav-group > a > span, .site-support > span { min-width: 0; overflow-wrap: anywhere; }
  .site-nav-group a svg, .site-support svg { width: 18px; height: 18px; flex: 0 0 18px; }
  .site-nav-group a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
  .site-nav-group a:hover, .site-support:hover { color: var(--text-primary); background: var(--surface-2); }
  .site-nav-group a.is-active:hover { color: var(--brand); }
  .site-history summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
  .site-history summary::-webkit-details-marker { display: none; }
  .site-history summary svg { width: 16px; height: 16px; }
  .site-history[open] summary svg { transform: rotate(180deg); }
  .site-support { margin-top: auto; border-top: 1px solid var(--border); border-radius: 0; padding-top: 20px; }

  /* A left-aligned page heading with its existing back and action controls. */
  html.ui-batch-1 body[data-site-page] .phone-page :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.discover-header,.auth-header,.trade-header) {
    display: flex; gap: 14px; min-height: 56px; margin: 0 0 24px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border); align-items: center;
  }
  html.ui-batch-1 body[data-site-page] :is(.simple-header,.records-header,.center-header,.convert-header,.market-detail-header,.discover-header,.auth-header,.trade-header) :is(h1,.discover-title) {
    flex: 1; text-align: left; font-size: 26px; line-height: 1.35; white-space: normal; overflow: visible; font-weight: 600;
  }
  html.ui-batch-1 body[data-site-page] .phone-page :is(.home-top-row,.assets-hero-header) { min-height: 52px; margin: 0 0 24px; }
  .phone-page .home-top-row .home-title { font-size: 26px; }
  .phone-page .home-top-row .home-title { display: none; }
  .phone-page .desktop-home-heading { display: block; margin: 0; font-size: 26px; font-weight: 600; }
  .phone-page .home-top-row { justify-content: flex-start; gap: 14px; }
  .phone-page .home-top-row > div { margin-left: auto; }
  .phone-page .section-title { margin: 0 0 20px; }

  /* Home: a market workspace and a separate overview / announcement column. */
  html.ui-batch-1 body[data-site-page=exchange] .phone-page { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 24px; align-content: start; }
  [data-site-page=exchange] .phone-page > :is(.home-top-row,.kyc-banner,.exchange-hero,.hero-actions,.home-entry-carousel) { grid-column: 1 / -1; margin: 0; }
  .desktop-home-market, .desktop-home-insights { display: block; min-width: 0; align-self: start; }
  .desktop-home-market, .desktop-home-insights > section { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  .desktop-home-insights > section + section { margin-top: 24px; }
  .desktop-home-insights .market-info-grid { grid-template-columns: 1fr; gap: 16px; }
  .desktop-home-insights .market-info-card { padding: 0 0 16px; border-bottom: 1px solid var(--border); }
  .desktop-home-insights .market-info-card:last-child { padding-bottom: 0; border-bottom: 0; }
  .desktop-home-market .view-more { margin-bottom: 0; }
  html.ui-batch-1 body[data-site-page=exchange] .exchange-hero { padding: 28px; min-height: 150px; }
  [data-site-page=exchange] .guest-auth-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 24px; align-items: center; }
  [data-site-page=exchange] .guest-auth-card strong { font-size: 24px; }
  [data-site-page=exchange] .guest-auth-actions { grid-column: 2; grid-row: 1 / span 2; min-width: 220px; margin: 0; }
  [data-site-page=exchange] .hero-actions { max-width: 460px; }
  html.ui-batch-1 body[data-site-page=exchange] .btc-total strong { font-size: 40px; }
  html.ui-batch-1 body[data-site-page=exchange] :is(.market-column-head,.pair-row) { grid-template-columns: minmax(160px,1.3fr) minmax(120px,1fr) minmax(100px,.75fr); }

  /* Discover: search / categories above a wide, aligned quote list. */
  html.ui-batch-1 body[data-site-page=discover] .discover-page { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(260px,1fr); gap: 20px 24px; align-content: start; }
  [data-site-page=discover] :is(.discover-header,.discover-summary,.discover-list) { grid-column: 1 / -1; }
  [data-site-page=discover] .discover-search-wrap { grid-column: 1; margin: 0; }
  [data-site-page=discover] .discover-tabs { grid-column: 1; grid-row: 3; margin: 0; }
  [data-site-page=discover] .discover-sort-tabs { grid-column: 1; grid-row: 4; margin: 0; }
  [data-site-page=discover] .featured-market-card { grid-column: 2; grid-row: 2 / span 3; margin: 0; padding: 24px; }
  [data-site-page=discover] .discover-summary { margin: 0; }
  html.ui-batch-1 body[data-site-page=discover] .discover-market-row { min-height: 84px; grid-template-columns: minmax(0,1fr) minmax(240px,1fr); padding: 18px 24px; }
  [data-site-page=discover] .discover-market-quote { display: grid; grid-template-columns: minmax(100px,1fr) 120px; align-items: center; gap: 32px; }
  [data-site-page=discover] .discover-market-quote strong { text-align: right; }
  [data-site-page=discover] .discover-change { justify-self: end; }

  /* Quick trading keeps inputs together and quotes / confirmation alongside. */
  html.ui-batch-1 body[data-site-page=trade] .trade-hero { padding: 24px; margin: 0 0 24px; }
  html.ui-batch-1 body[data-site-page=trade] .trade-balance-main strong { font-size: 36px; }
  [data-site-page=trade] .trade-panel.active { padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=trade] .trade-panel .quick-form { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(260px,1fr); gap: 20px 32px; align-items: start; }
  [data-site-page=trade] .trade-panel .quick-form > :is(.field-block,.amount-input-card) { grid-column: 1; }
  [data-site-page=trade] .trade-panel .quote-card { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
  [data-site-page=trade] #quickSellButton { grid-column: 2; grid-row: 4; margin: 0; }
  [data-site-page=trade] [data-trade-status] { grid-column: 1 / -1; }
  [data-site-page=trade] [data-trade-panel=group].active { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
  [data-site-page=trade] [data-trade-panel=group] > .panel-heading { grid-column: 1 / -1; }
  [data-site-page=trade] .group-order { margin: 0; min-width: 0; }

  /* Assets: overview and actions above separate token / fiat portfolios. */
  html.ui-batch-1 body[data-site-page=assets] .assets-shell { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr); grid-template-areas: 'heading heading' 'overview actions' 'overview entry' 'tokens fiat'; gap: 24px; align-content: start; }
  [data-site-page=assets] .assets-hero-header { grid-area: heading; }
  [data-site-page=assets] .assets-overview-card { grid-area: overview; margin: 0; padding: 32px; }
  [data-site-page=assets] .assets-action-row { grid-area: actions; margin: 0; }
  [data-site-page=assets] .assets-entry-card { grid-area: entry; margin: 0; }
  [data-site-page=assets] .assets-token-section { grid-area: tokens; margin: 0; }
  [data-site-page=assets] .assets-fiat-section { grid-area: fiat; margin: 0; }
  html.ui-batch-1 body[data-site-page=assets] .assets-overview-total strong { font-size: 42px; }

  /* Transfer forms keep entry fields on the left and the transfer details on the right. */
  [data-site-page=deposit] .stack-form { grid-template-columns: minmax(0,1fr) minmax(280px,1fr); grid-template-areas: 'asset address' 'network memo' 'amount qr' 'txid qr' 'submit qr'; gap: 20px 32px; align-items: start; padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=deposit] label:has([data-picker-open=depositCoinPicker]) { grid-area: asset; }
  [data-site-page=deposit] label:has([data-picker-open=depositNetworkPicker]) { grid-area: network; }
  [data-site-page=deposit] .form-card:has(#depositAddressValue) { grid-area: address; margin: 0; }
  [data-site-page=deposit] #depositMemoCard { grid-area: memo; margin: 0; }
  [data-site-page=deposit] .form-card:has(.deposit-qr-frame) { grid-area: qr; margin: 0; }
  [data-site-page=deposit] label:has(#depositAmount) { grid-area: amount; }
  [data-site-page=deposit] label:has(#depositTxId) { grid-area: txid; }
  [data-site-page=deposit] #depositSubmitButton { grid-area: submit; margin: 0; }
  [data-site-page=withdraw] .withdraw-form { grid-template-columns: minmax(0,1.35fr) minmax(260px,1fr); gap: 20px 32px; align-items: start; padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=withdraw] .withdraw-form > label { grid-column: 1; }
  [data-site-page=withdraw] .withdraw-summary-card { grid-column: 2; grid-row: 1 / span 4; padding: 20px; margin: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
  [data-site-page=withdraw] #withdrawSubmitButton { grid-column: 2; grid-row: 5; margin: 0; }
  [data-site-page=withdraw] .withdraw-form > :is(.secure-note,.form-status) { grid-column: 2; }
  [data-site-page=convert] .convert-form { width: 100%; max-width: 900px; margin: 32px auto; padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); gap: 20px 12px; }
  [data-site-page=convert] .convert-box { min-width: 0; margin: 0; }
  [data-site-page=convert] .convert-swap-slot { height: auto; display: grid; align-items: center; margin: 0; }
  [data-site-page=convert] .convert-swap-float { position: static; margin: 0; transform: rotate(-90deg); }
  [data-site-page=convert] .convert-form > :is(.quote-summary,.wide-button,.convert-status) { grid-column: 1 / -1; }
  [data-site-page=convert] #confirmConvert { max-width: 360px; justify-self: end; }

  /* Orders / history become readable desktop lists with space for metadata. */
  html.ui-batch-1 body[data-site-page] :is(.center-list,.records-list-page,#merchantList,#luckyOrderList) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
  html.ui-batch-1 body[data-site-page] :is(.center-list,.records-list-page,#merchantList,#luckyOrderList) > :is(.empty-record,.mobile-empty-state,.product-notice,.center-empty,.records-intro,.merchant-overview-card) { grid-column: 1 / -1; }
  html.ui-batch-1 body[data-site-page] :is(.history-record-card,.order-card,.ledger-card) { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-1); }
  [data-site-page=ledger] .ledger-summary-card { padding: 24px; }
  html.ui-batch-1 body[data-site-page=ledger] .ledger-summary-card strong { font-size: 26px; }
  [data-site-page=announcements] .announcement-page-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
  [data-site-page=announcements] .announcement-page-list article { margin: 0; padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-1); }
  [data-site-page=announcement-detail] .announcement-detail { max-width: 900px; padding: 32px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=announcement-detail] .announcement-detail :is(p,li) { font-size: 15px; line-height: 1.8; }
  [data-site-page=notifications] .record-list { max-width: 1000px; }
  [data-site-page=address-book] .address-search { max-width: 600px; }
  [data-site-page=address-book] .address-book-form { max-width: 800px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=address-book] #addressBookList { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  html.ui-batch-1 body[data-site-page=address-book] .address-floating-add { right: 32px; bottom: 28px; }

  /* Market detail expands statistics and separates overview / related information. */
  html.ui-batch-1 body[data-site-page=market-detail] .market-detail-page { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(260px,1fr); gap: 24px; align-content: start; }
  [data-site-page=market-detail] .market-detail-page > :is(.market-detail-header,.market-detail-hero,.market-detail-stats,.market-refresh-row,.market-detail-actions,.related-markets-card) { grid-column: 1 / -1; margin: 0; }
  [data-site-page=market-detail] .market-detail-hero { padding: 28px; }
  [data-site-page=market-detail] .market-detail-card { margin: 0; padding: 24px; }
  [data-site-page=market-detail] .market-detail-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
  [data-site-page=market-detail] .market-detail-actions { max-width: 480px; }
  [data-site-page=market-detail] .related-markets-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }

  /* Identity / invitation content stays intact and gains appropriate wide layouts. */
  [data-site-page=kyc-form] .kyc-submit-form { max-width: 1040px; }
  [data-site-page=kyc-form] .kyc-form-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding: 24px; }
  [data-site-page=kyc-form] .kyc-form-card > :is(h2,.kyc-upload-row) { grid-column: 1 / -1; }
  [data-site-page=kyc-intro] .kyc-level-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  [data-site-page=kyc-intro] .kyc-level-card { margin: 0; }
  html.ui-batch-1 body[data-site-page] :is(.kyc-sticky-action,.kyc-step-actions) { position: static; max-width: 1040px; grid-template-columns: minmax(0,360px); justify-content: start; margin: 24px auto 0; padding: 20px 0; background: transparent; backdrop-filter: none; }
  /* Keep review content readable inside the same outer frame as other routes. */
  [data-site-page=kyc-review] .kyc-flow-page > :is(.kyc-copy,.primary-pill) { width: 100%; max-width: 640px; margin-inline: auto; }
  html.ui-batch-1 body[data-site-page=invite] .invite-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-content: start; }
  [data-site-page=invite] .invite-page > :is(.records-header,.invite-hero-card,.form-status) { grid-column: 1 / -1; margin: 0; }
  [data-site-page=invite] :is(.invite-qr-card,.invite-link-panel) { margin: 0; padding: 28px; }

  /* 7 Points: account progress beside the balance, catalog beside owned rewards. */
  html.ui-batch-1 body[data-site-page=activity-center] .activity-page { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,1fr); gap: 24px; align-content: start; align-items: start; }
  [data-site-page=activity-center] .activity-page > :is(.records-header,.activity-hero,.activity-rules,.activity-footer) { grid-column: 1 / -1; margin: 0; }
  [data-site-page=activity-center] .activity-hero { padding: 20px 28px 28px; }
  [data-site-page=activity-center] .activity-hero h2 { font-size: 28px; }
  [data-site-page=activity-center] .activity-hero p { font-size: 14px; }
  [data-site-page=activity-center] .activity-points { grid-column: 1; grid-row: 3; margin: 0; padding: 24px; }
  [data-site-page=activity-center] #gpLiveDetails { grid-column: 2; grid-row: 3; }
  [data-site-page=activity-center] .gp-progress { margin: 0; padding: 24px; }
  [data-site-page=activity-center] .activity-page:has(.gp-guest) #gpLiveDetails { grid-column: 1 / -1; }
  [data-site-page=activity-center] .gp-guest .gp-button { max-width: 320px; }
  [data-site-page=activity-center] .activity-rewards-section { grid-column: 1; grid-row: 4; margin: 0; }
  [data-site-page=activity-center] #gpRecords { grid-column: 2; grid-row: 4; margin: 0; }
  [data-site-page=activity-center] .activity-total { font-size: 48px; }
  [data-site-page=activity-center] :is(.activity-section h2,.gp-progress h2) { font-size: 20px; }
  [data-site-page=activity-center] .gp-progress p { font-size: 13px; }
  [data-site-page=activity-center] .activity-rules { padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
  [data-site-page=activity-center] .activity-earning-rules > p { font-size: 13px; }
  [data-site-page=activity-center] :is(.gp-rewards-body,.activity-reward-body) { padding: 0 20px 20px; }

  /* Authentication is a balanced two-column page; no asset navigation rail. */
  html.ui-batch-1 body[data-auth-page] .auth-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,1fr); gap: 18px 56px; max-width: 1000px; align-content: start; padding-top: 48px; }
  [data-auth-page] .auth-header { grid-column: 1 / -1; }
  [data-auth-page] .auth-header .language-menu { display: none; }
  html.ui-batch-1 body[data-auth-page] .auth-brand-block { grid-column: 1; grid-row: 2 / span 6; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px; padding: 32px; margin: 0; min-height: 360px; border: 1px solid var(--border); border-radius: 16px; background: radial-gradient(circle at 0 0,var(--brand-soft),transparent 65%),var(--surface-1); text-align: left; }
  html.ui-batch-1 body[data-auth-page] .auth-brand-block img { width: 64px; height: 64px; }
  html.ui-batch-1 body[data-auth-page] .auth-brand-block strong { font-size: 40px; }
  [data-auth-page] .auth-brand-block > span { font-size: 16px; line-height: 1.8; }
  [data-auth-page] .auth-page > :is(form,.auth-status,.auth-secondary-links,.auth-support-link,.auth-security-note) { grid-column: 2; margin: 0; }
  html.ui-batch-1 body.error-body .phone-page { max-width: 800px; padding-top: 48px; }

  /* Desktop layers are centered dialogs instead of phone-height bottom sheets. */
  html.ui-batch-1 body[data-site-page] :is(.picker-panel,.account-settings-panel,.order-detail-panel) { position: absolute; top: 50%; bottom: auto; left: 50%; right: auto; width: min(640px,calc(100vw - 64px)); max-height: calc(100dvh - 64px); min-height: 0; padding: 24px; border: 1px solid var(--border); border-radius: 14px; transform: translate(-50%,-50%); animation: none; overflow-y: auto; }
  html.ui-batch-1 body[data-site-page] #homeDrawer .drawer-panel {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh;
    padding: 24px max(32px,calc((100vw - 1280px) / 2)); border: 0; border-radius: 0;
    transform: none; background: var(--bg); display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; align-content: start;
    scrollbar-width: thin;
  }
  #homeDrawer .drawer-panel .drawer-status { grid-column: 1 / -1; height: auto; min-height: 64px; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  #homeDrawer .desktop-account-title { display: block; margin: 0; font-size: 26px; font-weight: 600; }
  #homeDrawer .drawer-panel .drawer-profile { grid-column: 1; grid-template-columns: 64px minmax(0,1fr); gap: 16px; padding: 20px 0; min-width: 0; }
  #homeDrawer .drawer-panel .avatar-photo { width: 64px; height: 64px; }
  #homeDrawer .drawer-panel .drawer-profile-main { min-width: 0; }
  #homeDrawer .drawer-panel .drawer-profile h2 { font-size: 20px; }
  #homeDrawer .drawer-panel .drawer-qr-button { position: static; }
  #homeDrawer .drawer-panel .drawer-settings-link { display: inline-flex; gap: 8px; align-items: center; min-height: 32px; color: var(--text-secondary); font-size: 14px; text-decoration: none; }
  #homeDrawer .drawer-panel .drawer-settings-link::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
  #homeDrawer .drawer-panel .drawer-account-status { grid-column: 2 / span 2; margin: 0; min-height: 120px; align-self: center; }
  #homeDrawer .drawer-panel .drawer-account-status article { padding: 24px; }
  #homeDrawer .drawer-panel .drawer-account-status strong { font-size: 24px; }
  #homeDrawer .drawer-panel .drawer-profile-guest { grid-column: 1 / -1; padding: 24px; border: 1px solid var(--border); border-radius: 12px; }
  #homeDrawer .drawer-panel .drawer-card { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); align-self: start; }
  #homeDrawer .drawer-panel .drawer-card h3 { font-size: 20px; }
  #homeDrawer .drawer-panel .drawer-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  #homeDrawer .drawer-panel .drawer-grid a { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 64px; padding: 12px; border-radius: 8px; text-decoration: none; }
  #homeDrawer .drawer-panel .drawer-grid a:hover { background: var(--surface-2); }
  #homeDrawer .drawer-panel .drawer-grid a svg { flex: 0 0 22px; width: 22px; height: 22px; }
  #homeDrawer .drawer-panel .drawer-grid a span { align-self: center; text-align: left; font-size: 14px; text-wrap: initial; overflow-wrap: anywhere; }
  html.ui-batch-1 body[data-site-page] :is(.confirm-dialog,.result-dialog,.home-popup-panel,.security-verification-dialog) { width: min(520px,calc(100vw - 64px)); max-height: calc(100dvh - 64px); padding: 28px; }
  html.ui-batch-1 body[data-site-page] .gp-point-dialog { width: min(780px,calc(100vw - 64px)); max-height: calc(100dvh - 64px); }
  html.ui-batch-1 body[data-site-page] .gp-form-dialog { width: min(600px,calc(100vw - 64px)); padding: 28px; }
  html.ui-batch-1 body[data-site-page] .gp-point-dialog [data-gp-records-body] { padding: 24px; }
  .site-header a:focus-visible, .site-sidebar a:focus-visible, .site-sidebar summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  body[data-site-page] { --site-sidebar-width: 200px; }
  .site-header { padding-inline: 20px; gap: 16px; }
  .site-brand { min-width: 148px; }
  .site-primary-nav a { padding-inline: 10px; font-size: 13px; }
  .site-header-actions { gap: 8px; }
  .site-header .language-trigger [data-language-label] { display: none; }
  .site-header .site-account span { display: none; }
  html.ui-batch-1 body[data-site-page] .phone-page { padding-inline: 24px; }
  .desktop-home-market, .desktop-home-insights > section { padding: 18px; }
  html.ui-batch-1 body[data-site-page=exchange] :is(.market-column-head,.pair-row) { grid-template-columns: minmax(120px,1.2fr) minmax(80px,1fr) 90px; }
  [data-site-page=convert] .convert-form { grid-template-columns: minmax(0,1fr); max-width: 650px; }
  [data-site-page=convert] .convert-swap-slot { justify-content: center; }
  [data-site-page=convert] .convert-swap-float { transform: none; }
}


.exchange-page{padding-bottom:104px!important}.exchange-page [hidden]{display:none!important}
.ex-dialog [hidden]{display:none!important}.ex-dialog{max-height:92dvh}.ex-dialog .ex-card{padding:16px}.ex-dialog .ex-row input{flex:1;width:0}.ex-dialog [data-dialog-body]{overflow-wrap:anywhere}.ex-notice button{margin:8px 0 0;min-height:44px}.exchange-page button:focus-visible,.ex-dialog button:focus-visible,.exchange-page select:focus-visible{outline:2px solid var(--brand);outline-offset:3px}.c2c-order-filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:16px 0}.c2c-order-filters label{display:grid;gap:6px;flex:1;min-width:130px;font-size:12px;color:var(--muted)}.c2c-order-filters button{min-height:46px}.c2c-timeline{list-style:none;padding:0;margin:0;display:grid;gap:16px}.c2c-timeline li{border-left:2px solid var(--brand);padding-left:14px}.c2c-timeline time{display:block;color:var(--muted);font-size:12px;margin-top:6px}.c2c-evidence-preview{width:100%;height:auto;max-height:50dvh;object-fit:contain}.c2c-account-card{border-top:1px solid var(--line);padding:16px 0;overflow-wrap:anywhere}.c2c-countdown{font-variant-numeric:tabular-nums;color:var(--brand)!important}.c2c-quick-panel .fixed-asset:disabled{opacity:1;color:var(--text);pointer-events:none}.c2c-quick-panel .convert-swap-float{pointer-events:none}.c2c-history-link{min-height:44px;display:inline-flex;align-items:center}.c2c-tools button{min-height:52px}.c2c-tools button span{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4}.c2c-page{padding-bottom:140px!important}.c2c-market-filters input,.c2c-market-filters select{min-height:44px!important}
.ex-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.ex-heading h1{font-size:26px;margin:0}.ex-heading p{color:var(--muted);margin:8px 0 0;line-height:1.6}
.ex-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.ex-tabs button{padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--text);font-weight:700}.ex-tabs button.active{background:var(--brand);color:#080a0d;border-color:var(--brand)}
.ex-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:16px}.ex-card h2{font-size:18px;margin:0 0 16px}.ex-card p{line-height:1.7;color:var(--muted)}
.ex-form{display:grid;gap:16px}.ex-form label,.ex-dialog label{display:grid;gap:8px;font-size:13px;color:var(--muted)}.exchange-page input,.exchange-page select,.exchange-page textarea,.ex-dialog input,.ex-dialog select,.ex-dialog textarea{width:100%;min-width:0;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:10px;min-height:46px;padding:12px;font:inherit}.ex-form textarea{resize:vertical}.ex-grid{display:grid;gap:20px;grid-template-columns:1fr 1fr}.ex-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ex-row small{color:var(--muted)}.ex-amount{font-size:22px;font-weight:750}.ex-details{display:grid;gap:12px;margin:16px 0}.ex-details div{display:flex;justify-content:space-between;gap:16px}.ex-details dt{color:var(--muted)}.ex-details dd{margin:0;text-align:right;overflow-wrap:anywhere}.ex-help{font-size:13px;color:var(--muted);line-height:1.7}.ex-empty{color:var(--muted);text-align:center;padding:28px}.ex-tag{padding:6px 10px;background:var(--bg);border-radius:8px;font-size:12px}.ex-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.ex-actions button{min-height:42px}.ex-notice{padding:14px;background:#14291e;border:1px solid #265d3c;border-radius:12px;margin-bottom:16px;overflow-wrap:anywhere}.ex-notice.is-error{background:#331b20;border-color:#803743}.ex-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin:20px 0}.ex-dialog{max-width:460px;width:calc(100% - 32px);background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:18px;padding:24px}.ex-dialog::backdrop{background:#000a}.ex-dialog h2{margin:0 0 18px}.ex-dialog [data-dialog-body]{display:grid;gap:14px;max-height:65dvh;overflow:auto}.ex-book{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ex-book-row{display:flex;justify-content:space-between;gap:12px;font-variant-numeric:tabular-nums;padding:7px 0;font-size:13px}.ex-bids b{color:var(--green)}.ex-asks b{color:var(--red)}.ex-book h3{font-size:14px;color:var(--muted)}.ex-book-price{font-size:28px;margin:16px 0}.ex-table{width:100%;border-collapse:collapse;font-size:13px}.ex-table th{text-align:left;color:var(--muted);font-weight:500}.ex-table th,.ex-table td{padding:12px 8px;border-bottom:1px solid var(--line)}.ex-scroll{overflow:auto}.ex-switch label{display:flex;gap:8px;align-items:center}.ex-switch input{width:18px;min-height:18px}.ex-shortcuts{display:flex;gap:12px;margin:20px 0}.ex-shortcuts a{flex:1;text-align:center}
.ex-form label .ex-row{flex-wrap:nowrap}.ex-form label .ex-row input{flex:1;width:0}.ex-form label .ex-row b{flex-shrink:0}
.home-trade-entry{display:flex;align-items:center;gap:14px;padding:18px 20px;margin:20px 0;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--text)}.home-trade-entry>svg:first-child{color:var(--brand);width:25px;height:25px}.home-trade-entry>div{display:grid;gap:6px;flex:1}.home-trade-entry strong{font-size:15px}.home-trade-entry small{font-size:12px;color:var(--muted)}.home-trade-entry>svg:last-child{color:var(--muted);width:18px;height:18px}.home-trade-entry:hover{border-color:var(--brand)}
@media(min-width:1024px){.home-trade-entry{grid-column:1/-1;margin:0}}
@media(max-width:767px){.ex-grid{grid-template-columns:1fr}.ex-heading h1{font-size:22px}.ex-card{padding:16px}.ex-heading{align-items:flex-start}.ex-book-row{font-size:12px}.ex-tabs button{flex:1;padding:12px 8px}.ex-amount{font-size:20px}}


/* Shared page polish, retaining each page's existing light/dark theme. */
.ux-field-error{display:block;margin:5px 0 12px;color:var(--red,#c53b3b);font-size:13px;line-height:1.5}
.auth-input:has([aria-invalid=true]){border-color:var(--red,#c53b3b)}
.ux-help{font-size:13px;color:var(--muted);line-height:1.65;margin:12px 0}
.ux-search{display:block;margin:16px 0}.ux-search input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface,var(--bg));color:var(--text);padding:10px 14px;font-size:14px}
.ux-stock-tools{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.ux-stock-tools[hidden]{display:none}.ux-stock-tools button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--muted);font-size:13px}.ux-stock-tools button.active{color:var(--text);background:var(--bg)}
.ux-stock-favorite{display:grid;place-items:center;width:44px;min-height:44px;flex:0 0 44px;border:0;background:transparent;color:var(--muted);font-size:22px;cursor:pointer}.ux-stock-favorite[aria-pressed=true]{color:#e3a600}.discover-market-row:has(.ux-stock-favorite){position:relative;padding-right:54px}.discover-market-row>.ux-stock-favorite{position:absolute;right:2px;top:50%;transform:translateY(-50%)}
.ux-stock-favorite[aria-pressed=true] svg path{fill:currentColor}.ux-market-link{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:1;min-width:0;color:inherit;text-decoration:none}.market-detail-header h1{font-size:16px!important;font-weight:500!important}.market-chart-card #detailChartPrice{font-size:14px;color:var(--muted);font-weight:500}.kyc-review-progress{display:grid;gap:10px;margin:18px 0;padding:14px;border:1px solid var(--line);border-radius:12px;list-style:none;text-align:left;font-size:13px}.kyc-review-progress li{display:flex;justify-content:space-between;gap:8px;color:var(--muted)}.kyc-review-progress li.is-done{color:var(--text)}.kyc-review-progress li.is-current{color:var(--brand,#d99b00)}
.discover-market-name small.ux-company{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.featured-market-card>[data-featured-status]{font-size:12px}.featured-market-card [data-featured-price]{font-size:22px;font-weight:600}.detail-stat-grid strong,.market-stat-grid strong{font-size:14px}
.stack-form[data-network-unavailable=true]>*:not(#depositLoadNotice):not(#withdrawLoadNotice):not(#addressOptionsNotice){display:none!important}
.ux-deposit-steps{padding:14px 16px;margin:12px 0 18px;border:1px solid var(--line);border-radius:12px;font-size:13px;line-height:1.7;color:var(--muted)}.ux-deposit-steps ol{padding-left:20px;margin:0}.ux-deposit-steps li+li{margin-top:6px}
.address-empty-panel .primary-pill{min-height:44px;padding:10px 24px;margin-top:12px}.address-empty-panel{gap:12px}
.center-filter-tabs{flex-wrap:wrap!important;overflow:visible!important;gap:8px}.center-filter-tabs>button{min-height:44px;padding:8px 14px}.ux-filter-more{position:relative}.ux-filter-more summary{display:flex;align-items:center;min-height:44px;padding:8px 14px;cursor:pointer;color:var(--muted);font-size:13px}.ux-filter-more>div{position:absolute;top:100%;right:0;width:210px;z-index:20;display:grid;gap:5px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);box-shadow:0 8px 30px #0002;animation:ux-menu-in .16s ease-out}.ux-filter-more button{min-height:44px;border:0;border-radius:8px;background:transparent;color:var(--text);text-align:left;padding:10px;font-size:13px}.ux-filter-more button.active{background:var(--bg)}
.order-card-title .copy-line code{font-size:12px;overflow-wrap:normal;white-space:nowrap}.copy-line button,[data-center-copy]{min-height:44px;min-width:44px}.ledger-main .ux-ledger-id{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}.ux-ledger-id button{background:transparent;border:0;color:inherit}.ledger-main>span{font-size:12px;overflow-wrap:anywhere}
.ux-fixed-unit{display:flex;align-items:center;min-height:44px;padding:0 12px;font-size:14px;font-weight:600;white-space:nowrap;color:var(--text)}.c2c-back-home{display:inline-flex;align-items:center;gap:6px;min-height:44px;color:var(--muted);font-size:13px}.c2c-back-home svg{width:18px}.ux-buy-reason{margin:6px 0 12px;font-size:12px;color:var(--muted);line-height:1.5}
.ux-qr-copy{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-top:12px}.invite-link-panel>div>button{min-width:44px;min-height:44px}.notification-card .ux-notification-id{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.ux-notification-id button{min-width:44px;min-height:44px;background:transparent;border:0;color:inherit}
.spot-form-panel label,.spot-form-panel .ex-help,.spot-rule-details,.spot-order-summary,.spot-book-head,.spot-book-controls,.spot-chart-status,.spot-history-subtabs button,.spot-orders-table th,.spot-orders-table td,.spot-market-stats small,.spot-chart-toolbar button,.spot-chart-toolbar span,.spot-chart-ohlc,.spot-picker-quote small{font-size:12px!important}
.spot-form-panel [data-spot-percent],.spot-side-buttons button,.spot-form-panel .spot-select-trigger,.spot-history-subtabs button,.spot-orders-table .spot-copy-id{min-height:44px}.spot-form-panel [data-spot-percent]{font-size:12px}.spot-form-panel .spot-entry-field{grid-template-columns:52px minmax(0,1fr);gap:5px;padding-inline:8px}.spot-form-panel .spot-entry-field input{min-width:0;font-size:16px}.spot-form-panel .spot-amount-control{min-width:0}.spot-orders-table .spot-copy-id{font-size:12px}.spot-orders-table tr{padding-bottom:46px}.spot-picker-search input{font-size:16px}.spot-book-controls .spot-select-trigger{min-height:40px;font-size:12px}.spot-market-stats{font-size:12px}.spot-depth-row{min-height:28px}
.spot-form-panel #spotBalance,.spot-market-stat small,.spot-input-unit b,.spot-market-stat,.spot-chart-indicators button{font-size:12px!important}.spot-form-panel .spot-amount-field{grid-template-columns:34px minmax(0,1fr)}.spot-input-unit #spotInputUnit+.spot-select-trigger{width:auto;min-width:60px;padding-inline:6px}.spot-form-panel .spot-submit{min-height:44px;font-size:14px}.spot-percentages{gap:6px}.spot-form-panel .spot-entry-field input{font-size:16px!important}
@media(max-width:420px){.discover-market-name small.ux-company{max-width:120px}.discover-market-row:has(.ux-stock-favorite){padding-right:46px}.spot-form-panel .spot-entry-field{grid-template-columns:42px minmax(0,1fr);padding-inline:6px}.spot-form-panel .spot-entry-field input{font-size:15px}}
@keyframes ux-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.ux-filter-more>div{background:var(--card)}.ux-field-error[hidden],.ux-qr-copy[hidden]{display:none!important}.market-detail-main .ux-stock-favorite{margin-left:auto}
.center-page .center-filter-tabs .ux-filter-more>div>button{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.5;text-align:start}
.center-page .center-filter-tabs{position:relative;z-index:30!important}
.discover-list article.discover-market-row{display:flex!important}.discover-market-row .ux-market-link{width:100%}.discover-market-row .discover-market-quote{flex:0 0 auto;min-width:85px}.discover-market-row .discover-market-main{flex:1;min-width:0}.discover-tabs button:not(.active){color:var(--muted)!important}.discover-tabs button.active{color:var(--brand)!important}
.featured-market-card [data-featured-price]{font-size:22px!important;font-weight:600!important}.market-detail-header h1{color:var(--muted)}
.spot-form-panel .spot-amount-field{display:block;padding:0 8px}.spot-form-panel .spot-amount-field #spotAmount{display:block;flex:1;width:0;min-width:0;font-size:16px!important;min-height:44px;padding:6px 0;border:0;border-radius:0;box-shadow:none;background:transparent}.spot-form-panel .spot-amount-field .spot-select-trigger{border-left:0}.spot-form-panel .spot-amount-field .spot-input-unit{display:flex;align-items:center;gap:6px;min-width:0}
.spot-intervals button,.spot-indicators button,.spot-chart-legend,.spot-side-buttons button,.spot-depth-row,.spot-book-mid>span,.spot-book-mid small,.spot-orders-table .spot-order-id,.spot-orders-table small.spot-record-mobile,.spot-history-panel .ex-tabs button span,.spot-form-panel .spot-select-trigger span{font-size:12px!important}.spot-intervals button,.spot-indicators button{min-height:44px}.spot-pair-button{min-height:44px}.spot-book-mid strong{font-size:17px}
@media(prefers-reduced-motion:reduce){.ux-filter-more>div{animation:none}}
@media(max-width:420px){.spot-percentages{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mini-profit,.assets-overview-pnl{flex-wrap:wrap}
.holding-pnl-basis{order:3;flex-basis:100%;font-size:12px;font-weight:400;line-height:1.5;color:var(--muted)}
.market-tabs button{white-space:nowrap}
@media(max-width:480px){.ui-batch-1 .market-tabs{gap:16px}.ui-batch-1 .market-tabs button{font-size:14px}}


:root{--ux-enter:200ms;--ux-exit:140ms;--ux-ease:cubic-bezier(.22,1,.36,1)}
.ux-select-source{display:none!important}
.ux-select-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--line,var(--border));border-radius:10px;background:var(--bg);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.ux-select-trigger>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ux-select-trigger svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.5;transition:transform var(--ux-enter) var(--ux-ease)}.ux-select-trigger[aria-expanded=true] svg{transform:rotate(180deg)}.ux-select-trigger:disabled{opacity:.5;cursor:default}.ux-select-trigger:focus-visible,.ux-select-panel button:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.ux-dialog[open]{animation:ux-dialog-in var(--ux-enter) var(--ux-ease) both}.ux-dialog::backdrop{background:#000a;animation:ux-scrim-in var(--ux-enter) ease both}.ux-dialog.ux-dialog-leaving{animation:ux-dialog-out var(--ux-exit) ease-in both;pointer-events:none}.ux-dialog-leaving::backdrop{animation:ux-scrim-out var(--ux-exit) ease both}
.ux-select-dialog{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:var(--text);overflow:hidden}.ux-select-dialog[open]{animation:none}.ux-select-panel{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;width:min(100%,560px);max-height:min(80dvh,640px);padding:0;border:1px solid var(--line,var(--border));border-bottom:0;border-radius:16px 16px 0 0;background:var(--card,var(--surface-1));animation:ux-sheet-in var(--ux-enter) var(--ux-ease) both;overflow:hidden}.ux-select-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;flex:0 0 auto;border-bottom:1px solid var(--line,var(--border))}.ux-select-panel h2{margin:0;font-size:17px;font-weight:600;line-height:1.5}.ux-select-panel header button{display:grid;place-items:center;width:44px;min-height:44px;flex:0 0 44px;padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer}.ux-select-panel svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}.ux-select-options{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:8px 16px calc(12px + env(safe-area-inset-bottom))}.ux-select-options>button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;width:100%;padding:12px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.ux-select-options>button span{min-width:0;overflow-wrap:anywhere}.ux-select-options>button svg{flex:0 0 20px;opacity:0}.ux-select-options>button[aria-selected=true]{color:var(--brand);background:color-mix(in srgb,var(--brand) 8%,transparent)}.ux-select-options>button[aria-selected=true] svg{opacity:1}.ux-select-options>button:hover{background:var(--bg)}.ux-select-options>button:disabled{opacity:.4}.ux-select-options>p{padding:16px;color:var(--muted);font-size:13px}.ux-select-search{display:block;margin:12px 16px 4px}.ux-select-search input{width:100%;min-height:44px;padding:10px 12px;background:var(--bg);border:1px solid var(--line,var(--border));border-radius:9px;color:var(--text);font:inherit}.ux-select-search[hidden]{display:none}.ux-select-dialog.ux-dialog-leaving{animation:none}.ux-select-dialog.ux-dialog-leaving .ux-select-panel{animation:ux-sheet-out var(--ux-exit) ease-in both}
.ex-dialog{overflow:hidden!important;max-height:calc(100dvh - 32px)}.ex-dialog>form{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 82px)}.ex-dialog>form>h2{flex:0 0 auto;font-size:18px;line-height:1.4;margin-bottom:16px}.ex-dialog [data-dialog-body]{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px}.ex-dialog .ex-actions{flex:0 0 auto;display:flex;gap:12px;padding-top:16px;border-top:1px solid var(--line);margin-top:16px}.ex-dialog .ex-actions button{flex:1;min-height:46px;font-size:14px}.ex-dialog [data-dialog-error]{flex:0 0 auto;margin:12px 0 0;font-size:13px}.ex-dialog[aria-busy=true]{cursor:progress}
.c2c-fiat-control>.ux-select-trigger{width:auto;min-width:78px;padding:8px 10px;min-height:44px;font-size:14px}.c2c-market-filters .ux-select-trigger{width:180px;font-size:13px}.c2c-confirm-quote{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;font-size:13px;color:var(--muted)}.c2c-confirm-quote strong{font-variant-numeric:tabular-nums;color:var(--text)}.c2c-confirm-expired{font-size:13px;line-height:1.6;color:var(--red);padding:10px 0;margin:0}.c2c-confirm-refresh{width:100%;min-height:44px;margin:0 0 12px}.confirmation-summary .confirmation-total dd{font-size:21px;font-weight:650;line-height:1.4}.confirmation-summary dd{min-width:0;overflow-wrap:anywhere}.c2c-confirm-password{margin-top:12px}.confirmation-summary [data-convert-confirm-payment]{font-size:13px;font-weight:400}
html.ui-batch-1 body .order-detail-panel{display:flex;flex-direction:column;overflow:hidden;padding:0}.order-detail-panel>header{flex:0 0 auto;margin:0;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--bg)}.order-detail-panel>header button{min-width:44px;min-height:44px}.order-detail-body{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:16px 20px calc(20px + env(safe-area-inset-bottom))}.order-detail-timeline,.order-detail-ledgers{margin:0;padding:14px}.order-detail-section>details>summary{min-height:48px;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;cursor:pointer}.order-detail-section>details>summary::after{content:'+';color:var(--muted)}.order-detail-section>details[open]>summary::after{content:'−'}
.spot-pair-row{display:flex;align-items:center;min-width:0;border-bottom:1px solid var(--line)}.spot-pair-row .spot-pair-option{flex:1;min-width:0;border-bottom:0;width:auto}.spot-pair-name{display:grid;min-width:0;gap:3px;flex:1}.spot-pair-name strong{font-size:13px;white-space:nowrap}.spot-pair-name small{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}.spot-pair-row .ux-stock-favorite{flex:0 0 44px}.spot-pair-row .spot-picker-quote{min-width:76px}.spot-picker-preferences{display:flex;gap:6px;flex-wrap:wrap;max-width:1200px;width:100%;margin:0 auto 12px}.spot-picker-preferences[hidden]{display:none}.spot-picker-preferences button{min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--muted);font-size:13px}.spot-picker-preferences button.active{color:var(--brand);background:color-mix(in srgb,var(--brand) 6%,transparent)}.ux-stock-kind{display:inline-block;margin-left:6px;font-size:11px;font-weight:500;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:1px 4px}.spot-market-status{margin:8px 0 0;padding:8px 12px;border-radius:8px;background:color-mix(in srgb,var(--red) 8%,transparent);color:var(--muted);font-size:12px;line-height:1.5}.spot-market-status[hidden]{display:none}
.spot-chart-legend{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.65;font-size:12px}.spot-chart-legend>summary{min-height:32px;display:flex;gap:8px;align-items:center;list-style:none;cursor:pointer;color:var(--muted)}.spot-chart-legend>summary::-webkit-details-marker{display:none}.spot-chart-legend>summary::after{content:'⌄';margin-left:auto}.spot-chart-legend[open]>summary::after{transform:rotate(180deg)}.spot-chart-legend-data{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;padding:6px 0 10px}.spot-chart-legend-data span{display:flex;justify-content:space-between;gap:8px}.spot-chart-legend-data b{font-weight:500;overflow-wrap:anywhere;color:var(--text)}
.pair-row[href]{color:inherit;text-decoration:none;cursor:pointer}.pair-row[href]:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:8px}.pair-row .pair-price>[data-market-usd][hidden]{display:none}.address-network-reason{color:var(--muted);font-size:13px;line-height:1.6}.address-add-trigger:disabled,.address-floating-add:disabled{opacity:.45;cursor:default}
@media(max-width:767px){.spot-page{padding-top:8px}.spot-workspace .spot-asset-tabs{margin:0 0 6px}.spot-asset-tabs button{min-height:40px;padding-block:6px}.spot-market-bar{padding:8px 12px}.spot-chart-panel{padding:8px 12px}.spot-chart-controls{margin-bottom:4px;gap:6px}.spot-chart-canvas{height:200px}.spot-form-panel #spotOrderForm{gap:10px}.spot-form-panel .spot-side-buttons button{min-height:42px}.spot-form-panel .spot-order-type .spot-select-trigger{min-height:44px;padding-block:8px}.spot-form-panel .spot-amount-field{padding:0 8px}.spot-form-panel #spotAmount{min-height:44px;height:44px;padding:6px 0;font-size:16px!important}.spot-form-panel .spot-percentages{gap:6px}.spot-form-panel .spot-percentages button{min-height:40px}.spot-form-panel #spotBalance{line-height:1.5}.spot-form-panel .spot-submit{min-height:48px;margin-top:0}.spot-book-panel .spot-book-mid{padding-block:8px}.spot-book-panel .spot-depth-row{min-height:27px}.spot-pair-list{align-content:start}.spot-picker-preferences button{min-height:40px}.c2c-market-filters .ux-select-trigger{width:100%}}
@media(min-width:768px){.ux-select-panel{top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 64px));border-bottom:1px solid var(--line,var(--border));border-radius:14px;animation:ux-select-center-in var(--ux-enter) var(--ux-ease) both}.ux-select-dialog.ux-dialog-leaving .ux-select-panel{animation:ux-select-center-out var(--ux-exit) ease-in both}}
@keyframes ux-dialog-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}@keyframes ux-dialog-out{to{opacity:0;translate:0 8px}}@keyframes ux-scrim-in{from{opacity:0}to{opacity:1}}@keyframes ux-scrim-out{to{opacity:0}}@keyframes ux-sheet-in{from{opacity:0;transform:translate(-50%,24px)}to{opacity:1;transform:translate(-50%,0)}}@keyframes ux-sheet-out{to{opacity:0;transform:translate(-50%,20px)}}@keyframes ux-select-center-in{from{opacity:0;transform:translate(-50%,-48%) scale(.98)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes ux-select-center-out{to{opacity:0;transform:translate(-50%,-48%) scale(.98)}}
@media(prefers-reduced-motion:reduce){.ux-dialog[open],.ux-dialog::backdrop,.ux-dialog-leaving,.ux-select-panel{animation:none!important}.ux-select-trigger svg{transition:none}}
.ux-modal-frame{animation:ux-dialog-in var(--ux-enter) var(--ux-ease) both}
.ux-select-trigger[aria-invalid=true]{border-color:var(--red,#ef5368)}
.ux-select-dialog[data-ux-nested=true]::backdrop{background:#0006}
.ux-select-options>button>.ux-option-label{flex:1}.ux-select-options>button>.ux-option-symbol{display:grid;place-items:center;width:32px;min-width:32px;height:32px;flex:0 0 32px;border-radius:8px;background:var(--bg);font-size:18px;font-weight:500;color:var(--muted)}.ux-select-options>button>.ux-option-symbol svg{opacity:1;width:21px;height:21px}
body.picker-open{touch-action:auto}
#convertConfirmDialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:calc(100dvh - 32px)}
#convertConfirmDialog>h2{flex:0 0 auto;margin:0 0 14px}
.c2c-confirm-body{overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px}
#convertConfirmDialog>.dialog-actions{flex:0 0 auto;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.ux-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:var(--card);z-index:2}.ux-picker-head h2{margin:0}.picker-panel .ux-picker-head button{display:grid;place-items:center;width:44px;min-height:44px;padding:0;margin:0;border:0;background:transparent;flex:0 0 44px}.ux-picker-head svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}.ux-sheet-closing .picker-panel,.order-detail-dialog.ux-sheet-closing .order-detail-panel{animation:ux-dialog-out var(--ux-exit) ease-in both;pointer-events:none}.order-detail-panel{animation:ux-dialog-in var(--ux-enter) var(--ux-ease) both}
.spot-indicator-menu{display:contents}.spot-indicator-menu>summary{display:none}
@media(max-width:767px){
 .spot-indicator-menu{display:block;position:relative;flex:0 0 78px;align-self:start}
 .spot-indicator-menu>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 6px;list-style:none;font-size:12px;color:var(--muted);cursor:pointer;border:1px solid var(--line);border-radius:7px;white-space:nowrap}
 .spot-indicator-menu>summary::-webkit-details-marker{display:none}.spot-indicator-menu>summary::after{content:'⌄'}.spot-indicator-menu[open]>summary::after{transform:rotate(180deg)}
 .spot-indicator-menu:has(.active)>summary{color:var(--brand)}
 .spot-indicator-menu>.spot-indicators{display:none;position:absolute;z-index:25;right:0;top:calc(100% + 6px);width:150px;padding:8px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #0005}
 .spot-indicator-menu[open]>.spot-indicators{display:grid;gap:4px;animation:ux-dialog-in var(--ux-enter) var(--ux-ease) both}.spot-indicator-menu>.spot-indicators>span{display:none}.spot-indicator-menu .spot-indicators button{min-height:44px;width:100%;text-align:left;padding:10px 12px}
 .spot-workspace .spot-chart-controls{flex-wrap:nowrap;align-items:start}.spot-workspace .spot-intervals{flex:1;min-width:0;gap:2px;flex-wrap:nowrap}.spot-workspace .spot-intervals button{padding-inline:5px}
 html.ui-batch-1 body .spot-page{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 html.ui-batch-1 body .spot-page{animation:ux-scrim-in 180ms ease both;transform:none;will-change:opacity}
 html.ui-batch-1 body.page-transition-leaving .spot-page{animation:ux-scrim-out 130ms ease both}
 html:has(.spot-page){scroll-padding-bottom:96px}.spot-page input,.spot-page button{scroll-margin-bottom:96px}
}
@media(prefers-reduced-motion:reduce){.ux-modal-frame,.spot-indicator-menu[open]>.spot-indicators,.ux-sheet-closing .picker-panel,.order-detail-panel{animation:none!important}}


/* Input editing keeps the same quiet border as the resting field. */
html body :is(input,textarea,select,.ux-select-trigger,.spot-select-trigger):is(:focus,:focus-visible){outline:none!important;box-shadow:none!important}
html body :is(input,textarea,select,.ux-select-trigger,.spot-select-trigger):not([aria-invalid="true"]):is(:focus,:focus-visible){border-color:var(--line)!important}
html body .discover-search:focus-within{border-color:var(--line);box-shadow:none}
.ux-select-trigger>span{display:flex;align-items:center;gap:8px}.ux-country-flag{display:block;width:25px;height:19px;flex:0 0 25px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px #ffffff14}
.ux-select-options>button>.ux-option-label{display:grid;gap:4px;min-width:0}.ux-option-label small{color:var(--muted);font-size:12px;line-height:1.4;font-weight:400}
.avatar-photo{overflow:hidden;flex-shrink:0}.avatar-photo>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.account-settings-sheet.open .account-settings-panel{opacity:1}
.drawer-profile-main [data-auth-email]{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:12px;margin:4px 0 0}.drawer-profile-main [data-auth-name]{overflow-wrap:anywhere}
#accountSettingsSheet .profile-identity{display:flex;align-items:center;gap:14px;padding:14px 0 20px;border-bottom:1px solid var(--line);margin-bottom:18px}
.profile-identity .avatar-photo{width:64px;height:64px}.profile-identity-main{display:grid;gap:7px;min-width:0}.profile-identity-main strong{font-size:17px;overflow-wrap:anywhere}.profile-identity-main small{color:var(--muted);font-size:12px}.profile-avatar-action{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 14px;border:1px solid var(--line);border-radius:8px;color:var(--text);font-size:13px;cursor:pointer;width:fit-content}
.profile-avatar-action input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.profile-avatar-action:focus-within{outline:1px solid var(--muted);outline-offset:2px}.profile-avatar-help{color:var(--muted);font-size:12px;line-height:1.6;margin:10px 0 18px}.profile-save-status{font-size:13px;line-height:1.6;padding:10px 12px;border-radius:8px;background:var(--card);margin:12px 0 0}.profile-save-status[data-type="error"]{color:var(--red)}.profile-save-status[data-type="ok"]{color:var(--green)}
.profile-identity-main{flex:1;max-width:100%}.profile-identity-main small{overflow-wrap:anywhere}
.profile-avatar-action{max-width:100%;min-height:44px;box-sizing:border-box;text-align:center;white-space:normal;line-height:1.5}
.profile-avatar-action>span{min-width:0;overflow-wrap:anywhere}


.spot-record-time,.spot-record-time-cell{overflow-wrap:anywhere}


.language-options{max-height:min(70dvh,480px);overflow-y:auto;overscroll-behavior:contain}
.language-options button{white-space:nowrap}
.i18n-copy{display:contents!important;font:inherit!important;color:inherit!important}

/* Long Latin/Cyrillic words must never break inside a tab label. */
.c2c-page .c2c-zone-tabs button{white-space:nowrap;overflow-wrap:normal;word-break:keep-all}

/* C2C zone tabs use different type sizes per writing system so that
   "Block trades" / "Số lượng lớn" do not dominate the header. */
html:is([lang="en"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .c2c-page .c2c-zone-tabs button{font-size:16px}
html:is([lang="vi"],[lang="ko"],[lang="th"]) .c2c-page .c2c-zone-tabs button{font-size:15px}

@media(max-width:767px){
 html:is([lang="ko"],[lang="th"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .bottom-nav a{min-width:0;font-size:10px;line-height:1.2;text-align:center}
 html:is([lang="ko"],[lang="th"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .bottom-nav a span{display:block;max-width:100%;overflow-wrap:anywhere}
 .spot-form-panel .spot-select-trigger{overflow-wrap:anywhere}
 html:is([lang="en"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .c2c-page .c2c-zone-tabs{gap:14px}
 html:is([lang="vi"],[lang="ko"],[lang="th"]) .c2c-page .c2c-zone-tabs{gap:12px}
 html:is([lang="en"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .c2c-page .c2c-zone-tabs button{font-size:15px;white-space:nowrap}
 html:is([lang="vi"],[lang="ko"],[lang="th"]) .c2c-page .c2c-zone-tabs button{font-size:14px;white-space:nowrap}
 html:is([lang="vi"],[lang="en"],[lang="it"],[lang="es"],[lang="fr"],[lang="ru"]) .c2c-quick-panel .amount-row-wide .convert-max-chip{font-size:12px;min-width:max-content;white-space:nowrap}
}


/* Transient feedback floats above the current surface without changing page layout. */
html.ui-batch-1 body .feedback-toast.ui-feedback {
  position:fixed; z-index:2147483000; inset:auto; top:max(72px,calc(env(safe-area-inset-top) + 64px));
  left:50%; bottom:auto; display:flex; align-items:center; gap:10px; box-sizing:border-box;
  width:max-content; max-width:min(440px,calc(100vw - 32px)); min-height:52px; margin:0;
  padding:10px 8px 10px 14px; border:1px solid #333a43; border-radius:12px;
  background:#191f27; color:#f3f5f7; box-shadow:0 8px 28px #0005;
  font-size:14px; font-weight:500; line-height:1.55; text-align:start;
  transform:translate(-50%,-6px); opacity:0; pointer-events:auto; transition:opacity 180ms ease,transform 200ms ease;
}
html body .feedback-toast.ui-feedback.is-visible { opacity:1; transform:translate(-50%,0); }
html body .feedback-toast.ui-feedback.is-leaving { opacity:0; transform:translate(-50%,-4px); }
html body .feedback-toast.ui-feedback[data-tone] { color:#f3f5f7; }
html body .feedback-toast.ui-feedback .feedback-message { flex:1; min-width:0; overflow-wrap:anywhere; }
.feedback-icon { flex:none; width:20px; height:20px; color:var(--color-text-secondary,#9da7b5); }
[data-tone="success"] > .feedback-icon { color:var(--positive,#22c5a4); }
[data-tone="error"] > .feedback-icon { color:var(--negative,#ff7688); }
[data-tone="warning"] > .feedback-icon { color:var(--brand,#f5ad00); }
html body .feedback-toast .feedback-close { flex:none; display:grid; place-items:center; width:36px; min-width:36px; height:36px; min-height:36px; padding:6px; border:0; border-radius:8px; color:#a7b0bd; background:transparent; cursor:pointer; }
.feedback-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
html body .feedback-close:hover,html body .feedback-close:focus-visible { background:#ffffff0d; color:#fff; }
html body dialog > .feedback-toast.ui-feedback { position:fixed; left:50%; bottom:auto; width:max-content; margin:0; }
html body .feedback-form-error,html body .feedback-field-error {
  display:block; padding:0; margin:6px 0 10px; border:0; border-radius:0; background:transparent;
  color:var(--negative,#ff8091); font-size:13px; font-weight:400; line-height:1.55; overflow-wrap:anywhere;
}
html body .feedback-form-error[hidden],html body .feedback-field-error[hidden],html body .feedback-status[hidden] { display:none!important; }
html body .feedback-status {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 0; margin:4px 0 8px;
  border:0; border-radius:0; background:transparent; color:var(--color-text-secondary,#a4adba);
  font-size:13px; line-height:1.55; text-align:start;
}
html body .feedback-status > span { flex:1; min-width:140px; }
html body .feedback-status > button { flex:none; min-height:36px; width:auto; margin:0; padding:4px 8px; border:0; border-radius:6px; color:var(--brand,#f5ad00); background:transparent; font:inherit; cursor:pointer; }
html body .feedback-status .feedback-icon { width:16px; height:16px; }
html body [data-ex-notice] { display:none!important; }
html body [data-ex-wallet-status],html body [data-ex-pending] { font-size:13px; }
html body .earn-alert.error,html body [data-sale-error],html body [data-quick-password-error] { padding:0; border:0; border-radius:0; background:transparent; color:var(--negative,#ff8091); font-size:13px; line-height:1.55; }
html body .earn-subscribe-notice { border:0; background:transparent; padding:4px 0 12px; }
html body [data-auth-success] { display:flex; align-items:center; justify-content:center; gap:8px; }
html body [data-auth-success] .feedback-icon { width:18px; height:18px; color:currentColor; }
@media (min-width:800px) { html.ui-batch-1 body .feedback-toast.ui-feedback { top:88px; } }
@media (prefers-reduced-motion:reduce) { html.ui-batch-1 body .feedback-toast.ui-feedback,html.ui-batch-1 body .feedback-toast.ui-feedback.is-visible,html.ui-batch-1 body .feedback-toast.ui-feedback.is-leaving { transform:translateX(-50%); transition:none; } }

/* Existing safety and form status nodes keep their meaning with restrained styling. */
html body .ex-notice:not([data-ex-notice]) { padding:8px 0; margin:4px 0 8px; border:0; border-radius:0; background:transparent; color:var(--color-text-secondary,#a4adba); font-size:13px; line-height:1.55; }
html body .ex-notice.is-error:not([data-ex-notice]) { color:var(--negative,#ff8091); }
html body .feedback-toast .feedback-close { width:44px; min-width:44px; height:44px; min-height:44px; }
html body .feedback-status > button { min-height:44px; }
html.ui-batch-1 body .feedback-status > button { min-width:0; width:auto; padding:4px 8px; border:0; background:transparent; color:var(--brand,#f5ad00); box-shadow:none; }
html.ui-batch-1 body [data-auth-success]:disabled { opacity:1; background:var(--brand,#f5ad00); color:#11151a; }

/* v42: one shared feedback lane immediately below the current navigation. */
html.ui-batch-1 body .feedback-region { position:relative; display:block; grid-column:1/-1; width:100%; min-width:0; margin:16px 0 12px; padding:0; }
/* The trade bar already supplies the 16px gap below the C2C feedback lane. */
html.ui-batch-1 body .c2c-page > .feedback-region { margin-bottom:0; }
html.ui-batch-1 body .feedback-region[hidden] { display:none!important; }
html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback {
  position:relative; inset:auto; top:auto; left:auto; bottom:auto; z-index:1; width:100%; max-width:100%;
  min-height:52px; margin:0; padding:4px 6px 4px 14px; border-radius:12px; background:#181d25;
  border-color:#303845; box-shadow:none; color:#e7ebf1; transform:translateY(-4px); font-size:14px; line-height:1.55;
}
html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback.is-visible { opacity:1; transform:translateY(0); }
html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback.is-leaving { opacity:0; transform:translateY(-3px); }
html.ui-batch-1 body .feedback-toast .feedback-action { display:inline-flex; align-items:center; justify-content:center; flex:none; min-height:44px; min-width:44px; max-width:40%; padding:6px 8px; border:0; background:transparent; color:#ffbc2a; font:inherit; font-weight:600; text-decoration:none; text-align:center; white-space:normal; }
html.ui-batch-1 body .feedback-toast .feedback-close { color:#a6b1c1; }
html.ui-batch-1 body .feedback-toast[data-tone="info"] > .feedback-icon { color:#81aaff; }
html.ui-batch-1 body .feedback-toast[data-tone="success"] > .feedback-icon { color:#20d4a2; }
html.ui-batch-1 body .feedback-toast[data-tone="error"] > .feedback-icon { color:#ff657b; }
html.ui-batch-1 body .feedback-toast[data-tone="warning"] > .feedback-icon { color:#ffbd20; }
html.ui-batch-1 body .feedback-field-error,html.ui-batch-1 body .feedback-form-error { display:flex; gap:7px; align-items:flex-start; color:#ff7084; font-size:13px; line-height:1.6; }
html body :is(.feedback-field-error,.feedback-form-error) { min-width:0; max-width:100%; box-sizing:border-box; white-space:normal; word-break:normal; text-align:start; }
html body :is(.feedback-field-error,.feedback-form-error) > :is([data-field-message],[data-summary-message]) { flex:1; min-width:0; overflow-wrap:anywhere; }
html.ui-batch-1 body .feedback-field-error .feedback-icon,html.ui-batch-1 body .feedback-form-error .feedback-icon { width:14px; height:14px; margin-top:3px; color:inherit; }
html.ui-batch-1 body .feedback-invalid,html.ui-batch-1 body input[aria-invalid="true"],html.ui-batch-1 body textarea[aria-invalid="true"],html.ui-batch-1 body .ui-select-trigger[aria-invalid="true"] { border-color:#ff657b!important; box-shadow:none; }
html.ui-batch-1 body .auth-input.feedback-invalid input { border:1px solid #ff657b!important; }
html.ui-batch-1 body .auth-feedback-row { display:flex; align-items:flex-start; gap:10px; justify-content:space-between; min-width:0; }
html.ui-batch-1 body .auth-feedback-row .feedback-field-error { flex:1; min-width:0; margin:0; }
html.ui-batch-1 body .auth-feedback-row .auth-inline-link { flex:none; margin:0; padding:0; }
html.ui-batch-1 body .auth-feedback-row .auth-inline-link a { font-size:13px; }
html.ui-batch-1 body button[data-feedback-saved],html.ui-batch-1 body #accountSettingsSheet .settings-form button[data-feedback-saved] { display:flex; align-items:center; justify-content:center; gap:8px; border:1px solid #20d4a2; background:transparent; color:#20d4a2; opacity:1; }
html.ui-batch-1 body .profile-avatar-action [data-feedback-saved] { display:inline-flex; align-items:center; gap:6px; color:#20d4a2; }
html.ui-batch-1 body [data-feedback-saved]::before { content:''; display:inline-block; width:18px; height:18px; flex:none; background:currentColor; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
html.ui-batch-1 body .feedback-password-rule { display:flex; align-items:center; gap:6px; margin:-8px 0 4px; color:#a8b2c1; font-size:13px; line-height:1.6; }
html.ui-batch-1 body .feedback-password-rule .feedback-icon { width:15px; height:15px; }
html.ui-batch-1 body .feedback-password-rule[data-tone="success"] { color:#20d4a2; }
html.ui-batch-1 body :is(.profile-avatar-help,.settings-form-head p,.earn-muted,.earn-estimate-note,.auth-caps-lock,.feedback-status,.ex-help) { color:#a5afbe; }
html.ui-batch-1 body .feedback-status[data-tone="warning"] { color:#efb337; }
html.ui-batch-1 body .feedback-status[data-tone="warning"] > span { color:inherit; }
@media(prefers-reduced-motion:reduce) { html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback,html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback.is-visible,html.ui-batch-1 body .feedback-region > .feedback-toast.ui-feedback.is-leaving { transform:none; transition:none; } }


.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease;
}

.file-picker:focus-within {
  border-color: var(--brand);
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 1px;
}

.file-picker[data-file-picker-filled="true"] {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

.file-picker-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  border: 0;
  cursor: pointer;
  font-size: 0;
}

.file-picker-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 7px 12px;
  pointer-events: none;
}

.file-picker-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card-soft, var(--card));
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker-name[data-empty="true"] {
  color: var(--muted);
}

.file-picker-input:disabled {
  cursor: not-allowed;
}

.file-picker:has(.file-picker-input:disabled) {
  opacity: .6;
}

html:is([lang="vi"], [lang="fr"], [lang="it"], [lang="es"], [lang="en"]) .file-picker-button {
  font-size: 12px;
  padding-inline: 10px;
}


/* Trading eligibility banner shared by C2C and the spot terminal. */
.trading-gate-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 24px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  color: var(--text);
}

.trading-gate-banner[hidden] {
  display: none;
}

.trading-gate-banner > svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--brand);
}

.trading-gate-copy {
  display: grid;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.trading-gate-copy strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.trading-gate-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.trading-gate-banner .outline-pill {
  flex: 0 0 auto;
  align-self: center;
  min-height: 36px;
  padding-inline: 14px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .trading-gate-banner {
    flex-wrap: wrap;
  }

  .trading-gate-banner .outline-pill {
    margin-left: 32px;
  }
}

/* KYC gate dialog: status line and reject reason. */
.kyc-required-dialog .kyc-required-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px auto 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.kyc-required-dialog .kyc-required-reason {
  margin: 10px 0 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, #ef4444 40%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, #ef4444 8%, transparent);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  text-align: start;
}


/* Keep mobile text fields readable without triggering focus zoom. Amount displays
   already use larger type and retain their page-specific sizing. Pinch zoom stays enabled. */
@media (max-width: 767px), (pointer: coarse) {
  html body input:not(:where([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"])):not(:where(.amount-row input, .amount-entry-row input, .join-input-row input, .earn-input-wrap input, #c2cSellDialog input[name="amount"])),
  html body textarea,
  html body select,
  html body [contenteditable="true"] {
    font-size: 16px !important;
  }
}
