:root {
  color-scheme: dark;
  --ink: #f3ead8;
  --ink-muted: #bdb3a2;
  --night: #101416;
  --night-raised: #181e20;
  --night-soft: #22292b;
  --line: #394245;
  --gold: #d9ae62;
  --gold-strong: #f2ca7b;
  --moss: #779775;
  --ember: #b65e3f;
  --focus: #8ed7dc;
  --content: 72rem;
  --reading: 43rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  scroll-behavior: auto;
  overflow-anchor: none;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 174, 98, 0.08), transparent 34rem),
    var(--night);
}

button,
a {
  font: inherit;
}

a {
  color: var(--gold-strong);
}

button {
  color: inherit;
}

:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: var(--night);
  background: var(--focus);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  overflow: hidden;
  background: var(--night-raised);
  border: 1px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
}

.site-caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--gold);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.site-nav a:hover,
.mute-toggle:hover {
  color: var(--ink);
}

.mute-toggle {
  padding: 0;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.mute-toggle[aria-pressed="true"] {
  color: var(--ink);
}

#app {
  min-height: calc(100vh - 10rem);
}

.page {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 2.25rem 0 3.5rem;
}

.page-home {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: 5.5rem 0 4.5rem;
}

.home-copy {
  max-width: 34rem;
}

.home-title {
  max-width: 12ch;
  margin: 0 0 0.65rem;
  font-size: clamp(2.15rem, 5vw, 3.35rem);
}

.home-lead {
  margin: 0 0 1.45rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.45;
}

.page-home .hero-actions {
  margin-top: 0;
}

.home-resume {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25rem;
}

.home-resume:hover {
  color: var(--gold-strong);
  text-decoration-color: var(--gold);
}

.page-reading {
  width: min(100% - 2rem, var(--reading));
}

.eyebrow,
.time-marker,
.progress-label {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.65rem, 8vw, 5.7rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  font-size: 1.45rem;
}

p,
li {
  line-height: 1.7;
}

.lead {
  max-width: 42rem;
  color: var(--ink-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.55;
}

.hero-actions,
.screen-actions,
.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
}

.button-primary {
  color: #18130c;
  background: var(--gold-strong);
}

.button-primary:hover {
  background: #ffdc96;
}

.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: var(--gold);
}

.button-quiet {
  min-height: auto;
  padding: 0.25rem;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}

.card {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  padding: 1.25rem;
  color: var(--ink);
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  text-decoration: none;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-0.15rem);
}

.card p {
  color: var(--ink-muted);
}

.card .button {
  align-self: flex-start;
  margin-top: auto;
}

.visual {
  position: relative;
  min-height: clamp(15rem, 42vw, 31rem);
  margin-bottom: 2rem;
  overflow: hidden;
  background: var(--night-soft);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.visual-compact {
  min-height: clamp(10rem, 28vw, 18rem);
}

.visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.visual::after {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(16, 20, 22, 0.88));
  content: "";
  pointer-events: none;
}

.chapter-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(19rem, 0.75fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.chapter-copy {
  max-width: var(--reading);
}

.chapter-copy p {
  color: #e2d9ca;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.chapter-rail {
  position: sticky;
  top: 1.25rem;
  padding: 1.25rem;
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}

.progress-track {
  height: 0.28rem;
  margin: 0.55rem 0 1.35rem;
  overflow: hidden;
  background: var(--night-soft);
  border-radius: 1rem;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.context-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0;
}

.context-link {
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: rgba(119, 151, 117, 0.12);
  border: 1px solid rgba(119, 151, 117, 0.55);
  border-radius: 2rem;
  cursor: pointer;
}

.context-link:hover {
  background: rgba(119, 151, 117, 0.22);
}

.timeline-list {
  display: grid;
  gap: 0;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  position: relative;
  padding: 0 0 1.4rem 1.8rem;
  border-left: 1px solid var(--line);
}

.timeline-list li::before {
  position: absolute;
  top: 0.25rem;
  left: -0.38rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--night-raised);
  border: 2px solid var(--ink-muted);
  border-radius: 50%;
  content: "";
}

.timeline-list li.current::before {
  background: var(--gold);
  border-color: var(--gold);
}

.timeline-list strong,
.timeline-list span {
  display: block;
}

.timeline-list span {
  color: var(--ink-muted);
}

.detour-banner {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(182, 94, 63, 0.1);
  border: 1px solid rgba(182, 94, 63, 0.6);
  border-radius: 0.4rem;
}

.detour-progress {
  display: flex;
  gap: 0.35rem;
  margin: 1rem 0;
}

.detour-progress span {
  width: 2rem;
  height: 0.24rem;
  background: var(--line);
}

.detour-progress span.active {
  background: var(--ember);
}

.details {
  max-width: var(--reading);
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}

.overview-timeline {
  max-width: var(--reading);
  margin-top: 2rem;
}

.page-stack {
  width: min(100% - 2rem, var(--reading));
  padding-top: 2rem;
}

.page-stack h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
}

.stack-intro {
  margin-bottom: 1.5rem;
}

.timeline-strip {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 2rem;
  padding: 0.7rem 0 0.85rem;
  background: var(--night);
  border-bottom: 1px solid var(--line);
}

.timeline-strip ol {
  display: flex;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  padding: 0 0 0.2rem;
  overflow-x: auto;
  list-style: none;
}

.timeline-strip-item {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2rem;
  cursor: pointer;
  white-space: nowrap;
}

.timeline-strip-item.available {
  color: var(--ink);
  border-color: var(--gold);
}

.timeline-strip-item.current {
  color: #18130c;
  background: var(--gold-strong);
  border-color: var(--gold-strong);
}

.timeline-strip-item.upcoming {
  opacity: 0.55;
}

.stack-chapter,
.stack-completion {
  margin-bottom: 4rem;
  scroll-margin-top: 5.5rem;
}

.stack-chapter h2,
.stack-completion h2 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
}

.stack-continue {
  margin: 0 0 3rem;
}

body.path-open {
  overflow: hidden;
}

body.path-open .site-footer {
  display: none;
}

body.path-open #app {
  min-height: 0;
}

html:has(body.essay-open) {
  scroll-behavior: auto;
}

body.essay-open {
  background: var(--night);
}

body.essay-open .site-header,
body.doors-open .site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  width: auto;
  margin: 0;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(180deg, rgba(16, 20, 22, 0.94) 0%, rgba(16, 20, 22, 0.62) 55%, transparent);
  border-bottom: 0;
  pointer-events: none;
}

body.essay-open .site-nav a {
  display: none;
}

body.essay-open .site-header a,
body.essay-open .site-header button,
body.essay-open .site-caption,
body.doors-open .site-header a,
body.doors-open .site-header button {
  pointer-events: auto;
}

body.essay-open .site-footer,
body.doors-open .site-footer {
  display: none;
}

body.essay-open #app {
  min-height: 0;
}

.story-world {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 5.4rem);
}

.story-rail {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1.25rem;
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 0.85rem 0 0.5rem;
}

.story-rail ol {
  display: flex;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.story-rail-label {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-rail button,
.story-rail a {
  padding: 0;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: none;
}

.story-rail button:hover,
.story-rail a:hover,
.story-rail .current {
  color: var(--gold-strong);
}

.story-path {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 1.25rem;
  min-height: 0;
  padding: 0.5rem 26vw 1.5rem 5vw;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: thin;
}

.story-panel {
  flex: 0 0 min(32rem, 58vw);
  min-width: min(32rem, 58vw);
  will-change: opacity;
}

.story-kicker {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.story-panel img {
  display: block;
  width: 100%;
  height: min(18rem, 36vh);
  object-fit: cover;
}

.story-turnoff {
  max-width: 22rem;
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.story-turnoff a {
  color: var(--gold-strong);
  font-weight: 650;
  text-decoration: none;
}

.story-turnoff p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.story-copy {
  max-width: 34rem;
  margin: 1rem 0 0;
  padding: 0;
}

.story-copy h2 {
  max-width: 18ch;
  margin-bottom: 0.7rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.story-copy p {
  color: #e2d9ca;
  font-family: Georgia, "Times New Roman", serif;
}

.story-inline {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0;
  color: var(--gold-strong);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 650;
}

.essay {
  width: 100%;
  margin: 0;
  padding: 0;
}

.essay h1 {
  max-width: 14ch;
  margin: 0.2rem 0 1.4rem;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1.05;
}

.essay-here,
.essay-spine {
  position: fixed;
  z-index: 6;
  top: 4.4rem;
  left: 50%;
  width: min(28rem, calc(100% - 12rem));
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.essay-spine a {
  pointer-events: auto;
}

.essay-map-toggle {
  padding: 0;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.essay-map-toggle:hover,
.essay-map-toggle[aria-expanded="true"] {
  color: var(--ink);
}

.essay-caption-who,
.essay-caption-here {
  color: inherit;
  text-decoration: none;
}

a.essay-caption-who:hover,
a.essay-caption-who:focus-visible {
  color: var(--gold-strong);
}

.essay-caption-sep {
  margin: 0 0.45rem;
  color: var(--ink-muted);
}

.essay-ticks {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.essay-ticks a {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  background: rgba(189, 179, 162, 0.45);
  border-radius: 50%;
}

.essay-ticks a[aria-current="page"] {
  background: var(--gold-strong);
}

.essay-map {
  position: fixed;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: start center;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(16, 20, 22, 0.88);
}

body.map-open .essay-spine,
body.map-open .essay-scenes {
  visibility: hidden;
}

.essay-map .map-here {
  display: none;
}

.essay-map[hidden] {
  display: none;
}

.essay-map-sheet {
  width: min(92rem, calc(100% - 2rem));
  margin: 4.5rem auto 2rem;
  padding: 0 0 2.5rem;
}

.title-card {
  position: fixed;
  z-index: 24;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 2rem;
  text-align: center;
  background: rgba(16, 20, 22, 0.82);
}

.title-card h1 {
  max-width: 14ch;
  margin: 0.4rem auto 0.8rem;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
}

.title-card p:last-child {
  max-width: 28rem;
  margin: 0 auto;
  color: var(--ink-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.title-card.is-leaving {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.page-night {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-night img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-night::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 20, 22, 0.88) 0%,
    rgba(16, 20, 22, 0.58) 18%,
    rgba(16, 20, 22, 0.42) 42%,
    rgba(16, 20, 22, 0.72) 78%,
    rgba(16, 20, 22, 0.92) 100%
  );
  content: "";
}

body.doors-open:has(.page-explore) .page-night img {
  filter: brightness(0.28) saturate(0.65);
}

body.doors-open:has(.page-explore) .page-night::after {
  background: rgba(16, 20, 22, 0.9);
}

body.doors-open #app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-home,
.page-select,
.page-explore {
  position: relative;
  z-index: 1;
}

.page-select,
.page-explore {
  display: flex;
  min-height: 100vh;
  padding: 5.5rem 0 3rem;
}

.page-select {
  flex-direction: column;
  align-items: stretch;
  width: min(100% - 2rem, 72rem);
  gap: 2.1rem;
}

.page-explore {
  flex-direction: column;
  align-items: stretch;
  width: min(100% - 2rem, 92rem);
  min-width: 0;
  overflow-x: clip;
}

.explore-head {
  margin: 0 0 1.7rem;
}

.explore-title {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
}

.explore-lead {
  max-width: 36rem;
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.45;
}

.select-faction-name {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  width: 100%;
}

.select-card {
  display: block;
  padding: 1rem 1rem 1.15rem;
  color: inherit;
  background: rgba(16, 20, 22, 0.78);
  border: 1px solid rgba(57, 66, 69, 0.8);
  text-decoration: none;
}

.select-card:hover,
.select-card:focus-visible {
  border-color: var(--gold);
}

.select-card-art {
  min-height: 10rem;
  margin-bottom: 0.8rem;
}

.select-card h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.explore-map,
.essay-map-sheet {
  width: 100%;
  max-width: 92rem;
  min-width: 0;
}

.map-here {
  margin: 0 0 1.5rem;
  color: var(--gold);
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-line,
.map-rail {
  min-width: 0;
  max-width: 100%;
}

.map-line + .map-line {
  margin-top: 2.1rem;
}

.map-line-name {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-rail {
  position: relative;
}

.map-rail::before,
.map-rail::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0.55rem;
  width: 3.4rem;
  pointer-events: none;
  opacity: 0;
  content: "";
  transition: opacity 0.18s ease;
}

.map-rail::before {
  left: 0;
  background: linear-gradient(to right, var(--night) 12%, transparent);
}

.map-rail::after {
  right: 0;
  background: linear-gradient(to left, var(--night) 12%, transparent);
}

.map-rail.has-more-start::before,
.map-rail.has-more-end::after {
  opacity: 1;
}

.map-rail-step[hidden] {
  display: none;
}

.map-rail-step {
  position: absolute;
  z-index: 3;
  top: 2.55rem;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  color: var(--gold-strong);
  background: rgba(16, 20, 22, 0.88);
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0.25rem 0.8rem rgba(8, 10, 12, 0.55);
  cursor: pointer;
}

.map-rail-step svg {
  display: block;
  width: 0.7rem;
  height: 1.1rem;
}

.map-rail-prev {
  left: 0.35rem;
}

.map-rail-next {
  right: 0.35rem;
}

.map-rail-step:hover,
.map-rail-step:focus-visible {
  color: var(--night);
  background: var(--gold-strong);
  border-color: var(--gold-strong);
}

.map-rail-step:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.map-beats {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.15rem 0.15rem 0.6rem;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 2.8rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 174, 98, 0.85) rgba(57, 66, 69, 0.55);
}

.map-beats::-webkit-scrollbar {
  height: 0.45rem;
}

.map-beats::-webkit-scrollbar-track {
  background: rgba(57, 66, 69, 0.45);
  border-radius: 99px;
}

.map-beats::-webkit-scrollbar-thumb {
  background: rgba(217, 174, 98, 0.8);
  border-radius: 99px;
}

.map-beat {
  position: relative;
  z-index: 1;
  flex: 0 0 12.5rem;
  width: 12.5rem;
  text-align: center;
}

.map-beat-mark,
.map-hole {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.38rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.map-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--night-raised);
  border: 1px solid rgba(57, 66, 69, 0.95);
  border-radius: 0.18rem;
  box-shadow: 0 0.35rem 1.1rem rgba(8, 10, 12, 0.45);
}

.map-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.9);
}

.map-thumb-empty {
  background:
    linear-gradient(160deg, rgba(217, 174, 98, 0.12), transparent 62%),
    var(--night-raised);
}

.map-beat-label,
.map-hole-label {
  display: block;
  max-width: 100%;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: center;
}

.map-hole-label {
  font-size: 0.7rem;
}

.map-kin-word {
  order: -1;
  color: var(--gold-strong);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-beat-mark:hover,
.map-beat-mark:focus-visible,
.map-hole:hover,
.map-hole:focus-visible,
.map-beat.is-here > .map-beat-mark,
.map-beat-mark[aria-current="location"],
.map-hole.is-here,
.map-hole[aria-current="location"] {
  color: var(--gold-strong);
}

.map-beat-mark:hover .map-thumb,
.map-beat-mark:focus-visible .map-thumb,
.map-hole:hover .map-thumb,
.map-hole:focus-visible .map-thumb {
  border-color: rgba(242, 202, 123, 0.7);
}

.map-beat-mark:hover .map-thumb img,
.map-beat-mark:focus-visible .map-thumb img,
.map-hole:hover .map-thumb img,
.map-hole:focus-visible .map-thumb img {
  filter: saturate(1) brightness(1.04);
}

.map-beat.is-here > .map-beat-mark .map-thumb,
.map-beat-mark[aria-current="location"] .map-thumb,
.map-hole.is-here .map-thumb,
.map-hole[aria-current="location"] .map-thumb {
  border-color: var(--gold-strong);
  box-shadow:
    0 0 0 1px var(--gold-strong),
    0 0.4rem 1.2rem rgba(217, 174, 98, 0.22);
}

.map-beat.is-here > .map-beat-mark .map-thumb img,
.map-beat-mark[aria-current="location"] .map-thumb img,
.map-hole.is-here .map-thumb img,
.map-hole[aria-current="location"] .map-thumb img {
  filter: saturate(1) brightness(1.06);
}

.map-beat.is-next > .map-beat-mark,
.map-beat.is-from > .map-beat-mark,
.map-hole.is-next,
.map-hole.is-from {
  color: var(--gold-strong);
}

.map-beat.is-next > .map-beat-mark .map-thumb,
.map-beat.is-from > .map-beat-mark .map-thumb,
.map-hole.is-next .map-thumb,
.map-hole.is-from .map-thumb {
  border-color: rgba(217, 174, 98, 0.72);
}

.map-holes {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  padding: 0.45rem 0 0;
  list-style: none;
}

.map-holes li {
  position: relative;
}

.map-holes li::before {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  width: 1px;
  height: 0.5rem;
  background: rgba(217, 174, 98, 0.28);
  content: "";
}

.map-hole {
  width: 6.6rem;
}

.map-holes-nested {
  margin-top: 0.55rem;
}

.map-beat-forks {
  flex: 0 0 auto;
  width: auto;
}

.map-beat-forks > ol {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-beat-forks .map-beat {
  flex: none;
  width: 11.2rem;
}

.map-fork-or {
  align-self: flex-start;
  padding-top: 2.9rem;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

@media (max-width: 760px) {
  .map-rail-step {
    top: 1.95rem;
  }

  .map-beat {
    flex-basis: 10.2rem;
    width: 10.2rem;
  }

  .map-hole {
    width: 6.2rem;
  }

  .map-beat-forks .map-beat {
    width: 9.6rem;
  }

  .map-fork-or {
    padding-top: 2.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-thumb img {
    filter: none;
  }

  .map-rail::before,
  .map-rail::after {
    transition: none;
  }
}

@media (max-width: 760px) {
  .select-grid {
    grid-template-columns: 1fr;
  }

  .site-caption {
    order: 3;
    width: 100%;
    text-align: left;
  }
}

.essay-scene {
  position: relative;
}

.essay-scene-art {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.essay-scene-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.essay-scene-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--night) 0%,
    rgba(16, 20, 22, 0.82) 4%,
    rgba(16, 20, 22, 0.48) 10%,
    rgba(16, 20, 22, 0.16) 18%,
    rgba(16, 20, 22, 0.1) 32%,
    rgba(16, 20, 22, 0.1) 48%,
    rgba(16, 20, 22, 0.16) 62%,
    rgba(16, 20, 22, 0.48) 78%,
    rgba(16, 20, 22, 0.82) 92%,
    var(--night) 100%
  );
  content: "";
}

.essay-scene-paths {
  position: absolute;
  z-index: 1;
  right: 6%;
  bottom: 24%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
}

.essay-scene-path {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #ffdc96;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.25;
  text-shadow: 0 0.12rem 0.55rem rgba(16, 20, 22, 0.95);
}

.essay-scene-path::before {
  width: 5.2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffdc96);
  content: "";
}

.essay-scene-path span {
  padding: 0.42rem 0.7rem 0.42rem 0.8rem;
  background: rgba(16, 20, 22, 0.66);
  border: 1px solid rgba(242, 202, 123, 0.5);
  border-radius: 0.15rem;
}

.essay-scene-path::after {
  font-weight: 700;
  content: "›";
}

.essay-scene-path:hover,
.essay-scene-path:focus-visible {
  color: #ffe7b0;
}

.essay-scene-path:hover span,
.essay-scene-path:focus-visible span {
  background: rgba(16, 20, 22, 0.82);
  border-color: #ffdc96;
}

.essay-scene-path.is-return {
  flex-direction: row-reverse;
}

.essay-scene-path.is-return::before {
  background: linear-gradient(90deg, #ffdc96, transparent);
}

.essay-scene-path.is-return::after {
  content: "‹";
}

.essay-scene-copy {
  position: relative;
  z-index: 1;
  width: min(36rem, calc(100% - 2.5rem));
  margin: -100vh 0 0 max(1.25rem, 8vw);
  padding: 52vh 0 48vh;
}

.essay-scene:last-child .essay-scene-copy {
  padding-bottom: 72vh;
}

.essay-scene-copy h1,
.essay-scene-copy h2,
.essay-scene-copy p,
.essay-scene-copy .eyebrow,
.essay-scene-copy .time-marker {
  text-shadow: 0 0.12rem 0.5rem rgba(16, 20, 22, 0.9);
}

.essay-scene-copy .time-marker,
.essay-scene-copy p {
  position: relative;
  isolation: isolate;
  padding: 0.45rem 0.9rem 0.55rem;
}

.essay-scene-copy .time-marker::before,
.essay-scene-copy p::before {
  position: absolute;
  z-index: -1;
  inset: -1.1rem -2.6rem;
  pointer-events: none;
  background: rgba(16, 20, 22, 0.62);
  filter: blur(1.9rem);
  content: "";
}

.essay-scene-copy .time-marker {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.essay-scene-copy p {
  position: relative;
  margin: 0 0 1.15rem;
  color: #e8dfd0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.72;
}

.essay-identify {
  display: inline;
  padding: 0;
  color: var(--gold-strong);
  background: transparent;
  border: 0;
  border-bottom: 1px dotted var(--gold);
  cursor: pointer;
  font: inherit;
}

.essay-identify:hover,
.essay-identify:focus-visible {
  color: #ffdc96;
  border-bottom-color: #ffdc96;
}

a.essay-path {
  display: inline;
  padding: 0.08em 0.22em 0.1em 0.32em;
  color: var(--gold-strong);
  background: rgba(217, 174, 98, 0.18);
  border-radius: 0.18em;
  text-decoration: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

a.essay-path::after {
  display: inline-block;
  margin-left: 0.28em;
  font-weight: 700;
  content: "›";
}

a.essay-path:hover,
a.essay-path:focus-visible {
  color: #ffdc96;
  background: rgba(217, 174, 98, 0.3);
}

a.essay-path.is-painted {
  padding: 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--gold);
}

a.essay-path.is-painted:hover,
a.essay-path.is-painted:focus-visible {
  background: transparent;
  border-bottom-color: #ffdc96;
}

.essay-clause {
  position: absolute;
  z-index: 3;
  top: 0;
  left: calc(100% + 1.15rem);
  width: min(22rem, 26vw);
  margin: 0;
  padding: 0.55rem 0.75rem;
  color: #e8dfd0;
  background: rgba(16, 20, 22, 0.8);
  border-left: 1px solid var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.55;
  text-shadow: 0 0.12rem 0.5rem rgba(16, 20, 22, 0.9);
}

.essay-fork {
  margin: 1.75rem 0 0;
}

.essay-fork a {
  color: var(--gold-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.essay-aside .essay-fork {
  margin: 0.75rem 0;
}

.essay-aside {
  position: fixed;
  z-index: 7;
  width: min(22rem, calc(100% - 2.5rem));
  padding: 1rem 1.1rem;
  background: rgba(24, 30, 32, 0.94);
  border-left: 0.25rem solid var(--gold);
}

.essay-aside h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.essay-aside p {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
}

.essay-aside-close {
  padding: 0;
  color: var(--gold-strong);
  background: transparent;
  border: 0;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .essay-scene-art {
    position: relative;
    height: min(28rem, 70vh);
  }

  .essay-scene-copy {
    margin-top: 0;
    padding: 1.5rem 0 3.5rem;
  }

  .essay-scene:last-child .essay-scene-copy {
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 1100px) {
  .essay-clause {
    position: static;
    display: block;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: none;
    margin: 0.85rem 0 0.15rem;
    border-left: 0;
    border-top: 1px solid var(--gold);
  }
}

@media (max-width: 860px) {
  body.essay-open .site-caption,
  body.doors-open .site-caption {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
  }

  .essay-scene-copy {
    margin-left: 1.25rem;
    padding-top: 46vh;
  }

  .essay-here,
  .essay-spine {
    top: 4.6rem;
    width: min(28rem, calc(100% - 2rem));
  }

  body.essay-open .site-header,
  body.doors-open .site-header {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
  }

  body.essay-open .site-caption {
    order: 0;
    width: auto;
    flex: 1;
    text-align: left;
  }

  body.essay-open .site-nav,
  body.doors-open .site-nav {
    flex-direction: row;
    gap: 0.85rem;
  }

  .essay-scene-paths {
    right: 1.25rem;
    bottom: 22%;
  }
}

@media (max-width: 760px) {
  .story-panel {
    flex-basis: 82vw;
    min-width: 82vw;
  }

  .story-path {
    gap: 1rem;
    padding-right: 18vw;
    padding-left: 1rem;
  }

  .story-panel img {
    height: min(16rem, 34vh);
  }
}

.overview-timeline h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.details summary {
  cursor: pointer;
  font-weight: 650;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  color: var(--ink-muted);
  background: var(--night-raised);
  border-left: 0.25rem solid var(--gold);
}

.completion-list {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
}

.dialog {
  width: min(calc(100% - 2rem), 34rem);
  max-height: calc(100vh - 2rem);
  padding: 1.5rem;
  color: var(--ink);
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.dialog-wide {
  width: min(calc(100% - 2rem), 48rem);
}

.dialog::backdrop {
  background: rgba(5, 7, 8, 0.82);
}

.dialog-close {
  margin-top: 1rem;
}

.source-list {
  padding-left: 1.2rem;
}

.source-list a {
  overflow-wrap: anywhere;
}

.site-footer {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 1rem 0 2rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.noscript {
  margin: 1rem;
  padding: 1rem;
  color: #18130c;
  background: var(--gold-strong);
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    flex-direction: column;
    gap: 0.4rem;
    text-align: right;
  }

  body.essay-open .site-header,
  body.doors-open .site-header {
    align-items: center;
  }

  body.essay-open .site-nav,
  body.doors-open .site-nav {
    flex-direction: row;
    gap: 0.85rem;
    text-align: left;
  }

  .card-grid,
  .chapter-shell {
    grid-template-columns: 1fr;
  }

  .chapter-rail {
    position: static;
  }

  .visual {
    min-height: 14rem;
  }
}

@media (max-width: 440px) {
  .brand span:last-child {
    display: none;
  }

  .page,
  .page-reading {
    width: min(100% - 1.25rem, var(--content));
  }

  .hero-actions,
  .screen-actions,
  .secondary-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .timeline-strip-item,
  .button-quiet {
    width: auto;
  }
}

body.essay-sliding {
  overflow: hidden;
}

.essay-slide-outgoing {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
  background: var(--night);
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.72s ease;
}

.essay-slide-outgoing img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.essay-slide-outgoing::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--night) 0%,
    rgba(16, 20, 22, 0.82) 4%,
    rgba(16, 20, 22, 0.48) 9%,
    rgba(16, 20, 22, 0.18) 16%,
    rgba(16, 20, 22, 0.1) 24%,
    rgba(16, 20, 22, 0.08) 36%,
    rgba(16, 20, 22, 0.38) 58%,
    rgba(16, 20, 22, 0.68) 78%,
    rgba(16, 20, 22, 0.9) 92%,
    var(--night) 100%
  );
  content: "";
}

.essay-slide-outgoing.is-out-left,
.essay-slide-outgoing.is-out-right {
  opacity: 0.35;
}

.essay-slide-outgoing.is-out-left {
  transform: translateX(-100%);
}

.essay-slide-outgoing.is-out-right {
  transform: translateX(100%);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 760px) {
  body.essay-open {
    --essay-chrome: calc(6.55rem + env(safe-area-inset-top, 0px));
  }

  body.essay-open .site-header,
  body.doors-open .site-header {
    padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.4rem;
    background: var(--night);
  }

  .essay-here,
  .essay-spine {
    top: calc(3.45rem + env(safe-area-inset-top, 0px));
  }

  .essay-spine {
    z-index: 21;
    left: 0;
    width: 100%;
    padding: 0 0.75rem 0.35rem;
    background: var(--night);
    transform: none;
  }

  .essay-ticks {
    width: 100%;
    justify-content: safe center;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    pointer-events: auto;
  }

  .essay-ticks::-webkit-scrollbar {
    display: none;
  }

  .essay-ticks a {
    position: relative;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
  }

  .essay-ticks a::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    background: rgba(189, 179, 162, 0.45);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    content: "";
  }

  .essay-ticks a[aria-current="page"] {
    background: transparent;
  }

  .essay-ticks a[aria-current="page"]::after {
    width: 0.7rem;
    height: 0.7rem;
    background: var(--gold-strong);
  }

  .essay-scenes {
    padding-top: var(--essay-chrome);
  }

  .essay-scene {
    scroll-margin-top: var(--essay-chrome);
  }

  .essay-scene-art {
    position: sticky;
    top: var(--essay-chrome);
    z-index: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: visible;
    background: var(--night);
  }

  .essay-scene-art img {
    position: absolute;
    inset: 0;
  }

  .essay-scene-art::after {
    inset: auto 0 -1.5rem 0;
    height: 1.5rem;
    pointer-events: none;
    background: linear-gradient(180deg, var(--night), transparent);
  }

  .essay-scene-paths {
    right: 0.75rem;
    bottom: 0.65rem;
    left: 0.75rem;
    align-items: flex-end;
  }

  .essay-scene-path {
    max-width: 100%;
    justify-content: flex-end;
  }

  .essay-scene-path span {
    max-width: min(16rem, calc(100% - 6.2rem));
  }

  .essay-scene-copy {
    width: auto;
    margin: 0 1.25rem;
    padding: 1.35rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }

  .essay-scene:last-child .essay-scene-copy {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
}
