:root {
  --bg: #0b0e11;
  --card: #1e2329;
  --elevated: #2b3139;
  --ink: #eaecef;
  --muted: #848e9c;
  --faint: #5e6673;
  --line: #2b3139;
  --yellow: #fcd535;
  --yellow-press: #f0b90b;
  --on-yellow: #181a20;
  --up: #0ecb81;
  --danger: #f6465d;
  --ui: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --num: "IBM Plex Sans", Inter, "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(252, 213, 53, 0.28); }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  background: #14181e;
  border-bottom: 1px solid #2b3139;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.top-inner, main {
  width: min(1200px, calc(100% - 48px));
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
main { margin: 0 auto; padding: 12px 0 72px; }

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.mark { display: block; height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-text em {
  margin-top: 2px;
  font-style: normal;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.top-meta { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.wallet-btn, .chip, .ghost, .solid, .act, .sort button {
  border: 0;
  background: transparent;
}
.pulse, .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
.wallet-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: #0b0e11;
  font-size: 14px;
  font-weight: 600;
}
.wallet-btn:hover { background: #eaecef; }
.account-slot { display: flex; align-items: center; gap: 12px; }
.account { position: relative; }
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 6px;
  border: 1px solid #3a414b;
  border-radius: 999px;
  background: #1e2329;
  color: #fff;
  font-family: var(--num);
  font-size: 14px;
  font-weight: 500;
}
.account-btn.on { border-color: #5e6673; }
.avatar, .menu-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #1e2329;
}
.avatar { width: 28px; height: 28px; }
.avatar img, .menu-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
button, a { -webkit-tap-highlight-color: transparent; }
.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 280px;
  padding-bottom: 8px;
  border-radius: 16px;
  border-top: 3px solid #fcd535;
  background: #2a3038;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}
.menu-avatar {
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  flex: none;
}
.menu-avatar img { width: 100%; height: 100%; }
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: transparent;
}
body.menu-open main {
  opacity: 0.32;
  transition: opacity 0.18s ease;
}
.menu-scrim[hidden] { display: none; }
.menu-card {
  margin: 0;
  min-width: 0;
  padding: 0;
}
.menu-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.menu-id {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  margin: 0;
  color: #fff;
  font-family: var(--num);
  font-size: 15px;
  font-weight: 600;
}
.menu-id button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.menu-id button:hover,
.menu-id button:active { color: #fff; background: transparent; }
.menu-id svg { width: 16px; height: 16px; }
.menu-bal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 14px 16px 8px;
}
.menu-bal span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.menu-bal b {
  color: #fff;
  font-family: var(--num);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.menu-list { display: grid; margin-top: 4px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.menu-list a, .menu-list button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eaecef;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .menu-list a:hover, .menu-list button:hover { background: rgba(255, 255, 255, 0.04); }
}
.menu-list svg { width: 20px; height: 20px; flex: 0 0 20px; color: #c5c8ce; }
.solid {
  height: 40px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-size: 14px;
  font-weight: 600;
}
.solid:hover { background: var(--yellow-press); }
.solid:disabled { background: #3a3a1f; color: #848e9c; cursor: default; }

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.charter h1, .panel h2, .drawer h2, .dialog h2 {
  margin: 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.3;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  padding-top: 36px;
}
.hero h1 {
  margin: 0;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero h1 span {
  display: block;
  color: var(--yellow);
}
.lede {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.stats { display: grid; gap: 12px; }
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #171a1e;
}
.stat > svg {
  display: block;
  width: 22px;
  height: 22px;
  padding: 9px;
  box-sizing: content-box;
  border-radius: 12px;
  background: #111418;
  color: var(--up);
  flex: 0 0 auto;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.stat b {
  display: block;
  margin-top: 2px;
  font-family: var(--num);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
}
.stat .hold {
  display: block;
  height: 22px;
  margin-top: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e2329 0%, #323840 45%, #1e2329 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.stat .hold.short { height: 10px; margin-top: 8px; }
.section-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 48px 0 16px;
}
.views {
  display: flex;
  align-items: baseline;
  gap: 28px;
  min-width: 0;
}
.create-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #5e6673;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.create-btn:hover { border-color: #eaecef; }
.views a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.views a.on {
  color: #fff;
  font-size: 28px;
  font-weight: 600;
}

.sheet {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.now {
  position: relative;
  padding: 0 20px;
}
.beat {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(252, 213, 53, 0.15), var(--yellow));
  transform-origin: left center;
  animation: beat 3s linear infinite;
}
.now-id, .now-facts { display: contents; }
.now-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-radius: 8px;
}
.now.fresh .now-line { animation: producer-in 0.7s ease; }
.now.fresh .now-name { animation: name-in 0.45s ease; }
.now-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.now-meta,
.now-ago {
  color: var(--muted);
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
a.now-meta { color: var(--yellow); }
.tape-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.tape-wrap > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.tape {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}
.tape li {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--elevated);
}
.tape li:nth-child(n + 8) { opacity: 0.62; }
.tape li:nth-child(n + 12) { opacity: 0.4; }
.now.fresh .tape li { animation: tape-shift 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tape li.on { background: var(--yellow); opacity: 1; }
.now.fresh .tape li.on { animation: chip-pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tape li.anon {
  background: transparent;
  box-shadow: inset 0 0 0 1px #5e6673;
}
.tape li.on.anon { background: var(--yellow); box-shadow: none; }
.tape b {
  font-family: var(--num);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tape li.anon b { color: var(--muted); font-size: 11px; }
.tape li.on b, .tape li.on.anon b { color: var(--on-yellow); }

.board {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}
.tools {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.switch i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #2b3139;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #848e9c;
  transition: transform 0.15s ease;
}
.switch.on { color: var(--ink); }
.switch.on i { background: rgba(252, 213, 53, 0.28); }
.switch.on i::after { transform: translateX(16px); background: var(--yellow); }
.count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.search { width: 240px; flex: 0 0 240px; }
.search input, .field input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--elevated);
  outline: none;
}
.field input { height: 44px; }
.search input:focus, .field input:focus { box-shadow: 0 0 0 1px var(--yellow); }
.search input::placeholder, .field input::placeholder { color: var(--faint); }
.chip, .sort button, .ghost {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.chip.on, .sort button.on, .modes button.on {
  color: var(--ink);
  background: var(--elevated);
}
.chip:hover, .sort button:hover, .ghost:hover { color: var(--ink); }
.sort { display: flex; gap: 4px; padding: 2px; border-radius: 8px; background: #14181d; }

.head, .row {
  display: grid;
  grid-template-columns: 48px minmax(200px, 1.4fr) minmax(168px, 200px) 120px 72px 112px 76px;
  column-gap: 12px;
  align-items: center;
  min-width: 960px;
  padding: 0 20px;
}
.head {
  height: 40px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.head .right { text-align: right; }
.row {
  min-height: 64px;
  border-bottom: 1px solid rgba(43, 49, 57, 0.9);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #252a31; }
.row.producing { box-shadow: inset 2px 0 0 var(--up); }
.rank {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.identity, .node-top { min-width: 0; }
.node-actions { display: contents; }
.node-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.node-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 72px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.node-url, .owner {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.node-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .node-url em,
.row .node-url svg,
.owner em,
.owner svg { display: none; }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--elevated);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}
.status { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 12px; font-weight: 500; }
.status.on { color: var(--up); }
.status.wait, .status.cand, .status.idle { color: var(--muted); }
.status .dot { width: 5px; height: 5px; animation: none; box-shadow: none; background: var(--faint); }
.status.on .dot { background: var(--up); }
.now .status.on .dot {
  width: 7px;
  height: 7px;
  animation: live-pulse 1.2s ease-out infinite;
}
.votes, .share, .owner { text-align: right; }
.votes {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.votes small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.pledge {
  text-align: right;
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pledge span { display: none; }
.pledge b { color: var(--yellow); font-weight: 600; }
.pledge small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.share {
  font-family: var(--num);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.owner button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
}
.owner button:hover { color: var(--yellow); }
.act {
  justify-self: end;
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-size: 12px;
  font-weight: 600;
}
.act:hover { background: var(--yellow-press); }
.note, .empty, .error {
  margin: 0;
  padding: 12px 16px 14px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}
.empty, .error {
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty p { margin: 0; }
.empty .solid { margin-top: 14px; }
.error { color: var(--danger); }

.skeleton { margin-top: 16px; }
.skeleton i {
  display: block;
  height: 72px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #1e2329, #2b3139, #1e2329);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.charter { max-width: 760px; }
.rules { list-style: none; margin: 20px 0 0; padding: 0; }
.rules li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.rules span {
  font-family: var(--num);
  color: var(--yellow);
  font-size: 14px;
  font-weight: 600;
}
.rules h3 { margin: 0; font-size: 16px; font-weight: 600; }
.rules p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.panel { margin-top: 8px; }
.fields { display: grid; gap: 14px; margin-top: 16px; }
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.field label {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.max {
  padding: 0;
  border: 0;
  background: none;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
}
.form-row { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.form-row p { margin: 0; color: var(--muted); font-size: 13px; }
.ghost { color: var(--muted); background: var(--elevated); border-radius: 6px; }

.overlay[hidden] { display: none; }
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.62);
}
#modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.scrim { position: absolute; inset: 0; }
.drawer, .dialog { background: #1e2329; }
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  padding: 24px;
  overflow: auto;
  border-left: 1px solid var(--line);
}
.dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #2b3139;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.addr {
  margin-top: 16px;
  font-family: var(--num);
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}
.bal {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--num);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.drawer-list { list-style: none; margin: 16px 0 0; padding: 0; }
.drawer-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.drawer-list b { font-weight: 600; }
.drawer-list span { color: var(--muted); font-family: var(--num); font-size: 13px; font-weight: 500; }
.modes {
  display: flex;
  gap: 4px;
  margin: 20px 0 16px;
  padding: 4px;
  border-radius: 10px;
  background: #14181d;
}
.modes button { flex: 1; height: 36px; border-radius: 8px; }
.modes button:disabled { opacity: 0.4; cursor: default; }
.quotes {
  margin-top: 16px;
  padding: 2px 14px;
  border-radius: 12px;
  background: #14181d;
}
.quote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.quote + .quote { border-top: 1px solid var(--line); }
.quote b {
  color: var(--ink);
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.quote b.is-empty { color: var(--faint); font-weight: 500; }
.quote .ghost { height: auto; padding: 0; background: none; color: var(--yellow); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.dialog-actions .ghost { height: 40px; padding: 0 16px; }
.dialog-actions .solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.dialog-actions .solid:active:not(:disabled) {
  transform: scale(0.97);
  background: var(--yellow-press);
}
.dialog-actions .solid.is-busy,
.dialog-actions .solid.is-busy:disabled {
  background: var(--yellow);
  color: var(--on-yellow);
  cursor: progress;
  box-shadow: 0 0 0 4px rgba(252, 213, 53, 0.2);
}
.spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(24, 26, 32, 0.28);
  border-top-color: #181a20;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.my-node {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--card);
}
.my-node strong { display: block; font-size: 14px; font-weight: 600; }
.my-node p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.toast[hidden] { display: none; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 10px;
  background: #1e2329;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  opacity: 1;
  transition: opacity 0.52s ease;
}
.toast.leaving { opacity: 0; pointer-events: none; }
.toast.mid:not([hidden]) {
  top: 50%;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, calc(100vw - 48px));
  padding: 36px 28px 32px;
  border-radius: 20px;
  background: #1e2329;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.toast.mid:not([hidden])::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(-32deg, transparent 0 26px, rgba(252, 213, 53, 0.045) 26px 27px);
}
.toast.mid:not([hidden])::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 118px;
  height: 136px;
  pointer-events: none;
  background: url("./images/card-mark.svg") center / contain no-repeat;
  opacity: 0.14;
}
.toast.mid > * { position: relative; z-index: 1; }
.toast-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.84);
  opacity: 1;
  transition: opacity 0.52s ease;
}
.toast-scrim.leaving { opacity: 0; pointer-events: none; }
.toast-scrim[hidden] { display: none; }
body.toast-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}
.toast.mid strong {
  margin-top: 16px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.toast.mid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.toast-amt {
  margin-top: 4px;
  color: #fff;
  font-family: var(--num);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.status-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.toast.wait .status-mark {
  border: 3px solid rgba(252, 213, 53, 0.18);
  border-top-color: var(--yellow);
  animation: spin 0.7s linear infinite;
}
.toast.ok .status-mark {
  background: #0ecb81;
  color: #fff;
}
.toast.ok .status-mark::after {
  content: "";
  width: 16px;
  height: 9px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
}
.toast.bad .status-mark { position: relative; background: rgba(246, 70, 93, 0.14); color: var(--danger); }
.toast.bad .status-mark::before,
.toast.bad .status-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 3px;
  margin: -1.5px 0 0 -9px;
  border-radius: 2px;
  background: currentColor;
}
.toast.bad .status-mark::before { transform: rotate(45deg); }
.toast.bad .status-mark::after { transform: rotate(-45deg); }

@keyframes pulse {
  70% { box-shadow: 0 0 0 6px rgba(14, 203, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(14, 203, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}
@keyframes beat {
  from { transform: scaleX(0); opacity: 0.4; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes producer-in {
  0% { background: rgba(252, 213, 53, 0.2); }
  100% { background: transparent; }
}
@keyframes name-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes tape-shift {
  from { transform: translateX(-28px); opacity: 0.35; }
  to { transform: none; opacity: 1; }
}
@keyframes chip-pop {
  0% { transform: translateX(-16px) scale(0.35); opacity: 0; }
  58% { transform: scale(1.28); }
  100% { transform: none; opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 980px) {
  .top-inner { height: 64px; }
  .mark { height: 32px; }
  .brand-text strong { font-size: 10px; }
  .brand-text em { font-size: 14px; }
  .wallet-btn { white-space: nowrap; height: 36px; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
  .hero h1 { font-size: 36px; }
  .lede { font-size: 14px; }
  .section-bar { margin-top: 28px; flex-wrap: wrap; gap: 12px 16px; }
  .views { gap: 14px; flex-wrap: wrap; }
  .views a.on { font-size: 20px; }
  .charter h1 { font-size: 20px; }
  .now { padding: 16px; }
  .beat { left: 16px; right: 16px; }
  .now-line { flex-direction: column; align-items: stretch; gap: 12px; min-height: 0; padding: 0; }
  .now-id, .now-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; width: 100%; }
  .now-name { max-width: none; flex: 1; }
  .tape-wrap { flex: 1 0 100%; margin-left: 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .tools { flex-wrap: wrap; height: auto; padding: 14px 16px; gap: 12px; }
  .count { flex: 1 1 auto; margin-right: 0; }
  .search { width: 100%; flex: 1 0 100%; }
  .head, .row { min-width: 0; }
  .head { display: none; }
  .row {
    align-items: start;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank id votes"
      ". link link"
      ". foot foot";
    column-gap: 12px;
    row-gap: 12px;
    padding: 18px 16px 16px;
  }
  .row:not(:has(.node-url)) {
    grid-template-areas:
      "rank id votes"
      ". foot foot";
  }
  .identity { display: contents; }
  .rank { grid-area: rank; padding-top: 4px; font-size: 13px; }
  .node-top { grid-area: id; }
  .node-line { flex-direction: column; align-items: flex-start; gap: 8px; }
  .node-name { font-size: 16px; line-height: 1.35; max-width: 100%; }
  .status { line-height: 1.35; }
  .votes { grid-area: votes; text-align: right; font-size: 16px; line-height: 1.35; align-self: start; }
  .votes small { display: block; margin-top: 8px; line-height: 1.35; }
  .pledge.is-empty { display: none; }
  .row:has(.pledge:not(.is-empty)) {
    grid-template-areas:
      "rank id votes"
      ". pledge pledge"
      ". link link"
      ". foot foot";
  }
  .row:has(.pledge:not(.is-empty)):not(:has(.node-url)) {
    grid-template-areas:
      "rank id votes"
      ". pledge pledge"
      ". foot foot";
  }
  .pledge:not(.is-empty) {
    grid-area: pledge;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
  }
  .pledge span {
    display: inline;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 12px;
    font-weight: 500;
  }
  .row .node-url {
    grid-area: link;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #14181e;
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
  }
  .row .node-url em {
    display: block;
    flex: none;
    color: var(--faint);
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
  }
  .row .node-url svg { display: block; width: 14px; height: 14px; flex: none; color: var(--muted); }
  .row .node-url span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .node-actions {
    display: flex;
    grid-area: foot;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
  }
  .owner { flex: 1; min-width: 0; margin: 0; text-align: left; }
  .owner button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #14181e;
    color: var(--ink);
  }
  .owner em {
    display: block;
    flex: none;
    color: var(--faint);
    font-style: normal;
    font-family: var(--ui);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
  }
  .owner svg { display: block; width: 14px; height: 14px; flex: none; color: var(--muted); }
  .owner button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .share { display: none; }
  .act { flex: none; height: 36px; padding: 0 16px; }
  .top-inner, main { width: min(1200px, calc(100% - 28px)); }
}

@media (max-width: 640px) {
  .brand-text { display: none; }
  .wallet-btn { padding: 0 12px; }
  .account-btn span:last-child { font-size: 12px; }
  .menu { width: min(260px, calc(100vw - 36px)); border-radius: 14px; }
  .menu-head { padding: 14px 14px 0; gap: 10px; }
  .menu-avatar { width: 40px; height: 40px; }
  .menu-id { font-size: 13px; }
  .menu-id button { width: 22px; height: 22px; }
  .menu-bal { margin: 12px 14px 6px; }
  .menu-bal b { font-size: 18px; }
  .menu-list { padding: 2px 0 4px; }
  .menu-list a, .menu-list button { height: 40px; padding: 0 16px; gap: 10px; font-size: 14px; }
  .toast.mid:not([hidden]) { width: min(360px, calc(100vw - 32px)); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .skeleton i, .stat .hold, .beat, .now.fresh .tape li, .now.fresh .now-name, .now.fresh .now-line, .now .status.on .dot, .spin, .toast.wait .status-mark { animation: none; }
}
