:root {
  --bg: #f7f8fa; --card: #ffffff; --text: #14171f; --muted: #5b6474; --line: #e3e6ec;
  --accent: #1f6feb; --accent-text: #ffffff; --ok-bg: #e7f6ec; --ok: #136c33; --err-bg: #fdecec; --err: #9b1c1c;
  --info-bg: #eef4ff; --info: #1d4ea8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --card: #171b23; --text: #e8ebf1; --muted: #9aa3b2; --line: #2a303b;
    --accent: #4c8dff; --accent-text: #0b0d12; --ok-bg: #12301d; --ok: #7fdc9c; --err-bg: #3a1616; --err: #ff9b9b;
    --info-bg: #15233d; --info: #9cc0ff;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.brand { font-weight: 700; font-size: 18px; }
.pill { margin-left: auto; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.summary dt { font-size: 13px; color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary dd.strong { font-size: 18px; }
.tablewrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; background: var(--card); color: var(--muted); font-weight: 600; }
td.n { color: var(--muted); width: 3em; }
td.addr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.amt { text-align: right; white-space: nowrap; }
.fine { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
a { color: var(--accent); }
.wallets { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); width: 100%; margin-top: 8px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.msg { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.msg.info { background: var(--info-bg); color: var(--info); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.error { background: var(--err-bg); color: var(--err); }
.step { font-weight: 600; min-height: 1.5em; }
.notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 14px; }
.foot { margin-top: 28px; font-size: 13px; color: var(--muted); }
.doc h2 { margin-top: 28px; }
.doc li { margin-bottom: 6px; }
[hidden] { display: none !important; }
