:root {
  --ink: #0a091c;
  --paper: #f2f2fb;
  --mute: #a2a2c4;
  --faint: #6e6e92;
  --stage: #3b4cc8;
  --stage-deep: color-mix(in oklab, var(--stage) 21%, var(--ink));
  --stage-deeper: color-mix(in oklab, var(--stage) 12%, var(--ink));
  --stage-line: color-mix(in oklab, var(--stage) 42%, transparent);
  --stage-soft: color-mix(in oklab, var(--stage) 16%, transparent);
  --accent: color-mix(in oklab, var(--stage) 62%, #fff);
  --gold: #f2c14e;
  --epic: #a78bfa;
  --rare: #8f9dff;
  --common: #9b9ac0;
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-ui: "Epilogue", "Helvetica Neue", sans-serif;
  --font-num: "Azeret Mono", monospace;
  --ease-stage: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

img { display: block; }

.page { display: none; }
.page.active { display: block; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.04;
  text-transform: uppercase;
}

.num { font-family: var(--font-num); }

.lede { color: var(--mute); }

.accent { color: var(--accent); transition: color 650ms var(--ease-stage); }

.container { width: min(1152px, 100%); margin: 0 auto; padding: 0 24px; }

.card {
  background: color-mix(in oklab, var(--stage) 9%, var(--ink));
  border: 1px solid var(--stage-soft);
  border-radius: 22px;
  transition: background-color 650ms var(--ease-stage), border-color 650ms var(--ease-stage);
}

/* ---------- motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.reveal.in { opacity: 1; transform: none; }

@keyframes idle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes ghost-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

@keyframes toxic-pulse {
  0%, 100% { box-shadow: 0 0 48px rgb(125 255 92 / 0.16); }
  50% { box-shadow: 0 0 60px rgb(125 255 92 / 0.24); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.68; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- topbar ---------- */

.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  padding: 14px 16px 0;
}

.pill {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, #fff 10%, transparent);
}

.brand { padding: 6px 6px 6px 12px; }
.brand img { height: 20px; }

.nav-links { margin-left: auto; display: flex; align-items: center; gap: 2px; }

.nav-links a {
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.87rem;
  color: var(--mute);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--paper); }

.nav-ic { display: grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; }

.connect {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--stage-line);
  background: var(--stage-soft);
  color: var(--paper);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 650ms var(--ease-stage), border-color 650ms var(--ease-stage);
}

/* ---------- hero stage ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  background: var(--stage);
  transition: background-color 650ms var(--ease-stage);
}

.ghost-word {
  position: absolute;
  inset-inline: 0;
  bottom: 34%;
  z-index: 5;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 19rem);
  line-height: 1;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.09);
  pointer-events: none;
  user-select: none;
  animation: ghost-pulse 11s ease-in-out infinite;
}

.hero-figures { position: absolute; inset: 0; z-index: 10; }

.stage-figure {
  position: absolute;
  left: 50%;
  bottom: 25%;
  width: min(31vw, 330px);
  cursor: pointer;
  transition: transform 650ms var(--ease-stage), filter 650ms var(--ease-stage), opacity 650ms var(--ease-stage);
  transform-origin: bottom center;
}

.stage-figure img {
  width: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.4));
  animation: idle-bob 3.6s ease-in-out infinite;
}

.stage-figure:nth-child(2) img { animation-delay: -1.2s; }
.stage-figure:nth-child(3) img { animation-delay: -2.1s; }
.stage-figure:nth-child(4) img { animation-delay: -2.9s; }

.stage-figure.pos-c { transform: translateX(-50%) scale(1.72); z-index: 30; }
.stage-figure.pos-r { transform: translateX(-50%) translateX(27vw) scale(0.86); filter: brightness(0.52); z-index: 20; }
.stage-figure.pos-l { transform: translateX(-50%) translateX(-27vw) scale(0.86); filter: brightness(0.52); z-index: 20; }
.stage-figure.pos-back { transform: translateX(-50%) translateX(-13vw) scale(0.45); filter: brightness(0.4) blur(1px); opacity: 0.5; z-index: 10; }

.hero-scrim {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 35;
  height: 30%;
  background: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.12) 40%, rgb(0 0 0 / 0.5) 100%);
  pointer-events: none;
}

.hero-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  padding: 0 clamp(20px, 4vw, 44px) clamp(22px, 4vh, 36px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}

.hero-meta { max-width: 340px; text-shadow: 0 1px 12px rgb(0 0 0 / 0.55); }

.hero-eyebrow { font-size: 0.72rem; color: rgb(255 255 255 / 0.72); letter-spacing: 0.04em; }

.hero-phrase { margin-top: 5px; font-size: 1rem; line-height: 1.4; color: #fff; }

.hero-controls { display: flex; align-items: center; gap: 14px; justify-self: center; }

.arrow-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.35);
  background: rgb(0 0 0 / 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.arrow-btn:hover { background: rgb(0 0 0 / 0.34); transform: translateY(-1px); }

.hero-count { width: 4.5rem; text-align: center; font-size: 0.78rem; color: rgb(255 255 255 / 0.85); }

.hero-link {
  justify-self: end;
  font-size: 0.88rem;
  color: rgb(255 255 255 / 0.85);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.35);
  text-underline-offset: 6px;
  white-space: nowrap;
}

.hero-link:hover { text-decoration-color: #fff; }

/* ---------- bands ---------- */

.band { position: relative; isolation: isolate; padding: clamp(64px, 9vh, 96px) 0; }

.band::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(180deg, var(--stage-deep) 0%, color-mix(in oklab, var(--stage-deep) 48%, transparent) 55%, transparent 100%);
  transition: background 650ms var(--ease-stage);
  pointer-events: none;
}

.band-deep { position: relative; padding: clamp(64px, 9vh, 96px) 0; background: var(--stage-deeper); transition: background-color 650ms var(--ease-stage); }

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

h2.display { font-size: clamp(2.1rem, 5.2vw, 4rem); max-width: 18ch; }

h2.display.xl { font-size: clamp(2.6rem, 8vw, 6.2rem); max-width: 16ch; }

.u-link {
  flex-shrink: 0;
  font-size: 0.88rem;
  color: var(--mute);
  text-decoration: underline;
  text-decoration-color: var(--stage-line);
  text-underline-offset: 6px;
  transition: color 0.2s ease;
}

.u-link:hover { color: var(--paper); }

.aside { max-width: 320px; font-size: 0.86rem; color: var(--faint); }

.band .lede, .band-deep .lede { font-size: 0.98rem; }

.head-row + .lede, h2.display + .lede { margin-top: 16px; max-width: 620px; }

/* ---------- snap row cards ---------- */

.snap-row {
  margin: 36px -24px 0;
  padding: 0 24px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.snap-row::-webkit-scrollbar { display: none; }

.snap-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: min(74vw, 262px);
  overflow: hidden;
  cursor: pointer;
}

.snap-card .art { aspect-ratio: 1; overflow: hidden; }

.snap-card .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 650ms var(--ease-stage);
}

.snap-card:hover .art img { transform: scale(1.06); }

.snap-info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.snap-num { font-size: 0.76rem; color: var(--faint); }

.snap-tier { margin-top: 2px; font-size: 0.9rem; }

.snap-score { margin-top: 9px; font-size: 1.35rem; line-height: 1; color: var(--paper); }

.snap-label { font-size: 0.7rem; color: var(--faint); }

.arrow-chip {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--stage-line);
  color: var(--paper);
  transition: transform 0.3s ease;
}

.snap-card:hover .arrow-chip, .g-card:hover .arrow-chip { transform: translate(2px, -2px); }

.tier-legendary { color: var(--gold); }
.tier-epic { color: var(--epic); }
.tier-rare { color: var(--rare); }
.tier-common { color: var(--common); }

/* ---------- skyline band ---------- */

.skyline {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  padding: 96px 0;
  overflow: hidden;
  background: url("assets/graphics/hero-stage.png") center / cover no-repeat;
  image-rendering: pixelated;
}

.skyline::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(6 5 18 / 0.4) 0%, rgb(6 5 18 / 0.28) 45%, rgb(6 5 18 / 0.62) 100%);
}

.skyline-fade { position: absolute; inset-inline: 0; pointer-events: none; }
.skyline-fade.top { top: 0; height: 32%; background: linear-gradient(180deg, var(--stage-deep) 0%, transparent 100%); opacity: 0.85; animation: glow-pulse 14s ease-in-out infinite; }
.skyline-fade.bottom { bottom: 0; height: 24%; background: linear-gradient(0deg, var(--stage-deeper) 0%, transparent 100%); }

.skyline .container { position: relative; }

.skyline p { margin-top: 24px; max-width: 560px; font-size: 1.04rem; color: rgb(255 255 255 / 0.82); }

.skyline p a { text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.4); text-underline-offset: 5px; }

.skyline .footnote { margin-top: 24px; font-size: 0.78rem; color: rgb(255 255 255 / 0.55); }

@media (min-height: 700px) { .skyline { min-height: 76vh; } }

/* ---------- legends grid ---------- */

.legend-grid {
  margin-top: 40px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);
}

.legend-grid figure:nth-child(4n + 2) { margin-top: 34px; }
.legend-grid figure:nth-child(4n + 3) { margin-top: 12px; }
.legend-grid figure:nth-child(4n + 4) { margin-top: 48px; }

.legend-grid .art { overflow: hidden; cursor: pointer; }

.legend-grid .art img {
  width: 100%;
  image-rendering: pixelated;
  transition: transform 650ms var(--ease-stage);
}

.legend-grid .art:hover img { transform: scale(1.06); }

.legend-grid figcaption { margin-top: 14px; padding: 0 4px; }

.legend-name { font-size: 1.02rem; color: var(--paper); }

.legend-line { margin-top: 3px; font-size: 0.86rem; }

/* ---------- frame rows ---------- */

.frame-rows {
  margin-top: 34px;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--stage-soft);
  background: var(--stage-soft);
}

.frame-row {
  display: grid;
  gap: 8px;
  padding: 28px 24px;
  background: color-mix(in oklab, var(--stage) 10%, var(--ink));
  transition: background-color 650ms var(--ease-stage);
}

@media (min-width: 720px) {
  .frame-row { grid-template-columns: 4rem 15rem 1fr; padding: 28px 32px; }
}

.f-num { font-size: 0.82rem; color: color-mix(in oklab, var(--stage) 65%, #fff); }

.f-title { font-size: 1.05rem; }

.frame-row .lede { font-size: 0.92rem; }

/* ---------- mint card ---------- */

.mint-card { margin-top: 24px; padding: 26px 28px; }

.mint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.mint-status { display: flex; align-items: baseline; gap: 10px; font-size: 0.95rem; }

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgb(74 222 128 / 0.8);
}

.mint-count { font-size: 0.9rem; color: var(--mute); }
.mint-count .hi { color: var(--paper); }
.mint-count .sep { margin: 0 6px; color: var(--faint); }
.mint-count .tail { margin-left: 8px; color: var(--faint); }

.mint-track {
  margin-top: 16px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.mint-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: background-color 650ms var(--ease-stage); }

.mint-foot {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}

.mint-foot .lede { max-width: 640px; font-size: 0.86rem; }

.pill-btn {
  flex-shrink: 0;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--stage-line);
  background: var(--stage-soft);
  color: var(--paper);
  font-size: 0.82rem;
  transition: background-color 0.25s ease;
}

.pill-btn:hover { background: var(--stage-line); }

/* ---------- rarity table ---------- */

.table-card { margin-top: 32px; overflow: hidden; }

.rarity-table { width: 100%; text-align: left; border-collapse: collapse; }

.rarity-table th {
  padding: 15px 22px;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--faint);
}

.rarity-table td { padding: 15px 22px; font-size: 0.9rem; border-top: 1px solid color-mix(in srgb, #fff 6%, transparent); }

.rarity-table .r { text-align: right; }

.rarity-table td.r { color: var(--mute); }

.rarity-table td:first-child + td { color: var(--paper); }

.tier { display: inline-flex; align-items: center; gap: 10px; font-size: 0.94rem; }

.tier .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

@media (max-width: 620px) { .hide-s { display: none; } }

/* ---------- gallery ---------- */

.gallery-band { padding-top: clamp(120px, 16vh, 160px); }

.gallery-grid {
  margin-top: 36px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.g-card { overflow: hidden; cursor: pointer; }

.g-card .art { aspect-ratio: 1; overflow: hidden; }

.g-card .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 650ms var(--ease-stage);
}

.g-card:hover .art img { transform: scale(1.06); }

.g-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; }

.g-num { font-size: 0.76rem; color: var(--faint); }

.g-tier { margin-top: 2px; font-size: 0.88rem; }

/* ---------- mint stage ---------- */

.mint-stage {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
}

.mint-reveal {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stage-line);
  background: #16142e;
  display: grid;
  place-items: center;
}

.mint-q {
  font-size: 150px;
  color: #3b3a6e;
  user-select: none;
  animation: idle-bob 3.4s ease-in-out infinite;
}

.mint-reveal img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.mint-reveal.revealed { border-color: var(--accent); box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 30%, transparent); }
.mint-reveal.revealed img { animation: mint-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes mint-pop {
  from { transform: scale(0.6); }
  to { transform: scale(1); }
}

.mint-side { min-width: 0; }

.mint-price-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  color: var(--accent);
  margin-bottom: 14px;
}

.mint-side .lede { max-width: 52ch; }

.mint-side .mint-actions { margin-top: 20px; }

.mint-links { margin-top: 16px; font-size: 0.74rem; }

.mint-links a { color: var(--mute); text-decoration: underline; text-underline-offset: 4px; }

.mint-links a:hover { color: var(--paper); }

@media (max-width: 760px) {
  .mint-stage { grid-template-columns: 1fr; }
  .mint-reveal { max-width: 340px; }
}

/* ---------- the loop ---------- */

.loop-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.loop-card { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.loop-step { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

.loop-card h3 { font-size: 1.15rem; }

.loop-card .lede { font-size: 0.92rem; flex: 1; }

.loop-card .lede b { color: var(--paper); font-weight: 500; }

.loop-card .lede a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--stage-line); text-underline-offset: 4px; }

.note { margin-top: 22px; font-size: 0.86rem; color: var(--faint); max-width: 640px; }

.ember-row { display: flex; gap: 10px; }

.ember-row img { width: 64px; height: 64px; image-rendering: pixelated; }

.ember-val { color: var(--gold); }

/* ---------- ember card (mutate page) ---------- */

.ember-card {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  padding: clamp(22px, 4vw, 40px);
  border-color: rgba(242, 193, 78, 0.28);
}

.ember-art {
  background: radial-gradient(closest-side, rgba(242, 193, 78, 0.16), transparent);
  display: grid;
  place-items: center;
}

.ember-art img { width: 100%; max-width: 240px; image-rendering: pixelated; animation: idle-bob 5s ease-in-out infinite; }

.ember-copy h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 8px 0 12px; }

.ember-copy .lede b { color: var(--gold); font-weight: 500; }

.ember-copy .ember-row { margin-top: 18px; }

.ember-flames { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

.flame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 10px;
  border: 1px solid var(--stage-soft);
  border-radius: 16px;
  background: color-mix(in oklab, var(--stage) 6%, var(--ink));
}

.flame img { width: 72px; height: 72px; image-rendering: pixelated; }

.flame .num { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }

.flame.rare { border-color: rgba(255, 143, 199, 0.45); }
.flame.rare .num { color: #ff8fc7; }

@media (max-width: 900px) {
  .loop-grid { grid-template-columns: 1fr; }
  .ember-card { grid-template-columns: 1fr; }
  .ember-art img { max-width: 170px; }
}

/* ---------- mutation lab ---------- */

h3.display.sm { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }

.mutate-hero { text-align: center; max-width: 640px; margin: 0 auto; }

.mutate-hero .kicker {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.mutate-hero h2 { margin: 14px auto 0; max-width: none; }

.mutate-hero .lede { margin-top: 18px; font-size: 0.98rem; }

.flow {
  margin: 48px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 760px;
}

.flow-node {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: clamp(120px, 17vw, 168px);
  aspect-ratio: 1.55;
  border-radius: 50%;
  border: 1px solid var(--stage-line);
  background: color-mix(in oklab, var(--stage) 8%, var(--ink));
  transition: background-color 650ms var(--ease-stage), border-color 650ms var(--ease-stage);
}

.flow-verb { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }

.flow-val { font-size: clamp(0.95rem, 1.8vw, 1.25rem); color: var(--accent); }

.flow-val.num-val { font-family: var(--font-num); font-weight: 500; letter-spacing: 0.02em; }

.flow-val.toxic { color: #7dff5c; }

.flow-sub { font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

.flow-line { flex: 1; height: 1px; background: var(--stage-line); min-width: 24px; }

.lab { margin-top: 48px; }

.forged-count { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 620px) {
  .flow { flex-direction: column; gap: 0; }
  .flow-line { width: 1px; height: 22px; flex: none; min-width: 0; }
  .flow-node { width: 168px; }
}

.lab { padding: clamp(22px, 4vw, 40px); }

.lab-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(14px, 3vw, 36px);
  align-items: center;
}

.lab-panel { min-width: 0; }

.lab-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.lab-label.toxic, .lab-sub.toxic { color: #7dff5c; }

.lab-art {
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stage-soft);
}

.lab-art img { width: 100%; image-rendering: pixelated; }

.lab-art.mutant { border-color: rgb(125 255 92 / 0.35); animation: toxic-pulse 5s ease-in-out infinite; }

.lab-sub { margin-top: 10px; font-size: 0.74rem; color: var(--faint); }

.lab-ember {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: 14px;
  background: rgba(242, 193, 78, 0.06);
}

.lab-ember img { width: 52px; height: 52px; image-rendering: pixelated; }

.lab-ember-title { font-size: 0.8rem; color: var(--gold); }

.lab-ember .lab-sub { margin-top: 2px; }

.lab-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.lab-bolt { font-size: 1.1rem; letter-spacing: 0.06em; }

.lab-picker { margin-top: 26px; }

.lab-owned {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lab-owned button {
  padding: 0;
  width: 78px;
  border: 1px solid var(--stage-soft);
  border-radius: 12px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.lab-owned button:hover { transform: translateY(-2px); }
.lab-owned button.on { border-color: #7dff5c; box-shadow: 0 0 18px rgb(125 255 92 / 0.25); }

.lab-owned img { width: 100%; display: block; image-rendering: pixelated; }

.lab-owned .tag {
  display: block;
  padding: 5px 0 6px;
  font-family: var(--font-num);
  font-size: 0.62rem;
  color: var(--mute);
}

.lab-empty { font-size: 0.86rem; color: var(--faint); }

.mint-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.mint-hint { font-size: 0.74rem; color: var(--faint); }

.lab-controls {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.lab-controls label { font-size: 0.78rem; color: var(--faint); }

#lab-n {
  width: 90px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--stage-line);
  background: transparent;
  color: var(--paper);
  font-size: 0.9rem;
}

#lab-n:focus { outline: none; border-color: var(--accent); }

.lab-burn { background: rgb(125 255 92 / 0.1); border-color: rgb(125 255 92 / 0.4); }

.lab-burn:hover { background: rgb(125 255 92 / 0.2); }

.lab-note { margin-top: 20px; font-size: 0.88rem; max-width: 700px; }

.lab-fresh-head { margin-top: 64px; }

.mut-card .art img { filter: saturate(1.05); }

@media (max-width: 720px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-mid { flex-direction: row; }
  .lab-mid svg { transform: rotate(90deg); }
}

/* ---------- footer ---------- */

footer.band-deep { padding-bottom: 40px; }

.foot-card { padding: 34px 34px 26px; }

.foot-grid { display: grid; gap: 32px; }

@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.foot-brand { height: 22px; margin-bottom: 12px; }

.foot-card .lede { max-width: 340px; font-size: 0.88rem; }

.foot-nav { display: flex; flex-direction: column; gap: 9px; font-size: 0.86rem; }

.foot-nav a { color: var(--mute); transition: color 0.2s ease; }

.foot-nav a:hover { color: var(--paper); }

.foot-line {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, #fff 7%, transparent);
  font-size: 0.74rem;
  color: var(--faint);
}

/* ---------- nft modal ---------- */

.nft-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }

.nft-modal-backdrop { position: absolute; inset: 0; background: rgb(4 3 14 / 0.8); backdrop-filter: blur(8px); }

.nft-modal-box {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  background: color-mix(in oklab, var(--stage) 9%, var(--ink));
  border: 1px solid var(--stage-soft);
  border-radius: 26px;
  display: grid;
  grid-template-columns: 320px 1fr;
  animation: modal-in 0.3s ease;
  scrollbar-width: thin;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.nft-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stage-line);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
}

.nft-modal-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

.nft-modal-info { padding: 28px; }

.nftm-name { font-size: 1.6rem; }

.nftm-rank { margin: 10px 0 18px; font-size: 0.78rem; color: var(--mute); }

.trait { position: relative; padding: 10px 0 12px; border-bottom: 1px solid color-mix(in srgb, #fff 6%, transparent); }
.trait:last-child { border-bottom: 0; }

.t-type { display: block; font-family: var(--font-num); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.t-val { font-size: 0.94rem; font-weight: 500; color: var(--paper); }

.t-pct { float: right; margin-top: 3px; font-family: var(--font-num); font-size: 0.7rem; color: var(--faint); }

.t-bar { display: block; height: 3px; margin-top: 8px; border-radius: 2px; background: color-mix(in srgb, #fff 8%, transparent); }

.trait.t-legendary .t-bar { background: var(--gold); }
.trait.t-legendary .t-val { color: var(--gold); }
.trait.t-epic .t-bar { background: var(--epic); }
.trait.t-rare .t-bar { background: var(--rare); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .legend-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-grid figure:nth-child(n) { margin-top: 0; }
  .legend-grid figure:nth-child(even) { margin-top: 22px; }
  .hero-bar { grid-template-columns: 1fr; justify-items: start; gap: 14px; }
  .hero-controls { justify-self: start; }
  .hero-link { justify-self: start; }
  .stage-figure { width: min(52vw, 300px); }
  .stage-figure.pos-l, .stage-figure.pos-r { transform: translateX(-50%) translateX(34vw) scale(0.6); }
  .stage-figure.pos-l { transform: translateX(-50%) translateX(-34vw) scale(0.6); }
}

@media (max-width: 620px) {
  .nav-links a:not(.nav-ic) { padding: 9px 10px; font-size: 0.8rem; }
  .nft-modal-box { grid-template-columns: 1fr; }
  .nft-modal-art img { max-height: 44svh; }
  .foot-card { padding: 26px 22px 20px; }
}
