:root {
  --bg0: #0f1419;
  --bg1: #1a222c;
  --line: #2a3542;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9a6a;
  --accent-dim: #2d7350;
  --warn: #c9a227;
  --danger: #c45c5c;
  --card: #151c24;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 20% -10%, #1c2a24 0%, var(--bg0) 55%);
  color: var(--text);
  font-family: var(--font);
}

.network-banner {
  background: #5c4a12;
  color: #ffe9a8;
  text-align: center;
  padding: 8px 12px;
  font-size: .88rem;
  font-weight: 600;
  border-bottom: 1px solid #8a7020;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.brand {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  font-size: 1.55rem;
  font-weight: 650;
  margin: 0 0 8px;
  line-height: 1.3;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 22px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
/* 否则 .row 的 display:flex 会盖掉 HTML hidden，导致「余额门槛」关了仍显示 */
[hidden] { display: none !important; }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); flex-shrink: 0; }
.row .v {
  text-align: right;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
.v.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; }
.v.ok { color: var(--accent); }
.v.warn { color: var(--warn); }

.notice {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e6d7a2;
  margin-bottom: 14px;
}

.checks {
  margin: 12px 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}
.checks label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.checks input { margin-top: 3px; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
}
button:active { transform: scale(0.99); }
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost {
  background: var(--bg1);
  color: var(--text);
  border: 1px solid var(--line);
}

.wc-hint {
  margin: -2px 0 4px;
  font-size: 0.82rem;
  color: var(--warn);
  line-height: 1.45;
}
.wc-hint-info {
  color: var(--muted);
}

.status {
  margin-top: 14px;
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: pre-wrap;
}
.status.err { color: var(--danger); }
.status.ok { color: var(--accent); }

.foot {
  margin-top: 28px;
  font-size: 0.78rem;
  color: #667788;
  text-align: center;
  line-height: 1.5;
}

/* B019 — 钱包选择层 */
.wallet-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.wallet-picker[hidden] { display: none !important; }
.wallet-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 14, 0.62);
}
.wallet-picker-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: min(86vh, 560px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 22px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
@media (min-width: 560px) {
  .wallet-picker {
    align-items: center;
    padding: 18px;
  }
  .wallet-picker-sheet {
    border-radius: 16px;
  }
}
.wallet-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.wallet-picker-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
}
.wallet-picker-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: var(--bg1);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
}
.wallet-picker-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.wallet-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--bg1);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}
.wallet-opt:hover:not(:disabled) {
  border-color: #3d5368;
}
.wallet-opt:disabled {
  opacity: 0.4;
}
.wallet-opt-secondary {
  margin-top: 4px;
  opacity: 0.92;
}
.wallet-opt-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: #0d131a;
  border: 1px solid var(--line);
}
.wallet-opt-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wallet-opt-name {
  font-size: 0.98rem;
}
.wallet-opt-desc {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.wallet-picker-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--warn);
  line-height: 1.4;
}
