/* ═══════════════════════════════════════════════════════════
   Fable and Mythos — The Interrupted Chain
   signal.haawke.com v2 / mythos-fable.haawke.com
   Haawke Neural Technology · June 2026
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --gold: #c9a84c;
  --gold-dim: #8b6914;
  --dark: #0a0a0a;
  --page-cream: #f2ead8;
  --page-shadow: #d8c9a8;
  --text-dark: #1a1208;
  --text-mid: #3d2f10;
  --spine-width: 32px;
  --book-h: min(88vh, 900px);
  --book-w: min(90vw, calc(var(--book-h) * 1.548));
  --page-w: calc((var(--book-w) - var(--spine-width)) / 2);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Global Background Scene ────────────────────── */

#bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.bg-video.active {
  opacity: 1;
}

#bgSketchfab {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

#bgSketchfab.active {
  opacity: 1;
  pointer-events: auto;
}

#bgSketchfab iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

/* You're Next — crossfade bg image, full viewport */

.bg-younext-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
  filter: brightness(1.22) contrast(1.18) saturate(1.08);
}

.bg-younext-img.active {
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  pointer-events: none;
  transition: background 0.4s ease;
}

/* You're Next is its own full-bleed image, not a dim backdrop behind the
   book — the standard dimming overlay crushes it, so cut it way back. */
#bg-scene.younext-active .bg-overlay {
  background: rgba(0, 0, 0, 0.1);
}

/* ── Scene ─────────────────────────────────────── */

.scene {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: transparent;
}

/* ── Intro Scene — Landing Page ──────────────────── */

#introScene {
  --landing-bg: #0a0c10;
  --landing-grid: rgba(120,140,170,0.08);
  --landing-white: #f4f1ea;
  --landing-navy: #4338ca;
  --landing-orange: #f5a623;
  --landing-text-dim: rgba(244,241,234,0.55);
  --landing-text-dimmer: rgba(244,241,234,0.32);

  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background-color: var(--landing-bg);
  background-image:
    linear-gradient(var(--landing-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--landing-grid) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  color: var(--landing-white);
  font-family: 'Courier Prime', monospace;
  transition: opacity 0.8s ease;
}

#introScene.hidden {
  opacity: 0;
  pointer-events: none;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px clamp(20px,5vw,56px);
  background: rgba(10,12,16,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244,241,234,0.1);
}

.landing-mark {
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--landing-white);
}
.landing-mark span { color: var(--landing-orange); }

.landing-mark-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.landing-mark-link:hover { color: var(--landing-orange); }

/* ── Hamburger ──────────────────────────────────── */
.landing-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.landing-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--landing-white);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.landing-nav.nav-open .landing-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.landing-nav.nav-open .landing-hamburger span:nth-child(2) { opacity: 0; }
.landing-nav.nav-open .landing-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.landing-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px,2vw,28px);
  list-style: none;
}
.landing-nav-links a {
  color: rgba(244,241,234,0.88);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.landing-nav-links a:hover,
.landing-nav-links a:focus-visible { color: var(--landing-orange); }

.landing-hero {
  height: calc(100vh - 73px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px,3vw,48px);
  padding: clamp(16px,3vw,40px) clamp(20px,6vw,80px);
  position: relative;
  overflow: hidden;
}

.landing-hero-text {
  flex: 1 1 50%;
  min-width: 0;
  position: relative;
  padding: clamp(20px,2.5vw,32px);
  border-radius: 4px;
  isolation: isolate;
}

.landing-hero-text::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-image: url('./assets/watermarked_img_14900443736957487345.jpg');
  background-size: cover;
  background-position: center 65%;
  background-repeat: no-repeat;
  filter: brightness(0.5) saturate(1.05);
}

.landing-hero-text > * {
  position: relative;
  z-index: 1;
}

.landing-hero-text .landing-h1 {
  color: #fffdf8;
}

.landing-hero-text .landing-lede {
  color: rgba(244,241,234,0.88);
}

.landing-hero-text .landing-eyebrow,
.landing-hero-text .landing-h1,
.landing-hero-text .landing-lede,
.landing-hero-text .landing-proof-num,
.landing-hero-text .landing-proof-label {
  text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
}

.landing-hero-image {
  flex: 1 1 38%;
  min-width: 0;
  height: calc(100vh - 73px - clamp(64px,10vw,128px));
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-book-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(244,241,234,0.1);
  border-radius: 2px;
}

/* ── Tablet (≤ 900px) ───────────────────────────── */
@media (max-width: 900px) {
  .landing-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px clamp(16px,4vw,48px);
  }
  .landing-hero-image { height: 30vh; max-height: none; width: 100%; }
  .landing-h1 { font-size: clamp(32px,6vw,64px); }
}

.landing-eyebrow {
  font-size: clamp(10px,1.1vw,12px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--landing-orange);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-eyebrow::before { display: none; }

.landing-h1 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(40px, 7.2vw, 96px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  max-width: 16ch;
}

.landing-h1 .landing-navy { color: var(--landing-navy); text-shadow: 0 0 30px rgba(67,56,202,0.5); }
.landing-h1 .landing-orange { color: var(--landing-orange); text-shadow: 0 0 30px rgba(245,166,35,0.45); }

.landing-lede {
  margin-top: 12px;
  max-width: 62ch;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(13px,1.3vw,15px);
  line-height: 1.6;
  color: var(--landing-text-dim);
}

.landing-lede strong {
  color: var(--landing-white);
  font-style: normal;
  font-weight: 700;
}

.landing-proof-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px,3vw,40px);
}
.landing-proof-item {
  border-left: 2px solid rgba(245,166,35,0.4);
  padding-left: 16px;
}
.landing-proof-num {
  font-family: 'Anton', sans-serif;
  font-size: clamp(22px,2.4vw,30px);
  color: var(--landing-white);
  text-transform: uppercase;
}
.landing-proof-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.7);
  margin-top: 4px;
}

.landing-proof-links {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.landing-proof-link {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,166,35,0.35);
  transition: border-color 0.2s, color 0.2s;
}
.landing-proof-link:hover { color: #fff; border-color: #fff; }

.landing-cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.landing-spark {
  position: absolute;
  bottom: clamp(24px,5vw,56px);
  right: clamp(24px,5vw,56px);
  color: rgba(244,241,234,0.25);
  font-size: 22px;
}

.landing-footer {
  display: none;
}

/* ── Mobile (≤ 640px): hamburger nav + compressed hero ── */
@media (max-width: 640px) {
  /* Nav: show hamburger, hide links by default */
  .landing-nav {
    flex-wrap: nowrap;
    padding: 14px 20px;
    position: relative;
  }
  .landing-hamburger { display: flex; }
  .landing-nav-links {
    display: none;
    position: fixed;
    top: 54px;
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(10,12,16,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(244,241,234,0.12);
    padding: 20px 24px;
    gap: 18px;
    z-index: 200;
    list-style: none;
  }
  .landing-nav.nav-open .landing-nav-links { display: flex; }
  .landing-nav-links a { font-size: 16px; }

  /* Hero: single column, hide book image, clamp lede */
  .landing-hero {
    flex-direction: column;
    align-items: flex-start;
    height: calc(100dvh - 54px);
    padding: 16px 20px 20px;
    gap: 0;
    overflow: hidden;
  }
  .landing-hero-image { display: none; }
  .landing-h1 { font-size: clamp(30px,9vw,48px); }
  .landing-lede {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .landing-proof-row { margin-top: 12px; gap: 16px; }
  .landing-proof-num { font-size: 18px; }
  .landing-cta-row { margin-top: 14px; gap: 10px; }
  .intro-btn { font-size: 11px; padding: 10px 16px; }
}

.intro-btn {
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--landing-orange);
  background: rgba(244,241,234,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(245,166,35,0.45);
  border-radius: 3px;
  padding: 14px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  pointer-events: auto;
}

.intro-btn:hover {
  background: rgba(245,166,35,0.12);
  border-color: var(--landing-orange);
  box-shadow: 0 0 30px rgba(245,166,35,0.2);
  color: #ffc868;
}

.intro-btn.secondary {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--landing-orange);
  background: rgba(244,241,234,0.03);
  border-color: rgba(245,166,35,0.35);
  padding: 12px 28px;
}

.intro-btn.secondary:hover {
  color: var(--landing-white);
  border-color: rgba(244,241,234,0.4);
  background: rgba(244,241,234,0.07);
  box-shadow: none;
}

/* ── Outro Scene — Three.js closing experience ────── */

#outroScene {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
  transition: opacity 0.8s ease;
}

#outroScene.hidden {
  opacity: 0;
  pointer-events: none;
}

#outroIframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

#outroButtons {
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 11;
  pointer-events: none;
}

/* ── Book (open) ────────────────────────────────── */

.book {
  width: var(--book-w);
  height: var(--book-h);
  position: relative;
  display: none;
  overflow: hidden;
  perspective: 3000px;
  box-shadow:
    -12px 0 40px rgba(0,0,0,0.9),
    12px 12px 80px rgba(0,0,0,0.95),
    0 0 0 1px rgba(201,168,76,0.10),
    0 0 120px rgba(0,0,0,0.6);
  border-radius: 2px 6px 6px 2px;
  transition: box-shadow 0.3s ease;
}

.book.open {
  display: block;
}

/* Cinematic spreads (You're Next, Signal) blend into the full-viewport
   background — the book's own frame shadow would otherwise draw a hard
   rectangle over the immersive bg. The nav bar is a fixed overlay now
   (not in normal flow), so the book is free to fill the whole viewport. */
.book.cinematic {
  width: 100vw;
  height: 100vh;
  box-shadow: none;
  border-radius: 0;
  transition: box-shadow 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* ── Spread / Pages ─────────────────────────────── */

.spread {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: row;
  transition: opacity 0.15s ease;
}

.spread.active {
  display: flex;
  opacity: 1;
  transform: perspective(1200px) rotateY(0deg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.page {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: rgba(242, 234, 216, 0.88);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.page-left {
  border-right: 1px solid rgba(201, 168, 76, 0.18);
  box-shadow: inset -4px 0 16px rgba(0,0,0,0.12);
}

.page-right {
  box-shadow: inset 4px 0 16px rgba(0,0,0,0.08);
}

/* ── Page Content Containers ────────────────────── */

.page-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-content.prose {
  padding: 44px 48px;
  overflow-y: auto;
  scrollbar-width: none;
}
.page-content.prose::-webkit-scrollbar { display: none; }

.page-content.liner {
  padding: 36px 44px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.page-content.liner::-webkit-scrollbar { display: none; }

.page-content.full-bleed {
  padding: 0;
  position: relative;
}

.page-content.full-bleed-padded {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.full-bleed-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0a0a0a;
}

.full-bleed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.bleed-caption {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  padding: 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
}

/* ── Gold Rule ──────────────────────────────────── */

.gold-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* ── Typography ─────────────────────────────────── */

.section-label {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.body-text p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.body-text p.drop-cap::first-letter {
  font-size: 3.2em;
  font-weight: 300;
  float: left;
  line-height: 0.75;
  margin-right: 6px;
  margin-top: 4px;
  color: var(--gold-dim);
}

.signature {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(201,168,76,0.2);
}

.sig-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
}

.sig-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 36px;
  color: var(--gold);
  line-height: 1.1;
  display: inline-block;
  margin-right: 4px;
}

.sig-org {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  color: var(--text-mid);
  vertical-align: middle;
}

.sig-role, .sig-date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold-dim);
}

/* ── TOC left page: Haawke logo full-bleed background ── */

.toc-bg-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* TOC left page — no parchment, logo shows through */
.spread[data-spread="1"] .page-left {
  background: #0a0a0f;
}

/* TOC left page content — vertically and horizontally centered */
.page-content.toc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 48px 140px;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.28) 50%, rgba(0,0,0,0.5) 100%);
}

/* Contents heading centered on the logo page */
.page-content.toc .section-label {
  text-align: center;
  font-size: 80px;
  letter-spacing: 0.1em;
  color: rgba(201, 168, 76, 0.9);
  margin-bottom: 6px;
  line-height: 1;
}

.page-content.toc .gold-rule {
  width: 100%;
  max-width: 520px;
}

/* ── TOC ────────────────────────────────────────── */

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 520px;
}

.toc-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 2px;
  transition: background 0.2s;
}

.toc-entry:hover {
  background: rgba(201,168,76,0.15);
}

.toc-entry.active .toc-title {
  color: var(--gold);
}

.toc-num {
  font-family: 'Courier Prime', monospace;
  font-size: 19px;
  color: rgba(201, 168, 76, 0.9);
  min-width: 34px;
}

.toc-title {
  flex: 1;
  font-style: normal;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.toc-pg {
  font-family: 'Courier Prime', monospace;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.toc-divider {
  height: 1px;
  background: rgba(201,168,76,0.25);
  margin: 6px 0;
  width: 100%;
  max-width: 520px;
}

.toc-colophon {
  padding-top: 10px;
  border-top: 1px solid rgba(201,168,76,0.3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Links on logo/dark background */
.page-content.toc a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.page-content.toc a:visited { color: rgba(255, 255, 255, 0.7); }
.page-content.toc a:hover  { color: #fff; text-decoration: underline; }

.toc-copy {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 2px;
  letter-spacing: 0.04em;
}

.toc-prov-line {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  letter-spacing: 0.03em;
}

.toc-hash-link {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  word-break: break-all;
  font-size: 8px;
  letter-spacing: 0.02em;
}

.toc-hash-link:hover { color: #fff; text-decoration: underline; }

.toc-orcid-link {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}

.toc-orcid-link:hover { color: #fff; text-decoration: underline; }

.toc-pub-mark {
  font-family: 'Courier Prime', monospace;
  font-size: 8px;
  color: rgba(201, 168, 76, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}


/* ── Frontispiece ───────────────────────────────── */

.page-content.toc-right {
  justify-content: center;
  gap: 20px;
  padding-bottom: 80px;
}

/* Colophon on right page — dark text on parchment, +5px from original sizes */
.toc-right .toc-colophon {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(201,168,76,0.3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: center;
}

.toc-right .toc-copy {
  font-family: 'Courier Prime', monospace;
  font-size: 15px;
  color: #3a2e18;
  margin: 0 0 2px;
  letter-spacing: 0.04em;
}

.toc-right .toc-prov-line {
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  color: #5a4a2a;
  margin: 0;
  letter-spacing: 0.03em;
}

.toc-right .toc-hash-link {
  color: #5a4a2a;
  text-decoration: none;
  word-break: break-all;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.toc-right .toc-hash-link:hover { color: #2a1e08; text-decoration: underline; }

.toc-right .toc-orcid-link {
  color: #5a4a2a;
  text-decoration: none;
  font-size: 14px;
}

.toc-right .toc-orcid-link:hover { color: #2a1e08; text-decoration: underline; }

.toc-right .toc-pub-mark {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.toc-right-art {
  width: calc(100% - 50px);
  max-height: 42vh;
  margin: 20px 25px 0;
  object-fit: contain;
  object-position: top center;
  border-radius: 4px;
}

.frontispiece-img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.frontispiece-caption {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fp-name {
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-dark);
}

.fp-sub {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
}

/* ── Liner Notes ────────────────────────────────── */

.chapter-num {
  font-family: 'Courier Prime', monospace;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: #6b4e10;
  text-transform: uppercase;
}

.track-title {
  font-size: 26px;
  font-weight: 300;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 4px;
}

.liner-note {
  font-size: 15px;
  line-height: 1.8;
  color: #1a1208;
  flex: 1;
}

.liner-coda {
  margin-top: 4px;
  color: #4a3200;
  font-style: italic;
  font-size: 15px;
}

.pete-spread .chapter-num,
.pete-spread .track-title,
.pete-spread .liner-note,
.pete-spread .liner-coda {
  font-weight: 700;
}

.pete-spread .track-title {
  font-size: clamp(32px, 3.6vw, 44px);
}

.pete-spread .pete-lede {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.pete-spread .liner-coda {
  font-style: normal;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.4;
  margin-top: 10px;
}

/* ── Play Area ──────────────────────────────────── */

.play-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}

.play-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #3a3a3a;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.play-btn:hover {
  background: #555;
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.play-btn.playing {
  background: #4a4a4a;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.play-icon {
  font-size: 10px;
}

.track-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s linear;
  box-shadow: 0 0 6px rgba(201,168,76,0.4);
}

.time-display {
  font-family: "Google Sans Flex", sans-serif;
  font-optical-sizing: auto;
  font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  min-width: 32px;
  text-align: right;
}

/* ── Coins Spread (Mythos-Fable) ────────────────── */

.coins-spread {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  background: #0d0a05;
  position: relative;
  overflow: hidden;
}

.coins-pair {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 2;
}

.coin-half {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.coin-spread-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  box-shadow: 0 0 30px rgba(201,168,76,0.2);
}

.coin-spread-label {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.coin-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 16px;
  align-self: center;
}

.coin-spread-sub {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #4a3820;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}


/* ── Manifesto ──────────────────────────────────── */

.page-content.prose.manifesto {
  padding: 26px 48px 20px;
}

.manifesto .gold-rule {
  margin-bottom: 8px;
}

.manifesto .section-label {
  margin-bottom: 4px;
}

.manifesto-sub {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.4;
}

.manifesto-head {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin: 10px 0 3px;
}

.manifesto p {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.pull-quote {
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  padding: 8px 0;
  border-top: 1px solid rgba(201,168,76,0.2);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  margin: 8px 0;
}

.pull-quote-sig {
  display: block;
  margin-top: 4px;
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-mid);
}

/* ── Call to Action ─────────────────────────────── */

.cta-head {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin: 20px 0 8px;
}

.cta-desc {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.paper-link {
  display: inline-block;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.paper-link:hover { border-color: var(--gold); }
.paper-link.large { font-size: 15px; margin: 20px 0; }

.congress-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.congress-link {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dark);
  text-decoration: none;
  transition: text-decoration 0.2s;
}
.congress-link:hover { text-decoration: underline; }

.charity-link {
  display: block;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  text-decoration: none;
  margin: 8px 0;
  line-height: 1.5;
}
.charity-link:hover { text-decoration: underline; }

.charity-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.05em;
}

.v1-link {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(201,168,76,0.15);
}

.v1-link a {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.v1-link a:hover { text-decoration: underline; }

.v1-desc {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  font-style: italic;
}

/* ── Chain Page ─────────────────────────────────── */

.chain-doi {
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.chain-page p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.chain-credits {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(201,168,76,0.15);
}

.chain-credits p {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dark);
  margin-bottom: 4px !important;
}

/* ── Back Cover ─────────────────────────────────── */

.back-cover-spread .page {
  background: #0a0a0a;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.back-cover-content {
  position: relative;
}

.back-cover-img {
  object-fit: cover;
  filter: brightness(0.35) sepia(0.3);
}

.back-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#backCoinCanvas {
  border-radius: 50%;
}

.back-cover-text {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-align: center;
  line-height: 2;
  text-transform: uppercase;
}

/* ── Navigation Bar ─────────────────────────────── */

.nav-bar {
  display: none;
  position: absolute;
  inset: auto 0 28px 0;
  align-items: center;
  z-index: 20;
  pointer-events: none;
}

.nav-bar.visible {
  display: flex;
  justify-content: space-between;
  padding: 0 36px;
}

.nav-btn {
  pointer-events: auto;
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 32px;
  color: var(--gold);
  background: rgba(10, 8, 3, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(201, 168, 76, 0.55);
  border-radius: 50%;
  width: 76px;
  height: 76px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-btn:hover {
  border-color: var(--gold);
  color: #ffe9a8;
  background: rgba(201, 168, 76, 0.2);
  box-shadow: 0 8px 28px rgba(0,0,0,0.6), 0 0 26px rgba(201,168,76,0.3);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.page-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  min-width: 80px;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* ── Hidden Track Overlay ───────────────────────── */

.hidden-track-overlay {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,8,3,0.95);
  border: 1px solid var(--gold-dim);
  padding: 16px 32px;
  text-align: center;
  z-index: 100;
}

.hidden-track-label {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: 6px;
}

.hidden-track-title {
  font-size: 16px;
  font-style: italic;
  color: var(--gold);
}

.hidden-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--gold-dim);
  cursor: pointer;
  font-size: 12px;
}

/* ── Page Turn Animation ────────────────────────── */

.spread.turning-out {
  opacity: 0;
  transform: perspective(1200px) rotateY(-8deg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.spread.turning-in {
  opacity: 0;
  transform: perspective(1200px) rotateY(8deg);
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 1000px) {
  /* --book-w/h handled by min() in :root; just shrink cover coins */
  .coin-emboss {
    width: 100px;
    height: 100px;
  }

  .cover-left, .cover-right {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --book-w: 100vw;
    --book-h: 100vh;
    --spine-width: 0px;
  }

  html, body {
    overflow: auto;
  }

  .scene {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    padding: 20px 0 60px;
  }

  .book-cover {
    border-radius: 4px;
  }

  .cover-spine {
    display: none;
  }

  .book.open {
    display: block;
  }

  /* Mobile: single page view */
  .spread {
    flex-direction: column;
    height: auto;
  }

  .page {
    height: 50vh;
  }

  .page-left {
    border-right: none;
    border-bottom: 1px solid var(--page-shadow);
  }

  .track-title { font-size: 20px; }
}

/* ── Utility ────────────────────────────────────── */

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes coinSpin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* ── The Chain — Point Cloud Spread ────────────────────── */
/* .chain-spread needs no position override — base .spread already gives
   position:absolute;inset:0, which is required for it to have a definite
   height. Overriding to relative collapses it to 0 height since all its
   children are position:absolute and removed from flow. */

.chain-pointcloud-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  height: 100%;
  z-index: 0;
}

.chain-pointcloud-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chain-pc-page {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.chain-text-card {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  z-index: 2;
  width: min(320px, 23%);
  border-radius: 14px;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(8, 10, 22, 0.7);
  border: 1px solid rgba(0, 180, 255, 0.4);
  overflow: hidden;
}

.chain-text-inner {
  padding: 24px 22px;
}

.chain-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.chain-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(0, 180, 255, 0.3);
}

.chain-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(0, 180, 255, 0.5), transparent);
  margin: 14px 0;
}

.chain-liner {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 300;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 12px;
}
.chain-liner:last-of-type { margin-bottom: 0; }

.chain-play-area {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(0, 180, 255, 0.28) !important;
}

.chain-play-area .play-btn {
  background: rgba(0, 180, 255, 0.12) !important;
  border-color: rgba(0, 180, 255, 0.4) !important;
  color: #00d4ff !important;
}

.chain-play-area .play-btn:hover,
.chain-play-area .play-btn.playing {
  background: rgba(0, 180, 255, 0.22) !important;
  border-color: #00b4ff !important;
}

.chain-play-area .play-label,
.chain-play-area .play-icon {
  color: #00d4ff !important;
}

.chain-play-area .progress-fill {
  background: linear-gradient(to right, rgba(0,180,255,0.5), #00d4ff) !important;
}

.chain-play-area .time-display {
  color: rgba(0, 212, 255, 0.82) !important;
}

@media (max-width: 900px) {
  .chain-pointcloud-wrap { width: 100%; }
  .chain-text-card { position: static; transform: none; width: 92%; margin: 16px auto; }
}

/* ── Don't Make Me Pull The Trigger Spread ─────────────── */

/* LEFT: dark page carrying just the chapter numeral + big title */
.dmt-page {
  background: linear-gradient(160deg, #0c1018, #05070c) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

/* BOTTOM: full-width glassmorphic bar with player + liner notes */
.dmt-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(6, 10, 24, 0.78);
  border-top: 1px solid rgba(0, 180, 255, 0.38);
  box-shadow:
    0 -8px 30px rgba(0, 180, 255, 0.16),
    inset 0 1px 0 rgba(0, 212, 255, 0.10);
}

.dmt-bottom-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 20px 150px;
}

.dmt-bottom-liner {
  flex: 1;
  min-width: 0;
  max-height: 190px;
  overflow-y: auto;
  scrollbar-width: none;
}
.dmt-bottom-liner::-webkit-scrollbar { display: none; }

.dmt-bottom-play {
  flex-shrink: 0;
  margin-top: 0 !important;
  min-width: 260px;
}

.dmt-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
}

.dmt-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.97);
  line-height: 1.15;
  text-shadow: 0 0 30px rgba(0, 180, 255, 0.25);
}

.dmt-play-area {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.dmt-play-area .play-btn {
  background: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.dmt-play-area .play-label,
.dmt-play-area .play-icon {
  color: rgba(255, 255, 255, 0.9) !important;
}

.dmt-play-area .time-display {
  color: rgba(255, 255, 255, 0.72) !important;
}

.dmt-card-label {
  font-family: "Google Sans Flex", sans-serif;
  font-optical-sizing: auto;
  font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 0;
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00b4ff;
  margin-bottom: 10px;
}

.dmt-liner {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 1.55vw, 19px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .dmt-bottom-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 20px;
    max-height: 70vh;
    overflow-y: auto;
  }

  .dmt-bottom-play {
    min-width: 0;
  }

  .dmt-bottom-liner {
    max-height: none;
    overflow-y: visible;
  }
}

/* ── You Can't Kill The Signal — Full-Page Video Spread ── */

.signal-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.signal-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,0.18) 100%);
}

/* ── Friendly Town: full-bleed cover + glassmorphic bottom card ── */
/* ── O, Canada spread ──────────────────────────────── */

.ocanada-spread { overflow: hidden; }

.ocanada-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #0a0a0a;
  z-index: 0;
  transition: opacity 0.8s ease;
}

.ocanada-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.ocanada-spread.video-active .ocanada-video  { opacity: 1; }
.ocanada-spread.video-active .ocanada-cover-img { opacity: 0; }

.ocanada-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 140px 20px;
  backdrop-filter: blur(24px) saturate(1.5);
  background: rgba(4, 8, 20, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ocanada-title-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ocanada-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
}

.ocanada-title {
  font-size: 22px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}

.ocanada-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ocanada-play-btn {
  padding: 10px 24px;
  font-size: 13px;
  flex-shrink: 0;
}

.ocanada-controls-row .track-progress {
  flex: 1;
}

/* ── Friendly Town spread ──────────────────────────── */

.ft-spread {
  overflow: hidden;
}

.ft-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ft-bottom-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 28px 44px 36px;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(4, 8, 20, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ft-card-inner {
  display: flex;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.ft-card-left {
  flex-shrink: 0;
  min-width: 180px;
}

.ft-chapter-num {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(16px, 1.8vw, 22px);
  letter-spacing: 0.2em;
  color: rgba(200, 170, 60, 0.9);
  margin: 0 0 6px;
}

.ft-track-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
}

.ft-card-right {
  flex: 1;
  min-width: 0;
}

/* ── SOS June: video with poster + glassmorphic bottom card ── */
.sos-spread {
  overflow: hidden;
}

.sos-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.sos-text-overlay {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 70%;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 400;
  line-height: 1.7;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.95), 0 0 80px rgba(0,0,0,0.7);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.sos-spread.sos-playing .sos-text-overlay {
  opacity: 0;
}

.sos-bottom-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 44px 18px;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  background: rgba(4, 8, 20, 0.72);
  border-top: 1px solid rgba(0, 212, 255, 0.22);
}

.sos-card-inner {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.sos-card-left {
  flex-shrink: 0;
  min-width: 140px;
}

.sos-chapter-num {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(200, 170, 60, 0.8);
  margin: 0 0 3px;
}

.sos-track-title {
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
  white-space: nowrap;
}

.sos-card-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.sos-liner-note {
  flex: 1;
  min-width: 0;
  font-size: clamp(12px, 1.1vw, 14px);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sos-card-right .play-area {
  flex-shrink: 0;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-top: 0;
}

.sos-card-right .track-progress {
  min-width: 200px;
}

.signal-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: rgba(4, 8, 20, 0.72);
  border-top: 1px solid rgba(0, 180, 255, 0.28);
}

.signal-bottom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
}

.signal-bottom-meta {
  flex-shrink: 0;
}

.signal-bottom-liner {
  flex: 1;
  min-width: 0;
}

.signal-bottom-play {
  flex-shrink: 0;
  margin-top: 0 !important;
  min-width: 260px;
}

.signal-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 11px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 3px;
}

.signal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.97);
  line-height: 1.18;
  margin-bottom: 0;
  text-shadow: 0 0 18px rgba(0, 180, 255, 0.25);
  white-space: nowrap;
}

.signal-rule {
  display: none;
}

.signal-liner {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.signal-play-area {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(0, 180, 255, 0.25) !important;
}

.signal-play-area .play-btn {
  background: rgba(0, 180, 255, 0.12) !important;
  border-color: rgba(0, 180, 255, 0.4) !important;
  color: #00d4ff !important;
}

.signal-play-area .play-btn:hover,
.signal-play-area .play-btn.playing {
  background: rgba(0, 180, 255, 0.22) !important;
  border-color: #00b4ff !important;
}

.signal-play-area .play-label,
.signal-play-area .play-icon {
  color: #00d4ff !important;
}

.signal-play-area .progress-fill {
  background: linear-gradient(to right, rgba(0,180,255,0.5), #00d4ff) !important;
  box-shadow: 0 0 6px rgba(0,180,255,0.5) !important;
}

.signal-play-area .time-display {
  color: rgba(0, 212, 255, 0.82) !important;
}

/* ── Lucy — Full-bleed image + centered video reveal ────── */
/* Layers back→front: lucy-bg-img (full cover) → lucy-video
   (centered, contained, paused until 4:20 into the track) →
   lucy-page (transparent reset) → lucy-text-card. */

.lucy-main-layer {
  position: absolute;
  inset: 0;
  transition: opacity 1.6s ease;
}

.lucy-spread.lucy-revealed .lucy-main-layer {
  opacity: 0;
  pointer-events: none;
}

.lucy-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.lucy-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 66%;
  max-height: 94%;
  width: auto;
  height: auto;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lucy-page {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 2;
}

.lucy-text-card {
  position: absolute;
  bottom: 120px;
  right: 50px;
  z-index: 10;
  width: min(320px, calc(100% - 100px));
  border-radius: 14px;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(8, 10, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.lucy-text-inner {
  padding: 22px 22px;
}

.lucy-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.lucy-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
}

.lucy-second-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 12px;
}

.lucy-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.35), transparent);
  margin: 14px 0;
}

.lucy-liner {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.lucy-play-area {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.lucy-play-area .play-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.lucy-play-area .play-btn:hover,
.lucy-play-area .play-btn.playing {
  background: rgba(255, 255, 255, 0.18) !important;
}

.lucy-play-area .play-label,
.lucy-play-area .play-icon {
  color: rgba(255, 255, 255, 0.92) !important;
}

.lucy-play-area .time-display {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Dedication reveal — fades in once lucy.mp4 finishes playing through.
   A dim matte-black/fractal backdrop with a simple in-memoriam text card. */
.lucy-dedication {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #060507;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2.2s ease 0.4s;
}

.lucy-dedication-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 40px 20px;
  box-sizing: border-box;
}

.lucy-dedication-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.65;
}

.lucy-spread.lucy-revealed .lucy-dedication {
  opacity: 1;
  pointer-events: auto;
}

.lucy-dedication-eyebrow {
  position: relative;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 18px;
}

.lucy-dedication-name {
  position: relative;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(36px, 5vw, 64px);
  color: #f48cb8;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  text-shadow: 0 0 40px rgba(244, 140, 184, 0.5), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.lucy-dedication-dates {
  position: relative;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.lucy-dedication-body {
  position: relative;
  max-width: 560px;
  margin: 28px auto 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.lucy-dedication-link {
  position: relative;
  display: inline-block;
  margin-top: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.6vw, 19px);
  color: #fff;
  text-decoration: underline;
}

.lucy-dedication-link:hover {
  color: var(--gold);
}

/* ── Wisdom — Landing page, two totem buttons ──────────────
   Totem positions are computed from the cover art's pixel
   coordinates (spiral ≈ 24.8%/88.9%, leaf ≈ 55.0%/88.9% of the
   1080×1080 image) so the buttons stay aligned at any viewport size. */

.wisdom-spread {
  background: #060507;
}

.wisdom-cover-frame {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(76%, 76vh);
  aspect-ratio: 1 / 1;
}

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

.wisdom-totem-btn {
  position: absolute;
  top: 100%;
  margin-top: 22px;
  transform: translateX(-50%);
  font-family: 'Courier Prime', monospace;
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--gold);
  background: rgba(10, 8, 3, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s;
}

.wisdom-totem-btn:hover {
  border-color: var(--gold);
  color: #ffe9a8;
  background: rgba(201, 168, 76, 0.2);
  box-shadow: 0 0 22px rgba(201, 168, 76, 0.3);
}

.wisdom-totem-olli { left: calc(24.8% + 20px); }
.wisdom-totem-lucy { left: calc(55.0% + 100px); }

/* ── Still In The Ground — Full-bleed image + glass card ──── */

.ground-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ground-page {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

.ground-text-card {
  position: absolute;
  bottom: 120px;
  right: 50px;
  z-index: 2;
  width: min(360px, calc(100% - 100px));
  border-radius: 14px;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(8, 10, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.ground-text-inner {
  padding: 22px 22px;
}

.ground-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.ground-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
}

.ground-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.35), transparent);
  margin: 14px 0;
}

.ground-liner {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

.ground-play-area {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.ground-play-area .play-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.ground-play-area .play-btn:hover,
.ground-play-area .play-btn.playing {
  background: rgba(255, 255, 255, 0.18) !important;
}

.ground-play-area .play-label,
.ground-play-area .play-icon {
  color: rgba(255, 255, 255, 0.92) !important;
}

.ground-play-area .time-display {
  color: rgba(255, 255, 255, 0.5) !important;
}

.ground-charity-link {
  display: block;
  font-family: "Google Sans Flex", sans-serif;
  font-optical-sizing: auto;
  font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #e8c468;
  text-decoration: none;
  margin-top: 16px;
  line-height: 1.5;
}
.ground-charity-link:hover { color: #fff; }

.ground-charity-link .charity-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
}

/* ── Olli — Full-width image + glass card ──────────────────── */

.olli-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.olli-page {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

.olli-text-card {
  position: absolute;
  bottom: 120px;
  right: 50px;
  z-index: 2;
  width: min(380px, calc(100% - 100px));
  border-radius: 14px;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(8, 10, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.olli-text-inner {
  padding: 22px 22px;
}

.olli-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.olli-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
}

.olli-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.35), transparent);
  margin: 14px 0;
}

.olli-liner {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

.olli-play-area {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.olli-play-area .play-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.olli-play-area .play-btn:hover,
.olli-play-area .play-btn.playing {
  background: rgba(255, 255, 255, 0.18) !important;
}

.olli-play-area .play-label,
.olli-play-area .play-icon {
  color: rgba(255, 255, 255, 0.92) !important;
}

.olli-play-area .time-display {
  color: rgba(255, 255, 255, 0.5) !important;
}


/* ── Die to Live Again (D2L) spread ───────────────────────── */
/* The 3D scene lives in #d2lBg (inside the global, full-viewport
   #bg-scene) so it bleeds past the book's letterboxed edges instead
   of being cropped to the page bounds. .d2l-spread itself stays
   transparent so that background shows through unbroken. */

.d2l-spread {
  background: transparent;
}

.d2l-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.d2l-bg.active {
  opacity: 1;
  pointer-events: auto;
}

.d2l-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 0;
  opacity: 0;
  filter: brightness(1.15);
  transition: opacity 2s ease;
}

.d2l-bg.d2l-scene-active .d2l-iframe {
  opacity: 1;
}

/* ── Star Spangled Banner — full-bleed cover + glassmorphic bottom bar ── */

.ssb-spread {
  overflow: hidden;
}

.ssb-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ssb-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(10, 8, 3, 0.78);
  border-top: 1px solid rgba(201, 168, 76, 0.3);
}

.ssb-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 24px 150px;
}

.ssb-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.ssb-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}

.ssb-bottom-play {
  flex-shrink: 0;
  min-width: 260px;
}

.nombres-spread {
  overflow: hidden;
}

.nombres-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 0;
}

.d2l-sketchfab {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}

.d2l-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(0, 14, 28, 0.68);
  border-top: 1px solid rgba(0, 212, 255, 0.22);
}

.d2l-bottom-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 40px 24px;
}

.d2l-bottom-meta {
  flex-shrink: 0;
  min-width: 160px;
}

.d2l-bottom-liner {
  flex: 1;
  min-width: 0;
}

.d2l-bottom-play {
  flex-shrink: 0;
  min-width: 260px;
}

.d2l-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.55);
  margin-bottom: 6px;
}

.d2l-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
}

.d2l-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(0, 212, 255, 0.4), transparent);
  margin: 14px 0;
}

.d2l-liner {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

.d2l-play-area {
  margin-top: 16px;
  background: rgba(0, 212, 255, 0.06) !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
}

.d2l-play-area .play-btn {
  background: rgba(0, 212, 255, 0.1) !important;
  border-color: rgba(0, 212, 255, 0.28) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.d2l-play-area .play-btn:hover,
.d2l-play-area .play-btn.playing {
  background: rgba(0, 212, 255, 0.2) !important;
}

.d2l-play-area .play-label,
.d2l-play-area .play-icon {
  color: rgba(255, 255, 255, 0.92) !important;
}

.d2l-play-area .time-display {
  color: rgba(0, 212, 255, 0.6) !important;
}

/* ── You're Next — Player Bar + Pop-up Card ────────────────
   Crossfade bg now lives in the global #bg-scene
   (see .bg-younext-img near the top). */

.younext-page {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 3;
}

.younext-title-bg {
  position: absolute;
  top: 150px;
  left: 30px;
  display: flex;
  flex-direction: column;
  font-family: 'Anton', sans-serif;
  font-size: clamp(120px, 21.6vw, 288px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: #fff;
  opacity: 0.75;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

/* ── You're Next — circle play button ─────────────────────── */

@keyframes younext-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  60%  { box-shadow: 0 0 0 28px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.younext-circle-btn {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.younext-circle-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 16px 0 16px 28px;
  border-color: transparent transparent transparent rgba(255,255,255,0.9);
  margin: auto;
  position: absolute;
  inset: 0;
  margin-left: calc(50% - 10px);
  margin-top: calc(50% - 16px);
}
.younext-circle-btn.playing {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.7);
  animation: younext-pulse 1.6s ease-out infinite;
}
.younext-circle-btn.playing::after {
  border-left-color: #00d4ff;
  /* pause bars */
  border-width: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(
    to right,
    #00d4ff 0%, #00d4ff 38%,
    transparent 38%, transparent 62%,
    #00d4ff 62%, #00d4ff 100%
  );
  border-radius: 2px;
  margin-left: calc(50% - 13px);
  margin-top: calc(50% - 13px);
}
.younext-circle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ── Signal spread — background title text ─────────────────── */

.signal-title-bg {
  position: absolute;
  top: 150px;
  left: 30px;
  display: flex;
  flex-direction: column;
  font-family: 'Anton', sans-serif;
  font-size: clamp(102px, 18.4vw, 245px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: #fff;
  opacity: 0.70;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

/* ── Per-card waveform canvas ──────────────────────────────── */

.ws-slot {
  width: 100%;
  margin-top: 8px;
}
.ws-host {
  opacity: 0.75;
  border-radius: 4px;
  overflow: hidden;
}

.younext-player-wrap {
  position: absolute;
  bottom: 120px;
  right: 50px;
  z-index: 4;
  width: min(420px, calc(100% - 100px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Card sits above the bar and pops up when the track is playing */
.younext-text-card {
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  background: rgba(10, 10, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: max-height 0.45s ease, opacity 0.35s ease, transform 0.45s ease, margin-bottom 0.45s ease;
}

.younext-text-card.expanded {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-bottom: 14px;
}

.younext-text-inner {
  padding: 22px 24px;
}

.younext-liner {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 1.55vw, 18px);
  font-weight: 300;
  line-height: 1.82;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 14px;
}
.younext-liner:last-child { margin-bottom: 0; }

.younext-player-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 12px;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  background: rgba(8, 8, 14, 0.58);
  border: 1px solid rgba(0, 180, 255, 0.3);
  padding: 14px 20px;
}

.younext-play-btn {
  background: rgba(0, 180, 255, 0.12) !important;
  border-color: rgba(0, 180, 255, 0.4) !important;
  color: #00d4ff !important;
  flex-shrink: 0;
}

.younext-play-btn:hover,
.younext-play-btn.playing {
  background: rgba(0, 180, 255, 0.22) !important;
  border-color: #00b4ff !important;
}

.younext-play-btn .play-label,
.younext-play-btn .play-icon {
  color: #00d4ff !important;
}

.younext-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.younext-chapter {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(9px, 0.9vw, 11px);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.younext-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.97);
  line-height: 1.15;
  text-shadow: 0 0 18px rgba(0, 180, 255, 0.25);
}

.younext-progress {
  margin-top: 10px;
  padding: 0 4px;
}

.younext-progress .progress-fill {
  background: linear-gradient(to right, rgba(0,180,255,0.5), #00d4ff) !important;
  box-shadow: 0 0 6px rgba(0,180,255,0.5) !important;
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED CARD TYPOGRAPHY — Google Sans Flex
   Combined selectors set GSF on all card text in one place.
   Individual size/colour fixes live in each class's own rule.
   ═══════════════════════════════════════════════════════════ */

.chain-chapter, .chain-title, .chain-liner,
.dmt-chapter, .dmt-title, .dmt-liner,
.signal-chapter, .signal-title, .signal-liner,
.lucy-chapter, .lucy-title, .lucy-second-title, .lucy-liner,
.ground-chapter, .ground-title, .ground-liner,
.olli-chapter, .olli-title, .olli-liner,
.d2l-chapter, .d2l-title, .d2l-liner,
.younext-chapter, .younext-title, .younext-liner,
.play-label, .play-icon {
  font-family: "Google Sans Flex", sans-serif !important;
  font-optical-sizing: auto;
  font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 0;
}

/* Chapter / eyebrow labels */
.chain-chapter, .dmt-chapter, .signal-chapter,
.lucy-chapter, .ground-chapter, .olli-chapter, .d2l-chapter,
.younext-chapter {
  font-size: clamp(12px, 1.1vw, 14px) !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Card titles */
.chain-title, .signal-title, .lucy-title, .lucy-second-title,
.ground-title, .olli-title, .d2l-title, .younext-title, .dmt-title {
  font-weight: 700 !important;
}

/* Liner / body text */
.chain-liner, .signal-liner, .lucy-liner,
.ground-liner, .olli-liner, .d2l-liner, .younext-liner, .dmt-liner {
  font-size: clamp(13px, 1.4vw, 15px) !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  color: rgba(255, 255, 255, 0.87) !important;
  letter-spacing: 0.01em;
}

