:root {
  --bg: #07080c;
  --card: #12151c;
  --card-2: #181c25;
  --line: #2a3140;
  --text: #f3f5f8;
  --muted: #8b93a7;
  --green: #3dff9a;
  --green-2: #1f8f5a;
  --blue: #6ea8ff;
  --warn: #ffb020;
  --bad: #ff5d6c;
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body { min-height: 100dvh; }
a { color: var(--blue); text-decoration: none; }
button, input, textarea, select { font: inherit; }
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: calc(88px + var(--safe-bottom)); }
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7,8,12,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-top));
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #3dff9a, #1a8cff);
}
.brand h1 { font-size: .95rem; margin: 0; }
.brand p { margin: 0; color: var(--muted); font-size: .72rem; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 10px; font-size: .72rem; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #555; }
.dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.bad { background: var(--bad); }
.page { padding: 16px; display: none; }
.page.on { display: block; }
.hero {
  background: linear-gradient(180deg, #163325, #10131a);
  border: 1px solid #1e3b2c; border-radius: 24px; padding: 22px 18px 18px;
}
.hero .label { color: #9ad4b6; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.hero .bal { font-size: 2rem; font-weight: 750; letter-spacing: -.03em; margin: 6px 0 4px; }
.hero .addr { color: var(--muted); font-size: .8rem; word-break: break-all; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.act {
  background: #0d1a13; border: 1px solid #244433; color: var(--text);
  border-radius: 16px; padding: 12px 6px; text-align: center; cursor: pointer;
}
.act i { display: block; color: var(--green); margin-bottom: 4px; font-size: .9rem; }
.act b { display: block; font-size: .78rem; }
.act span { color: var(--muted); font-size: .65rem; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-top: 12px;
}
.card h2 { margin: 0 0 8px; font-size: 1rem; }
.card h2 i { color: var(--green); margin-right: 8px; }
.muted { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; word-break: break-all; }
label { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
input, textarea, select {
  width: 100%; background: #0b0d12; border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 13px 12px;
}
textarea { min-height: 92px; resize: vertical; }
.btn {
  width: 100%; border: 0; border-radius: 14px; padding: 14px;
  font-weight: 700; cursor: pointer; margin-top: 12px;
  background: linear-gradient(180deg, #6dffb3, #2ae084); color: #06110a;
}
.btn:disabled { opacity: .45; }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn.warn { background: #3a2210; color: #ffd7a1; border: 1px solid #5a3a16; }
.btn i { margin-right: 8px; }
.nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: min(480px, 100%);
  background: #0d1016; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(10px + var(--safe-bottom));
}
.nav a {
  color: var(--muted); text-align: center; font-size: .62rem; padding: 6px 2px; font-weight: 600;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.nav a i { font-size: .95rem; }
.nav a.on { color: var(--green); }
.steps { counter-reset: s; display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
}
.num {
  width: 28px; height: 28px; border-radius: 50%; background: #1b2030;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 16px; margin: 12px auto; width: 196px; }
.status { color: var(--muted); font-size: .8rem; margin-top: 8px; min-height: 1.2em; word-break: break-word; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + var(--safe-bottom)); background: #143323; color: var(--green);
  border: 1px solid #245c3d; border-radius: 999px; padding: 8px 14px; font-size: .8rem;
  display: none; z-index: 40;
}
pre {
  background: #0b0d12; border-radius: 14px; padding: 12px; overflow: auto;
  font-size: .72rem; line-height: 1.4; max-height: 420px; white-space: pre-wrap;
}
.list { display: grid; gap: 8px; }
.item { background: #0b0d12; border-radius: 14px; padding: 12px; }
.warn { background: #181208; border: 1px solid #3a2a12; color: #f3d7a2; border-radius: 14px; padding: 12px; font-size: .84rem; line-height: 1.45; }
.okbox { background: #0d1813; border: 1px solid #1e3b2c; color: #b7ebcd; border-radius: 14px; padding: 12px; font-size: .84rem; line-height: 1.45; }
.badge {
  display: inline-block; font-size: .68rem; border-radius: 999px;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--muted);
}
.badge.pred { color: #ffd7a1; border-color: #5a3a16; background: #24180c; }
.badge.live { color: #9ad4b6; border-color: #1e3b2c; background: #0d1813; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiny { width: auto; margin-top: 8px; padding: 8px 10px; font-size: .78rem; }
.batch-row { display: grid; grid-template-columns: 1fr 90px 36px; gap: 6px; margin-top: 8px; }
.batch-row button { margin: 0; padding: 0; border-radius: 12px; }
.more-grid { display: grid; gap: 8px; }
.more-grid .btn { margin-top: 0; text-align: left; }
.rpc-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rpc-row:last-child { border-bottom: 0; }
