:root {
  --bg: #eef4f4;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-light: #ccfbf1;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 12% -10%, #d7f5ee 0%, transparent 60%),
    radial-gradient(700px 420px at 110% 10%, #e0ecff 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.24);
}

.pill {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.55;
}

.banner[data-tone="error"] {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.amount-card {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #ecfdf5;
  background:
    radial-gradient(420px 220px at 110% -20%, rgba(45, 212, 191, 0.5), transparent 70%),
    linear-gradient(150deg, #0b1220 0%, #123f3b 60%, #0f766e 100%);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.28);
}

.amount-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #99f6e4;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f0fdfa;
  font-size: 12px;
  font-weight: 600;
}

.network-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
  display: block;
}

.amount-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.amount-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.amount-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 24px;
  font-weight: 600;
}

.amount-input:hover:not(:read-only),
.amount-input:focus {
  border-color: #5eead4;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
}

.amount-input:read-only {
  opacity: 0.78;
  cursor: default;
}

.symbol {
  font-size: 18px;
  font-weight: 700;
  color: #99f6e4;
}

.order-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #a7f3d0;
}

.order-line code {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ecfdf5;
  font-size: 12px;
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #d1fae5;
}

.notice-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.16);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.chain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chain {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.chain:hover:not(:disabled) {
  border-color: #99f6e4;
}

.chain.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.chain:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.chain-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.chain-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-tron {
  background: #eb0029;
}

.icon-ethereum {
  background: #627eea;
}

.icon-bsc {
  background: #f0b90b;
  color: #1e2329;
}

.icon-polygon {
  background: #8247e5;
}

.icon-base {
  background: #0052ff;
}

.chain-info {
  min-width: 0;
}

.chain-info strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.chain-info small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check {
  margin-left: auto;
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
}

.chain.selected .check {
  opacity: 1;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token {
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.token.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

.notice strong {
  font-weight: 700;
}

.primary {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.24);
  transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.hint.error {
  color: var(--danger);
}

.wallet-detect-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wallet-detect-pill.has-detected {
  background: #dcfce7;
  color: #166534;
}

.wallet-detect-pill.restricted {
  background: #fef3c7;
  color: #92400e;
}

.wallet-detect-hint {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.wallet-detect-hint.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.wallet-detect-hint.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.wallet-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.wallet:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.wallet.wallet-detected {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.wallet.wallet-opened {
  border-color: #5eead4;
  background: #f0fdfa;
}

.wallet.wallet-failed {
  opacity: 0.72;
  background: #f8fafc;
}

.wallet-logo {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  display: block;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.wallet-meta {
  min-width: 0;
  flex: 1;
}

.wallet-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.wallet-tag {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

.wallet.wallet-detected .wallet-tag {
  color: #15803d;
  font-weight: 600;
}

.wallet.wallet-opened .wallet-tag {
  color: var(--accent);
  font-weight: 600;
}

.wallet.wallet-failed .wallet-tag {
  color: #b45309;
}

.wallet-foot-actions {
  display: flex;
  gap: 8px;
}

.wallet-foot-actions .ghost {
  margin-top: 0;
}

.ghost-subtle {
  flex: 0 0 auto;
  width: auto;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 440px) {
  .wallet-list {
    grid-template-columns: 1fr;
  }
}

.ghost {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ghost:hover:not(:disabled) {
  border-color: #99f6e4;
}

.ghost:disabled {
  opacity: 0.6;
  cursor: default;
}

.status {
  text-align: center;
}

.status-icon {
  width: 54px;
  height: 54px;
  margin: 2px auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 22px;
  font-weight: 800;
}

.status-icon.working {
  background: #e0f2fe;
  color: transparent;
  border: 3px solid #bae6fd;
  border-top-color: #0ea5e9;
  animation: spin 0.9s linear infinite;
}

.status-icon.ok {
  background: #dcfce7;
  color: var(--ok);
}

.status-icon.err {
  background: #fee2e2;
  color: var(--danger);
}

.status h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.status .muted {
  margin: 0 auto;
  max-width: 420px;
  line-height: 1.65;
}

.tx {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
}

.tx span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.tx code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
}

.tx a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.copy-helper {
  position: fixed;
  left: -9999px;
  top: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 440px) {
  .shell {
    padding: 14px 12px 36px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .amount-input {
    font-size: 32px;
    padding: 6px 10px;
  }

  .chain-list {
    grid-template-columns: 1fr;
  }

  .wallet-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 地址管理后台 */
.admin-gate {
  max-width: 480px;
  margin: 48px auto;
}

.admin-gate h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.admin-gate .primary {
  width: 100%;
}

.admin-chains {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.admin-chain {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.admin-chain-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-chain-head strong {
  font-size: 15px;
}

.admin-chain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-chain-grid .field {
  margin-bottom: 0;
}

.admin-chain-grid input {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
}

.admin-reason {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.admin-actions .primary {
  width: auto;
  min-width: 140px;
}

@media (max-width: 560px) {
  .admin-chain-grid {
    grid-template-columns: 1fr;
  }
}

.topbar .button.ghost {
  width: auto;
  min-height: 0;
  flex: none;
  padding: 7px 12px;
}

.admin-chain-grid {
  grid-template-columns: 1fr;
}

/* 电脑端手机扫码卡片 */
.qr-toggle {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qr-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.qr-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  margin: 4px auto 12px;
  width: fit-content;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.qr-img {
  display: block;
  width: 212px;
  height: 212px;
  image-rendering: pixelated;
}

.qr-tip {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.qr-poll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
}

.qr-poll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
}

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

.qr-actions .ghost {
  margin-top: 0;
}

.qr-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #f1f5f9;
}

.qr-mode-btn {
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.qr-mode-btn.selected {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.wc-pairing-panel {
  margin: 4px 0 12px;
  padding: 14px;
  border: 1.5px solid #99f6e4;
  border-radius: 14px;
  background: #f0fdfa;
}

.wc-pairing-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.wc-pairing-head strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.wc-pairing-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.wc-pairing-actions,
.wake-actions {
  display: grid;
  gap: 8px;
}

.wake-actions {
  margin-top: 14px;
}

.wc-pairing-actions .primary,
.wake-actions .primary {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
}

/* ---------- 钱包原生风格交易详情回执页 ---------- */
body.txr-lock-scroll {
  overflow: hidden;
}

.receipt-reopen-btn {
  margin-top: 14px;
}

.txr-overlay {
  --txr-bg: #000000;
  --txr-card: #141416;
  --txr-pill: #1f2024;
  --txr-border: rgba(255, 255, 255, 0.08);
  --txr-ink: #f8fafc;
  --txr-muted: #8e9299;
  --txr-accent: #25c26e;
  --txr-accent-soft: rgba(37, 194, 110, 0.16);
  --txr-btn-bg: #ffffff;
  --txr-btn-ink: #0f172a;
  --txr-icon-bg: rgba(255, 255, 255, 0.06);

  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 13, 22, 0.68);
  backdrop-filter: blur(8px);
}

.txr-overlay[hidden] {
  display: none;
}

.txr-overlay[data-wallet-theme="bitget"] {
  --txr-bg: #0b0e14;
  --txr-card: #151922;
  --txr-pill: #1e2431;
  --txr-accent: #00d2c8;
  --txr-accent-soft: rgba(0, 210, 200, 0.16);
  --txr-btn-bg: #00d2c8;
  --txr-btn-ink: #062126;
}

.txr-overlay[data-wallet-theme="phantom"],
.txr-overlay[data-wallet-theme="safepal"] {
  --txr-bg: #111018;
  --txr-card: #1c1b27;
  --txr-pill: #262534;
  --txr-accent: #34d399;
  --txr-accent-soft: rgba(52, 211, 153, 0.16);
  --txr-btn-bg: #ab9ff2;
  --txr-btn-ink: #17122b;
}

.txr-overlay[data-wallet-theme="tokenpocket"] {
  --txr-bg: #f4f6fa;
  --txr-card: #ffffff;
  --txr-pill: #f1f4f9;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #111827;
  --txr-muted: #6b7280;
  --txr-accent: #00b876;
  --txr-accent-soft: rgba(0, 184, 118, 0.14);
  --txr-btn-bg: #2980fe;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

.txr-overlay[data-wallet-theme="tronlink"] {
  --txr-bg: #f3f5f9;
  --txr-card: #ffffff;
  --txr-pill: #eef2f8;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #111827;
  --txr-muted: #64748b;
  --txr-accent: #10b981;
  --txr-accent-soft: rgba(16, 185, 129, 0.14);
  --txr-btn-bg: #2c56dd;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

.txr-overlay[data-wallet-theme="metamask"] {
  --txr-bg: #f8f9fb;
  --txr-card: #ffffff;
  --txr-pill: #f2f4f7;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #141619;
  --txr-muted: #6a737d;
  --txr-accent: #1d9a6c;
  --txr-accent-soft: rgba(29, 154, 108, 0.14);
  --txr-btn-bg: #037dd6;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

.txr-overlay[data-wallet-theme="trust"] {
  --txr-bg: #f6f7f9;
  --txr-card: #ffffff;
  --txr-pill: #eef2f7;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #111827;
  --txr-muted: #64748b;
  --txr-accent: #0db564;
  --txr-accent-soft: rgba(13, 181, 100, 0.14);
  --txr-btn-bg: #0500ff;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

.txr-overlay[data-wallet-theme="imtoken"] {
  --txr-bg: #f5f7fa;
  --txr-card: #ffffff;
  --txr-pill: #eff3f8;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #0f172a;
  --txr-muted: #64748b;
  --txr-accent: #0ea5e9;
  --txr-accent-soft: rgba(14, 165, 233, 0.14);
  --txr-btn-bg: #0ea5e9;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

.txr-overlay[data-wallet-theme="coinbase"] {
  --txr-bg: #f5f7fb;
  --txr-card: #ffffff;
  --txr-pill: #eef2f7;
  --txr-border: rgba(15, 23, 42, 0.08);
  --txr-ink: #0a0b0d;
  --txr-muted: #5b616e;
  --txr-accent: #098551;
  --txr-accent-soft: rgba(9, 133, 81, 0.14);
  --txr-btn-bg: #0052ff;
  --txr-btn-ink: #ffffff;
  --txr-icon-bg: rgba(15, 23, 42, 0.05);
}

@media (prefers-color-scheme: dark) {
  .txr-overlay[data-wallet-theme="tokenpocket"],
  .txr-overlay[data-wallet-theme="tronlink"],
  .txr-overlay[data-wallet-theme="metamask"],
  .txr-overlay[data-wallet-theme="trust"],
  .txr-overlay[data-wallet-theme="imtoken"],
  .txr-overlay[data-wallet-theme="coinbase"] {
    --txr-bg: #0b0e14;
    --txr-card: #151821;
    --txr-pill: #1f2430;
    --txr-border: rgba(255, 255, 255, 0.08);
    --txr-ink: #f8fafc;
    --txr-muted: #94a3b8;
    --txr-icon-bg: rgba(255, 255, 255, 0.06);
  }
}

.txr-sheet {
  width: 100%;
  max-width: 440px;
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: var(--txr-bg);
  color: var(--txr-ink);
  border: 1px solid var(--txr-border);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans SC", sans-serif;
}

.txr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}

.txr-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--txr-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.txr-icon-btn:hover {
  background: var(--txr-icon-bg);
}

.txr-icon-btn[hidden],
.txr-explorer-link[hidden] {
  display: none;
}

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

.txr-nav-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--txr-ink);
}

.txr-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 16px 16px;
}

.txr-hero {
  text-align: center;
  padding: 12px 8px 18px;
}

.txr-check-badge {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txr-accent);
}

.txr-check-svg {
  width: 34px;
  height: 34px;
}

.txr-status-text {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--txr-accent);
}

.txr-time-text {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--txr-muted);
}

.txr-section-label {
  margin: 14px 2px 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txr-muted);
}

.txr-card {
  background: var(--txr-card);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--txr-border);
}

.txr-account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--txr-pill);
}

.txr-account-pill.is-to {
  flex: 1 1 auto;
  min-width: 0;
}

.txr-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.txr-avatar.is-from {
  background: var(--txr-accent-soft);
  color: var(--txr-accent);
}

.txr-avatar.is-to {
  background: rgba(148, 163, 184, 0.16);
  color: var(--txr-muted);
}

.txr-avatar svg {
  width: 19px;
  height: 19px;
}

.txr-pill-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.txr-pill-sub {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--txr-muted);
}

.txr-pill-addr {
  margin-top: 2px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--txr-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.txr-send-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 4px;
}

.txr-send-lbl {
  min-width: 32px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--txr-muted);
  flex-shrink: 0;
}

.txr-send-val {
  font-size: 17px;
  font-weight: 600;
  color: var(--txr-ink);
  font-variant-numeric: tabular-nums;
}

.txr-to-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.txr-to-lbl {
  min-width: 32px;
  padding-left: 4px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--txr-muted);
  flex-shrink: 0;
}

.txr-transfers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.txr-transfer-block + .txr-transfer-block {
  padding-top: 14px;
  border-top: 1px solid var(--txr-border);
}

.txr-tr-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.txr-tr-addr {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txr-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.txr-tr-tag {
  font-size: 12.5px;
  color: var(--txr-muted);
}

.txr-tr-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.txr-tr-token {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.txr-token-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.txr-token-sym {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--txr-ink);
}

.txr-delta-out {
  font-size: 15px;
  font-weight: 600;
  color: var(--txr-ink);
  font-variant-numeric: tabular-nums;
}

.txr-delta-in {
  font-size: 15px;
  font-weight: 600;
  color: var(--txr-accent);
  font-variant-numeric: tabular-nums;
}

.txr-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.txr-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.txr-detail-row[hidden] {
  display: none;
}

.txr-detail-lbl {
  width: 68px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--txr-muted);
}

.txr-detail-val {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--txr-ink);
}

.txr-net-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.txr-chain-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.txr-copy-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.txr-mono-wrap {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  color: var(--txr-ink);
}

.txr-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--txr-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.txr-copy-btn:hover {
  color: var(--txr-ink);
}

.txr-copy-btn.is-copied {
  color: var(--txr-accent);
}

.txr-copy-btn.is-copied::after {
  content: "已复制";
  font-size: 11px;
  font-weight: 600;
}

.txr-copy-btn svg {
  width: 15px;
  height: 15px;
}

.txr-initiator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--txr-muted);
}

.txr-mini-avatar {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--txr-accent-soft);
  color: var(--txr-accent);
}

.txr-mini-avatar svg {
  width: 11px;
  height: 11px;
}

.txr-explorer-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txr-accent);
  text-decoration: none;
}

.txr-explorer-link:hover {
  text-decoration: underline;
}

.txr-footer {
  padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--txr-border);
  background: var(--txr-bg);
  flex-shrink: 0;
}

.txr-done-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--txr-btn-bg);
  color: var(--txr-btn-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.txr-done-btn:hover {
  opacity: 0.92;
}

@media (max-width: 520px) {
  .txr-overlay {
    padding: 0;
    background: var(--txr-bg);
    backdrop-filter: none;
  }

  .txr-sheet {
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .txr-topbar {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.noscript-tip {
  text-align: center;
  padding: 24px;
}
