:root {
  color-scheme: dark;
  --night: #080708;
  --paper: #f3ecdc;
  --paper-soft: #cfc6ba;
  --muted: #918a8d;
  --gold: #d0a63a;
  --gold-light: #efd47c;
  --rose: #bc3b5b;
  --line: rgba(239, 212, 124, 0.34);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
}

body {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

body::selection {
  background: var(--rose);
  color: white;
}

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

.screen-veil,
.spark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.screen-veil {
  z-index: 20;
  opacity: 0.12;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 15% 19%, rgba(255,255,255,.9) 0 1px, transparent 1.4px),
    radial-gradient(circle at 73% 31%, rgba(255,255,255,.7) 0 1px, transparent 1.3px),
    radial-gradient(circle at 91% 76%, rgba(208,166,58,.8) 0 1px, transparent 1.4px),
    radial-gradient(circle at 48% 87%, rgba(255,255,255,.5) 0 1px, transparent 1.2px);
  background-size: 250px 310px, 390px 430px, 290px 340px, 510px 470px;
}

.screen-veil::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.spark-layer {
  z-index: 40;
  overflow: hidden;
}

.spark {
  position: absolute;
  width: var(--spark-size, 5px);
  height: var(--spark-size, 5px);
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 14px 4px rgba(239, 212, 124, 0.7);
  animation: spark-rise var(--spark-time, 1.6s) ease-out forwards;
}

@keyframes spark-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.25);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--spark-x), var(--spark-y), 0) scale(0);
  }
}

.poem-reader {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #0b090b;
  isolation: isolate;
}

.reader-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.reader-track::-webkit-scrollbar,
.stanza-track::-webkit-scrollbar {
  display: none;
}

.poem-scene {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background:
    radial-gradient(circle at 75% 45%, rgba(116, 37, 59, .2), transparent 32rem),
    #0b090b;
  isolation: isolate;
}

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

.poem-scene::before {
  inset: 4.5vh 3.2vw;
  z-index: 3;
  border: 1px solid rgba(239, 212, 124, 0.12);
  clip-path: polygon(0 0, 22% 0, 22% 1px, 78% 1px, 78% 0, 100% 0, 100% 100%, 80% 100%, 80% calc(100% - 1px), 19% calc(100% - 1px), 19% 100%, 0 100%);
}

.poem-scene::after {
  right: 3.2vw;
  bottom: 4.5vh;
  left: 3.2vw;
  z-index: 4;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 212, 124, .25), transparent);
}

.scene__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--scene-bg, #0b090b);
}

.scene__atmosphere::before,
.scene__atmosphere::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.scene__atmosphere::before {
  z-index: 2;
  background:
    linear-gradient(90deg, var(--scene-bg, #0b090b) 0%, rgba(8, 7, 8, .77) 32%, rgba(8, 7, 8, .2) 72%, var(--scene-bg, #0b090b) 100%),
    linear-gradient(0deg, rgba(8, 7, 8, .66), transparent 32%, rgba(8, 7, 8, .16));
  mix-blend-mode: multiply;
}

.scene__atmosphere::after {
  z-index: 3;
  background:
    radial-gradient(circle at var(--halo-x, 76%) var(--halo-y, 43%), var(--halo, rgba(208, 166, 58, .17)) 0, transparent var(--halo-size, 34%)),
    linear-gradient(112deg, transparent 0 47%, rgba(239, 212, 124, .035) 48%, transparent 49% 100%);
}

.scene__image {
  position: absolute;
  top: -4%;
  right: 0;
  z-index: 1;
  width: var(--image-width, 64%);
  height: 108%;
  object-fit: cover;
  object-position: var(--image-position, center);
  opacity: var(--image-opacity, .48);
  filter: saturate(var(--image-saturation, .82)) contrast(1.14) brightness(var(--image-brightness, .8));
  mix-blend-mode: screen;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.7) 31%, black 62%, black 100%);
  transform: scale(1.09);
  transition: opacity 1.3s ease, transform 1.6s cubic-bezier(.17,.67,.21,1);
}

.poem-scene.is-active .scene__image {
  opacity: var(--image-active-opacity, var(--image-opacity, .48));
  transform: scale(1);
}

.scene__halo {
  position: absolute;
  top: var(--halo-top, 9%);
  left: var(--halo-left, 68%);
  z-index: 0;
  width: var(--halo-width, 28vw);
  height: var(--halo-height, 28vw);
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo-core, rgba(239, 212, 124, .16)), transparent 68%);
  filter: blur(10px);
  opacity: .9;
  animation: breathe 8s ease-in-out infinite;
}

.scene__ring {
  position: absolute;
  top: 19%;
  right: 15%;
  z-index: 3;
  width: clamp(90px, 13vw, 210px);
  aspect-ratio: 1;
  border: 1px solid rgba(239, 212, 124, .22);
  border-radius: 50%;
  opacity: .55;
  transform: rotate(-18deg) scale(.95);
  transition: transform 1.7s ease;
}

.scene__ring::before,
.scene__ring::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
}

.scene__ring::before {
  inset: 11%;
}

.scene__ring::after {
  top: 48%;
  left: -8px;
  width: 17px;
  height: 17px;
  background: var(--rose);
  box-shadow: 0 0 18px rgba(188, 59, 91, .75);
}

.poem-scene.is-active .scene__ring {
  transform: rotate(24deg) scale(1.04);
}

@keyframes breathe {
  0%, 100% { opacity: .55; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.scene__content {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: center;
  width: min(100% - 12vw, 1380px);
  height: 100%;
  margin: 0 auto;
  padding: 9vh 0 10vh;
  transform: translateX(24px);
  opacity: 0;
  transition: opacity .75s ease .12s, transform 1.1s cubic-bezier(.2,.7,.2,1) .08s;
}

.poem-scene.is-active .scene__content {
  opacity: 1;
  transform: translateX(0);
}

.scene__meta {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 2.5vh;
  color: var(--scene-accent, var(--gold));
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.scene__meta::after {
  display: block;
  width: 42px;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: .68;
}

.scene__title-block {
  max-width: var(--title-width, 720px);
}

.scene__whisper {
  display: block;
  margin-bottom: 15px;
  color: rgba(243, 236, 220, .52);
  font-family: var(--serif);
  font-size: .98rem;
  font-style: italic;
}

.scene__title {
  max-width: var(--title-max, 730px);
  margin: 0;
  color: var(--scene-title, var(--paper));
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 400;
  letter-spacing: -.07em;
  line-height: .86;
  text-wrap: balance;
  text-shadow: 0 0 45px rgba(0,0,0,.18);
}

.scene__lead {
  max-width: 355px;
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  font-style: italic;
  line-height: 1.42;
}

.verse-shell {
  align-self: end;
  width: min(var(--verse-width, 570px), 54vw);
  margin-top: 3vh;
}

.verse-shell__top,
.verse-shell__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: rgba(243, 236, 220, .46);
  font-size: .59rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.verse-shell__top {
  margin-bottom: 12px;
}

.verse-shell__bottom {
  margin-top: 14px;
}

.stanza-count {
  color: var(--scene-accent, var(--gold));
}

.stanza-window {
  position: relative;
  width: 100%;
  height: clamp(150px, 24vh, 280px);
  overflow: hidden;
  border-top: 1px solid rgba(239, 212, 124, .22);
  border-bottom: 1px solid rgba(239, 212, 124, .12);
}

.stanza-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
}

.stanza {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  min-width: 100%;
  height: 100%;
  padding: 14px 16px 14px 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.stanza__text {
  max-width: 610px;
  margin: 0;
  color: var(--scene-verse, var(--paper-soft));
  font-family: var(--serif);
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.53;
  text-wrap: pretty;
}

.stanza__text br + br {
  line-height: .6;
}

.stanza__spark {
  align-self: flex-start;
  margin: 4px 0 0 auto;
  color: var(--scene-accent, var(--gold));
  font-family: var(--serif);
  font-size: 1.2rem;
  opacity: .7;
}

.stanza-arrows {
  display: inline-flex;
  gap: 5px;
}

.stanza-arrow {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(239, 212, 124, .27);
  border-radius: 50%;
  background: transparent;
  color: var(--scene-accent, var(--gold));
  font-size: .9rem;
  line-height: 1;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.stanza-arrow:hover,
.stanza-arrow:focus-visible {
  border-color: var(--scene-accent, var(--gold));
  background: rgba(239, 212, 124, .1);
  transform: translateY(-2px);
}

.scene__art-note {
  position: absolute;
  right: 8.5vw;
  bottom: 12vh;
  z-index: 5;
  max-width: 195px;
  color: rgba(243, 236, 220, .57);
  font-family: var(--serif);
  font-size: .88rem;
  font-style: italic;
  line-height: 1.35;
  text-align: right;
}

.scene__art-note::before {
  display: block;
  width: 30px;
  height: 1px;
  margin: 0 0 12px auto;
  content: "";
  background: var(--scene-accent, var(--gold));
}

.scene--right .scene__content {
  margin-left: auto;
  text-align: right;
}

.scene--right .scene__meta,
.scene--right .verse-shell__top,
.scene--right .verse-shell__bottom {
  justify-content: flex-end;
}

.scene--right .scene__meta::after {
  order: -1;
}

.scene--right .scene__lead,
.scene--right .verse-shell {
  margin-right: 0;
  margin-left: auto;
}

.scene--right .stanza {
  justify-content: flex-end;
  padding-right: 0;
  padding-left: 16px;
}

.scene--right .stanza__spark {
  order: -1;
  margin-right: auto;
  margin-left: 0;
}

.scene--center .scene__content {
  align-items: center;
  margin: 0 auto;
  text-align: center;
}

.scene--center .scene__meta,
.scene--center .verse-shell__top,
.scene--center .verse-shell__bottom {
  justify-content: center;
}

.scene--center .scene__lead,
.scene--center .verse-shell {
  margin-right: auto;
  margin-left: auto;
}

.scene--center .stanza {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.scene--center .stanza__spark {
  display: none;
}

/* Atmospheres: each class shifts the light, image and composition. */
.theme-gilded {
  --scene-bg: #0c0b0b;
  --scene-accent: #d8b54e;
  --scene-verse: #d8d0c0;
  --image-opacity: .64;
  --image-active-opacity: .8;
  --halo: rgba(216, 181, 78, .22);
  --halo-core: rgba(216, 181, 78, .16);
}

.theme-feather {
  --scene-bg: #080a0b;
  --scene-accent: #c7d9d8;
  --scene-verse: #d1dad7;
  --image-width: 42%;
  --image-opacity: .7;
  --image-active-opacity: .88;
  --image-position: 50% 42%;
  --halo: rgba(206, 226, 221, .16);
  --halo-core: rgba(206, 226, 221, .11);
}

.theme-rose {
  --scene-bg: #12080d;
  --scene-accent: #e28698;
  --scene-title: #f4e4d5;
  --scene-verse: #e1c7bd;
  --image-width: 55%;
  --image-opacity: .68;
  --image-active-opacity: .88;
  --image-position: 56% 25%;
  --halo-x: 83%;
  --halo: rgba(188, 59, 91, .27);
  --halo-core: rgba(229, 78, 115, .18);
}

.theme-forest {
  --scene-bg: #080f12;
  --scene-accent: #9bb9b1;
  --scene-verse: #c5d4d1;
  --image-width: 100%;
  --image-opacity: .58;
  --image-active-opacity: .76;
  --image-position: center;
  --halo-x: 48%;
  --halo: rgba(122, 161, 159, .19);
  --halo-core: rgba(191, 222, 207, .1);
}

.theme-neon {
  --scene-bg: #080d12;
  --scene-accent: #8db9d3;
  --scene-title: #eef1e9;
  --scene-verse: #d0d6d7;
  --image-width: 100%;
  --image-opacity: .42;
  --image-active-opacity: .62;
  --image-position: center 48%;
  --halo-x: 82%;
  --halo: rgba(37, 106, 139, .28);
  --halo-core: rgba(48, 147, 185, .15);
}

.theme-footprints {
  --scene-bg: #090d10;
  --scene-accent: #b9c8ca;
  --scene-verse: #d2d5cf;
  --image-width: 100%;
  --image-opacity: .5;
  --image-active-opacity: .67;
  --image-position: center 65%;
  --halo-x: 21%;
  --halo: rgba(95, 129, 136, .17);
}

.theme-storm {
  --scene-bg: #0a0e10;
  --scene-accent: #e0bd57;
  --scene-verse: #dad5c6;
  --image-width: 100%;
  --image-opacity: .52;
  --image-active-opacity: .72;
  --image-position: center 48%;
  --halo-x: 66%;
  --halo: rgba(216, 181, 78, .25);
  --halo-core: rgba(250, 222, 119, .14);
}

.theme-rain {
  --scene-bg: #0c0c10;
  --scene-accent: #a8a9bf;
  --scene-verse: #d6d2d7;
  --image-width: 100%;
  --image-opacity: .44;
  --image-active-opacity: .64;
  --image-position: center;
  --halo-x: 76%;
  --halo: rgba(119, 103, 154, .2);
}

.theme-rose-dark {
  --scene-bg: #0f080c;
  --scene-accent: #d46375;
  --scene-title: #f2d8cf;
  --scene-verse: #dfc5bd;
  --image-width: 48%;
  --image-opacity: .69;
  --image-active-opacity: .87;
  --image-position: center;
  --halo-x: 83%;
  --halo: rgba(193, 39, 74, .3);
  --halo-core: rgba(222, 69, 96, .16);
}

.theme-moon {
  --scene-bg: #080a13;
  --scene-accent: #d8cf8e;
  --scene-verse: #d7d6ca;
  --image-width: 72%;
  --image-opacity: .47;
  --image-active-opacity: .68;
  --image-position: center;
  --halo-x: 78%;
  --halo-y: 25%;
  --halo: rgba(222, 214, 138, .27);
  --halo-core: rgba(244, 230, 164, .17);
}

.theme-crystal {
  --scene-bg: #080b0e;
  --scene-accent: #b5c9cb;
  --scene-verse: #d6d9d4;
  --image-width: 53%;
  --image-opacity: .57;
  --image-active-opacity: .76;
  --image-position: 52% center;
  --halo-x: 75%;
  --halo: rgba(142, 185, 190, .2);
}

.theme-fire {
  --scene-bg: #120a08;
  --scene-accent: #ef9d4e;
  --scene-title: #f6e7cf;
  --scene-verse: #e3cfc0;
  --image-width: 71%;
  --image-opacity: .59;
  --image-active-opacity: .8;
  --image-position: center;
  --halo-x: 72%;
  --halo: rgba(232, 89, 38, .28);
  --halo-core: rgba(246, 133, 56, .18);
}

.theme-sea {
  --scene-bg: #071017;
  --scene-accent: #a7ced0;
  --scene-verse: #d4dcda;
  --image-width: 100%;
  --image-opacity: .5;
  --image-active-opacity: .7;
  --image-position: center;
  --halo-x: 55%;
  --halo: rgba(80, 150, 164, .19);
}

.theme-gilded .scene__ring,
.theme-storm .scene__ring,
.theme-fire .scene__ring {
  border-color: rgba(239, 157, 78, .35);
}

.theme-forest .scene__atmosphere::before,
.theme-neon .scene__atmosphere::before,
.theme-rain .scene__atmosphere::before,
.theme-sea .scene__atmosphere::before {
  background:
    linear-gradient(90deg, var(--scene-bg) 0%, rgba(7, 12, 16, .77) 23%, rgba(7, 12, 16, .1) 78%, var(--scene-bg) 100%),
    linear-gradient(0deg, rgba(7, 12, 16, .7), transparent 40%, rgba(7, 12, 16, .1));
}

.floating-title,
.dedication-pill,
.journey-ui,
.nav-controls,
.magic-toggle,
.letter-trigger,
.bottom-signature {
  position: fixed;
  z-index: 15;
}

.floating-title {
  top: 24px;
  left: 4.7vw;
  display: grid;
  gap: 2px;
  pointer-events: none;
}

.floating-title__small {
  color: var(--gold);
  font-size: .57rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.floating-title__large {
  color: rgba(243, 236, 220, .83);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.floating-title__large em {
  color: var(--gold-light);
  font-style: italic;
}

.dedication-pill {
  top: 28px;
  right: 4.7vw;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(239, 212, 124, .25);
  color: var(--muted);
  font-size: .61rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.dedication-pill strong {
  color: var(--gold-light);
  font-weight: 400;
}

.journey-ui {
  bottom: 33px;
  left: 4.7vw;
  display: grid;
  gap: 10px;
}

.journey-counter {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: .14em;
}

.journey-counter__total {
  color: var(--muted);
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-dot {
  width: 15px;
  height: 2px;
  padding: 0;
  background: rgba(243, 236, 220, .23);
  transition: width .4s ease, background .4s ease, box-shadow .4s ease;
}

.progress-dot.is-active {
  width: 36px;
  background: var(--gold-light);
  box-shadow: 0 0 8px rgba(239, 212, 124, .52);
}

.nav-controls {
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 17px;
  transform: translateX(-50%);
}

.nav-arrow {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(239, 212, 124, .28);
  border-radius: 50%;
  background: rgba(8, 7, 8, .2);
  color: var(--gold-light);
  font-size: 1.1rem;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.nav-arrow:hover,
.nav-arrow:focus-visible {
  border-color: var(--gold-light);
  background: rgba(239, 212, 124, .1);
  transform: translateY(-3px);
}

.gesture-hint {
  min-width: 170px;
  color: rgba(243, 236, 220, .42);
  font-size: .57rem;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
  transition: opacity .5s ease, transform .5s ease;
}

.gesture-hint.is-hidden {
  opacity: 0;
  transform: translateY(5px);
}

.magic-toggle {
  top: 70px;
  right: 4.7vw;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(239, 212, 124, .24);
  border-radius: 999px;
  background: rgba(8, 7, 8, .22);
  color: var(--gold-light);
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: border-color .25s ease, color .25s ease;
}

.magic-toggle:hover,
.magic-toggle:focus-visible {
  border-color: var(--gold-light);
}

.magic-toggle[aria-pressed="false"] {
  border-color: rgba(243, 236, 220, .16);
  color: var(--muted);
}

.magic-toggle__star {
  font-size: .95rem;
  line-height: 1;
  animation: twinkle 2.8s ease-in-out infinite;
}

.magic-toggle[aria-pressed="false"] .magic-toggle__star {
  opacity: .45;
  animation: none;
}

@keyframes twinkle {
  0%, 100% { opacity: .55; transform: scale(.85) rotate(0); }
  50% { opacity: 1; transform: scale(1.18) rotate(12deg); }
}

.letter-trigger {
  right: 4.7vw;
  bottom: 31px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  font-size: .63rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: gap .25s ease, color .25s ease;
}

.letter-trigger:hover,
.letter-trigger:focus-visible {
  gap: 16px;
  color: white;
}

.letter-trigger__arrow {
  font-size: .95rem;
}

.bottom-signature {
  right: 4.7vw;
  bottom: 10px;
  color: rgba(243, 236, 220, .25);
  font-size: .52rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.letter-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.letter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 4, .84);
  backdrop-filter: blur(13px);
}

.letter-modal__card {
  position: relative;
  width: min(100%, 630px);
  max-height: 88vh;
  padding: clamp(34px, 6vw, 70px);
  overflow-y: auto;
  border: 1px solid rgba(239, 212, 124, .32);
  background:
    radial-gradient(circle at 83% 0, rgba(188, 59, 91, .23), transparent 18rem),
    #140c11;
  box-shadow: 20px 20px 0 rgba(188, 59, 91, .12), 0 28px 100px rgba(0,0,0,.6);
  transform: translateY(14px) scale(.98);
  transition: transform .4s ease;
}

.letter-modal.is-open .letter-modal__card {
  transform: translateY(0) scale(1);
}

.letter-modal__close {
  position: absolute;
  top: 19px;
  right: 22px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(239, 212, 124, .25);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform .25s ease, border-color .25s ease;
}

.letter-modal__close:hover,
.letter-modal__close:focus-visible {
  border-color: var(--gold-light);
  transform: rotate(90deg);
}

.letter-modal__sigil {
  display: block;
  margin-bottom: 18px;
  color: var(--rose-bright, #d35a72);
  font-size: 1.35rem;
}

.letter-modal__eyebrow {
  margin: 0 0 19px;
  color: var(--gold);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.letter-modal h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: .9;
}

.letter-modal h2 em {
  color: var(--gold-light);
  font-style: italic;
}

.letter-modal__body {
  max-width: 465px;
  margin-top: 38px;
  color: var(--paper-soft, #cfc6ba);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.7;
}

.letter-modal__body p {
  margin: 0 0 19px;
}

.letter-modal__signoff {
  color: var(--gold-light);
  font-style: italic;
}

.letter-modal__action {
  display: inline-flex;
  gap: 12px;
  margin-top: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  font-size: .67rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: gap .25s ease;
}

.letter-modal__action:hover,
.letter-modal__action:focus-visible {
  gap: 18px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(330px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid rgba(239, 212, 124, .3);
  background: rgba(20, 12, 17, .95);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: .94rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

body.magic-off .screen-veil {
  opacity: .045;
}

body.magic-off .scene__halo,
body.magic-off .scene__ring {
  opacity: .18;
  animation: none;
}

@media (max-width: 900px) {
  .poem-scene::before {
    inset: 4vh 22px;
  }

  .poem-scene::after {
    right: 22px;
    bottom: 4vh;
    left: 22px;
  }

  .scene__content {
    width: calc(100% - 88px);
    padding: 12vh 0 15vh;
  }

  .scene__title {
    font-size: clamp(3.9rem, 15vw, 7rem);
  }

  .scene__lead {
    max-width: 310px;
  }

  .verse-shell {
    width: min(100%, 520px);
  }

  .scene__image {
    width: var(--image-width, 82%);
    height: 100%;
  }

  .scene__art-note {
    right: 52px;
    bottom: 18vh;
    max-width: 150px;
  }

  .floating-title {
    left: 22px;
  }

  .dedication-pill,
  .magic-toggle {
    right: 22px;
  }

  .journey-ui {
    bottom: 28px;
    left: 22px;
  }

  .letter-trigger {
    right: 22px;
    bottom: 28px;
  }

  .bottom-signature {
    display: none;
  }

  .nav-controls {
    bottom: 23px;
  }

  .gesture-hint {
    display: none;
  }
}

@media (max-width: 600px) {
  .poem-reader {
    min-height: 520px;
  }

  .floating-title__large {
    font-size: .96rem;
  }

  .floating-title__small {
    font-size: .5rem;
  }

  .dedication-pill {
    top: 26px;
    font-size: .51rem;
  }

  .magic-toggle {
    top: 61px;
    padding: 6px 8px;
    font-size: .51rem;
  }

  .scene__content {
    width: calc(100% - 52px);
    padding: 16vh 0 17vh;
  }

  .scene__meta {
    margin-bottom: 20px;
    font-size: .55rem;
  }

  .scene__meta::after {
    width: 28px;
  }

  .scene__whisper {
    margin-bottom: 12px;
    font-size: .86rem;
  }

  .scene__title {
    max-width: 100%;
    font-size: clamp(3.2rem, 16vw, 5.5rem);
  }

  .scene__lead {
    margin-top: 16px;
    font-size: 1rem;
  }

  .verse-shell {
    width: 100%;
    margin-top: 4vh;
  }

  .stanza-window {
    height: clamp(158px, 25vh, 240px);
  }

  .stanza {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .stanza__text {
    font-size: 1rem;
    line-height: 1.47;
  }

  .scene__art-note {
    display: none;
  }

  .scene--right .scene__content,
  .scene--center .scene__content {
    text-align: left;
  }

  .scene--right .scene__meta,
  .scene--right .verse-shell__top,
  .scene--right .verse-shell__bottom,
  .scene--center .scene__meta,
  .scene--center .verse-shell__top,
  .scene--center .verse-shell__bottom {
    justify-content: flex-start;
  }

  .scene--right .scene__lead,
  .scene--right .verse-shell,
  .scene--center .scene__lead,
  .scene--center .verse-shell {
    margin-right: 0;
    margin-left: 0;
  }

  .scene--right .stanza,
  .scene--center .stanza {
    justify-content: flex-start;
    padding-right: 16px;
    padding-left: 0;
  }

  .scene--right .stanza__spark {
    order: initial;
    margin-right: 0;
    margin-left: auto;
  }

  .progress-dots {
    max-width: 170px;
    flex-wrap: wrap;
  }

  .progress-dot {
    width: 10px;
  }

  .progress-dot.is-active {
    width: 25px;
  }

  .nav-controls {
    right: 22px;
    left: auto;
    gap: 6px;
    transform: none;
  }

  .nav-arrow {
    width: 35px;
    height: 35px;
  }

  .letter-trigger {
    bottom: 78px;
    font-size: .54rem;
  }

  .journey-ui {
    bottom: 25px;
  }

  .letter-modal {
    padding: 15px;
  }

  .letter-modal__card {
    padding: 33px 24px 28px;
  }
}

@media (max-height: 680px) and (min-width: 601px) {
  .scene__content {
    padding-top: 12vh;
    padding-bottom: 14vh;
  }

  .scene__title {
    font-size: clamp(3.5rem, 7vw, 6.7rem);
  }

  .verse-shell {
    margin-top: 2vh;
  }

  .stanza-window {
    height: 29vh;
  }
}

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