/* =========================================================
   GateWallet — wallet surfaces.
   The Assets hero (.wal-*), the compact locked banner,
   receive / send / swap flows (.wl-*, .sw-*) and the recent
   wallet activity rows on the Assets screen.
   The 2FA gate surfaces (.ga-*) live in css/sheets.css.
   ========================================================= */

/* ---------------------------------------------------------
   1. Wallet hero — the balance floats on the page ground
      (TG Wallet pattern): quiet controls in the top corners,
      big centred numerals, four round actions underneath.
   --------------------------------------------------------- */
.wal-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 16px 6px;
}
.wal-top {
  display: flex; align-items: center; width: 100%; min-height: 34px;
}
.wal-top .spacer { flex: 1; }
.wal-top .icon-btn { width: 36px; height: 36px; margin-right: -8px; color: var(--text-mute); }

.wal-brow {
  margin-top: 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--text-mute);
}
.wal-eq {
  display: flex; align-items: baseline; justify-content: center; gap: 7px;
  margin-top: 7px; max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.wal-eq .count {
  font-size: 42px; font-weight: 800; letter-spacing: -1.4px; line-height: 1.05;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wal-cur { font-size: 15px; font-weight: 650; color: var(--text-dim); }
.wal-sub {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  flex-wrap: wrap; margin-top: 6px; padding: 0 6px;
  font-size: 12px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.wal-sub #as-pnl { font-weight: 650; transition: color var(--dur-fast) var(--ease-out); }
.wal-dot { flex: 0 0 auto; width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }
.wal-today { font-size: 11px; color: var(--text-mute); }

.wal-acts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  width: 100%; max-width: 332px; margin: 16px auto 0;
}
.wal-act {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 0; background: none;
  color: var(--text-dim); font-size: 11px; font-weight: 650; letter-spacing: .1px;
}
.wal-act-ic {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  color: var(--accent);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.wal-act-ic svg { width: 22px; height: 22px; }
.wal-act:active .wal-act-ic { background: var(--bg-hover); transform: scale(.92); }
.wal-act-l { line-height: 1; }

/* Narrow devices (320px class): the circles tighten, labels stay on one line. */
@media (max-width: 340px) {
  .wal-eq .count { font-size: 36px; }
  .wal-acts { gap: 4px; max-width: 296px; }
  .wal-act-ic { width: 52px; height: 52px; }
}

/* ---------------------------------------------------------
   2. Locked banner (Assets, shown until 2FA is on) — compact,
      sized to its content, between the balance and the actions.
   --------------------------------------------------------- */
.wl-lock {
  display: flex; align-items: center; gap: 9px;
  width: fit-content; max-width: 100%;
  margin: 12px auto 0; padding: 7px 12px 7px 11px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  color: var(--text); text-align: left;
  animation: fadeIn var(--dur) var(--ease-out) both;
}
.wl-lock-ic { flex: 0 0 auto; display: flex; color: var(--accent); }
.wl-lock-ic svg { width: 15px; height: 15px; }
.wl-lock-t { flex: 0 1 auto; min-width: 0; }
.wl-lock-t b {
  display: block; font-size: 12px; font-weight: 650; line-height: 1.25;
  white-space: nowrap;
}
.wl-lock-t span {
  display: block; font-size: 10.5px; color: var(--text-mute);
  margin-top: 1px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-lock-go {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px;
  margin-left: 3px;
  color: var(--accent); font-size: 11.5px; font-weight: 700;
}
.wl-lock-go svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------
   2b. Account status strip (frozen / KYC) — one narrow line
       under the hero actions, never a card stack.
   --------------------------------------------------------- */
.wal-strip {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 340px; margin: 14px auto 0;
  padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: var(--bg-card);
  color: var(--text); text-align: left; font-size: 12px;
  animation: fadeIn var(--dur) var(--ease-out) both;
}
.wal-strip .ws-ic { display: flex; flex: 0 0 auto; color: var(--text-mute); }
.wal-strip b { flex: 0 0 auto; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wal-strip > span:not(.ws-ic) {
  flex: 1; min-width: 0; font-size: 11px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wal-strip i { flex: 0 0 auto; font-style: normal; font-size: 11.5px; font-weight: 700; }
.wal-strip.red { border-color: rgba(239, 69, 74, .38); background: rgba(239, 69, 74, .09); }
.wal-strip.red .ws-ic, .wal-strip.red i { color: var(--down); }
.wal-strip.gold { border-color: rgba(247, 166, 0, .38); background: rgba(247, 166, 0, .08); }
.wal-strip.gold .ws-ic, .wal-strip.gold i { color: var(--brand-1); }

/* ---------------------------------------------------------
   3. Wallet flows (receive / send / swap sheets)
   Native-sheet insides: tiles and hairlines, not row stacks.
   --------------------------------------------------------- */
.wl-flow { padding: 0 16px 6px; overflow: hidden; }
.wl-step { display: flex; flex-direction: column; gap: 10px; }
.wl-step > .btn { margin-top: 4px; }

.wl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.wl-head-t { flex: 1; min-width: 0; }
.wl-head-t b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.wl-head-t span { display: block; font-size: 11px; color: var(--text-mute); margin-top: 1px; }

/* In-step title for sheets that open without a chrome title. */
.wl-title { margin: 2px 0 0; }
.wl-title b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.wl-title span { display: block; font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }

/* Small-caps section eyebrow inside pickers. */
.wl-eyebrow {
  margin: 2px 2px 0; font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--text-mute);
}

.wl-search { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.wl-search svg { width: 15px; height: 15px; color: var(--text-mute); flex: 0 0 auto; }
/* .field pins inputs right for numbers — text inputs here read left-to-right */
.wl-search input,
.wl-field[data-f="addr"] input,
.wl-field[data-f="user"] input,
.wl-field[data-f="holder"] input,
.wl-field[data-f="iban"] input,
.wl-field[data-f="name"] input,
.wl-field[data-f="dob"] input,
.wl-field[data-f="docno"] input { text-align: left; font-weight: 500; }

/* Destination switcher at the top of the send sheet (Address / Telegram / Bank) */
.wl-seg {
  display: flex; gap: 3px; padding: 3px;
  border-radius: 12px;
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  margin-bottom: 2px;
}
.wl-seg-b {
  flex: 1; min-height: 34px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.wl-seg-b.on {
  background: var(--ov-key-press, rgba(255, 255, 255, .08));
  color: var(--text); font-weight: 700;
}

/* Compact coin selector row (Telegram transfer form) */
.wl-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  text-align: left; color: var(--text);
  transition: background var(--dur-fast) var(--ease-out);
}
.wl-pick:active { background: var(--ov-key-press, rgba(255, 255, 255, .08)); }
.wl-pick-t { flex: 1; min-width: 0; }
.wl-pick-t b { display: block; font-size: 13.5px; font-weight: 700; }
.wl-pick-t span { display: block; font-size: 11px; color: var(--text-mute); margin-top: 1px; }
.wl-pick-ch { display: flex; color: var(--text-mute); }

.wl-mut { margin: 0; font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }
.wl-mut.center { text-align: center; }
.wl-mut b { color: var(--text); font-weight: 650; }
.wl-big { margin: 4px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.3px; text-align: center; }
.wl-none { margin: 14px 4px; font-size: 12px; color: var(--text-mute); text-align: center; }
.wl-hint-err { margin: -4px 0 0 2px; font-size: 11.5px; color: var(--down); }

/* ---- coin picker: owned coins as tiles, the rest as a dense list ---- */
.wl-picker { display: flex; flex-direction: column; gap: 10px; }
.wl-picklist {
  display: flex; flex-direction: column; gap: 9px;
  max-height: 52dvh; overflow-y: auto;
  margin: 0 -16px; padding: 2px 16px 6px;
}

.wl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.wl-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 6px 9px; border-radius: var(--radius-sm);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  color: var(--text);
  animation: rowIn .26s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 24ms);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.wl-tile:active { background: var(--ov-key-press, rgba(255, 255, 255, .08)); transform: scale(.96); }
.wl-tile b { font-size: 12.5px; font-weight: 700; letter-spacing: .2px; }
.wl-tile > .num {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}

.wl-dense { display: flex; flex-direction: column; margin: 0 -16px; }
.wl-dense-r {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 7px 16px;
  color: var(--text); text-align: left;
  transition: background var(--dur-fast) var(--ease-out);
  animation: rowIn .24s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 14ms);
}
.wl-dense-r + .wl-dense-r::before {
  content: ""; position: absolute; top: 0; left: 50px; right: 0; height: 1px;
  background: var(--ov-hairline, rgba(255, 255, 255, .07));
}
.wl-dense-r:active { background: var(--ov-press, rgba(255, 255, 255, .05)); }
.wl-dense-r b { flex: 0 0 auto; font-size: 13px; font-weight: 650; }
.wl-dense-r .wl-dr-name {
  flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Instant top-up entry (receive flow) — one slim gold-tinted strip. */
.wl-topup {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid rgba(247, 166, 0, .3); border-radius: var(--radius-sm);
  background: rgba(247, 166, 0, .07);
  color: var(--text); text-align: left;
  transition: background var(--dur-fast) var(--ease-out);
}
.wl-topup:active { background: rgba(247, 166, 0, .13); }
.wl-topup-ic {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.wl-topup-t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.wl-topup-t b { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.wl-topup-t span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--text-dim);
}
.wl-topup-ch { color: var(--accent); display: flex; flex: 0 0 auto; }

/* ---- network cards: 2-col grid, fee in gold, ETA beside it ---- */
.wl-netgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wl-netcard {
  display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  padding: 11px 11px 10px; border-radius: var(--radius-sm);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  color: var(--text); text-align: left;
  animation: rowIn .28s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.wl-netcard:active { background: var(--ov-key-press, rgba(255, 255, 255, .08)); transform: scale(.97); }
.wl-nc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wl-nc-top .wl-net-chip { min-width: 0; padding: 3px 7px; font-size: 9.5px; }
.wl-nc-name {
  min-height: 30px; display: flex; align-items: center;
  font-size: 12px; font-weight: 650; line-height: 1.28; letter-spacing: -.1px;
}
.wl-nc-facts { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.wl-nc-facts > b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--brand-1);
  font-variant-numeric: tabular-nums;
}
.wl-nc-facts > span { flex: 0 0 auto; font-size: 10.5px; color: var(--text-mute); }

/* Network chips are wayfinding, not brand moments — neutral, never violet. */
.wl-net-chip {
  flex: 0 0 auto; min-width: 48px; padding: 5px 8px;
  border-radius: 8px; background: var(--ov-key-press, var(--bg-hover)); color: var(--text-dim);
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-align: center;
}

/* One-line amber caution — a strip, not a paragraph. */
.wl-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  background: rgba(247, 166, 0, .07); border: 1px solid rgba(247, 166, 0, .22);
  font-size: 11px; line-height: 1.35; color: var(--text-dim);
}
.wl-strip > span:first-child { display: flex; flex: 0 0 auto; color: var(--brand-1); }
.wl-strip > span + span { min-width: 0; }

/* ---- receive address: QR hero, segmented mono address, one gold copy ---- */
.wl-qr-card {
  width: fit-content; margin: 2px auto 0; padding: 12px 14px 10px;
  background: #fff; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  box-shadow: var(--shadow-2);
  animation: popIn .34s var(--ease-spring) both;
}
.wl-qr svg { display: block; width: 176px; height: 176px; }
.wl-qr-tag { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #3E4350; }
.wl-qr-tag b { color: #14151A; font-weight: 700; }
.wl-qr-tag i { font-style: normal; color: #9AA0AC; }

.wl-addr2 {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  text-align: left; color: var(--text);
  transition: background var(--dur-fast) var(--ease-out);
}
.wl-addr2:active { background: var(--ov-key-press, rgba(255, 255, 255, .08)); }
.wl-addr2-t {
  flex: 1; min-width: 0;
  font-family: var(--fm); font-size: 12px; line-height: 1.55; letter-spacing: .2px;
  word-break: break-all;
}
.wl-addr2-t b { font-weight: 700; color: var(--text); }
.wl-addr2-t > span { color: var(--text-mute); font-weight: 500; }
.wl-addr2-t b:last-child { color: var(--brand-1); }
.wl-addr2-ic { flex: 0 0 auto; display: flex; color: var(--accent); }

.wl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-chips.center { justify-content: center; }
.wl-chip2 {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
  font-size: 10.5px; font-weight: 650; color: var(--text-dim);
}
.wl-chip2 i { display: flex; font-style: normal; }
.wl-chip2.gold { color: var(--brand-1); border-color: rgba(247, 166, 0, .28); background: rgba(247, 166, 0, .07); }
.wl-chip2.ok { color: var(--up); border-color: rgba(32, 178, 108, .28); background: rgba(32, 178, 108, .07); }

.wl-share { margin: -2px 0 0; font-size: 11px; color: var(--text-mute); text-align: center; }

/* ---- send: destination chip + big-numeral keypad amount ---- */
.wl-dest {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
}
.wl-dest > b {
  flex: 1; min-width: 0; font-family: var(--fm); font-size: 11.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wl-dest-edit {
  flex: 0 0 auto; padding: 2px 3px; cursor: pointer;
  color: var(--accent); font-size: 11px; font-weight: 700;
}

.wl-pad-step { min-height: min(64dvh, 540px); }
.wl-stage { min-height: 108px; gap: 10px; }
.wl-amt-u {
  font-style: normal; font-size: .4em; font-weight: 700;
  color: var(--text-mute); margin-left: 7px; letter-spacing: .5px;
}
.wl-sum { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.wl-sum > span { font-size: 11px; color: var(--text-mute); }
.wl-sum > span b { color: var(--text-dim); font-weight: 650; }
.wl-sum > span.bad { color: var(--down); }

.wl-avail {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 2px; font-size: 11.5px; color: var(--text-mute);
}
.wl-avail b { color: var(--text-dim); font-weight: 650; }
.wl-feenote { font-size: 10.5px; color: var(--text-mute); }

@media (max-height: 700px) {
  .wl-pad-step { min-height: 0; }
  .wl-stage { min-height: 80px; }
}

/* ---- send via Telegram: avatar fills with initials as you type ---- */
.wl-tg-hero { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 6px 0 2px; }
.wl-tgav {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(34, 158, 217, .12); border: 1px solid rgba(34, 158, 217, .3);
  color: #229ED9; font-size: 19px; font-weight: 800; letter-spacing: .5px;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.wl-tgav svg { width: 22px; height: 22px; }
.wl-tgav.has { background: #229ED9; color: #fff; border-color: transparent; }

/* ---- bank: hairline country rows, grouped IBAN ---- */
.wl-ctys {
  display: flex; flex-direction: column;
  max-height: 46dvh; overflow-y: auto;
  margin: 0 -16px; padding: 0 0 4px;
}
.wl-cty {
  position: relative; display: flex; align-items: center; gap: 11px;
  min-height: 42px; padding: 8px 16px;
  text-align: left; color: var(--text);
  transition: background var(--dur-fast) var(--ease-out);
  animation: rowIn .24s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}
.wl-cty + .wl-cty::before {
  content: ""; position: absolute; top: 0; left: 55px; right: 0; height: 1px;
  background: var(--ov-hairline, rgba(255, 255, 255, .07));
}
.wl-cty:active { background: var(--ov-press, var(--bg-hover)); }
.wl-cty-f { flex: 0 0 auto; width: 28px; font-size: 21px; line-height: 1; text-align: center; }
.wl-cty-n {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-cty-c {
  flex: 0 0 auto; font-family: var(--fm); font-size: 10.5px; font-weight: 600;
  letter-spacing: .6px; color: var(--text-mute);
}

.wl-iban { font-family: var(--fm); font-size: 13px; letter-spacing: .4px; }

/* Send form */
.wl-field { position: relative; transition: border-color var(--dur-fast) var(--ease-out); }
.wl-field input { min-width: 0; }
.wl-field.ok { border-color: rgba(32, 178, 108, .55); }
.wl-field.bad { border-color: rgba(239, 69, 74, .55); }
.wl-valid { display: flex; color: var(--up); flex: 0 0 auto; animation: popIn .3s var(--ease-spring) both; }
.wl-valid[hidden] { display: none; }
.wl-max {
  flex: 0 0 auto; padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.wl-max:active { transform: scale(.92); }

/* ---------------------------------------------------------
   4. Swap (the built-in exchanger) — one card, two slots,
      the flip button riding their boundary.
   --------------------------------------------------------- */
.sw2 {
  border-radius: var(--radius);
  background: var(--ov-key, rgba(255, 255, 255, .03));
  border: 1px solid var(--ov-key-line, rgba(255, 255, 255, .05));
}
.sw2-slot { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.sw2-l { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-mute); }
.sw2-m { display: flex; align-items: center; gap: 10px; }
.sw2-b { display: flex; }
.sw2-div { position: relative; z-index: 2; height: 0; display: flex; justify-content: center; }
.sw2-div::before {
  content: ""; position: absolute; top: -0.5px; left: 12px; right: 12px; height: 1px;
  background: var(--ov-hairline, rgba(255, 255, 255, .07));
}

.sw-coin {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
  padding: 5px 9px 5px 5px; border-radius: var(--radius-pill);
  background: var(--ov-key-press, var(--bg-hover)); color: var(--text);
  font-size: 13.5px; font-weight: 700;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sw-coin:active { transform: scale(.95); }
.sw-av { display: flex; }
.sw-ch { display: flex; color: var(--text-mute); }
.sw-amt {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  color: var(--text); text-align: right;
  font-family: inherit; font-size: 24px; font-weight: 800; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
.sw-amt::placeholder { color: var(--text-mute); }
.sw-amt::-webkit-outer-spin-button, .sw-amt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sw-recv {
  flex: 1; min-width: 0; text-align: right;
  font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--text-mute);
  transition: color var(--dur-fast) var(--ease-out);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-recv.has { color: var(--brand-1); }
.sw-max {
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 700;
  transition: transform var(--dur-fast) var(--ease-out);
}
.sw-max:active { transform: scale(.92); }

.sw-flip {
  width: 40px; height: 40px; border-radius: 50%; margin-top: -20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-1); color: #17110A;
  border: 4px solid var(--ov-bg, var(--bg-elev));
  box-shadow: var(--shadow-1);
  transition: transform .5s var(--ease-spring), filter var(--dur-fast) var(--ease-out);
}
.sw-flip:active { filter: brightness(.9); }
.sw-flip svg { transform: rotate(90deg); width: 16px; height: 16px; }

.sw2-rate {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  min-height: 15px; padding: 0 2px; font-size: 11.5px;
}
.sw2-rate > span { color: var(--text-dim); font-weight: 650; font-variant-numeric: tabular-nums; }
.sw2-rate > i { font-style: normal; font-size: 10.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* Receipt extras shared by swap / bank review / KYC (base .tp-* in section 6) */
.tp-r-pair { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 8px; }
.tp-r-pair i { display: flex; color: var(--text-mute); }
.stamp-in { animation: stampIn .55s var(--ease-out) .26s both; }
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.2); }
  70% { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(.95); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-13deg) scale(1); }
}

/* ---------------------------------------------------------
   4b. KYC sheet (core/kyc.js)
   --------------------------------------------------------- */
.ky-mark {
  width: 56px; height: 56px; margin: 6px auto 0; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.ky-mark svg { width: 26px; height: 26px; }

.ky-cty {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: var(--bg-elev); border: 1px solid transparent;
  color: var(--text); text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.ky-cty-f { flex: 0 0 auto; width: 24px; font-size: 19px; line-height: 1; text-align: center; }
.ky-cty-t {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ky-cty-t.empty { color: var(--text-mute); font-weight: 500; }
.ky-cty-ch { display: flex; color: var(--text-mute); }

.ky-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 124px; padding: 12px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--ov-hairline-hi, rgba(255, 255, 255, .14));
  background: var(--ov-key, rgba(255, 255, 255, .02));
  color: var(--text-mute); font-size: 11.5px; text-align: center;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.ky-drop:active { border-color: rgba(247, 166, 0, .5); }
.ky-drop.filled { border-style: solid; border-color: var(--ov-key-line, rgba(255, 255, 255, .05)); padding: 9px; }
.ky-drop-ic { display: flex; color: var(--text-dim); }
.ky-drop .doc { width: 100%; max-width: 236px; height: auto; border-radius: 9px; display: block; }
.ky-drop-hint { font-size: 10.5px; color: var(--text-mute); }

/* ---------------------------------------------------------
   5. Recent activity (Assets screen)
   --------------------------------------------------------- */
.wl-tx-av { position: relative; display: flex; flex: 0 0 auto; }
.wl-tx-kind {
  position: absolute; right: -4px; bottom: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg); color: #fff; font-style: normal;
}
.wl-tx-kind svg { width: 8.5px; height: 8.5px; }
.wl-tx-kind.k-send { background: var(--down); }
.wl-tx-kind.k-receive { background: var(--up); }
.wl-tx-kind.k-swap { background: var(--brand-2); }
.wl-tx-kind.k-tg { background: #229ED9; }          /* Telegram blue, both themes */

/* Bank withdrawals lead with the destination country's flag. */
.wl-tx-flag {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--bg-hover); font-size: 17px; line-height: 1;
}

.asset-row .ar-v span.wl-chip {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 3px; padding: 3px 8px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700; letter-spacing: .2px;
}
.asset-row .ar-v span.wl-chip b { font-weight: 700; font-size: 10px; }
.asset-row .ar-v span.wl-chip.pending { background: var(--brand-1-soft); color: var(--brand-1); }
.asset-row .ar-v span.wl-chip.processing { background: var(--brand-2-soft); color: var(--brand-2); }
.asset-row .ar-v span.wl-chip.failed { background: var(--down-soft); color: var(--down); }
.asset-row .ar-v span.wl-chip.done { background: var(--up-soft); color: var(--up); }
.wl-chip .pulse-dot { width: 5px; height: 5px; background: currentColor; }
.wl-chip.done .pulse-dot, .wl-chip.failed .pulse-dot { display: none; }

/* ---------------------------------------------------------
   6. Instant top-up flow (.tp-*)
   Step 1: huge numerals over a custom keypad. Step 2: method
   rows. Step 3: a tear-off receipt that stamps CREDITED.
   Graphite ground, hairline strokes, gold used precisely.
   --------------------------------------------------------- */
.tp .tp-s1 { min-height: min(72dvh, 600px); }
/* .btn and other flex rules outrank the UA [hidden] default — restore it here
   so the flow can stage its confirm / processing / done states. */
.tp [hidden] { display: none !important; }

.tp-brow { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 2px; }
.tp-brow-t {
  font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--text-mute);
}
.tp-brow-b { font-size: 11px; color: var(--text-dim); }

.tp-stage {
  flex: 1; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px;
}
.tp-amt {
  display: flex; align-items: baseline; justify-content: center;
  font-size: 56px; font-weight: 800; letter-spacing: -1.5px; line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: font-size var(--dur) var(--ease-out);
}
.tp-amt.empty { color: var(--text-mute); }
.tp-ch { display: inline-block; }
.tp-sep { color: var(--text-mute); }

.tp-cur {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 7px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px; color: var(--text-dim);
}
.tp-cur b { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.tp-cur i { font-style: normal; color: var(--text-mute); }

.tp-hint {
  margin: 0; min-height: 17px; font-size: 11.5px; line-height: 1.45;
  color: var(--text-mute); text-align: center;
}
.tp-hint.ok { color: var(--text-dim); }
.tp-hint.warn { color: var(--brand-1); }

.tp-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-top: 4px;
}
.tp-key {
  height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06);
  color: var(--text); font-size: 20px; font-weight: 650;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tp-key:active { background: rgba(255, 255, 255, .08); transform: scale(.94); }
.tp-key-x { color: var(--text-dim); }
.tp-key svg { width: 22px; height: 22px; }
.tp-cta { margin-top: 10px; }
/* A disabled CTA is "off", not "broken": neutral surface, never 45% gold mud. */
.tp .btn.accent:disabled,
.wl-flow .btn.accent:disabled { background: var(--bg-hover); color: var(--text-mute); opacity: 1; }

/* Short viewports: the stage compresses (assets.js caps the numeral size to
   match) so the keypad and the Continue button always fit without scrolling. */
@media (max-height: 700px) {
  .tp .tp-s1 { min-height: 0; }
  .tp-stage { min-height: 96px; gap: 9px; }
  .tp-key { height: 48px; }
}

/* Step 2 — payment methods */
.tp-methods { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.tp-method {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 12px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line-soft);
  color: var(--text); text-align: left;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  animation: rowIn .3s var(--ease-out) both;
}
.tp-method + .tp-method { animation-delay: 70ms; }
.tp-method:active { transform: scale(.985); }
.tp-method.on {
  border-color: rgba(247, 166, 0, .4);
  background: linear-gradient(135deg, rgba(247, 166, 0, .07), rgba(255, 255, 255, .02));
}
.tp-m-ic {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.tp-m-ic.card { background: rgba(255, 255, 255, .04); }
.tp-m-ic.card svg { width: 26px; height: auto; }
.tp-m-t { flex: 1; min-width: 0; }
.tp-m-t b { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -.1px; }
.tp-m-t span { display: block; font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.tp-m-go { display: flex; color: var(--accent); }
.tp-method.soon { opacity: .62; }
/* "Soon" is a status, not a brand moment — neutral, no violet. */
.tp-soon {
  flex: 0 0 auto; padding: 4px 9px; border-radius: var(--radius-pill);
  background: var(--bg-hover); color: var(--text-dim);
  border: 1px solid var(--line-soft);
  font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
}

/* Step 3 — the receipt */
.tp-receipt {
  position: relative; margin-top: 2px; padding: 0 14px 14px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;                 /* the perforation notches bite the edges */
  animation: popIn .34s var(--ease-spring) both;
}
.tp-r-stub { display: flex; align-items: center; gap: 10px; padding: 12px 0 11px; }
.tp-r-logo { display: flex; }
.tp-r-brand { flex: 1; min-width: 0; }
.tp-r-brand b { display: block; font-size: 12.5px; font-weight: 750; letter-spacing: -.1px; }
.tp-r-brand span { display: block; font-size: 10.5px; color: var(--text-mute); margin-top: 1px; }
.tp-r-no { font-size: 10.5px; color: var(--text-mute); }

.tp-perf {
  position: relative; height: 0; margin: 0 -14px 13px;
  border-top: 1.5px dashed rgba(255, 255, 255, .13);
}
.tp-perf::before, .tp-perf::after {
  content: ''; position: absolute; top: -7px; width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.tp-perf::before { left: -7px; }
.tp-perf::after { right: -7px; }

.tp-r-amt { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 2px 0 12px; }
.tp-r-amt b {
  font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tp-r-amt span { font-size: 12px; font-weight: 650; color: var(--text-dim); }

.tp-r-rows { display: flex; flex-direction: column; }
.tp-r-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8.5px 0; font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.tp-r-row:first-child { border-top: 0; }
.tp-r-row > span { color: var(--text-mute); }
.tp-r-row > b { display: flex; align-items: center; gap: 7px; font-weight: 650; text-align: right; }
.tp-r-row .wl-net-chip { min-width: 0; padding: 3px 7px; font-size: 9.5px; }
.tp-r-inst { color: var(--brand-1); }
.tp-r-inst span { display: flex; }
.tp-r-new { border-top: 1.5px dashed rgba(255, 255, 255, .13); }
.tp-r-new > b { color: var(--up); font-weight: 700; }
.tp-r-new[hidden] { display: none; }

.tp-seal {
  /* Centred on the big numeral zone, clear of the data rows below. */
  position: absolute; left: 50%; top: 34%;
  transform: translate(-50%, -50%) rotate(-13deg);
  padding: 7px 16px; border-radius: 8px;
  border: 2.5px solid rgba(247, 166, 0, .85);
  outline: 1.5px solid rgba(247, 166, 0, .35); outline-offset: 3px;
  color: var(--brand-1); background: rgba(11, 12, 17, .3);
  font-size: 17px; font-weight: 800; letter-spacing: 3.5px; text-transform: uppercase;
  pointer-events: none;
}
.tp-seal[hidden] { display: none; }
.tp-seal i { font-style: normal; }

.tp-proc {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 6px 0 2px; font-size: 12px; color: var(--text-dim);
}
.tp-proc[hidden] { display: none; }
.tp-ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.tp-ring circle { fill: none; stroke-width: 4; }
.tp-ring-bg { stroke: rgba(255, 255, 255, .08); }
.tp-ring-fg {
  stroke: var(--brand-1); stroke-linecap: round;
  stroke-dasharray: 113.1; stroke-dashoffset: 113.1;
}


/* Reduced motion: kill the decorative loops, keep the layout */
@media (prefers-reduced-motion: reduce) {
  .tp-amt { transition: none; }
  .tp-method, .tp-receipt { animation: none; }
  .wl-tile, .wl-netcard, .wl-dense-r, .wl-cty, .wl-qr-card, .wl-valid { animation: none; }
  .stamp-in { animation: none; }
  .sw-flip { transition: none; }
}

/* =========================================================
   PIN — core/pin.js lock / setup / entry surfaces.
   A first-class full-screen surface on the same graphite
   ground as the splash. The ground is hardcoded dark in both
   themes, so every ink here is literal — no theme tokens.
   ========================================================= */
.pin-lay {
  position: fixed; inset: 0; z-index: 260;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(14px + var(--safe-t)) 22px calc(20px + var(--safe-b));
  background: radial-gradient(130% 100% at 50% -12%, #14161E 0%, #0B0C11 52%, #07080C 100%);
  color: #fff; overflow: hidden;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.pin-lay.out { opacity: 0; transform: scale(1.05); pointer-events: none; }
html.gw-pin-open, html.gw-pin-open body { overflow: hidden; }

/* Same two lights as the splash mesh: one cold above, one warm whisper. */
.pin-mesh { position: absolute; inset: 0; pointer-events: none; }
.pin-mesh::before {
  content: ""; position: absolute; top: -34%; left: 50%; width: 90vmax; height: 60vmax;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 144, 196, .09), transparent 70%);
}
.pin-mesh::after {
  content: ""; position: absolute; top: 44%; left: 50%; width: 46vmax; height: 46vmax;
  transform: translate(-50%, -58%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 166, 0, .05), transparent 68%);
}

.pin-close {
  position: absolute; top: calc(10px + var(--safe-t)); right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .72);
}
.pin-close svg { width: 17px; height: 17px; }

.pin-inner {
  position: relative; z-index: 1; flex: 1; width: 100%; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pin-mark {
  position: relative;
  width: 64px; height: 64px;
  /* Bare glyph — no plate. A faint gold radial behind it keeps the depth. */
}
.pin-mark::before {
  content: ""; position: absolute; inset: -26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 166, 0, .16), transparent 70%);
}
.pin-mark svg { position: relative; width: 100%; height: 100%; display: block; }

.pin-title { margin: 18px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.4px; color: #fff; }
.pin-sub {
  margin: 6px 0 0; max-width: 262px;
  font-size: 12.5px; line-height: 1.45; text-align: center;
  color: rgba(255, 255, 255, .55);
}

.pin-dots { display: flex; gap: 16px; margin: 26px 0 14px; }
.pin-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .3); background: transparent;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.pin-dot.on { background: #fff; border-color: #fff; }
.pin-dot.err { background: #EF454A; border-color: #EF454A; }
.pin-dot.ok { background: #F7A600; border-color: #F7A600; }
.pin-dots.shake { animation: pin-shake .5s var(--ease-out); }
@keyframes pin-shake {
  10%, 50%, 90% { transform: translateX(-7px); }
  30%, 70% { transform: translateX(7px); }
}

.pin-msg { margin: 0; min-height: 18px; font-size: 12px; text-align: center; color: rgba(255, 255, 255, .45); }
.pin-msg.err { color: #FF6B6F; }
.pin-msg.cd { color: #F7A600; font-variant-numeric: tabular-nums; }

.pin-pad {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  width: 100%; max-width: 292px; margin-top: 12px;
  transition: opacity var(--dur) var(--ease-out);
}
.pin-key {
  height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07);
  color: #fff; font-size: 23px; font-weight: 800; letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
/* :active is kept for desktop; .is-down is what actually fires on a phone
   (see the pointer handlers in core/pin.js). The background change is the part
   that must survive reduced motion — it is feedback, not decoration. */
.pin-key:active,
.pin-key.is-down { background: rgba(255, 255, 255, .17); transform: scale(.93); }
.pin-key.ghost { visibility: hidden; }
.pin-key-x { color: rgba(255, 255, 255, .6); }
.pin-key-x svg { width: 24px; height: 24px; }
.pin-pad.locked { opacity: .35; pointer-events: none; }

/* Short viewports: mark and keys compress so the pad never scrolls. */
@media (max-height: 700px) {
  .pin-mark { width: 54px; height: 54px; }
  .pin-title { margin-top: 12px; font-size: 18px; }
  .pin-dots { margin: 18px 0 10px; }
  .pin-key { height: 50px; border-radius: 14px; }
}
/* Narrow devices (320px class): the pad tightens, nothing clips. */
@media (max-width: 340px) {
  .pin-pad { max-width: 256px; gap: 8px; }
  .pin-key { height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .pin-lay { transition: opacity var(--dur) linear; }
  .pin-lay.out { transform: none; }
  .pin-dots.shake { animation: none; }
  /* The key still lights up — only the movement goes. */
  .pin-key:active,
  .pin-key.is-down { transform: none; }
}

/* PIN recovery additions */
.pin-aux {
  display: block; margin: 2px auto 10px;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .55);
}
.pin-aux:active { color: #F7A600; }
.pin-dots.wide { gap: 10px; }
.pin-dots.wide .pin-dot { width: 12px; height: 12px; }

/* ---------------------------------------------------------
   9. Withdrawal gate — the strip under the hero actions and
      the sheet behind it. Same hairline card grammar as the
      status strip (2b): one panel, no stacks, gold reserved
      for the numbers that are still owed.
   --------------------------------------------------------- */
.wal-gate {
  display: block; width: 100%; max-width: 340px; margin: 14px auto 0;
  padding: 10px 12px 11px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: var(--bg-card);
  color: var(--text); text-align: left;
  animation: fadeIn var(--dur) var(--ease-out) both;
}
.wal-gate.open { border-color: rgba(32, 178, 108, .32); background: rgba(32, 178, 108, .07); }

.wal-gate .wg-top { display: flex; align-items: center; gap: 7px; }
.wal-gate .wg-ic { display: flex; flex: 0 0 auto; color: var(--brand-1); }
.wal-gate.open .wg-ic { color: var(--up); }
.wal-gate .wg-top b {
  flex: 1; min-width: 0;
  font-size: 12px; font-weight: 700; letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wal-gate .wg-go { display: flex; flex: 0 0 auto; color: var(--text-mute); }

/* Trading vs withdrawable — the split the whole gate exists to make legible. */
.wal-gate .wg-bals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px;
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}
.wal-gate .wg-bal { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wal-gate .wg-bal i {
  font-style: normal; font-size: 10px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; color: var(--text-mute);
}
.wal-gate .wg-bal b {
  font-size: 14px; font-weight: 700; letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wal-gate .wg-bal:last-child b { color: var(--text-dim); }
.wal-gate.open .wg-bal:last-child b { color: var(--up); }

/* The two conditions, side by side, each with its own hairline meter. */
.wal-gate .wg-conds {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 10px;
}
.wal-gate .wg-cond {
  display: block; min-width: 0;
  padding: 7px 8px; border-radius: 9px;
  background: var(--bg-sunk);
}
.wal-gate .wg-cond i { display: block; font-style: normal; }
.wal-gate .wg-c-l {
  font-size: 9.5px; font-weight: 650; letter-spacing: .7px;
  text-transform: uppercase; color: var(--text-mute);
}
.wal-gate .wg-c-v {
  margin-top: 2px; font-size: 11px; font-weight: 650; color: var(--brand-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wal-gate .wg-cond.met .wg-c-v { color: var(--up); }
.wal-gate .wg-c-bar {
  height: 3px; margin-top: 6px; border-radius: 2px;
  background: var(--bg-hover); overflow: hidden;
}
.wal-gate .wg-c-bar > b {
  display: block; height: 100%; border-radius: 2px;
  background: var(--brand-1);
  transition: width .7s var(--ease-out);
}
.wal-gate .wg-cond.met .wg-c-bar > b { background: var(--up); }

/* Narrow phones: the pairs stack rather than truncating their numbers. */
@media (max-width: 340px) {
  .wal-gate .wg-bals, .wal-gate .wg-conds { grid-template-columns: 1fr; }
}

/* ---- the explanation sheet ---- */
.wgs { padding: 2px 0 4px; }
.wgs-lede {
  margin: 0 0 14px;
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
}
.wgs-bals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.wgs-bals > div {
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--ov-hairline, var(--line-soft));
  background: var(--bg-sunk);
}
.wgs-bals span {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; color: var(--text-mute);
}
.wgs-bals b {
  display: block; margin-top: 4px;
  font-size: 15px; font-weight: 700; letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}
.wgs-bals > div:last-child b { color: var(--text-dim); }

.wgs-steps { display: flex; flex-direction: column; gap: 14px; }
.wgs-step { display: flex; align-items: flex-start; gap: 11px; }
.wgs-n {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  border: 1px solid rgba(247, 166, 0, .40);
  font-size: 11px; font-weight: 700; color: var(--brand-1);
}
.wgs-n svg { width: 13px; height: 13px; }
.wgs-step.met .wgs-n {
  border-color: rgba(32, 178, 108, .45); color: var(--up);
}
.wgs-s-main { flex: 1; min-width: 0; display: block; }
.wgs-s-main > b {
  display: block; font-size: 13.5px; font-weight: 650; letter-spacing: -.1px;
}
.wgs-s-d {
  display: block; margin-top: 3px;
  font-size: 12px; font-weight: 600; color: var(--brand-1);
  font-variant-numeric: tabular-nums;
}
.wgs-step.met .wgs-s-d { color: var(--up); }
.wgs-bar {
  display: block; height: 3px; margin-top: 8px; border-radius: 2px;
  background: var(--bg-hover); overflow: hidden;
}
.wgs-bar > i {
  display: block; height: 100%; border-radius: 2px;
  background: var(--brand-1);
  transition: width .8s var(--ease-out);
}
.wgs-step.met .wgs-bar > i { background: var(--up); }
.wgs-s-h {
  display: block; margin-top: 7px;
  font-size: 11.5px; line-height: 1.45; color: var(--text-mute);
}
.wgs-note {
  margin: 18px 0 16px;
  font-size: 11.5px; line-height: 1.5; color: var(--text-mute);
}

/* ---------------------------------------------------------
   Pull to refresh
   The gesture translates .assets-view itself, so the indicator
   is parked just above the fold and the pull is what reveals
   it. Clipping is free: #view is the scroller, and anything
   above its scroll origin is already out of sight.
   --------------------------------------------------------- */
.assets-view { position: relative; }

.ptr {
  position: absolute; top: -44px; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  will-change: opacity;
}
/* Reduced motion: nothing travels, so the indicator sits in view by itself. */
.ptr.static { top: 6px; opacity: 1; }

.ptr-ring {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--brand-1);
  background: rgba(24, 25, 32, .94);
  border: 1px solid rgba(247, 166, 0, .26);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  will-change: transform;
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.ptr-ring svg { display: block; width: 18px; height: 18px; }

/* Past the trigger the ring lights up: releasing now is an obvious commit. */
.ptr.ready .ptr-ring {
  border-color: rgba(247, 166, 0, .70);
  background: var(--brand-1-soft);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45), 0 0 18px -4px var(--brand-1);
}

/* Refreshing: the rotation the finger was writing is handed to a steady spin. */
.ptr.busy .ptr-ring { border-color: rgba(247, 166, 0, .55); }
.ptr.busy .ptr-ring svg { animation: spin .85s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  /* The spinner stays — it is the only sign the refresh is running — but slower. */
  .ptr.busy .ptr-ring svg { animation-duration: 1.7s; }
}
