.multi-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(10, 9, 8, 0.92), rgba(10, 9, 8, 0.62) 48%, rgba(10, 9, 8, 0.2)),
    linear-gradient(180deg, rgba(10, 9, 8, 0.1), var(--paper)),
    url("assets/quiet-notes.png") center / cover fixed;
  opacity: 1;
  transform: none;
  transition: opacity 420ms ease, transform 420ms ease, filter 320ms ease;
}

.multi-page.ready {
  opacity: 1;
  transform: translateY(0);
}

.multi-page.is-leaving {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-8px);
}

.room-veil,
.soft-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.room-veil {
  z-index: 80;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(214, 168, 91, 0.16), transparent 28%),
    rgba(12, 11, 10, 0.68);
  transform: none;
  transition: opacity 220ms ease, transform 320ms ease;
}

.multi-page.is-leaving .room-veil {
  opacity: 1;
  transform: scale(1);
}

.multi-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(255, 250, 241, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 250, 241, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, black 12%, black 82%, transparent);
  pointer-events: none;
}

.multi-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(214, 168, 91, 0.12), transparent 22%),
    radial-gradient(circle at 82% 32%, rgba(127, 182, 170, 0.1), transparent 24%),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 250, 241, 0.045) 46%, transparent 54% 100%);
  background-size: 100% 100%, 100% 100%, 240% 240%;
  opacity: 0.8;
  pointer-events: none;
  animation: atmosphereSweep 18s ease-in-out infinite alternate;
}

@keyframes atmosphereSweep {
  from {
    background-position: 0 0, 0 0, 0% 50%;
  }

  to {
    background-position: 4vw -3vh, -5vw 4vh, 100% 50%;
  }
}

.chapter-page {
  background:
    linear-gradient(120deg, rgba(12, 11, 10, 0.96), rgba(22, 27, 25, 0.94)),
    url("assets/quiet-notes.png") center / cover fixed;
}

.chapter-page .chapter-layout::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: clamp(16px, 4vw, 70px);
  top: 118px;
  width: min(26vw, 320px);
  height: min(58vh, 620px);
  border-left: 1px solid rgba(214, 168, 91, 0.28);
  border-bottom: 1px solid rgba(127, 182, 170, 0.16);
  background:
    linear-gradient(180deg, rgba(214, 168, 91, 0.09), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 250, 241, 0.04) 0 1px, transparent 1px 34px);
  opacity: 0.72;
  mask-image: linear-gradient(180deg, transparent, black 10%, black 88%, transparent);
  pointer-events: none;
  animation: motifFloat 11s ease-in-out infinite alternate;
}

@keyframes motifFloat {
  to {
    transform: translate3d(12px, -10px, 0);
    opacity: 0.46;
  }
}

.chapter-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: min(40vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(214, 168, 91, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(214, 168, 91, 0.14), transparent 34%),
    conic-gradient(from 45deg, transparent, rgba(127, 182, 170, 0.14), transparent, rgba(217, 137, 137, 0.12), transparent);
  opacity: 0.9;
  pointer-events: none;
  transform: translate(0, 0);
  animation: slowSpin 28s linear infinite;
}

@keyframes slowSpin {
  to {
    rotate: 360deg;
  }
}

body[data-page="harm"]::after {
  border-color: rgba(217, 137, 137, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 137, 137, 0.18), transparent 32%),
    repeating-conic-gradient(from 18deg, rgba(217, 137, 137, 0.14) 0 8deg, transparent 8deg 32deg);
  opacity: 0.55;
}

body[data-page="apology"]::after {
  border-color: rgba(217, 137, 137, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 137, 137, 0.16), transparent 34%),
    repeating-conic-gradient(from 45deg, rgba(214, 168, 91, 0.13) 0 5deg, transparent 5deg 28deg);
  opacity: 0.62;
}

body[data-page="love"]::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 137, 137, 0.16), transparent 36%),
    conic-gradient(from 90deg, rgba(214, 168, 91, 0.12), transparent, rgba(217, 137, 137, 0.14), transparent);
}

body[data-page="memories"]::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(127, 182, 170, 0.18), transparent 36%),
    conic-gradient(from 20deg, transparent, rgba(214, 168, 91, 0.14), transparent, rgba(127, 182, 170, 0.16), transparent);
}

.final-note-page::after {
  display: none;
}

.page-nav {
  position: sticky;
  z-index: 30;
  top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(12, 11, 10, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.22);
}

.chapter-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chapter-mini a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chapter-mini a:hover,
.chapter-mini a.active {
  color: var(--ink);
  background: rgba(255, 250, 241, 0.1);
}

.chapter-mini a {
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.chapter-mini a:hover {
  border-color: rgba(214, 168, 91, 0.38);
  transform: translateY(-1px);
}

.brand {
  transition: color 180ms ease, text-shadow 180ms ease;
}

.brand:hover {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(214, 168, 91, 0.22);
}

.home-hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-content: space-between;
  padding-bottom: clamp(48px, 8vw, 88px);
  max-width: 100%;
  overflow: hidden;
}

.hero-sigil {
  position: absolute;
  z-index: 8;
  right: clamp(32px, 8vw, 130px);
  top: clamp(120px, 18vh, 190px);
  width: min(32vw, 390px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(214, 168, 91, 0.2) 0 2px, transparent 3px),
    conic-gradient(from 18deg, transparent, rgba(127, 182, 170, 0.22), transparent, rgba(214, 168, 91, 0.2), transparent);
  opacity: 0.86;
  pointer-events: auto;
  cursor: pointer;
  animation: sigilDrift 16s ease-in-out infinite alternate, sigilGlow 5.5s ease-in-out infinite;
}

@keyframes sigilGlow {
  50% {
    box-shadow: 0 0 0 10px rgba(214, 168, 91, 0.035), 0 0 70px rgba(127, 182, 170, 0.16);
  }
}

.hero-sigil:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.secret-line {
  position: absolute;
  right: clamp(22px, 7vw, 110px);
  top: clamp(420px, 58vh, 540px);
  z-index: 4;
  width: min(420px, calc(100% - 44px));
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(214, 168, 91, 0.36);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.16), rgba(127, 182, 170, 0.08)),
    rgba(14, 13, 12, 0.82);
  box-shadow: 0 20px 70px var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.secret-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-secret {
  position: absolute;
  left: clamp(20px, 8vw, 110px);
  top: clamp(610px, 72vh, 720px);
  z-index: 4;
  width: min(460px, calc(100% - 40px));
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(127, 182, 170, 0.38);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(127, 182, 170, 0.14), rgba(214, 168, 91, 0.08)),
    rgba(14, 13, 12, 0.84);
  box-shadow: 0 20px 70px var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.brand-secret.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-sigil::before,
.hero-sigil::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(214, 168, 91, 0.22);
  border-radius: 50%;
}

.hero-sigil::after {
  inset: 35%;
  border-color: rgba(127, 182, 170, 0.28);
}

.hero-sigil span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(214, 168, 91, 0.12);
}

.hero-sigil span:nth-child(1) {
  left: 18%;
  top: 34%;
}

.hero-sigil span:nth-child(2) {
  left: 42%;
  top: 14%;
  background: var(--teal);
}

.hero-sigil span:nth-child(3) {
  right: 18%;
  top: 38%;
}

.hero-sigil span:nth-child(4) {
  left: 32%;
  bottom: 18%;
  background: var(--rose);
}

.hero-sigil span:nth-child(5) {
  right: 28%;
  bottom: 24%;
  background: var(--teal);
}

@keyframes sigilDrift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  to {
    transform: translate3d(-14px, 10px, 0) rotate(8deg);
  }
}

.home-copy {
  width: min(860px, calc(100% - 40px));
  margin: clamp(70px, 12vh, 140px) auto 0 clamp(20px, 8vw, 110px);
}

.home-copy,
.home-status,
.room-map-graphic,
.chapter-side,
.chapter-body > *,
.chapter-card {
  opacity: 0;
  transform: translateY(20px);
  animation: riseIn 720ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.home-status {
  --delay: 140ms;
}

.room-map-graphic {
  --delay: 240ms;
}

.chapter-side {
  --delay: 80ms;
}

.chapter-body > * {
  --delay: 180ms;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-copy p {
  max-width: 680px;
}

.home-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(820px, calc(100% - 40px));
  margin: 42px auto 0 clamp(20px, 8vw, 110px);
}

.home-status div,
.home-status .status-button,
.home-status .status-link,
.chapter-card,
.big-note,
.soul-panel,
.accountability-output,
.unlock-note,
.path-sentence {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.06);
  box-shadow: 0 24px 80px var(--shadow);
}

.home-status div,
.home-status .status-button,
.home-status .status-link {
  min-height: 100px;
  padding: 18px;
  backdrop-filter: blur(16px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.home-status div:hover,
.home-status .status-button:hover,
.home-status .status-link:hover {
  border-color: rgba(214, 168, 91, 0.42);
  transform: translateY(-3px);
}

.home-status div.unlocked-status,
.home-status .status-link.unlocked-status {
  border-color: rgba(214, 168, 91, 0.64);
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.18), transparent 50%),
    rgba(255, 250, 241, 0.075);
}

.home-status strong,
.chapter-card span {
  display: block;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.home-status span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.status-link {
  display: block;
}

.status-button {
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.egg-shelf {
  width: min(820px, calc(100% - 40px));
  margin: 18px auto 0 clamp(20px, 8vw, 110px);
  padding: 18px;
  border: 1px solid rgba(214, 168, 91, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.14), rgba(127, 182, 170, 0.08)),
    rgba(255, 250, 241, 0.055);
  box-shadow: 0 22px 70px var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}

.egg-shelf.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#final-note {
  position: relative;
  top: -90px;
}

.room-map-graphic {
  position: relative;
  width: min(820px, calc(100% - 40px));
  height: 210px;
  margin: 30px auto 0 clamp(20px, 8vw, 110px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(127, 182, 170, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.06), rgba(255, 250, 241, 0.025));
  box-shadow: 0 24px 80px var(--shadow);
  overflow: hidden;
}

.room-map-graphic:hover a {
  opacity: 0.78;
}

.room-map-graphic a:hover {
  opacity: 1;
  border-color: var(--gold);
  background: rgba(214, 168, 91, 0.22);
  transform: translate(-50%, -50%) scale(1.05);
}

.room-map-graphic a::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(214, 168, 91, 0.22);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.76);
  transition: opacity 220ms ease, transform 220ms ease;
}

.room-map-graphic a:hover::before {
  opacity: 1;
  transform: scale(1);
}

.room-map-graphic::before,
.room-map-graphic::after {
  content: "";
  position: absolute;
  inset: 24px 52px;
  background:
    linear-gradient(24deg, transparent 48%, rgba(214, 168, 91, 0.32) 49%, rgba(214, 168, 91, 0.32) 50%, transparent 51%),
    linear-gradient(155deg, transparent 48%, rgba(127, 182, 170, 0.26) 49%, rgba(127, 182, 170, 0.26) 50%, transparent 51%);
  opacity: 0.8;
  animation: mapLines 9s ease-in-out infinite alternate;
}

.room-map-graphic::after {
  inset: 44px 80px;
  transform: rotate(-8deg);
  opacity: 0.45;
  animation-duration: 13s;
}

@keyframes mapLines {
  to {
    opacity: 0.36;
    transform: translate3d(10px, -6px, 0) rotate(2deg);
  }
}

.room-map-graphic a {
  position: absolute;
  z-index: 2;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 92px;
  height: 36px;
  border: 1px solid rgba(214, 168, 91, 0.46);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(15, 14, 13, 0.84);
  box-shadow: 0 0 0 6px rgba(214, 168, 91, 0.06);
  font-size: 0.82rem;
  transform: translate(-50%, -50%);
  animation: roomPulse 4.8s ease-in-out infinite;
  animation-delay: calc(var(--x) * -0.035s);
}

@keyframes roomPulse {
  50% {
    box-shadow: 0 0 0 8px rgba(214, 168, 91, 0.08), 0 0 24px rgba(127, 182, 170, 0.12);
  }
}

.chapter-hub {
  display: grid;
  grid-template-columns: repeat(7, minmax(260px, 1fr));
  gap: 14px;
  min-height: 72vh;
  padding: clamp(42px, 8vw, 90px) clamp(20px, 5vw, 70px);
  overflow-x: auto;
  background: linear-gradient(180deg, rgba(23, 21, 20, 0.96), rgba(14, 13, 12, 0.98));
}

.chapter-card {
  min-height: 360px;
  display: grid;
  align-content: space-between;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.chapter-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 250, 241, 0.08);
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.035);
  transition: transform 320ms ease, border-color 260ms ease, background 260ms ease;
}

.chapter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--light-x, 50%) var(--light-y, 30%), rgba(255, 250, 241, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(214, 168, 91, 0.14), transparent 34%, rgba(127, 182, 170, 0.08));
  opacity: 0;
  transition: opacity 220ms ease;
}

.chapter-card:hover {
  border-color: rgba(214, 168, 91, 0.46);
  transform: translateY(-8px);
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.5);
}

.chapter-card:active,
.button:active,
.chapter-mini a:active,
.filter-chip:active,
.accountability-grid button:active,
.trait-orbit button:active,
.path-builder button:active,
.feeling-grid button:active {
  transform: translateY(1px) scale(0.99);
}

.chapter-card:hover::before {
  opacity: 1;
}

.chapter-card:hover::after {
  transform: translate(-16px, -18px) scale(1.15);
  border-color: rgba(214, 168, 91, 0.18);
  background: rgba(214, 168, 91, 0.06);
}

.chapter-card > * {
  position: relative;
  z-index: 1;
}

.chapter-card.in-view,
.chapter-body > *.in-view,
.artifact.in-view,
.memory-lanes details.in-view,
.accordion-list details.in-view {
  animation-play-state: running;
}

.chapter-body > *.in-view {
  animation-name: slideFocusIn;
}

@keyframes slideFocusIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.chapter-card.visited::before {
  opacity: 0.34;
}

.chapter-icon,
.chapter-emblem {
  position: relative;
  width: 74px;
  height: 74px;
  display: block;
  border: 1px solid rgba(214, 168, 91, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.18), rgba(127, 182, 170, 0.08)),
    rgba(255, 250, 241, 0.04);
}

.chapter-card:hover .chapter-icon,
.trait-orbit button:hover,
.accountability-grid button:hover,
.path-builder button:hover,
.feeling-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 168, 91, 0.72);
}

.chapter-icon::before,
.chapter-icon::after,
.chapter-emblem::before,
.chapter-emblem::after {
  content: "";
  position: absolute;
}

.icon-confession::before,
.emblem-confession::before {
  width: 34px;
  height: 44px;
  left: 19px;
  top: 14px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  transform: rotate(-8deg);
}

.icon-confession::after,
.emblem-confession::after {
  width: 26px;
  height: 2px;
  left: 24px;
  top: 34px;
  background: var(--teal);
  box-shadow: 0 8px 0 var(--teal);
}

.icon-apology::before,
.emblem-apology::before {
  width: 42px;
  height: 42px;
  left: 15px;
  top: 15px;
  border: 2px solid var(--rose);
  border-radius: 50%;
}

.icon-apology::after,
.emblem-apology::after {
  width: 2px;
  height: 30px;
  left: 36px;
  top: 22px;
  background: var(--rose);
  transform: rotate(28deg);
}

.icon-harm::before,
.emblem-harm::before {
  width: 42px;
  height: 42px;
  left: 15px;
  top: 15px;
  border: 2px solid var(--rose);
  border-radius: 8px;
  transform: rotate(45deg);
}

.icon-harm::after,
.emblem-harm::after {
  width: 34px;
  height: 2px;
  left: 20px;
  top: 36px;
  background: var(--gold);
}

.icon-juliet::before,
.emblem-juliet::before {
  width: 38px;
  height: 38px;
  left: 17px;
  top: 16px;
  border: 2px solid var(--teal);
  border-radius: 50% 50% 46% 46%;
}

.icon-juliet::after,
.emblem-juliet::after {
  width: 44px;
  height: 14px;
  left: 14px;
  top: 48px;
  border: 2px solid var(--gold);
  border-top: 0;
  border-radius: 0 0 32px 32px;
}

.icon-memory::before,
.emblem-memory::before {
  width: 48px;
  height: 24px;
  left: 13px;
  top: 30px;
  border: 2px solid var(--gold);
  border-radius: 16px 16px 8px 8px;
}

.icon-memory::after,
.emblem-memory::after {
  width: 8px;
  height: 8px;
  left: 22px;
  top: 51px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 28px 0 0 var(--teal);
}

.icon-love::before,
.emblem-love::before {
  width: 34px;
  height: 34px;
  left: 20px;
  top: 20px;
  border: 2px solid var(--rose);
  border-radius: 50% 50% 46% 46%;
  transform: rotate(45deg);
}

.icon-healing::before,
.emblem-healing::before {
  width: 46px;
  height: 46px;
  left: 14px;
  top: 14px;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.icon-healing::after,
.emblem-healing::after {
  width: 30px;
  height: 2px;
  left: 22px;
  top: 36px;
  background: var(--gold);
  box-shadow: 0 -9px 0 -1px var(--gold), 0 9px 0 -1px var(--gold);
}

.icon-future::before,
.emblem-future::before {
  width: 42px;
  height: 2px;
  left: 16px;
  top: 36px;
  background: var(--gold);
}

.icon-future::after,
.emblem-future::after {
  width: 16px;
  height: 16px;
  right: 16px;
  top: 29px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: rotate(45deg);
}

.chapter-card.visited {
  border-color: rgba(214, 168, 91, 0.55);
}

.chapter-card.visited::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(214, 168, 91, 0.13), transparent 56%),
    rgba(255, 250, 241, 0.035);
}

.chapter-card.visited .chapter-icon {
  box-shadow: inset 0 0 0 1px rgba(214, 168, 91, 0.18), 0 0 28px rgba(214, 168, 91, 0.13);
}

.chapter-card.visited .chapter-icon::before {
  animation: iconBreathe 2.6s ease-in-out infinite;
}

.chapter-card.just-visited {
  opacity: 1;
  transform: translateY(0);
  animation: visitedPop 760ms ease both;
}

@keyframes visitedPop {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 168, 91, 0.24), 0 24px 80px var(--shadow);
  }

  60% {
    box-shadow: 0 0 0 16px rgba(214, 168, 91, 0), 0 24px 80px var(--shadow);
  }

  100% {
    box-shadow: 0 24px 80px var(--shadow);
  }
}

@keyframes iconBreathe {
  50% {
    filter: drop-shadow(0 0 8px rgba(214, 168, 91, 0.48));
  }
}

.chapter-card.visited .chapter-icon::after {
  filter: drop-shadow(0 0 10px rgba(214, 168, 91, 0.5));
}

.chapter-card h2 {
  margin: 42px 0 18px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.chapter-card p {
  font-size: 0.98rem;
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 72px);
  min-height: calc(100vh - 88px);
  padding: clamp(42px, 8vw, 100px) clamp(20px, 6vw, 92px);
  overflow-x: hidden;
}

.chapter-side {
  position: sticky;
  top: 96px;
  align-self: start;
  min-width: 0;
}

.chapter-emblem {
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  border-radius: 18px;
  box-shadow: 0 18px 60px var(--shadow);
}

.chapter-emblem::marker {
  display: none;
}

.chapter-emblem {
  animation: emblemSettle 700ms ease both;
}

.chapter-emblem::before,
.chapter-emblem::after,
.chapter-icon::before,
.chapter-icon::after {
  transition: transform 240ms ease, filter 240ms ease;
}

.chapter-emblem:hover::before,
.chapter-emblem:hover::after {
  filter: drop-shadow(0 0 10px rgba(214, 168, 91, 0.42));
}

@keyframes emblemSettle {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chapter-side h1 {
  font-size: clamp(2.5rem, 5vw, 5.4rem);
  overflow-wrap: anywhere;
}

.chapter-body {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.chapter-body > *,
.filter-bar,
.accordion-list {
  max-width: 100%;
  min-width: 0;
}

.big-note {
  padding: clamp(24px, 5vw, 52px);
  position: relative;
  overflow: hidden;
}

.big-note,
.soul-panel,
.accountability-output,
.unlock-note,
.path-sentence,
.artifact,
.memory-lanes details,
.accordion-list details {
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, opacity 220ms ease;
}

.big-note h2 {
  font-size: clamp(2rem, 4vw, 4.4rem);
}

.big-note::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--teal));
}

.big-note::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 250, 241, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 91, 0.1), transparent 58%);
}

.big-note h2::after {
  content: "";
  display: block;
  width: min(220px, 56%);
  height: 2px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--gold), rgba(127, 182, 170, 0.65), transparent);
  transform-origin: left;
  animation: lineBreathe 4.8s ease-in-out infinite;
}

@keyframes lineBreathe {
  50% {
    transform: scaleX(0.72);
    opacity: 0.62;
  }
}

.big-note p {
  position: relative;
}

.big-note p::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(214, 168, 91, 0.42);
  box-shadow: 0 0 18px rgba(214, 168, 91, 0.2);
}

body[data-page="harm"] .big-note::after {
  border-color: rgba(217, 137, 137, 0.14);
  background: radial-gradient(circle, rgba(217, 137, 137, 0.12), transparent 58%);
}

body[data-page="harm"] .big-note::before,
.warning-room .big-note::before {
  background: linear-gradient(180deg, var(--rose), rgba(214, 168, 91, 0.65));
}

body[data-page="harm"] .big-note {
  border-color: rgba(217, 137, 137, 0.34);
  background:
    linear-gradient(135deg, rgba(217, 137, 137, 0.08), transparent 32%),
    rgba(255, 250, 241, 0.055);
}

.warning-room .big-note {
  box-shadow:
    inset 0 0 0 1px rgba(217, 137, 137, 0.08),
    0 26px 90px rgba(0, 0, 0, 0.42);
}

.warning-room .chapter-side::after {
  content: "";
  display: block;
  width: min(220px, 76%);
  height: 84px;
  margin-top: 26px;
  border: 1px solid rgba(217, 137, 137, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 46%, rgba(217, 137, 137, 0.28) 48%, transparent 52%),
    linear-gradient(45deg, transparent 46%, rgba(214, 168, 91, 0.24) 48%, transparent 52%),
    rgba(255, 250, 241, 0.035);
  opacity: 0.8;
}

.soul-panel,
.unlock-note,
.path-sentence {
  padding: 22px;
}

.reveal-card {
  width: 100%;
  min-height: 72px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(214, 168, 91, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.reveal-card:hover {
  border-color: rgba(214, 168, 91, 0.58);
  transform: translateY(-2px);
}

.reveal-card::after {
  content: "Open";
  float: right;
  color: var(--gold);
  font-size: 0.86rem;
}

.reveal-copy {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  padding-top: 18px;
  transition: grid-template-rows 320ms ease, opacity 260ms ease;
}

.reveal-copy.visible {
  grid-template-rows: 1fr;
  opacity: 1;
}

.reveal-copy.visible p {
  animation: textRise 360ms ease both;
}

@keyframes textRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-copy > * {
  min-height: 0;
}

.accountability-grid,
.trait-orbit,
.path-builder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="future"] .path-builder {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accountability-grid button,
.trait-orbit button,
.path-builder button {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.06);
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 0 0 0 rgba(214, 168, 91, 0);
}

.accountability-grid button::before,
.trait-orbit button::before,
.path-builder button::before,
.feeling-grid button::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto 10px;
  background: var(--gold);
  box-shadow: 0 7px 0 rgba(127, 182, 170, 0.62);
  opacity: 0.75;
  transition: transform 180ms ease, opacity 180ms ease;
}

.accountability-grid button:hover::before,
.trait-orbit button:hover::before,
.path-builder button:hover::before,
.feeling-grid button:hover::before,
.accountability-grid button.active::before,
.trait-orbit button.active::before,
.path-builder button.active::before,
.feeling-grid button.active::before {
  opacity: 1;
  transform: scaleX(1.35);
}

.accountability-grid button,
.trait-orbit button,
.path-builder button,
.feeling-grid button,
.chapter-card,
.room-map-graphic a,
.chapter-icon {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.button:hover,
.filter-chip:hover,
.accountability-grid button:hover,
.trait-orbit button:hover,
.path-builder button:hover,
.feeling-grid button:hover,
.reveal-card:hover {
  box-shadow: inset 0 0 0 1px rgba(214, 168, 91, 0.2), 0 16px 44px rgba(0, 0, 0, 0.24);
}

.button,
.filter-chip,
.accountability-grid button,
.trait-orbit button,
.path-builder button,
.feeling-grid button {
  position: relative;
  overflow: hidden;
}

.button::after,
.filter-chip::after,
.accountability-grid button::after,
.trait-orbit button::after,
.path-builder button::after,
.feeling-grid button::after {
  content: "";
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
}

.button.ripple::after,
.filter-chip.ripple::after,
.accountability-grid button.ripple::after,
.trait-orbit button.ripple::after,
.path-builder button.ripple::after,
.feeling-grid button.ripple::after {
  animation: rippleOut 520ms ease;
}

@keyframes rippleOut {
  0% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(22);
  }
}

.accountability-grid button.active,
.trait-orbit button.active,
.path-builder button.active {
  color: #171514;
  background: var(--gold);
  border-color: rgba(255, 250, 241, 0.65);
  box-shadow: 0 0 0 5px rgba(214, 168, 91, 0.18), 0 18px 50px var(--shadow);
  transform: translateY(-3px);
}

.accountability-output {
  min-height: 86px;
  margin: 0;
  padding: 18px;
}

.surface-output,
.feeling-output,
.accountability-output,
.path-sentence {
  opacity: 1 !important;
  transform: none !important;
  border: 1px solid rgba(214, 168, 91, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.12), transparent 42%),
    rgba(255, 250, 241, 0.07);
  box-shadow: 0 20px 60px var(--shadow);
  color: var(--ink);
}

.surface-output,
.feeling-output {
  min-height: 74px;
  margin: 0;
  padding: 18px;
}

.path-egg,
.poem-afterline {
  display: none;
}

.path-egg.visible,
.poem-afterline.visible {
  display: block;
}

.poem-title {
  cursor: pointer;
}

.chapter-emblem {
  cursor: pointer;
}

.chapter-body > .surface-output,
.chapter-body > .feeling-output,
.chapter-body > .accountability-output,
.chapter-body > .path-sentence {
  animation: none;
}

.filter-output {
  margin-top: -4px;
}

.accountability-output.flash,
.feeling-output.flash,
.path-sentence.flash,
.surface-output.flash {
  animation: softFlash 520ms ease;
}

@keyframes softFlash {
  0% {
    border-color: rgba(214, 168, 91, 0.22);
  }

  45% {
    border-color: rgba(214, 168, 91, 0.72);
    background: rgba(214, 168, 91, 0.12);
  }

  100% {
    border-color: var(--line);
  }
}

.tap-burst {
  position: fixed;
  z-index: 95;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 0 rgba(214, 168, 91, 0.4),
    0 0 28px rgba(127, 182, 170, 0.28);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: tapBurst 520ms ease forwards;
}

.typed-egg {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 26px;
  width: min(520px, calc(100vw - 40px));
  padding: 18px 20px;
  border: 1px solid rgba(214, 168, 91, 0.54);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.18), rgba(127, 182, 170, 0.1)),
    rgba(12, 11, 10, 0.92);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.typed-egg.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.secret-filter {
  border-style: dashed;
}

@keyframes tapBurst {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(9);
    box-shadow:
      0 0 0 18px rgba(214, 168, 91, 0),
      0 0 0 rgba(127, 182, 170, 0);
  }
}

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

.memory-lanes {
  display: grid;
  gap: 12px;
}

.artifact-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.artifact {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 16%, rgba(214, 168, 91, 0.12), transparent 22%),
    rgba(255, 250, 241, 0.055);
  box-shadow: 0 20px 60px var(--shadow);
}

.artifact:hover {
  border-color: rgba(214, 168, 91, 0.5);
  transform: translateY(-3px);
}

.artifact {
  cursor: pointer;
}

.artifact.found {
  border-color: rgba(214, 168, 91, 0.72);
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.16), rgba(127, 182, 170, 0.08)),
    rgba(255, 250, 241, 0.075);
}

.artifact.found span {
  animation: artifactFound 760ms ease both;
}

@keyframes artifactFound {
  35% {
    transform: rotate(-4deg) scale(1.12);
    filter: drop-shadow(0 0 14px rgba(214, 168, 91, 0.42));
  }
}

.artifact.found p::after {
  content: " found";
  color: var(--gold);
}

.artifact span {
  transition: transform 260ms ease;
}

.artifact:hover span {
  transform: rotate(-3deg) scale(1.05);
}

.artifact,
.memory-lanes details,
.big-note,
.soul-panel,
.accountability-output,
.unlock-note,
.path-sentence {
  backdrop-filter: blur(12px);
}

.artifact span {
  position: relative;
  width: 66px;
  height: 50px;
  display: block;
}

.artifact p {
  margin: 0;
  font-size: 0.9rem;
}

.artifact.oldsmobile span::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 28px;
  left: 4px;
  top: 12px;
  border: 2px solid var(--gold);
  border-radius: 18px 18px 8px 8px;
}

.artifact.oldsmobile span::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: 14px;
  top: 37px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 30px 0 0 var(--teal);
}

.artifact.sun span::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  left: 16px;
  top: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 10px rgba(214, 168, 91, 0.14);
}

.artifact.plate span::before {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  left: 12px;
  top: 4px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  box-shadow: inset 0 0 0 10px rgba(127, 182, 170, 0.12);
}

.artifact.controller span::before {
  content: "";
  position: absolute;
  width: 56px;
  height: 34px;
  left: 5px;
  top: 10px;
  border: 2px solid var(--gold);
  border-radius: 18px;
}

.artifact.controller span::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 18px;
  left: 23px;
  top: 18px;
  background: var(--teal);
  box-shadow: 6px 6px 0 -1px var(--teal), 23px 0 0 -1px var(--rose);
}

.artifact.sleep span::before {
  content: "";
  position: absolute;
  width: 48px;
  height: 30px;
  left: 10px;
  top: 12px;
  border: 2px solid var(--rose);
  border-radius: 30px 30px 12px 12px;
}

.artifact.sleep span::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 2px;
  left: 6px;
  top: 44px;
  background: var(--gold);
}

.memory-lanes details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.06);
  box-shadow: 0 20px 60px var(--shadow);
}

.memory-lanes details[open] {
  border-color: rgba(214, 168, 91, 0.42);
  transform: translateY(-2px);
}

.memory-lanes summary,
.accordion-list summary {
  transition: background 180ms ease, color 180ms ease;
}

.memory-lanes summary:hover,
.accordion-list summary:hover {
  background: rgba(255, 250, 241, 0.045);
}

.memory-lanes summary {
  min-height: 72px;
  display: grid;
  align-items: center;
  padding: 0 22px;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.14rem;
}

.memory-lanes p {
  padding: 0 22px 22px;
}

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.unlock-note.locked {
  opacity: 0.72;
}

.unlock-note:not(.locked) {
  border-color: rgba(214, 168, 91, 0.62);
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.16), rgba(127, 182, 170, 0.08)),
    rgba(255, 250, 241, 0.06);
  animation: unlockedPulse 900ms ease both;
}

.final-poem {
  display: grid;
  gap: 0.45rem;
  padding-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.final-poem p {
  margin: 0;
}

.final-poem p:nth-child(3n) {
  color: var(--gold);
}

.final-poem p {
  animation: poemLineIn 560ms ease both;
  animation-delay: calc(var(--poem-delay, 0) * 38ms);
}

@keyframes poemLineIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.poem-card:hover {
  border-color: rgba(214, 168, 91, 0.64);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.52);
}

.poem-layout {
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  padding: clamp(42px, 8vw, 100px) clamp(20px, 6vw, 92px);
  overflow-x: hidden;
}

.poem-card {
  width: min(820px, 100%);
  max-width: calc(100vw - 40px);
  min-width: 0;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid rgba(214, 168, 91, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 168, 91, 0.14), transparent 45%),
    rgba(255, 250, 241, 0.07);
  box-shadow: 0 28px 90px var(--shadow);
  position: relative;
  overflow: hidden;
}

.poem-card::before,
.poem-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.poem-card::before {
  right: -90px;
  top: -90px;
  width: 240px;
  aspect-ratio: 1;
  border: 1px solid rgba(214, 168, 91, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 91, 0.13), transparent 58%);
}

.poem-card::after {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--teal), var(--rose), var(--gold));
  background-size: 240% 100%;
  animation: poemBar 8s linear infinite;
}

@keyframes poemBar {
  to {
    background-position: 240% 0;
  }
}

.poem-card h1 {
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 7vw, 6rem);
}

.poem-card .final-poem {
  margin: 22px 0 34px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.poem-card .final-poem p {
  max-width: 100%;
}

.filter-chip.active,
.feeling-grid button.active,
.path-builder button.active,
.trait-orbit button.active,
.accountability-grid button.active {
  animation: selectedBreathe 2.8s ease-in-out infinite;
}

@keyframes selectedBreathe {
  50% {
    box-shadow: 0 0 0 7px rgba(214, 168, 91, 0.08), 0 18px 50px var(--shadow);
  }
}

@keyframes unlockedPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 168, 91, 0.24), 0 24px 80px var(--shadow);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(214, 168, 91, 0), 0 24px 80px var(--shadow);
  }

  100% {
    box-shadow: 0 24px 80px var(--shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .tap-burst {
    display: none;
  }
}

@media (max-width: 900px) {
  .page-nav,
  .chapter-layout {
    grid-template-columns: 1fr;
  }

  .chapter-side {
    position: static;
  }

  .home-status,
  .accountability-grid,
  .path-builder,
  .artifact-board {
    grid-template-columns: 1fr;
  }

  .chapter-hub {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .hero-sigil {
    opacity: 0.28;
    right: -34px;
    top: 130px;
    width: min(230px, 62vw);
  }

  .chapter-page::after {
    display: none;
  }

  .ambient-field,
  .kinetic-line,
  .cursor-glow,
  .reading-ring {
    display: none;
  }
}

@media (max-width: 620px) {
  .page-nav {
    align-items: flex-start;
  }

  .chapter-mini {
    display: none;
  }

  .home-copy {
    margin-top: 80px;
  }

  .room-map-graphic {
    height: 360px;
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .room-map-graphic a {
    width: min(106px, 29vw);
    font-size: 0.76rem;
  }

  .room-map-graphic a:nth-child(n+7) {
    left: 78% !important;
  }

  .chapter-side h1 {
    max-width: calc(100vw - 56px);
    font-size: 2rem;
    line-height: 1.08;
    text-wrap: balance;
  }

  .trait-orbit,
  .feeling-grid {
    grid-template-columns: 1fr;
  }

  .chapter-body {
    overflow: hidden;
  }

  .filter-bar,
  .accordion-list,
  .big-note,
  .soul-panel,
  .accountability-output,
  .unlock-note,
  .path-sentence {
    width: calc(100vw - 58px);
    max-width: calc(100vw - 58px);
  }

  .multi-page .filter-bar {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .multi-page .filter-chip {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .detail-body p,
  .big-note p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .big-note {
    padding: 22px;
  }

  .big-note h2 {
    max-width: 280px;
    font-size: 1.5rem;
    line-height: 1.08;
    overflow-wrap: break-word;
  }

  .big-note p {
    max-width: 280px;
    font-size: 0.96rem;
  }
}
