/* ═══════════════════════════════════════════════════════════
   DREAMWEAVER — light academia
   parchment · ink hairlines · indigo, blush & antique gold
   type: Italiana (display) · Cormorant (text) · Pinyon Script
   ═══════════════════════════════════════════════════════════ */

:root {
  --parchment: #f2ecdd;
  --parchment-deep: #eae2cc;
  --ink: #2e2b25;
  --ink-soft: rgba(46, 43, 37, 0.72);
  --line: rgba(46, 43, 37, 0.38);
  --line-faint: rgba(46, 43, 37, 0.18);
  --indigo: #3d4a78;
  --indigo-night: #232941;
  --slate: #8792b4;
  --blush: #d3a3a0;
  --gold: #96742f;
  --ivory: #f4efe3;
  --ivory-line: rgba(244, 239, 227, 0.28);

  --display: "Italiana", serif;
  --text: "Cormorant", serif;
  --script: "Pinyon Script", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* `hidden` attribute must win over component display rules (.stage etc.) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 252, 240, 0.9), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(211, 163, 160, 0.10), transparent 65%),
    radial-gradient(ellipse 80% 60% at 12% 68%, rgba(135, 146, 180, 0.10), transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 115%, rgba(150, 116, 47, 0.08), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection { background: var(--indigo); color: var(--ivory); }

/* ── paper grain & page frame ─────────────────────────────── */

.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.39 0 0 0 0 0.33 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-frame {
  position: fixed; inset: 12px; z-index: 45; pointer-events: none;
  border: 1px solid var(--line-faint);
}

/* ── navigation ───────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(24px, 6vw, 72px);
  background: rgba(242, 236, 221, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-faint);
}

.nav-mark {
  font-family: var(--display);
  font-size: 22px; letter-spacing: 0.22em;
  color: var(--ink); text-decoration: none;
}
.nav-mark-star { color: var(--gold); font-size: 12px; vertical-align: 0.18em; }

.nav nav { display: flex; gap: clamp(18px, 3.5vw, 44px); }

.nav-link {
  position: relative;
  font-family: var(--text); font-weight: 600;
  font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
  padding: 4px 0;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--ink); }
.nav-link.active::before {
  content: "✦";
  position: absolute; left: -15px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 9px;
}

/* ── hero ─────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 92px clamp(16px, 4vw, 48px) 40px;
}

.hero-art {
  width: min(760px, 94vw, calc((100vh - 190px) / 1.214));
  height: auto;
  display: block;
  overflow: visible;
}

.svg-title {
  font-family: var(--display);
  font-size: 97px;
  letter-spacing: 0.16em;
  fill: var(--ink);
}
.svg-motto {
  font-family: var(--text); font-weight: 500;
  font-size: 19px; letter-spacing: 0.5em;
  fill: var(--gold);
}

.svg-arch-frame { fill: none; stroke: var(--line); stroke-width: 1.4; }
.svg-arch-edge  { fill: none; stroke: var(--ink); stroke-width: 1.6; }

.svg-orbit { fill: none; stroke: var(--line); stroke-width: 1.1; }

.sparkle { fill: var(--ink); }
.tw-a { animation: twinkle 3.4s ease-in-out 2.2s infinite; }
.tw-b { animation: twinkle 4.1s ease-in-out 2.8s infinite; }
.tw-c { animation: twinkle 2.9s ease-in-out 3.3s infinite; }
.sparkle { transform-box: fill-box; transform-origin: center; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.svg-burst line { stroke: var(--ink-soft); stroke-width: 1.1; }
.svg-coil ellipse { fill: none; stroke: var(--ink-soft); stroke-width: 1; }

.svg-plaque { fill: none; stroke: var(--line); stroke-width: 1.1; }
.svg-plaque-text {
  font-family: var(--text); font-weight: 600;
  font-size: 15px; letter-spacing: 0.34em;
  fill: var(--ink-soft);
}

.svg-script {
  font-family: var(--script);
  font-size: 92px;
  fill: var(--indigo);
}

.svg-foot {
  font-family: var(--text); font-weight: 500;
  font-size: 14.5px; letter-spacing: 0.3em;
  fill: var(--ink-soft);
}

/* hero staggered reveal */
.hr { opacity: 0; animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hr-1 { animation-delay: 0.15s; }
.hr-2 { animation-delay: 0.35s; }
.hr-3 { animation-delay: 0.55s; }
.hr-4 { animation-delay: 0.75s; }
.hr-5 { animation-delay: 1.05s; }
.hr-6 { animation-delay: 1.2s; }
.hr-7 { animation-delay: 1.35s; }
.hr-8 { animation-delay: 1.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

g.hr { transform-box: view-box; }

.scroll-cue {
  margin-top: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--text); font-weight: 600;
  font-size: 11px; letter-spacing: 0.5em; text-indent: 0.5em;
}
.scroll-cue i {
  width: 1px; height: 44px; background: var(--line);
  display: block; position: relative; overflow: hidden;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--gold);
  animation: cue-drip 2.2s ease-in-out infinite;
}
@keyframes cue-drip {
  0% { top: -50%; } 70%, 100% { top: 110%; }
}

/* ── sections & headers ───────────────────────────────────── */

.section {
  padding: clamp(80px, 12vh, 140px) clamp(24px, 6vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
}

.section-head { text-align: center; margin-bottom: clamp(48px, 7vh, 80px); }

.script-lead {
  display: block;
  font-family: var(--script);
  font-size: clamp(30px, 4vw, 42px);
  color: var(--gold);
  margin-bottom: 2px;
}
.script-lead-night { color: var(--blush); }

.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 76px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.05;
}

.orn-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 22px;
}
.orn-rule span { width: min(150px, 26vw); height: 1px; background: var(--line); }
.orn-rule b { color: var(--gold); font-size: 12px; font-weight: 400; }
.orn-rule-night span { background: var(--ivory-line); }
.orn-rule-night b { color: var(--blush); }

.section-note {
  max-width: 560px; margin: 26px auto 0;
  font-style: italic; font-size: 20px;
  color: inherit; opacity: 0.85;
}

/* scroll reveal */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.12s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ── dreaming auras ───────────────────────────────────────── */

.aura {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  transition: opacity 1.2s ease;
}
.aura::before, .aura::after {
  content: ""; position: absolute;
  width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}
.aura::before {
  left: -12vmax; top: 4vmax;
  background: radial-gradient(circle, rgba(135, 146, 180, 0.22), transparent 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
.aura::after {
  right: -14vmax; bottom: -8vmax;
  background: radial-gradient(circle, rgba(211, 163, 160, 0.20), transparent 68%);
  animation: drift-b 41s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vmax, 7vmax) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.12); }
  to   { transform: translate(-8vmax, -6vmax) scale(0.95); }
}

.hero { position: relative; }
.hero > svg, .hero > .scroll-cue { position: relative; }

/* ── characters — splash stage ────────────────────────────── */

.stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.stage-head {
  position: relative; z-index: 5;
  text-align: center;
  padding-top: clamp(96px, 13vh, 136px);
  pointer-events: none;
}
.stage-head h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink);
}
.stage-head .script-lead { font-size: clamp(26px, 3vw, 34px); }
.orn-rule-sm { margin-top: 12px; }
.orn-rule-sm span { width: min(90px, 18vw); }

.stage-side {
  position: absolute; z-index: 5;
  right: clamp(18px, 3vw, 46px); top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.42em;
  color: var(--ink-soft); opacity: 0.55;
  pointer-events: none;
}

.stage-view { position: relative; flex: 1; min-height: 0; }

.ch-slide {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(320px, 6fr);
  align-items: center;
  padding: 0 clamp(40px, 8vw, 130px) 104px clamp(24px, 8vw, 120px);
  gap: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.ch-slide.is-active {
  opacity: 1; visibility: visible;
  transition: opacity 1s ease 0.15s, visibility 0s;
}

/* ── art column ── */
.ch-art {
  position: relative;
  height: min(66vh, 740px);
  display: flex; align-items: flex-end; justify-content: center;
}
/* drift lives on the artwork itself: a transform (or z-index) on .ch-art
   would create a stacking context and isolate the multiply blend below */
.ch-art img, .ch-art .ch-veil {
  transform: translateY(26px);
  transition: transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ch-slide.is-active .ch-art img,
.ch-slide.is-active .ch-art .ch-veil { transform: none; }

.ch-art img {
  position: relative; z-index: 1;
  max-height: 96%; max-width: 100%;
  object-fit: contain;
}
.art-blend {
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 88% 92% at 50% 50%, #000 62%, transparent 99%);
  mask-image: radial-gradient(ellipse 88% 92% at 50% 50%, #000 62%, transparent 99%);
}
.art-cut { filter: drop-shadow(0 30px 34px rgba(46, 43, 37, 0.22)); }

.ch-bigword {
  position: absolute; z-index: 0;
  top: 1%; left: 50%;
  transform: translateX(-46%);
  font-family: var(--display);
  font-size: clamp(84px, 14vw, 200px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0.055;
  user-select: none;
}

.ch-arc {
  position: absolute; z-index: 0;
  left: 50%; bottom: 5%;
  width: 132%; height: 32%;
  transform: translateX(-50%) rotate(-7deg);
  border: 1px solid var(--line-faint);
  border-radius: 50%;
}

.ch-floor {
  position: absolute; z-index: 0;
  left: 50%; bottom: 2.5%;
  transform: translateX(-50%);
  width: 60%; height: 26px;
  background: radial-gradient(ellipse, rgba(46, 43, 37, 0.2), transparent 70%);
  filter: blur(7px);
}

.ch-plaque {
  position: absolute; z-index: 2;
  bottom: -10px; left: 50%; transform: translateX(-50%);
  font-family: var(--display);
  font-size: 13px; letter-spacing: 0.26em; text-indent: 0.26em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(242, 236, 221, 0.8);
  padding: 7px 18px 6px;
}

.ch-spark {
  position: absolute; z-index: 2;
  font-weight: 400; color: var(--gold);
  animation: twinkle 3.8s ease-in-out infinite;
}
.ch-spark.s1 { top: 20%; left: 4%; font-size: 15px; }
.ch-spark.s2 { bottom: 24%; right: 2%; font-size: 11px; animation-delay: 1.6s; }

/* veiled portraits (art forthcoming) */
.ch-veil {
  position: relative; z-index: 1;
  height: 90%; aspect-ratio: 5 / 8;
  max-width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ch-veil::before {
  content: ""; position: absolute; inset: 6% 2%;
  border-radius: 48% 52% 55% 45% / 62% 58% 42% 38%;
  filter: blur(34px);
  opacity: 0.85;
  animation: veil-morph 14s ease-in-out infinite alternate;
}
@keyframes veil-morph {
  from { border-radius: 48% 52% 55% 45% / 62% 58% 42% 38%; transform: rotate(-2deg) scale(1); }
  to   { border-radius: 55% 45% 42% 58% / 48% 55% 45% 52%; transform: rotate(2.5deg) scale(1.05); }
}
.ch-veil::after {
  content: ""; position: absolute; inset: 2% 8%;
  border: 1px solid var(--line-faint);
  border-radius: 50%;
  transform: rotate(-7deg);
}

.veil-indigo::before {
  background:
    radial-gradient(ellipse 70% 50% at 35% 25%, rgba(255, 252, 242, 0.9), transparent 65%),
    radial-gradient(ellipse 80% 60% at 70% 75%, rgba(61, 74, 120, 0.5), transparent 70%),
    radial-gradient(ellipse 55% 45% at 25% 80%, rgba(211, 163, 160, 0.5), transparent 65%);
}
.veil-gold::before {
  background:
    radial-gradient(ellipse 75% 55% at 60% 20%, rgba(255, 250, 235, 0.95), transparent 65%),
    radial-gradient(ellipse 70% 60% at 30% 80%, rgba(150, 116, 47, 0.38), transparent 70%),
    radial-gradient(ellipse 50% 40% at 78% 68%, rgba(211, 163, 160, 0.42), transparent 65%);
}
.veil-slate::before {
  background:
    radial-gradient(ellipse 70% 50% at 65% 22%, rgba(255, 252, 242, 0.9), transparent 65%),
    radial-gradient(ellipse 80% 65% at 32% 78%, rgba(135, 146, 180, 0.55), transparent 70%),
    radial-gradient(ellipse 45% 38% at 75% 70%, rgba(150, 116, 47, 0.3), transparent 65%);
}
.veil-blush::before {
  background:
    radial-gradient(ellipse 72% 52% at 40% 22%, rgba(255, 250, 240, 0.92), transparent 65%),
    radial-gradient(ellipse 75% 60% at 68% 76%, rgba(211, 163, 160, 0.58), transparent 70%),
    radial-gradient(ellipse 50% 42% at 22% 72%, rgba(135, 146, 180, 0.42), transparent 65%);
}
.veil-loom::before {
  background:
    radial-gradient(ellipse 70% 50% at 55% 20%, rgba(255, 251, 238, 0.92), transparent 65%),
    radial-gradient(ellipse 78% 62% at 30% 78%, rgba(150, 116, 47, 0.42), transparent 70%),
    radial-gradient(ellipse 55% 45% at 75% 74%, rgba(61, 74, 120, 0.4), transparent 65%);
}
.veil-night::before {
  background:
    radial-gradient(ellipse 65% 45% at 50% 16%, rgba(135, 146, 180, 0.55), transparent 62%),
    radial-gradient(ellipse 80% 65% at 50% 84%, rgba(35, 41, 65, 0.8), transparent 74%),
    radial-gradient(ellipse 50% 40% at 28% 60%, rgba(61, 74, 120, 0.5), transparent 65%);
}

.ch-initial {
  position: relative; z-index: 1;
  font-family: var(--display);
  font-size: clamp(110px, 17vh, 190px);
  color: var(--ink);
  opacity: 0.4;
}
.veil-night .ch-initial { color: var(--ivory); opacity: 0.75; }

.ch-unveiled {
  position: absolute; z-index: 2;
  bottom: 7%; left: 50%; transform: translateX(-50%);
  font-family: var(--script);
  font-size: 25px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ── text column ── */
.ch-text {
  position: relative; z-index: 3;
  max-width: 470px;
  margin-right: clamp(-120px, -6vw, 0px); /* lets the name overlap the art */
}
.ch-slide.is-active .ch-text > * { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ch-slide.is-active .ch-text > *:nth-child(1) { animation-delay: 0.3s; }
.ch-slide.is-active .ch-text > *:nth-child(2) { animation-delay: 0.4s; }
.ch-slide.is-active .ch-text > *:nth-child(3) { animation-delay: 0.5s; }
.ch-slide.is-active .ch-text > *:nth-child(4) { animation-delay: 0.6s; }
.ch-slide.is-active .ch-text > *:nth-child(5) { animation-delay: 0.7s; }

.ch-kicker {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.34em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.ch-kicker::before {
  content: ""; width: 36px; height: 1px; background: var(--gold);
  flex: none;
}

.ch-epithet {
  font-family: var(--script);
  font-size: clamp(30px, 3.4vw, 44px);
  color: var(--gold);
  line-height: 1;
}
.ch-name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 5.8vw, 82px);
  letter-spacing: 0.05em;
  line-height: 1.02;
  color: var(--ink);
  margin: 6px 0 12px;
}
.ch-role {
  font-weight: 600; font-size: 12px; letter-spacing: 0.32em;
  color: var(--indigo);
  padding-bottom: 16px; margin-bottom: 16px;
  position: relative;
}
.ch-role::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 58px; height: 1px; background: var(--gold);
}
.ch-bio {
  font-style: italic;
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* ── rail ── */
.stage-rail {
  position: absolute; z-index: 4;
  left: clamp(20px, 3.5vw, 56px); top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column; gap: 13px;
}
.rail-item {
  display: flex; align-items: baseline; gap: 12px;
  background: none; border: none; cursor: pointer;
  padding: 2px 0;
  font-family: var(--text); font-weight: 600;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.5;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.rail-item i {
  font-family: var(--display); font-style: normal;
  font-size: 13px; letter-spacing: 0.1em;
  width: 26px; text-align: right;
  color: inherit;
}
.rail-item:hover { opacity: 0.9; }
.rail-item.is-active { opacity: 1; color: var(--ink); transform: translateX(6px); }
.rail-item.is-active i { color: var(--gold); }

@media (min-width: 1280px) {
  .stage-rail { display: flex; }
  .ch-slide { padding-left: clamp(330px, 25vw, 400px); }
}

/* ── controls ── */
.stage-controls {
  position: absolute; z-index: 4;
  bottom: clamp(22px, 4.5vh, 44px); left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(24px, 4vw, 48px);
}
.stage-arrow {
  background: none; border: none; cursor: pointer;
  padding: 10px 0; width: clamp(54px, 6vw, 72px);
  color: var(--ink-soft);
  transition: color 0.4s ease, transform 0.4s ease;
}
.stage-arrow svg { display: block; width: 100%; }
.stage-arrow path { stroke: currentColor; stroke-width: 1.2; fill: none; }
.stage-arrow:hover { color: var(--gold); }
.stage-arrow.prev:hover { transform: translateX(-5px); }
.stage-arrow.next:hover { transform: translateX(5px); }

.stage-counter {
  font-family: var(--display);
  font-size: 17px; letter-spacing: 0.22em;
  color: var(--ink-soft);
  min-width: 84px; text-align: center;
}
.stage-counter b { font-weight: 400; color: var(--ink); }

/* ── stage, small screens ── */
@media (max-width: 900px) {
  .stage-side { display: none; }
  .stage-view { min-height: 780px; }
  .ch-slide {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.1fr) auto;
    padding: 0 clamp(20px, 6vw, 40px) 116px;
    align-items: end;
  }
  .ch-art { order: 1; height: 100%; min-height: 0; }
  .ch-text {
    order: 2; max-width: 470px; margin: 14px auto 0; text-align: center;
  }
  .ch-kicker { justify-content: center; }
  .ch-kicker::before { display: none; }
  .ch-role::after { left: 50%; transform: translateX(-50%); }
  .ch-bigword { font-size: clamp(64px, 16vw, 120px); }
  .ch-veil { aspect-ratio: 4 / 5.2; height: 96%; }
  .ch-plaque { display: none; }
}

/* ── world (night panel) ──────────────────────────────────── */

.section-night {
  max-width: none;
  margin: clamp(60px, 9vh, 110px) clamp(16px, 3vw, 40px);
  border: 1px solid var(--line);
  outline: 1px solid var(--line-faint);
  outline-offset: 8px;
  background-color: var(--indigo-night);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(244, 239, 227, 0.5) 1px, transparent 1.6px),
    radial-gradient(circle at 76% 14%, rgba(244, 239, 227, 0.42) 1px, transparent 1.6px),
    radial-gradient(circle at 88% 58%, rgba(211, 163, 160, 0.45) 1px, transparent 1.7px),
    radial-gradient(circle at 32% 74%, rgba(244, 239, 227, 0.35) 1px, transparent 1.5px),
    radial-gradient(circle at 60% 40%, rgba(135, 146, 180, 0.5) 1px, transparent 1.8px),
    radial-gradient(circle at 8% 55%, rgba(244, 239, 227, 0.3) 1px, transparent 1.4px),
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(61, 74, 120, 0.55), transparent 70%);
  background-size: 340px 340px, 420px 420px, 380px 380px, 460px 460px, 300px 300px, 520px 520px, 100% 100%;
  color: var(--ivory);
}

.section-night .section-head h2 { color: var(--ivory); }
.section-night .section-note { color: rgba(244, 239, 227, 0.8); }

.world-stage {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vh, 64px);
}
.world-stage img {
  display: block; width: 100%;
  aspect-ratio: 16 / 9.5;
  object-fit: cover;
  object-position: 50% 62%;
  border: 1px solid var(--ivory-line);
  outline: 1px solid rgba(244, 239, 227, 0.14);
  outline-offset: 7px;
  filter: saturate(0.92);
}
.world-stage figcaption {
  margin-top: 20px;
  text-align: center;
  font-weight: 500; font-size: 12.5px; letter-spacing: 0.28em;
  color: rgba(244, 239, 227, 0.66);
}

.folio {
  font-family: var(--display);
  font-size: 13px; letter-spacing: 0.2em;
  color: var(--blush);
}
.world-stage .folio { margin-right: 14px; }

.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--ivory-line);
  border: 1px solid var(--ivory-line);
  max-width: 1100px;
  margin: 0 auto;
}
.world-plate {
  background: rgba(35, 41, 65, 0.92);
  padding: clamp(28px, 3.5vw, 44px);
  transition: background 0.5s ease;
}
.world-plate:hover { background: rgba(48, 56, 88, 0.92); }
.world-plate h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px; letter-spacing: 0.1em;
  margin: 10px 0 12px;
}
.world-plate p {
  font-size: 17px; line-height: 1.6;
  color: rgba(244, 239, 227, 0.78);
}

.world-quote {
  max-width: 620px;
  margin: clamp(44px, 6vh, 64px) auto 0;
  text-align: center;
  font-style: italic;
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.5;
  color: var(--ivory);
}
.world-quote-src {
  display: block; margin-top: 16px;
  font-style: normal; font-weight: 500;
  font-size: 12px; letter-spacing: 0.32em;
  color: var(--blush);
}

/* ── novel ────────────────────────────────────────────────── */

.novel-grid { max-width: 720px; margin: 0 auto; }

.novel-subhead {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 14px;
}
.novel-subhead::after {
  content: ""; display: block;
  width: 54px; height: 1px; background: var(--gold);
  margin-top: 10px;
}

.novel-synopsis p {
  font-size: 19px; line-height: 1.65; color: var(--ink-soft);
}
.novel-synopsis p + p { margin-top: 1.1em; }

.novel-toc { margin-top: clamp(32px, 4vh, 48px); }

.toc { list-style: none; }
.toc-vigil {
  font-weight: 600; font-size: 12px; letter-spacing: 0.3em;
  color: var(--indigo);
  margin: 22px 0 10px;
}
.toc-vigil:first-child { margin-top: 0; }
.toc-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 5px 0;
  font-size: 18.5px;
}
.toc-row span { font-style: italic; }
.toc-row i { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.toc-row b {
  font-family: var(--display); font-weight: 400; font-size: 16px;
  color: var(--ink-soft);
}
.toc-muted { opacity: 0.5; }

.novel-status {
  margin-top: clamp(30px, 4vh, 44px);
  font-weight: 600; font-size: 12px; letter-spacing: 0.3em;
  color: var(--gold);
}

/* ── footer ───────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 30px clamp(24px, 6vw, 72px) 70px;
}
.footer-mark {
  font-family: var(--display);
  font-size: 26px; letter-spacing: 0.24em;
  margin: 28px 0 10px;
}
.footer-line {
  font-weight: 500; font-size: 11.5px; letter-spacing: 0.3em;
  color: var(--ink-soft);
}

/* ── small screens ────────────────────────────────────────── */

@media (max-width: 640px) {
  body { font-size: 17.5px; }
  .page-frame { inset: 8px; }
  .nav { padding: 14px 18px; }
  .nav nav { gap: 14px; }
  .nav-link { font-size: 11px; letter-spacing: 0.2em; }
  .hero { padding-top: 76px; }
  .section-night { margin-left: 10px; margin-right: 10px; outline-offset: 5px; }
}

/* ── reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hr { animation-duration: 0.01s; animation-delay: 0s; }
  .tw-a, .tw-b, .tw-c, .scroll-cue i::after,
  .aura::before, .aura::after, .ch-veil::before, .ch-spark { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ch-slide, .ch-art, .ch-slide.is-active .ch-text > * {
    transition-duration: 0.01s; animation-duration: 0.01s; animation-delay: 0s;
  }
}

/* ── gold scrollbar (site-wide) ───────────────────────────── */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #e7dfc9;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: #e7dfc9;
  border-left: 1px solid var(--line-faint);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b28c3e, var(--gold) 40%, #7a5d24);
  border-radius: 8px;
  border: 3px solid #e7dfc9;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c39a45, #a5813a 40%, #8a6a2b);
}

/* ── novel TOC links & begin CTA ──────────────────────────── */

.toc-link {
  display: flex; align-items: baseline; gap: 12px;
  width: 100%;
  color: inherit; text-decoration: none;
}
.toc-link span { font-style: italic; position: relative; transition: color 0.35s ease; }
.toc-link span::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.toc-link i { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.toc-link b {
  font-family: var(--display); font-weight: 400; font-size: 16px;
  color: var(--ink-soft);
  transition: color 0.35s ease;
}
.toc-link:hover span { color: var(--indigo); }
.toc-link:hover span::after { transform: scaleX(1); transform-origin: left; }
.toc-link:hover b { color: var(--gold); }

.begin-cta {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: clamp(28px, 4vh, 40px);
  padding: 15px 30px;
  border: 1px solid var(--ink);
  outline: 1px solid var(--line-faint);
  outline-offset: 4px;
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 12px; letter-spacing: 0.32em; text-indent: 0.1em;
  transition: outline-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}
.begin-cta b { color: var(--gold); font-weight: 400; font-size: 10px; transition: transform 0.4s ease; }
.begin-cta:hover {
  background: var(--parchment-deep);
  outline-color: var(--gold);
  transform: translateY(-2px);
}
.begin-cta:hover b { transform: translateX(5px); }

/* ── reader page ──────────────────────────────────────────── */

.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.read-progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #b28c3e, var(--gold));
  transform: scaleX(0); transform-origin: left;
}

.reader-crumb {
  font-family: var(--text); font-weight: 600;
  font-size: 11.5px; letter-spacing: 0.32em;
  color: var(--ink-soft);
}

.reader {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(130px, 18vh, 190px) clamp(22px, 5vw, 40px) clamp(40px, 6vh, 70px);
}

.chapter-head { text-align: center; margin-bottom: clamp(44px, 7vh, 72px); }
.chapter-kicker {
  font-weight: 600; font-size: 11px; letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 18px;
}
.chapter-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 6.5vw, 62px);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--ink);
}

.chapter-body p {
  font-size: 21px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.25em;
}
.chapter-body > p:first-child::first-letter {
  font-family: var(--display);
  float: left;
  font-size: 86px; line-height: 0.76;
  padding: 10px 14px 0 0;
  color: var(--indigo);
}
.chapter-break {
  text-align: center;
  color: var(--gold);
  font-size: 13px !important;
  letter-spacing: 1.2em; text-indent: 1.2em;
  margin: 2.4em 0 !important;
  user-select: none;
}

.chapter-end { text-align: center; margin: clamp(48px, 7vh, 72px) 0; }
.chapter-end::before, .chapter-end::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: min(110px, 20vw); height: 1px; background: var(--line);
  margin: 0 18px;
}
.chapter-finis {
  font-family: var(--script);
  font-size: 26px;
  color: var(--ink-soft);
}

.chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(14px, 3vw, 26px);
  align-items: stretch;
}
.ch-nav-link {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  outline: 1px solid transparent;
  outline-offset: 4px;
  text-decoration: none;
  color: var(--ink);
  transition: outline-color 0.4s ease, border-color 0.4s ease,
              background 0.4s ease, transform 0.4s ease;
}
.ch-nav-next { text-align: right; }
.ch-nav-label {
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.3em;
  color: var(--ink-soft);
}
.ch-nav-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(17px, 2vw, 21px);
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.ch-nav-link:hover {
  border-color: var(--ink);
  outline-color: var(--gold);
  background: var(--parchment-deep);
  transform: translateY(-3px);
}
.ch-nav-link.is-disabled {
  opacity: 0.45; pointer-events: none;
}
.ch-nav-link.is-disabled .ch-nav-title { font-style: italic; font-family: var(--text); }

.ch-nav-contents {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 0 clamp(10px, 2vw, 22px);
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.4s ease;
}
.ch-nav-contents span { color: var(--gold); font-size: 13px; transition: transform 0.5s ease; }
.ch-nav-contents small {
  font-weight: 600; font-size: 9.5px; letter-spacing: 0.28em; text-indent: 0.28em;
}
.ch-nav-contents:hover { color: var(--ink); }
.ch-nav-contents:hover span { transform: rotate(90deg); }

@media (max-width: 640px) {
  .reader-crumb { display: none; }
  .chapter-body p { font-size: 19px; line-height: 1.8; }
  .chapter-end::before, .chapter-end::after { width: 44px; margin: 0 12px; }
  .chapter-nav { grid-template-columns: 1fr; }
  .ch-nav-contents { order: 3; padding: 14px 0 0; flex-direction: row; gap: 10px; }
  .ch-nav-next { order: 1; text-align: left; }
  .ch-nav-prev { order: 2; }
}

/* ── chapter illustrations ────────────────────────────────── */

.chapter-figure {
  margin: clamp(36px, 5vh, 56px) auto;
  text-align: center;
}
.chapter-figure img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  outline: 1px solid var(--line-faint);
  outline-offset: 7px;
  padding: 8px;
  background: var(--parchment-deep);
}
.chapter-figure figcaption {
  margin-top: 20px;
  font-weight: 600; font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chapter-figure figcaption::before {
  content: "✦"; color: var(--gold);
  margin-right: 12px; font-size: 9px;
}
