:root {
  /* fomo-family palette: deep space ink, lavender text, one blue-violet accent */
  --ink: #060510;
  --ink-2: #0a0916;
  --panel: #12111a;
  --panel-2: #191823;
  --panel-3: #22212e;
  --line: rgba(203, 208, 235, 0.09);
  --line-2: rgba(203, 208, 235, 0.16);
  --text: #f7f7f7;
  --dim: #9899a3;
  --faint: rgba(209, 216, 255, 0.42);
  --lav: #eaedff;
  --lav-2: rgba(209, 216, 255, 0.6);
  --blue: #516af6;
  --blue-2: #8b9cff;
  --blue-wash: rgba(81, 106, 246, 0.14);
  --up: #4fdc8f;
  --up-wash: rgba(79, 220, 143, 0.11);
  --down: #ff6b81;
  --down-wash: rgba(255, 107, 129, 0.11);
  --stock: #b8c1ff;
  --glass: rgba(255, 255, 255, 0.08);
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --r: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 500 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); } .down { color: var(--down); } .dim { color: var(--dim); } .faint { color: var(--faint); }
[hidden] { display: none !important; }

/* ── buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-white { background: var(--glass); color: var(--text); border-color: var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 12px; }
.btn-white:hover { background: rgba(255,255,255,.13); }
.btn-blue { background: var(--blue); color: #fff; font-weight: 700; }
.btn-blue:hover { background: #6379ff; }
.btn-ghost { border-color: var(--line-2); background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.03); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── brand ───────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; font-size: 17px; }
.brand svg { width: 26px; height: 26px; }

/* ── token marks / chain dots ────────────────── */
.tk-mark {
  position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden;
  background: hsl(var(--h) 45% 22%); color: hsl(var(--h) 80% 78%);
  font: 600 10px/1 var(--mono); letter-spacing: -.02em;
}
.tk-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chain-dot {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c);
}
.chain-dot svg { width: 64%; height: 64%; fill: currentColor; }

/* ── live dot ────────────────────────────────── */
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(80,227,194,.6); animation: ping 2s infinite; }
.live.is-stale::before { background: var(--down); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(80,227,194,.5); } 70% { box-shadow: 0 0 0 6px rgba(80,227,194,0); } 100% { box-shadow: 0 0 0 0 rgba(80,227,194,0); } }

/* ── wallet modal ────────────────────────────── */
.wm { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.wm-scrim { position: absolute; inset: 0; background: rgba(4,4,8,.7); backdrop-filter: blur(6px); }
.wm-panel { position: relative; width: min(420px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.wm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.wm-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--panel-2); font-size: 18px; line-height: 1; }
.wm-body { padding: 14px 18px 18px; }
.wm-sec + .wm-sec { margin-top: 16px; }
.wm-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.wm-lab small { font-weight: 400; color: var(--faint); font-size: 12px; text-align: right; }
.wm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); text-align: left; font-size: 14px; }
.wm-item > span:not(.wm-ic) { flex: 1; display: flex; flex-direction: column; }
.wm-item small { color: var(--dim); font-size: 12px; }
.wm-item i { font-style: normal; color: var(--faint); }
button.wm-item:hover, a.wm-item:hover { border-color: var(--line-2); background: var(--panel-3); }
.wm-item.is-on { border-color: rgba(80,227,194,.3); }
.wm-item.is-busy { opacity: .6; pointer-events: none; }
.wm-off { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 5px 10px; font-size: 12px; color: var(--dim); }
.wm-off:hover { color: var(--text); }
.wm-ic { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wm-ic-t { display: grid; place-items: center; background: var(--panel-3); font-weight: 600; font-size: 13px; }
.wm-err { color: var(--down); font-size: 13px; margin: 12px 0 0; min-height: 0; }
.wm-err:empty { display: none; }
.wm-foot { color: var(--faint); font-size: 12px; margin: 14px 0 0; line-height: 1.5; }

/* stock select (rebate currency) */
.tsel {
  appearance: none; -webkit-appearance: none; height: 30px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid rgba(200,245,96,.3);
  background: rgba(200,245,96,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c8f560' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--stock); font: 500 13px var(--mono); cursor: pointer;
}
.tsel option { background: var(--panel); color: var(--text); }

/* real chain logos (assets/logos) */
img.chain-logo { display: inline-block; border-radius: 50%; object-fit: cover; background: transparent; flex: none; vertical-align: middle; }
