:root {
  --bg: #08090b;
  --surface: #0e1013;
  --surface-2: #14171b;
  --surface-3: #1b1f24;
  --line: rgba(236, 240, 232, 0.08);
  --line-2: rgba(236, 240, 232, 0.15);
  --text: #ecebe6;
  --muted: #9a9f99;
  --dim: #6b706b;
  --a: #5cd6ff;
  --b: #ff79b4;
  --c: #d4ff5c;
  --up: #7ef0a6;
  --down: #ff7a6b;
  --warn: #ffc65c;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --radius: 18px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max: 1200px;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(212, 255, 92, 0.15);
  touch-action: manipulation;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.01em; scroll-margin-top: 80px; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button, input, select { font: inherit; color: inherit; }
img, canvas, svg { display: block; }

:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--c); color: #0a0b07; padding: 10px 14px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-word { font: 600 17px/1 var(--sans); letter-spacing: -0.02em; }
.brand-word span { color: var(--c); }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px;
  font-weight: 500; font-size: 14px; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center;
  transition: color 0.15s, background-color 0.15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current='page'] { color: var(--text); background: var(--surface-3); }
.proto-badge {
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--warn); border: 1px solid rgba(255, 198, 92, 0.35); padding: 6px 8px; border-radius: 999px;
}
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .brand-word { display: none; }
  .nav { margin-left: 0; flex: 1; }
  .nav a { padding: 8px 10px; }
  .proto-badge { display: none; }
}

main {
  flex: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 28px max(var(--gutter), env(safe-area-inset-right)) 64px max(var(--gutter), env(safe-area-inset-left));
  outline: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px max(var(--gutter), env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  color: var(--muted); font-size: 13px;
}
.site-footer > * { max-width: var(--max); margin: 0 auto; }
.site-footer p + p { margin-top: 8px; }
.site-footer strong { color: var(--text); font-weight: 600; }

/* ---------- shared ---------- */
.eyebrow { font: 500 12px/1.2 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.lede { color: var(--muted); font-size: 17px; max-width: 60ch; }
.muted { color: var(--muted); }
.fine { color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.fine a { color: var(--muted); }
.ticker { font-family: var(--mono); font-weight: 500; font-size: 0.95em; }
.ticker.a { color: var(--a); }
.ticker.b { color: var(--b); }
.x { color: var(--dim); }
.tag {
  font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 6px; border-radius: 999px; background: rgba(212, 255, 92, 0.12); color: var(--c);
  margin-left: 6px; vertical-align: 1px;
}
.tag.mine { background: rgba(92, 214, 255, 0.12); color: var(--a); }
.break { word-break: break-all; }

.page-head { margin-bottom: 24px; display: grid; gap: 10px; }
.page-head h1 { font: 400 clamp(40px, 6vw, 64px)/1 var(--serif); letter-spacing: -0.01em; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; }
.more { color: var(--muted); text-decoration: none; font-size: 14px; }
.more:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 500; font-size: 14.5px; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(236, 240, 232, 0.28); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--c); color: #0b0d06; border-color: transparent; }
.btn.primary:hover { background: #e2ff86; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.loading .btn-label::before, .breed-btn.working .breed-glyph {
  animation: spin 0.8s linear infinite;
}
.btn.loading .btn-label::before {
  content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1;
  position: relative;
}
.icon-btn::after { content: ''; position: absolute; inset: -6px; }
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input, .field select, .combo-input, .search, .vol-input {
  height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); padding: 0 12px; font-size: 16px; width: 100%;
  transition: border-color 0.15s;
}
.field select { background-color: var(--surface); color: var(--text); }
.field input:hover, .combo-input:hover, .search:hover { border-color: rgba(236, 240, 232, 0.26); }
.field input:focus-visible, .combo-input:focus-visible, .search:focus-visible, .vol-input:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--c); outline-offset: 0; border-color: transparent;
}
.field-error { color: var(--down); font-size: 13px; min-height: 0; }
.field-error:empty { display: none; }
[aria-invalid='true'] { border-color: var(--down) !important; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 0; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--c); flex: none; }

.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font: 500 11.5px/1.2 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
tbody th { font-weight: 500; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot th, tfoot td { border-bottom: 0; font-weight: 600; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  text-decoration: none; color: var(--muted); padding: 12px 14px; font-weight: 500; font-size: 14.5px;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab[aria-current='page'] { color: var(--text); border-bottom-color: var(--c); }

.code {
  margin: 0; padding: 16px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line); overflow-x: auto; font-size: 13px; line-height: 1.6; color: #c9d4b8;
}
.code code { font-size: inherit; }

.empty { text-align: center; padding: 64px 16px; display: grid; gap: 16px; justify-items: center; color: var(--muted); }
.empty h1 { font: 400 44px/1.05 var(--serif); color: var(--text); }

.toasts {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); padding: 10px 16px;
  border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.22s ease-out; transition: opacity 0.3s, transform 0.3s;
}
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- lab ---------- */
.lab-head { display: grid; gap: 12px; margin: 8px 0 22px; }
.lab-head h1 { font: 400 clamp(44px, 8vw, 92px)/0.95 var(--serif); letter-spacing: -0.02em; }
.lab-head .lede { font-size: 17.5px; }

.stage {
  position: relative; border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(ellipse 40% 55% at 19% 48%, rgba(92, 214, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 40% 55% at 81% 48%, rgba(255, 121, 180, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 50% at 50% 48%, rgba(212, 255, 92, 0.05), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.stage-canvas { width: 100%; height: clamp(420px, 60vh, 600px); }
@media (max-width: 719px) {
  .stage-canvas { height: 520px; }
  .stage {
    background:
      radial-gradient(ellipse 40% 30% at 27% 27%, rgba(92, 214, 255, 0.08), transparent 70%),
      radial-gradient(ellipse 40% 30% at 73% 27%, rgba(255, 121, 180, 0.08), transparent 70%),
      radial-gradient(ellipse 50% 30% at 50% 68%, rgba(212, 255, 92, 0.05), transparent 70%),
      var(--surface);
  }
}

.stage-controls {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: start; margin-top: 18px;
}
.parent-col { display: grid; gap: 10px; min-width: 0; }
.parent-col.side-b { text-align: right; }
.parent-col.side-b .combo-label { justify-self: end; }
.breed-col { display: grid; gap: 10px; justify-items: center; padding-top: 22px; text-align: center; max-width: 300px; }
@media (max-width: 719px) {
  .stage-controls { grid-template-columns: 1fr 1fr; grid-template-areas: 'a b' 'go go'; gap: 14px; }
  .parent-col.side-a { grid-area: a; }
  .parent-col.side-b { grid-area: b; }
  .breed-col { grid-area: go; padding-top: 4px; max-width: none; }
}

.combo { position: relative; display: grid; gap: 6px; }
.combo-label { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.side-a .combo-label { color: var(--a); }
.side-b .combo-label { color: var(--b); }
.combo-current { display: none; }
.side-a .combo-input:focus-visible { outline-color: var(--a); }
.side-b .combo-input:focus-visible { outline-color: var(--b); }
.combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: 6px;
  list-style: none; max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3); text-align: left;
}
.combo-opt {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 10px 10px; border-radius: 8px; cursor: pointer; min-height: 40px;
}
.combo-opt.active, .combo-opt:hover { background: var(--surface-3); }
.combo-opt[aria-selected='true'] .opt-main::after { content: ' ✓'; color: var(--c); }
.opt-main { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.opt-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.combo-empty { padding: 12px; color: var(--muted); font-size: 13.5px; }

.parent-summary { display: grid; gap: 2px; min-width: 0; }
.ps-ticker { font: 500 26px/1.15 var(--mono); text-decoration: none; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.side-a .ps-ticker { color: var(--a); }
.side-b .ps-ticker { color: var(--b); }
.ps-ticker:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ps-meta { color: var(--muted); font-size: 13.5px; }
.ps-genome { font: 400 12.5px/1.4 var(--mono); color: var(--dim); }

.breed-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 28px 0 18px;
  border-radius: 999px; border: 0; cursor: pointer; background: var(--c); color: #0b0d06;
  font: 600 16px/1 var(--sans); letter-spacing: -0.005em; text-transform: none;
  box-shadow: 0 0 0 1px rgba(212, 255, 92, 0.35), 0 10px 40px -8px rgba(212, 255, 92, 0.45);
  transition: transform 0.15s, box-shadow 0.2s, background-color 0.15s;
}
.breed-btn:hover { background: #e2ff86; box-shadow: 0 0 0 1px rgba(212, 255, 92, 0.5), 0 14px 48px -6px rgba(212, 255, 92, 0.6); }
.breed-btn:active { transform: scale(0.97); }
.breed-btn:disabled { background: var(--surface-3); color: var(--dim); box-shadow: none; cursor: not-allowed; }
.breed-btn:focus-visible { outline-offset: 4px; border-radius: 999px; }
.breed-glyph {
  width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none;
  background:
    radial-gradient(circle at 34% 50%, transparent 5px, #0b0d06 5.5px, #0b0d06 7px, transparent 7.5px),
    radial-gradient(circle at 66% 50%, transparent 5px, #0b0d06 5.5px, #0b0d06 7px, transparent 7.5px);
}
.breed-btn:disabled .breed-glyph { opacity: 0.4; filter: invert(0.6); }
.compat { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.compat.bad { color: var(--warn); }

.result {
  margin-top: 28px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px;
  padding: 28px; border-radius: var(--radius); border: 1px solid rgba(212, 255, 92, 0.2);
  background: linear-gradient(180deg, rgba(212, 255, 92, 0.035), transparent 40%), var(--surface);
  animation: rise 0.4s ease-out;
}
.result[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 860px) { .result { grid-template-columns: 1fr; padding: 20px; gap: 22px; } }
.result-head { display: grid; gap: 12px; align-content: start; }
.result-ticker { display: flex; align-items: baseline; font: 500 44px/1 var(--mono); color: var(--c); letter-spacing: -0.03em; }
.result-ticker .ticker { font-size: 1em; color: var(--c); }
.ticker-input {
  font: inherit; letter-spacing: inherit; color: var(--c); background: transparent; border: 0;
  border-bottom: 1px dashed rgba(212, 255, 92, 0.4); width: 100%; min-width: 0; padding: 0 0 4px; border-radius: 0;
}
.ticker-input:focus-visible { outline: none; border-bottom: 1px solid var(--c); }
.result-lineage { color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font: 500 13px/1 var(--mono); cursor: pointer; color: var(--muted); position: relative;
}
.chip::after { content: ''; position: absolute; inset: -6px -2px; }
.chip:hover:not(:disabled) { color: var(--text); border-color: var(--c); }
.chip:disabled { text-decoration: line-through; opacity: 0.45; cursor: not-allowed; }
.ids { display: grid; gap: 6px; margin: 4px 0 0; }
.ids div { display: flex; gap: 10px; align-items: center; }
.ids dt { width: 74px; flex: none; color: var(--dim); font-size: 13px; }
.ids dd { margin: 0; display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); }
.result-body { display: grid; gap: 18px; align-content: start; min-width: 0; }
.inherit td, .inherit th { padding: 10px 10px; }
.inherit tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.from { font: 500 12px/1 var(--mono); padding: 4px 7px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.from.side-a { color: var(--a); background: rgba(92, 214, 255, 0.1); }
.from.side-b { color: var(--b); background: rgba(255, 121, 180, 0.1); }
.from-list { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.odds { font: 400 12.5px/1 var(--mono); color: var(--dim); }
.swatches { display: inline-flex; gap: 4px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.mutation { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid; }
.mutation.grade-minor { border-color: rgba(92, 214, 255, 0.3); background: rgba(92, 214, 255, 0.06); }
.mutation.grade-major { border-color: rgba(255, 198, 92, 0.35); background: rgba(255, 198, 92, 0.06); }
.mutation.grade-exceptional { border-color: rgba(255, 121, 180, 0.45); background: linear-gradient(90deg, rgba(255, 121, 180, 0.1), rgba(92, 214, 255, 0.1), rgba(212, 255, 92, 0.1)); }
.mutation strong { font-weight: 600; }
.program summary, .record summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; min-height: 32px; }
.program summary:hover, .record summary:hover { color: var(--text); }
.program[open] summary, .record[open] summary { margin-bottom: 10px; }
.program .fine { margin-top: 8px; }
.exists { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.exists a:not(.btn) { color: var(--c); }

.trending { margin-top: 56px; }
.pair-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pair {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
  padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.pair-names { font-size: 16px; }
.pair-child { color: var(--muted); font-family: var(--mono); font-size: 13px; grid-column: 1; }
.pair-votes { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; grid-column: 1; }
.pair .btn { grid-column: 2; grid-row: 1 / span 3; }

.how { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: '0' counter(s); font: 500 12px/1 var(--mono); color: var(--c); }
.steps h3 { font-size: 17px; }
.steps p { color: var(--muted); font-size: 14.5px; }

/* ---------- fees ---------- */
.fees { display: grid; gap: 10px; }
.fees-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fees-head h3 { font-size: 16px; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.vol-wrap { display: inline-flex; align-items: center; gap: 4px; }
.vol-input { width: 140px; height: 36px; font-variant-numeric: tabular-nums; font-size: 16px; }
.fee-table td, .fee-table th { padding: 9px 10px; }
.dest { color: var(--dim); font-size: 13px; }
.dest.verified { color: var(--up); }
.dest.verified::before { content: '✓ '; }

/* ---------- modal ---------- */
.modal {
  width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7); overscroll-behavior: contain;
}
.modal::backdrop { background: rgba(4, 5, 6, 0.72); backdrop-filter: blur(6px); }
.modal form { display: grid; gap: 18px; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 22px; }
.modal-head .ticker { color: var(--c); }
.modal-lede { color: var(--muted); font-size: 14.5px; }
.launch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.launch-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.launch-list li > span:first-child { width: 70px; color: var(--dim); font-size: 13px; }

/* ---------- explore ---------- */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.toolbar .tabs { border-bottom: 0; flex: 1 1 auto; min-width: 0; }
.toolbar .search { width: 240px; margin-bottom: 8px; height: 40px; }
@media (max-width: 640px) { .toolbar .search { width: 100%; } }
.sort-blurb { color: var(--dim); font-size: 13.5px; margin: 14px 0 18px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.card-link {
  display: grid; text-decoration: none; border-radius: 16px; overflow: hidden; height: 100%;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.card-link:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-link:focus-visible { outline-offset: 3px; border-radius: 16px; }
.card-art { aspect-ratio: 1; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.025), transparent 65%), #0a0b0d; border-bottom: 1px solid var(--line); }
.organism { width: 100%; height: 100%; }
.card-body { padding: 12px 14px 14px; display: grid; gap: 4px; min-width: 0; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-ticker { font: 500 16px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gen { font: 500 11px/1 var(--mono); color: var(--c); border: 1px solid rgba(212, 255, 92, 0.3); padding: 3px 6px; border-radius: 999px; white-space: nowrap; }
.card-line { color: var(--muted); font-size: 13px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--dim); font-size: 12.5px; }
.card-meta .metric { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-market { display: flex; justify-content: space-between; font: 400 12.5px/1.3 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.lineage-link { color: inherit; text-decoration: none; }
.lineage-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- bloodlines ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.key::before { content: ''; display: inline-block; width: 18px; height: 2px; margin-right: 8px; vertical-align: 3px; border-radius: 2px; }
.key-a::before { background: var(--a); opacity: 0.6; }
.key-b::before { background: var(--b); opacity: 0.6; }
.key-up::before { background: var(--c); height: 3px; }
.key-down::before { background: #fff; height: 3px; }
.bloodlines-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .bloodlines-body { grid-template-columns: 1fr; } }
.graph-scroll {
  overflow: auto; max-height: 78vh; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 0%, rgba(212, 255, 92, 0.03), transparent 60%), var(--surface);
  overscroll-behavior: contain;
}
.graph { position: relative; }
.edges { position: absolute; inset: 0; pointer-events: none; }
.edge { fill: none; stroke-width: 1.4; opacity: 0.32; transition: opacity 0.2s, stroke 0.2s, stroke-width 0.2s; }
.edge.slot-a { stroke: var(--a); }
.edge.slot-b { stroke: var(--b); }
.has-focus .edge { opacity: 0.1; }
.has-focus .edge[data-on='up'] { stroke: var(--c); opacity: 0.95; stroke-width: 2.2; }
.has-focus .edge[data-on='down'] { stroke: #fff; opacity: 0.8; stroke-width: 2; }
.row-label { position: absolute; left: 16px; font: 500 11px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.node {
  position: absolute; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 1px;
  padding: 6px 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 11, 13, 0.92);
  cursor: pointer; text-align: center; transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
}
.node:hover { border-color: var(--line-2); }
.node-art { width: 100%; height: 86px; display: block; }
.node-ticker { font: 500 13px/1.2 var(--mono); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-sub { font-size: 10.5px; color: var(--dim); font-family: var(--mono); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.has-focus .node[data-rel='none'] { opacity: 0.38; }
.node[data-rel='focus'] { border-color: var(--c); background: rgba(212, 255, 92, 0.07); box-shadow: 0 0 0 3px rgba(212, 255, 92, 0.12); }
.node[data-rel='ancestor'] { border-color: rgba(212, 255, 92, 0.4); }
.node[data-rel='descendant'] { border-color: rgba(255, 255, 255, 0.4); }
.lineage-panel {
  position: sticky; top: 76px; display: grid; gap: 12px; padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
}
.lineage-panel h2 { font-size: 30px; }
.lineage-panel h2 .ticker { color: var(--c); }
.lineage-panel .lineage { color: var(--muted); font-family: var(--mono); font-size: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.kv div { display: grid; gap: 2px; }
.kv dt { color: var(--dim); font-size: 12px; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 18px; }
.kv.mono { grid-template-columns: 1fr; }
.kv.mono dd { font-size: 13px; color: var(--muted); }
.kids { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.kids a { color: var(--text); }
.genome code { color: var(--dim); }

/* ---------- coin ---------- */
.coin-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; margin-bottom: 28px; }
@media (max-width: 860px) { .coin-hero { grid-template-columns: 1fr; gap: 18px; } }
.coin-art {
  aspect-ratio: 1; max-height: 600px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 60%), var(--surface);
}
.coin-id { display: grid; gap: 10px; align-content: center; min-width: 0; }
.coin-ticker { font: 500 clamp(44px, 7vw, 76px)/1 var(--mono); letter-spacing: -0.04em; color: var(--c); overflow-wrap: anywhere; }
.coin-lineage { font: 400 18px/1.3 var(--mono); color: var(--muted); }
.coin-name { color: var(--muted); }
.genome-line { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 14px; }
.genome-line code { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px 18px; margin: 10px 0 4px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { display: grid; gap: 3px; min-width: 0; }
.facts dt { color: var(--dim); font-size: 12px; }
.facts dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.coin-tabs { margin-bottom: 24px; }
.tab-panel h2 { font-size: 20px; margin-bottom: 12px; }

.trade { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.trade-fees { grid-column: 1 / -1; padding-top: 8px; }
@media (max-width: 860px) { .trade { grid-template-columns: 1fr; } }
.trade-chart { display: grid; gap: 10px; }
.price-row { font-variant-numeric: tabular-nums; }
.price { font: 500 28px/1 var(--mono); }
.chart { height: 220px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); padding: 8px 0; }
.chart.up { color: var(--up); }
.chart.down { color: var(--down); }
.chart svg { width: 100%; height: 100%; }
.swap { display: grid; gap: 14px; align-content: start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg button { min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
.seg button[aria-checked='true'] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.est { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.trade-gen0 { display: grid; gap: 16px; max-width: 64ch; }
.trade-gen0 > p:first-child { font-size: 16px; color: var(--muted); }

.partner-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.partner {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color 0.15s;
}
.partner:hover { border-color: var(--c); }
.partner .muted { font-size: 13px; grid-column: 1; }
.partner .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--c); font-size: 14px; }

.genome-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; }
.genome-cols > div { display: grid; gap: 14px; align-content: start; min-width: 0; }
.genome-cols h2 { margin: 6px 0 0; }
@media (max-width: 860px) { .genome-cols { grid-template-columns: 1fr; } }
.genome-cols .btn { justify-self: start; }
.verify-out:empty { display: none; }
.verify-out { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.verify-result { font-weight: 600; }
.verify-result.ok { color: var(--up); }
.verify-result.bad { color: var(--down); }

.tree { display: grid; gap: 20px; }
.tree-row { display: grid; gap: 8px; }
.tree-row h3, h3.sub { font: 500 11.5px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
h3.sub { margin: 32px 0 12px; }
.tree-items { display: flex; flex-wrap: wrap; gap: 10px; }
.mini {
  display: grid; justify-items: center; width: 124px; padding: 8px 8px 10px; border-radius: 14px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); transition: border-color 0.15s;
}
.mini:hover { border-color: var(--line-2); }
.mini.rel-focus { border-color: var(--c); background: rgba(212, 255, 92, 0.06); }
.mini-art { width: 100%; height: 92px; display: block; }
.empty-line { color: var(--muted); margin-top: 18px; }
.empty-line a { color: var(--c); }

/* ---------- requests ---------- */
.propose { display: grid; gap: 12px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; }
.propose h2 { font-size: 18px; }
.propose-fields { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 12px; align-items: end; }
.propose-fields .x { padding-bottom: 12px; font-size: 18px; }
@media (max-width: 640px) {
  .propose-fields { grid-template-columns: 1fr 1fr; }
  .propose-fields .x { display: none; }
  .propose-fields .btn { grid-column: 1 / -1; }
}
.requests td { white-space: nowrap; }
.requests .ticker { font-size: 15px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.vote {
  min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.vote:hover { color: var(--text); border-color: rgba(236, 240, 232, 0.3); }
.vote[aria-pressed='true'] { color: #0b0d06; background: var(--c); border-color: transparent; }
.requests-page > .fine { margin-top: 14px; }
@media (max-width: 640px) {
  .requests, .requests tbody { display: block; }
  .requests thead { display: none; }
  .requests tr {
    display: grid; grid-template-columns: auto auto 1fr; gap: 8px 12px; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .requests td { border: 0; padding: 0; }
  .requests td:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; color: var(--muted); }
  .requests td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .requests td:nth-child(4)::after { content: ' votes'; color: var(--dim); }
  .requests td:nth-child(5) { grid-column: 3; grid-row: 2; }
}

.noscript { padding: 40px; text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   GAME LAYER — display type, HUD, incubator, reveal, cards, codex
   ===================================================================== */
:root {
  --display: 'Unbounded', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --epic: #b48cff;
  --gold: #ffc65c;
}

body {
  background:
    radial-gradient(60vw 40vh at 15% -5%, rgba(92, 214, 255, 0.07), transparent 70%),
    radial-gradient(50vw 40vh at 90% 0%, rgba(255, 121, 180, 0.06), transparent 70%),
    radial-gradient(70vw 50vh at 50% 110%, rgba(212, 255, 92, 0.04), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.ambient { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }
.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header { z-index: 20; }

.eyebrow.glow { color: var(--c); text-shadow: 0 0 18px rgba(212, 255, 92, 0.45); }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.92; }
.page-head h1, .page-head h1.display { font: 800 clamp(38px, 6.5vw, 72px)/0.95 var(--display); letter-spacing: -0.04em; }
.empty h1 { font: 700 34px/1.1 var(--display); letter-spacing: -0.03em; }

/* ---------- header HUD ---------- */
.header-inner { gap: 16px; }
.hud-bar { display: flex; align-items: center; gap: 6px; }
.player {
  position: relative; display: flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(20, 23, 27, 0.7);
  transition: border-color 0.2s, background-color 0.2s;
}
.player:hover { border-color: rgba(212, 255, 92, 0.5); background: rgba(212, 255, 92, 0.06); }
.player-ring {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #f0ffb8, var(--c) 45%, #7aa21f);
  color: #0b0d06; box-shadow: 0 0 16px rgba(212, 255, 92, 0.45);
}
.player-lvl { font: 800 13px/1 var(--display); }
.player-info { display: grid; gap: 4px; min-width: 92px; }
.player-title { font: 600 11px/1 var(--mono); color: var(--text); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.xpbar { position: relative; display: block; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.xpbar-fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--a), var(--c), var(--b)); border-radius: inherit;
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.15);
}
.player.bump { animation: bump 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bump { 40% { transform: scale(1.08); } }
.xp-float {
  position: absolute; right: 8px; top: 100%; font: 800 12px/1 var(--display); color: var(--c); pointer-events: none;
  text-shadow: 0 0 12px rgba(212, 255, 92, 0.7); animation: xpfloat 1.3s ease-out forwards;
}
@keyframes xpfloat { from { opacity: 0; transform: translateY(-4px); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(22px); } }
.sound-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(20, 23, 27, 0.7); color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.sound-btn:hover { color: var(--text); border-color: rgba(236, 240, 232, 0.3); }
.sound-btn[aria-pressed='true'] { color: var(--c); }
@media (max-width: 1080px) { .proto-badge { display: none; } }
@media (max-width: 860px) { .player-info { display: none; } .player { padding: 4px; } }
@media (max-width: 640px) {
  .site-header .header-inner { gap: 6px; }
  .nav a { padding: 8px 8px; font-size: 13.5px; }
  .sound-btn { width: 34px; height: 34px; }
  .player-ring { width: 28px; height: 28px; }
}
@media (max-width: 560px) { .nav a[data-section='codex'] { display: none; } }
@media (max-width: 760px) { .nav a[data-section='requests'] { display: none; } }

/* ---------- lab head ---------- */
.lab-head { gap: 14px; margin: 10px 0 26px; }
.lab-head h1.display { font: 800 clamp(44px, 10vw, 124px)/0.92 var(--display); letter-spacing: -0.045em; }
.lab-head .line { display: inline-block; }
.grad {
  background: linear-gradient(100deg, var(--a) 0%, var(--c) 35%, var(--b) 65%, var(--a) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s linear infinite;
  filter: drop-shadow(0 0 28px rgba(212, 255, 92, 0.18));
}
@keyframes sheen { to { background-position: -220% 0; } }

/* ---------- incubator stage ---------- */
.stage {
  background: #08090c;
  border: 1px solid rgba(212, 255, 92, 0.16);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 120px -50px rgba(212, 255, 92, 0.25), inset 0 0 80px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.4s, border-color 0.4s;
  isolation: isolate;
}
.stage::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, rgba(92, 214, 255, 0.7) 78%, rgba(212, 255, 92, 0.9) 84%, rgba(255, 121, 180, 0.7) 90%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.55; animation: spin-border 6s linear infinite;
}
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --spin: 360deg; } }
.stage[data-state='charge'], .stage[data-state='launch'], .stage[data-state='splice'] {
  border-color: rgba(212, 255, 92, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 80px -10px rgba(212, 255, 92, 0.45), inset 0 0 80px rgba(0, 0, 0, 0.5);
}
.stage[data-state='charge']::before, .stage[data-state='launch']::before, .stage[data-state='splice']::before { opacity: 1; animation-duration: 1.1s; }
.stage[data-state='bad'] { border-color: rgba(255, 122, 107, 0.35); }
.stage.shake { animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px); }
  40%, 60% { transform: translate(7px, -3px); }
}

.hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; font: 600 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(236, 240, 232, 0.5); }
.hud > div { position: absolute; display: flex; align-items: center; gap: 8px; }
.hud-tl { top: 16px; left: 18px; }
.hud-tr { top: 16px; right: 18px; }
.hud-bl { bottom: 14px; left: 18px; right: 40%; overflow: hidden; }
.hud-br { bottom: 14px; right: 18px; }
.hud-label { color: rgba(236, 240, 232, 0.38); }
.hud-status {
  color: var(--c); padding: 4px 7px; border: 1px solid rgba(212, 255, 92, 0.35); border-radius: 4px;
  background: rgba(212, 255, 92, 0.06); text-shadow: 0 0 10px rgba(212, 255, 92, 0.6);
}
.hud-status[data-state='bad'] { color: var(--down); border-color: rgba(255, 122, 107, 0.4); background: rgba(255, 122, 107, 0.06); text-shadow: none; }
.hud-status[data-state='charge'], .hud-status[data-state='launch'], .hud-status[data-state='splice'], .hud-status[data-state='bang'] { animation: blink 0.5s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.hud-meter { width: 70px; height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 9px; overflow: hidden; position: relative; }
.hud-meter-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); background: linear-gradient(90deg, var(--a), var(--b)); transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1); }
.hud-val { color: var(--text); font-variant-numeric: tabular-nums; min-width: 2ch; }
.hud-stream { display: block; white-space: nowrap; color: rgba(236, 240, 232, 0.16); letter-spacing: 0.06em; text-transform: none; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 80%, transparent); }
.hud-stream-inner { display: inline-block; animation: stream 40s linear infinite; }
@keyframes stream { to { transform: translateX(-50%); } }
.hud-hint { color: rgba(236, 240, 232, 0.4); }
@media (max-width: 719px) {
  .hud-tr .hud-label:first-child, .hud-meter { display: none; }
  .hud-bl { display: none; }
  .hud-br { left: 18px; right: auto; }
}

.reveal {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 4; pointer-events: none;
  display: grid; justify-items: center; gap: 6px; text-align: center; width: max-content; max-width: calc(100% - 32px);
}
.reveal[hidden] { display: none; }
.reveal.in { animation: reveal-in 0.75s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes reveal-in { from { opacity: 0; transform: translateX(-50%) scale(0.6); filter: blur(10px); } }
.reveal-tier {
  font: 800 12px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--rc);
  padding: 7px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent);
  background: color-mix(in srgb, var(--rc) 12%, rgba(8, 9, 12, 0.7)); text-shadow: 0 0 14px var(--rc);
  box-shadow: 0 0 30px -6px var(--rc);
}
.reveal[data-tier='legendary'] .reveal-tier, .reveal[data-tier='mythic'] .reveal-tier { animation: pulse-glow 1.4s ease-in-out infinite; }
@keyframes pulse-glow { 50% { box-shadow: 0 0 50px 0 var(--rc); } }
.reveal-ticker {
  font: 800 clamp(30px, 5vw, 52px)/1 var(--display); letter-spacing: -0.04em; color: #fff;
  text-shadow: 0 0 24px var(--rc), 0 0 2px #fff;
}
.reveal-sub { font: 500 12px/1.3 var(--mono); color: rgba(236, 240, 232, 0.75); }
.reveal-xp { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.xp-chip {
  font: 700 11px/1 var(--mono); color: var(--c); padding: 5px 8px; border-radius: 6px;
  background: rgba(212, 255, 92, 0.1); border: 1px solid rgba(212, 255, 92, 0.3);
  animation: chip-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.xp-chip:nth-child(2) { animation-delay: 0.12s; }
.xp-chip:nth-child(3) { animation-delay: 0.24s; }
.xp-chip:nth-child(4) { animation-delay: 0.36s; }
.xp-chip[data-type='species'] { color: var(--a); background: rgba(92, 214, 255, 0.1); border-color: rgba(92, 214, 255, 0.35); }
.xp-chip[data-type='mutation'] { color: var(--epic); background: rgba(180, 140, 255, 0.1); border-color: rgba(180, 140, 255, 0.35); }
.xp-chip[data-type='shiny'] { color: var(--gold); background: rgba(255, 198, 92, 0.12); border-color: rgba(255, 198, 92, 0.4); }
.xp-chip.dim { color: var(--muted); background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px) scale(0.8); } }
@media (max-width: 719px) {
  .reveal { top: 46px; gap: 4px; }
  .reveal-xp { display: none; }
}

/* ---------- breed button ---------- */
.breed-btn {
  position: relative; overflow: hidden; min-height: 62px; padding: 0 22px 0 18px; gap: 12px;
  font: 800 15px/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  background: linear-gradient(180deg, #e6ff8f, var(--c) 55%, #b6e03a);
  box-shadow: 0 0 0 1px rgba(212, 255, 92, 0.5), 0 0 40px -6px rgba(212, 255, 92, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(80, 110, 10, 0.4);
  animation: breathe 2.4s ease-in-out infinite;
}
.breed-btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  transform: translateX(-120%); animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep { 55%, 100% { transform: translateX(120%); } }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgba(212, 255, 92, 0.6), 0 0 64px -2px rgba(212, 255, 92, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(80, 110, 10, 0.4); } }
.breed-btn:hover { background: linear-gradient(180deg, #f0ffb0, #ddff70 55%, #c2ea48); transform: translateY(-1px); }
.breed-btn:active { transform: translateY(1px) scale(0.98); }
.breed-btn:disabled, .breed-btn.working { animation: none; }
.breed-btn:disabled::after { display: none; }
.breed-btn.working { background: linear-gradient(180deg, #e6ff8f, var(--c)); opacity: 0.85; }
.breed-kbd {
  font: 700 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; border: 1px solid rgba(11, 13, 6, 0.35);
  background: rgba(11, 13, 6, 0.08); color: rgba(11, 13, 6, 0.7);
}
@media (hover: none) { .breed-kbd { display: none; } }
.breed-btn:disabled .breed-kbd { display: none; }

.ps-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.side-b .ps-top { justify-content: flex-end; }
.ps-ticker { font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; font-size: 28px; }
.side-a .ps-ticker { text-shadow: 0 0 22px rgba(92, 214, 255, 0.4); }
.side-b .ps-ticker { text-shadow: 0 0 22px rgba(255, 121, 180, 0.4); }

/* ---------- rarity + stats ---------- */
.rarity {
  display: inline-flex; align-items: center; font: 700 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rc); padding: 4px 7px; border-radius: 5px; white-space: nowrap;
  background: color-mix(in srgb, var(--rc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent);
}
.rarity[data-tier='legendary'], .rarity[data-tier='mythic'] { box-shadow: 0 0 14px -2px var(--rc); }
.rarity[data-tier='mythic'] {
  color: #fff; border-color: transparent;
  background: linear-gradient(90deg, #ff79b4, #b48cff, #5cd6ff, #d4ff5c, #ffc65c, #ff79b4); background-size: 300% 100%; animation: sheen 3s linear infinite;
}
.shiny-star { color: var(--gold); text-shadow: 0 0 8px var(--gold); }

.stats { display: grid; gap: 7px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.stat { display: grid; grid-template-columns: 36px 1fr 28px; align-items: center; gap: 10px; }
.stat-id { font: 700 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.stat-bar { position: relative; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.stat-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); border-radius: inherit; transition: transform 1s cubic-bezier(0.2, 0.9, 0.2, 1.05); }
.stat:nth-child(1) .stat-fill { background: linear-gradient(90deg, #4be3a0, var(--up)); }
.stat:nth-child(2) .stat-fill { background: linear-gradient(90deg, #3aa6ff, var(--a)); transition-delay: 0.08s; }
.stat:nth-child(3) .stat-fill { background: linear-gradient(90deg, #8f6cff, var(--epic)); transition-delay: 0.16s; }
.stat:nth-child(4) .stat-fill { background: linear-gradient(90deg, #ff4f8f, var(--b)); transition-delay: 0.24s; }
.stat-val { font: 600 13px/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.power { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); }
.power span { font: 700 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.power-num { font: 800 22px/1 var(--display); color: var(--c); font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(212, 255, 92, 0.45); }

/* ---------- result panel ---------- */
.result { animation: rise 0.6s cubic-bezier(0.2, 1, 0.3, 1); }
.result-badges { display: flex; gap: 8px; align-items: center; }
.result-ticker { font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; font-size: 46px; }
.ticker-input { font-weight: 800; }
.inherit tbody tr { animation: row-in 0.45s cubic-bezier(0.2, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 150ms); }
@keyframes row-in { from { opacity: 0; transform: translateX(-10px); } }

/* ---------- trending pairs ---------- */
.trending h2, .section-head h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; }
.pair { position: relative; grid-template-columns: auto 1fr auto; transition: border-color 0.2s, transform 0.2s; }
.pair:hover { border-color: rgba(212, 255, 92, 0.35); transform: translateY(-2px); }
.pair-rank { grid-column: 1; grid-row: 1 / span 3; font: 800 22px/1 var(--display); color: rgba(236, 240, 232, 0.18); align-self: center; }
.pair-names, .pair-child, .pair-votes { grid-column: 2; }
.pair .btn { grid-column: 3; }

.steps li::before { font: 800 14px/1 var(--display); color: var(--c); text-shadow: 0 0 12px rgba(212, 255, 92, 0.5); }
.steps h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }

/* ---------- game cards (explore) ---------- */
.grid { perspective: 1200px; }
.card { --rc: var(--muted); }
.card-link {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
  border-color: color-mix(in srgb, var(--rc) 22%, var(--line));
}
.card-link.tilting { transition: transform 0.08s linear, border-color 0.25s, box-shadow 0.25s; }
.card-link:hover {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  border-color: color-mix(in srgb, var(--rc) 70%, transparent);
  box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--rc) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--rc) 30%, transparent);
}
.card-link::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 45%);
  mix-blend-mode: plus-lighter;
}
.card-link:hover::after { opacity: 1; }
.card[data-tier='legendary'] .card-link, .card[data-tier='mythic'] .card-link, .card.shiny .card-link {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--spin, 0deg), var(--rc), #fff8, var(--rc), transparent, var(--rc)) border-box;
  animation: spin-border 5s linear infinite;
}
.card.shiny .card-link { --rc: var(--gold); }
.card[data-tier='mythic'] .card-link {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--spin, 0deg), #ff79b4, #b48cff, #5cd6ff, #d4ff5c, #ffc65c, #ff79b4) border-box;
}
.card-link:hover::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(92, 214, 255, 0.08) 42%, rgba(255, 121, 180, 0.1) 50%, rgba(212, 255, 92, 0.08) 58%, transparent 70%);
  background-size: 250% 250%; background-position: var(--mx, 50%) var(--my, 50%);
  mix-blend-mode: plus-lighter;
}
.card-art { position: relative; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--rc) 10%, transparent), transparent 65%), #0a0b0d; }
.card-power {
  position: absolute; top: 10px; right: 10px; font: 800 10.5px/1 var(--display); letter-spacing: 0.04em; color: var(--text);
  padding: 5px 7px; border-radius: 6px; background: rgba(8, 9, 12, 0.7); border: 1px solid var(--line-2); backdrop-filter: blur(6px);
}
.card-ticker { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; font-size: 16px; }
.card-meta { align-items: center; }

/* ---------- coin hero ---------- */
.coin-art { position: relative; border-color: color-mix(in srgb, var(--rc) 30%, var(--line)); box-shadow: 0 30px 100px -50px var(--rc); overflow: hidden; }
.coin-art canvas { cursor: pointer; }
.coin-art.shiny, .coin-art[data-tier='legendary'], .coin-art[data-tier='mythic'] {
  border-color: transparent;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 60%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--spin, 0deg), var(--rc), #fff6, var(--rc), transparent, var(--rc)) border-box;
  animation: spin-border 6s linear infinite;
}
.coin-art.shiny { --rc: var(--gold); }
.art-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(236, 240, 232, 0.35); pointer-events: none; }
.coin-badges { display: flex; gap: 8px; align-items: center; }
.coin-ticker { font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; color: #fff; text-shadow: 0 0 40px color-mix(in srgb, var(--rc) 60%, transparent); }
.coin-id .stats { margin-top: 6px; }

/* ---------- codex ---------- */
.player-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 22px; margin-bottom: 36px;
  border-radius: var(--radius); border: 1px solid rgba(212, 255, 92, 0.22);
  background: linear-gradient(120deg, rgba(212, 255, 92, 0.06), transparent 50%), var(--surface);
}
@media (max-width: 760px) { .player-card { grid-template-columns: auto 1fr; } .pc-stats { grid-column: 1 / -1; } }
.pc-level {
  --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; align-content: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.08) 0);
}
.pc-level::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.pc-num, .pc-lvl { position: relative; }
.pc-num { font: 800 30px/1 var(--display); color: var(--c); }
.pc-lvl { font: 700 10px/1 var(--mono); color: var(--muted); letter-spacing: 0.15em; }
.pc-main { display: grid; gap: 8px; min-width: 0; }
.pc-title { font: 800 22px/1.1 var(--display); letter-spacing: -0.03em; }
.pc-main .xpbar { height: 8px; }
.pc-xp { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pc-stats { display: grid; grid-template-columns: repeat(5, auto); gap: 18px; margin: 0; }
.pc-stats div { display: grid; gap: 4px; }
.pc-stats dt { font: 600 10.5px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.pc-stats dd { margin: 0; font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.cx-section { margin-bottom: 40px; }
.cx-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; }
.cx-matrix { display: grid; grid-template-columns: 88px repeat(6, minmax(96px, 1fr)); gap: 8px; min-width: 720px; }
.cx-corner { font: 600 10px/1.3 var(--mono); color: var(--dim); align-self: end; }
.cx-colhead, .cx-rowhead { font: 600 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.cx-colhead { text-align: center; align-self: end; padding-bottom: 4px; }
.cx-rowhead { align-self: center; }
.cx-row { display: contents; list-style: none; }
.cx-cell {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; grid-template-rows: 1fr auto; justify-items: center; overflow: hidden; padding: 4px 4px 8px;
}
.cx-cell.found { border-color: rgba(212, 255, 92, 0.35); background: radial-gradient(circle at 50% 45%, rgba(212, 255, 92, 0.07), transparent 70%), var(--surface); }
.cx-cell.unknown { border-style: dashed; background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, 0.015) 8px 16px), var(--surface); }
.cx-art { width: 100%; height: 100%; min-height: 0; display: block; }
.cx-q { align-self: center; font: 800 28px/1 var(--display); color: rgba(236, 240, 232, 0.12); }
.cx-name { font: 600 9.5px/1.2 var(--mono); color: var(--muted); text-align: center; padding: 0 4px; }
.cx-cell.unknown .cx-name { color: var(--dim); }
.cx-cell.found .cx-name { color: var(--text); }
.cx-tag { position: absolute; top: 6px; left: 6px; font: 600 8.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.mut-grid, .ach-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mut-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mut-tile { display: grid; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); opacity: 0.55; }
.mut-tile.on { opacity: 1; }
.mut-count { font: 800 30px/1 var(--display); }
.mut-name { font-weight: 600; }
.mut-odds { color: var(--dim); font-size: 12.5px; font-family: var(--mono); }
.m-minor.on { border-color: rgba(92, 214, 255, 0.35); } .m-minor .mut-count { color: var(--a); }
.m-major.on { border-color: rgba(255, 198, 92, 0.35); } .m-major .mut-count { color: var(--gold); }
.m-exceptional.on { border-color: rgba(255, 121, 180, 0.45); } .m-exceptional .mut-count { color: var(--b); }
.m-shiny.on { border-color: rgba(255, 198, 92, 0.5); box-shadow: 0 0 30px -10px var(--gold); } .m-shiny .mut-count { color: var(--gold); }
.ach-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ach { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); opacity: 0.5; filter: grayscale(1); }
.ach.got { opacity: 1; filter: none; border-color: rgba(212, 255, 92, 0.3); }
.ach .ach-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.ach.got .ach-icon { background: radial-gradient(circle at 30% 30%, #f0ffb8, var(--c) 50%, #7aa21f); color: #0b0d06; box-shadow: 0 0 18px -2px rgba(212, 255, 92, 0.6); }
.ach-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.ach-text strong { font-weight: 600; }
.ach-text > span { color: var(--muted); font-size: 13px; }
.ach-prog { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ach-prog-fill { flex: 1; height: 4px; border-radius: 9px; background: linear-gradient(90deg, var(--c) calc(var(--p) * 100%), rgba(255, 255, 255, 0.08) 0); }
.ach-prog-num { font: 600 11px/1 var(--mono); color: var(--dim); }

/* ---------- toasts ---------- */
.toast.achievement, .toast.level, .toast.launch {
  border-radius: 16px; padding: 10px 16px 10px 10px; border-color: rgba(212, 255, 92, 0.45);
  background: linear-gradient(120deg, rgba(212, 255, 92, 0.14), rgba(20, 23, 27, 0.96) 60%);
  box-shadow: 0 0 40px -8px rgba(212, 255, 92, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toast-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.toast.launch { padding: 12px 18px; font-weight: 600; }
@keyframes toast-pop { from { opacity: 0; transform: translateY(20px) scale(0.85); } }
.toast-ach { display: flex; gap: 12px; align-items: center; }
.toast-ach > span:last-child { display: grid; gap: 2px; text-align: left; }
.toast-ach strong { font: 800 12px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--c); }
.toast .ach-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: radial-gradient(circle at 30% 30%, #f0ffb8, var(--c) 50%, #7aa21f); color: #0b0d06; }
.toast .ach-icon.lvl { font: 800 16px/1 var(--display); border-radius: 50%; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

/* ---------- page transitions ---------- */
::view-transition-old(root) { animation: vt-out 0.18s ease-in both; }
::view-transition-new(root) { animation: vt-in 0.32s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(0.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

.nav a { transition: color 0.15s, background-color 0.15s, box-shadow 0.2s; }
.nav a[aria-current='page'] { box-shadow: inset 0 0 0 1px rgba(212, 255, 92, 0.3); color: var(--c); background: rgba(212, 255, 92, 0.07); }

@media (prefers-reduced-motion: reduce) {
  .stage::before, .grad, .breed-btn, .breed-btn::after, .hud-stream-inner, .card-link, .coin-art { animation: none !important; }
  .card-link { transform: none !important; }
}

/* =====================================================================
   LANDING — pinned scroll story
   ===================================================================== */
main.full { max-width: none; padding: 0; }
.story { position: relative; height: 1000vh; }
.story-stage {
  position: sticky; top: 60px; height: calc(100vh - 60px); height: calc(100svh - 60px);
  overflow: hidden; isolation: isolate; background: #07080a;
}
.story-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.story-stage::after {
  content: ''; position: absolute; inset: auto 0 0; height: 16vh; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(7, 8, 10, 0.85));
}
.story-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 4; background: rgba(255, 255, 255, 0.06); }
.story-progress span {
  display: block; height: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--a), var(--c), var(--b)); box-shadow: 0 0 12px rgba(212, 255, 92, 0.6);
}

.story-copy { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.beat {
  position: absolute; top: 0; bottom: 0; left: clamp(20px, 6vw, 96px); width: min(36vw, 520px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  opacity: 0; visibility: hidden; will-change: opacity, transform;
}
.beat.on { pointer-events: auto; }
.beat.hero, .beat.final { left: 0; right: 0; width: auto; align-items: center; text-align: center; padding: 0 20px; }
.beat.hero::before, .beat.final::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(1000px, 96vw); height: 62%; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(7, 8, 10, 0.78), rgba(7, 8, 10, 0.35) 60%, transparent);
}
.story-h1 { font: 800 clamp(50px, 9vw, 136px)/0.9 var(--display); letter-spacing: -0.05em; text-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); }
.story-lede { max-width: 46ch; font-size: clamp(16px, 1.5vw, 19px); color: rgba(236, 240, 232, 0.78); text-wrap: balance; }
.hero-actions { justify-content: center; margin-top: 6px; }
.btn.big { min-height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn.primary.big { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; box-shadow: 0 0 40px -8px rgba(212, 255, 92, 0.7); }

.beat-eyebrow { font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(236, 240, 232, 0.5); }
.beat-eyebrow.live { color: var(--c); text-shadow: 0 0 14px rgba(212, 255, 92, 0.5); }
.beat-h { font: 800 clamp(34px, 4.2vw, 64px)/0.98 var(--display); letter-spacing: -0.045em; text-wrap: balance; }
.beat-p { font-size: 17px; line-height: 1.55; color: rgba(236, 240, 232, 0.7); max-width: 38ch; text-wrap: pretty; }

.genes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px; }
.gene {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font: 600 12.5px/1 var(--mono);
  border: 1px solid var(--line-2); color: var(--dim); background: rgba(255, 255, 255, 0.02);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.gene-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.5; transition: opacity 0.3s, box-shadow 0.3s; }
.gene.lit { color: var(--c); border-color: rgba(212, 255, 92, 0.5); background: rgba(212, 255, 92, 0.08); box-shadow: 0 0 20px -6px rgba(212, 255, 92, 0.6); }
.gene.lit .gene-dot { opacity: 1; box-shadow: 0 0 8px var(--c); }

.born-card {
  display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 8px 12px;
  padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(212, 255, 92, 0.3);
  background: linear-gradient(120deg, rgba(212, 255, 92, 0.1), rgba(10, 11, 13, 0.6)); backdrop-filter: blur(8px);
}
.born-ticker { font: 800 34px/1 var(--display); letter-spacing: -0.04em; color: var(--c); text-shadow: 0 0 22px rgba(212, 255, 92, 0.5); }
.born-sub { grid-column: 1 / -1; font: 500 12.5px/1.3 var(--mono); color: var(--muted); }

.fee-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 360px; }
.fee-list li {
  display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-left: 3px solid var(--c); font-size: 14px;
}
.fee-list b { font: 700 14px/1.2 var(--mono); color: var(--c); font-variant-numeric: tabular-nums; }

.story-rail { position: absolute; z-index: 3; left: clamp(20px, 6vw, 96px); bottom: 28px; display: flex; gap: 6px; }
.rail-btn {
  display: grid; gap: 6px; padding: 10px 10px 4px 0; min-width: 72px; text-align: left; border: 0; background: none; cursor: pointer;
  color: rgba(236, 240, 232, 0.32); font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  border-top: 1px solid rgba(236, 240, 232, 0.14); transition: color 0.3s, border-color 0.3s;
}
.rail-btn:hover { color: rgba(236, 240, 232, 0.75); }
.rail-btn[aria-current='step'] { color: var(--c); border-top-color: var(--c); }
.rail-n { opacity: 0.6; }
.story-stage:not(.started) .story-rail { opacity: 0; pointer-events: none; }
.story-rail { transition: opacity 0.4s; }

.story-cue {
  position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 20px 0 14px; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(236, 240, 232, 0.16); background: rgba(10, 11, 13, 0.6); backdrop-filter: blur(12px);
  color: var(--text); font: 600 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: 0 14px 40px -14px rgba(212, 255, 92, 0.5); transition: opacity 0.4s, border-color 0.2s;
  animation: cue-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s both;
}
.story-cue:hover { border-color: rgba(212, 255, 92, 0.5); }
.story-stage.started .story-cue { opacity: 0; pointer-events: none; }
.mouse { position: relative; width: 16px; height: 24px; border: 1.5px solid rgba(236, 240, 232, 0.7); border-radius: 9px; }
.mouse i { position: absolute; top: 5px; left: 50%; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: var(--c); animation: wheel 1.6s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes cue-in { from { opacity: 0; transform: translate(-50%, 14px); } }

.after { max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter) 40px; display: grid; gap: 56px; }
.after-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.after-card { display: grid; gap: 6px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.after-n { font: 800 clamp(30px, 4vw, 44px)/1 var(--display); letter-spacing: -0.04em; color: var(--text); }
.after-cta { display: grid; gap: 20px; justify-items: center; text-align: center; }
.after-cta h2 { font-size: clamp(36px, 6vw, 72px); }

@media (max-width: 759px) {
  .story { height: 880vh; }
  .beat { top: auto; bottom: 0; left: 18px; right: 18px; width: auto; height: auto; justify-content: flex-end; gap: 10px; padding-bottom: 84px; }
  .beat.hero, .beat.final { top: 0; bottom: 0; justify-content: center; padding-bottom: 0; }
  .beat:not(.hero):not(.final)::before {
    content: ''; position: absolute; inset: -40px -18px 0; z-index: -1;
    background: linear-gradient(transparent, rgba(7, 8, 10, 0.92) 30%);
  }
  .beat-h { font-size: clamp(28px, 8.4vw, 40px); }
  .beat-p { font-size: 15px; }
  .genes { grid-template-columns: repeat(3, auto); gap: 6px; }
  .gene { padding: 7px 9px; font-size: 11.5px; }
  .born-ticker { font-size: 26px; }
  .fee-list li { padding: 8px 12px; font-size: 13px; }
  .story-rail { left: 18px; right: 18px; bottom: 18px; gap: 4px; }
  .rail-btn { min-width: 0; flex: 1; }
  .rail-name { display: none; }
  .story-cue { bottom: 22px; }
  .after-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-height: 640px) and (min-width: 760px) { .story-rail { display: none; } }
@media (prefers-reduced-motion: reduce) { .story-cue, .mouse i { animation: none; } }

/* =====================================================================
   DOCS
   ===================================================================== */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 20px 18px; scrollbar-width: thin; }
.toc-progress { position: absolute; left: 0; top: 6px; bottom: 20px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); }
.toc-progress span { display: block; height: 100%; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--a), var(--c), var(--b)); border-radius: inherit; }
.toc-group + .toc-group { margin-top: 18px; }
.toc-g { font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.docs-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13.5px; transition: color 0.15s, background-color 0.15s; }
.docs-toc a:hover { color: var(--text); background: var(--surface-2); }
.docs-toc a[aria-current] { color: var(--c); background: rgba(212, 255, 92, 0.07); box-shadow: inset 2px 0 0 var(--c); }
.docs-mobile-nav { display: none; }
@media (max-width: 960px) {
  .docs { grid-template-columns: 1fr; gap: 0; }
  .docs-toc { display: none; }
  .docs-mobile-nav { display: block; position: sticky; top: 60px; z-index: 10; margin: 0 calc(-1 * var(--gutter)) 20px; padding: 10px var(--gutter); background: rgba(8, 9, 11, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .docs-jump { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background-color: var(--surface); color: var(--text); padding: 0 12px; font-size: 16px; }
}

.docs-body { min-width: 0; max-width: 820px; }
.docs-head { display: grid; gap: 14px; margin-bottom: 48px; }
.docs-head h1 { font-size: clamp(40px, 6vw, 72px); }
.doc-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.doc-fact { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.doc-fact span { font: 600 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.doc-fact strong { font: 600 14px/1.2 var(--mono); color: var(--text); }

.doc-sec { padding: 40px 0 28px; border-top: 1px solid var(--line); scroll-margin-top: 84px; display: grid; gap: 16px; }
@media (max-width: 960px) { .doc-sec { scroll-margin-top: 130px; } }
.sec-group { font: 600 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.doc-sec h2 { font: 800 clamp(28px, 3.6vw, 40px)/1.05 var(--display); letter-spacing: -0.04em; margin-top: -6px; }
.doc-sec h3 { font: 700 18px/1.3 var(--display); letter-spacing: -0.02em; margin-top: 14px; scroll-margin-top: 84px; }
.doc-sec > p, .doc-list { font-size: 16px; line-height: 1.7; color: rgba(236, 240, 232, 0.8); max-width: 70ch; }
.doc-sec em { color: var(--text); font-style: normal; font-weight: 600; }
.doc-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.doc-list strong { color: var(--text); }

.math {
  overflow-x: auto; overflow-y: hidden; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(212, 255, 92, 0.14);
  background: linear-gradient(90deg, rgba(212, 255, 92, 0.04), transparent 60%), var(--surface); color: #f2f4ec; scrollbar-width: thin;
}
.math > code, .imath > code { color: #c9d4b8; font-size: 12.5px; white-space: pre-wrap; }
.math .katex-display { margin: 0; }
.math .katex { font-size: 1.12em; }
.imath .katex { font-size: 1.04em; color: #f2f4ec; }

.callout { padding: 14px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.6; border: 1px solid; }
.callout.info { border-color: rgba(92, 214, 255, 0.3); background: rgba(92, 214, 255, 0.06); }
.callout.warn { border-color: rgba(255, 198, 92, 0.35); background: rgba(255, 198, 92, 0.06); }
.callout a { color: var(--a); }

.doc-table { font-size: 14px; }
.doc-table th, .doc-table td { padding: 10px 12px; vertical-align: top; }
.doc-table tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
.doc-table td { color: rgba(236, 240, 232, 0.78); }
.doc-table.compact th, .doc-table.compact td { padding: 7px 10px; font-size: 13px; }
.ok { color: var(--up); font: 600 12px/1 var(--mono); }
.ok::before { content: '● '; }
.sim { color: var(--warn); font: 600 12px/1 var(--mono); }
.sim::before { content: '◌ '; }

.doc-fig { margin: 8px 0; display: grid; gap: 10px; }
.doc-fig figcaption { font-size: 13px; color: var(--dim); }
.doc-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* diagrams */
.diagram-wrap { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(212, 255, 92, 0.04), transparent 60%), var(--surface); overflow-x: auto; }
.diagram { display: block; width: 100%; min-width: 620px; height: auto; }
.diagram .node rect { fill: #121519; stroke: rgba(236, 240, 232, 0.16); stroke-width: 1; }
.diagram .node.hot rect { stroke: rgba(212, 255, 92, 0.6); fill: rgba(212, 255, 92, 0.06); }
.diagram .n-title { fill: var(--text); font: 600 12.5px var(--sans); }
.diagram .n-sub { fill: var(--muted); font: 500 10.5px var(--mono); }
.diagram .lane { fill: var(--dim); font: 600 10.5px var(--mono); letter-spacing: 0.12em; }
.diagram .flow { fill: none; stroke: rgba(212, 255, 92, 0.65); stroke-width: 1.6; stroke-dasharray: 5 6; animation: flow 1.2s linear infinite; }
.diagram .flow.a { stroke: var(--a); }
.diagram .flow.b { stroke: var(--b); }
.diagram .flow.c { stroke: rgba(236, 240, 232, 0.35); }
@keyframes flow { to { stroke-dashoffset: -22; } }
.steps-anim .step { opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s cubic-bezier(0.2, 1, 0.3, 1); transition-delay: calc(var(--i) * 110ms); }
.steps-anim.in .step { opacity: 1; transform: none; }
.sankey .src { fill: rgba(236, 240, 232, 0.12); }
.sankey .band { opacity: 0.4; transform-box: view-box; transform-origin: 110px 0; transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.2, 1), opacity 0.2s; transition-delay: calc(var(--i) * 120ms); }
.sankey-wrap.in .sankey .band { transform: scaleX(1); }
.sankey .band:hover { opacity: 0.65; }
.range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.range output { font: 700 15px/1 var(--mono); color: var(--text); min-width: 11ch; font-variant-numeric: tabular-nums; }
.range input[type='range'] { flex: 1; min-width: 180px; accent-color: var(--c); height: 28px; }

/* charts */
.viz { margin: 0; display: grid; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.chart-plot { position: relative; width: 100%; }
.chart-plot svg { display: block; overflow: visible; }
.viz .grid { stroke: rgba(236, 240, 232, 0.07); stroke-width: 1; }
.viz .axis { stroke: rgba(236, 240, 232, 0.22); stroke-width: 1; }
.viz .tick, .viz .xlab, .viz .axis-label { fill: var(--dim); font: 500 11px var(--mono); }
.viz .val { fill: var(--muted); font: 600 11px var(--mono); }
.viz .bar { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.2, 1.04), filter 0.15s; }
.viz .bar-g:hover .bar, .viz .bar-g:focus .bar { filter: brightness(1.25); }
.viz .bar-g:focus { outline: none; }
.viz .bar-g:focus-visible .hit { stroke: var(--c); stroke-width: 1.5; }
.viz .hit { fill: transparent; }
.viz .expect { stroke: var(--text); stroke-width: 1.5; opacity: 0.8; }
.viz .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viz .line.weak { stroke-width: 1.5; opacity: 0.6; }
.viz .end-dot { stroke: var(--surface); stroke-width: 2; }
.viz .cross { stroke: rgba(236, 240, 232, 0.35); stroke-width: 1; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px;
  background: rgba(20, 23, 27, 0.96); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 12.5px; white-space: nowrap;
}
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row strong { font: 600 13px/1.2 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.tip-row span:last-child { color: var(--muted); }
.tip-key { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-key { width: 14px; height: 2px; border-radius: 2px; }
.chart-table summary { cursor: pointer; font-size: 12.5px; color: var(--dim); min-height: 28px; display: flex; align-items: center; }
.chart-table summary:hover { color: var(--text); }
.chart-table table { font-size: 12.5px; }
.chart-table th, .chart-table td { padding: 6px 10px; }
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; }
.chart-tools strong { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-note { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-note strong { color: var(--text); }

/* demos */
.inspector, .demo { display: grid; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.mono-input { font-family: var(--mono) !important; font-size: 14px !important; }
.inspect-cols, .demo-cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
@media (max-width: 720px) { .inspect-cols, .demo-cols { grid-template-columns: 1fr; } }
.inspect-art { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(circle, rgba(212, 255, 92, 0.05), transparent 65%), #0a0b0d; overflow: hidden; }
.mini-label { font-size: 12.5px; color: var(--dim); margin-bottom: 6px; }
.mini-label a { color: var(--c); }
.byte-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin-bottom: 8px; }
.byte {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 4px; font: 600 10px/1 var(--mono); color: rgba(236, 240, 232, 0.85);
  background: rgba(212, 255, 92, calc(0.06 + var(--b) * 0.32));
}
.byte.first { box-shadow: inset 0 0 0 1.5px var(--a); }
.byte.last { box-shadow: inset 0 0 0 1.5px var(--b); }
@media (max-width: 520px) { .byte-grid { grid-template-columns: repeat(8, 1fr); } }
.hash-line { display: block; word-break: break-all; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
.plan-card { display: grid; gap: 2px; padding: 8px 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.plan-art { aspect-ratio: 1; }
.plan-card strong { font: 700 14px/1.2 var(--display); letter-spacing: -0.02em; }
.plan-card span { font-size: 12px; color: var(--dim); }
.eq-grid { display: grid; gap: 10px; }
.eq-card { display: grid; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); min-width: 0; }
.eq-card strong { font: 700 14px/1 var(--display); color: var(--c); }
.eq-card .math { padding: 10px 12px; border: 0; background: transparent; }
.eq-card .math .katex { font-size: 0.98em; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.demo-controls .field { min-width: 150px; flex: 1; }
.demo-controls input[type='number'] { max-width: 140px; }
.demo-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.demo-head code { font-size: 12px; color: var(--muted); }
.demo-out { min-width: 0; }
.shiny-note { color: var(--gold); font-weight: 600; margin-top: 8px; }
.bit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .bit-cols { grid-template-columns: 1fr; } }
.bit-grid { display: grid; grid-template-columns: repeat(32, 1fr); gap: 1.5px; }
.bit { aspect-ratio: 1; border-radius: 1.5px; background: rgba(236, 240, 232, 0.08); }
.bit.on { background: rgba(236, 240, 232, 0.4); }
.bit.diff { background: rgba(255, 121, 180, 0.35); }
.bit.diff.on { background: var(--b); }
.demo.in .bit { animation: bit-in 0.4s both; animation-delay: calc(var(--i) * 3ms); }
@keyframes bit-in { from { opacity: 0; transform: scale(0.3); } }
@media (prefers-reduced-motion: reduce) {
  .diagram .flow { animation: none; }
  .steps-anim .step, .sankey .band { transition: none; opacity: 1; transform: none; }
  .demo.in .bit { animation: none; }
}

/* =====================================================================
   WALLET + ON-CHAIN
   ===================================================================== */
.wallet { position: relative; }
.wallet-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(20, 23, 27, 0.7); color: var(--text); font: 600 12.5px/1 var(--sans);
  transition: border-color 0.15s, background-color 0.15s;
}
.wallet-btn:hover { border-color: rgba(212, 255, 92, 0.5); }
.wallet-btn[aria-expanded='true'] { border-color: var(--c); }
.wallet-icon { color: var(--c); font-size: 15px; }
.wallet-addr { font: 600 12px/1 var(--mono); }
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); flex: none; }
.net-tag { font: 700 9.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #b48cff; padding: 3px 5px; border-radius: 4px; background: rgba(180, 140, 255, 0.12); }
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 280px; display: grid; gap: 10px; padding: 14px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.wallet-menu[hidden] { display: none; }
.wm-title { font: 700 13px/1.2 var(--display); }
.wm-note { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.wm-list { display: grid; gap: 6px; }
.wm-item {
  display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; font: 600 13.5px/1 var(--sans);
}
.wm-item:hover { border-color: rgba(212, 255, 92, 0.5); }
.wm-item.danger { color: var(--down); justify-content: center; }
.wm-sub { font: 500 11.5px/1 var(--mono); color: var(--dim); }
.wm-addr { display: flex; align-items: center; gap: 4px; }
.wm-addr code { font-size: 13px; }
.wm-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.wm-bal { font: 700 15px/1 var(--mono); color: var(--text); }
.wm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .wallet-label, .net-tag { display: none; }
  .wallet-btn { padding: 0 10px; }
  .wallet-addr { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .wallet-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

.targets { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.targets legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
@media (max-width: 560px) { .targets { grid-template-columns: 1fr; } }
.target {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-2); transition: border-color 0.15s, background-color 0.15s;
}
.target input { margin: 3px 0 0; accent-color: var(--c); width: 16px; height: 16px; flex: none; }
.target.on { border-color: rgba(212, 255, 92, 0.6); background: rgba(212, 255, 92, 0.06); }
.target-text { display: grid; gap: 3px; }
.target-text strong { font-size: 14px; }
.target-text span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.wallet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; min-height: 0; }
.wallet-row:empty { display: none; }
.wallet-row .ok::before { content: '● '; }
.launch-steps { list-style: none; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.launch-steps[hidden] { display: none; }
.launch-steps li::before { content: '○'; display: inline-block; width: 18px; }
.launch-steps li.done { color: var(--muted); }
.launch-steps li.done::before { content: '✓'; color: var(--up); }
.launch-steps li.now { color: var(--text); font-weight: 600; }
.launch-steps li.now::before { content: '◌'; color: var(--c); animation: spin 1s linear infinite; }

.chain-panel { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid rgba(126, 240, 166, 0.25); background: rgba(126, 240, 166, 0.04); }
.chain-title { display: flex; align-items: center; gap: 8px; font: 700 12.5px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.chain-title .ok, .chain-title .sim { margin-left: auto; text-transform: none; }
.chain-panel .kv { grid-template-columns: 1fr; gap: 6px; }
.chain-panel .kv div { display: flex; gap: 10px; align-items: center; }
.chain-panel dt { width: 74px; flex: none; }
.chain-panel dd { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.chain-panel a { color: var(--a); text-decoration: none; }
.chain-panel a:hover { text-decoration: underline; }
.token-logo { border-radius: 50%; object-fit: cover; }
.sim-note { font-size: 12.5px; color: var(--warn); }
.mode-status { font: 500 12px/1.4 var(--mono); }
.mode-status[data-mode='shared'] { color: var(--up); }
.mode-status[data-mode='shared']::before { content: '● '; }
.mode-status[data-mode='local'] { color: var(--warn); }
.mode-status[data-mode='local']::before { content: '◌ '; }
