/* Venom as My Silhouette — case-file noir, JetBrains Mono throughout.
   Palette: bone, charcoal, graphite, thin red. Red is rationed. */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

:root{
  --bone: #e8e3d8;
  --bone-soft: #c9c2b3;
  --bone-dim: rgba(232,227,216,.55);
  --bone-faint: rgba(232,227,216,.32);
  --char: #0a0908;
  --graphite: #16140f;
  --graphite-2: #1f1c16;
  --red: oklch(0.55 0.18 25);
  --red-dim: oklch(0.55 0.18 25 / .55);
  --red-faint: oklch(0.55 0.18 25 / .25);
  --font: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --t-slow: 1100ms cubic-bezier(.22,.61,.36,1);
  --t-med: 700ms cubic-bezier(.22,.61,.36,1);
  --t-fast: 320ms cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; background: var(--char); color: var(--bone); font-family: var(--font); font-weight: 400; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; cursor: default; }

#root { width: 100vw; height: 100vh; position: relative; overflow: hidden; }

button { font-family: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { cursor: pointer; }

/* A tiny secondary "wisp" that follows the cursor — purely decorative.
   We KEEP the system cursor for click confidence; this just adds atmosphere. */
.cursor-wisp {
  position: fixed; pointer-events: none; z-index: 99998;
  width: 22px; height: 22px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(220, 30, 40, .55);
  background: radial-gradient(circle, rgba(220,30,40,.18) 0%, transparent 70%);
  box-shadow:
    0 0 12px rgba(220, 30, 40, .35),
    inset 0 0 6px rgba(220, 30, 40, .25);
  mix-blend-mode: screen;
  opacity: .85;
  animation: wispRing 3.2s ease-in-out infinite;
}
.cursor-wisp::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 3px; height: 3px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--red);
  box-shadow: 0 0 4px var(--red);
}
@keyframes wispRing {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: .85; }
  50%      { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
}

/* Lantern canvas — BEHIND scene content so it bleeds in from the edges and
   washes the dark background, but doesn't overlay text and buttons. */
.lantern-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  mix-blend-mode: screen;
}

/* Scene root + camera-dolly transitions */
.scene-stack { position: absolute; inset: 0; z-index: 1; }
.scene {
  position: absolute; inset: 0;
  transition: transform var(--t-slow), opacity var(--t-slow), filter var(--t-slow);
}
.scene--enter { opacity: 0; transform: scale(.94); filter: blur(8px); pointer-events: none; }
.scene--active { opacity: 1; transform: scale(1); filter: blur(0); }
.scene--exit { opacity: 0; transform: scale(1.18); filter: blur(10px); pointer-events: none; }

/* ────────────────────────────────────────────────────────────────────────── */
/* COVER */
/* ────────────────────────────────────────────────────────────────────────── */

.cover {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.85) 100%),
    url("assets/cover-bg.png") center / cover no-repeat,
    #050302;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  --breath: 1; --fog: 1;
}

.cover-fog { position: absolute; inset: -10%; opacity: var(--fog); pointer-events: none; }
.cover-fog-layer {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(180,140,130,.08), transparent 60%),
    radial-gradient(ellipse 50% 30% at 70% 80%, rgba(180,140,130,.06), transparent 60%),
    radial-gradient(ellipse 40% 25% at 50% 50%, rgba(220,30,40,.04), transparent 70%);
  filter: blur(40px);
  animation: fogDrift 40s linear infinite;
}
.cover-fog-2 { animation-duration: 60s; animation-direction: reverse; opacity: .7; }
.cover-fog-3 { animation-duration: 90s; opacity: .5; filter: blur(70px); }
@keyframes fogDrift {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(4%, -3%) scale(1.05); }
  100% { transform: translate(0,0) scale(1); }
}

/* Massive silhouette behind the title — fills the screen, head and shoulders
   bleed past the edges. */
.cover-silhouette { display: none; }
.cover-silhouette--legacy {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(140vh, 130vw);
  height: 110vh;
  z-index: 1; pointer-events: none;
  filter:
    drop-shadow(0 0 80px rgba(220, 30, 40, .45))
    drop-shadow(0 0 200px rgba(150, 18, 25, .35));
}
.cover-silhouette svg,
.cover-silhouette img {
  display: block;
  width: 100%; height: 100%; opacity: .88;
  object-fit: contain;
  object-position: center bottom;
  animation: silBreathe calc(9s / var(--breath, 1)) ease-in-out infinite;
  transform-origin: center bottom;
  -webkit-user-drag: none;
  user-select: none;
}
.cover-silhouette img {
  /* Crush the midtones so the figure reads as deep black behind the title */
  filter: brightness(.5) contrast(1.2) saturate(.8);
}
/* Soft red-black vignette behind the title block for text legibility */
.cover-title-block::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 130%; height: 160%;
  background: radial-gradient(ellipse at center,
    rgba(8, 4, 4, .85) 0%,
    rgba(8, 4, 4, .55) 35%,
    rgba(8, 4, 4, 0) 70%);
  z-index: -1; pointer-events: none;
  filter: blur(8px);
}
.cover-title-block { position: relative; }
@keyframes silBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.012) translateY(-4px); }
}
@keyframes silBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.012) translateY(-4px); }
}
/* Dog-tag chain hint — descends from the neck, sits behind title */
.cover-dogtag {
  position: absolute; left: 50%; top: 22%;
  width: 22vw; height: 26vw; max-width: 320px; max-height: 380px;
  transform: translateX(-50%);
  border-left: 1.5px dashed rgba(220, 30, 40, .4);
  border-right: 1.5px dashed rgba(220, 30, 40, .4);
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  border-top: 1.5px dashed rgba(220, 30, 40, .4);
  border-bottom: none;
  opacity: .5; z-index: 1; pointer-events: none;
}

.cover-frame {
  position: relative; z-index: 2;
  width: min(680px, 78vw); padding: 60px 50px;
  display: flex; flex-direction: column; align-items: center; gap: 36px;
}

/* (jacket / spine no longer used on cover — see Hub) */
.cover-jacket, .cover-jacket-art, .cover-jacket-bleed,
.cover-jacket-shadow, .cover-spine { display: none; }

.cover-spine {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  font-size: 10px; letter-spacing: .35em; text-transform: uppercase;
  color: var(--bone-faint); z-index: 3;
  white-space: nowrap;
}
.cover-spine .dot { color: var(--red); }
.cover-spine-top { top: 24px; }
.cover-spine-bot { display: none; }

.cover-rule { width: 100%; height: 1px; background: var(--red-dim); }
.cover-rule-top, .cover-rule-bot {
  background: linear-gradient(to right, transparent, var(--red-dim) 20%, var(--red-dim) 80%, transparent);
}

.cover-meta {
  width: 100%; display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--bone-faint);
}

.cover-title-block { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }

.cover-eyebrow {
  font-size: 10px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--red-dim);
}

.cover-title {
  margin: 0; padding: 0;
  font-weight: 700; font-size: clamp(36px, 5.6vw, 76px);
  line-height: .98; letter-spacing: .04em;
  color: #fff;
  display: flex; flex-direction: column; gap: 4px;
  text-shadow:
    0 0 2px rgba(0,0,0,.95),
    0 2px 18px rgba(0,0,0,.9),
    0 0 40px rgba(0,0,0,.7);
  animation: titleBreathe calc(6s / var(--breath)) ease-in-out infinite;
}
.cover-title-line { display: block; }
.cover-title-mid { color: #fff; font-style: italic; font-weight: 400; font-size: .55em; letter-spacing: .35em; opacity: .85; }
@keyframes titleBreathe {
  0%, 100% { letter-spacing: .04em; opacity: .96; }
  50%      { letter-spacing: .06em; opacity: 1; }
}

.cover-byline {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--bone-soft);
}
.cover-byline-rule { width: 32px; height: 1px; background: var(--bone-faint); }

.cover-prompt {
  position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%);
  background: rgba(220, 30, 40, 0.06);
  border: 1px solid var(--red-dim); padding: 14px 22px;
  font-family: inherit; font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
  color: var(--bone); cursor: pointer;
  opacity: 0; transition: opacity 1.4s ease, color var(--t-fast), letter-spacing var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  display: flex; gap: 10px; align-items: center;
  z-index: 5;
  box-shadow: 0 0 24px rgba(220, 30, 40, 0.15);
}
.cover-prompt.is-ready { opacity: 1; animation: promptPulse 3s ease-in-out infinite; }
.cover-prompt:hover { color: var(--bone); letter-spacing: .42em; background: rgba(220, 30, 40, 0.18); border-color: var(--red); box-shadow: 0 0 36px rgba(220,30,40,.4); }
.cover-prompt-bracket { color: var(--red); font-size: 14px; }
@keyframes promptPulse { 0%,100%{opacity:.8} 50%{opacity:1} }

.cover-split {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(to right, #0a0605, #1a0a0a, #0a0605);
  z-index: 6; transition: transform 1.6s cubic-bezier(.6,.04,.32,1);
  pointer-events: none;
  opacity: 0;
}
.cover-split-l { left: 0; transform-origin: left center; }
.cover-split-r { right: 0; transform-origin: right center; }
.cover--opening .cover-split { opacity: 1; }
.cover--opening .cover-split-l { transform: translateX(-100%); box-shadow: 4px 0 40px rgba(220,30,40,.3); }
.cover--opening .cover-split-r { transform: translateX(100%);  box-shadow: -4px 0 40px rgba(220,30,40,.3); }
.cover--opening .cover-frame { opacity: 0; transition: opacity .6s ease; }
.cover--opening .cover-prompt { opacity: 0; }

.cover-credit {
  position: absolute; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; text-align: center;
  background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity 1.2s ease 1s;
}
/* When the credit is showing, kill the cover's background image so the name
   pops on pure black — the alley scene must not bleed through. */
.cover.cover--opening { background: #000 !important; }
.cover-credit.is-shown { opacity: 1; }
.cover-credit-eyebrow {
  font-size: 11px; letter-spacing: .55em; text-transform: uppercase;
  color: var(--bone-soft); opacity: .85;
  animation: creditEyebrowIn 1.4s ease 1.2s both;
}
.cover-credit-name {
  font-size: clamp(34px, 6vw, 84px);
  letter-spacing: .08em;
  font-weight: 700; font-style: italic;
  color: #ff2a36;
  text-shadow:
    0 0 2px rgba(0,0,0,.95),
    0 0 18px rgba(220,30,40,.85),
    0 0 60px rgba(220,30,40,.55),
    0 0 120px rgba(220,30,40,.35);
  animation: creditNameIn 1.6s cubic-bezier(.2,.8,.2,1) 1.4s both,
             creditNamePulse 4s ease-in-out 3s infinite;
}
@keyframes creditEyebrowIn {
  from { opacity: 0; letter-spacing: .2em; }
  to   { opacity: .85; letter-spacing: .55em; }
}
@keyframes creditNameIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   filter: blur(0); }
}
@keyframes creditNamePulse {
  0%, 100% { text-shadow:
    0 0 2px rgba(0,0,0,.95),
    0 0 18px rgba(220,30,40,.7),
    0 0 60px rgba(220,30,40,.45);
  }
  50%      { text-shadow:
    0 0 2px rgba(0,0,0,.95),
    0 0 26px rgba(220,30,40,1),
    0 0 80px rgba(220,30,40,.7),
    0 0 140px rgba(220,30,40,.45);
  }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* HUB / CORRIDOR */
/* ────────────────────────────────────────────────────────────────────────── */

.hub {
  position: absolute; inset: 0; perspective: 1200px;
  background:
    radial-gradient(ellipse at 50% 55%, #15110d 0%, #08060400 70%),
    #050402;
  overflow: hidden;
}

/* Image-based corridor: each view is a full-bleed photograph with absolutely-
   positioned hotspots layered on top. Forward/turn arrows step between views. */
.hub--hall { background: #050402; }
.hub--hall .hub-floor,
.hub--hall .hub-ceiling,
.hub--hall .hub-wall,
.hub--hall .hub-vanish,
.hub--hall .hub-corridor,
.hub--hall .hub-vignette { display: none; }

.hall { position: absolute; inset: 0; overflow: hidden; animation: hallFade .55s ease both; }
@keyframes hallFade {
  from { opacity: 0; transform: scale(1.04); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}
.hall-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  user-select: none; -webkit-user-drag: none;
  z-index: 1;
}
.hall-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at 50% 60%, transparent 40%, rgba(0,0,0,.55) 95%);
}

.hall-hotspot {
  position: absolute; z-index: 3;
  background: transparent; border: 0; padding: 0; outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hall-hotspot:focus { outline: none; }

.hall-nav {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: rgba(8,4,4,.55);
  border: 1px solid var(--red-dim);
  color: var(--bone);
  font-family: inherit; font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
  cursor: pointer; backdrop-filter: blur(6px);
  transition: background var(--t-fast), border-color var(--t-fast), letter-spacing var(--t-fast), color var(--t-fast);
}
.hall-nav:hover {
  background: rgba(220,30,40,.18);
  border-color: var(--red);
  letter-spacing: .42em;
  box-shadow: 0 0 28px rgba(220,30,40,.35);
}
.hall-nav-glyph { color: var(--red); font-size: 16px; line-height: 1; }
.hall-nav-fwd   { bottom: 5%; left: 50%; transform: translateX(-50%); }
.hall-nav-back  { bottom: 5%; left: 4%; }
.hall-nav-right { bottom: 5%; right: 4%; }

.hub-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(0,0,0,.85) 90%);
  pointer-events: none; z-index: 5;
}

.hub-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background:
    linear-gradient(to bottom, transparent, rgba(0,0,0,.6) 80%),
    repeating-linear-gradient(to bottom, transparent 0, transparent 30px, rgba(232,227,216,.025) 30px, rgba(232,227,216,.025) 31px),
    #0a0807;
  transform-origin: 50% 0;
  transform: perspective(800px) rotateX(72deg) translateZ(-100px);
}
.hub-ceiling {
  position: absolute; left: 0; right: 0; top: 0; height: 35%;
  background:
    linear-gradient(to top, transparent, rgba(0,0,0,.7)),
    #08060a;
}
.hub-wall {
  position: absolute; top: 0; bottom: 0; width: 35%;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 80px, rgba(232,227,216,.03) 80px, rgba(232,227,216,.03) 81px),
    linear-gradient(to right, #1a1612, #0a0807);
}
.hub-wall-l { left: 0; transform: skewY(-8deg); transform-origin: left top; }
.hub-wall-r { right: 0; transform: skewY(8deg);  transform-origin: right top; background: linear-gradient(to left, #1a1612, #0a0807); }

.hub-vanish {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,30,40,.12), transparent 70%);
  animation: vanishPulse 6s ease-in-out infinite;
}
@keyframes vanishPulse {
  0%,100% { opacity: .4; transform: translate(-50%,-50%) scale(.9); }
  50%     { opacity: .85; transform: translate(-50%,-50%) scale(1.15); }
}

.hub-corridor { position: absolute; inset: 0; z-index: 3; }

.door {
  --scale: 1; --depth-op: 1; --lit: .15; --xpct: 0;
  position: absolute;
  left: 50%; top: 50%;
  /* translate-center is in % of element box, so it composes cleanly with the
     viewport-% translateX. Apply scale LAST so children sizes are predictable. */
  transform: translate(-50%, -50%) translateX(var(--xpct)) scale(var(--scale));
  transform-origin: center center;
  width: 130px; height: 280px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  opacity: var(--depth-op);
  transition: filter var(--t-med);
  filter: brightness(calc(.7 + var(--lit) * 0.5));
}
/* Even-indexed doors hug the left wall, odd hug the right; both recede toward
   center as depth increases. Offsets are viewport-relative (vw) so they fit
   narrow viewports too. */
.door:nth-child(1) { --scale: 1.00; --xpct: -32vw; }
.door:nth-child(2) { --scale: 0.86; --xpct:  26vw; }
.door:nth-child(3) { --scale: 0.74; --xpct: -19vw; }
.door:nth-child(4) { --scale: 0.62; --xpct:  14vw; }
.door:nth-child(5) { --scale: 0.52; --xpct: -9.5vw; }
.door:nth-child(6) { --scale: 0.44; --xpct:  6vw; }
.door:nth-child(7) { --scale: 0.36; --xpct: 0; }

.door-frame {
  width: 100%; height: 100%;
  border: 1px solid rgba(232,227,216,.18);
  background: linear-gradient(to bottom, #1a140f, #0c0907);
  position: relative;
  box-shadow:
    inset 0 0 0 4px #08060500,
    inset 0 0 30px rgba(0,0,0,.8),
    0 0 calc(var(--lit) * 50px) calc(var(--lit) * -8px) var(--red);
}
.door-panel {
  position: absolute; inset: 16px;
  border: 1px solid rgba(232,227,216,.08);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.door-knob {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 calc(var(--lit) * 16px) var(--red);
}
.door-light {
  position: absolute; bottom: -2px; left: 10%; right: 10%; height: 2px;
  background: var(--red);
  filter: blur(2px); opacity: var(--lit);
}

.door-plate {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
  font-size: 9px; letter-spacing: .35em; color: var(--bone-soft);
}
.door-plate-day { font-weight: 500; }
.door-plate-num {
  font-size: 22px; letter-spacing: .1em; color: var(--bone);
  margin-top: 6px;
  text-shadow: 0 0 calc(var(--lit) * 12px) var(--red);
}

.door-caption {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  white-space: nowrap; pointer-events: none;
  transition: opacity var(--t-fast);
  opacity: .7 !important;
}
.door:hover .door-caption { opacity: 1 !important; }
.door:hover { filter: brightness(1.15); }
.door-caption-day {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone);
}
.door-caption-part {
  font-size: 9px; letter-spacing: .2em; color: var(--red);
  font-style: italic;
}

/* Hub HUD chrome */
.hub-hud {
  position: absolute; z-index: 6; font-size: 10px; letter-spacing: .25em;
  color: var(--bone-faint); text-transform: uppercase;
  display: flex; flex-direction: column; gap: 4px;
}
.hub-hud-tl { top: 24px; left: 32px; }
.hub-hud-bl { bottom: 24px; left: 32px; }
.hub-hud-br { bottom: 24px; right: 32px; max-width: 260px; text-align: right; text-transform: none; letter-spacing: .1em; font-style: italic; opacity: 0; transition: opacity .6s ease; }
.hub:hover .hub-hud-br { opacity: 1; }
.hud-mark { color: var(--red); font-style: italic; letter-spacing: .4em; }
.hud-text { color: var(--bone-dim); }

/* Book on pedestal — actual 3D render */
.hub-book {
  --lit: .2;
  position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 0;
  filter: brightness(calc(0.45 + var(--lit) * 0.7));
  transition: filter var(--t-med), transform var(--t-med);
  z-index: 4;
}
.hub-book:hover { transform: translateX(-50%) translateY(-6px); filter: brightness(1); }
.hub-book-img {
  display: block; width: 200px; height: 200px; object-fit: contain;
  filter:
    drop-shadow(0 20px 30px rgba(0,0,0,.7))
    drop-shadow(0 0 50px rgba(220,30,40,calc(.15 + var(--lit) * .25)));
  animation: bookFloat 7s ease-in-out infinite;
}
@keyframes bookFloat {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50%      { transform: translateY(-6px) rotate(0.5deg); }
}
.hub-book-pedestal,
.hub-book-spine,
.hub-book-cover,
.hub-book-title,
.hub-book-author { display: none; }

.hub-book-caption {
  margin-top: 18px; font-size: 9px; letter-spacing: .3em; color: var(--bone-dim);
  text-transform: uppercase; font-style: italic;
  display: flex; align-items: center; gap: 10px;
  opacity: var(--lit);
  transition: opacity var(--t-fast);
}
.hub-book-caption .rule { width: 24px; height: 1px; background: var(--red-dim); }

/* Amazon overlay */
.amazon-overlay {
  position: absolute; inset: 0; z-index: 100;
  background: rgba(5,3,2,.85); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .5s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.amazon-card {
  width: min(440px, 90vw); padding: 40px 36px;
  background: var(--graphite); border: 1px solid var(--red-faint);
  text-align: center;
  box-shadow: 0 0 60px rgba(220,30,40,.15);
}
.amazon-eyebrow { font-size: 10px; letter-spacing: .35em; color: var(--red-dim); text-transform: uppercase; }
.amazon-title { margin: 16px 0 4px; font-weight: 500; font-size: 22px; letter-spacing: .04em; }
.amazon-author { font-size: 11px; color: var(--bone-soft); letter-spacing: .15em; }
.amazon-rule { width: 40px; height: 1px; background: var(--red-dim); margin: 24px auto; }
.amazon-actions { display: flex; flex-direction: column; gap: 8px; }
.amazon-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; text-decoration: none;
  border: 1px solid var(--red-dim); color: var(--bone);
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  background: rgba(220,30,40,.08);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.amazon-btn:hover { background: rgba(220,30,40,.18); border-color: var(--red); }
.amazon-btn--ghost { background: transparent; border-color: rgba(232,227,216,.15); }
.amazon-btn--ghost:hover { border-color: var(--bone-soft); background: rgba(232,227,216,.04); }
.amazon-arrow { color: var(--red); }
.amazon-close {
  margin-top: 24px; background: transparent; border: 0;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-faint); cursor: pointer;
}
.amazon-close:hover { color: var(--red); }

.amazon-card--bio {
  width: min(680px, 92vw);
  max-height: 86vh;
  text-align: left;
  display: flex; flex-direction: column; gap: 14px;
}
.amazon-card--bio .amazon-eyebrow,
.amazon-card--bio .amazon-title { text-align: center; }
.bio-body {
  overflow-y: auto;
  padding-right: 8px;
  font-size: 13px; line-height: 1.7; color: var(--bone-soft);
  font-weight: 300;
}
.bio-body p { margin: 0 0 14px 0; }
.bio-body p:last-child { margin-bottom: 0; }
.bio-body em { color: var(--bone); font-style: italic; }
.bio-body::-webkit-scrollbar { width: 6px; }
.bio-body::-webkit-scrollbar-thumb { background: var(--red-faint); border-radius: 3px; }
.amazon-card--bio .amazon-close { align-self: center; }

/* End-of-sample call-to-action page inside the chapter reader. */
.page-cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; padding: 40px 20px; gap: 20px;
}
.page-cta-eyebrow {
  font-size: 10px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--red-dim);
}
.page-cta-title {
  margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 500;
  color: var(--bone); letter-spacing: .02em; line-height: 1.3;
  max-width: 36ch;
}
.page-cta-body {
  margin: 0; font-size: 13px; line-height: 1.7; color: var(--bone-soft);
  max-width: 48ch; font-weight: 300;
}
.page-cta-body em { color: var(--bone); font-style: italic; }
.page-cta-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 26px; margin-top: 8px; text-decoration: none;
  border: 1px solid var(--red-dim); color: var(--bone);
  font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
  background: rgba(220,30,40,.06);
  transition: background var(--t-fast), border-color var(--t-fast),
              letter-spacing var(--t-fast), box-shadow var(--t-fast);
}
.page-cta-btn:hover {
  background: rgba(220,30,40,.18);
  border-color: var(--red);
  letter-spacing: .42em;
  box-shadow: 0 0 32px rgba(220,30,40,.35);
}
.page-cta-arrow { color: var(--red); font-size: 14px; }
.page-cta-foot {
  margin-top: 12px; font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--bone-faint);
}

/* ────────────────────────────────────────────────────────────────────────── */
/* CHAPTER */
/* ────────────────────────────────────────────────────────────────────────── */

.chapter {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #1a1612 0%, #0a0807 50%, #050402 100%);
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto;
}
.chapter-frame {
  width: min(1400px, 95vw); padding: 24px 28px 40px;
  display: flex; flex-direction: column; gap: 20px;
}
.chapter-head {
  position: sticky; top: 0; z-index: 4;
  background: linear-gradient(to bottom, rgba(10,8,7,.95) 0%, rgba(10,8,7,.85) 70%, transparent 100%);
  padding: 12px 0 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-faint);
  backdrop-filter: blur(6px);
}
.chapter-back {
  background: transparent; border: 0; cursor: pointer;
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--bone-dim);
  padding: 8px 0; border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.chapter-back:hover { color: var(--red); border-color: var(--red-dim); }
.chapter-meta { display: flex; gap: 14px; }
.chapter-meta .dot { color: var(--red-dim); }

.chapter-body {
  flex: 1; display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3.4fr) minmax(150px, 1fr);
  gap: 28px;
  align-items: stretch;
}

.chapter-aside { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }
.chapter-aside-l { text-align: right; }
.chapter-aside-r { text-align: left; }
.aside-mark {
  font-size: 9px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--red-dim); font-style: italic;
}
.chapter-title {
  margin: 0; font-weight: 500; font-size: 22px; line-height: 1.2;
  letter-spacing: .02em; color: var(--bone);
}
.chapter-subtitle {
  font-size: 11px; line-height: 1.6; color: var(--bone-soft); font-style: italic;
}
.aside-rule { width: 100%; height: 1px; background: var(--red-faint); margin: 8px 0; }
.aside-page {
  display: flex; gap: 6px; justify-content: flex-end; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.chapter-aside-r .aside-page { justify-content: flex-start; }
.aside-page-num { font-size: 28px; color: var(--red); font-weight: 300; }
.aside-page-of { font-size: 12px; color: var(--bone-faint); }

.aside-note {
  font-size: 9px; line-height: 1.7; color: var(--bone-faint);
  font-style: italic; letter-spacing: .04em;
}
.aside-amazon {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 12px 14px; text-decoration: none;
  border: 1px solid var(--red-dim); color: var(--bone);
  background: rgba(220,30,40,.08);
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  transition: background var(--t-fast), border-color var(--t-fast),
              letter-spacing var(--t-fast), box-shadow var(--t-fast);
}
.aside-amazon:hover {
  background: rgba(220,30,40,.22);
  border-color: var(--red);
  letter-spacing: .38em;
  box-shadow: 0 0 24px rgba(220,30,40,.4);
}
.aside-amazon-arrow { color: var(--red); font-size: 13px; }

/* Scene plate: AI illustration in the chapter's left aside. */
.aside-plate {
  position: relative;
  width: 100%; aspect-ratio: 4 / 5;
  margin-bottom: 16px;
  border: 1px solid var(--red-faint);
  background: #0a0807;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(220,30,40,.12);
}
.aside-plate img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.92) contrast(1.08) saturate(.95);
}
.aside-plate-grain {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.18) 2px 3px),
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

/* Make the poem image render the photograph if provided. */
.poem-image-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.95) contrast(1.05) saturate(.9);
  z-index: 1;
}

.chapter-page {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232,227,216,.025), transparent 60%),
    #0d0a08;
  border: 1px solid rgba(232,227,216,.08);
  padding: 48px 56px 36px;
  min-width: 0;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.6),
    0 0 60px rgba(0,0,0,.5),
    0 0 0 1px rgba(220,30,40,.05);
  display: flex; flex-direction: column; gap: 24px;
}
.page-edge {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, transparent, var(--red-dim), transparent);
}
.page-edge-l { left: 0; }
.page-edge-r { right: 0; }

.page-inner { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.page-para {
  margin: 0; font-size: 15px; line-height: 1.95;
  color: var(--bone); letter-spacing: .015em;
  text-wrap: pretty;
  opacity: 0; transform: translateY(8px);
  animation: paraIn 800ms cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(120ms * var(--i, 0) + 200ms);
}
@keyframes paraIn { to { opacity: 1; transform: translateY(0); } }

.page-folio {
  display: flex; gap: 10px; justify-content: center;
  font-size: 9px; letter-spacing: .35em; text-transform: uppercase;
  color: var(--bone-faint);
  padding-top: 12px; border-top: 1px solid rgba(232,227,216,.06);
}

.aside-artifacts { display: flex; flex-direction: column; gap: 10px; }
.artifact {
  background: transparent; border: 1px dashed rgba(232,227,216,.12);
  padding: 14px 12px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.artifact:hover {
  border-color: var(--red-dim); border-style: solid;
  background: rgba(220,30,40,.04);
}
.artifact-kind { font-size: 9px; letter-spacing: .3em; color: var(--red-dim); text-transform: uppercase; }
.artifact-label { font-size: 14px; color: var(--bone); letter-spacing: .04em; }
.artifact-hint { font-size: 10px; color: var(--bone-faint); font-style: italic; line-height: 1.5; }

.chapter-foot {
  position: sticky; bottom: 0; z-index: 4;
  background: linear-gradient(to top, rgba(10,8,7,.95) 0%, rgba(10,8,7,.85) 70%, transparent 100%);
  backdrop-filter: blur(6px);
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0 12px;
  border-top: 1px solid rgba(232,227,216,.05);
}
.pager {
  background: transparent; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-dim);
  padding: 8px 0;
  transition: color var(--t-fast);
}
.pager:hover:not(:disabled) { color: var(--red); }
.pager:disabled { opacity: .25; cursor: default; }
.pager-track { display: flex; gap: 8px; }
.pager-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(232,227,216,.15); transition: background var(--t-fast); }
.pager-dot.is-on { background: var(--red); box-shadow: 0 0 8px var(--red-faint); }

/* ────────────────────────────────────────────────────────────────────────── */
/* POEM */
/* ────────────────────────────────────────────────────────────────────────── */

.poem {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, #14100c 0%, #08060400 70%),
    #050402;
  display: flex; flex-direction: column;
  padding: 28px 32px;
  overflow: auto;
}
.poem-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-faint);
}
.poem-meta { display: flex; gap: 14px; }
.poem-meta .dot { color: var(--red-dim); }

.poem-body {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center; margin-top: 32px;
  width: min(1400px, 96%); align-self: center;
}

.poem-figure { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.poem-image {
  position: relative; aspect-ratio: 3/4; max-height: 70vh;
  background: linear-gradient(135deg, #1a0a0a 0%, #0a0605 50%, #050302 100%);
  border: 1px solid rgba(232,227,216,.1);
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.5),
    0 30px 60px rgba(0,0,0,.6),
    0 0 0 8px rgba(20,16,12,.4);
}
.poem.is-revealed .poem-image { opacity: 1; }
.poem-image-grain {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,
      transparent 0, transparent 2px,
      rgba(232,227,216,.025) 2px, rgba(232,227,216,.025) 3px),
    repeating-linear-gradient(90deg,
      transparent 0, transparent 4px,
      rgba(232,227,216,.015) 4px, rgba(232,227,216,.015) 5px);
}
.poem-image-bleed {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 55% 60%, var(--red-faint), transparent 50%);
  mix-blend-mode: screen;
}
/* Per-poem visual cues — subtle compositional differences */
.poem-image[data-poem="identity"] {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(180,140,130,.12) 0%, transparent 50%),
    linear-gradient(to bottom, #1a1410 0%, #0a0807 60%, #050402 100%);
}
.poem-image[data-poem="identity"] .poem-image-bleed {
  background:
    radial-gradient(circle at 35% 65%, oklch(0.55 0.18 25 / .35) 0%, transparent 25%),
    radial-gradient(ellipse at 30% 65%, rgba(232,227,216,.08), transparent 40%);
}
.poem-image[data-poem="tick"] {
  background:
    radial-gradient(circle at 50% 50%, rgba(180,140,130,.06) 0%, #0a0807 50%, #050402 100%);
}
.poem-image[data-poem="tick"] .poem-image-bleed {
  background:
    conic-gradient(from -90deg at 50% 50%,
      var(--red-faint) 0deg, transparent 30deg, transparent 30deg,
      var(--red-faint) 60deg, transparent 90deg, transparent 90deg,
      var(--red-faint) 120deg, transparent 150deg, transparent 150deg,
      var(--red-faint) 180deg, transparent 210deg, transparent 210deg,
      var(--red-faint) 240deg, transparent 270deg, transparent 270deg,
      var(--red-faint) 300deg, transparent 330deg, var(--red-faint) 360deg);
  opacity: .6;
}
.poem-image-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0,0,0,.85) 100%);
  pointer-events: none;
}

.poem-figcaption {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 10px; letter-spacing: .04em;
  color: var(--bone-faint);
}
.poem-figcaption-mark { color: var(--red-dim); letter-spacing: .3em; text-transform: uppercase; }
.poem-figcaption-cue { font-style: italic; line-height: 1.6; }

.poem-text {
  display: flex; flex-direction: column; gap: 18px;
}
.poem-eyebrow { font-size: 10px; letter-spacing: .4em; color: var(--red-dim); text-transform: uppercase; font-style: italic; }
.poem-title { margin: 0; font-weight: 500; font-size: clamp(36px, 4.5vw, 54px); letter-spacing: .04em; line-height: 1.0; }
.poem-rule { width: 80px; height: 1px; background: var(--red); }
.poem-lines { display: flex; flex-direction: column; }
.poem-line {
  margin: 0; font-size: 15px; line-height: 1.85;
  color: var(--bone); letter-spacing: .01em;
  opacity: 0; transform: translateY(6px);
  animation: lineIn 800ms cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(70ms * var(--i, 0) + 700ms);
}
.poem.is-revealed .poem-line { animation-play-state: running; }
@keyframes lineIn { to { opacity: 1; transform: translateY(0); } }
.poem-line.is-blank { height: 12px; }
.poem-foot { font-size: 9px; color: var(--bone-faint); font-style: italic; line-height: 1.6; max-width: 60ch; }

/* ────────────────────────────────────────────────────────────────────────── */
/* AUDIO TOGGLE — global */
/* ────────────────────────────────────────────────────────────────────────── */
.audio-toggle {
  position: fixed; top: 24px; right: 32px; z-index: 50;
  background: transparent; border: 1px solid var(--bone-faint); padding: 8px 14px;
  font-family: inherit; font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-dim); cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.audio-toggle:hover { color: var(--red); border-color: var(--red-dim); }
.audio-toggle .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bone-faint); transition: background var(--t-fast); }
.audio-toggle[data-on="1"] .dot { background: var(--red); box-shadow: 0 0 8px var(--red); animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* Mobile fallback — single column, simpler layout */
@media (max-width: 720px) {
  .chapter-body { grid-template-columns: 1fr; gap: 18px; }
  .chapter-aside { text-align: left; }
  .chapter-page { padding: 32px 24px; }
  .poem-body { grid-template-columns: 1fr; gap: 32px; }
  .poem-image { max-height: 50vh; }
  .door { width: 80px; height: 180px; }
  .cover-title { font-size: clamp(28px, 12vw, 56px); }
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* MOBILE SITE — separate presentational layout for touch viewports.           */
/* ────────────────────────────────────────────────────────────────────────── */

.mobile {
  position: relative; min-height: 100vh; width: 100%;
  background: #050402; color: var(--bone);
  font-family: var(--font); font-weight: 300;
  overflow-x: hidden;
}
/* Override the desktop body/root lock — mobile must scroll. */
html:has(.mobile), body:has(.mobile) {
  overflow: auto; cursor: auto; height: auto; min-height: 100%;
}
#root:has(.mobile) {
  width: 100%; height: auto; min-height: 100vh;
  position: static; overflow: visible;
}
.mobile ~ .cursor-wisp,
.mobile ~ .lantern-canvas { display: none; }

.m-hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  overflow: hidden;
}
.m-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
}
.m-hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 90%),
    linear-gradient(to bottom, rgba(5,4,2,.4), rgba(5,4,2,.95));
}
.m-hero-inner {
  position: relative; z-index: 2;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}

.m-eyebrow {
  font-size: 10px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--red-dim);
}
.m-section-mark {
  font-size: 10px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--red-dim); margin-bottom: 18px;
}
.m-title {
  margin: 0; padding: 0; color: #fff;
  font-weight: 700; font-size: clamp(40px, 13vw, 68px);
  line-height: .98; letter-spacing: .04em;
  display: flex; flex-direction: column; gap: 4px;
  text-shadow: 0 2px 14px rgba(0,0,0,.9), 0 0 32px rgba(0,0,0,.7);
}
.m-title-mid {
  color: #fff; opacity: .85;
  font-style: italic; font-weight: 400;
  font-size: .55em; letter-spacing: .35em;
}
.m-byline {
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-soft);
}

.m-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 26px; text-decoration: none;
  font-family: inherit; font-size: 11px;
  letter-spacing: .35em; text-transform: uppercase;
  color: var(--bone);
  border: 1px solid var(--red-dim);
  background: rgba(220,30,40,.08);
  transition: background .2s ease, border-color .2s ease, letter-spacing .2s ease;
}
.m-btn:active { background: rgba(220,30,40,.22); border-color: var(--red); }
.m-btn-primary { box-shadow: 0 0 24px rgba(220,30,40,.25); }
.m-arrow { color: var(--red); font-size: 14px; }

.m-section {
  padding: 56px 24px; max-width: 640px; margin: 0 auto;
  border-top: 1px solid var(--red-faint);
}
.m-section p {
  font-size: 14px; line-height: 1.75; color: var(--bone-soft);
  margin: 0 0 16px 0;
}
.m-section p:last-child { margin-bottom: 0; }
.m-section em {
  color: var(--bone); font-style: italic;
}

.m-days { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.m-day {
  padding: 20px 18px;
  border: 1px solid var(--red-faint);
  background: rgba(220,30,40,.04);
}
.m-day-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}
.m-day-num {
  font-size: 11px; letter-spacing: .25em; color: var(--red);
  font-variant-numeric: tabular-nums;
}
.m-day-name {
  font-size: 16px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--bone);
}
.m-day-part {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-faint);
}
.m-day-teaser {
  font-size: 13px; line-height: 1.7; color: var(--bone-soft);
  font-style: italic; margin: 0;
}

.m-foot {
  padding: 56px 24px 64px; text-align: center;
  border-top: 1px solid var(--red-faint);
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.m-foot-credit {
  font-size: 12px; letter-spacing: .2em; line-height: 2;
  color: var(--bone-soft);
}
.m-foot-credit em {
  font-style: italic; color: var(--red); letter-spacing: .25em;
}

/* Hide the desktop tweaks panel & audio toggle on mobile (they live in the
   DesktopApp tree, but if anything sneaks through we kill it). */
.mobile + .tweaks-panel,
.mobile + .audio-toggle { display: none; }

/* Mobile reader (day chapter sample + poem) ────────────────────────────────── */
.mobile--reader { padding-bottom: 32px; }

.m-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(5,4,2,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--red-faint);
}
.m-back {
  background: transparent; border: 0; padding: 8px 0;
  font-family: inherit; font-size: 11px;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--bone); display: inline-flex; align-items: center; gap: 6px;
}
.m-back-arrow { color: var(--red); font-size: 14px; }
.m-topbar-meta {
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-faint); text-align: right; max-width: 60%;
}

.m-article {
  padding: 28px 22px 56px;
  max-width: 640px; margin: 0 auto;
}
.m-article-title {
  margin: 12px 0 10px; font-size: 22px; font-weight: 700;
  letter-spacing: .04em; line-height: 1.25; color: var(--bone);
}
.m-article-subtitle {
  margin: 0 0 18px; font-size: 13px; line-height: 1.6;
  color: var(--bone-soft); font-style: italic;
}
.m-article-rule {
  height: 1px; width: 100%; margin: 22px 0;
  background: linear-gradient(to right, transparent, var(--red-dim) 30%, var(--red-dim) 70%, transparent);
}
.m-article-para {
  margin: 0 0 16px; font-size: 15px; line-height: 1.75;
  color: var(--bone-soft);
}

/* Day list cards as buttons */
.m-day-btn {
  display: block; width: 100%; text-align: left;
  background: rgba(220,30,40,.04);
  border: 1px solid var(--red-faint); padding: 18px 16px;
  font-family: inherit; color: inherit;
  transition: background .2s ease, border-color .2s ease;
}
.m-day-btn:active { background: rgba(220,30,40,.14); border-color: var(--red); }
.m-day-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--red);
}
.m-section-hint {
  font-size: 11px; letter-spacing: .12em;
  color: var(--bone-faint); font-style: italic;
  margin: -8px 0 18px;
}

/* Poem cards */
.m-poems { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.m-poem-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px;
  background: rgba(220,30,40,.04);
  border: 1px solid var(--red-faint);
  font-family: inherit; color: inherit; text-align: left;
}
.m-poem-card:active { background: rgba(220,30,40,.14); border-color: var(--red); }
.m-poem-thumb {
  width: 64px; height: 80px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--red-faint);
  filter: brightness(.92) contrast(1.05);
}
.m-poem-meta {
  flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.m-poem-kind {
  font-size: 9px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--red);
}
.m-poem-title {
  font-size: 15px; font-weight: 500; color: var(--bone);
  letter-spacing: .04em;
}
.m-poem-part {
  font-size: 11px; color: var(--bone-faint);
  font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Poem reader */
.m-poem-image {
  position: relative; width: 100%; aspect-ratio: 3/4;
  margin: 4px 0 18px;
  overflow: hidden; border: 1px solid var(--red-faint);
  background: #0a0807;
}
.m-poem-image img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; filter: brightness(.95) contrast(1.05);
}
.m-poem-lines {
  display: flex; flex-direction: column; gap: 4px;
}
.m-poem-line {
  margin: 0; font-size: 16px; line-height: 1.65;
  color: var(--bone); font-weight: 300;
}
.m-poem-line.is-blank { height: 12px; }

/* End-of-sample CTA block inside reader views */
.m-cta-block {
  margin-top: 32px; padding: 24px 18px;
  border: 1px solid var(--red-dim);
  background: rgba(220,30,40,.06);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.m-cta-block p {
  margin: 0; font-size: 14px; line-height: 1.6; color: var(--bone-soft);
}
