:root {
  --bg: #09090b;
  --bg-2: #101012;
  --bone: #e6dccb;
  --bone-dim: #a89f90;
  --core: #d14b22;
  --core-hot: #f05a2a;
  --muted: #6e6860;
  --line: rgba(230, 220, 203, 0.16);
  --line-strong: rgba(230, 220, 203, 0.32);
  --panel: rgba(9, 9, 11, 0.72);
  --bar-h: 64px;
  --dock-w: 280px;
  --shell-max: 1920px;
  --font: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.shell {
  position: relative;
  width: min(100%, var(--shell-max));
  height: 100%;
  min-height: 100dvh;
  margin-inline: auto;
  overflow: hidden;
}

.hud-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  pointer-events: none;
}

.hud-bar > * {
  pointer-events: auto;
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.mark:hover {
  color: var(--core-hot);
}

.hud-end {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.hud-menu-btn {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hud-menu-btn span {
  display: block;
  width: 1.2rem;
  height: 1.5px;
  background: currentColor;
}

.music-toggle {
  margin-left: 0.15rem;
  padding: 0.35rem 0 0.35rem 1.05rem;
  border-left: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: var(--bone-dim);
  transition: color 0.15s ease;
}

.music-toggle svg {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.music-toggle .music-ico-pause {
  display: none;
}

.music-toggle[aria-pressed="true"] .music-ico-play {
  display: none;
}

.music-toggle[aria-pressed="true"] .music-ico-pause {
  display: block;
}

.music-toggle:hover {
  color: var(--bone);
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--bone);
}

.nav-link[aria-current="page"] {
  color: var(--bone);
  border-bottom-color: var(--core);
}

.stage {
  position: absolute;
  inset: 0;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.page-fade {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #09090b;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.page-fade.is-on {
  opacity: 1;
  pointer-events: auto;
}

.oracle-gate {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #000;
  color: #fff;
  transition: opacity 1s ease;
}

.oracle-gate.is-out {
  opacity: 0;
  pointer-events: none;
}

.oracle-gate.is-armed .oracle-center,
.oracle-gate.is-armed .oracle-gate-mark {
  opacity: 0;
  pointer-events: none;
}

.oracle-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  width: min(40rem, calc(100% - 2.4rem));
  transition: opacity 2s ease;
}

.oracle-gate-mark {
  position: absolute;
  top: 1.4rem;
  left: 1.5rem;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 0.9;
  color: #fff;
  pointer-events: none;
  transition: opacity 2s ease;
}

.oracle-enter {
  position: static;
  margin: 0;
  padding: 0.4rem 0.2rem;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}

.oracle-quality {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.15rem;
  width: 100%;
}

.oracle-quality-pick {
  margin: 0;
  padding: 0.2rem 0.1rem;
  border: 0;
  outline: none;
  background: none;
  color: #6e6860;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}

.oracle-quality-pick:nth-child(1) {
  justify-self: end;
  text-align: right;
}

.oracle-quality-pick:nth-child(2) {
  justify-self: center;
  text-align: center;
}

.oracle-quality-pick:nth-child(3) {
  justify-self: start;
  text-align: left;
}

.oracle-quality-pick:hover,
.oracle-quality-pick:focus-visible {
  color: var(--core-hot);
}

.oracle-quality-pick[aria-pressed="true"] {
  color: #fff;
}

.oracle-quality-hint {
  margin: 0 auto;
  min-height: 1.2em;
  max-width: 22rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: center;
  color: #6e6860;
}

.oracle-enter:hover,
.oracle-enter:focus-visible {
  color: var(--core-hot);
}

.stage-fade {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #09090b;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.stage-fade.is-on {
  opacity: 1;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0.07;
  mix-blend-mode: overlay;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  background: radial-gradient(ellipse at 50% 42%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.land-copy {
  position: absolute;
  z-index: 12;
  top: 1.4rem;
  left: 1.5rem;
  max-width: min(34rem, calc(100% - 10rem));
  pointer-events: none;
}

.page-home .hud-bar .mark {
  display: none;
}

.page-home .hud-bar {
  justify-content: flex-end;
}

.page-home .nav-link,
.page-constructs .nav-link,
.page-home .music-toggle,
.page-constructs .music-toggle,
.page-home .hud-menu-btn,
.page-constructs .hud-menu-btn {
  color: #141312;
}

.page-home .nav-link[aria-current="page"],
.page-constructs .nav-link[aria-current="page"] {
  color: #0a0908;
  border-bottom-color: var(--core);
}

.page-home .nav-link:hover,
.page-constructs .nav-link:hover,
.page-constructs .mark:hover,
.page-home .music-toggle:hover,
.page-constructs .music-toggle:hover,
.page-home .hud-menu-btn:hover,
.page-constructs .hud-menu-btn:hover,
.land-copy h1 a:hover {
  color: #6e6860;
}

.page-home .loading,
.page-constructs .loading {
  color: #1c1a18;
}

.page-constructs .mark {
  color: #111110;
}

.page-constructs .hint {
  color: #1c1a18;
}

.land-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 0.9;
  color: #111110;
}

.land-copy h1 a {
  color: inherit;
  pointer-events: auto;
  transition: color 0.15s ease;
}

.land-copy p.tag {
  margin: 0.7rem 0 0;
  color: #1c1a18;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  max-width: 22rem;
  line-height: 1.45;
}

.page-constructs .stage {
  left: 0;
}

.dock {
  position: absolute;
  z-index: 14;
  top: var(--bar-h);
  left: 0;
  bottom: 0;
  width: var(--dock-w);
  padding: 1.1rem 1.15rem 1.4rem;
  background: rgba(9, 9, 11, 0.8);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.page-constructs .dock {
  background: transparent;
  border-right: 0;
  border-top: 0;
}

.dock h2 {
  margin: 0 0 0.55rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-constructs .dock h2 {
  font-size: 1.24rem;
  color: #111110;
}

.picks {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--bone-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pick:hover {
  color: var(--bone);
  border-color: var(--line-strong);
}

.pick[aria-pressed="true"] {
  color: var(--bone);
  border-color: var(--core);
  background: rgba(209, 75, 34, 0.12);
}

.page-constructs .pick[aria-pressed="true"],
.page-constructs .pick[aria-pressed="true"]:hover {
  color: #111110;
}

.pick-compact {
  display: none;
}

.pick-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.pick[aria-pressed="true"] .pick-kicker {
  color: var(--core);
}

.dock-bar {
  display: none;
}

.dock-slot {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--bone-dim);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-info {
  position: relative;
  margin-top: auto;
  flex: 1 0 auto;
  min-height: 8.5rem;
  padding: 0.85rem 0.9rem 1rem;
  background: #000;
  color: #f4efe6;
  overflow-y: auto;
}

.dock-info-title {
  position: relative;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f4efe6;
}

.page-constructs .dock .dock-info-title {
  color: #f4efe6;
}

.dock-info-copy {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #e6dccb;
}

.dock-info.is-empty .dock-info-title,
.dock-info.is-empty .dock-info-copy {
  display: none;
}

.dock-info:not(.is-ready):not(.is-fading-out) .dock-info-title,
.dock-info:not(.is-ready):not(.is-fading-out) .dock-info-copy {
  opacity: 0;
}

.dock-info.is-ready:not(.is-glitching) .dock-info-title,
.dock-info.is-ready:not(.is-glitching) .dock-info-copy {
  opacity: 1;
  transition: opacity 1s ease;
}

.dock-info.is-fading-out .dock-info-title,
.dock-info.is-fading-out .dock-info-copy,
.dock-info.is-ready.is-fading-out .dock-info-title,
.dock-info.is-ready.is-fading-out .dock-info-copy {
  opacity: 0;
  transition: opacity 1s ease;
  animation: none;
  text-shadow: none;
  filter: none;
  clip-path: none;
  transform: none;
}

.dock-info.is-glitching {
  overflow: hidden;
}

.dock-info.is-glitching::before,
.dock-info.is-glitching::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.dock-info.is-glitching::before {
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(230, 220, 203, 0.045) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  animation: lore-scanlines 1.05s ease-out both;
}

.dock-info.is-glitching::after {
  left: 0;
  right: 0;
  height: 2.2rem;
  top: -12%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(209, 75, 34, 0.32) 45%,
    rgba(90, 170, 196, 0.22) 55%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: lore-scanbar 0.72s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.dock-info.is-glitching .dock-info-title,
.dock-info.is-glitching .dock-info-copy {
  opacity: 0;
  animation: lore-block-in 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--glitch-i, 0) * 68ms + 40ms);
}

.dock-info.is-glitching .dock-info-title {
  animation: lore-title-tear 0.62s steps(2, end) both;
}

.dock-info.is-glitching .dock-info-title::before,
.dock-info.is-glitching .dock-info-title::after {
  content: attr(data-glitch);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  text-transform: uppercase;
}

.dock-info.is-glitching .dock-info-title::before {
  color: var(--core);
  mix-blend-mode: screen;
  animation: lore-rgb-l 0.58s steps(2, end) both;
}

.dock-info.is-glitching .dock-info-title::after {
  color: #5aa8c4;
  mix-blend-mode: screen;
  animation: lore-rgb-r 0.58s steps(2, end) both;
}

.hint {
  position: absolute;
  z-index: 12;
  right: 1.4rem;
  bottom: 1.3rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.loading {
  position: absolute;
  z-index: 16;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-dim);
  pointer-events: none;
}

.loading[hidden] {
  display: none;
}

.corners {
  position: absolute;
  inset: calc(var(--bar-h) + 0.7rem) 0.7rem 0.7rem calc(var(--dock-w) + 0.15rem);
  pointer-events: none;
  z-index: 9;
}

.corners::before,
.corners::after,
.corners span::before,
.corners span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--line-strong);
  border-style: solid;
}

.corners::before {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.corners::after {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.corners span::before {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.corners span::after {
  bottom: 0;
  right: 0;
  border-width: 0 1px 1px 0;
}

.page-lore,
.page-game {
  background: #050506;
}

.page-lore .dock {
  background: #08080a;
  border-right: 1px solid var(--line);
}

.lore-read,
.game-read {
  position: absolute;
  z-index: 11;
  top: var(--bar-h);
  left: var(--dock-w);
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #050506;
  pointer-events: auto;
}

.game-read {
  left: 0;
}

.lore-read::-webkit-scrollbar,
.game-read::-webkit-scrollbar {
  width: 8px;
}

.lore-read::-webkit-scrollbar-thumb,
.game-read::-webkit-scrollbar-thumb {
  background: #3a3a40;
  border-radius: 4px;
}

.lore-copy {
  position: relative;
  z-index: 12;
  width: min(42rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.1rem 0 4.2rem;
  pointer-events: auto;
}

.lore-copy h1 {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--bone);
}

.lore-copy p {
  margin: 0 0 1.15rem;
  color: var(--bone-dim);
  font-size: 0.95rem;
  line-height: 1.62;
  letter-spacing: 0.02em;
  max-width: 38em;
}

.game-fold {
  margin: 0 0 0.55rem;
  border: 1px solid var(--line);
  background: #0c0c0e;
  interpolate-size: allow-keywords;
}

.game-fold summary {
  cursor: pointer;
  list-style: none;
  padding: 0.88rem 1rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone);
}

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

.game-fold summary::after {
  content: "+";
  display: inline-block;
  float: right;
  color: var(--core);
  font-weight: 700;
  transition: transform 0.28s ease;
}

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

.game-fold::details-content {
  display: block;
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    block-size 0.32s ease,
    opacity 0.28s ease,
    content-visibility 0.32s allow-discrete;
}

.game-fold[open]::details-content {
  block-size: auto;
  opacity: 1;
}

.game-fold[open] .game-fold-body {
  animation: game-fold-in 0.32s ease;
}

.game-fold-body {
  padding: 0 1rem 0.2rem;
}

@keyframes game-fold-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.story-head {
  margin-bottom: 1.25rem;
}

.story-kicker {
  margin: 0 0 0.45rem !important;
  font-size: 0.62rem !important;
  font-weight: 600;
  letter-spacing: 0.28em !important;
  text-transform: uppercase;
  color: var(--core) !important;
}

.story-meta {
  margin: 0.45rem 0 0 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--muted) !important;
}

.story-art {
  margin: 0 0 1.35rem;
  max-width: 38em;
  border: 1px solid var(--line);
  background: #0c0c0e;
}

.story-art img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.05) saturate(0.85);
}

.story-pull {
  margin: 1.4rem 0 1.35rem;
  padding: 0.85rem 0 0.85rem 1rem;
  border-left: 2px solid var(--core);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.25;
  max-width: 38em;
}

.story-sign {
  margin-top: 1.6rem !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
}

.lore-section {
  margin: 1.8rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--core);
}

.lore-copy .lore-section:first-of-type {
  margin-top: 0.4rem;
}

.dock-slot[aria-pressed="true"] {
  color: var(--bone);
  border-color: var(--core);
}

.lore-copy:not(.is-ready) > * {
  opacity: 0;
}

.lore-copy.is-glitching::before,
.lore-copy.is-glitching::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.lore-copy.is-glitching::before {
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(230, 220, 203, 0.045) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  animation: lore-scanlines 1.05s ease-out both;
}

.lore-copy.is-glitching::after {
  left: 0;
  right: 0;
  height: 2.2rem;
  top: -12%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(209, 75, 34, 0.32) 45%,
    rgba(90, 170, 196, 0.22) 55%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: lore-scanbar 0.72s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.lore-copy.is-glitching > * {
  opacity: 0;
  animation: lore-block-in 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--glitch-i, 0) * 68ms + 40ms);
}

.lore-copy.is-glitching h1 {
  animation: lore-title-tear 0.62s steps(2, end) both;
}

.lore-copy.is-glitching h1::before,
.lore-copy.is-glitching h1::after {
  content: attr(data-glitch);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  text-transform: uppercase;
}

.lore-copy.is-glitching h1::before {
  color: var(--core);
  mix-blend-mode: screen;
  animation: lore-rgb-l 0.58s steps(2, end) both;
}

.lore-copy.is-glitching h1::after {
  color: #5aa8c4;
  mix-blend-mode: screen;
  animation: lore-rgb-r 0.58s steps(2, end) both;
}

.lore-copy.is-glitching .story-pull {
  animation:
    lore-block-in 0.78s cubic-bezier(0.16, 1, 0.3, 1) both,
    lore-pull-flash 0.7s ease-out both;
  animation-delay: calc(var(--glitch-i, 0) * 68ms + 40ms);
}

.lore-copy.is-glitching .story-art {
  animation: lore-art-block 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--glitch-i, 0) * 68ms + 40ms);
}

.lore-copy.is-glitching .story-art img {
  animation: lore-art-img 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lore-scanlines {
  0% {
    opacity: 0.9;
    transform: translateY(-8px);
  }
  70% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes lore-scanbar {
  0% {
    top: -18%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    top: 108%;
    opacity: 0;
  }
}

@keyframes lore-block-in {
  0% {
    opacity: 0;
    transform: translate3d(12px, 0, 0);
    clip-path: inset(0 0 100% 0);
    filter: brightness(1.45);
  }
  16% {
    opacity: 1;
    transform: translate3d(-6px, 0, 0);
    clip-path: inset(0 0 28% 0);
    text-shadow: -3px 0 var(--core), 3px 0 #5aa8c4;
  }
  28% {
    transform: translate3d(4px, 0, 0);
    clip-path: inset(0 0 0 0);
    text-shadow: 2px 0 var(--core), -2px 0 #5aa8c4;
  }
  44% {
    transform: translate3d(-2px, 0, 0);
    text-shadow: -1px 0 var(--core), 1px 0 #5aa8c4;
    filter: none;
  }
  100% {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
    text-shadow: none;
    filter: none;
  }
}

@keyframes lore-art-block {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    filter: brightness(1.55);
  }
  24% {
    opacity: 1;
    clip-path: inset(0 18% 0 0);
  }
  48% {
    clip-path: inset(0 0 0 0);
    filter: none;
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: none;
  }
}

@keyframes lore-title-tear {
  0% {
    clip-path: inset(0 0 62% 0);
    transform: translate(-4px, 0);
  }
  18% {
    clip-path: inset(48% 0 0 0);
    transform: translate(5px, 0);
  }
  36% {
    clip-path: inset(18% 0 28% 0);
    transform: translate(-3px, 0);
  }
  54% {
    clip-path: inset(0 0 0 0);
    transform: translate(2px, 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@keyframes lore-rgb-l {
  0%,
  20% {
    transform: translate(-5px, -1px);
    clip-path: inset(0 0 58% 0);
    opacity: 0.85;
  }
  40% {
    transform: translate(3px, 1px);
    clip-path: inset(40% 0 10% 0);
  }
  70%,
  100% {
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }
}

@keyframes lore-rgb-r {
  0%,
  22% {
    transform: translate(5px, 1px);
    clip-path: inset(52% 0 0 0);
    opacity: 0.8;
  }
  44% {
    transform: translate(-3px, -1px);
    clip-path: inset(8% 0 42% 0);
  }
  70%,
  100% {
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }
}

@keyframes lore-pull-flash {
  0%,
  30% {
    border-left-color: #5aa8c4;
  }
  48% {
    border-left-color: var(--core-hot);
  }
  100% {
    border-left-color: var(--core);
  }
}

@keyframes lore-art-img {
  0% {
    filter: contrast(2.1) saturate(0) brightness(1.55);
    transform: translateX(10px) skewX(-4deg);
  }
  22% {
    filter: contrast(1.5) saturate(0.25) brightness(0.75);
    transform: translateX(-6px) skewX(2deg);
  }
  48% {
    filter: contrast(1.2) saturate(0.7) brightness(1.05);
    transform: translateX(2px);
  }
  100% {
    filter: contrast(1.05) saturate(0.85);
    transform: none;
  }
}

.page-home .corners {
  inset: 10rem 0.7rem 0.7rem 0.7rem;
}

.page-lore .corners {
  inset: calc(var(--bar-h) + 0.7rem) 0.7rem 0.7rem calc(var(--dock-w) + 0.15rem);
}

@media (max-width: 860px) {
  .hud-end {
    gap: 0.35rem;
  }

  .hud-menu-btn {
    display: flex;
  }

  .hud-nav {
    display: none;
    position: absolute;
    top: var(--bar-h);
    right: 0;
    left: auto;
    width: min(16.5rem, 100vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: rgba(9, 9, 11, 0.88);
    border: 0;
    z-index: 24;
  }

  body.hud-menu-open .hud-nav {
    display: flex;
  }

  .hud-nav .nav-link,
  .page-home .hud-nav .nav-link,
  .page-constructs .hud-nav .nav-link,
  .page-game .hud-nav .nav-link,
  .page-lore .hud-nav .nav-link {
    display: block;
    width: 100%;
    padding: 0.9rem 1.1rem;
    color: #f4efe6;
    border-bottom: 1px solid var(--line);
    border-top: 0;
    box-sizing: border-box;
  }

  .hud-nav .nav-link:last-child,
  .page-home .hud-nav .nav-link:last-child,
  .page-constructs .hud-nav .nav-link:last-child,
  .page-game .hud-nav .nav-link:last-child,
  .page-lore .hud-nav .nav-link:last-child {
    border-bottom: 0;
  }

  .hud-nav .nav-link:hover,
  .page-home .hud-nav .nav-link:hover,
  .page-constructs .hud-nav .nav-link:hover,
  .page-game .hud-nav .nav-link:hover,
  .page-lore .hud-nav .nav-link:hover {
    color: #fff;
  }

  .hud-nav .nav-link[aria-current="page"],
  .page-home .hud-nav .nav-link[aria-current="page"],
  .page-constructs .hud-nav .nav-link[aria-current="page"],
  .page-game .hud-nav .nav-link[aria-current="page"],
  .page-lore .hud-nav .nav-link[aria-current="page"] {
    color: #fff;
    border-bottom-color: var(--line);
    box-shadow: inset 2px 0 0 var(--core);
  }

  .music-toggle {
    margin-left: 0;
    padding: 0.4rem 0.45rem;
    border-left: 0;
    font-size: 0.64rem;
  }

  .page-home,
  .page-constructs {
    --bar-h: 46px;
  }

  .page-home .hud-bar,
  .page-constructs .hud-bar {
    background: rgba(9, 9, 11, 0.88);
  }

  .page-home .mark,
  .page-constructs .mark,
  .page-home .music-toggle,
  .page-constructs .music-toggle,
  .page-home .hud-menu-btn,
  .page-constructs .hud-menu-btn,
  .page-home .land-copy h1,
  .page-home .land-copy h1 a {
    color: var(--bone);
  }

  .page-home .music-toggle:hover,
  .page-constructs .music-toggle:hover,
  .page-constructs .mark:hover,
  .page-home .hud-menu-btn:hover,
  .page-constructs .hud-menu-btn:hover,
  .page-home .land-copy h1 a:hover {
    color: #f4efe6;
  }

  .page-home .hud-menu-btn,
  .page-constructs .hud-menu-btn {
    width: 2rem;
    height: 2rem;
  }

  .page-home .land-copy {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    max-width: none;
    display: block;
    z-index: 21;
    padding: 0 1rem;
  }

  .page-home .land-copy h1 {
    height: var(--bar-h);
    display: flex;
    align-items: center;
    max-width: calc(100% - 7.2rem);
  }

  .oracle-gate-mark {
    top: 0;
    left: 1rem;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    font-size: clamp(1.55rem, 7.4vw, 2.2rem);
    letter-spacing: 0.1em;
    color: var(--bone);
  }

  .page-home .land-copy p.tag {
    position: absolute;
    top: auto;
    left: 1rem;
    bottom: 2rem;
    margin: 0;
    color: #fff;
  }

  .oracle-center {
    width: calc(100% - 1.6rem);
    gap: 1.1rem;
  }

  .oracle-enter {
    width: 100%;
    font-size: clamp(1.7rem, 7.2vw, 2.3rem);
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .oracle-quality {
    column-gap: 0.3rem;
  }

  .oracle-quality-pick {
    font-size: clamp(0.88rem, 4.1vw, 1.12rem);
    letter-spacing: 0.04em;
    padding: 0.55rem 0.05rem;
  }

  .oracle-quality-hint {
    font-size: clamp(0.92rem, 4.2vw, 1.12rem);
    letter-spacing: 0.02em;
    max-width: 100%;
    line-height: 1.35;
  }

  .dock {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 38vh;
    padding: 0.7rem 0.85rem 0.95rem;
    background: rgba(9, 9, 11, 0.8);
    border-right: 0;
    border-top: 1px solid var(--line);
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0.65rem;
  }

  .dock section {
    min-width: 0;
    width: 100%;
  }

  .dock h2 {
    margin-bottom: 0.3rem;
  }

  .picks {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .pick {
    width: auto;
    flex: 1 1 calc(25% - 0.3rem);
    min-width: 4.6rem;
    justify-content: center;
    padding: 0.42rem 0.4rem;
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .pick-kicker {
    display: none;
  }

  .page-constructs .dock[data-screen="constructs"] {
    max-height: none;
    padding: 0.45rem 0.55rem 0.7rem;
    gap: 0.4rem;
    background: rgba(9, 9, 11, 0.88);
  }

  .page-constructs .dock[data-screen="constructs"] > section {
    display: none;
  }

  .page-constructs .dock[data-screen="constructs"].is-picking > section.is-open {
    display: block;
  }

  .page-constructs .dock[data-screen="constructs"] > section.is-open h2 {
    display: none;
  }

  .page-constructs .dock-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
  }

  .page-constructs .dock.is-picking .dock-bar {
    display: none;
  }

  .page-constructs .dock-slot {
    padding: 0.42rem 0.4rem;
    font-family: var(--font);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    color: var(--bone);
    background: var(--bg-2);
  }

  .page-constructs .dock[data-picking="class"] .picks {
    flex-wrap: nowrap;
  }

  .page-constructs .dock[data-picking="class"] .pick {
    flex: 1 1 0;
    min-width: 0;
  }

  .page-constructs .pick[aria-pressed="true"],
  .page-constructs .pick[aria-pressed="true"]:hover {
    color: #f4efe6;
  }

  .page-constructs .dock[data-picking="hardware"] .pick,
  .page-constructs .dock[data-picking="weapon"] .pick {
    flex: 1 1 calc(50% - 0.3rem);
  }

  .page-constructs .dock-info {
    display: none;
  }

  .dock-info-title {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
  }

  .dock-info-copy {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .corners {
    inset: calc(var(--bar-h) + 0.5rem) 0.5rem calc(38vh + 0.15rem) 0.5rem;
  }

  .page-constructs .corners {
    inset: calc(var(--bar-h) + 0.5rem) 0.5rem 4.8rem 0.5rem;
  }

  .hint {
    display: none;
  }

  .land-copy {
    top: 1rem;
    left: 1rem;
    max-width: calc(100% - 6.2rem);
  }

  .land-copy h1 {
    font-size: clamp(1.55rem, 7.4vw, 2.2rem);
    letter-spacing: 0.1em;
  }

  .land-copy p.tag {
    font-size: 0.78rem;
    max-width: 13.5rem;
  }

  .page-lore .lore-dock {
    max-height: none;
    padding: 0.45rem 0.55rem 0.7rem;
    gap: 0.4rem;
    background: rgba(9, 9, 11, 0.88);
  }

  .page-lore .lore-dock > section {
    display: none;
  }

  .page-lore .lore-dock.is-picking > section.is-open {
    display: block;
  }

  .page-lore .lore-dock.is-picking > section.is-open h2 {
    display: none;
  }

  .page-lore .lore-dock .dock-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .page-lore .lore-dock.is-picking .dock-bar {
    display: none;
  }

  .page-lore .dock-slot {
    padding: 0.42rem 0.4rem;
    font-family: var(--font);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    color: var(--bone);
    background: var(--bg-2);
  }

  .page-lore .dock-slot[aria-pressed="true"] {
    color: #f4efe6;
  }

  .page-lore .lore-dock[data-picking="stories"] .picks {
    flex-wrap: wrap;
  }

  .page-lore .lore-dock[data-picking="stories"] .pick {
    flex: 1 1 calc(50% - 0.3rem);
    color: var(--bone-dim);
  }

  .page-lore .lore-dock[data-picking="stories"] .pick[aria-pressed="true"] {
    color: #f4efe6;
  }

  .lore-read {
    left: 0;
    bottom: 4.8rem;
  }

  .lore-copy {
    width: calc(100% - 2rem);
    padding: 1.2rem 0 2.2rem;
  }

  .page-lore .corners {
    display: none;
  }

  .page-home .corners {
    inset: calc(var(--bar-h) + 0.5rem) 0.5rem 0.5rem 0.5rem;
  }
}

@media (max-width: 520px) {
  .hud-bar {
    padding: 0 1rem;
  }

  .mark {
    letter-spacing: 0.18em;
    font-size: 1rem;
  }

  .land-copy h1,
  .oracle-gate-mark {
    letter-spacing: 0.12em;
  }
}

.anim-editor {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: rgba(9, 9, 11, 0.96);
  border-top: 1px solid var(--line);
  color: var(--bone);
  pointer-events: auto;
}

.anim-resize {
  flex: 0 0 8px;
  cursor: ns-resize;
  background: transparent;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.anim-resize::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
  transform: translateX(-50%);
}

.anim-resize:hover::after {
  background: var(--core);
}

.anim-editor[hidden] {
  display: none;
}

.anim-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.anim-curve-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.anim-channel-list {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  width: 9.5rem;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.anim-channel-item {
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  color: var(--bone-dim);
}

.anim-channel-item:hover {
  color: var(--bone);
  background: rgba(230, 220, 203, 0.04);
}

.anim-channel-item.is-selected {
  color: var(--bone);
  background: rgba(209, 75, 34, 0.14);
}

.anim-channel-item.is-hidden {
  opacity: 0.32;
}

.anim-swatch {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.anim-curve-canvas {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: block;
  cursor: crosshair;
}

.anim-curve-canvas:focus {
  outline: none;
}

.anim-kicker {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--core);
}

.anim-event,
.anim-duration,
.anim-btn {
  font: inherit;
  color: var(--bone);
  background: rgba(16, 16, 18, 0.7);
  border: 1px solid var(--line);
  padding: 0.28rem 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.anim-transport {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
}

.anim-icon-btn {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.anim-icon-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  display: block;
}

.anim-btn:hover,
.anim-event:hover {
  border-color: var(--core);
}

.anim-btn.is-on,
.anim-btn-accent {
  border-color: var(--core);
  background: rgba(209, 75, 34, 0.18);
}

.anim-editor-tools {
  border-bottom: 1px solid var(--line);
}

.shot-pip {
  position: absolute;
  z-index: 18;
  top: 4.6rem;
  right: 1.15rem;
  width: min(28vw, 360px);
  aspect-ratio: 16 / 9;
  pointer-events: none;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.shot-pip[hidden] {
  display: none;
}

.shot-pip-label {
  position: absolute;
  top: 0.35rem;
  left: 0.45rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--core);
  text-shadow: 0 1px 2px #000;
}

.fx-stack {
  position: absolute;
  z-index: 21;
  top: calc(var(--bar-h) + 0.35rem);
  right: 1.15rem;
  bottom: 0.6rem;
  width: 232px;
  overflow-y: auto;
  padding: 0.7rem 0.75rem 0.85rem;
  background: rgba(9, 9, 11, 0.92);
  border: 1px solid var(--line);
  color: var(--bone);
  pointer-events: auto;
}

.fx-stack.is-under-pip {
  top: calc(4.6rem + min(28vw, 360px) * 9 / 16 + 0.45rem);
}

body.anim-editing .fx-stack {
  bottom: 15.5rem;
}

.fx-stack::-webkit-scrollbar {
  width: 6px;
}

.fx-stack::-webkit-scrollbar-thumb {
  background: #3a3a40;
  border-radius: 3px;
}

.fx-stack[hidden] {
  display: none;
}

.post-panel,
.light-panel {
  position: static;
  width: auto;
  padding: 0;
  background: none;
  border: none;
}

.post-panel {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.post-panel-title {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--core);
  margin-bottom: 0.55rem;
}

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin: 0 0 0.45rem;
}

.post-row input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  accent-color: var(--core);
}

.post-row [data-val] {
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.post-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin: 0.2rem 0 0.35rem;
}

.post-row select,
.post-row input[type="color"] {
  justify-self: end;
  grid-column: 2;
  width: 4.6rem;
  height: 1.15rem;
  padding: 0 0.15rem;
  border: 1px solid var(--line);
  background: #111114;
  color: var(--bone);
  font-size: 0.58rem;
}

.post-row input[type="color"] {
  width: 1.5rem;
  cursor: pointer;
}

.light-card {
  border-top: 1px solid var(--line);
  margin-top: 0.55rem;
  padding-top: 0.5rem;
}

.light-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 0.35rem;
}

.light-card-head .post-check {
  margin: 0;
}

.light-card.is-point .light-dir,
.light-card.is-dir .light-point {
  display: none;
}

.anim-field,
.anim-check,
.anim-help,
.anim-path {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.anim-duration {
  width: 4.2rem;
}

.anim-path {
  color: var(--bone-dim);
}

.anim-help {
  margin-left: auto;
}

.anim-key-t,
.anim-key-v {
  width: 4.6rem;
}

@media (prefers-reduced-motion: reduce) {
  .pick {
    transition: none;
  }

  .game-fold::details-content,
  .game-fold summary::after {
    transition: none;
  }

  .game-fold[open] .game-fold-body {
    animation: none;
  }

  .lore-copy:not(.is-ready) > *,
  .lore-copy.is-glitching > *,
  .lore-copy.is-glitching h1,
  .lore-copy.is-glitching .story-pull,
  .lore-copy.is-glitching .story-art,
  .lore-copy.is-glitching .story-art img {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
    text-shadow: none;
  }

  .lore-copy.is-glitching::before,
  .lore-copy.is-glitching::after,
  .lore-copy.is-glitching h1::before,
  .lore-copy.is-glitching h1::after,
  .dock-info.is-glitching::before,
  .dock-info.is-glitching::after,
  .dock-info.is-glitching .dock-info-title::before,
  .dock-info.is-glitching .dock-info-title::after {
    display: none;
  }

  .dock-info:not(.is-ready) .dock-info-title,
  .dock-info:not(.is-ready) .dock-info-copy,
  .dock-info.is-glitching .dock-info-title,
  .dock-info.is-glitching .dock-info-copy,
  .dock-info.is-fading-out .dock-info-title,
  .dock-info.is-fading-out .dock-info-copy {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
    text-shadow: none;
    transition: none;
  }
}
