@font-face {
  font-family: "Pixelify Sans";
  src: url("./fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Handjet";
  src: url("./fonts/Handjet.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Dream Mono";
  src: url("./fonts/DMMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0c0c1a;
  --ink-raised: #14132b;
  --ink-panel: #1b1938;
  --ink-panel-2: #242048;
  --lilac: #d2bdff;
  --lilac-deep: #8b78ba;
  --lilac-soft: #e9ddff;
  --moon: #fff3d2;
  --cloud: #9bdaf3;
  --cloud-deep: #4d8eaa;
  --gold: #f2cd6f;
  --gold-soft: #ffe6a0;
  --muted: #b9b2d2;
  --line: rgba(210, 189, 255, 0.28);
  --line-strong: rgba(255, 243, 210, 0.5);
  --panel-shadow: 8px 8px 0 rgba(5, 5, 14, 0.58);
  --display: "Pixelify Sans", "Courier New", monospace;
  --hand: "Handjet", "Courier New", monospace;
  --mono: "Dream Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 320px;
  margin: 0;
  padding-left: 96px;
  overflow-x: hidden;
  color: var(--moon);
  background:
    radial-gradient(circle at 76% 12%, rgba(210, 189, 255, 0.1), transparent 30%),
    radial-gradient(circle at 18% 58%, rgba(155, 218, 243, 0.06), transparent 31%),
    linear-gradient(180deg, #0b0b18 0%, #111026 46%, #0a0917 100%);
  font: 500 19px/1.35 var(--hand);
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(210, 189, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 189, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 95px;
  bottom: 0;
  width: 2px;
  z-index: 31;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--lilac-deep) 0 8px, transparent 8px 16px);
  opacity: 0.44;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--ink);
  background: var(--gold);
}

:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 4px;
}

.night-sky,
.pixel-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.night-sky {
  z-index: -2;
  opacity: 0.7;
  background-image:
    radial-gradient(circle, var(--moon) 0 1px, transparent 1px),
    radial-gradient(circle, var(--lilac) 0 1px, transparent 1px),
    radial-gradient(circle, var(--cloud) 0 1px, transparent 1px);
  background-position: 13px 21px, 79px 57px, 143px 109px;
  background-size: 191px 173px, 257px 223px, 337px 311px;
  animation: sky-drift 24s steps(8, end) infinite;
}

.pixel-grain {
  z-index: 90;
  opacity: 0.12;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(12, 12, 26, 0.78) 3px 4px
  );
  mix-blend-mode: multiply;
}

@keyframes sky-drift {
  to {
    background-position: 204px 194px, 336px 280px, 674px 646px;
  }
}

@keyframes float-pixel {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes blink-pixel {
  50% {
    opacity: 0.25;
  }
}

@keyframes reveal-dialogue {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbit-step {
  to {
    transform: rotate(360deg);
  }
}

.pixel-button {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px 9px;
  border: 0;
  color: var(--ink);
  background: var(--gold);
  clip-path: polygon(
    0 6px,
    6px 6px,
    6px 0,
    calc(100% - 6px) 0,
    calc(100% - 6px) 6px,
    100% 6px,
    100% calc(100% - 6px),
    calc(100% - 6px) calc(100% - 6px),
    calc(100% - 6px) 100%,
    6px 100%,
    6px calc(100% - 6px),
    0 calc(100% - 6px)
  );
  font: 700 18px/1 var(--display);
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 -5px 0 rgba(114, 88, 24, 0.28);
  transition: transform 0.14s steps(2, end), filter 0.14s steps(2, end);
}

.pixel-button::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(12, 12, 26, 0.32);
  pointer-events: none;
}

.pixel-button:hover {
  transform: translate(-2px, -2px);
  filter: brightness(1.08);
}

.pixel-button:active {
  transform: translate(1px, 1px);
}

.pixel-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
}

.pixel-button-gold {
  color: #1a1530;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow:
    inset 0 -5px 0 rgba(114, 88, 24, 0.28),
    0 0 0 2px rgba(242, 205, 111, 0.28);
}

.pixel-button-ghost {
  color: var(--lilac-soft);
  background: var(--ink-panel);
  box-shadow:
    inset 0 0 0 2px var(--lilac-deep),
    inset 0 -5px 0 rgba(8, 8, 20, 0.4);
}

.pixel-button-ghost:hover {
  color: var(--moon);
  background: var(--ink-panel-2);
}

.pixel-button-small {
  min-height: 38px;
  padding: 8px 13px 6px;
  font-size: 14px;
}

.dream-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-right: 2px solid var(--lilac-deep);
  background:
    linear-gradient(180deg, rgba(210, 189, 255, 0.08), transparent 25%),
    #0c0c1a;
  box-shadow: 5px 0 0 rgba(8, 8, 18, 0.45);
}

.dream-rail::before {
  content: "";
  position: absolute;
  top: 82px;
  bottom: 52px;
  left: 47px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--lilac-deep) 0 6px, transparent 6px 13px);
  opacity: 0.52;
}

.rail-brand {
  position: relative;
  z-index: 1;
  height: 82px;
  display: grid;
  place-items: center;
  gap: 0;
  border-bottom: 2px solid var(--line);
  color: var(--moon);
  background: var(--ink-raised);
  font: 700 14px/1 var(--display);
  letter-spacing: 0.04em;
}

.brand-jar {
  position: relative;
  width: 27px;
  height: 33px;
  display: block;
  border: 3px solid var(--moon);
  border-top: 0;
  background:
    linear-gradient(90deg, transparent 0 5px, var(--lilac) 5px 9px, transparent 9px),
    rgba(210, 189, 255, 0.1);
  box-shadow: 5px 5px 0 rgba(210, 189, 255, 0.14);
  clip-path: polygon(12% 0, 88% 0, 88% 9%, 100% 20%, 100% 100%, 0 100%, 0 20%, 12% 9%);
}

.brand-jar i {
  position: absolute;
  top: -6px;
  left: 2px;
  right: 2px;
  height: 5px;
  background: var(--gold);
}

.brand-jar b {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 3px;
  height: 10px;
  background: var(--cloud);
  box-shadow: -5px 6px 0 var(--gold), 5px 9px 0 var(--lilac);
}

.rail-map {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 7px;
  overflow-y: auto;
  scrollbar-width: none;
}

.rail-map::-webkit-scrollbar {
  display: none;
}

.rail-map a {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 5px;
  padding: 5px 3px;
  color: var(--muted);
  font: 500 10px/1.05 var(--hand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.16s, background 0.16s;
}

.rail-map a:hover,
.rail-map a:focus-visible {
  color: var(--gold-soft);
  background: rgba(210, 189, 255, 0.09);
}

.rail-map a > span:last-child {
  max-width: 44px;
}

.rail-glyph {
  position: relative;
  width: 26px;
  height: 26px;
  display: block;
  color: var(--lilac);
}

.glyph-mint {
  border: 3px solid currentColor;
  border-top-width: 5px;
  clip-path: polygon(12% 0, 88% 0, 88% 10%, 100% 18%, 100% 100%, 0 100%, 0 18%, 12% 10%);
}

.glyph-mint::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 3px;
  height: 9px;
  background: var(--gold);
  box-shadow: 6px 3px 0 var(--moon);
}

.glyph-compiler {
  width: 22px;
  margin-inline: auto;
  border: 3px solid currentColor;
  box-shadow: -5px 0 0 -2px currentColor, 5px 0 0 -2px currentColor;
}

.glyph-compiler::before,
.glyph-compiler::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  background: var(--gold);
}

.glyph-compiler::before {
  left: 4px;
}

.glyph-compiler::after {
  right: 4px;
}

.glyph-market {
  top: 4px;
  height: 19px;
  border: 3px solid currentColor;
  clip-path: polygon(10% 0, 90% 0, 100% 32%, 92% 100%, 8% 100%, 0 32%);
}

.glyph-market::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 4px;
  right: 4px;
  border-top: 2px dashed var(--cloud);
}

.glyph-loop {
  border: 3px dashed currentColor;
  transform: rotate(45deg) scale(0.72);
}

.glyph-loop::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--gold);
}

.glyph-coin {
  border: 3px solid currentColor;
  transform: scale(0.84);
  box-shadow: inset 0 0 0 3px var(--ink);
}

.glyph-coin::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 4px;
  height: 12px;
  background: var(--gold);
}

.glyph-stairs::before {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  background: currentColor;
  box-shadow:
    8px -8px 0 currentColor,
    16px -16px 0 currentColor;
}

.glyph-index {
  border: 3px solid currentColor;
}

.glyph-index::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--gold);
  box-shadow:
    7px 0 0 var(--cloud),
    0 7px 0 var(--cloud),
    7px 7px 0 var(--lilac);
}

.glyph-faq {
  border: 3px solid currentColor;
  border-radius: 0;
}

.glyph-faq::before,
.glyph-faq::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  height: 2px;
  background: var(--gold);
}

.glyph-faq::before {
  top: 7px;
}

.glyph-faq::after {
  top: 13px;
}

.rail-depth {
  position: relative;
  z-index: 1;
  padding: 12px 0 16px;
  color: var(--gold);
  font: 700 20px/1 var(--display);
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-hud {
  position: fixed;
  top: 0;
  right: 0;
  left: 96px;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 2px solid var(--line);
  background: rgba(12, 12, 26, 0.9);
  backdrop-filter: blur(12px);
}

.site-hud::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lilac), var(--gold), transparent);
  opacity: 0.62;
}

.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--moon);
  font: 700 clamp(21px, 2.2vw, 29px)/1 var(--display);
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.hud-brand > span:last-child {
  display: inline-flex;
}

.hud-brand i {
  color: var(--gold);
  font-style: normal;
}

.brand-jar-small {
  width: 22px;
  height: 27px;
  transform: scale(0.9);
}

.hud-coordinates {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 12px;
  align-items: baseline;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
  letter-spacing: 0.08em;
}

.hud-coordinates b {
  color: var(--lilac);
  font-size: 13px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.language-dial {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 2px solid var(--line);
  background: var(--ink-raised);
}

.language-dial > span {
  color: var(--cloud);
  font: 13px var(--mono);
}

.language-dial select {
  width: 105px;
  padding: 7px 22px 7px 2px;
  border: 0;
  color: var(--moon);
  background: transparent;
  font: 12px var(--mono);
  outline: none;
}

.language-dial select option {
  color: var(--moon);
  background: var(--ink-panel);
}

.dream-descent {
  padding-top: 76px;
}

.prologue,
.chapter {
  scroll-margin-top: 82px;
}

.prologue {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 3px solid var(--lilac-deep);
  background: var(--ink);
}

.hero-diorama {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-painting {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.82) contrast(1.08) brightness(0.7);
  transform: scale(1.02);
}

.hero-diorama::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 21, 0.93) 0%, rgba(9, 9, 21, 0.74) 40%, rgba(9, 9, 21, 0.18) 73%, rgba(9, 9, 21, 0.38) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(12, 12, 26, 0.55) 28%, transparent 68%),
    radial-gradient(circle at 71% 39%, transparent 0 12%, rgba(155, 218, 243, 0.12) 46%, transparent 63%);
}

.hero-diorama.art-missing::before {
  content: "DREAMCOMPILE";
  position: absolute;
  right: 5%;
  top: 18%;
  z-index: 2;
  color: rgba(255, 243, 210, 0.1);
  font: clamp(70px, 11vw, 180px)/0.85 var(--display);
  transform: rotate(-90deg) translateX(100%);
  transform-origin: right top;
}

.hero-clouds {
  position: absolute;
  right: 0;
  bottom: 13%;
  width: 56%;
  height: 24%;
  opacity: 0.28;
  background:
    linear-gradient(90deg, transparent 0 9%, var(--lilac) 9% 21%, transparent 21% 31%, var(--cloud) 31% 48%, transparent 48% 57%, var(--moon) 57% 68%, transparent 68%),
    linear-gradient(90deg, transparent 0 17%, var(--cloud) 17% 36%, transparent 36% 48%, var(--lilac) 48% 71%, transparent 71%);
  background-size: 100% 20px, 100% 12px;
  background-position: 0 22px, 0 0;
  background-repeat: no-repeat;
  clip-path: polygon(0 50%, 8% 50%, 8% 25%, 16% 25%, 16% 50%, 25% 50%, 25% 15%, 37% 15%, 37% 50%, 47% 50%, 47% 32%, 58% 32%, 58% 50%, 67% 50%, 67% 18%, 80% 18%, 80% 50%, 90% 50%, 90% 30%, 100% 30%, 100% 70%, 86% 70%, 86% 82%, 70% 82%, 70% 70%, 56% 70%, 56% 86%, 38% 86%, 38% 70%, 22% 70%, 22% 80%, 8% 80%, 8% 70%, 0 70%);
  animation: float-pixel 7s steps(5, end) infinite;
}

.pixel-stars {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.8;
  background-image:
    radial-gradient(circle, var(--gold-soft) 0 2px, transparent 2px),
    radial-gradient(circle, var(--cloud) 0 1px, transparent 1px),
    radial-gradient(circle, var(--lilac) 0 2px, transparent 2px);
  background-position: 17px 31px, 91px 73px, 161px 119px;
  background-size: 223px 181px, 167px 211px, 293px 257px;
}

.pixel-stars::before,
.pixel-stars::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--gold-soft);
  box-shadow:
    34px 14px 0 var(--cloud),
    76px -19px 0 var(--lilac),
    123px 21px 0 var(--gold),
    178px -4px 0 var(--cloud);
  animation: blink-pixel 4s steps(2, end) infinite;
}

.pixel-stars::before {
  top: 19%;
  right: 12%;
}

.pixel-stars::after {
  top: 38%;
  left: 9%;
  animation-delay: -2s;
}

.prologue-wrap {
  position: relative;
  width: min(1190px, calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(45px, 7vw, 92px) 0 clamp(48px, 7vw, 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 20px;
  align-items: end;
}

.dialogue-box {
  position: relative;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 24px;
  max-width: 1030px;
  padding: clamp(20px, 3vw, 31px);
  border: 4px solid var(--moon);
  background:
    linear-gradient(135deg, rgba(210, 189, 255, 0.12), transparent 40%),
    rgba(18, 16, 39, 0.94);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 7px var(--lilac-deep),
    12px 12px 0 rgba(5, 5, 14, 0.52);
  clip-path: polygon(
    0 13px,
    13px 13px,
    13px 0,
    calc(100% - 13px) 0,
    calc(100% - 13px) 13px,
    100% 13px,
    100% calc(100% - 13px),
    calc(100% - 13px) calc(100% - 13px),
    calc(100% - 13px) 100%,
    13px 100%,
    13px calc(100% - 13px),
    0 calc(100% - 13px)
  );
  animation: reveal-dialogue 0.7s steps(8, end) both;
}

.dialogue-box::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 20px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  box-shadow:
    10px 0 0 var(--cloud),
    20px 0 0 var(--lilac);
}

.speaker-portrait {
  position: relative;
  align-self: start;
  min-height: 184px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--lilac);
  background:
    radial-gradient(circle at 50% 45%, rgba(242, 205, 111, 0.25), transparent 38%),
    linear-gradient(180deg, #242048, #111026);
  box-shadow:
    inset 0 0 0 4px var(--ink-raised),
    7px 7px 0 rgba(12, 12, 26, 0.65);
}

.speaker-portrait img {
  width: 100%;
  height: 100%;
  min-height: 184px;
  object-fit: contain;
  padding: 13px;
  filter: drop-shadow(0 0 20px rgba(242, 205, 111, 0.28));
  animation: float-pixel 5s steps(5, end) infinite;
}

.portrait-spark {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--gold-soft);
  box-shadow:
    -10px 8px 0 var(--cloud),
    -4px 19px 0 var(--lilac);
}

.dialogue-copy {
  min-width: 0;
}

.dialogue-kicker,
.chapter-eyebrow,
.panel-label,
.field-label {
  margin: 0;
  color: var(--gold);
  font: 500 14px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialogue-kicker::before,
.chapter-eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--gold);
  box-shadow: 4px 4px 0 var(--lilac-deep);
}

.speaker-name {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 11px 0 5px;
  padding: 5px 9px 3px;
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: var(--ink);
  font: 700 14px/1 var(--display);
  letter-spacing: 0.08em;
}

.speaker-name i {
  width: 4px;
  height: 4px;
  background: var(--cloud);
}

.dialogue-copy h1 {
  margin: 8px 0 8px;
  color: var(--moon);
  font: 700 clamp(47px, 5.9vw, 83px)/0.86 var(--display);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow:
    4px 0 0 rgba(210, 189, 255, 0.42),
    -4px 0 0 rgba(155, 218, 243, 0.2),
    7px 7px 0 rgba(12, 12, 26, 0.5);
}

.dialogue-copy h1 span {
  display: block;
}

.dialogue-copy h1 span:last-child {
  color: var(--gold-soft);
}

.dialogue-text {
  max-width: 720px;
  margin: 15px 0 0;
  color: #e0dced;
  font-size: clamp(20px, 2.15vw, 27px);
  line-height: 1.22;
}

.dialogue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.dialogue-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 2px dashed var(--line-strong);
}

.dialogue-stats div {
  min-width: 0;
  padding: 13px 10px 2px;
  border-right: 1px solid var(--line);
}

.dialogue-stats div:first-child {
  padding-left: 0;
}

.dialogue-stats div:last-child {
  border-right: 0;
}

.dialogue-stats strong {
  display: block;
  color: var(--cloud);
  font: 700 clamp(18px, 2vw, 24px)/1 var(--display);
}

.dialogue-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font: 12px/1.1 var(--mono);
  text-transform: uppercase;
}

.dialogue-next {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  transform: rotate(45deg);
  animation: blink-pixel 1.7s steps(2, end) infinite;
}

.prologue-sign {
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px;
  color: var(--muted);
  font: 11px var(--mono);
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  border: 2px solid var(--line);
  background: rgba(18, 16, 39, 0.74);
}

.prologue-sign b {
  color: var(--gold);
  font: 700 23px var(--display);
}

.prologue-sign i {
  width: 5px;
  height: 5px;
  background: var(--cloud);
  box-shadow: 0 9px 0 var(--lilac);
}

.chapter {
  position: relative;
  padding: clamp(84px, 9vw, 126px) 0;
  border-bottom: 2px solid var(--line);
  background:
    linear-gradient(90deg, rgba(210, 189, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(210, 189, 255, 0.014) 1px, transparent 1px);
  background-size: 40px 40px;
}

.chapter:nth-of-type(even) {
  background-color: rgba(20, 19, 43, 0.28);
}

.chapter-wrap {
  position: relative;
  width: min(1190px, calc(100% - 64px));
  margin: 0 auto;
}

.chapter-marker {
  position: absolute;
  top: 96px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--lilac-deep);
  font: 700 13px var(--display);
}

.chapter-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  background: var(--ink);
}

.chapter-marker i {
  width: 28px;
  height: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px);
}

.chapter-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(260px, 0.66fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(30px, 4vw, 47px);
}

.chapter-heading h2 {
  margin: 7px 0 0;
  color: var(--moon);
  font: 700 clamp(37px, 5vw, 62px)/0.94 var(--display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.chapter-heading h2::after {
  content: "";
  display: block;
  width: 88px;
  height: 6px;
  margin-top: 15px;
  background:
    linear-gradient(90deg, var(--gold) 0 28%, transparent 28% 34%, var(--lilac) 34% 68%, transparent 68% 74%, var(--cloud) 74% 100%);
}

.chapter-note {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.25;
}

.chapter-intake {
  background:
    radial-gradient(circle at 83% 16%, rgba(210, 189, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(20, 19, 43, 0.6), rgba(12, 12, 26, 0.3));
}

.intake-heading {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
}

.mint-console {
  position: relative;
  padding: clamp(15px, 2.4vw, 26px);
  border: 3px solid var(--lilac-deep);
  background:
    linear-gradient(145deg, rgba(210, 189, 255, 0.08), transparent 30%),
    var(--ink-raised);
  box-shadow:
    0 0 0 3px var(--ink),
    0 0 0 5px rgba(255, 243, 210, 0.2),
    var(--panel-shadow);
}

.mint-console::before,
.mint-console::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.mint-console::before {
  top: -7px;
  left: 16px;
}

.mint-console::after {
  right: 16px;
  bottom: -7px;
  background: var(--cloud);
}

.console-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 17px;
  border-bottom: 2px dashed var(--line);
}

.status-register {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 5px;
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: rgba(242, 205, 111, 0.06);
  font: 14px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-register.live {
  border-color: var(--cloud);
  color: var(--cloud);
  background: rgba(155, 218, 243, 0.07);
}

.status-register.warn {
  border-color: var(--lilac);
  color: var(--lilac-soft);
  background: rgba(210, 189, 255, 0.07);
}

.pixel-beacon {
  width: 8px;
  height: 8px;
  background: currentColor;
  box-shadow:
    4px 0 0 currentColor,
    0 4px 0 currentColor,
    4px 4px 0 transparent;
  animation: blink-pixel 2.2s steps(2, end) infinite;
}

.console-status > p {
  margin: 0;
  color: var(--muted);
  font: 13px var(--mono);
  letter-spacing: 0.04em;
}

.mint-counter {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
}

.mint-counter strong {
  color: var(--moon);
  font: 700 clamp(31px, 4vw, 47px)/0.9 var(--display);
}

.mint-counter span {
  color: var(--lilac);
  font: 13px var(--mono);
}

.mint-counter em {
  color: var(--muted);
  font: 11px var(--mono);
  font-style: normal;
  text-transform: uppercase;
}

.clock-and-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
}

.pixel-clock {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pixel-clock > div {
  min-width: 68px;
  padding: 8px 8px 6px;
  border: 2px solid var(--line);
  text-align: center;
  background: #0f0e21;
  box-shadow: inset 0 -4px 0 rgba(210, 189, 255, 0.06);
}

.pixel-clock strong {
  display: block;
  color: var(--gold-soft);
  font: 700 clamp(23px, 2.8vw, 32px)/0.9 var(--display);
}

.pixel-clock span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.pixel-clock > b {
  color: var(--lilac-deep);
  font: 700 22px var(--display);
}

.sewn-meter {
  display: grid;
  grid-template-columns: repeat(20, minmax(2px, 1fr));
  gap: 3px;
  min-height: 27px;
  padding: 5px;
  border: 2px solid var(--line);
  background: #0d0c1d;
}

.sewn-meter i {
  min-width: 2px;
  background: #292544;
  border-top: 2px solid rgba(210, 189, 255, 0.12);
}

.sewn-meter i.is-lit {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-color: var(--lilac-soft);
  box-shadow: 0 0 8px rgba(242, 205, 111, 0.38);
}

.mint-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.58fr);
  gap: 18px;
  align-items: stretch;
}

.mint-steps {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.mint-step {
  position: relative;
  padding: 19px;
  border: 2px solid var(--line);
  background:
    linear-gradient(90deg, rgba(210, 189, 255, 0.035) 1px, transparent 1px),
    rgba(15, 14, 33, 0.75);
  background-size: 24px 24px;
}

.mint-step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 28px;
  width: 38px;
  height: 4px;
  background: var(--gold);
}

.mint-step:nth-child(2)::before {
  background: var(--cloud);
}

.mint-step:nth-child(3)::before {
  width: 58px;
  background: var(--lilac);
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.step-heading h3 {
  margin: 0;
  color: var(--moon);
  font: 700 clamp(22px, 2.3vw, 29px)/1 var(--display);
  text-transform: uppercase;
}

.step-token {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  font: 700 17px var(--display);
  box-shadow: 4px 4px 0 rgba(210, 189, 255, 0.24);
}

.mint-step:nth-child(2) .step-token {
  background: var(--cloud);
}

.mint-step:nth-child(3) .step-token {
  background: var(--lilac);
}

.lane-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lane-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 11px;
  align-items: center;
  padding: 13px;
  overflow: hidden;
  border: 2px solid rgba(242, 205, 111, 0.42);
  background: rgba(242, 205, 111, 0.045);
}

.lane-card > b {
  position: absolute;
  right: 7px;
  bottom: -2px;
  color: rgba(255, 243, 210, 0.08);
  font: 700 41px/1 var(--display);
}

.lane-x {
  border-color: rgba(155, 218, 243, 0.42);
  background: rgba(155, 218, 243, 0.045);
}

.lane-card h4 {
  margin: 0 0 3px;
  color: var(--gold-soft);
  font: 700 18px/1 var(--display);
}

.lane-x h4 {
  color: var(--cloud);
}

.lane-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.12;
}

.lane-pixel {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid currentColor;
  color: var(--gold);
}

.agent-pixel::before {
  content: "";
  width: 16px;
  height: 18px;
  border: 3px solid currentColor;
  box-shadow: -6px 0 0 -3px currentColor, 6px 0 0 -3px currentColor;
}

.agent-pixel::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 15px;
  width: 4px;
  height: 4px;
  background: currentColor;
  box-shadow: 10px 0 0 currentColor;
}

.x-pixel {
  color: var(--cloud);
  font: 700 23px/1 var(--display);
}

.lane-branch {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.lane-branch > span:first-child {
  display: grid;
  place-items: center;
  height: 25px;
  color: var(--ink);
  background: var(--lilac);
  font: 700 12px var(--display);
}

.route-verdict {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 11px;
  border-left: 4px solid var(--cloud);
  background: rgba(155, 218, 243, 0.055);
  color: #d9d5e6;
}

.route-verdict i {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 8px;
  background: var(--cloud);
  box-shadow: 4px 0 0 var(--lilac);
}

.route-verdict p {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
}

.route-verdict.eligible {
  border-color: var(--gold);
  background: rgba(242, 205, 111, 0.06);
  color: var(--gold-soft);
}

.route-verdict.eligible i {
  background: var(--gold);
  box-shadow: 4px 0 0 var(--gold-soft);
}

.x-gateway {
  margin-top: 12px;
  border: 2px solid rgba(155, 218, 243, 0.28);
  background: rgba(155, 218, 243, 0.04);
}

.x-gateway summary {
  min-height: 57px;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
  color: var(--moon);
}

.x-gateway summary::-webkit-details-marker {
  display: none;
}

.x-gateway summary > span:nth-child(2) {
  min-width: 0;
}

.x-gateway summary b {
  display: block;
  font: 700 18px/1.1 var(--display);
}

.x-gateway summary small {
  display: block;
  margin-top: 3px;
  color: var(--cloud);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.x-door {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cloud);
  color: var(--cloud);
  font: 700 18px var(--display);
}

.x-gateway summary > i {
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--lilac);
  border-bottom: 3px solid var(--lilac);
  transform: rotate(45deg);
  transition: transform 0.16s steps(2, end);
}

.x-gateway[open] summary > i {
  transform: rotate(225deg);
}

.x-gateway-body {
  padding: 0 12px 14px;
  border-top: 1px dashed var(--line);
}

.gateway-copy {
  margin: 12px 0;
  color: var(--muted);
  font-size: 17px;
}

.field-label {
  display: block;
  margin: 11px 0 6px;
  color: var(--lilac);
  font-size: 12px;
}

textarea,
input {
  width: 100%;
  border: 2px solid var(--line);
  color: var(--moon);
  background: #0d0c1d;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 205, 111, 0.14);
}

textarea {
  min-height: 162px;
  padding: 11px;
  resize: vertical;
  font: 12px/1.5 var(--mono);
}

input {
  min-height: 44px;
  padding: 9px 11px;
  font: 13px var(--mono);
}

.button-pair,
.gateway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gateway-actions .pixel-button {
  flex: 1;
}

.turnstile-slot {
  margin-top: 10px;
}

.turnstile-slot:empty {
  display: none;
}

.gateway-state {
  margin: 10px 0 0;
  color: var(--muted);
  font: 11px/1.35 var(--mono);
}

.quantity-station {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.quantity-station > .field-label {
  margin: 0 auto 0 0;
}

.jar-counter {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--cloud);
  background: #0d0c1d;
}

.jar-counter button {
  width: 42px;
  border: 0;
  color: var(--cloud);
  background: transparent;
  font: 700 23px/1 var(--display);
}

.jar-counter button:hover {
  background: rgba(155, 218, 243, 0.09);
}

.jar-counter input {
  width: 58px;
  min-height: 40px;
  padding: 3px;
  border: 0;
  border-inline: 2px solid rgba(155, 218, 243, 0.3);
  text-align: center;
  font: 16px var(--mono);
  appearance: textfield;
}

.jar-counter input::-webkit-outer-spin-button,
.jar-counter input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.quantity-max {
  min-width: 68px;
}

.mint-command {
  width: 100%;
  min-height: 62px;
  font-size: 24px;
}

.reaction-line {
  display: none;
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1.35 var(--mono);
}

.reaction-line.is-visible {
  display: block;
}

.reaction-line.ok {
  border-color: rgba(242, 205, 111, 0.5);
  color: var(--gold-soft);
  background: rgba(242, 205, 111, 0.05);
}

.reaction-line.err {
  border-color: rgba(210, 189, 255, 0.58);
  color: var(--lilac-soft);
  background: rgba(210, 189, 255, 0.07);
}

.referral-flag {
  margin: 10px 0 0;
  color: var(--gold-soft);
  font: 12px var(--mono);
}

.mint-summary-rail {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 2px solid rgba(210, 189, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(210, 189, 255, 0.11), transparent 24%),
    #18152f;
  box-shadow: inset 0 0 0 5px #0f0e21;
}

.mint-summary-rail::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 243, 210, 0.25);
  pointer-events: none;
}

.summary-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.summary-heading > span {
  width: 10px;
  height: 10px;
  background: var(--gold);
  box-shadow: 5px 0 0 var(--lilac);
}

.summary-heading h3 {
  margin: 0;
  color: var(--moon);
  font: 700 23px/1 var(--display);
  text-transform: uppercase;
}

.summary-jar {
  position: relative;
  margin: 0 0 12px;
  overflow: hidden;
  border: 2px solid rgba(242, 205, 111, 0.34);
  background: #0e0d1e;
}

.summary-jar img {
  width: 100%;
  max-height: 158px;
  object-fit: contain;
  padding: 7px;
  filter: drop-shadow(0 0 18px rgba(242, 205, 111, 0.2));
}

.summary-jar figcaption {
  padding: 6px 8px 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.summary-ledger {
  margin: 0;
  border-top: 2px solid var(--line);
}

.summary-ledger > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}

.summary-ledger dt {
  color: var(--muted);
  font: 11px var(--mono);
  text-transform: uppercase;
}

.summary-ledger dd {
  margin: 0;
  color: var(--moon);
  font: 13px var(--mono);
  text-align: right;
}

.summary-ledger .ledger-total dd {
  color: var(--gold-soft);
  font-weight: 500;
}

.summary-ledger .ledger-reward {
  margin-top: 4px;
  padding-inline: 7px;
  border: 1px solid rgba(155, 218, 243, 0.3);
  background: rgba(155, 218, 243, 0.05);
}

.summary-ledger .ledger-reward dd {
  color: var(--cloud);
}

.rarity-key {
  margin-top: 13px;
}

.rarity-key > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.12;
}

.mini-odds {
  display: grid;
  gap: 5px;
}

.odds-chip {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.odds-chip i {
  width: 6px;
  height: 6px;
  background: var(--tier);
  box-shadow: 2px 2px 0 rgba(12, 12, 26, 0.9);
}

.odds-chip span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font: 11px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odds-chip b {
  color: var(--gold-soft);
  font: 10px var(--mono);
}

.legacy-free-state {
  display: none !important;
}

.field-notes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.field-note {
  position: relative;
  min-width: 0;
  min-height: 175px;
  padding: 15px 13px 13px;
  overflow: hidden;
  border: 2px solid var(--line);
  background:
    linear-gradient(135deg, rgba(210, 189, 255, 0.055), transparent 45%),
    var(--ink-raised);
}

.field-note::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 38px;
  height: 38px;
  border: 2px dashed rgba(210, 189, 255, 0.18);
  transform: rotate(45deg);
}

.field-note strong {
  display: block;
  margin: 11px 0 4px;
  color: var(--gold-soft);
  font: 700 18px/1 var(--display);
}

.field-note p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.1;
}

.note-icon {
  position: relative;
  width: 33px;
  height: 33px;
  display: block;
  color: var(--cloud);
}

.note-price .note-icon {
  border: 3px solid currentColor;
  transform: scale(0.8);
  box-shadow: inset 0 0 0 4px var(--ink-raised);
}

.note-price .note-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  width: 5px;
  height: 15px;
  background: var(--gold);
}

.note-stack .note-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 24px;
  height: 7px;
  border: 2px solid currentColor;
  box-shadow:
    0 8px 0 -2px var(--ink-raised),
    0 8px 0 0 currentColor,
    0 16px 0 -2px var(--ink-raised),
    0 16px 0 0 currentColor;
}

.note-clock .note-icon {
  border: 3px solid currentColor;
}

.note-clock .note-icon::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  width: 3px;
  height: 10px;
  background: var(--gold);
}

.note-clock .note-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 8px;
  height: 3px;
  background: var(--gold);
}

.note-branch .note-icon::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 1px;
  width: 4px;
  height: 30px;
  background: currentColor;
}

.note-branch .note-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 25px;
  height: 16px;
  border: 3px solid currentColor;
  border-top: 0;
}

.note-ramp .note-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  background: currentColor;
  box-shadow:
    9px -8px 0 currentColor,
    18px -16px 0 var(--gold);
}

.chapter-shelf {
  background:
    radial-gradient(circle at 10% 20%, rgba(155, 218, 243, 0.06), transparent 26%),
    linear-gradient(180deg, #111026, #0d0c1d);
}

.night-shelf {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
}

.reward-vault,
.invite-desk,
.seller-stall {
  position: relative;
  border: 2px solid var(--line);
  background: var(--ink-raised);
}

.reward-vault {
  min-height: 254px;
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 21px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 50%, rgba(242, 205, 111, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(210, 189, 255, 0.08), #15132c);
}

.reward-vault::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 243, 210, 0.16);
  pointer-events: none;
}

.vault-orbit {
  position: relative;
  width: min(18vw, 144px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
}

.vault-orbit::before,
.vault-orbit::after {
  content: "";
  position: absolute;
  border: 2px dashed var(--lilac-deep);
}

.vault-orbit::before {
  inset: 0;
  transform: rotate(45deg);
  animation: orbit-step 18s steps(16, end) infinite;
}

.vault-orbit::after {
  inset: 20%;
  border-color: var(--gold);
  transform: rotate(20deg);
}

.vault-orbit i {
  width: 48%;
  height: 48%;
  border: 4px solid var(--gold);
  background: rgba(242, 205, 111, 0.08);
  box-shadow:
    inset 0 0 0 5px var(--ink-raised),
    0 0 22px rgba(242, 205, 111, 0.15);
}

.vault-orbit b {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--cloud);
  transform: translate(54px, -30px);
  box-shadow: 3px 3px 0 var(--gold);
}

.vault-orbit span {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--moon);
  transform: translate(-56px, 38px);
}

.vault-copy {
  position: relative;
  min-width: 0;
}

.vault-amount {
  display: block;
  margin: 8px 0 15px;
  overflow: hidden;
  color: var(--gold-soft);
  font: 700 clamp(38px, 5vw, 61px)/0.86 var(--display);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
}

.invite-desk {
  padding: 21px;
  background:
    linear-gradient(90deg, transparent 0 96%, rgba(155, 218, 243, 0.08) 96%),
    var(--ink-raised);
  background-size: 23px 100%, 100%;
}

.desk-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.desk-rune {
  color: var(--cloud);
  font: 700 30px/1 var(--display);
}

.invite-desk > p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.15;
}

.copy-rune {
  display: flex;
  align-items: stretch;
}

.copy-rune input {
  min-width: 0;
  flex: 1;
  border-right: 0;
}

.invite-tally {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  border-top: 2px dashed var(--line);
  border-bottom: 1px solid var(--line);
}

.invite-tally div {
  padding: 9px 0;
}

.invite-tally div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.invite-tally span {
  display: block;
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.invite-tally strong {
  color: var(--cloud);
  font: 700 25px/1 var(--display);
}

.micro-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.15;
}

.shelf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 21px 0 14px;
  padding: 11px 13px;
  border-block: 1px solid var(--line);
}

.shelf-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.compiler-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 12px;
}

.owned-card,
.market-listing {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #111026;
  transition: transform 0.16s steps(2, end), border-color 0.16s;
}

.owned-card:hover,
.market-listing:hover {
  transform: translateY(-4px);
  border-color: var(--lilac);
}

.owned-card > img,
.market-listing > img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: hue-rotate(var(--hue, 0deg)) saturate(0.9);
}

.owned-sealed > img {
  padding: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(242, 205, 111, 0.18));
}

.owned-stamp {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 6px;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  background: rgba(12, 12, 26, 0.84);
  font: 9px var(--mono);
  letter-spacing: 0.08em;
}

.owned-plate,
.listing-plate {
  padding: 10px;
  border-top: 2px solid var(--line);
}

.owned-meta,
.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.owned-plate > strong,
.listing-plate > strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--moon);
  font: 700 17px/1.05 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owned-plate .pixel-button {
  width: 100%;
  margin-top: 9px;
}

.tier-spark {
  width: 6px;
  height: 6px;
  flex: none;
  box-shadow: 3px 3px 0 rgba(12, 12, 26, 0.9);
}

.shelf-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 2px dashed var(--line);
  color: var(--muted);
  text-align: center;
  font: 13px var(--mono);
}

.art-frame.art-missing {
  background:
    radial-gradient(circle at 50% 35%, rgba(242, 205, 111, 0.16), transparent 28%),
    linear-gradient(145deg, var(--ink-panel), var(--ink));
}

.art-frame.art-missing::after {
  content: "DREAMCOMPILE";
  position: absolute;
  inset: 42% 8px auto;
  color: rgba(210, 189, 255, 0.32);
  font: 13px var(--display);
  letter-spacing: 0.1em;
  text-align: center;
}

.chapter-market {
  background:
    radial-gradient(circle at 84% 14%, rgba(210, 189, 255, 0.09), transparent 27%),
    #0d0c1d;
}

.market-heading {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.market-heading-side {
  justify-self: end;
  max-width: 570px;
}

.fee-seal {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 8px 3px;
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: rgba(242, 205, 111, 0.06);
  font: 12px var(--mono);
  text-transform: uppercase;
}

.market-fabric {
  height: 40px;
  margin: -5px 0 20px;
  border-top: 2px dashed var(--lilac-deep);
  border-bottom: 2px dashed var(--lilac-deep);
  background:
    repeating-linear-gradient(90deg, rgba(210, 189, 255, 0.14) 0 2px, transparent 2px 17px),
    repeating-linear-gradient(0deg, rgba(155, 218, 243, 0.08) 0 2px, transparent 2px 13px);
}

.market-state {
  margin: -6px 0 18px;
  color: var(--muted);
  font: 13px var(--mono);
}

.listing-price {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin: 8px 0;
}

.listing-price strong {
  color: var(--gold-soft);
  font: 700 18px var(--display);
}

.listing-price span {
  max-width: 55%;
  overflow: hidden;
  color: var(--muted);
  font: 9px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-plate .pixel-button {
  width: 100%;
}

.seller-stall {
  margin-top: 20px;
  padding: 46px 21px 21px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(210, 189, 255, 0.06), transparent 20%),
    var(--ink-raised);
}

.stall-awning {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  border-bottom: 2px solid var(--gold);
  background: repeating-linear-gradient(
    90deg,
    var(--lilac) 0 28px,
    var(--gold) 28px 56px,
    var(--ink-panel) 56px 84px,
    var(--cloud) 84px 112px
  );
  clip-path: polygon(0 0, 100% 0, 100% 72%, 96% 100%, 92% 72%, 88% 100%, 84% 72%, 80% 100%, 76% 72%, 72% 100%, 68% 72%, 64% 100%, 60% 72%, 56% 100%, 52% 72%, 48% 100%, 44% 72%, 40% 100%, 36% 72%, 32% 100%, 28% 72%, 24% 100%, 20% 72%, 16% 100%, 12% 72%, 8% 100%, 4% 72%, 0 100%);
}

.stall-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.stall-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: 26px;
  margin-top: 14px;
}

.compiler-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 7px;
  max-height: 300px;
  padding-right: 3px;
  overflow: auto;
}

.pick-tile {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  color: var(--moon);
  background: var(--ink);
}

.pick-tile.is-picked {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.pick-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.pick-tile span {
  display: block;
  overflow: hidden;
  padding: 4px 5px;
  font: 9px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stall-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.stall-actions .pixel-button {
  flex: 1;
}

.chapter-loop {
  background:
    radial-gradient(circle at 50% 50%, rgba(155, 218, 243, 0.07), transparent 38%),
    linear-gradient(180deg, #121027, #0c0c1a);
}

.loop-heading {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.compile-loom {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 34px 50px;
  align-items: center;
  padding: 28px;
  border: 2px solid var(--line);
  background: rgba(12, 12, 26, 0.58);
}

.compile-loom > .pixel-button {
  grid-column: 2;
  justify-self: start;
}

.loom-spindle {
  position: relative;
  width: min(31vw, 300px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.spindle-jar {
  position: relative;
  z-index: 2;
  width: 33%;
  height: 44%;
  display: block;
  border: 4px solid var(--moon);
  border-top: 0;
  background:
    linear-gradient(90deg, transparent 0 26%, rgba(210, 189, 255, 0.3) 26% 38%, transparent 38%),
    rgba(210, 189, 255, 0.1);
  box-shadow:
    0 0 28px rgba(242, 205, 111, 0.18),
    8px 8px 0 rgba(210, 189, 255, 0.12);
  clip-path: polygon(10% 0, 90% 0, 90% 9%, 100% 18%, 100% 100%, 0 100%, 0 18%, 10% 9%);
}

.spindle-jar i {
  position: absolute;
  top: -10px;
  left: 5%;
  right: 5%;
  height: 9px;
  background: var(--gold);
}

.spindle-jar b {
  position: absolute;
  top: 26%;
  left: 34%;
  width: 7px;
  height: 22%;
  background: var(--cloud);
  box-shadow:
    -14px 12px 0 var(--gold),
    13px 23px 0 var(--lilac);
}

.spindle-ring {
  position: absolute;
  border: 2px dashed var(--lilac-deep);
}

.ring-one {
  inset: 4%;
  transform: rotate(45deg);
  animation: orbit-step 28s steps(20, end) infinite reverse;
}

.ring-two {
  inset: 19%;
  border-color: rgba(242, 205, 111, 0.48);
  transform: rotate(18deg);
}

.spindle-moon {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 26px;
  height: 26px;
  background: var(--gold-soft);
  box-shadow:
    inset -8px -4px 0 var(--ink),
    5px 5px 0 rgba(210, 189, 255, 0.33);
  transform: rotate(12deg);
}

.loom-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.loom-steps li {
  display: grid;
  grid-template-columns: 47px 1fr;
  gap: 15px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.loom-steps li:first-child {
  border-top: 1px dashed var(--line);
}

.loom-steps li > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 34px;
  color: var(--ink);
  background: var(--lilac);
  font: 700 14px var(--display);
}

.loom-steps li:nth-child(2) > span {
  background: var(--cloud);
}

.loom-steps li:nth-child(3) > span {
  background: var(--gold);
}

.loom-steps li:nth-child(4) > span {
  color: var(--moon);
  background: var(--lilac-deep);
}

.loom-steps p {
  margin: 0;
  color: #ddd8e8;
  font-size: 20px;
  line-height: 1.2;
}

.chapter-rewards {
  background:
    radial-gradient(circle at 76% 32%, rgba(242, 205, 111, 0.07), transparent 28%),
    #0e0d20;
}

.reward-chamber {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.reward-ramp,
.supply-chamber {
  position: relative;
  min-width: 0;
  padding: 21px;
  border: 2px solid var(--line);
  background: var(--ink-raised);
}

.ramp-copy p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.15;
}

.stair-ramp {
  height: 204px;
  display: flex;
  align-items: end;
  gap: 7px;
  margin: 20px 0 15px;
  padding: 13px 8px 0;
  border-left: 1px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(210, 189, 255, 0.07) 40px);
}

.stair-ramp span {
  position: relative;
  flex: 1;
  height: calc(var(--rise) * 8.5px);
  min-height: 9px;
  background:
    repeating-linear-gradient(0deg, rgba(12, 12, 26, 0.5) 0 4px, transparent 4px 8px),
    var(--lilac-deep);
  border-top: 3px solid var(--lilac);
  box-shadow: inset -4px 0 0 rgba(12, 12, 26, 0.4);
}

.stair-ramp span b {
  position: absolute;
  bottom: -20px;
  left: 50%;
  color: var(--muted);
  font: 9px var(--mono);
  font-weight: 400;
  transform: translateX(-50%);
}

.stair-ramp .ramp-peak {
  background:
    repeating-linear-gradient(0deg, rgba(12, 12, 26, 0.45) 0 4px, transparent 4px 8px),
    var(--gold);
  border-color: var(--gold-soft);
}

.next-pulse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 27px;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 11px var(--mono);
  text-transform: uppercase;
}

.next-pulse strong {
  color: var(--gold-soft);
  font-size: 13px;
}

.supply-chamber {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: center;
  gap: 20px;
}

.supply-moon {
  position: relative;
  width: min(19vw, 180px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  background: var(--gold-soft);
  box-shadow:
    inset -24px -10px 0 var(--ink-raised),
    12px 12px 0 rgba(210, 189, 255, 0.17);
  transform: rotate(5deg);
}

.supply-moon::before {
  content: "";
  position: absolute;
  left: 21%;
  top: 18%;
  width: 12px;
  height: 12px;
  background: rgba(139, 120, 186, 0.3);
  box-shadow:
    38px 24px 0 5px rgba(139, 120, 186, 0.22),
    12px 60px 0 2px rgba(139, 120, 186, 0.2);
}

.supply-moon span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font: 700 28px/0.9 var(--display);
  text-align: center;
  transform: rotate(-5deg);
}

.supply-moon small {
  font: 11px var(--mono);
}

.supply-copy {
  min-width: 0;
}

.supply-lines {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.supply-lines div {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  gap: 8px;
  align-items: center;
}

.supply-dot {
  width: 7px;
  height: 7px;
  background: var(--gold);
}

.dot-invite {
  background: var(--lilac);
}

.dot-rest {
  background: #3d385d;
}

.supply-lines span {
  color: var(--muted);
  font-size: 16px;
}

.supply-lines strong {
  color: var(--moon);
  font: 12px var(--mono);
}

.supply-total {
  margin: 17px 0 9px;
  color: var(--cloud);
  font: 12px var(--mono);
}

.fund-note {
  margin: 0;
  padding: 10px;
  border-left: 3px solid var(--gold);
  color: var(--gold-soft);
  background: rgba(242, 205, 111, 0.055);
  font-size: 17px;
  line-height: 1.12;
}

.chapter-tiers {
  background:
    linear-gradient(180deg, rgba(36, 32, 72, 0.58), rgba(12, 12, 26, 0.7)),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(210, 189, 255, 0.045) 31px 33px);
}

.tiers-heading,
.index-heading {
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.6fr);
}

.rarity-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.rarity-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--ink-raised);
  transition: transform 0.18s steps(2, end), border-color 0.18s;
}

.rarity-card:hover {
  transform: translateY(-6px);
  border-color: var(--tier);
}

.rarity-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-bottom: 3px solid var(--tier);
  background: var(--ink);
}

.rarity-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.82);
  transition: transform 0.32s steps(6, end), filter 0.2s;
}

.rarity-card:hover .rarity-art img {
  transform: scale(1.05);
  filter: saturate(1) brightness(0.92);
}

.rarity-art > span {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 5px;
  color: var(--ink);
  background: var(--tier);
  font: 700 10px var(--display);
}

.rarity-body {
  padding: 10px 9px 11px;
}

.rarity-body > small {
  color: var(--tier);
  font: 9px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rarity-body h3 {
  min-height: 37px;
  margin: 4px 0 5px;
  color: var(--moon);
  font: 700 17px/0.95 var(--display);
  text-transform: uppercase;
}

.rarity-body > p {
  min-height: 31px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.02;
}

.rarity-meta {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.rarity-meta strong,
.rarity-meta span {
  color: var(--muted);
  font: 9px/1.2 var(--mono);
  text-transform: uppercase;
}

.rarity-meta b {
  color: var(--gold-soft);
  font: 700 17px/1 var(--display);
}

.chapter-index {
  background:
    radial-gradient(circle at 20% 20%, rgba(155, 218, 243, 0.05), transparent 25%),
    #0c0c1a;
}

.index-stacks {
  display: grid;
  gap: 24px;
}

.archive-preview {
  padding: 14px;
  border: 2px dashed var(--line);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.archive-grid-preview {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.archive-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-raised);
  transition: transform 0.15s steps(2, end), border-color 0.15s;
}

.archive-card:hover {
  transform: translateY(-3px);
  border-color: var(--tier);
}

.archive-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.archive-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: hue-rotate(var(--hue)) saturate(0.86);
}

.archive-art > span {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 4px;
  color: var(--gold-soft);
  background: rgba(12, 12, 26, 0.82);
  font: 8px var(--mono);
}

.archive-label {
  min-width: 0;
  padding: 7px 8px 8px;
  border-top: 2px solid var(--tier);
}

.archive-label small {
  display: block;
  overflow: hidden;
  color: var(--tier);
  font: 8px var(--mono);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-label strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--moon);
  font-size: 13px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-label span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 8px var(--mono);
  text-transform: uppercase;
}

.tier-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tier-banner i {
  width: 7px;
  height: 7px;
  box-shadow: 2px 2px 0 rgba(12, 12, 26, 0.7);
}

.tier-banner h4 {
  margin: 0;
  color: var(--moon);
  font: 700 17px/1 var(--display);
  text-transform: uppercase;
}

.tier-banner span {
  margin-left: auto;
  color: var(--muted);
  font: 9px var(--mono);
  text-transform: uppercase;
}

.chapter-faq {
  background:
    radial-gradient(circle at 80% 18%, rgba(210, 189, 255, 0.07), transparent 26%),
    linear-gradient(180deg, #111026, #090915);
}

.faq-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}

.faq-heading {
  position: sticky;
  top: 96px;
  display: block;
  margin: 0;
}

.faq-heading .chapter-note {
  margin-top: 14px;
}

.faq-moon {
  position: relative;
  display: block;
  width: 105px;
  height: 105px;
  margin-top: 36px;
  background: var(--gold-soft);
  box-shadow:
    inset -22px -10px 0 var(--ink),
    10px 10px 0 rgba(210, 189, 255, 0.2);
  transform: rotate(7deg);
}

.faq-moon i,
.faq-moon b {
  position: absolute;
  background: rgba(139, 120, 186, 0.28);
}

.faq-moon i {
  top: 20px;
  left: 20px;
  width: 10px;
  height: 10px;
  box-shadow: 35px 28px 0 5px rgba(139, 120, 186, 0.18);
}

.faq-moon b {
  top: 61px;
  left: 10px;
  width: 17px;
  height: 6px;
}

.faq-list {
  border-top: 2px solid var(--lilac-deep);
}

.lore-fold {
  border-bottom: 1px solid var(--line);
}

.lore-fold summary {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  padding: 17px 3px;
  list-style: none;
  cursor: pointer;
  color: var(--moon);
  font: 700 18px/1.05 var(--display);
}

.lore-fold summary::-webkit-details-marker {
  display: none;
}

.lore-fold summary > span {
  color: var(--lilac-deep);
  font: 12px var(--mono);
}

.lore-fold summary::after {
  content: "";
  width: 10px;
  height: 10px;
  justify-self: end;
  border-right: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.16s steps(2, end);
}

.lore-fold[open] summary {
  color: var(--gold-soft);
}

.lore-fold[open] summary::after {
  transform: rotate(225deg);
}

.lore-fold p {
  margin: 0 22px 17px 43px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
}

.dream-footer {
  position: relative;
  padding: 42px 0 52px;
  border-top: 3px solid var(--lilac-deep);
  background:
    linear-gradient(180deg, rgba(210, 189, 255, 0.055), transparent 25%),
    #080813;
}

.footer-wrap {
  width: min(1190px, calc(100% - 64px));
  margin: 0 auto;
}

.footer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px dashed var(--line);
}

.footer-banner p {
  margin: 0;
  color: var(--lilac);
  font: 17px var(--hand);
}

.footer-ledger {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 18px;
  padding: 20px 0;
}

.footer-ledger > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-ledger span {
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-ledger code {
  overflow-wrap: anywhere;
  color: var(--moon);
  font: 11px var(--mono);
}

.footer-switch {
  width: fit-content;
  padding: 0;
  border: 0;
  color: var(--gold-soft);
  background: transparent;
  font: 11px var(--mono);
}

.footer-copyright {
  margin: 0;
  color: var(--lilac-deep);
  font: 10px var(--mono);
  letter-spacing: 0.04em;
}

.wallet-tent {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(5, 5, 14, 0.86);
  backdrop-filter: blur(7px);
}

.wallet-tent.show {
  display: grid;
}

.wallet-tent-box {
  width: min(380px, 100%);
  padding: 18px;
  border: 3px solid var(--lilac);
  background: var(--ink-panel);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 6px var(--gold),
    12px 12px 0 rgba(5, 5, 14, 0.6);
}

.wallet-tent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--moon);
  font: 700 22px var(--display);
  text-transform: uppercase;
}

.tent-close {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  color: var(--lilac);
  background: transparent;
  font-size: 23px;
}

.wallet-options {
  display: grid;
  gap: 8px;
}

.wallet-options .pixel-button {
  width: 100%;
}

.dream-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 130;
  max-width: min(88vw, 440px);
  padding: 10px 14px;
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: var(--ink-panel);
  box-shadow: 6px 6px 0 rgba(5, 5, 14, 0.6);
  font: 12px/1.25 var(--mono);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s, transform 0.18s;
}

.dream-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .chapter-marker {
    display: none;
  }

  .rail-map a {
    grid-template-columns: 25px 1fr;
    font-size: 9px;
  }

  .rail-glyph {
    transform: scale(0.9);
  }

  .field-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rarity-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rarity-art {
    aspect-ratio: 4 / 3;
  }

  .archive-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .archive-grid-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  body {
    padding-left: 0;
    padding-bottom: 74px;
    font-size: 18px;
  }

  body::after {
    display: none;
  }

  .dream-rail {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 74px;
    flex-direction: row;
    border-top: 3px solid var(--lilac-deep);
    border-right: 0;
    background: rgba(12, 12, 26, 0.97);
  }

  .dream-rail::before {
    display: none;
  }

  .rail-brand,
  .rail-depth {
    display: none;
  }

  .rail-map {
    flex-direction: row;
    padding: 5px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 2px;
  }

  .rail-map a {
    min-width: 65px;
    min-height: 60px;
    grid-template-columns: 1fr;
    grid-template-rows: 31px 1fr;
    justify-items: center;
    gap: 2px;
    padding: 3px 5px;
    text-align: center;
  }

  .rail-map a > span:last-child {
    max-width: 64px;
    font-size: 9px;
    line-height: 0.95;
  }

  .site-hud {
    left: 0;
  }

  .dream-descent {
    padding-bottom: 22px;
  }

  .prologue {
    min-height: calc(100svh - 150px);
  }

  .prologue-wrap {
    width: min(100% - 36px, 920px);
    grid-template-columns: 1fr;
  }

  .prologue-sign {
    display: none;
  }

  .mint-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(238px, 0.52fr);
  }

  .chapter-wrap,
  .footer-wrap {
    width: min(100% - 42px, 900px);
  }

  .chapter-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chapter-note {
    max-width: 690px;
  }

  .market-heading-side {
    justify-self: start;
  }

  .night-shelf,
  .reward-chamber {
    grid-template-columns: 1fr;
  }

  .reward-vault {
    grid-template-columns: 190px 1fr;
  }

  .compile-loom {
    grid-template-columns: 1fr;
  }

  .compile-loom > .pixel-button {
    grid-column: 1;
  }

  .loom-spindle {
    width: min(46vw, 270px);
  }

  .faq-workbench {
    grid-template-columns: 1fr;
  }

  .faq-heading {
    position: static;
  }

  .faq-moon {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-hud {
    height: 68px;
    gap: 8px;
    padding-inline: 14px;
  }

  .hud-brand {
    gap: 6px;
    font-size: 20px;
  }

  .hud-coordinates {
    display: none;
  }

  .language-dial {
    min-height: 38px;
    padding-inline: 5px;
  }

  .language-dial > span {
    display: none;
  }

  .language-dial select {
    width: 78px;
    font-size: 11px;
  }

  .hud-actions .pixel-button {
    min-height: 40px;
    padding: 8px 11px 6px;
    font-size: 14px;
  }

  .dream-descent {
    padding-top: 68px;
  }

  .prologue {
    min-height: calc(100svh - 142px);
  }

  .prologue-wrap {
    width: min(100% - 24px, 690px);
    padding: 35px 0 48px;
  }

  .dialogue-box {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
    padding: 16px;
    border-width: 3px;
  }

  .speaker-portrait,
  .speaker-portrait img {
    min-height: 105px;
  }

  .speaker-portrait img {
    padding: 5px;
  }

  .dialogue-kicker {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .speaker-name {
    margin-top: 7px;
    font-size: 11px;
  }

  .dialogue-copy h1 {
    font-size: clamp(36px, 10vw, 55px);
    letter-spacing: -0.02em;
  }

  .dialogue-text {
    font-size: 19px;
  }

  .dialogue-actions {
    gap: 7px;
  }

  .dialogue-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialogue-stats div:nth-child(2) {
    border-right: 0;
  }

  .dialogue-stats div:nth-child(-n + 2) {
    border-bottom: 1px dashed var(--line);
  }

  .chapter {
    padding: 70px 0;
  }

  .chapter-wrap,
  .footer-wrap {
    width: min(100% - 26px, 680px);
  }

  .chapter-heading h2 {
    font-size: clamp(33px, 9vw, 48px);
  }

  .chapter-note {
    font-size: 19px;
  }

  .mint-console {
    padding: 12px;
  }

  .console-status {
    grid-template-columns: 1fr auto;
  }

  .console-status > p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mint-counter strong {
    font-size: 32px;
  }

  .clock-and-meter {
    grid-template-columns: 1fr;
  }

  .pixel-clock {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 3px;
  }

  .pixel-clock > div {
    min-width: 0;
    padding-inline: 3px;
  }

  .pixel-clock strong {
    font-size: clamp(19px, 6vw, 28px);
  }

  .pixel-clock span {
    font-size: 8px;
  }

  .pixel-clock > b {
    font-size: 15px;
  }

  .mint-workbench {
    grid-template-columns: 1fr;
  }

  .lane-deck {
    grid-template-columns: 1fr;
  }

  .field-notes {
    grid-template-columns: 1fr 1fr;
  }

  .field-note {
    min-height: 158px;
  }

  .reward-vault {
    grid-template-columns: 130px 1fr;
    padding: 16px;
  }

  .vault-orbit {
    width: 118px;
  }

  .vault-amount {
    font-size: 43px;
  }

  .invite-desk {
    padding: 16px;
  }

  .shelf-toolbar,
  .stall-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .compiler-grid,
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stall-workbench {
    grid-template-columns: 1fr;
  }

  .seller-stall {
    padding: 42px 14px 16px;
  }

  .stall-actions .pixel-button {
    flex-basis: 100%;
  }

  .loom-steps p {
    font-size: 18px;
  }

  .supply-chamber {
    grid-template-columns: 1fr;
  }

  .supply-moon {
    width: 150px;
  }

  .rarity-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rarity-art {
    aspect-ratio: 1;
  }

  .archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .archive-grid-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-ledger {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 17px;
  }

  .site-hud {
    padding-inline: 10px;
  }

  .hud-brand {
    font-size: 17px;
  }

  .brand-jar-small {
    width: 18px;
    height: 23px;
  }

  .language-dial select {
    width: 66px;
    padding-right: 3px;
  }

  .hud-actions {
    gap: 5px;
  }

  .hud-actions .pixel-button {
    padding-inline: 8px;
    font-size: 12px;
  }

  .dialogue-box {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .speaker-portrait,
  .speaker-portrait img {
    min-height: 82px;
  }

  .dialogue-copy h1 {
    font-size: clamp(31px, 9.6vw, 40px);
  }

  .dialogue-text {
    font-size: 17px;
  }

  .dialogue-actions .pixel-button {
    flex: 1 1 100%;
    min-height: 44px;
    font-size: 15px;
  }

  .chapter-heading h2 {
    font-size: 34px;
  }

  .console-status {
    gap: 8px;
  }

  .status-register {
    font-size: 11px;
  }

  .mint-counter em {
    display: none;
  }

  .mint-counter strong {
    font-size: 29px;
  }

  .pixel-clock > div {
    padding-top: 6px;
  }

  .pixel-clock span {
    display: none;
  }

  .sewn-meter {
    gap: 2px;
  }

  .mint-step {
    padding: 14px;
  }

  .step-heading h3 {
    font-size: 21px;
  }

  .field-notes {
    grid-template-columns: 1fr;
  }

  .field-note {
    min-height: 0;
  }

  .reward-vault {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vault-orbit {
    width: 112px;
  }

  .reward-vault .pixel-button {
    margin-inline: auto;
  }

  .copy-rune {
    flex-direction: column;
  }

  .copy-rune input {
    border-right: 2px solid var(--line);
    border-bottom: 0;
  }

  .invite-tally {
    grid-template-columns: 1fr;
  }

  .invite-tally div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .compiler-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid,
  .archive-grid-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rarity-row {
    grid-template-columns: 1fr;
  }

  .rarity-card {
    display: grid;
    grid-template-columns: 128px 1fr;
  }

  .rarity-art {
    height: 100%;
    aspect-ratio: auto;
    border-right: 3px solid var(--tier);
    border-bottom: 0;
  }

  .rarity-art img {
    height: 100%;
    min-height: 170px;
  }

  .rarity-body h3,
  .rarity-body > p {
    min-height: 0;
  }

  .lore-fold summary {
    grid-template-columns: 25px minmax(0, 1fr) 18px;
    font-size: 16px;
  }

  .lore-fold p {
    margin-left: 35px;
    font-size: 17px;
  }

  .dream-toast {
    bottom: 86px;
  }
}

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