:root {
  color-scheme: dark;
  --surface: #12121d;
  --panel: #1c1b2a;
  --line: #343345;
  --text: #f7f5ff;
  --muted: #b6b0c7;
  --accent: #7659ff;
  --green: #8ce6b1;
  font: 16px/1.46 ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: #101019; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #ac99ff; outline-offset: 3px;
}
.shell { max-width: 480px; margin: 0 auto; min-height: 100svh; padding: 26px 15px max(23px, env(safe-area-inset-bottom)); background: #11111b; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 7px; font-size: clamp(18px, 5.5vw, 26px); font-weight: 780; letter-spacing: -.045em; white-space: nowrap; color: #e1d9ff; }
.brand-mark { width: 35px; height: 39px; overflow: hidden; position: relative; flex-shrink: 0; }
.brand-mark img { position: absolute; top: 50%; left: -9px; width: 202px; max-width: none; transform: translateY(-50%); }
.network { flex-shrink: 0; border: 1px solid #413c57; padding: 4px 8px; font-size: clamp(9px, 2.9vw, 12px); border-radius: 11px; background: #1b192a; }
.balance-card { min-height: 159px; padding: 19px 23px 22px; border-radius: 17px; background: radial-gradient(ellipse at bottom right, #6640f4 0%, transparent 60%), linear-gradient(142deg, #381a93, #24135d 70%); }
.select-wrap { position: relative; display: inline-flex; max-width: 100%; }
.select-wrap select { border: 0; appearance: none; background: transparent; padding: 0 20px 0 0; min-height: 29px; width: 100%; font-size: 18px; font-weight: 680; }
.select-wrap option { background: var(--panel); color: var(--text); }
.select-arrow { position: absolute; right: 0; top: 7px; pointer-events: none; width: 13px !important; height: 13px !important; }
.balance-main { margin-top: 9px; font-size: clamp(25px, 9vw, 42px); line-height: 1.18; font-weight: 800; letter-spacing: -.035em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.balance-main span { white-space: nowrap; font-size: .8em; }
.balance-secondary { margin-top: 8px; color: #dfd6fc; font-size: 19px; font-variant-numeric: tabular-nums; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0 30px; }
.quick-actions button { min-height: 95px; display: grid; align-content: center; justify-items: center; gap: 7px; padding: 10px 4px; border: 0; border-radius: 16px; background: #211f31; font-weight: 650; }
.quick-actions button:hover, .icon-button:hover { background-color: #302a45; }
.icon { width: 22px; height: 22px; filter: invert(94%) sepia(15%) saturate(535%) hue-rotate(199deg); }
.quick-actions .icon { width: 29px; height: 29px; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
.activity h1 { font-size: 21px; margin: 0 5px 14px; }
.activity-list { background: #1b1a28; padding: 0 14px; border: 1px solid #292638; border-radius: 16px; }
.activity-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 74px; padding: 6px 0; border: 0; background: transparent; text-align: left; }
.activity-row:hover { background: #252337; }
.activity-row + .activity-row { border-top: 1px solid var(--line); }
.activity-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; background: #42366d; border-radius: 9px; }
.activity-label { min-width: 0; font-size: 16px; font-weight: 650; }
.activity-meta { display: block; font-size: 12px; color: var(--muted); font-weight: 450; margin-top: 3px; }
.activity-value { margin-left: auto; text-align: right; font-size: 15px; font-weight: 650; max-width: 55%; overflow-wrap: anywhere; }
.activity-chevron { width: 13px; height: 13px; flex-shrink: 0; transform: rotate(-90deg); opacity: .65; }
.status { display: table; margin: 2px 0 0 auto; color: #d3baff; background: #332459; border-radius: 8px; padding: 1px 6px; font-size: 11px; }
.status.confirmed { color: var(--green); background: #193d35; }
.status.blocked, .status.failed { color: #ffc0c9; background: #51283b; }
.empty { padding: 16px 0; color: var(--muted); }
.wallet-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; margin: 18px 0; }
.wallet-footer div { display: flex; gap: 12px; }
.gate { max-width: 375px; margin: 68px auto 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.gate h1 { font-size: 26px; margin-bottom: 17px; }
form, [data-panel="receive"] { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
input, select { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #59536d; border-radius: 9px; color: var(--text); background: #232235; font-size: 16px; min-height: 46px; }
input::placeholder { color: #b4aec5; }
.primary { width: 100%; min-height: 51px; border: 0; border-radius: 12px; font-size: 17px; font-weight: 730; background: #6245ee; color: white; }
.primary:hover { background: #7257ff; }
.text-button { color: #c8b8ff; border: 0; background: transparent; padding: 5px 2px; text-underline-offset: 3px; }
.text-button:hover { text-decoration: underline; }
.notice { margin: 0; color: var(--green); font-size: 13px; overflow-wrap: anywhere; }
.notice.error { color: #ffafb8; }
.notice:empty { display: none; }
#dashboard-message:not(:empty) { margin: -16px 3px 18px; }
dialog { position: fixed; inset: auto 0 0; border: 1px solid #39364c; border-bottom: 0; border-radius: 20px 20px 0 0; background: #1d1c2d; color: var(--text); margin: 0 auto; width: min(100%, 480px); max-width: none; max-height: min(92dvh, 780px); padding: 15px 19px max(21px, env(safe-area-inset-bottom)); overflow-y: auto; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: rgb(8 8 17 / 65%); }
.sheet-handle { height: 4px; width: 47px; margin: 0 auto 15px; border-radius: 3px; background: #514b67; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sheet-header h2 { font-size: 22px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; color: inherit; border: 0; background: transparent; border-radius: 7px; }
.icon-button .icon { width: 19px; height: 19px; }
.confirm-amount { margin: 0; font-size: clamp(28px, 9vw, 40px); letter-spacing: -.04em; font-weight: 780; overflow-wrap: anywhere; }
.details { margin: 0; border: 1px solid #3a364d; background: #242336; border-radius: 12px; padding: 3px 11px; font-size: 14px; }
.details div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; }
.details div + div { border-top: 1px solid var(--line); }
.details dt { color: var(--muted); flex-shrink: 0; }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.details .address-row { display: block; }
.details .address-row dd { text-align: left; margin-top: 4px; font: 13px/1.6 ui-monospace, monospace; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 46px; }
.password-field button { position: absolute; right: 3px; top: 3px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
#sheet-message:not(:empty) { margin-top: 12px; }
.qr-space { min-height: 157px; display: grid; place-items: center; margin: 0; }
.qr-space img { width: 153px; height: 153px; image-rendering: pixelated; border-radius: 8px; background: white; }
.receipt { overflow-wrap: anywhere; font-size: 14px; }
.receipt p { margin: 4px 0; }
.transaction-detail { display: grid; gap: 13px; }
.detail-amount { font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.detail-actions:has(button:not([hidden])) { min-height: 34px; }
.detail-transfers { margin: 9px 0 0; }
.detail-transfers + .detail-transfers { margin-top: 9px; }
@media (max-width: 340px) { .shell { padding-inline: 11px; } .brand-mark { width: 31px; } .balance-card { padding-inline: 17px; } }
@media (min-width: 700px) { body { background: #0c0c14; } .shell { border-inline: 1px solid #211d30; padding-top: 36px; } }
