/* NianNian (年年) — 岁岁有今朝，年年有币安.
   Binance black and yellow over a drifting diamond lattice. The diamond is the
   one geometric unit: marks, keys, dial ticks, the today calendar, panel nodes.
   Meaning, not decoration: light = ordinary NFT and LP; solid yellow = VIP / BNB
   dividend; hollow yellow = tokens and staking; grey = treasury. */
:root {
  --night: #0b0e11;
  --layer: rgba(24, 26, 32, 0.48);
  --layer-strong: rgba(24, 26, 32, 0.96);
  --line: rgba(234, 236, 239, 0.09);
  --line-2: rgba(234, 236, 239, 0.2);
  --fg: #eaecef;
  --fg-2: #b7bdc6;
  --fg-3: #848e9c;
  --y: #f0b90b;        /* Binance yellow: VIP, BNB, primary action */
  --y-hi: #fcd535;     /* hover / focus */
  --y-line: rgba(240, 185, 11, 0.4);
  --grey: #5e6673;     /* treasury */
  --ink: #0b0e11;      /* text on yellow */
  --focus: #fcd535;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Roboto Mono", monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Components set display:grid/flex; hidden must still win. */
[hidden] { display: none !important; }
html { background: var(--night); color: var(--fg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 400 15px/1.6 var(--sans);
  background:
    radial-gradient(70% 55% at 78% -8%, rgba(240, 185, 11, 0.13) 0%, rgba(240, 185, 11, 0) 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(240, 185, 11, 0.05) 0%, rgba(240, 185, 11, 0) 70%),
    var(--night);
  background-attachment: fixed;
  overflow-x: hidden;
}
::selection { background: var(--y); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
dl, dd { margin: 0; }
html { scrollbar-color: #2b3139 var(--night); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.dim { color: var(--fg-3); }
.lbl { display: block; font-size: 13px; color: var(--fg-2); }
.note { font-size: 13px; color: var(--fg-3); line-height: 1.55; }
.lede { color: var(--fg-2); max-width: 60ch; }
[data-unknown] { color: var(--fg-3); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--y); color: var(--ink); padding: 8px 12px; font-weight: 600; }
.skip-link:focus { left: 8px; }

/* ---------- layers: translucent sheets, each pinned to the lattice by one node ---------- */
/* No backdrop blur: even 2px smeared the 1px lattice lines out of sight and
   left the sheets reading as solid cards. */
.layer {
  position: relative;
  background: var(--layer);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.layer::before {
  content: ""; position: absolute; top: -5px; left: 24px; width: 9px; height: 9px;
  background: var(--y); transform: rotate(45deg); pointer-events: none;
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s5);
  height: var(--top-h); padding: 0 var(--s5);
  background: rgba(11, 14, 17, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font: 700 19px/1 var(--display); letter-spacing: 0.04em; color: var(--fg); }
.brand-latin { font: 600 12px/1 var(--sans); color: var(--fg-3); letter-spacing: 0.08em; }

.tabs { display: flex; gap: 2px; margin: 0 auto; }
.tabs a {
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 var(--s4);
  text-decoration: none; color: var(--fg-2); font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .18s; /* current-tab marker switches instantly */
}
.tabs a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--y); }
.tabs a[aria-current="page"] svg { stroke: var(--y); }

.tools { display: flex; align-items: center; gap: var(--s2); flex: none; }
.tool {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.tool:hover { border-color: var(--y-line); background: rgba(240, 185, 11, 0.06); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tool .i-play { display: none; fill: currentColor; stroke: none; }
.tool[aria-pressed="true"] .i-pause { display: none; }
.tool[aria-pressed="true"] .i-play { display: block; }
.tool-text { font: 600 13px/1 var(--sans); }

.wallet { position: relative; }
.btn-wallet {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 var(--s4);
  background: var(--y); color: var(--ink); border: 0; border-radius: 6px;
  font-weight: 600; cursor: pointer; transition: background .18s;
}
.btn-wallet:hover { background: var(--y-hi); }
.btn-wallet .wl-short { display: none; }
.btn-wallet .dot { width: 8px; height: 8px; border: 1.5px solid currentColor; transform: rotate(45deg) scale(.9); }
.btn-wallet[data-state="connected"], .btn-wallet[data-state="wrong"] { background: transparent; color: var(--fg); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; }
/* Solid diamond = Binance Agentic (Mint path); hollow = ordinary wallet; grey = not on BSC. */
.btn-wallet[data-state="connected"] .dot { background: var(--y); border-color: var(--y); }
.btn-wallet[data-kind="browser"][data-state="connected"] .dot { background: transparent; border-color: var(--y); }
.btn-wallet[data-state="wrong"] .dot { background: transparent; border-color: var(--fg-3); }
.btn-wallet .wk { font: 600 11px/1 var(--sans); letter-spacing: 0.04em; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--fg-2); }
.btn-wallet[data-kind="agentic"] .wk { background: var(--y); border-color: var(--y); color: var(--ink); }
.btn-wallet[data-state="connecting"] .dot { animation: wait-blink 1s steps(2) infinite; }
@keyframes wait-blink { 50% { opacity: 0.25; } }

/* ---------- account dialog: two paths, one account at a time ---------- */
.acct {
  width: min(560px, calc(100vw - 32px)); max-height: min(840px, calc(100dvh - 48px));
  padding: 0; color: var(--fg); overflow: auto; overscroll-behavior: contain;
  background: rgba(18, 20, 25, 0.93); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
/* No blur: the lattice stays visible behind the sheet, only dimmed. */
.acct::backdrop { background: rgba(5, 6, 8, 0.6); }
.acct[open] { animation: acct-in .24s var(--ease); }
@keyframes acct-in { from { opacity: 0; transform: translateY(8px); } }
.acct-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--s2);
  padding: 12px 12px 12px 24px; background: rgba(18, 20, 25, 0.97); border-bottom: 1px solid var(--line);
}
.acct-head::before { content: ""; width: 9px; height: 9px; flex: none; background: var(--y); transform: rotate(45deg); }
#acct-back:not([hidden]) ~ h2 { margin-left: -4px; }
.acct-head:has(#acct-back:not([hidden]))::before { display: none; }
.acct-head h2 { flex: 1; font-size: 18px; line-height: 1.3; }
.acct-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: none; border: 1px solid transparent; border-radius: 6px; color: var(--fg-2); cursor: pointer;
}
.acct-icon:hover { color: var(--fg); border-color: var(--line-2); }
.acct-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-view { padding: 20px 24px 24px; display: grid; gap: var(--s4); }
.acct-lede { color: var(--fg-2); font-size: 14px; }
.acct-foot { font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); padding-top: var(--s3); }
.w-status { font-size: 13px; color: var(--fg); line-height: 1.55; }
.w-status:empty { display: none; }
.w-status.bad { color: #f6465d; }

.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pick {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: var(--s4); text-align: left; cursor: pointer;
  background: rgba(11, 14, 17, 0.5); border: 1px solid var(--line-2); border-radius: 8px;
  transition: border-color .18s, background .18s;
}
.pick:hover { border-color: var(--y); background: rgba(240, 185, 11, 0.06); }
.pick-ic { width: 40px; height: 40px; }
.pick-body { display: grid; gap: 4px; }
.pick-name { font: 700 16px/1.3 var(--display); }
.pick-meta { font-size: 13px; color: var(--fg-2); }
#pick-ag[data-svc="off"] .pick-meta { color: #f6465d; }
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cap { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.4; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--fg); }
.cap::before { content: ""; width: 7px; height: 7px; flex: none; transform: rotate(45deg); background: var(--y); }
.cap[data-c="no"] { color: var(--fg-2); border-style: dashed; }
.cap[data-c="no"]::before { background: transparent; border: 1.5px solid var(--fg-3); }

.ag-start { display: grid; gap: var(--s4); }
.ag-swap { font-size: 13px; padding: 10px 12px; border-left: 2px solid var(--y); background: rgba(240, 185, 11, 0.06); }
.ag-pair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.qr-frame { position: relative; display: grid; place-items: center; width: 232px; height: 232px; padding: 8px; background: #fff; border-radius: 8px; }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 9px; height: 9px; background: var(--y); transform: rotate(45deg); }
.qr-frame::before { top: -5px; left: 20px; }
.qr-frame::after { bottom: -5px; right: 20px; }
#ag-qr { width: 216px; height: 216px; display: block; image-rendering: pixelated; }
.qr-ph { width: 216px; height: 216px; background: repeating-linear-gradient(45deg, #eceef1 0 6px, #f7f8f9 6px 12px); }
.qr-fail { color: var(--ink); font-size: 13px; padding: var(--s4); text-align: center; }
.ag-side { display: grid; gap: var(--s3); align-content: start; }
.ag-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--fg-2); }
.ag-code-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ag-code-row .lbl { width: 100%; }
.ag-code { font-size: 30px; font-weight: 600; letter-spacing: 0.16em; color: var(--y); }
.ag-wait { font-size: 13px; }
.ag-time { font-size: 12px; color: var(--fg-3); }
.ag-time:empty { display: none; }
.ag-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
a.btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.br-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.br-item {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; text-align: left; cursor: pointer;
  background: rgba(11, 14, 17, 0.5); border: 1px solid var(--line-2); border-radius: 8px; transition: border-color .18s;
}
.br-item:hover { border-color: var(--y); }
img.br-ic { width: 28px; height: 28px; flex: none; border-radius: 6px; }
span.br-ic { width: 14px; height: 14px; margin: 0 7px; flex: none; border: 1.5px solid var(--y); transform: rotate(45deg); }
.br-nm { flex: 1; font-weight: 600; }
.br-mt { font-size: 12px; color: var(--fg-3); }
.br-item[aria-busy="true"] .br-mt { color: var(--y); }
.br-none { display: grid; gap: 10px; padding: var(--s4); border: 1px dashed var(--line-2); border-radius: 8px; font-size: 14px; color: var(--fg-2); }
.br-none-t { font-weight: 600; color: var(--fg); }
.br-get { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 13px; }
.br-get a { min-height: 36px; display: inline-flex; align-items: center; color: var(--fg); text-decoration-color: var(--y-line); text-underline-offset: 3px; }
.br-none-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.ac-card { display: grid; gap: 4px; padding: var(--s4); background: rgba(11, 14, 17, 0.5); border: 1px solid var(--line-2); border-radius: 8px; }
.ac-kind { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.ac-kind::before { content: ""; width: 9px; height: 9px; flex: none; transform: rotate(45deg); background: var(--y); }
.ac-kind[data-kind="browser"]::before { background: transparent; border: 1.5px solid var(--y); }
.ac-addr { font-size: 14px; word-break: break-all; }
.ac-net { font-size: 13px; color: var(--fg-2); }
.ac-net.bad { color: #f6465d; }
.ac-id { display: grid; border-top: 1px solid var(--line); }
.ac-id > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.ac-id dt { font-size: 13px; color: var(--fg-2); }
.ac-id dd { display: grid; gap: 2px; justify-items: start; }
.ac-id small { font-size: 12px; color: var(--fg-3); line-height: 1.5; }
.ac-agent { font: 600 15px var(--mono); word-break: break-all; }
.ac-agent[data-s="valid"] { color: var(--y); }
.ac-agent[data-s="loading"], .ac-agent[data-s="idle"] { color: var(--fg-2); font-weight: 400; }
.ac-perm-wrap { display: grid; gap: var(--s2); }
.ac-perm { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.ac-perm li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.perm-n { font-weight: 500; }
.perm-e { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); }
.perm-e i { width: 8px; height: 8px; flex: none; transform: rotate(45deg); }
.ac-perm li[data-e="ok"] i { background: var(--y); }
.ac-perm li[data-e="no"] .perm-e { color: var(--fg-2); }
.ac-perm li[data-e="no"] i { border: 1.5px solid var(--fg-3); }
.ac-perm li[data-e="unk"] i, .ac-perm li[data-e="wait"] i { border: 1.5px dashed var(--fg-2); }
.perm-g { font: 12px var(--mono); color: var(--fg-2); padding: 2px 8px; border: 1px dashed var(--line-2); border-radius: 10px; white-space: nowrap; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.link { background: none; border: 0; padding: 0; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; font-size: 13px; justify-self: start; }
.link:hover { color: var(--fg); text-decoration-color: var(--y); }

/* ---------- status line ---------- */
.statusline {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
}
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 14px; font-size: 13px; color: var(--fg-2); }
.chip-phase .pulse { width: 7px; height: 7px; background: var(--fg-3); transform: rotate(45deg); }
.chip-phase[data-phase="not_deployed"], .chip-phase[data-phase="paused"] { color: var(--fg); border-color: var(--y-line); }
.chip-phase[data-phase="not_deployed"] .pulse, .chip-phase[data-phase="paused"] .pulse { background: var(--y); }
.chip-phase[data-phase="live"] .pulse { background: var(--y); box-shadow: 0 0 8px var(--y); }
.status-msg { font-size: 13px; color: var(--fg-2); }

/* ---------- main / views ---------- */
main { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); outline: none; }
.view[hidden] { display: none; }
.view { animation: view-in .32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.page-head { margin-bottom: var(--s5); display: grid; gap: var(--s2); }
.page-head h1 { font-size: 36px; line-height: 1.15; }

/* ---------- hero: the line itself, and today in its year ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 432px); align-items: end;
  gap: var(--s5) var(--s7); margin: var(--s3) 0 var(--s7);
}
.hero-copy { display: grid; gap: var(--s3); }
.hero-title { font: 700 clamp(44px, 5.4vw, 68px)/1.08 var(--display); letter-spacing: 0.02em; color: var(--fg); }
.hero-title > span { display: block; }
.ht-a { color: var(--fg-2); font-weight: 600; }
.hero-title em { font-style: normal; color: var(--y); }
html[lang="en"] .hero-title { font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
.hero-alt { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg-2); letter-spacing: 0.01em; }
.hero-alt::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--y); transform: rotate(45deg); }
.hero-sub { color: var(--fg-3); font-size: 14px; max-width: 62ch; margin-top: var(--s2); }

.today { margin: 0; display: grid; gap: var(--s3); }
.today figcaption { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; font-size: 13px; color: var(--fg-2); }
.today-k { font: 700 15px/1 var(--display); color: var(--y); letter-spacing: 0.04em; }
.today-date { font-size: 15px; color: var(--fg); }
.today-n { color: var(--fg-3); }
.today-grid { width: 100%; height: auto; display: block; overflow: visible; }
.today-grid .d-past { fill: rgba(240, 185, 11, 0.32); }
.today-grid .d-next { fill: none; stroke: rgba(234, 236, 239, 0.18); stroke-width: 0.8; }
.today-grid .d-now { fill: var(--y); filter: drop-shadow(0 0 4px rgba(240, 185, 11, 0.9)); }

/* ---------- mint ---------- */
.mint-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.85fr); gap: var(--s5); align-items: start; }
.instrument { padding: var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 0.72fr); gap: var(--s5) var(--s6); }
.instrument-head { grid-column: 1 / -1; display: grid; gap: var(--s2); }
.instrument-head h1 { font-size: 32px; line-height: 1.15; }

/* Progress dial: 100 diamonds, one per 100 NFTs. */
.dial-wrap { position: relative; aspect-ratio: 1; max-width: 400px; width: 100%; justify-self: center; }
.dial { width: 100%; height: 100%; display: block; }
.dial .t-unk { fill: none; stroke: rgba(132, 142, 156, 0.4); stroke-width: 1; }
.dial .t-empty { fill: rgba(234, 236, 239, 0.1); }
.dial .t-free { fill: var(--fg); }
.dial .t-paid { fill: var(--y); }
.dial .cap-track { fill: none; stroke: rgba(234, 236, 239, 0.12); stroke-width: 2; }
.dial .cap-fill { fill: none; stroke: var(--fg); stroke-width: 2; }
.dial-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center; pointer-events: none;
}
.dial-label { font-size: 13px; color: var(--fg-2); }
.dial-num { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; font-weight: 500; color: var(--fg); }
.dial-num[data-unknown] { color: var(--fg-3); }
.dial-of { font: 14px var(--mono); color: var(--fg-3); }
.unk-tag { margin-top: 6px; font-size: 12px; padding: 1px 10px; border: 1px dashed var(--line-2); color: var(--fg-2); border-radius: 12px; }
.unk-tag[hidden] { display: none; }

.readouts { display: grid; align-content: center; gap: 0; }
.ro { padding: var(--s4) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.ro:last-child { border-bottom: 1px solid var(--line); }
.ro dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.ro dd { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.ro dd .num { font-size: 24px; color: var(--fg); }
.ro dd .num[data-unknown] { color: var(--fg-3); }
.ro small { font-size: 12px; color: var(--fg-3); }
/* Keys are diamonds: hollow light = ordinary, solid yellow = VIP, hollow yellow = staking. */
.key { display: inline-block; width: 9px; height: 9px; flex: none; transform: rotate(45deg); margin: 0 1px; }
.key-free { border: 1.5px solid var(--fg); }
.key-paid { background: var(--y); }
.key-stake { border: 1.5px solid var(--y); }

/* Tiers: the live position (only from the paid counter) above the fixed rule. */
.tier { grid-column: 1 / -1; display: grid; gap: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line); }
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.tier-h { font-size: 20px; line-height: 1.2; }
.tier-all { display: inline-flex; align-items: center; text-decoration: none; font-size: 14px; }
.tier-read { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tier-read > div { padding: var(--s3) var(--s3) var(--s3) 0; display: grid; gap: 2px; }
.tier-read > div + div { padding-left: var(--s4); border-left: 1px solid var(--line); }
.tier-read dt { font-size: 13px; color: var(--fg-2); }
.tier-read dd { font-size: 13px; white-space: nowrap; }
.tier-read strong { font-size: 22px; font-weight: 500; color: var(--fg); }
.tier-read strong[data-unknown] { color: var(--fg-3); }
.tier-pos, .tiers-pos { font-size: 13px; color: var(--fg-2); line-height: 1.55; padding-left: var(--s3); border-left: 2px dashed var(--line-2); }
.tier-pos[data-known="true"], .tiers-pos[data-known="true"] { color: var(--fg); border-left: 2px solid var(--y); }

/* Five bands, each one line: tiers · paid serials · per-tier size · price range. */
.bands { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bands a {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: baseline; gap: var(--s3);
  padding: 9px var(--s2) 9px 22px; position: relative; text-decoration: none;
  border-bottom: 1px solid var(--line); transition: background .15s;
}
.bands li:first-child a { border-top: 1px solid var(--line); }
.bands a::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 7px; height: 7px; margin-top: -4px;
  border: 1.5px solid var(--fg-3); transform: rotate(45deg);
}
.bands a:hover { background: rgba(240, 185, 11, 0.06); }
.bands .b-t { font-size: 13px; color: var(--fg); }
.bands .b-f { font-size: 13px; color: var(--fg-2); min-width: 0; }
.bands .b-p { font-size: 13px; color: var(--fg); white-space: nowrap; }
.bands li[data-now] a { background: rgba(240, 185, 11, 0.08); }
.bands li[data-now] a::before { background: var(--y); border-color: var(--y); }
.bands li[data-now] .b-t { color: var(--y); }

/* ---------- tiers page ---------- */
.tiers { padding: var(--s5); display: grid; gap: var(--s5); }
.tiers-now { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.tiers-pos { flex: 1 1 320px; max-width: 72ch; }
.band-nav { display: grid; gap: var(--s2); }
/* Five across on desktop; 3 + 2 on tablet so price ranges never touch the card edge. */
.bands-nav { grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: var(--s2); }
.bands-nav a, .bands-nav li:first-child a {
  grid-template-columns: 1fr; gap: 2px; height: 100%; padding: var(--s3) var(--s3) var(--s3) 26px;
  border: 1px solid var(--line-2); border-radius: 6px; background: rgba(11, 14, 17, 0.35);
}
.bands-nav a::before { left: 10px; top: 21px; margin-top: 0; }
.bands-nav li[data-now] a { border-color: var(--y-line); }
.tiers-err { font-size: 14px; color: #f6465d; }

.tier-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tier-table th, .tier-table td { padding: 7px var(--s3); text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
/* Opaque: at 0.94 the rows scrolling under it stayed legible behind the labels. */
.tier-table thead th {
  position: sticky; top: var(--top-h); z-index: 2;
  background: var(--night); color: var(--fg-2); font-size: 13px; border-bottom-color: var(--line-2);
}
.tier-table thead .c-p { white-space: nowrap; }
.tier-table .c-t { width: 4.5em; }
.tier-table .c-c, .tier-table .c-p { text-align: right; }
.tier-table .c-s { width: 9em; color: var(--fg-3); font-size: 13px; }
.tier-table[data-known="false"] .c-s { display: none; }
.tier-table tbody tr:not(.band-row):hover { background: rgba(234, 236, 239, 0.035); }
.tier-table tbody, .tier-table tr { scroll-margin-top: calc(var(--top-h) + 48px); }
.tier-table tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.band-row th {
  padding: var(--s5) var(--s3) var(--s2); border-bottom: 1px solid var(--y-line);
  display: table-cell; font-size: 13px; color: var(--fg-2);
}
.band-row .b-t { color: var(--y); font-size: 15px; font-weight: 600; margin-right: var(--s3); }
.tier-table tr.is-past td, .tier-table tr.is-past th { color: var(--fg-3); }
.tier-table tr.is-now { background: rgba(240, 185, 11, 0.12); }
.tier-table tr.is-now th { color: var(--y); font-weight: 600; white-space: nowrap; }
/* The current tier carries the site's solid VIP diamond, not a colored edge bar. */
.tier-table tr.is-now th::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0;
  background: var(--y); transform: rotate(45deg); vertical-align: middle;
}
.tier-table tr.is-now td { color: var(--fg); }
.tier-table tr.is-now .c-s { color: var(--y); }
.tiers-foot { max-width: 72ch; }

/* ---------- mint with AI ---------- */
.ai { border-top: 1px solid var(--line); padding-top: var(--s4); display: grid; gap: var(--s3); scroll-margin-top: calc(var(--top-h) + var(--s4)); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.ai-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 16px/1.3 var(--display); }
.ai-ic { width: 18px; height: 18px; fill: none; stroke: var(--y); stroke-width: 1.5; stroke-linejoin: round; }
.ai-tag { font: 500 12px var(--sans); color: var(--fg-2); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 10px; }
.ai-lede { font-size: 13px; color: var(--fg-2); line-height: 1.6; }
.ai-qty { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.ai-qty legend { margin-bottom: var(--s2); }
.ai-chips span { height: 36px; font-size: 14px; }
.ai-box { display: grid; gap: 6px; }
.ai-prompt {
  width: 100%; resize: vertical; min-height: 168px; padding: var(--s3);
  font: 400 13px/1.65 var(--sans); color: var(--fg);
  background: rgba(11, 14, 17, 0.72); border: 1px solid var(--line-2); border-radius: 6px;
  scrollbar-color: #2b3139 transparent;
}
.ai-prompt:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ai-acts { display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.ai-links { display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.ai-links .link { font-size: 13px; padding: 6px 0; }
.ai-copy { height: 44px; padding: 0 var(--s5); font-size: 15px; }
.ai-msg { font-size: 13px; line-height: 1.55; color: var(--fg); }
.ai-msg:empty { display: none; }
.ai-msg[data-s="fail"] { color: var(--y-hi); }

/* console */
.console { padding: var(--s5); display: grid; gap: var(--s5); position: sticky; top: calc(var(--top-h) + var(--s4)); }
.console h2 { font-size: 24px; line-height: 1.2; }
.quota { display: grid; gap: var(--s2); }
.quota-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: var(--s3); }
.quota-row .lbl { font-size: 13px; }
.slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.slots i { aspect-ratio: 1; border: 1px solid var(--line-2); max-width: 15px; transform: rotate(45deg) scale(.82); }
.slots[data-state="unknown"] i { border-style: dashed; border-color: var(--line-2); }
.slots i.used { background: var(--fg-2); border-color: var(--fg-2); }
.quota-n { font-size: 13px; color: var(--fg-2); min-width: 52px; text-align: right; }

.qty { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.qty legend { margin-bottom: var(--s2); }
.qty-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qty-chips label { position: relative; }
.qty-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qty-chips span {
  display: grid; place-items: center; height: 44px;
  border: 1px solid var(--line-2); border-radius: 6px; font: 500 15px var(--mono);
  transition: background .15s, border-color .15s, color .15s;
}
.qty-chips input:checked + span { background: var(--y); color: var(--ink); border-color: var(--y); }
.qty-chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.qty:disabled .qty-chips span { color: var(--fg-3); border-color: var(--line-2); border-style: dashed; cursor: not-allowed; }
.qty:disabled .qty-chips input { cursor: not-allowed; }

.quote { display: grid; gap: 0; border-top: 1px solid var(--line); }
.quote > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.quote dt { font-size: 13px; color: var(--fg-2); }
.quote dd { text-align: right; font-family: var(--mono); }
.quote-total dd .num { font-size: 26px; color: var(--fg); }
.quote-total dd .num[data-unknown] { color: var(--fg-3); }

.split { display: grid; gap: var(--s2); }
.split-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: var(--s3); opacity: 1; transition: opacity .2s; }
.split-row[data-dim] { opacity: 0.45; }
.split-cap { font-size: 12px; color: var(--fg-2); }
.split-nums { font-size: 12px; color: var(--fg-2); }
.bar { display: flex; height: 10px; gap: 2px; }
.bar i { flex: var(--w) 0 0; }
.bar i:first-child { border-radius: 3px 0 0 3px; }
.bar i:last-child { border-radius: 0 3px 3px 0; }
.s-lp { background: var(--fg); }
.s-vip { background: var(--y); }
.s-stake { background: transparent; box-shadow: inset 0 0 0 1.5px var(--y); }
.s-tre { background: var(--grey); }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.act { display: grid; gap: var(--s2); }
.btn-primary {
  height: 52px; border: 0; border-radius: 6px; background: var(--y); color: var(--ink);
  font: 700 16px var(--sans); letter-spacing: 0.04em; cursor: pointer;
  box-shadow: 0 8px 22px rgba(240, 185, 11, 0.22);
  transition: background .18s;
}
.btn-primary:hover:not(:disabled) { background: var(--y-hi); }
.btn-primary:disabled {
  cursor: not-allowed; color: var(--fg-3); background: transparent; box-shadow: none;
  border: 1px dashed var(--line-2);
}
.reason { font-size: 13px; color: var(--fg-2); text-align: center; }
.reason:empty { display: none; }

/* Mint identity: connected, verified Agent ID and deployment are three separate facts. */
.agent { border-top: 1px solid var(--line); padding-top: var(--s4); display: grid; gap: var(--s3); }
.agent-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-weight: 600; font-size: 14px; }
.agent-state { margin-left: auto; font: 500 12px var(--mono); color: var(--fg-2); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 10px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-state[data-s="valid"] { color: var(--ink); background: var(--y); border-color: var(--y); }
.agent-state[data-s="none"], .agent-state[data-s="unknown"], .agent-state[data-s="browser"] { color: var(--fg); border-color: var(--y-line); }
.agent-state[data-s="off"] { color: #f6465d; border-color: rgba(246, 70, 93, 0.4); }
.agent-body { font-size: 13px; color: var(--fg-2); line-height: 1.55; }
.agent-go { justify-self: start; }

/* ---------- vault ---------- */
.vault { padding: var(--s5); display: grid; gap: var(--s5); }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tally > div { padding: var(--s4) var(--s4) var(--s4) 0; display: grid; gap: 4px; }
.tally > div + div { padding-left: var(--s4); border-left: 1px solid var(--line); }
.tally dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.tally dd { font: 400 24px var(--mono); font-variant-numeric: tabular-nums; }
.tally dd .dim, .pool-ro dd .dim, .quote dd .dim { font-size: 13px; }
.tally-note { font-size: 13px; color: var(--fg-3); margin-top: calc(var(--s3) * -1); }

.paths { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.path { display: grid; grid-template-columns: 48px 1fr; gap: 4px var(--s4); align-items: start; padding: var(--s4) 0; border-top: 1px solid var(--line); }
.path svg { grid-row: span 2; width: 48px; height: 48px; }
.path b { font: 700 22px/1.2 var(--display); color: var(--fg); }
.path span { color: var(--fg-2); font-size: 14px; text-wrap: pretty; }
.vault-body { display: grid; gap: var(--s4); justify-items: start; min-height: 160px; align-content: center; }
.vault-msg { color: var(--fg-2); }
.btn-ghost {
  min-height: 44px; padding: 0 var(--s5); background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 6px; font-weight: 600; cursor: pointer; transition: border-color .18s, background .18s;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--y); background: rgba(240, 185, 11, 0.07); }
.btn-ghost:disabled { color: var(--fg-3); border-style: dashed; cursor: not-allowed; }
.btn-ghost[hidden] { display: none; }

.seals { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.seal { position: relative; display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line-2); border-radius: 6px; background: rgba(11, 14, 17, 0.55); }
.seal[data-kind="vip"] { border-color: var(--y-line); }
.seal-top { display: flex; justify-content: space-between; align-items: center; }
.seal-id { font: 500 14px var(--mono); }
.seal-kind { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--fg-2); }
.seal dl { display: grid; gap: 6px; font-size: 13px; }
.seal dl div { display: flex; justify-content: space-between; gap: var(--s2); }
.seal dt { color: var(--fg-3); }
.seal dd { font-family: var(--mono); }
.seal-acts { display: flex; gap: 6px; }
.seal-acts .btn-ghost { flex: 1; min-height: 40px; padding: 0 10px; font-size: 13px; }

/* ---------- pools ---------- */
.flow { margin: 0 0 var(--s5); padding: var(--s5); display: grid; gap: var(--s3); }
.flow-svg { width: 100%; height: auto; max-height: 240px; }
.flow-svg path { fill: none; stroke-linecap: butt; transition: opacity .3s; }
.flow-svg .f-src { fill: var(--y); stroke: none; }
.f-t { fill: var(--ink); font: 700 15px var(--mono); }
.f-lp { stroke: rgba(234, 236, 239, 0.85); }
.f-vip { stroke: var(--y); }
/* Staking is drawn hollow: a yellow rail with a dark core. */
.f-stake { stroke: var(--y); }
.f-stake-in { stroke: var(--night); }
.f-tre { stroke: var(--grey); }
.f-l { fill: var(--fg-2); font: 13px var(--sans); }
.f-p { fill: var(--fg); font: 13px var(--mono); }
.flow[data-branch="prior"] .f-alt { opacity: 0; }
.flow[data-branch="none"] .f-vip { opacity: 0.08; }
.flow[data-branch="none"] .f-stake:not(.f-alt),
.flow[data-branch="none"] .f-stake-in:not(.f-alt) { opacity: 0; }
.flow-list { display: none; list-style: none; margin: 0; padding: 0; }
.flow-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.flow-list li i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.flow-list li .num { margin-left: auto; color: var(--fg); }
.flow[data-branch="none"] .flow-list .fl-vip { opacity: 0.45; }
.flow-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.flow-toggle button {
  min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); border-radius: 20px; color: var(--fg-2); cursor: pointer; font-size: 13px;
}
.flow-toggle button[aria-checked="true"] { color: var(--ink); border-color: var(--y); background: var(--y); font-weight: 600; }

.pools { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.pool { padding: var(--s5); display: grid; gap: var(--s4); align-content: start; }
.pool h2 { font-size: 24px; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.pool-icon { width: 30px; height: 30px; flex: none; }
.pool > p { color: var(--fg-2); font-size: 14px; }
/* The panel node names the pool: solid for VIP dividend, hollow for staking. */
.pool-stake::before { background: var(--night); box-shadow: inset 0 0 0 1.5px var(--y); }
.pool-ro { display: grid; border-top: 1px solid var(--line); }
.pool-ro > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.pool-ro dt { font-size: 13px; color: var(--fg-2); }
.pool-ro dd { font-family: var(--mono); font-size: 18px; }
.pool-acts { display: flex; gap: var(--s2); }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s7); padding: var(--s6); }
.guide-toc { position: sticky; top: calc(var(--top-h) + var(--s5)); align-self: start; display: grid; gap: var(--s4); }
.guide-toc h1 { font-size: 30px; line-height: 1.2; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-toc a { display: block; padding: 8px 0 8px 12px; border-left: 1px solid var(--line-2); text-decoration: none; color: var(--fg-2); font-size: 14px; }
.guide-toc a:hover, .guide-toc a[aria-current="true"] { color: var(--fg); border-left-color: var(--y); }
.guide-body { display: grid; gap: var(--s7); max-width: 68ch; }
.guide-body section { display: grid; gap: var(--s3); scroll-margin-top: calc(var(--top-h) + var(--s5)); }
.guide-body h2 { font-size: 24px; line-height: 1.3; }
.guide-body section:first-child h2 { font-size: 30px; }
.guide-body p { color: var(--fg-2); line-height: 1.75; }
.guide-body b { color: var(--fg); font-weight: 600; }
.guide-body .g-addr { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); color: var(--fg-2); }
.guide-body .g-addr .num { display: block; font-size: 13px; color: var(--fg); overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s7); display: grid; gap: 4px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.foot-mark { width: 18px; height: 18px; flex: none; }
.foot a { text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.foot a:hover { color: var(--fg); text-decoration-color: var(--y); }

/* ---------- intro (~1.6s): the diamond draws, fills, and the line arrives ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 42%, #1c1a10 0%, var(--night) 70%);
  transition: opacity .35s ease, visibility .35s;
}
#intro.done { opacity: 0; visibility: hidden; }
.intro-inner { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: 0 var(--s5); }
.intro-mark { width: min(120px, 30vw); height: auto; overflow: visible; margin-bottom: var(--s4); }
.im-out { fill: none; stroke: var(--y); stroke-width: 2; stroke-dasharray: 318; stroke-dashoffset: 318; animation: draw .55s cubic-bezier(.3, .6, .4, 1) forwards; }
.im-fill { fill: var(--y); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop .45s .4s var(--ease) forwards; }
.intro-a, .intro-b { font: 700 clamp(26px, 5vw, 44px)/1.15 var(--display); letter-spacing: 0.04em; opacity: 0; transform: translateY(8px); }
.intro-a { color: var(--fg-2); font-weight: 600; animation: rise .5s .6s var(--ease) forwards; }
.intro-b { color: var(--fg); animation: rise .5s .78s var(--ease) forwards; }
.intro-b em { font-style: normal; color: var(--y); }
html[lang="en"] .intro-a, html[lang="en"] .intro-b { letter-spacing: -0.01em; font-size: clamp(22px, 4vw, 36px); }
.intro-skip { position: absolute; right: 24px; bottom: 24px; min-height: 40px; padding: 0 14px; background: none; border: 1px solid var(--line-2); color: var(--fg-2); border-radius: 6px; cursor: pointer; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- motion preferences ---------- */
html[data-motion="off"] .view,
html[data-motion="off"] .acct[open],
html[data-motion="off"] .btn-wallet .dot { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .view, .acct[open], .btn-wallet .dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .mint-grid { grid-template-columns: 1fr; }
  .console { position: relative; top: 0; }
  .tabs a { padding: 0 10px; }
  .brand-latin { display: none; }
  .hero { grid-template-columns: 1fr; align-items: start; gap: var(--s5); }
  .today { max-width: 432px; }
}
/* Five tabs plus tools: between the phone bar and ~900px the icons yield so labels stay on one line. */
@media (min-width: 761px) and (max-width: 900px) {
  .top { gap: var(--s3); }
  .tabs a svg { display: none; }
}
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  body { font-size: 15px; padding-bottom: 72px; }
  /* backdrop-filter would make .top the containing block of the fixed tab bar */
  .top { padding: 0 var(--s4); gap: var(--s3); backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 14, 17, 0.95); }
  /* Header must fit 375px in both languages: brand yields first, wallet uses a short label. */
  .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 17px; }
  .btn-wallet { white-space: nowrap; }
  .btn-wallet .wl-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btn-wallet .wl-short { display: inline; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    background: rgba(11, 14, 17, 0.94); border-top: 1px solid var(--line);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabs a { flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 0 4px; font-size: 12px; border-bottom: 0; border-top: 2px solid transparent; }
  .tabs a[aria-current="page"] { border-top-color: var(--y); }
  .tools { margin-left: auto; gap: 6px; }
  .btn-wallet { padding: 0 12px; font-size: 14px; }
  .statusline { padding: var(--s2) var(--s4); gap: var(--s2); }
  main { padding: var(--s5) var(--s4) var(--s7); }
  .hero { margin: 0 0 var(--s6); gap: var(--s4); }
  .hero-copy { gap: var(--s2); }
  .hero-title { font-size: 36px; letter-spacing: 0.01em; }
  html[lang="en"] .hero-title { font-size: 28px; }
  .hero-alt { font-size: 13px; }
  .hero-sub { font-size: 13px; }
  .today { max-width: none; gap: var(--s2); }
  .instrument { grid-template-columns: 1fr; padding: var(--s5) var(--s4); }
  .instrument-head h1, .page-head h1 { font-size: 28px; }
  .dial-wrap { max-width: 320px; }
  .readouts { grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
  .ro:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .ro dd { flex-direction: column; gap: 0; }
  .tier-read { grid-template-columns: 1fr 1fr; }
  .tier-read > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .tier-read > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tier-read strong { font-size: 20px; }
  .bands a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .bands .b-f { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
  .bands-nav { grid-template-columns: 1fr 1fr; }
  .bands-nav li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ai-copy { flex: 1 1 100%; }
  .bands-nav a, .bands-nav li:first-child a { grid-template-columns: 1fr; }
  .bands-nav .b-f { grid-row: auto; }
  .tiers { padding: var(--s4) var(--s3); gap: var(--s4); }
  .tier-table { font-size: 13px; }
  .tier-table th, .tier-table td { padding: 7px 6px; }
  .tier-table .c-c { display: none; }
  .tier-table .c-t { width: 3em; }
  .tier-table .c-s { width: auto; font-size: 12px; }
  .tier-table .c-r { white-space: nowrap; font-size: 12px; }
  .band-row th { padding: var(--s4) 6px var(--s2); }
  .band-row .b-t { display: block; margin: 0 0 2px; }
  .console { padding: var(--s5) var(--s4); }
  .quota-row { grid-template-columns: 1fr auto; }
  .quota-row .slots { grid-column: 1 / -1; grid-row: 2; }
  .split-row { grid-template-columns: 1fr auto; }
  .split-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .tally { grid-template-columns: 1fr 1fr; }
  .tally > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .tally > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pools { grid-template-columns: 1fr; }
  .flow { padding: var(--s4); }
  .flow-svg .f-l, .flow-svg .f-p { display: none; }
  .flow-svg { max-height: 140px; }
  .flow-list { display: block; }
  .paths { grid-template-columns: 1fr; gap: 0; }
  .guide { grid-template-columns: 1fr; padding: var(--s5) var(--s4); gap: var(--s5); }
  .guide-toc { position: static; }
  .guide-body section:first-child h2 { font-size: 24px; }
  /* 12px keeps a 42-char address on one line at 375–390px; narrower phones still wrap. */
  .guide-body .g-addr .num { font-size: 12px; }
  .foot { padding-bottom: calc(var(--s7) + 72px); }
  .btn-wallet .wk { display: none; }
  /* The dialog becomes a bottom sheet above the tab bar's thumb zone. */
  .acct {
    width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0;
    border-radius: 12px 12px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes acct-in { from { opacity: 0; transform: translateY(24px); } }
  .acct-head { padding: 8px 8px 8px 16px; }
  .acct-view { padding: var(--s4) var(--s4) var(--s5); }
  .ag-pair { grid-template-columns: 1fr; gap: var(--s4); }
  .qr-frame { justify-self: center; }
  .ac-id > div { grid-template-columns: 1fr; gap: 4px; }
  .ac-perm li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .perm-n { grid-column: 1; grid-row: 1; }
  .perm-g { grid-column: 2; grid-row: 1 / span 2; }
  .perm-e { grid-column: 1; grid-row: 2; font-size: 12px; }
  .ac-acts .btn-ghost { flex: 1; }
}
@media (max-width: 380px) {
  .tool { min-width: 38px; padding: 0 6px; }
}
@media (max-width: 340px) {
  .brand-word { display: none; }
}
