/* ───────────────────────── tokens ───────────────────────── */
:root {
  color-scheme: dark;
  --ink: #070611;
  --ink-2: #0d0a18;
  --ink-3: #15101f;
  --paper: #f3e4bf;
  --paper-2: #e9d4a2;
  --paper-ink: #2a2014;
  --gold: #ffc874;
  --gold-soft: #ffd89a;
  --gold-deep: #c9883f;
  --teal: #4cc0bd;
  --violet: #8a72c4;
  --text: #fdf4e2;
  --text-dim: rgba(253, 244, 226, 0.66);
  --line: rgba(255, 200, 116, 0.18);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1180px;
  --scroll: 0;
  --mx: 0;
  --my: 0;
  font-family: var(--sans);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(60rem 40rem at 14% 6%, rgba(255, 200, 116, 0.12), transparent 60%),
    radial-gradient(50rem 40rem at 88% 22%, rgba(76, 192, 189, 0.10), transparent 60%),
    radial-gradient(50rem 50rem at 50% 120%, rgba(138, 114, 196, 0.10), transparent 60%),
    linear-gradient(180deg, #05050d, #0c0a16 50%, #05050d);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 76px 76px, 76px 76px;
  mask-image: radial-gradient(circle at 50% 8%, black, transparent 72%);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#spell-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

main { position: relative; z-index: 1; }

/* ───────────────────────── typography ───────────────────────── */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.01em; margin: 0; }

h1 {
  font-size: clamp(3.3rem, 7vw, 5.6rem);
  font-weight: 800;
  line-height: 0.96;
  text-wrap: balance;
}
h1 .accent { color: var(--gold); text-shadow: 0 0 50px rgba(255, 200, 116, 0.25); }

h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-problem {
  max-width: 540px;
  margin: 0 0 34px;
  font-family: var(--serif);
  font-size: clamp(1.18rem, 1.9vw, 1.5rem);
  line-height: 1.4;
  color: color-mix(in srgb, var(--text-dim) 80%, #8b93a4);
}
.hero-problem-line,
.hero-problem-belief {
  display: block;
}
.hero-problem-belief {
  display: block;
  margin-top: 18px;
  color: var(--paper);
  font-style: italic;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ───────────────────────── buttons ───────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  color: #1a1208;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 14px 40px rgba(255, 200, 116, 0.28);
}
.button.primary:hover { box-shadow: 0 18px 54px rgba(255, 200, 116, 0.42); }
.button.ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}
.button.ghost:hover { border-color: var(--gold); }
.button.large { min-height: 58px; padding: 0 36px; font-size: 1.08rem; }

/* ───────────────────────── header ───────────────────────── */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(var(--maxw), calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(10, 8, 18, 0.62);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  color: var(--gold);
  background: #1a1626;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 116, 0.25), 0 0 20px rgba(255, 200, 116, 0.2);
}
/* Radio controls, centred in the header bar. */
.header-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 3px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
.header-radio-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 116, 0.35);
  background: rgba(255, 200, 116, 0.10);
  color: var(--gold);
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.header-radio-toggle:hover { background: rgba(255, 200, 116, 0.18); }
.header-radio-toggle:active { transform: scale(0.94); }
.header-radio-toggle.is-playing {
  background: rgba(255, 200, 116, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 200, 116, 0.4), 0 0 18px rgba(255, 200, 116, 0.35);
}
.header-radio-toggle .hr-icon { font-size: 0.74rem; line-height: 1; pointer-events: none; }
.header-radio-select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 150px;
  padding: 6px 26px 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background-color: rgba(10, 8, 18, 0.6);
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: right 13px center, right 8px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.header-radio-select:focus-visible { outline: 2px solid rgba(255, 200, 116, 0.6); outline-offset: 1px; }
.header-radio-select option { color: #1a1626; }

@media (max-width: 720px) {
  .header-radio-select { max-width: 116px; font-size: 0.8rem; padding-left: 10px; }
}
@media (max-width: 520px) {
  .header-radio-select { display: none; } /* keep play/pause; full picker lives in the radio section */
}

/* One-time callout pointing at the header radio controls. */
.radio-hint {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 29;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 380px);
  padding: 12px 12px 12px 15px;
  border: 1px solid rgba(255, 200, 116, 0.35);
  border-radius: 14px;
  background: rgba(20, 16, 30, 0.94);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.radio-hint.is-open { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.radio-hint::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(20, 16, 30, 0.94);
  border-left: 1px solid rgba(255, 200, 116, 0.35);
  border-top: 1px solid rgba(255, 200, 116, 0.35);
}
.radio-hint-text { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--paper); }
.radio-hint-dismiss {
  flex: none;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 116, 0.4);
  background: rgba(255, 200, 116, 0.12);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 160ms ease;
}
.radio-hint-dismiss:hover { background: rgba(255, 200, 116, 0.22); }
.header-radio.hint-pulse {
  animation: radioHintPulse 1.6s ease-in-out infinite;
  border-color: rgba(255, 200, 116, 0.5);
}
@keyframes radioHintPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 116, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 200, 116, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .header-radio.hint-pulse { animation: none; }
}

.nav-links { display: none; }
.nav-links a { position: relative; transition: color 160ms; }
.nav-links a:hover { color: var(--gold); }
.glow-pill {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(112px, auto);
  align-items: center;
  gap: 9px;
  min-width: 198px;
  min-height: 42px;
  padding: 6px 12px 8px 7px;
  border: 1px solid rgba(255, 200, 116, 0.28);
  border-radius: 999px;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    rgba(18, 13, 28, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 24px rgba(255, 200, 116, 0.14);
  cursor: pointer;
}
.glow-pill:hover,
.glow-pill[aria-expanded="true"] {
  border-color: rgba(255, 200, 116, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 0 30px rgba(255, 200, 116, 0.24);
}
.glow-orb {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 30%, #fff2c7 0 16%, #ffd073 34%, #4cc0bd 64%, #1a1626 100%);
  box-shadow: 0 0 18px rgba(255, 200, 116, 0.55);
}
.glow-copy {
  display: grid;
  gap: 2px;
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1;
}
.glow-label { font-size: 0.78rem; color: rgba(253,244,226,0.72); }
.glow-count { font-size: 0.92rem; color: var(--gold); white-space: nowrap; }
.glow-meter {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
}
.glow-meter span {
  display: block;
  width: calc(var(--glow-progress, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 260ms ease;
}
.glow-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  align-items: start;
  padding:
    max(96px, env(safe-area-inset-top))
    max(34px, calc((100vw - var(--maxw)) / 2 + 18px))
    max(24px, env(safe-area-inset-bottom))
    18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 200, 116, 0.12), transparent 34%),
    rgba(2, 2, 8, 0.72);
  backdrop-filter: blur(9px);
}
.glow-menu[hidden] { display: none; }
.glow-sheet {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100svh - 116px));
  overflow-y: auto;
  padding: 134px 24px 24px;
  border: 3px solid #0b0d1c;
  border-radius: 34px;
  color: #312719;
  background:
    linear-gradient(rgba(244, 223, 174, 0.90), rgba(232, 205, 142, 0.94)),
    url("./assets/glow/parchment-texture.jpg") center / cover;
  box-shadow:
    0 0 0 2px rgba(255, 200, 116, 0.72),
    0 34px 100px rgba(0,0,0,0.58),
    inset 0 0 70px rgba(112, 72, 24, 0.12);
}
.glow-sheet-pill {
  position: absolute;
  top: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(350px, calc(100% - 52px));
  justify-content: center;
  padding: 14px 24px;
  border: 3px solid rgba(13, 14, 31, 0.92);
  border-radius: 999px;
  color: var(--gold);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    #272531;
  box-shadow:
    0 0 0 2px rgba(255, 200, 116, 0.55),
    0 16px 28px rgba(0,0,0,0.34);
  transform: translateX(-50%);
}
.glow-sheet-pill span {
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1;
}
.glow-sheet-pill strong {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}
.glow-sheet-notch {
  position: absolute;
  top: 66px;
  left: 50%;
  display: grid;
  place-items: end center;
  width: 104px;
  height: 60px;
  border: 3px solid rgba(190, 133, 55, 0.72);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  color: var(--gold);
  background: radial-gradient(circle at 50% 0, rgba(255, 200, 116, 0.38), #191520 68%);
  font-size: 2.2rem;
  line-height: 0.9;
  transform: translateX(-50%);
}
.glow-close {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid rgba(255, 200, 116, 0.62);
  border-radius: 999px;
  color: var(--gold);
  background: #101120;
  font-family: var(--sans);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0,0,0,0.34);
}
.glow-close:hover { transform: translateY(-1px); }
.glow-explainer {
  display: grid;
  gap: 8px;
  max-width: 430px;
  margin: 0 auto 18px;
  text-align: center;
}
.glow-explainer .glow-sheet-heading,
.glow-explainer p {
  margin: 0;
}
.glow-explainer .glow-sheet-heading {
  color: #2b2117;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1;
}
.glow-explainer p {
  color: rgba(49, 39, 25, 0.72);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
}
.glow-explainer .glow-state {
  color: rgba(49, 39, 25, 0.66);
  font-style: italic;
  font-weight: 600;
}
.glow-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.glow-command,
.glow-spend button {
  border: 1px solid rgba(118, 89, 44, 0.18);
  color: #312719;
  background: rgba(255, 244, 211, 0.54);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.32),
    0 3px 9px rgba(80, 55, 20, 0.12);
}
.glow-command {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  min-height: 102px;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
}
.glow-command::after {
  content: "›";
  color: rgba(49, 39, 25, 0.35);
  font-family: var(--sans);
  font-size: 3.2rem;
  font-weight: 300;
  line-height: 0.7;
}
.glow-command img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 9px;
  border-radius: 12px;
  background: rgba(244, 215, 153, 0.48);
  box-shadow: inset 0 0 24px rgba(150, 96, 34, 0.08);
}
.glow-command span {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.glow-command strong {
  color: #2b2117;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 0.95;
}
.glow-command small {
  color: rgba(49, 39, 25, 0.66);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.18;
}
.glow-command:hover,
.glow-spend button:hover:not(:disabled) {
  border-color: rgba(121, 76, 22, 0.28);
  background: rgba(255, 248, 224, 0.72);
}
.glow-spend {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 70px 0 0;
  border-top: 1px solid rgba(80, 55, 20, 0.14);
}
.glow-spend-title {
  margin: 0;
  color: #8c5c16;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
}
.glow-spend button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(49, 39, 25, 0.78);
  font-family: var(--sans);
  font-weight: 800;
  cursor: pointer;
}
.glow-spend button:disabled {
  opacity: 0.45;
  cursor: default;
}
.glow-spend button span {
  color: #8c5c16;
  flex: 0 0 auto;
  font-size: 0.76rem;
}
.glow-reveal {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(39, 117, 108, 0.20);
  border-radius: 12px;
  background: rgba(255, 252, 235, 0.54);
  box-shadow: inset 0 0 24px rgba(81,219,203,0.04);
}
.glow-reveal[hidden] { display: none; }
.glow-reveal p {
  margin: 0;
  color: rgba(49, 39, 25, 0.70);
  font-size: 0.84rem;
  line-height: 1.45;
}
.glow-reveal .glow-reveal-title {
  color: #8c5c16;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}
.glow-spend-note {
  margin: 2px 0 0;
  color: rgba(49, 39, 25, 0.58);
  font-size: 0.82rem;
  line-height: 1.4;
}
.glow-target {
  outline: 1px solid rgba(255, 200, 116, 0.24);
  outline-offset: 8px;
  filter: drop-shadow(0 0 24px rgba(255, 200, 116, 0.14));
}
/* Warm the margins - a golden vignette breathes in around the whole page. */
.glow-effect-margins body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 200, 116, 0.22),
    inset 0 0 170px rgba(255, 200, 116, 0.16);
  animation: glow-margins-in 900ms ease-out both;
}
@keyframes glow-margins-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.glow-effect-bookmark .site-header::after {
  content: "Bookmark set";
  position: absolute;
  right: 18px;
  top: calc(100% + 8px);
  padding: 6px 10px;
  border: 1px solid rgba(255, 200, 116, 0.36);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(12, 9, 22, 0.88);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: italic;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.glow-effect-dial .radio-cabinet {
  border-color: rgba(255, 200, 116, 0.38);
  box-shadow: 0 22px 70px rgba(255, 200, 116, 0.16), 0 18px 60px rgba(0,0,0,0.32);
}
.glow-effect-dial .radio-freq,
.glow-effect-dial .radio-name {
  text-shadow: 0 0 18px rgba(255, 200, 116, 0.36);
}
/* Margin note - a handwritten line inks itself in beside the hero. */
.glow-effect-note .hero-problem span { color: var(--gold-soft); }
.glow-margin-note {
  position: relative;
  max-width: 540px;
  margin: 22px 0 0;
  padding: 12px 16px 12px 18px;
  border-left: 2px solid var(--gold-deep);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 200, 116, 0.08);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--gold-soft);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1100ms ease;
}
.glow-margin-note.is-inked { clip-path: inset(0 0 0 0); }
.glow-margin-note em { color: #fff; }
.glow-margin-quill { margin-right: 8px; }

/* Favored pages - the deck lifts, gilds, and the glyphs wake. */
.glow-effect-pages .pagetype {
  border-color: rgba(255, 200, 116, 0.45);
  box-shadow: 0 22px 54px rgba(255, 200, 116, 0.14);
  transform: translateY(-4px);
  transition: transform 420ms ease, box-shadow 420ms ease, border-color 420ms ease;
}
.glow-effect-pages .pagetype-glyph {
  text-shadow: 0 0 18px rgba(255, 200, 116, 0.5);
  animation: glow-glyph-pop 620ms ease both;
}
.glow-effect-pages .pagetype:nth-child(2) .pagetype-glyph { animation-delay: 90ms; }
.glow-effect-pages .pagetype:nth-child(3) .pagetype-glyph { animation-delay: 180ms; }
.glow-effect-pages .pagetype:nth-child(4) .pagetype-glyph { animation-delay: 270ms; }
.glow-effect-pages .pagetype:nth-child(n+5) .pagetype-glyph { animation-delay: 360ms; }
@keyframes glow-glyph-pop {
  0% { transform: scale(0.7); opacity: 0.4; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}

/* Ask the Stacks - entries file themselves; an index line answers back. */
.glow-effect-stacks .privacy-list li {
  border-left: 2px solid var(--gold-deep);
  padding-left: 12px;
  transition: border-color 300ms ease, padding 300ms ease;
}
.glow-stacks-index {
  margin: 18px 0 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 200, 116, 0.4);
  border-radius: 12px;
  background: rgba(255, 200, 116, 0.08);
  color: var(--gold-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.glow-stacks-index.is-filed { opacity: 1; transform: none; }
.glow-stacks-index span { color: var(--gold); margin-right: 6px; }

/* Wake an enchantment - a gold light sweeps across the screenshots. */
.glow-effect-enchantment .mechanic-shot {
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(255, 200, 116, 0.16);
}
.glow-effect-enchantment .mechanic-shot img { animation: glow-enchant 1400ms ease both; }
.glow-effect-enchantment .mechanic-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 222, 158, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: glow-enchant-sweep 1400ms ease both;
}
@keyframes glow-enchant {
  0% { filter: saturate(0.5) brightness(0.92); }
  50% { filter: saturate(1.25) brightness(1.08); }
  100% { filter: saturate(1.08) brightness(1); }
}
@keyframes glow-enchant-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* Compass spark - a rose spins and drops a noticing prompt into How it works. */
.glow-effect-compass .how-card {
  border-color: rgba(255, 200, 116, 0.28);
  box-shadow: 0 18px 50px rgba(255, 200, 116, 0.08);
}
.glow-compass-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px auto 0;
  max-width: 760px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 200, 116, 0.4);
  border-radius: 16px;
  background: rgba(255, 200, 116, 0.08);
}
.glow-compass-rose {
  font-size: 1.8rem;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 200, 116, 0.5);
}
.glow-compass-card.is-spinning .glow-compass-rose {
  animation: glow-compass-spin 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes glow-compass-spin {
  0% { transform: rotate(0deg) scale(0.8); }
  100% { transform: rotate(720deg) scale(1); }
}
.glow-compass-label {
  margin: 0 0 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.glow-compass-prompt {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: #fff;
}
.header-cta {
  display: none;
  padding: 10px 18px;
  border-radius: 999px;
  color: #1a1208;
  font-weight: 700;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 8px 24px rgba(255, 200, 116, 0.25);
  transition: transform 160ms;
}
.header-cta:hover { transform: translateY(-1px); }

/* ───────────────────────── hero ───────────────────────── */
.hero {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: 130px 0 60px;
}
.hero-copy { position: relative; z-index: 2; }
.return-note {
  width: fit-content;
  max-width: 520px;
  margin: -4px 0 20px;
  padding: 9px 13px;
  border: 1px solid rgba(76, 192, 189, 0.24);
  border-radius: 999px;
  color: rgba(228, 255, 251, 0.8);
  background: rgba(76, 192, 189, 0.07);
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
}
.hero-tagline {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--paper);
}
.hero-tagline span { color: var(--gold); font-style: italic; }

.hero-lede {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 28px 0 0; padding: 0; list-style: none;
}
.trust-row li {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.84rem;
}

.hero-bridge-quote {
  width: min(860px, calc(100% - 40px));
  margin: clamp(8px, 2vw, 24px) auto clamp(44px, 7vw, 82px);
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  font-weight: 650;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 0 34px rgba(255, 200, 116, 0.16);
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  transform: translateY(calc(var(--my) * 8px));
}
.hero-glow {
  position: absolute;
  inset: 8% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 116, 0.28), transparent 62%);
  filter: blur(38px);
}
.hero-phone {
  position: relative;
  width: 62%;
  border-radius: 26px;
  border: 1px solid rgba(255, 200, 116, 0.22);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  transform: rotateY(calc(var(--mx) * -6deg)) rotate(-3deg);
  transition: transform 200ms ease-out;
}
/* Scrolling carousel of app screens inside the phone frame */
.hero-carousel {
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  isolation: isolate;
}
.hero-screen-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 600%;
  animation: heroScreenScroll 28s cubic-bezier(0.72, 0, 0.28, 1) infinite;
  will-change: transform;
}
.hero-carousel .hero-screen {
  display: block;
  flex: 0 0 calc(100% / 6);
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}
@keyframes heroScreenScroll {
  0%, 12%    { transform: translateY(0); }
  18%, 30%   { transform: translateY(calc(-100% / 6)); }
  36%, 48%   { transform: translateY(calc(-200% / 6)); }
  54%, 66%   { transform: translateY(calc(-300% / 6)); }
  72%, 84%   { transform: translateY(calc(-400% / 6)); }
  94%, 100%  { transform: translateY(calc(-500% / 6)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-screen-track { animation: none; transform: none; }
  .hero-carousel .hero-screen:not(:first-child) { display: none; }
}
.hero-float {
  position: absolute;
  margin: 0;
  width: 34%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 116, 0.2);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}
.hero-float img { width: 100%; }
.float-1 { left: -2%; bottom: 8%; transform: rotate(-8deg) translateY(calc(var(--scroll) * -26px)); }
.float-2 { right: -1%; top: 10%; transform: rotate(7deg) translateY(calc(var(--scroll) * -16px)); }
.hero-chip {
  position: absolute;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--paper-ink);
  background: linear-gradient(180deg, #fff6df, var(--paper));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.chip-1 { top: 4%; right: 14%; transform: rotate(4deg); }
.chip-2 { bottom: 2%; right: 6%; color: var(--teal); transform: rotate(-5deg); }

/* ───────────────────────── promo lightbox ───────────────────────── */
.promo-trigger { display: inline-flex; align-items: center; gap: 8px; }
.promo-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 200, 116, 0.16);
  border: 1px solid rgba(255, 200, 116, 0.4);
  font-size: 0.62rem;
  line-height: 1;
  padding-left: 2px;
}
.promo-lightbox[hidden] { display: none; }
.promo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.promo-lightbox.is-open { opacity: 1; }
.promo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.86);
  backdrop-filter: blur(6px);
}
.promo-lightbox-inner {
  position: relative;
  width: min(92vw, calc((100vh - 120px) * 9 / 16));
  max-height: calc(100vh - 80px);
  transform: scale(0.96);
  transition: transform 220ms ease;
}
.promo-lightbox.is-open .promo-lightbox-inner { transform: scale(1); }
.promo-video {
  width: 100%;
  max-height: calc(100vh - 80px);
  border-radius: 20px;
  border: 1px solid rgba(255, 200, 116, 0.25);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  background: #000;
  display: block;
}
.promo-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 116, 0.4);
  background: linear-gradient(180deg, #fff6df, var(--paper));
  color: var(--paper-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
@media (max-width: 640px) {
  .promo-lightbox-close { top: -10px; right: -10px; }
}

/* ───────────────────────── section heads ───────────────────────── */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-sub, .cta-sub {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.6;
}
.section-sub em { color: var(--gold); font-style: italic; }

/* ───────────────────────── interactive book ───────────────────────── */
.book-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 120px) 0;
}
.book-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
}
.book-progress {
  width: min(680px, 100%);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.book-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transition: width 420ms ease;
}

.book {
  position: relative;
  width: min(880px, 100%);
  aspect-ratio: 16 / 11.8;
  perspective: 2200px;
}

/* closed cover */
.book-cover {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  width: min(420px, 80%);
  border: 1px solid rgba(255, 200, 116, 0.34);
  border-radius: 14px 20px 20px 14px;
  cursor: pointer;
  color: inherit;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 200, 116, 0.22), transparent 55%),
    linear-gradient(135deg, #1d1530, #0c0913 60%, #241731);
  box-shadow: 0 50px 110px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 200, 116, 0.08);
  transition: transform 260ms ease, box-shadow 260ms ease, opacity 300ms ease;
}
.book-cover::before {
  content: "";
  position: absolute;
  left: 14px; top: 14px; bottom: 14px; right: 14px;
  border: 1px solid rgba(255, 200, 116, 0.22);
  border-radius: 10px;
  pointer-events: none;
}
.book-cover:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 60px 130px rgba(0,0,0,0.66); }
.cover-inner {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}
.cover-kicker { color: var(--paper); font-family: var(--serif); font-style: italic; font-size: 0.95rem; opacity: 0.82; }
.cover-title { color: var(--gold); font-family: var(--serif); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.cover-mark { color: var(--gold); font-size: 1.6rem; opacity: 0.85; }
.cover-open {
  margin-top: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 200, 116, 0.4);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,200,116,0.3); } 50% { box-shadow: 0 0 0 8px rgba(255,200,116,0); } }

.book[data-state="open"] .book-cover,
.book[data-state="braid"] .book-cover { opacity: 0; pointer-events: none; transform: rotateY(-110deg); }

/* spread */
.spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}
.book[data-state="open"] #spread { opacity: 1; pointer-events: auto; }
.book[data-state="braid"] #braid { opacity: 1; pointer-events: auto; }

.leaf {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.leaf-left { border-radius: 14px 0 0 14px; border-right: none; }
.leaf-right { border-radius: 0 14px 14px 0; transform-style: preserve-3d; transform-origin: left center; }
/* spine shadow */
.spread::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 36px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.4), transparent);
}

.leaf-paper {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3.4vw, 40px);
  overflow-y: auto;
  color: var(--paper-ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.4), transparent 40%),
    linear-gradient(160deg, #f6e8c6, #e7d09c);
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 32, 20, 0.34) transparent;
}
.leaf-paper::-webkit-scrollbar { width: 8px; }
.leaf-paper::-webkit-scrollbar-thumb { background: rgba(42, 32, 20, 0.34); border-radius: 999px; }
.leaf-paper::-webkit-scrollbar-track { background: transparent; }
.leaf-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 90% 90%, rgba(120, 90, 50, 0.16), transparent 40%),
    radial-gradient(circle at 8% 70%, rgba(120, 90, 50, 0.12), transparent 36%);
}
.leaf-kicker {
  margin: 0 0 14px;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.leaf-title {
  margin: 0;
  color: #221a10;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 600;
  line-height: 1.05;
}
.leaf-body {
  margin: 16px 0 0;
  color: rgba(42, 32, 20, 0.84);
  font-size: clamp(0.96rem, 1.4vw, 1.08rem);
  line-height: 1.55;
}
.weather-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.weather-facts span {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(28, 108, 105, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  line-height: 1.25;
}
.weather-facts strong {
  display: block;
  margin-bottom: 2px;
  color: var(--teal);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.weather-omen {
  display: block;
  padding: 14px 15px;
  border-left: 3px solid var(--gold-deep);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 200, 116, 0.18);
}
.weather-omen strong {
  color: #221a10;
  font-family: var(--serif);
  font-weight: 800;
}

/* ── the app's "Private translation" card ── */
.private-translation {
  display: block;
  margin-top: 4px;
  padding: 15px 16px 13px;
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.62);
  border: 1px solid rgba(28, 108, 105, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.pt-label {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pt-line {
  display: block;
  color: #2a2014;
  font-family: var(--serif);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.5;
}
.pt-line strong { color: var(--gold-deep); font-weight: 800; }
.pt-moon {
  display: block;
  margin-top: 10px;
  color: rgba(42, 32, 20, 0.78);
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.45;
}
.pt-meta {
  display: block;
  margin-top: 10px;
  color: rgba(42, 32, 20, 0.5);
  font-size: 0.76rem;
}
.weather-place {
  display: block;
  margin-top: 12px;
  color: rgba(42, 32, 20, 0.5);
  font-size: 0.72rem;
  font-style: italic;
}

/* ── the reader's own one-sentence souvenir ── */
.sentence-polisher {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(28, 108, 105, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 200, 116, 0.22), transparent 48%),
    rgba(255, 252, 244, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.sentence-polisher[hidden] { display: none; }
.margin-note { display: block; }
.margin-note-label {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.margin-note input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(42, 32, 20, 0.22);
  background: rgba(255, 252, 244, 0.7);
  color: #2a2014;
  font-family: var(--serif);
  font-size: 0.98rem;
}
.margin-note input::placeholder { color: rgba(42, 32, 20, 0.45); }
.margin-note input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: transparent;
}
/* the reader's own line, woven into the binding */
.reader-own {
  font-style: italic;
  color: var(--gold-deep);
}

/* ── daypart: the warmth of the visitor's real hour ── */
[data-daypart="dawn"]  { --book-glow: rgba(255, 206, 160, 0.20); }
[data-daypart="day"]   { --book-glow: rgba(255, 200, 116, 0.22); }
[data-daypart="dusk"]  { --book-glow: rgba(214, 150, 220, 0.24); }
[data-daypart="night"] { --book-glow: rgba(255, 184, 96, 0.28); }
.book-cover {
  background:
    radial-gradient(circle at 50% 30%, var(--book-glow, rgba(255, 200, 116, 0.22)), transparent 55%),
    linear-gradient(135deg, #1d1530, #0c0913 60%, #241731);
}

/* ── launch-list email capture ── */
.email-capture { width: min(540px, 100%); margin: 22px auto 4px; }
.email-row { display: flex; gap: 10px; flex-wrap: wrap; }
.email-input {
  flex: 1 1 220px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
}
.email-input::placeholder { color: var(--text-dim); }
.email-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: transparent;
}
.email-submit { white-space: nowrap; }
.email-consent { margin: 11px 0 0; color: var(--text-dim); font-size: 0.8rem; }
.email-status { margin: 9px 0 0; font-size: 0.88rem; font-weight: 600; }
.email-status.ok { color: var(--teal); }
.email-status.err { color: #ff9a8a; }
.email-capture.sent .email-row { opacity: 0.55; }

/* ── the Book of You edition (the braid payoff) ── */
.edition-cover,
.edition-page {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.8vw, 38px);
}
.edition-cover {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  color: #ede6d2;
  background:
    radial-gradient(circle at 50% 30%, rgba(46, 86, 64, 0.55), transparent 62%),
    linear-gradient(160deg, #143025, #0c1c15 72%);
  border-radius: 14px 0 0 14px;
}
.edition-door { width: clamp(64px, 11vw, 92px); height: auto; }
.door-arch { stroke: #cbb37a; stroke-width: 3; }
.door-key { fill: #e7d8a8; }
.edition-rule { margin: 2px 0; color: rgba(201, 179, 122, 0.55); font-size: 1.2rem; line-height: 0.6; }
.edition-imprint {
  margin: 8px 0 0;
  color: rgba(237, 230, 210, 0.92);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.edition-sample { margin: 2px 0 6px; color: rgba(237, 230, 210, 0.45); font-style: italic; font-family: var(--serif); font-size: 0.8rem; }
.edition-chapter { margin: 4px 0 0; color: rgba(237, 230, 210, 0.7); font-family: var(--serif); font-size: 0.94rem; }
.edition-theme {
  margin: 6px 0;
  color: #cbb37a;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  line-height: 1.12;
  text-wrap: balance;
}
.edition-stats { margin: 2px 0 0; color: rgba(237, 230, 210, 0.6); font-size: 0.82rem; }
.edition-bind { margin: 2px 0 0; color: rgba(237, 230, 210, 0.4); font-style: italic; font-family: var(--serif); font-size: 0.76rem; }

.edition-page {
  overflow-y: auto;
  color: #20180e;
  background:
    radial-gradient(circle at 82% 4%, rgba(20, 48, 37, 0.06), transparent 42%),
    linear-gradient(170deg, #efe9d6, #e4dcc2);
  border-radius: 0 14px 14px 0;
  scrollbar-width: thin;
  scrollbar-color: #2c5640 transparent;
}
.edition-page::-webkit-scrollbar { width: 8px; }
.edition-page::-webkit-scrollbar-thumb { background: #2c5640; border-radius: 999px; }
.edition-eyebrow { margin: 0; color: rgba(20, 48, 37, 0.55); font-weight: 800; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; }
.edition-foreword-title { margin: 6px 0 0; color: #143025; font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.edition-foreword-title::after { content: ""; display: block; width: 54px; height: 3px; margin-top: 8px; background: #2c5640; }
.edition-page .braid-intro { margin: 14px 0 10px; color: rgba(20, 48, 37, 0.62); font-style: italic; font-family: var(--serif); }
.edition-page .braid-text {
  margin: 0;
  color: #20180e;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.6vw, 1.24rem);
  line-height: 1.6;
}
.edition-page .reader-own { color: #2c5640; font-style: italic; }

/* The Reader's Sky */
.readers-sky {
  margin: 18px 0 6px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(160deg, #11271d, #0c1c15);
}
.sky-title { margin: 0; color: #ede6d2; font-family: var(--serif); font-size: 1.04rem; text-align: center; }
.sky-sub { margin: 2px 0 8px; color: rgba(237, 230, 210, 0.55); font-style: italic; font-family: var(--serif); font-size: 0.74rem; text-align: center; }
.sky-map { width: 100%; height: auto; display: block; }
.sky-lines line { stroke: rgba(201, 179, 122, 0.5); stroke-width: 0.8; }
.sky-star { fill: #e7d8a8; }
.sky-label { fill: rgba(237, 230, 210, 0.82); font-family: var(--serif); font-style: italic; font-size: 9px; }
.sky-legend { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.sky-legend li { color: rgba(237, 230, 210, 0.75); font-size: 0.74rem; }
.sky-legend li::before { content: "◦ "; color: #cbb37a; }

/* braid email + actions on the cream foreword page */
.braid-email { width: 100%; margin: 16px 0 4px; }
.braid-email-pitch { margin: 0 0 8px; color: #143025; font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.edition-page .email-input { background: rgba(255, 255, 255, 0.6); border-color: rgba(20, 48, 37, 0.25); color: #20180e; }
.edition-page .email-input::placeholder { color: rgba(20, 48, 37, 0.45); }
.edition-page .email-input:focus { outline-color: #2c5640; }
.edition-page .email-consent { color: rgba(20, 48, 37, 0.55); }
.edition-buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.edition-page .edition-keep,
.edition-page .edition-close {
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid #2c5640;
  background: rgba(44, 86, 64, 0.08);
  color: #143025;
  font-family: var(--sans);
  font-weight: 700;
  cursor: pointer;
}
.edition-page .edition-close {
  background: rgba(20, 48, 37, 0.12);
}
.edition-page .edition-keep:hover,
.edition-page .edition-close:hover { background: rgba(44, 86, 64, 0.16); transform: translateY(-1px); }
.edition-page .braid-replay { background: none; border: none; cursor: pointer; color: rgba(20, 48, 37, 0.6); font-family: var(--sans); font-size: 0.84rem; }
.edition-page .braid-replay:hover { color: #143025; }

/* ── peelable page-curl ── */
.leaf-right { transform: rotateY(calc(var(--curl, 0) * -96deg)); }
.leaf-right.curl-anim { transition: transform 330ms cubic-bezier(0.4, 0, 0.2, 1); }
.leaf-right.curling { box-shadow: -24px 0 54px rgba(0, 0, 0, 0.45); }
.page-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58px;
  height: 58px;
  z-index: 6;
  cursor: grab;
  touch-action: none;
  border-bottom-right-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 46%, rgba(255, 255, 255, 0.22) 50%, rgba(0, 0, 0, 0.3) 66%);
  box-shadow: inset -2px -2px 8px rgba(0, 0, 0, 0.25);
  transition: width 180ms ease, height 180ms ease;
}
.page-corner::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-bottom: 16px solid rgba(255, 200, 116, 0.55);
}
.leaf-right:hover .page-corner { width: 74px; height: 74px; }
.page-corner:active { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) {
  .page-corner { display: none; }
  .leaf-right { transform: none; }
}

/* ── candlelight: a warm halo around the book, flickering at the visitor's hour ── */
.book::before {
  content: "";
  position: absolute;
  inset: -10% -8%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(58% 48% at 50% 16%, var(--book-glow, rgba(255, 200, 116, 0.22)), transparent 70%);
  filter: blur(14px);
  opacity: 0.85;
  animation: candleFlicker 5.5s ease-in-out infinite;
}
@keyframes candleFlicker {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  40% { opacity: 0.92; transform: scale(1.015); }
  62% { opacity: 0.66; }
  80% { opacity: 0.86; }
}

/* ── fae-dust: a sparse drift of motes over the book stage ── */
.book-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 232, 188, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 68%, rgba(255, 232, 188, 0.5), transparent 60%),
    radial-gradient(1px 1px at 47% 40%, rgba(255, 232, 188, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 63% 76%, rgba(255, 232, 188, 0.45), transparent 60%),
    radial-gradient(1px 1px at 78% 30%, rgba(255, 232, 188, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 58%, rgba(255, 232, 188, 0.5), transparent 60%),
    radial-gradient(1px 1px at 38% 88%, rgba(255, 232, 188, 0.6), transparent 60%),
    radial-gradient(1px 1px at 70% 12%, rgba(255, 232, 188, 0.55), transparent 60%);
  opacity: 0.55;
  animation: faeDust 16s ease-in-out infinite;
}
@keyframes faeDust {
  0% { transform: translateY(6px); opacity: 0.34; }
  50% { opacity: 0.6; }
  100% { transform: translateY(-10px); opacity: 0.34; }
}
@media (prefers-reduced-motion: reduce) {
  .book::before, .book-stage::after { animation: none; }
}

/* ── ambient Stacks radio inside the Radio book page ── */
.stacks-radio {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 14px;
  min-height: 42px;
  border: 1px solid rgba(28, 108, 105, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(28, 108, 105, 0.12), transparent 42%),
    rgba(255, 252, 244, 0.48);
}
.stacks-radio[hidden] {
  display: none;
}
.radio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(28, 108, 105, 0.30);
  border-radius: 999px;
  color: #18342a;
  background: rgba(28, 108, 105, 0.09);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.radio-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 108, 105, 0.52);
  background: rgba(28, 108, 105, 0.15);
}
.radio-toggle.on {
  border-color: rgba(28, 108, 105, 0.72);
  background: rgba(28, 108, 105, 0.18);
  box-shadow: 0 0 24px rgba(28, 108, 105, 0.2);
}
.stacks-radio .radio-wave {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  width: 18px;
  height: 14px;
}
.stacks-radio .radio-wave i {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: var(--teal);
  opacity: 0.75;
}
.stacks-radio .radio-wave i:nth-child(2) { height: 10px; }
.stacks-radio .radio-wave i:nth-child(3) { height: 14px; }
.stacks-radio .radio-wave i:nth-child(4) { height: 8px; }
.stacks-radio.playing .radio-wave i {
  animation: stacksRadioBars 820ms ease-in-out infinite alternate;
}
.stacks-radio.playing .radio-wave i:nth-child(2) { animation-delay: 110ms; }
.stacks-radio.playing .radio-wave i:nth-child(3) { animation-delay: 220ms; }
.stacks-radio.playing .radio-wave i:nth-child(4) { animation-delay: 330ms; }

/* station picker */
.radio-heading {
  width: 100%;
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
}
.radio-stations { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.radio-station {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 8px 13px;
  border: 1px solid rgba(28, 108, 105, 0.3);
  border-radius: 12px;
  background: rgba(28, 108, 105, 0.07);
  color: #18342a;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.radio-station:hover { transform: translateY(-1px); border-color: rgba(28, 108, 105, 0.52); background: rgba(28, 108, 105, 0.13); }
.radio-station.selected { border-color: rgba(28, 108, 105, 0.72); background: rgba(28, 108, 105, 0.17); }
.radio-station.on { box-shadow: 0 0 22px rgba(28, 108, 105, 0.22); }
.radio-station-name { font-weight: 800; font-size: 0.84rem; }
.radio-station-track { font-size: 0.72rem; color: rgba(42, 32, 20, 0.6); }
.radio-status { display: flex; align-items: center; gap: 9px; width: 100%; }

/* ── Story Page choices ── */
.story-choices { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.story-choices[hidden] { display: none; }
.story-choices-heading {
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
}
.story-options { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.story-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 9px 14px;
  border: 1px solid rgba(28, 108, 105, 0.3);
  border-radius: 12px;
  background: rgba(28, 108, 105, 0.07);
  color: #18342a;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.story-option:hover { transform: translateY(-1px); border-color: rgba(28, 108, 105, 0.52); background: rgba(28, 108, 105, 0.13); }
.story-option.selected { border-color: rgba(28, 108, 105, 0.72); background: rgba(28, 108, 105, 0.17); box-shadow: 0 0 18px rgba(28, 108, 105, 0.16); }
.story-option-label { font-weight: 800; font-size: 0.86rem; }
.story-option-form { font-size: 0.72rem; color: rgba(42, 32, 20, 0.6); }

/* ── Character Page choices ── */
.character-choices { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.character-choices[hidden] { display: none; }
.character-choices-heading {
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
}
.character-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.character-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(28, 108, 105, 0.3);
  border-radius: 12px;
  background: rgba(28, 108, 105, 0.07);
  color: #18342a;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.character-option:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 108, 105, 0.52);
  background: rgba(28, 108, 105, 0.13);
}
.character-option.selected {
  border-color: rgba(28, 108, 105, 0.72);
  background: rgba(28, 108, 105, 0.17);
  box-shadow: 0 0 18px rgba(28, 108, 105, 0.16);
}
.character-option-name { font-weight: 850; font-size: 0.84rem; }
.character-option-tag { font-size: 0.68rem; color: rgba(42, 32, 20, 0.58); }
.character-option-copy {
  margin-top: 3px;
  color: rgba(42, 32, 20, 0.76);
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.32;
}

/* ── Enchantment Page lab ── */
.enchantment-lab {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.enchantment-lab[hidden] { display: none; }
.enchantment-heading {
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
}
.enchantment-spells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.enchantment-spell {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(28, 108, 105, 0.3);
  border-radius: 12px;
  background: rgba(28, 108, 105, 0.07);
  color: #18342a;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.enchantment-spell:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 108, 105, 0.52);
  background: rgba(28, 108, 105, 0.13);
}
.enchantment-spell.selected {
  border-color: rgba(28, 108, 105, 0.72);
  background: rgba(28, 108, 105, 0.17);
  box-shadow: 0 0 18px rgba(28, 108, 105, 0.16);
}
.enchantment-spell-name,
.enchantment-spell-tag,
.enchantment-spell-copy { display: block; }
.enchantment-spell-name { font-weight: 850; font-size: 0.78rem; }
.enchantment-spell-tag { margin-top: 1px; font-size: 0.65rem; color: rgba(42, 32, 20, 0.58); }
.enchantment-spell-copy {
  margin-top: 4px;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-size: 0.72rem;
  line-height: 1.26;
}
.enchantment-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.enchantment-sample {
  border: 1px dashed rgba(28, 108, 105, 0.38);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.54);
  color: rgba(42, 32, 20, 0.78);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 7px 11px;
  cursor: pointer;
}
.enchantment-sample.selected {
  border-style: solid;
  border-color: rgba(28, 108, 105, 0.64);
  background: rgba(28, 108, 105, 0.12);
  color: #18342a;
}
.enchantment-note {
  margin: 0;
  color: rgba(42, 32, 20, 0.64);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.35;
}
.enchantment-reading {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(122, 86, 42, 0.22);
  border-radius: 12px;
  background: rgba(255, 248, 226, 0.58);
  color: rgba(42, 32, 20, 0.86);
  font-family: var(--serif);
  font-size: 0.88rem;
  line-height: 1.42;
}
.enchantment-reading-label {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.enchantment-reading p { margin: 0; }
.enchantment-reading strong { color: #7b572b; }

/* ── Wonder Compass chapter choices ── */
.wonder-choices {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.wonder-choices[hidden] { display: none; }
.wonder-heading {
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.35;
}
.wonder-heading strong { color: #143025; }
.wonder-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.wonder-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(28, 108, 105, 0.3);
  border-radius: 12px;
  background: rgba(28, 108, 105, 0.07);
  color: #18342a;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.wonder-option:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 108, 105, 0.52);
  background: rgba(28, 108, 105, 0.13);
}
.wonder-option.selected {
  border-color: rgba(28, 108, 105, 0.72);
  background: rgba(28, 108, 105, 0.17);
  box-shadow: 0 0 18px rgba(28, 108, 105, 0.16);
}
.wonder-option-name { font-weight: 850; font-size: 0.84rem; }
.wonder-option-tag { font-size: 0.68rem; color: rgba(42, 32, 20, 0.58); }
.wonder-option-copy {
  margin-top: 3px;
  color: rgba(42, 32, 20, 0.76);
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.32;
}

/* ── Fuel Log and Inner Weather pages ── */
.fuel-log,
.inner-weather {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fuel-log[hidden],
.inner-weather[hidden] { display: none; }
.fuel-samples,
.inner-weather-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.fuel-sample,
.inner-weather-option {
  border: 1px dashed rgba(28, 108, 105, 0.38);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.54);
  color: rgba(42, 32, 20, 0.78);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 8px 11px;
  cursor: pointer;
  text-align: left;
}
.fuel-sample:hover,
.inner-weather-option:hover {
  border-color: rgba(28, 108, 105, 0.62);
  background: rgba(255, 252, 244, 0.86);
}
.inner-weather-option {
  display: flex;
  min-width: 118px;
  flex-direction: column;
  gap: 1px;
}
.inner-weather-option.selected {
  border-style: solid;
  border-color: rgba(28, 108, 105, 0.7);
  background: rgba(28, 108, 105, 0.14);
}
.inner-weather-name { color: #18342a; font-size: 0.84rem; }
.inner-weather-tag { color: rgba(42, 32, 20, 0.58); font-size: 0.68rem; font-weight: 700; }
.inner-weather-heading {
  margin: 0;
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
}
.fuel-reading,
.inner-weather-reading {
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(122, 86, 42, 0.22);
  border-radius: 12px;
  background: rgba(255, 248, 226, 0.58);
  color: rgba(42, 32, 20, 0.86);
  font-family: var(--serif);
  font-size: 0.86rem;
  line-height: 1.38;
}
.fuel-reading-label,
.inner-weather-reading-label {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fuel-reading p,
.inner-weather-reading p { margin: 0; }
.fuel-reading p + p { margin-top: 6px; }
.vellum-note { color: rgba(42, 32, 20, 0.66); font-style: italic; }

/* ── One-Sentence Souvenir: borrowable sample lines ── */
.souvenir-sparks { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.souvenir-sparks-label {
  color: rgba(42, 32, 20, 0.6);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
}
.souvenir-samples { display: flex; flex-direction: column; gap: 6px; }
.souvenir-sample {
  text-align: left;
  padding: 8px 12px;
  border: 1px dashed rgba(28, 108, 105, 0.38);
  border-radius: 10px;
  background: rgba(255, 252, 244, 0.5);
  color: rgba(42, 32, 20, 0.86);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 140ms ease;
}
.souvenir-sample:hover {
  border-color: rgba(28, 108, 105, 0.62);
  background: rgba(255, 252, 244, 0.86);
  transform: translateY(-1px);
}
.radio-now {
  color: rgba(42, 32, 20, 0.62);
  font-family: var(--serif);
  font-size: 0.88rem;
  font-style: italic;
}
@keyframes stacksRadioBars {
  from { transform: scaleY(0.55); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stacks-radio.playing .radio-wave i { animation: none; }
}
.leaf-source {
  margin: 14px 0 0;
  color: rgba(42, 32, 20, 0.5);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.onboarding-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(42, 32, 20, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 248, 222, 0.18)),
    rgba(255, 200, 116, 0.12);
  box-shadow: inset 0 0 24px rgba(120, 90, 50, 0.07);
}
.onboarding-panel[hidden] { display: none; }
.onboarding-panel-title,
.onboarding-prompt,
.onboarding-result {
  margin: 0;
}
.onboarding-panel-title {
  color: #221a10;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}
.onboarding-prompt,
.onboarding-result {
  color: rgba(42, 32, 20, 0.68);
  font-size: 0.84rem;
  line-height: 1.42;
}
.onboarding-result {
  font-family: var(--serif);
  font-style: italic;
}
.onboarding-actions,
.onboarding-word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.onboarding-action {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(42, 32, 20, 0.20);
  border-radius: 10px;
  color: rgba(42, 32, 20, 0.76);
  background: rgba(255, 255, 255, 0.34);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.onboarding-action:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 108, 105, 0.34);
  background: rgba(255, 255, 255, 0.48);
}
.onboarding-action.chosen {
  border-color: rgba(28, 108, 105, 0.46);
  color: #18342a;
  background: rgba(76, 192, 189, 0.15);
  box-shadow: inset 0 0 0 1px rgba(76, 192, 189, 0.13);
}
.onboarding-action.word {
  min-width: 96px;
  letter-spacing: 0.08em;
}
.onboarding-field {
  display: grid;
  gap: 7px;
}
.onboarding-field span {
  color: #18342a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.onboarding-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(42, 32, 20, 0.18);
  border-radius: 10px;
  color: #221a10;
  background: rgba(255, 255, 255, 0.52);
  font: 700 0.92rem var(--sans);
}
.onboarding-field input:focus {
  outline: 2px solid rgba(28, 108, 105, 0.30);
  outline-offset: 2px;
}
.onboarding-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.onboarding-action.mode {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 86px;
  padding: 10px;
  text-align: left;
  line-height: 1.2;
}
.onboarding-action.mode strong {
  color: #221a10;
  font-family: var(--serif);
  font-size: 0.94rem;
}
.onboarding-action.mode span {
  color: rgba(42, 32, 20, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
}
.onboarding-roll {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.onboarding-action.roll {
  color: #2a1d0a;
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.onboarding-roll span {
  color: rgba(42, 32, 20, 0.72);
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.32;
}
.keep-controls {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: clamp(14px, 2.2vw, 22px);
  flex-shrink: 0;
}
.keep-controls[hidden],
.keep-status[hidden] { display: none; }
.keep-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(42, 32, 20, 0.2);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}
.keep-btn:hover { transform: translateY(-2px); }
.keep-btn.wait { color: rgba(42,32,20,0.7); background: rgba(255,255,255,0.35); }
.keep-btn.keep { color: #2a1d0a; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-color: var(--gold-deep); }
.keep-btn.chosen { outline: 2px solid var(--teal); outline-offset: 2px; }
.keep-status {
  margin: 14px 0 0;
  color: rgba(42, 32, 20, 0.6);
  font-size: 0.82rem;
  text-align: center;
}

.leaf-screen { position: relative; height: 100%; background: #0b0811; }
.leaf-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.leaf-screen.is-onboarding img { object-position: top center; }
.leaf-screen.is-character img { object-fit: contain; object-position: top center; }
.leaf-screen.is-enchantment img { object-fit: contain; object-position: center; background: #070611; }
.leaf-screen.is-wonder img { object-fit: contain; object-position: center; background: #070611; }
.leaf-screen.is-fuel img,
.leaf-screen.is-inner-weather img { object-fit: contain; object-position: center; background: #070611; }
.kept-stamp {
  position: absolute;
  top: 18px; right: 18px;
  padding: 8px 16px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  color: var(--teal);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-12deg) scale(0.6);
  opacity: 0;
  background: rgba(8, 18, 18, 0.4);
  transition: transform 260ms cubic-bezier(.3,1.5,.5,1), opacity 200ms ease;
}
.leaf-screen.is-kept .kept-stamp { opacity: 1; transform: rotate(-12deg) scale(1); }

/* page-turn animation */
.leaf-right.turn-next { animation: turnNext 620ms ease-in-out; }
.leaf-right.turn-prev { animation: turnPrev 620ms ease-in-out; }
@keyframes turnNext {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(-90deg); box-shadow: -30px 0 60px rgba(0,0,0,0.5); }
  50.01% { transform: rotateY(-90deg); }
  100% { transform: rotateY(0); }
}
@keyframes turnPrev {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(-90deg); box-shadow: 30px 0 60px rgba(0,0,0,0.5); }
  100% { transform: rotateY(0); }
}

/* braid page */
.braid-paper {
  background: radial-gradient(circle at 30% 10%, #fbeecb, #e3ca94);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}
.braid-paper::-webkit-scrollbar { width: 8px; }
.braid-paper::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 999px; }
.braid-paper::-webkit-scrollbar-track { background: transparent; }
/* let the constellation scroll away with the text instead of pinning over it */
.braid-paper .constellation { position: relative; right: auto; bottom: auto; margin: 24px 0 4px auto; }
.braid-title { color: var(--gold-deep); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.braid-intro { margin: 8px 0 18px; color: rgba(42,32,20,0.6); font-style: italic; font-family: var(--serif); }
.braid-text {
  margin: 0;
  color: #241a0d;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.62;
}
.braid-screen { position: relative; height: 100%; background: #0b0811; }
.braid-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.braid-screen-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  gap: 8px;
  padding: 26px 24px 22px;
  text-align: center;
  color: #fdf4e2;
  background: linear-gradient(transparent, rgba(8, 6, 14, 0.76) 20%, rgba(8, 6, 14, 0.96));
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.braid-screen-cap .braid-end-line { color: var(--gold); }
.braid-screen-cap .braid-end-sub { color: rgba(253, 244, 226, 0.82); margin: 0 0 12px; }
.braid-screen-cap .braid-replay { color: rgba(253, 244, 226, 0.7); }
.braid-screen-cap .braid-replay:hover { color: var(--gold); }
.braid-screen-cap .button { justify-self: center; }
/* fallback when the Book of You screenshot is missing */
.braid-screen.no-shot { background: linear-gradient(160deg, #efe0bd, #d9bf88); }
.braid-screen.no-shot .braid-screen-cap {
  position: static;
  height: 100%;
  align-content: center;
  background: none;
  color: var(--paper-ink);
}
.braid-screen.no-shot .braid-end-line { color: #241a0d; }
.braid-screen.no-shot .braid-end-sub { color: rgba(42, 32, 20, 0.7); }
.braid-screen.no-shot .braid-replay { color: rgba(42, 32, 20, 0.6); }

.braid-end {
  align-items: flex-start;
  justify-content: center;
  background: linear-gradient(160deg, #efe0bd, #d9bf88);
}
.braid-end-line { margin: 0; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: #241a0d; }
.braid-end-sub { margin: 10px 0 26px; color: rgba(42,32,20,0.7); line-height: 1.5; }
.braid-replay {
  margin-top: 18px;
  background: none;
  border: none;
  color: rgba(42,32,20,0.6);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.braid-replay:hover { color: var(--gold-deep); }

.constellation { position: absolute; right: 26px; bottom: 22px; width: 150px; height: 110px; opacity: 0.65; }
.constellation span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 14px rgba(76,192,189,0.7); }
.constellation span:nth-child(1){left:10px;top:60px} .constellation span:nth-child(2){left:46px;top:28px}
.constellation span:nth-child(3){left:92px;top:50px} .constellation span:nth-child(4){left:128px;top:16px}
.constellation span:nth-child(5){left:122px;top:86px}

/* nav */
.book-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(10,8,18,0.6);
  backdrop-filter: blur(12px);
}
.book-nav[hidden] { display: none; }
.nav-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms, background 150ms, opacity 150ms;
}
.nav-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--gold); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
.nav-btn.primary { color: #1a1208; border-color: transparent; background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); }
.nav-count { color: var(--text-dim); font-size: 0.9rem; font-weight: 600; min-width: 92px; text-align: center; }
.book-hint { color: var(--text-dim); font-size: 0.9rem; text-align: center; }

/* ───────────────────────── Book of You proof ───────────────────────── */
.braid-proof-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0 clamp(70px, 9vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: center;
}
.braid-proof-copy h2 { color: var(--paper); }
.braid-proof-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.65;
}
.braid-proof-shot {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(370px, 100%);
  padding: 12px;
  border: 1px solid rgba(255, 200, 116, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 200, 116, 0.16), transparent 54%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}
.braid-proof-shot::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 38px;
  background: radial-gradient(circle at 50% 28%, rgba(76, 192, 189, 0.14), transparent 64%);
  filter: blur(12px);
}
.braid-proof-shot img {
  width: 100%;
  aspect-ratio: 106 / 168;
  object-fit: cover;
  border-radius: 22px;
}
.braid-proof-shot figcaption {
  padding: 13px 6px 2px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

/* ───────────────────────── how it works ───────────────────────── */
.how-section, .mechanics-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-card {
  position: relative;
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  transition: transform 220ms ease, border-color 220ms ease;
}
.how-card:hover { transform: translateY(-6px); border-color: rgba(255,200,116,0.4); }
.how-num {
  display: block;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.5;
}
.how-card h3 { margin: 10px 0 12px; font-size: 1.5rem; font-weight: 600; }
.how-card p { margin: 0; color: var(--text-dim); line-height: 1.6; }

/* ───────────────────────── mechanics ───────────────────────── */
.mechanics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mechanic {
  padding: 16px 16px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  transition: transform 220ms ease, border-color 220ms ease;
}
.mechanic:hover { transform: translateY(-6px); border-color: rgba(255,200,116,0.4); }
.mechanic-shot { border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.mechanic-shot img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; object-position: top; }
.mechanic h3 { margin: 20px 0 8px; font-size: 1.4rem; font-weight: 600; color: var(--paper); }
.mechanic p { margin: 0; color: var(--text-dim); line-height: 1.55; font-size: 0.98rem; }

/* ───────────────────────── living systems ───────────────────────── */
.systems-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.anchor-showcase {
  display: grid;
  grid-template-columns: 0.62fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-bottom: 48px;
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 4%, rgba(76, 192, 189, 0.12), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(255, 200, 116, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.03);
}
.anchor-showcase.no-shot { display: none; }
.anchor-phone {
  position: relative;
  justify-self: center;
  width: min(260px, 70%);
  aspect-ratio: 9 / 19.5;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 116, 0.24);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  background: #0b0811;
}
.anchor-slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 700ms ease, transform 5s ease;
}
.anchor-slide.is-active { opacity: 1; transform: scale(1); }
.anchor-showcase-copy h3 { margin: 8px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--paper); }
.anchor-showcase-copy > p { margin: 16px 0 0; color: var(--text-dim); line-height: 1.65; }
.anchor-steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.anchor-steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 14px 10px 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 0.96rem;
  transition: color 240ms ease, border-color 240ms ease, background 240ms ease;
}
.anchor-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 240ms ease;
}
.anchor-steps li.is-active {
  color: var(--text);
  border-color: rgba(76, 192, 189, 0.5);
  background: rgba(76, 192, 189, 0.08);
}
.anchor-steps li.is-active::before {
  color: #0b0811;
  background: var(--teal);
  border-color: var(--teal);
}

.systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.system-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  transition: transform 220ms ease, border-color 220ms ease;
}
.system-card:hover { transform: translateY(-6px); border-color: rgba(255, 200, 116, 0.4); }
.system-glyph {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  font-size: 1.5rem;
  color: var(--gold);
  background: #150f23;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 116, 0.22);
}
.system-card h3 { margin: 18px 0 10px; font-size: 1.5rem; font-weight: 600; color: var(--paper); }
.system-card p { margin: 0; color: var(--text-dim); line-height: 1.6; }
.system-card em { color: var(--gold); font-style: italic; }

/* Page types: a free deck of page kinds, shown as a glyph grid. */
.pagetypes-section { padding: 96px 0; }
.pagetypes-count {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.pagetypes-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.pagetype {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  transition: transform 220ms ease, border-color 220ms ease;
}
.pagetype:hover { transform: translateY(-6px); border-color: rgba(255, 200, 116, 0.4); }
.pagetype-glyph {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--gold);
  background: #150f23;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 116, 0.22);
}
.pagetype h3 { margin: 16px 0 8px; font-size: 1.2rem; font-weight: 600; color: var(--paper); }
.pagetype p { margin: 0; color: var(--text-dim); line-height: 1.55; font-size: 0.95rem; }
.pagetype em { color: var(--gold); font-style: italic; }
.pagetype-shot {
  width: min(54%, 150px);
  margin: 14px auto 0;
}
.pagetype-shot img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.pagetype-shot figcaption {
  margin-top: 8px;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
}
.pagetypes-more {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Editions: a live-rendered mockup of a monthly edition cover, matching the
   real PDF's cover language (dark gradient, gold rule, constellation motif). */
.edition-preview { display: flex; flex-direction: column; align-items: center; text-align: center; }
.edition-preview-cap { margin-top: 18px; }
.edition-cover-mini {
  position: relative;
  width: min(186px, 72%);
  aspect-ratio: 3 / 4.2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px 18px;
  border-radius: 5px 11px 11px 5px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 200, 116, 0.20), transparent 56%),
    linear-gradient(135deg, #16223a, #0a121f 58%, #101a2c);
  border: 1px solid rgba(255, 200, 116, 0.32);
  box-shadow:
    -8px 0 0 -2px rgba(255, 255, 255, 0.05) inset,
    0 34px 64px rgba(0, 0, 0, 0.55);
  transform: rotateY(-15deg) rotateX(3deg);
  transition: transform 300ms ease;
}
.edition-preview:hover .edition-cover-mini { transform: rotateY(-6deg) rotateX(1deg); }
.edition-cover-mini::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 9px;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, rgba(0,0,0,0.45), transparent);
}
.edition-cover-mini::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(255, 200, 116, 0.26);
  border-radius: 4px;
  pointer-events: none;
}
.ec-stars {
  position: absolute;
  inset: 11px 11px 52% 11px;
  background-image:
    radial-gradient(1.4px 1.4px at 22% 38%, rgba(255,225,170,0.9), transparent),
    radial-gradient(1.2px 1.2px at 60% 24%, rgba(255,225,170,0.75), transparent),
    radial-gradient(1.6px 1.6px at 78% 56%, rgba(255,225,170,0.85), transparent),
    radial-gradient(1.1px 1.1px at 40% 66%, rgba(255,225,170,0.6), transparent),
    radial-gradient(1.3px 1.3px at 50% 44%, rgba(255,225,170,0.7), transparent);
  opacity: 0.85;
  pointer-events: none;
}
.ec-kicker {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 200, 116, 0.82);
  z-index: 1;
}
.ec-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.04;
  font-weight: 600;
  color: var(--paper);
  z-index: 1;
}
.ec-chapter {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 228, 191, 0.72);
  z-index: 1;
}
.ec-rule {
  width: 42px;
  height: 1px;
  margin: 2px 0;
  background: linear-gradient(90deg, transparent, rgba(255,200,116,0.7), transparent);
  z-index: 1;
}
.ec-theme {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(255, 200, 116, 0.92);
  z-index: 1;
}
.ec-mark { color: rgba(255, 200, 116, 0.8); font-size: 0.85rem; z-index: 1; }
@media (max-width: 720px) {
  .edition-cover-mini { transform: none; }
}

/* ───────────────────────── the academy ───────────────────────── */
.academy-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.academy-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.academy-gallery {
  position: relative;
  min-height: 460px;
  justify-self: center;
  width: 100%;
}
.academy-phone {
  position: absolute;
  margin: 0;
  width: min(230px, 56%);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 116, 0.24);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  background: #0b0811;
}
.academy-phone img { width: 100%; display: block; }
.academy-phone.no-shot { display: none; }
.academy-phone.back {
  top: 0; left: 4%;
  transform: rotate(-6deg);
  filter: saturate(0.95) brightness(0.9);
  z-index: 1;
}
.academy-phone.front {
  bottom: 0; right: 4%;
  transform: rotate(5deg);
  z-index: 2;
}
.academy-copy p { color: var(--text-dim); font-size: 1.08rem; line-height: 1.65; margin: 0 0 18px; }
.academy-lead { color: var(--text) !important; font-weight: 600; }
.academy-lead em { color: var(--gold); font-style: italic; }
.academy-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.academy-acts li {
  position: relative;
  padding: 11px 14px 11px 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.94rem;
}
.academy-acts li::before {
  content: "✦";
  position: absolute;
  left: 13px;
  color: var(--gold);
  font-size: 0.8rem;
}
.academy-note {
  margin: 0 !important;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.05rem !important;
}
.chapters-panel {
  margin-top: 70px;
  padding: clamp(34px, 5vw, 56px);
  border: 1px solid rgba(255, 200, 116, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 200, 116, 0.13), transparent 48%),
    radial-gradient(circle at 100% 12%, rgba(76, 192, 189, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.035);
}
.chapters-intro {
  max-width: 790px;
  margin: 0 auto 34px;
  text-align: center;
}
.chapters-intro h3 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--paper);
}
.chapters-intro p:last-child {
  margin: 18px auto 0;
  max-width: 720px;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.65;
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.chapter-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(92px, 0.45fr) 1fr;
  gap: 18px;
  align-items: center;
  min-height: 250px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(5, 5, 13, 0.38);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.24);
  transition: transform 220ms ease, border-color 220ms ease;
}
.chapter-card:nth-last-child(2) { grid-column: 2 / span 2; }
.chapter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 200, 116, 0.34);
}
.chapter-card.has-belief {
  border-color: color-mix(in srgb, var(--chapter), transparent 42%);
  box-shadow: 0 24px 64px color-mix(in srgb, var(--chapter), transparent 82%);
}
.chapter-card.emberheart { --chapter: #e36b3d; }
.chapter-card.mossbloom { --chapter: #8db76f; }
.chapter-card.tidecrest { --chapter: #66c5d2; }
.chapter-card.riddlewind { --chapter: #d7a748; }
.chapter-card.duskthorn { --chapter: #8d6bb0; }
.chapter-talisman {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 198px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--chapter), transparent 56%), transparent 58%),
    rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, box-shadow 220ms ease;
}
.chapter-talisman:hover { transform: scale(1.018); }
.chapter-talisman:focus-visible {
  outline: 2px solid var(--chapter);
  outline-offset: 3px;
}
.chapter-card.has-belief .chapter-talisman {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chapter), transparent 28%), 0 0 34px color-mix(in srgb, var(--chapter), transparent 70%);
}
.chapter-talisman img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.02);
}
.chapter-belief-count {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  min-width: 88px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--chapter), white 18%);
  border-radius: 999px;
  color: #fffaf0;
  background: rgba(7, 6, 17, 0.78);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.chapter-copy h4 {
  margin: 0 0 10px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 600;
}
.chapter-copy p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.55;
}
.chapter-copy p + p { margin-top: 10px; }
.chapter-kicker {
  margin-bottom: 7px !important;
  color: var(--chapter) !important;
  font-size: 0.68rem !important;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chapter-belief {
  color: var(--text) !important;
  font-family: var(--serif);
  font-size: 1.02rem !important;
  font-style: italic;
  line-height: 1.42 !important;
}
.chapter-whisper {
  margin: 22px 0 0;
  color: var(--text-dim);
  font-family: var(--serif);
  font-size: 0.94rem;
  font-style: italic;
  text-align: center;
}
.binding-page[hidden] { display: none; }
.binding-page {
  position: relative;
  width: min(720px, 100%);
  margin: 28px auto 0;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--binding-color, var(--gold)), transparent 38%);
  border-radius: 20px;
  color: #2a2014;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--binding-color, var(--gold)), transparent 72%), transparent 48%),
    linear-gradient(155deg, #f6e9c9, #dfc789);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34), 0 0 48px color-mix(in srgb, var(--binding-color, var(--gold)), transparent 84%);
  animation: bindingArrives 620ms cubic-bezier(.2,.78,.2,1) both;
}
.binding-page .eyebrow { color: color-mix(in srgb, var(--binding-color, #9a5c2a), #3a2513 45%); }
.binding-page h4 {
  margin: 4px 0 10px;
  color: #241a0d;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}
.binding-page p:last-child {
  max-width: 570px;
  margin: 0 auto;
  color: rgba(42, 32, 20, 0.78);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.62;
}
.binding-mark { margin: -4px 0 0; color: var(--binding-color, #9a5c2a); font-size: 1.6rem; }
@keyframes bindingArrives {
  from { opacity: 0; transform: translateY(12px) rotateX(-3deg); }
  to { opacity: 1; transform: none; }
}
.chapter-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.chapter-rules p {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid rgba(255, 200, 116, 0.16);
  border-radius: 18px;
  background: rgba(255, 200, 116, 0.045);
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.6;
}
.academy-illus {
  margin: 56px 0 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.academy-illus img { width: 100%; display: block; }
.academy-illus figcaption {
  padding: 18px 24px;
  color: var(--text-dim);
  font-size: 0.95rem;
  text-align: center;
}

.story-page-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  margin-top: 56px;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(255, 200, 116, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 20%, rgba(76, 192, 189, 0.12), transparent 46%),
    radial-gradient(circle at 14% 0%, rgba(255, 200, 116, 0.11), transparent 46%),
    rgba(255, 255, 255, 0.035);
  overflow: hidden;
}
.story-page-copy h3 {
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--paper);
}
.story-page-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.65;
}
.story-page-beats {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.story-page-beats li {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  line-height: 1.45;
}
.story-page-beats strong {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.story-page-screens {
  position: relative;
  min-height: 560px;
}
.story-page-shot {
  position: absolute;
  margin: 0;
  width: min(310px, 58%);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 116, 0.24);
  background: #100d16;
  box-shadow: 0 34px 76px rgba(0, 0, 0, 0.48);
}
.story-page-shot img {
  width: 100%;
  aspect-ratio: 106 / 168;
  object-fit: cover;
}
.story-page-shot.prose {
  top: 0;
  left: 3%;
  transform: rotate(-5deg);
  filter: saturate(0.96) brightness(0.92);
}
.story-page-shot.choices {
  right: 2%;
  bottom: 0;
  transform: rotate(4deg);
}

.weave-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}
.weave-card {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(138, 114, 196, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.03);
  transition: transform 220ms ease, border-color 220ms ease;
}
.weave-card:hover { transform: translateY(-6px); border-color: rgba(255, 200, 116, 0.4); }
.weave-card h3 { margin: 0 0 12px; font-size: 1.5rem; font-weight: 600; color: var(--paper); }
.weave-card p { margin: 0; color: var(--text-dim); line-height: 1.6; }
.weave-thesis {
  max-width: 760px;
  margin: 44px auto 0;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
  color: var(--text);
}
.weave-thesis span { color: var(--gold); font-style: italic; }

/* ───────────────────────── thesis band ───────────────────────── */
.thesis-band {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(50px, 7vw, 90px) 0;
  text-align: center;
}
.thesis-kicker {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.thesis-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
  color: var(--text);
}
.thesis-quote span { color: var(--gold); font-style: italic; }
.thesis-sub { margin: 24px 0 0; color: var(--text-dim); font-size: 1.1rem; }

/* ───────────────────────── content packs ───────────────────────── */
.packs-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.packs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 880px;
}
.pack-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.pack-chip span { font-size: 1.05rem; }
.pack-chip:hover { transform: translateY(-3px); border-color: rgba(255, 200, 116, 0.45); background: rgba(255, 200, 116, 0.06); }

.packs-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
  margin-top: 56px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(138, 114, 196, 0.14), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(255, 200, 116, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.03);
}
.packs-feature-copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--paper); }
.packs-feature-copy p { margin: 16px 0 0; color: var(--text-dim); line-height: 1.65; }
.packs-events { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.packs-events li {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.98rem;
}
.event-when {
  display: inline-block;
  margin-right: 8px;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ───────────────────────── radio ───────────────────────── */
.radio-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.radio-cabinet {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255, 200, 116, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 200, 116, 0.12), transparent 55%),
    linear-gradient(160deg, #1a1426, #0c0913);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.radio-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.radio-emblem {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 14px;
  font-size: 1.5rem;
  background: #110d1c;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 116, 0.22);
}
.radio-readout { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.radio-freq { color: var(--teal); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.12em; }
.radio-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1; }

.onair-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 116, 0.34);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 150ms, background 200ms, border-color 200ms, box-shadow 200ms;
}
.onair-btn:hover { transform: translateY(-1px); border-color: var(--gold); }
.onair-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #5b5266;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
  transition: background 200ms, box-shadow 200ms;
}
.onair-btn.live {
  color: #fff;
  border-color: rgba(214, 74, 64, 0.7);
  background: linear-gradient(180deg, rgba(214,74,64,0.32), rgba(120,30,28,0.32));
  box-shadow: 0 0 28px rgba(214, 74, 64, 0.4);
}
.onair-btn.live .onair-dot {
  background: #ff5a4d;
  box-shadow: 0 0 12px rgba(255, 90, 77, 0.9);
  animation: onairPulse 1.4s ease-in-out infinite;
}
@keyframes onairPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.radio-volume-control {
  --volume-angle: 52.8deg;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: rgba(255, 235, 196, 0.72);
  cursor: pointer;
  user-select: none;
}
.radio-volume-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}
.radio-volume-label output {
  display: inline-block;
  min-width: 2.1ch;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.radio-volume-dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 200, 116, 0.22);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -123deg, rgba(255, 216, 154, 0.48) 0deg 1deg, transparent 1deg 12deg) border-box,
    radial-gradient(circle, transparent 57%, rgba(5, 4, 10, 0.78) 58% 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.58);
}
.radio-volume-control:hover .radio-volume-dial {
  border-color: rgba(255, 200, 116, 0.5);
}
.radio-volume-control:focus-within .radio-volume-dial {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.radio-volume-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: grab;
  touch-action: none;
}
.radio-volume-input:active { cursor: grabbing; }
.radio-volume-knob {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid #2a1d0a;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.74), transparent 18%),
    radial-gradient(circle at 50% 45%, var(--gold), #a86429 72%);
  box-shadow: 0 5px 14px rgba(0,0,0,0.52), inset 0 0 0 2px rgba(255,255,255,0.10);
  transform: rotate(var(--volume-angle));
  transition: transform 90ms cubic-bezier(.2,.75,.2,1), filter 180ms ease;
}
.radio-volume-input:active + .radio-volume-knob,
.radio-volume-control.is-adjusting .radio-volume-knob { transition: none; }
.radio-volume-pointer {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: #3a220c;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16);
  transform: translateX(-50%);
}
.radio-volume-control.is-muted .radio-volume-knob {
  filter: saturate(0.45) brightness(0.72);
}

.radio-power-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 200, 116, 0.28);
  border-radius: 999px;
  color: rgba(255, 235, 196, 0.86);
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms, color 180ms, border-color 180ms, box-shadow 180ms;
}
.radio-power-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(214, 74, 64, 0.72);
  box-shadow: 0 0 22px rgba(214, 74, 64, 0.24), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.radio-power-btn:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.radio-dial { position: relative; margin: 26px 0 8px; padding-top: 18px; }
.dial-ticks {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 18px;
  background-image: repeating-linear-gradient(90deg,
    rgba(255, 200, 116, 0.5) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  opacity: 0.6;
}
.dial-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), #2a2236);
  cursor: pointer;
}
.dial-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 60%, var(--gold-deep));
  border: 2px solid #2a1d0a;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5), 0 0 18px rgba(255, 200, 116, 0.5);
  cursor: grab;
}
.dial-input::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 60%, var(--gold-deep));
  border: 2px solid #2a1d0a;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  cursor: grab;
}
.dial-scale { position: relative; height: 26px; margin-top: 8px; }
.scale-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms;
}
.scale-mark:hover { color: var(--gold); }
.scale-mark i {
  display: block;
  width: 1px; height: 8px;
  margin: 0 auto 4px;
  background: var(--gold);
}

.radio-card {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 18px;
  color: var(--paper-ink);
  background: linear-gradient(160deg, #f4e6c4, #e4cd97);
  transition: background 240ms ease, box-shadow 240ms ease;
}
.radio-card.live { box-shadow: 0 0 0 1px rgba(214,74,64,0.4), 0 18px 50px rgba(214,74,64,0.18); }
.radio-card.between { background: linear-gradient(160deg, #e8e2d4, #cfc8b6); }
.radio-card.pirate {
  color: #e9f7df;
  border-color: rgba(126, 226, 124, 0.32);
  background:
    repeating-linear-gradient(0deg, rgba(126, 226, 124, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 12% 0%, rgba(126, 226, 124, 0.16), transparent 48%),
    #101511;
  box-shadow: 0 0 0 1px rgba(126, 226, 124, 0.1), 0 22px 64px rgba(16, 70, 34, 0.28);
}
.radio-card.pirate .radio-signal { color: #8fe58d; }
.radio-card.pirate .radio-tagline,
.radio-card.pirate .track-meta strong { color: #efffe9; }
.radio-card.pirate .radio-effect,
.radio-card.pirate .track-meta small,
.radio-card.pirate .radio-note { color: rgba(225, 255, 220, 0.66); }
.radio-card.pirate .track {
  border-color: rgba(126, 226, 124, 0.18);
  background: rgba(126, 226, 124, 0.07);
}
.radio-card.pirate .radio-wave-shell {
  border-color: rgba(126, 226, 124, 0.24);
  background:
    linear-gradient(rgba(126, 226, 124, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 226, 124, 0.08) 1px, transparent 1px),
    rgba(0, 0, 0, 0.24);
  background-size: 100% 18px, 24px 100%, auto;
}
.radio-card.on-banter {
  background: linear-gradient(160deg, #fff0c8, #dfba69);
  box-shadow: 0 0 0 1px rgba(28,108,105,0.26), 0 18px 54px rgba(28,108,105,0.18);
}
.radio-card.on-banter .radio-signal {
  color: #8f2e2b;
}
.radio-card.on-banter .track.now-playing {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(42, 32, 20, 0.16);
}
.radio-signal {
  display: flex;
  gap: 8px;
  margin: 0;
  color: #1c6c69;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
}
.signal-icon { font-size: 1.1rem; line-height: 1.2; }
.radio-tagline {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: #241a0d;
}
.radio-effect {
  margin: 14px 0 0;
  color: rgba(42, 32, 20, 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.radio-wave-shell {
  position: relative;
  height: clamp(70px, 12vw, 104px);
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid rgba(42, 32, 20, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(rgba(28, 108, 105, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 108, 105, 0.10) 1px, transparent 1px),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.42), transparent 34%),
    rgba(35, 26, 13, 0.08);
  background-size: 100% 18px, 24px 100%, auto, auto;
  box-shadow: inset 0 1px 8px rgba(35, 26, 13, 0.14);
}
.radio-wave-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.radio-card.live .radio-wave-shell::before {
  opacity: 1;
  animation: radioScan 3.2s linear infinite;
}
.radio-card.on-banter .radio-wave-shell {
  border-color: rgba(143, 46, 43, 0.28);
  background:
    linear-gradient(rgba(143, 46, 43, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 46, 43, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.42), transparent 34%),
    rgba(70, 30, 18, 0.10);
}
.radio-wave {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes radioScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .radio-card.live .radio-wave-shell::before {
    animation: none;
  }
}
.track-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(42, 32, 20, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.34);
}
.track.playable { cursor: pointer; transition: background 150ms, transform 150ms; }
.track.playable:hover { background: rgba(255, 255, 255, 0.6); transform: translateX(2px); }
.track:not(.playable) { opacity: 0.6; }
.track.now-playing { background: linear-gradient(90deg, rgba(255,200,116,0.5), rgba(255,255,255,0.4)); border-color: var(--gold-deep); }
.track-state { width: 18px; text-align: center; color: var(--gold-deep); font-size: 0.95rem; }
.track-meta { display: flex; flex-direction: column; margin-right: auto; }
.track-meta strong { font-size: 0.98rem; color: #241a0d; }
.track-meta small { font-size: 0.78rem; color: rgba(42, 32, 20, 0.55); }
.track-tag { font-size: 0.72rem; font-weight: 700; color: rgba(42, 32, 20, 0.5); }
.track.blessed-locked {
  opacity: 1;
  border-style: dashed;
  border-color: rgba(255, 200, 116, 0.55);
  background: rgba(255, 200, 116, 0.12);
}
.track.blessed-locked .track-state,
.track.blessed-locked .track-tag { color: var(--gold-deep); }
.track.blessed:not(.now-playing) {
  border-color: var(--gold-deep);
  background: rgba(255, 200, 116, 0.2);
}
.track.blessed .track-tag { color: var(--gold-deep); }
.radio-note {
  margin: 14px 0 0;
  color: rgba(42, 32, 20, 0.6);
  font-size: 0.85rem;
  font-style: italic;
}
.radio-card.on-banter .radio-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid #1c6c69;
  border-radius: 0 10px 10px 0;
  color: #241a0d;
  background: rgba(255, 255, 255, 0.34);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.45;
}
.radio-note:empty { display: none; }

/* ───────────────────────── privacy ───────────────────────── */
.privacy-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.privacy-copy p { color: var(--text-dim); font-size: 1.1rem; line-height: 1.65; margin: 18px 0 0; }
.privacy-list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.privacy-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
}
.privacy-list li::before {
  content: "✦";
  position: absolute;
  left: 16px;
  color: var(--gold);
}
.privacy-art { margin: 0; justify-self: end; }
.privacy-art img {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ───────────────────────── stacks search ───────────────────────── */
.stacks-search-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 78px) 0 clamp(66px, 8vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}
.stacks-search-copy p {
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.65;
}
.semantic-search-demo {
  margin: 28px 0 0;
}
.semantic-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.semantic-search-form .margin-note {
  margin: 0;
}
.semantic-search-form input[type="search"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 200, 116, 0.45);
  border-radius: 18px;
  padding: 0 18px;
  color: var(--paper-ink);
  background: linear-gradient(180deg, #f6e6c0, #e9d7aa);
  font-family: var(--serif);
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.26), 0 16px 34px rgba(0,0,0,0.24);
}
.semantic-search-form input[type="search"]::placeholder {
  color: rgba(42, 32, 20, 0.46);
}
.semantic-search-submit {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(76, 192, 189, 0.36);
  border-radius: 18px;
  color: var(--paper);
  background: rgba(20, 86, 86, 0.36);
  font-weight: 800;
  cursor: pointer;
}
.semantic-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 0;
}
.semantic-search-suggestions button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(76, 192, 189, 0.30);
  border-radius: 999px;
  color: color-mix(in srgb, var(--teal) 78%, var(--paper));
  background: rgba(76, 192, 189, 0.08);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  cursor: pointer;
}
.semantic-search-results {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}
.semantic-search-count {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}
.semantic-search-count strong {
  color: var(--gold);
}
.semantic-result {
  padding: 14px 16px;
  border: 1px solid rgba(255, 200, 116, 0.24);
  border-radius: 14px;
  color: rgba(42, 32, 20, 0.76);
  background: linear-gradient(180deg, rgba(246, 230, 192, 0.98), rgba(229, 210, 164, 0.96));
  box-shadow: 0 16px 38px rgba(0,0,0,0.18);
}
.semantic-result span {
  display: block;
  margin-bottom: 5px;
  color: #0f7778;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.semantic-result strong {
  display: block;
  color: var(--paper-ink);
  font-family: var(--serif);
  font-size: 1.08rem;
}
.semantic-result p {
  margin: 5px 0 0;
  color: rgba(42, 32, 20, 0.68);
  font-size: 0.92rem;
  line-height: 1.4;
}
.book-search-demo {
  padding: 14px;
  border: 1px solid rgba(255, 200, 116, 0.22);
  border-radius: 16px;
  background: rgba(30, 22, 13, 0.08);
}
.book-search-demo .semantic-search-form {
  grid-template-columns: 1fr;
}
.book-search-demo .semantic-search-submit {
  min-height: 40px;
}
.book-search-demo .semantic-search-results {
  max-height: 240px;
  overflow: auto;
}
.book-search-demo .semantic-search-count {
  color: rgba(42, 32, 20, 0.62);
}
.stacks-search-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.stacks-search-points li {
  position: relative;
  padding: 13px 16px 13px 42px;
  border: 1px solid rgba(76, 192, 189, 0.24);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(76, 192, 189, 0.075);
}
.stacks-search-points li::before {
  content: "⌕";
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
  font-weight: 800;
}
.stacks-search-art {
  position: relative;
  min-height: clamp(420px, 48vw, 620px);
}
.stacks-phone {
  position: absolute;
  margin: 0;
  width: min(36vw, 250px);
  border-radius: 30px;
  border: 1px solid rgba(255, 200, 116, 0.18);
  overflow: hidden;
  background: #080612;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}
.stacks-phone img {
  width: 100%;
  aspect-ratio: 473 / 1024;
  object-fit: cover;
  object-position: top;
}
.stacks-phone.phone-empty {
  left: 0;
  top: 8%;
  transform: rotate(-5deg);
  z-index: 1;
}
.stacks-phone.phone-results {
  left: 32%;
  top: 0;
  transform: rotate(3deg);
  z-index: 3;
}
.stacks-phone.phone-reading {
  right: 0;
  top: 14%;
  transform: rotate(7deg);
  z-index: 2;
}
.stacks-phone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent 18%, transparent 78%, rgba(7,6,17,0.18));
}

/* ───────────────────────── ebook ───────────────────────── */
.ebook-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.ebook-prompts {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  color: var(--gold);
}
.ebook-body { margin: 20px 0 0; color: var(--text-dim); font-size: 1.1rem; line-height: 1.65; }
.ebook-body strong { color: var(--text); }
.ebook-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.ebook-facts li {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.ebook-facts strong { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); line-height: 1; }
.ebook-facts span { margin-top: 4px; font-size: 0.8rem; color: var(--text-dim); }

.ebook-art { margin: 0; display: grid; place-items: center; perspective: 1400px; }
.ebook-cover {
  position: relative;
  width: min(280px, 80%);
  aspect-ratio: 3 / 4.3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 30px 26px;
  text-align: center;
  border-radius: 6px 12px 12px 6px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 200, 116, 0.22), transparent 55%),
    linear-gradient(135deg, #221634, #0e0a16 58%, #2a1830);
  border: 1px solid rgba(255, 200, 116, 0.3);
  box-shadow:
    -10px 0 0 -2px rgba(255, 255, 255, 0.06) inset,
    0 50px 100px rgba(0, 0, 0, 0.6);
  transform: rotateY(-18deg) rotateX(4deg);
  transition: transform 300ms ease;
}
.ebook-art:hover .ebook-cover { transform: rotateY(-8deg) rotateX(2deg); }
.ebook-cover::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 12px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.4), transparent);
}
.ebook-cover::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 200, 116, 0.28);
  border-radius: 4px;
  pointer-events: none;
}
.ebook-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px 12px 12px 6px;
  z-index: 2;
}
.ebook-kicker { color: var(--paper); font-family: var(--serif); font-style: italic; font-size: 0.9rem; opacity: 0.8; }
.ebook-title { color: var(--gold); font-family: var(--serif); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 0.95; }
.ebook-sub { color: var(--paper); font-size: 0.82rem; opacity: 0.75; }
.ebook-mark { margin-top: 6px; color: var(--gold); font-size: 1.3rem; }

/* ───────────────────────── promises ───────────────────────── */
.promises-section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 70px) 0 0;
  text-align: center;
}
.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.promises li {
  position: relative;
  padding: 12px 22px;
  border: 1px solid rgba(255, 200, 116, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
}
.promise-star { color: var(--gold); }
.promises-positive {
  margin: 22px auto 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--text);
}
.promises-positive strong { color: var(--gold); }
.promises-note {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}
.promises-note a { color: var(--gold); border-bottom: 1px solid rgba(255, 200, 116, 0.4); }
.promises-note a:hover { border-color: var(--gold); }
.promises-license {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}
.promises-license a { color: var(--gold); border-bottom: 1px solid rgba(255, 200, 116, 0.4); }
.promises-license a:hover { border-color: var(--gold); }
.promises-license em { color: var(--paper); font-style: italic; }

.patreon-card {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(560px, 100%);
  margin: 28px auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 200ms ease, border-color 200ms ease;
}
.patreon-card:hover { transform: translateY(-3px); border-color: rgba(255, 200, 116, 0.4); }
.patreon-shot {
  flex: 0 0 88px;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
.patreon-shot img { width: 88px; aspect-ratio: 9 / 14; object-fit: cover; object-position: top; }
.patreon-cap { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }
.patreon-cap strong { display: block; margin-bottom: 4px; color: var(--gold); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.patreon-card.no-shot .patreon-shot { display: none; }

/* ───────────────────────── final cta ───────────────────────── */
.final-cta {
  width: min(960px, calc(100% - 40px));
  margin: clamp(40px, 6vw, 80px) auto;
}
.cta-inner {
  padding: clamp(50px, 7vw, 90px) 30px;
  border: 1px solid rgba(255,200,116,0.24);
  border-radius: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,200,116,0.18), transparent 50%),
    rgba(255,255,255,0.04);
}
.cta-inner h2 { color: var(--gold); margin-top: 6px; }
.cta-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 22px auto 0;
  padding: 8px 18px;
  border: 1px solid rgba(255, 200, 116, 0.28);
  border-radius: 999px;
  background: rgba(255, 200, 116, 0.07);
  font-size: 0.92rem;
  color: var(--text-dim);
}
.cta-status strong { color: var(--paper); font-weight: 600; }
.cta-status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6ee787;
  box-shadow: 0 0 0 0 rgba(110, 231, 135, 0.6);
  animation: ctaPulse 2.4s ease-out infinite;
}
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 135, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(110, 231, 135, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 135, 0); }
}
@media (prefers-reduced-motion: reduce) { .cta-status-dot { animation: none; } }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
}
.cta-actions .button { margin-top: 0; }
.cta-fine { margin-top: 20px; font-size: 0.86rem; color: var(--text-dim); }

/* ───────────────────────── footer ───────────────────────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 50px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.footer-dedication {
  border: 1px solid rgba(255, 200, 116, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--gold);
  background: rgba(255, 200, 116, 0.06);
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, transform 160ms;
}
.footer-dedication:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 200, 116, 0.48);
  background: rgba(255, 200, 116, 0.12);
}
.footer-cats {
  position: relative;
  width: 54px;
  height: 34px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.footer-cats:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.cat-eyes {
  display: flex;
  justify-content: center;
  gap: 13px;
  opacity: 0.42;
  transition: opacity 180ms ease, transform 180ms ease;
}
.footer-cats:hover .cat-eyes,
.footer-cats[aria-expanded="true"] .cat-eyes { opacity: 1; transform: translateY(-2px); }
.cat-eyes i {
  position: relative;
  display: block;
  width: 9px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 200, 116, 0.72);
  transform-origin: 50% 54%;
  will-change: transform;
}
.footer-cats.is-blinking .cat-eyes i {
  animation: catBlink 280ms cubic-bezier(.36, 0, .2, 1) both;
}
.footer-cats.is-blinking .cat-eyes i:nth-child(2) {
  animation-delay: 14ms;
}
.cat-eyes i::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 1px;
  height: 9px;
  background: #221606;
  animation: catGaze 9s cubic-bezier(.45, 0, .2, 1) infinite;
  will-change: transform;
}
@keyframes catBlink {
  0%, 100% { transform: scaleY(1); }
  42%, 58% { transform: scaleY(0.055); }
}
@keyframes catGaze {
  0%, 18%, 100% { transform: translateX(0); }
  23%, 44% { transform: translateX(-1.5px); }
  50%, 72% { transform: translateX(1.5px); }
  78%, 94% { transform: translateX(0); }
}
.cat-note {
  flex-basis: 100%;
  margin-top: 8px;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid rgba(255, 200, 116, 0.24);
  border-radius: 18px;
  color: rgba(253, 244, 226, 0.76);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 200, 116, 0.12), transparent 42%),
    rgba(255, 200, 116, 0.045);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: archivistsArrive 420ms cubic-bezier(.2,.78,.2,1) both;
}
.cat-note[hidden] { display: none; }
.cat-portrait {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  margin: 0;
}
.cat-portrait img {
  width: 100%;
  height: auto;
  min-width: 0;
  aspect-ratio: 1290 / 1800;
  object-fit: contain;
  border: 1px solid rgba(255, 216, 154, 0.34);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}
.cat-portrait figcaption {
  display: grid;
  gap: 9px;
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.55;
}
.cat-portrait strong {
  color: var(--gold-soft);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: normal;
}
.cat-portrait span { max-width: 560px; }
@keyframes archivistsArrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-eyes i::after { animation: none; }
  .footer-cats.is-blinking .cat-eyes i { animation: none; }
}

.dedication-modal[hidden] { display: none; }
.dedication-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.dedication-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.78);
  backdrop-filter: blur(10px);
}
.dedication-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(255, 200, 116, 0.34);
  border-radius: 18px;
  color: var(--paper-ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.42), transparent 38%),
    linear-gradient(160deg, #f6e8c6, #e2c989);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
}
.dedication-panel h2 {
  margin: 0;
  color: #241a0d;
  font-size: clamp(1.9rem, 4vw, 3rem);
}
.dedication-byline {
  margin: 10px 0 22px;
  color: rgba(42, 32, 20, 0.64);
  font-weight: 800;
}
.dedication-copy {
  display: grid;
  gap: 16px;
}
.dedication-copy p {
  margin: 0;
  color: rgba(42, 32, 20, 0.82);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.68;
}
.dedication-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(42, 32, 20, 0.18);
  border-radius: 999px;
  color: #241a0d;
  background: rgba(255, 255, 255, 0.3);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ───────────────────────── hidden lore marginalia ───────────────────────── */
.lore-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 200, 116, 0.55);
  transition: color 0.2s ease, text-decoration-color 0.2s ease, text-shadow 0.2s ease;
}
.lore-link:hover,
.lore-link:focus-visible {
  color: var(--gold, #ffce7c);
  text-decoration-color: rgba(255, 200, 116, 0.9);
  text-shadow: 0 0 14px rgba(255, 200, 116, 0.4);
  outline: none;
}
.lore-link::after {
  content: "✦";
  font-size: 0.62em;
  vertical-align: super;
  margin-left: 1px;
  opacity: 0.5;
}
.lore-link:hover::after,
.lore-link:focus-visible::after { opacity: 0.95; }
em .lore-link, .lore-link em { font-style: italic; }

.lore-modal[hidden] { display: none; }
.lore-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}
.lore-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.8);
  backdrop-filter: blur(10px);
}
.lore-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: clamp(24px, 3.6vw, 38px);
  border: 1px solid rgba(255, 200, 116, 0.34);
  border-radius: 18px;
  color: var(--paper-ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.42), transparent 40%),
    linear-gradient(160deg, #f6e8c6, #e2c989);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  animation: lore-rise 0.34s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes lore-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.lore-kicker { margin: 0 0 4px; color: rgba(120, 78, 26, 0.86); }
.lore-modal-title {
  margin: 0 0 14px;
  color: #241a0d;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.12;
}
.lore-figure {
  margin: 0 0 16px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(36, 26, 13, 0.06);
  border: 1px solid rgba(42, 32, 20, 0.16);
}
.lore-figure img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}
.lore-gallery-nav {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-top: 1px solid rgba(42, 32, 20, 0.14);
  color: rgba(42, 32, 20, 0.76);
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}
.lore-gallery-nav[hidden] { display: none; }
.lore-gallery-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 1px solid rgba(42, 32, 20, 0.2);
  border-radius: 999px;
  color: #241a0d;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}
.lore-gallery-button:hover,
.lore-gallery-button:focus-visible { background: rgba(255, 255, 255, 0.68); }
.lore-panel[data-lore-kind="talisman"] .lore-figure img { max-height: 240px; padding: 14px; }
.lore-copy { display: grid; gap: 14px; }
.lore-copy p {
  margin: 0;
  color: rgba(42, 32, 20, 0.85);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.66;
}
.lore-trythis {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px dashed rgba(60, 96, 92, 0.5);
  background: rgba(60, 110, 104, 0.1);
}
.lore-trythis-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2c5f59;
}
.lore-trythis p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(28, 48, 44, 0.9);
}
.lore-sign {
  margin: 18px 0 0;
  text-align: right;
  font-family: var(--serif);
  font-style: italic;
  color: rgba(42, 32, 20, 0.6);
}
.lore-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(42, 32, 20, 0.18);
  border-radius: 999px;
  color: #241a0d;
  background: rgba(255, 255, 255, 0.3);
  font-size: 1.4rem;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .lore-panel { animation: none; }
}

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 1100px) {
  .pagetypes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .site-header { gap: 10px; padding-left: 10px; }
  .glow-pill { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; min-height: auto; }
  /* Lead with the words: headline + CTA come first, the art sits below them. */
  .hero-art { order: 0; max-width: 420px; margin: 40px auto 0; }
  .how-grid, .mechanics-grid { grid-template-columns: 1fr; }
  .braid-proof-section { grid-template-columns: 1fr; }
  .braid-proof-shot { transform: none; }
  .systems-grid { grid-template-columns: 1fr; }
  .pagetypes-grid { grid-template-columns: 1fr; }
  .anchor-showcase { grid-template-columns: 1fr; }
  .anchor-phone { order: -1; }
  .academy-feature { grid-template-columns: 1fr; }
  .academy-gallery { order: -1; min-height: 420px; }
  .academy-acts { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-card,
  .chapter-card:nth-last-child(2) { grid-column: auto; }
  .chapter-rules { grid-template-columns: 1fr; }
  .story-page-feature { grid-template-columns: 1fr; }
  .story-page-screens {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .story-page-shot {
    position: relative;
    width: 100%;
  }
  .story-page-shot.prose,
  .story-page-shot.choices {
    inset: auto;
    transform: none;
  }
  .weave-grid { grid-template-columns: 1fr; }
  .packs-feature { grid-template-columns: 1fr; }
  .privacy-section { grid-template-columns: 1fr; }
  .stacks-search-section { grid-template-columns: 1fr; }
  .stacks-search-art {
    min-height: clamp(360px, 70vw, 560px);
    order: -1;
  }
  .stacks-phone { width: min(34vw, 220px); }
  .ebook-section { grid-template-columns: 1fr; }
  .ebook-art { order: -1; }
  .privacy-art { justify-self: center; }
}

@media (max-width: 680px) {
  .book { aspect-ratio: auto; }
  .book-stage { gap: 14px; }
  /* stack the spread vertically on phones */
  .spread { position: relative; grid-template-columns: 1fr; }
  .book[data-state="open"] #spread,
  .book[data-state="braid"] #braid { position: relative; }
  .book[data-state="closed"] #spread,
  .book[data-state="closed"] #braid,
  .book[data-state="open"] #braid,
  .book[data-state="braid"] #spread { display: none; }
  .book-cover { position: relative; width: 100%; aspect-ratio: 3 / 4; }
  .leaf-left { border-radius: 14px 14px 0 0; border: 1px solid rgba(0,0,0,0.4); }
  .leaf-right { border-radius: 0 0 14px 14px; }
  .spread::after { display: none; }
  .stacks-search-section { padding-top: 48px; }
  .stacks-search-art { min-height: 430px; }
  .stacks-phone { width: min(44vw, 178px); border-radius: 22px; }
  .stacks-phone.phone-empty { left: 0; top: 34px; }
  .stacks-phone.phone-results { left: 27%; top: 0; }
  .stacks-phone.phone-reading { right: 0; top: 56px; }
  .stacks-search-points li { border-radius: 16px; }
  .semantic-search-form { grid-template-columns: 1fr; }
  .semantic-search-submit { min-height: 44px; }
  .leaf-screen { aspect-ratio: 9 / 13; }
  .onboarding-mode-grid { grid-template-columns: 1fr; }
  .onboarding-roll { grid-template-columns: 1fr; }
  .onboarding-action.mode { min-height: 0; }
  .character-options { grid-template-columns: 1fr; }
  .enchantment-spells { grid-template-columns: 1fr; }
  .braid-end { aspect-ratio: 9 / 13; align-items: center; text-align: center; }
  .book-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
  }
  .nav-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
  }
  .nav-count {
    min-width: auto;
    flex: 0 0 auto;
    font-size: 0.82rem;
  }
  .chapters-panel { padding: 26px 18px; }
  .chapter-card { grid-template-columns: 1fr; min-height: 0; }
  .chapter-talisman { min-height: 190px; max-height: 240px; }
  .return-note { border-radius: 14px; }
  .cat-portrait { grid-template-columns: 1fr; }
  .cat-portrait img { width: min(100%, 420px); margin: 0 auto; }
  .cat-portrait figcaption { text-align: center; }
  .cat-portrait span { margin: 0 auto; }
  .story-page-feature { padding: 26px 18px; }
  .story-page-screens { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .glow-pill {
    min-width: min(204px, calc(100vw - 92px));
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .glow-orb { width: 28px; height: 28px; }
  .glow-count { font-size: 0.82rem; }
  .glow-menu {
    justify-items: center;
    align-items: start;
    padding: 92px 12px 18px;
  }
  .glow-sheet {
    width: min(100%, 430px);
    max-height: calc(100svh - 110px);
    padding: 122px 14px 86px;
    border-radius: 30px;
  }
  .glow-sheet-pill {
    top: 14px;
    min-width: min(330px, calc(100% - 42px));
    gap: 10px;
    padding: 14px 18px;
    border-width: 2px;
  }
  .glow-sheet-notch {
    width: 96px;
    height: 58px;
    top: 60px;
    font-size: 2.1rem;
  }
  .glow-command {
    grid-template-columns: 76px minmax(0, 1fr) 22px;
    min-height: 104px;
    gap: 12px;
    padding: 13px 12px;
  }
  .glow-command img { padding: 9px; }
  .glow-command::after { font-size: 3rem; }
  .glow-spend { padding-right: 0; }
  .glow-close {
    right: 18px;
    bottom: 18px;
    width: 62px;
    height: 62px;
    font-size: 2.5rem;
  }
  /* On phones the floating cards + chips overlap into a cluttered pile, so show
     just the main phone, sized to fill its box cleanly. */
  .hero-art { aspect-ratio: auto; max-width: 300px; }
  .hero-float, .hero-chip { display: none; }
  .hero-phone { width: 100%; transform: rotate(-2deg); }
  .radio-top { flex-wrap: wrap; }
  .onair-btn { flex: 1; justify-content: center; }
}

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

/* ───────────────────────── mobile section drawers ─────────────────────────
   Desktop: the wrapper divs are transparent (display:contents) and the toggle
   bar is hidden, so flagged sections render exactly as before. Mobile: the
   section collapses behind a tap-to-open bar carrying its own title. */
.drawer-toggle { display: none; }
.is-drawer .drawer-body,
.is-drawer .drawer-inner { display: contents; }

@media (max-width: 720px) {
  section[data-drawer].is-drawer {
    width: min(var(--maxw), calc(100% - 36px));
    margin: 0 auto;
    padding: 0 0 14px;
  }

  .drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding: 20px 20px;
    margin: 0;
    color: var(--paper);
    font: inherit;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: border-color 200ms ease, background 200ms ease;
  }
  .drawer-toggle:hover,
  .drawer-toggle:focus-visible { border-color: rgba(255, 200, 116, 0.4); }
  .is-drawer.is-open .drawer-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .drawer-toggle-text { display: flex; flex-direction: column; gap: 4px; }
  .drawer-toggle-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold);
  }
  .drawer-toggle-label {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
  }
  .drawer-chevron {
    flex: 0 0 auto;
    width: 11px; height: 11px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 250ms ease;
  }
  .is-drawer.is-open .drawer-chevron { transform: rotate(225deg); margin-top: 4px; }

  /* collapse mechanism: animate the single inner row from 0fr to 1fr */
  .is-drawer .drawer-body {
    display: grid;
    grid-template-rows: 0fr;
    border: 1px solid transparent;
    border-top: none;
    border-radius: 0 0 18px 18px;
    transition: grid-template-rows 320ms ease;
  }
  .is-drawer.is-open .drawer-body {
    grid-template-rows: 1fr;
    border-color: var(--line);
  }
  .is-drawer .drawer-inner {
    display: block;
    overflow: hidden;
    min-height: 0;
  }
  .is-drawer.is-open .drawer-inner { padding: 18px 18px 6px; }

  /* the toggle bar already carries the title, so hide the in-body heading */
  .is-drawer .section-head { display: none; }
  /* sections without a .section-head carry their title inside a copy column -
     hide that block's eyebrow + heading so it isn't duplicated by the bar */
  .is-drawer .ebook-copy > .eyebrow,
  .is-drawer .ebook-copy > h2,
  .is-drawer .privacy-copy > .eyebrow,
  .is-drawer .privacy-copy > h2 { display: none; }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .is-drawer .drawer-body { transition: none; }
  .drawer-chevron { transition: none; }
}

/* ═══════════════════════ narrative restructure (acts + TOC leaf + ribbon) ═══
   The scroll now reads as acts: ache → play the book → understand → payoff →
   thesis → a Table-of-Contents leaf that binds the deep chapters. Everything
   below is additive and scoped; section content styles are untouched. */

/* ── the three steps, de-boxed into a ledger strip (desktop) ── */
@media (min-width: 721px) {
  .how-section { padding: clamp(44px, 6vw, 76px) 0 clamp(36px, 5vw, 60px); }
  .how-section .how-grid { gap: 0; border-top: 1px solid var(--line); }
  .how-section .how-card {
    background: none;
    border: none;
    border-radius: 0;
    padding: 26px 30px 0 0;
  }
  .how-section .how-card + .how-card {
    border-left: 1px solid var(--line);
    padding-left: 30px;
  }
  .how-section .how-card:hover { transform: none; }
  .how-section .how-num {
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
    opacity: 0.9;
  }
  .how-section .how-card h3 { margin-top: 6px; font-size: 1.35rem; }
}

/* ── Table of Contents shelf ── */
.toc-shelf {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(50px, 7vw, 90px) 0;
}
.toc-eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.toc-head h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 600;
}
.toc-sub { margin: 0; max-width: 56ch; color: var(--text-dim); line-height: 1.6; }
.toc-colophon { display: none; }

@media (min-width: 721px) {
  .toc-leaf {
    position: relative;
    padding: clamp(30px, 4.4vw, 58px) clamp(26px, 4vw, 60px) clamp(18px, 2.6vw, 34px);
    border-radius: 24px;
    background:
      radial-gradient(circle at 88% 92%, rgba(120, 90, 50, 0.14), transparent 42%),
      radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.5), transparent 46%),
      linear-gradient(168deg, var(--paper), var(--paper-2));
    box-shadow:
      0 30px 70px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    color: var(--paper-ink);
  }
  .toc-head { margin-bottom: clamp(18px, 2.4vw, 30px); }
  .toc-eyebrow { color: var(--gold-deep); }
  .toc-head h2 { color: var(--paper-ink); }
  .toc-sub { color: rgba(42, 32, 20, 0.72); }
  .toc-colophon {
    display: block;
    margin: 14px 0 0;
    text-align: center;
    color: var(--gold-deep);
    opacity: 0.75;
  }

  /* chapters render as numbered contents rows */
  .toc-rows { counter-reset: toc-chapter; }
  .toc-rows > section[data-drawer] {
    counter-increment: toc-chapter;
    width: auto;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(42, 32, 20, 0.16);
  }

  .toc-rows .drawer-toggle {
    display: flex;
    align-items: baseline;
    gap: 20px;
    width: 100%;
    padding: 20px 6px;
    margin: 0;
    text-align: left;
    cursor: pointer;
    color: var(--paper-ink);
    font: inherit;
    background: none;
    border: none;
    transition: background 180ms ease;
  }
  .toc-rows .drawer-toggle::before {
    content: counter(toc-chapter, upper-roman) ".";
    flex: 0 0 2.4em;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--gold-deep);
  }
  .toc-rows .drawer-toggle:hover,
  .toc-rows .drawer-toggle:focus-visible { background: rgba(255, 255, 255, 0.32); }
  .toc-rows .drawer-toggle:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: -2px;
  }

  .toc-rows .drawer-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
  }
  .toc-rows .drawer-toggle-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(42, 32, 20, 0.55);
  }
  .toc-rows .drawer-toggle-label {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 600;
    line-height: 1.2;
  }
  .toc-rows .drawer-chevron {
    flex: 0 0 auto;
    align-self: center;
    width: 11px;
    height: 11px;
    border-right: 2px solid var(--gold-deep);
    border-bottom: 2px solid var(--gold-deep);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 250ms ease;
  }
  .toc-rows .is-open .drawer-chevron { transform: rotate(225deg); margin-top: 4px; }

  /* collapse mechanism (desktop mirror of the mobile drawers) */
  .toc-rows .is-drawer .drawer-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 340ms ease;
  }
  .toc-rows .is-drawer.is-open .drawer-body { grid-template-rows: 1fr; }
  .toc-rows .is-drawer .drawer-inner {
    display: block;
    overflow: hidden;
    min-height: 0;
  }

  /* an open chapter unfolds as a dark plate set into the leaf */
  .toc-rows .is-open .drawer-inner {
    margin: 2px 0 22px;
    padding: clamp(20px, 2.6vw, 34px);
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
  }

  /* the row already carries the chapter's eyebrow + title */
  .toc-rows .is-drawer .section-head .eyebrow,
  .toc-rows .is-drawer .section-head h2,
  .toc-rows .is-drawer .ebook-copy > .eyebrow,
  .toc-rows .is-drawer .ebook-copy > h2 { display: none; }
  .toc-rows .is-drawer .section-head { margin-bottom: 8px; }
}

/* ── bookmark ribbon: your place in the page ── */
.ribbon { display: none; }
@media (min-width: 1240px) {
  .ribbon {
    display: block;
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 60;
  }
  .ribbon-rail {
    position: absolute;
    top: 0;
    right: 8px;
    width: 2px;
    height: 100%;
    background: rgba(255, 200, 116, 0.16);
    border-radius: 999px;
  }
  .ribbon-fill {
    display: block;
    width: 100%;
    height: 0%;
    background: linear-gradient(var(--gold-soft), var(--gold));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(255, 200, 116, 0.5);
  }
  .ribbon-stops {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: min(46vh, 460px);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .ribbon-stops a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 2px 0;
    text-decoration: none;
  }
  .ribbon-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 200, 116, 0.45);
    background: var(--ink);
    transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  }
  .ribbon-label {
    opacity: 0;
    transform: translateX(6px);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(13, 10, 24, 0.92);
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .ribbon-stops a:hover .ribbon-label,
  .ribbon-stops a:focus-visible .ribbon-label,
  .ribbon-stops a.is-here .ribbon-label {
    opacity: 1;
    transform: translateX(0);
  }
  .ribbon-stops a:hover .ribbon-dot,
  .ribbon-stops a:focus-visible .ribbon-dot { border-color: var(--gold); }
  .ribbon-stops a.is-here .ribbon-dot {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(255, 200, 116, 0.65);
  }
  .ribbon-stops a.is-here .ribbon-label { color: var(--gold); }
  .ribbon-stops a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 999px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toc-rows .is-drawer .drawer-body,
  .toc-rows .drawer-chevron,
  .ribbon-label,
  .ribbon-dot { transition: none; }
}

/* the ebook section is a grid at section level; inside the TOC the injected
   toggle/body must stack, and the two-column layout moves onto the plate */
@media (min-width: 721px) {
  .toc-rows .ebook-section.is-drawer { display: block; }
  .toc-rows .ebook-section .drawer-inner {
    display: grid;
    grid-template-columns: 1fr 0.62fr;
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
  }
}
