:root {
    color-scheme: dark;
    --bg: #0c1018;
    --panel: #151b27;
    --border: #293243;
    --text: #edf0f8;
    --muted: #919db4;
    --brand: #a6b2ff;
    --mint: #70ddc6;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.app-shell { width: min(100%, 480px); margin: 0 auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 14px 22px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 1px solid transparent; border-radius: 12px; padding: 11px 18px; font-weight: 600; font-size: 16px; transition: background .15s; }
.wallet-button { min-height: 42px; padding: 8px 13px; border: 1px solid #374269; background: #252e4b; color: #c8cfff; font-size: 13px; }
.primary-button { width: 100%; background: #a0adff; color: #131a38; }
.primary-button:hover:not(:disabled) { background: #b3bdff; }
.secondary-button { width: 100%; border-color: var(--border); color: #c7d0e5; background: #1c2535; }
.text-button { min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
main { padding: 4px 18px 16px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 2px 24px; }
h1 { margin: 0 0 4px; font-size: 29px; letter-spacing: -.7px; font-weight: 650; line-height: 1.35; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.network { color: #a3afc5; font-size: 10px; white-space: nowrap; }
.dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #eac573; margin-right: 5px; vertical-align: 2px; }
.panel { border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.form-panel { padding: 21px 20px 16px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-label { font-size: 13px; color: #c4cee0; }
.permission { font-size: 10px; color: var(--muted); }
.permission.allowed { color: var(--mint); }
.source-tabs { display: flex; gap: 10px; margin: 11px 0 21px; }
.source { display: flex; align-items: center; gap: 8px; flex: 1; min-height: 50px; padding: 11px 12px; background: #101620; color: #b9c4d8; border: 1px solid #323d51; border-radius: 12px; font-size: 16px; }
.source.active { color: #edf0ff; background: #8595ff13; border-color: #8d9dff; }
.mini-token { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; font-size: 13px; font-weight: 700; }
.mini-token.gpc { color: #a5b1ff; background: #8797ff26; }
.mini-token.bnb { color: #e9c270; background: #edc47022; }
.mini-token.xdk { color: var(--mint); background: #70ddc620; }
.tab-check { margin-left: auto; color: #b0bbff; visibility: hidden; font-size: 13px; }
.source.active .tab-check { visibility: visible; }
.amount-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -6px; }
.max-button { min-width: 48px; min-height: 44px; padding: 7px 10px; border: 0; border-radius: 9px; color: #bec7ff; background: #8797ff14; font-size: 13px; }
.max-button:hover:not(:disabled) { background: #8797ff28; }
.amount-input { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 13px 14px; background: #0d131f; border: 1px solid #354159; border-radius: 12px; }
.amount-input:focus-within { border-color: #a0adff; }
.amount-input input { min-width: 0; width: 100%; height: 38px; border: 0; background: transparent; outline: none; font-size: 30px; color: var(--text); font-variant-numeric: tabular-nums; }
.amount-input input::placeholder { color: #5d6b86; }
.amount-input > span { color: #c4cde1; font-size: 13px; }
.available { margin: 7px 1px 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.destination { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 18px 1px; }
.destination-arrow { color: #9ba8c5; margin: 0 6px; font-size: 20px; }
.destination .mini-token { margin-left: auto; }
.destination strong { color: #dae2f2; font-size: 14px; font-weight: 500; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.chevron { display: inline-block; color: #8c9ab5; font-size: 18px; line-height: 1; transition: transform .15s; }
details[open] > summary .chevron { transform: rotate(180deg); }
.disclosure-inner > summary { min-height: 46px; color: var(--muted); font-size: 12px; }
.settings { border-top: 1px solid #2a3447; margin-bottom: 12px; }
.summary-end { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.settings-body { padding-bottom: 14px; }
.slippage-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slippage-input { display: flex; align-items: center; gap: 5px; border: 1px solid #3a4761; background: #101622; border-radius: 9px; width: 90px; padding: 7px 11px; }
.slippage-input input { min-width: 0; width: 100%; border: 0; background: none; color: var(--text); outline: none; text-align: right; font-size: 16px; }
.slippage-input span { color: var(--muted); }
#slippage-help { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.form-footnote { color: #8996b0; font-size: 10px; text-align: center; margin: 10px 0 0; }
.quote-panel { padding: 21px 20px 8px; margin-top: 14px; scroll-margin-top: 16px; }
.quote-heading { display: flex; align-items: center; justify-content: space-between; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.simulated-tag { font-size: 10px; color: var(--mint); }
.quote-net { display: flex; align-items: baseline; gap: 9px; margin: 12px 0 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quote-net > span:first-child { min-width: 0; font-size: 34px; font-weight: 600; letter-spacing: -.8px; line-height: 1.3; }
.quote-net > span:last-child { font-size: 13px; color: var(--muted); }
dl { margin: 0; }
dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
dt { color: var(--muted); font-size: 12px; flex-shrink: 0; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.quote-key { border-top: 1px solid #2d374b; padding: 13px 0 0; }
.quote-key dd { color: var(--mint); font-size: 13px; }
.quote-note { color: var(--muted); font-size: 11px; margin: 9px 0 17px; }
.quote-note.warning { color: #efc77b; background: #efc77b12; border: 1px solid #705b37; border-radius: 9px; padding: 10px; }
.quote-more { margin-top: 8px; }
.quote-details > div { margin: 9px 0; }
.call-details { font-size: 11px; color: var(--muted); margin: 12px 0; }
.call-details > summary { min-height: 44px; }
.call-details pre { padding: 10px; background: #0f1520; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; max-height: 190px; overflow-y: auto; }
.secondary-sections { display: grid; gap: 10px; margin-top: 18px; }
.disclosure { border-radius: 13px; background: #101620; }
.disclosure > summary { min-height: 54px; padding: 12px 17px; font-size: 13px; color: #c1cbde; }
.disclosure-title { display: flex; align-items: center; gap: 11px; }
.section-icon { font-size: 18px; color: #8d9bbc; width: 18px; text-align: center; }
.disclosure-body { border-top: 1px solid #263043; padding: 0 16px 12px; }
.asset-card { padding: 17px 0 13px; }
.asset-card + .asset-card { border-top: 1px solid #263043; }
.asset-heading { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.asset-heading strong { font-weight: 500; }
.asset-value { margin-left: auto; text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.asset-card dl { padding: 10px 0 0 31px; }
.asset-card dl > div + div { margin-top: 4px; }
.asset-card dt, .asset-card dd { font-size: 11px; }
.balance-footer, .history-heading, .history-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.balance-footer { border-top: 1px solid #263043; color: var(--muted); font-size: 10px; padding-top: 5px; }
.history-heading { font-size: 11px; }
.history-empty { text-align: center; font-size: 12px; color: var(--muted); padding: 22px 0; }
.history-footer { font-size: 10px; color: var(--muted); }
table, tbody { display: block; width: 100%; }
thead { display: none; }
tr { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; padding: 13px 0; border-bottom: 1px solid #293346; }
td { padding: 0; font-size: 12px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; min-width: 0; }
td::before { display: block; content: attr(data-label); font-size: 10px; color: var(--muted); margin-bottom: 2px; }
td:nth-child(1) { grid-column: 1; font-weight: 600; }
td:nth-child(1)::before { display: none; }
td:nth-child(2) { grid-column: 1; grid-row: 2; }
td:nth-child(3) { grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: right; color: var(--mint); }
td:nth-child(4) { display: none; }
td:nth-child(5) { grid-column: 1 / 3; text-align: right; color: var(--brand); font-size: 11px; }
td:nth-child(5)::before { display: none; }
.wallet-help p { color: var(--muted); font-size: 12px; margin: 13px 0; }
.wallet-help .button { min-height: 44px; font-size: 13px; }
.settlement-note { text-align: center; color: #7c8aa4; font-size: 10px; margin: 21px 0 7px; }
.footer { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; color: #8693ad; font-size: 11px; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }
.notice { padding: 12px 14px; margin-bottom: 14px; border: 1px solid #3c4c7c; background: #8294ff0e; border-radius: 12px; color: #c4ceee; font-size: 12px; overflow-wrap: anywhere; }
.notice.error { border-color: #74404c; color: #ffb0b9; background: #ff80950c; }
.notice.success { border-color: #326c61; color: #a2dece; background: #70ddc60a; }
.notice a { color: var(--brand); text-decoration: underline; }
.loading { color: #53617a; }
dialog { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 23px 21px 20px; color: var(--text); background: #161e2c; border: 1px solid #3d4964; border-radius: 22px; box-shadow: 0 20px 80px #0009; }
dialog::backdrop { background: #060910cc; backdrop-filter: blur(4px); }
.modal-top { display: flex; align-items: center; justify-content: space-between; }
.modal-top h2 { font-size: 20px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: #a0aec6; font-size: 28px; margin: -9px -9px -9px 0; }
.modal-subtitle { color: var(--muted); font-size: 12px; margin: 7px 0 18px; }
.modal-details > div { padding: 10px 0; }
.modal-details dd { font-size: 13px; }
.modal-details > div:nth-child(3) dd { color: var(--mint); }
.modal-note { color: var(--muted); font-size: 11px; margin: 14px 0 20px; }
.modal-buttons { display: grid; gap: 9px; }
@media (min-width: 600px) { .app-shell { margin-top: 32px; } }
@media (max-width: 350px) { main { padding-left: 12px; padding-right: 12px; } .topbar { padding-left: 16px; padding-right: 16px; } .form-panel, .quote-panel { padding-left: 16px; padding-right: 16px; } h1 { font-size: 26px; } .permission { font-size: 9px; } .asset-value { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
