/* PINOCAO API CONSOLE — precision instrument theme
   palette: ink / phosphor lime / signal cyan / rust
   type: condensed display + mono numerals */

:root {
  --ink: #050907;
  --ink-2: #08120e;
  --panel: rgba(11, 20, 16, .78);
  --panel-2: rgba(15, 27, 21, .55);
  --line: rgba(190, 232, 124, .14);
  --line-strong: rgba(190, 232, 124, .34);
  --sign: #c9f24d;
  --cyan: #55e6c4;
  --warm: #f2b25c;
  --danger: #ff6f5e;
  --text: #e8f0e8;
  --muted: #8ba396;
  --dim: #5d7268;

  --display: "Bahnschrift", "DIN Alternate", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --rail: 216px;
  --radius: 3px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(85, 230, 196, .07), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(201, 242, 77, .05), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(190, 232, 124, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 232, 124, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(1000px 700px at 50% 0%, #000 20%, transparent 85%);
  opacity: .5;
}

/* ── topbar ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: rgba(5, 9, 7, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transform: rotate(45deg);
}
.brand-mark i {
  width: 8px; height: 8px;
  background: var(--sign);
  box-shadow: 0 0 12px rgba(201, 242, 77, .55);
}
.brand-word {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .22em;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--dim);
}

.top-actions { display: flex; align-items: center; gap: 10px; }

.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--cyan);
  padding: 5px 10px;
  border: 1px solid rgba(85, 230, 196, .26);
  border-radius: 999px;
}
.live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(85, 230, 196, .4); }
  50% { opacity: .55; box-shadow: 0 0 0 6px rgba(85, 230, 196, 0); }
}

.balance-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: var(--radius);
  white-space: nowrap;
}
.balance-chip .lbl { font-size: 11px; color: var(--muted); }
.balance-chip strong { font-family: var(--mono); font-size: 14px; color: var(--sign); }

.account { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--sign);
  font-family: var(--mono);
  font-size: 12px;
}
.acct-mail { font-size: 12px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  width: 34px; height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: .2s var(--ease);
}
.icon-btn:hover { color: var(--danger); border-color: rgba(255, 111, 94, .4); }

/* ── rail ─────────────────────────────────────────────── */
.rail {
  position: fixed;
  top: 62px;
  bottom: 0;
  left: 0;
  width: var(--rail);
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 18, 14, .6), rgba(5, 9, 7, .3));
  z-index: 10;
}
.rail-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .1em;
  text-align: left;
  cursor: pointer;
  transition: .18s var(--ease);
}
.rail-item .idx { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.rail-item:hover { color: var(--text); background: rgba(190, 232, 124, .04); }
.rail-item.active {
  color: var(--text);
  border-left-color: var(--sign);
  background: linear-gradient(90deg, rgba(201, 242, 77, .1), transparent 80%);
}
.rail-item.active .idx { color: var(--sign); }
.rail-foot {
  margin-top: auto;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--dim);
  padding: 12px 14px 0;
  border-top: 1px solid var(--line);
}

/* ── stage ────────────────────────────────────────────── */
.stage {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding: 30px 34px 60px;
  min-height: calc(100vh - 62px);
}
.view { display: none; }
.view.active { display: block; }

/* auth */
.auth-wrap {
  max-width: 1120px;
  margin: 4vh auto 0;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.auth-intro .eyebrow { margin-bottom: 18px; }
.auth-title {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 22px;
}
.auth-title em {
  font-style: normal;
  color: var(--sign);
  position: relative;
}
.auth-title em::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 6px;
  background: rgba(201, 242, 77, .16);
  z-index: -1;
}
.auth-copy { color: var(--muted); max-width: 460px; font-size: 14.5px; }
.auth-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 30px 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  max-width: 480px;
}
.auth-specs div { padding: 12px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.auth-specs dt { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.auth-specs dd { margin: 4px 0 0; font-size: 13px; color: var(--text); }
.auth-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: 12px;
}
.auth-code span { color: var(--cyan); }

.auth-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1;
  padding: 10px 0 12px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .14em;
  cursor: pointer;
}
.tab.active { color: var(--sign); border-bottom-color: var(--sign); }

.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; }
.code-btn { white-space: nowrap; padding: 10px 12px; font-size: 11.5px; }
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--sign); font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.field { display: grid; gap: 6px; }
.field span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
input, .search {
  width: 100%;
  padding: 11px 12px;
  background: rgba(4, 10, 7, .7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: .18s var(--ease);
}
input::placeholder { color: var(--dim); }
input:focus, .search:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(201, 242, 77, .08); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: .18s var(--ease);
}
.btn.primary {
  background: var(--sign);
  border-color: var(--sign);
  color: #0a1206;
  font-weight: 700;
}
.btn.primary:hover { box-shadow: 0 0 24px rgba(201, 242, 77, .28); transform: translateY(-1px); }
.btn.ghost:hover { border-color: var(--sign); color: var(--sign); }
.btn.small { padding: 8px 12px; font-size: 11px; }
.btn.danger { border-color: rgba(255, 111, 94, .4); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.form-note { color: var(--dim); font-size: 12px; margin: 2px 0 0; }
.auth-foot {
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--dim);
}
.auth-foot .ok { color: var(--cyan); }

/* ── pages ────────────────────────────────────────────── */
.page { display: none; max-width: 1240px; margin: 0 auto; }
.page.active { display: block; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--dim);
  margin: 0 0 8px;
}
.page-head { margin-bottom: 24px; }
.page-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -.01em;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 29, 22, .72), rgba(7, 14, 10, .62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.card:hover { border-color: rgba(190, 232, 124, .24); }
.card-corner {
  position: absolute; top: 0; right: 0;
  width: 28px; height: 28px;
  background:
    linear-gradient(var(--sign), var(--sign)) top right / 1px 14px no-repeat,
    linear-gradient(var(--sign), var(--sign)) top right / 14px 1px no-repeat;
  opacity: .5;
}
.card-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--dim);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.card-label .unit { color: var(--dim); }

.balance-card { padding: 26px 24px 22px; }
.balance-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0 18px;
  font-family: var(--mono);
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1;
  color: var(--sign);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 36px rgba(201, 242, 77, .22);
}
.balance-value .cny { font-size: .42em; color: var(--muted); }
.balance-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  color: var(--cyan); border: 1px solid rgba(85, 230, 196, .3);
  padding: 2px 7px; border-radius: 2px;
}
.muted { color: var(--muted); font-size: 12px; }

.stat-cluster { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { display: flex; flex-direction: column; justify-content: center; }
.stat:first-child { grid-column: span 2; }
.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  color: var(--text);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.stat-note { margin: 4px 0 0; font-size: 11px; color: var(--dim); letter-spacing: .06em; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
.key-split { grid-template-columns: 1.5fr 1fr; align-items: start; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3 { margin: 0; font-size: 15px; letter-spacing: .04em; }
.text-btn {
  background: none; border: 0; color: var(--muted);
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  cursor: pointer;
}
.text-btn:hover { color: var(--sign); }

/* tables */
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data td {
  padding: 10px;
  border-bottom: 1px solid rgba(190, 232, 124, .07);
  vertical-align: middle;
  white-space: nowrap;
}
.data tbody tr:hover td { background: rgba(190, 232, 124, .035); }
.data .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data .empty { color: var(--dim); text-align: center; padding: 26px 10px; font-size: 12px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.badge { display: inline-block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; padding: 2px 6px; border-radius: 2px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--cyan); border-color: rgba(85, 230, 196, .32); }
.badge.fail { color: var(--danger); border-color: rgba(255, 111, 94, .34); }
.badge.est { color: var(--warm); border-color: rgba(242, 178, 92, .32); }
.badge.rec { color: #0a1206; background: var(--sign); border-color: var(--sign); font-weight: 700; }

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.feed li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(190, 232, 124, .07); font-size: 12.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .t { color: var(--dim); font-family: var(--mono); font-size: 10px; }
.feed .amt { font-family: var(--mono); }
.feed .amt.pos { color: var(--cyan); }
.feed .amt.neg { color: var(--warm); }
.feed .empty { color: var(--dim); justify-content: center; }

.code-block {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: #cfe0d3;
  background: rgba(3, 8, 5, .72);
  border: 1px solid var(--line);
  border-left: 2px solid var(--sign);
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.quick { display: flex; flex-direction: column; }
.quick .btn { align-self: flex-start; }

.strip {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  margin-bottom: 16px;
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.strip div { display: flex; flex-direction: column; gap: 2px; }
.strip span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.strip b { font-family: var(--mono); font-size: 18px; color: var(--text); font-weight: 500; }
.strip .btn { margin-left: auto; }

.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(190, 232, 124, .07); }
.ledger-list li:last-child { border-bottom: 0; }
.ledger-list .note { color: var(--text); }
.ledger-list .meta { color: var(--dim); font-family: var(--mono); font-size: 10px; }
.ledger-list .amt { font-family: var(--mono); font-size: 14px; }
.ledger-list .amt.pos { color: var(--cyan); }
.ledger-list .amt.neg { color: var(--warm); }
.ledger-list .empty { display: block; text-align: center; color: var(--dim); padding: 26px 0; }

/* admin */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.seg {
  padding: 8px 16px;
  background: none; border: 0; border-radius: 2px;
  color: var(--muted);
  font-family: var(--display); font-size: 12px; letter-spacing: .1em;
  cursor: pointer;
}
.seg.active { background: rgba(201, 242, 77, .12); color: var(--sign); }
.segmented.small .seg { padding: 6px 12px; font-size: 11px; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { border: 1px solid var(--line); background: var(--panel-2); padding: 14px 16px; border-radius: var(--radius); }
.tile span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.tile b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 500; margin-top: 6px; font-variant-numeric: tabular-nums; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr 3fr auto; gap: 10px; align-items: center; }
.bar-row .name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; background: rgba(190, 232, 124, .08); border-radius: 1px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, rgba(201, 242, 77, .35), var(--sign)); box-shadow: 0 0 14px rgba(201, 242, 77, .22); }
.bar-row .cost { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.upstreams { list-style: none; margin: 0; padding: 0; }
.upstreams li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(190, 232, 124, .07); }
.upstreams li:last-child { border-bottom: 0; }
.upstreams .u-name { font-size: 13px; }
.upstreams .u-meta { font-family: var(--mono); font-size: 10px; color: var(--dim); margin-left: auto; }
.switch { position: relative; width: 36px; height: 18px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .knob { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 999px; transition: .18s var(--ease); }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--dim); transition: .18s var(--ease); }
.switch input:checked + .knob { border-color: var(--line-strong); }
.switch input:checked + .knob::after { left: 20px; background: var(--sign); box-shadow: 0 0 10px rgba(201, 242, 77, .4); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { max-width: 280px; }

.redeem-form { display: flex; gap: 10px; align-items: stretch; }
.redeem-form input { flex: 1; }
.redeem-form .btn { white-space: nowrap; }

.inline-num {
  width: 84px;
  padding: 6px 8px;
  font-size: 12px;
}

/* dock (mobile) */
.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(5, 9, 7, .9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.dock-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 6px;
  background: none; border: 0; border-radius: 2px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .08em;
  cursor: pointer;
}
.dock-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dock-item.active { color: var(--sign); background: rgba(201, 242, 77, .08); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  z-index: 50;
  padding: 11px 18px;
  background: rgba(8, 18, 14, .95);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 12.5px;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: .24s var(--ease);
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 111, 94, .5); color: #ffd7d2; }

/* modal */
.modal {
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #0c1a14, #050b08);
  color: var(--text);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  border-radius: var(--radius);
}
.modal::backdrop { background: rgba(2, 6, 4, .72); backdrop-filter: blur(6px); }
.modal-body { padding: 24px; }
.modal-body h3 { margin: 6px 0 6px; font-size: 20px; }
.key-reveal {
  margin: 16px 0;
  padding: 14px;
  background: rgba(3, 8, 5, .8);
  border: 1px dashed var(--line-strong);
  font-size: 13px;
  word-break: break-all;
  color: var(--sign);
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* motion */
.reveal { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .live i { animation: none !important; }
  * { transition: none !important; }
}

/* responsive */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .stat-cluster { grid-template-columns: repeat(3, 1fr); }
  .stat:first-child { grid-column: auto; }
  .split { grid-template-columns: 1fr; }
  .key-split { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 900px) {
  .rail { display: none; }
  .stage { margin-left: 0; padding: 22px 16px calc(84px + env(safe-area-inset-bottom)); }
  .dock { display: grid; }
  .topbar { padding: 0 14px; height: 56px; }
  .brand-sub { display: none; }
  .live span { display: none; }
  .live { padding: 6px; }
  .acct-mail { display: none; }
}

@media (max-width: 720px) {
  .stat-cluster { grid-template-columns: 1fr 1fr; }
  .stat:first-child { grid-column: span 2; }
  .stat-grid { grid-template-columns: 1fr; }
  .balance-value { font-size: 40px; }
  .strip { gap: 16px; }
  .strip b { font-size: 15px; }
  .strip .btn { margin-left: 0; width: 100%; }

  .data thead { display: none; }
  .data tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 8px;
    padding: 8px 10px;
    background: var(--panel-2);
  }
  .data td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 5px 0;
    white-space: normal;
    text-align: right;
  }
  .data td::before { content: attr(data-label); color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-align: left; }
  .data td.num { text-align: right; }
  .data .empty { display: block; text-align: center; }
  .data .empty::before { content: none; }

  .ledger-list li { grid-template-columns: 1fr auto; }
  .ledger-list .meta { grid-column: 1 / -1; }
  .auth-specs { grid-template-columns: 1fr; }
  .auth-title { font-size: 38px; }
  .toast { bottom: 88px; }
  .redeem-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .balance-chip .lbl { display: none; }
  .balance-chip { padding: 5px 9px; }
  .balance-chip strong { font-size: 12px; }
  .brand-word { font-size: 15px; letter-spacing: .16em; }
  .top-actions { gap: 6px; }
  .icon-btn { width: 30px; height: 30px; }
  .avatar { width: 26px; height: 26px; font-size: 11px; }
  .stat-grid .tile { padding: 12px; }
  .stat-grid .tile b { font-size: 19px; }
}
